/* 临时共享账号链接系统 · PHP 版样式 */
:root {
    --brand: #4f46e5;
    --brand-dark: #4338ca;
    --ink: #0f172a;
    --ink2: #334155;
    --muted: #94a3b8;
    --line: #e6e9f0;
    --bg: #f5f7fb;
    --card: #fff;
    --ok: #15803d;
    --warn: #b45309;
    --danger: #dc2626;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(15,23,42,.04), 0 10px 30px -18px rgba(15,23,42,.35);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background: var(--bg); color: var(--ink2); font-size: 14px; line-height: 1.65;
}
a { color: var(--brand); text-decoration: none; }
code { background: #eef2ff; color: var(--brand-dark); border-radius: 6px; padding: 2px 7px; font-size: 12.5px; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

/* 布局 */
.wrap { display: flex; min-height: 100vh; }
.side {
    width: 240px; flex: none; background: linear-gradient(180deg, #111827 0%, #1e1b4b 100%);
    color: #fff; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.side-head { display: flex; gap: 10px; align-items: center; padding: 20px 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
.logo { font-size: 22px; }
.side-title { font-weight: 650; }
.side-sub { font-size: 12px; color: rgba(255,255,255,.55); }
.side-nav { padding: 12px; flex: 1; }
.nav-item {
    display: flex; gap: 10px; align-items: center; padding: 11px 13px; border-radius: 11px;
    color: rgba(255,255,255,.75); margin-bottom: 4px; transition: .18s;
}
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-item.active { background: linear-gradient(135deg, var(--brand), #6366f1); color: #fff; }
.side-foot { padding: 14px 16px 18px; border-top: 1px solid rgba(255,255,255,.08); }
.who { font-size: 13px; color: rgba(255,255,255,.7); margin-bottom: 8px; }
.main { flex: 1; padding: 24px 30px 60px; min-width: 0; }

/* 页头 / 卡片 */
.page-head { margin-bottom: 18px; }
.page-head h1 { font-size: 22px; color: var(--ink); }
.page-sub { color: var(--muted); font-size: 13px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; margin-bottom: 20px; }
.card-title { font-size: 15px; color: var(--ink); margin-bottom: 14px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 10px; }

/* 表单 */
.form { display: flex; flex-direction: column; gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink2); }
input[type=text], input[type=password], input[type=number], input[type=date], select, textarea {
    width: 100%; height: 42px; padding: 0 13px; font-size: 14px; font-family: inherit;
    color: var(--ink); background: #fbfcfe; border: 1px solid var(--line); border-radius: 10px; outline: none;
    transition: .16s;
}
textarea { height: auto; padding: 10px 13px; }
input:focus, select:focus, textarea:focus { background: #fff; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(79,70,229,.12); }
.input-mini { width: 110px; height: 30px; font-size: 12.5px; display: inline-block; }
.form-actions { display: flex; align-items: flex-end; gap: 10px; grid-column: 1 / -1; }

/* 按钮 */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 16px;
    border: 1px solid transparent; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer;
    background: #eef1f7; color: var(--ink2); font-family: inherit; transition: .16s; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--brand), #6366f1); color: #fff; }
.btn-block { width: 100%; height: 44px; }
.btn-ghost { background: rgba(255,255,255,.12); color: #fff; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; }
.btn-mini { height: 28px; padding: 0 9px; font-size: 12px; border-radius: 8px; background: #eef1f7; }
.btn-warn { background: #fef3c7; color: var(--warn); }
.btn-danger { background: #fee2e2; color: var(--danger); }
.inline { display: inline-block; margin-right: 4px; }

/* 表格 */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.table th { background: #f8fafc; color: #64748b; font-size: 12.5px; text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid #f1f3f9; vertical-align: middle; }
.table tr:hover td { background: #fafbff; }
.empty { text-align: center; color: var(--muted); padding: 28px 0 !important; }

/* 徽标 / 提示条 */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-ok { background: #dcfce7; color: var(--ok); }
.badge-warn { background: #fef3c7; color: var(--warn); }
.badge-danger { background: #fee2e2; color: var(--danger); }
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 13.5px; border: 1px solid transparent; border-left-width: 4px; }
.alert-success { background: #ecfdf5; color: var(--ok); border-color: #bbf7d0; }
.alert-danger { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }

/* 筛选 / 分页 */
.filters, .pager { display: flex; gap: 8px; flex-wrap: wrap; }
.pager { margin-top: 14px; }
.chip { display: inline-block; padding: 6px 13px; border-radius: 999px; background: #eef1f7; color: #64748b; font-size: 13px; }
.chip.active { background: var(--brand); color: #fff; }

/* 统计柱状 */
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 60px; align-items: center; gap: 12px; font-size: 13px; }
.bar-date { color: #64748b; }
.bar { height: 14px; border-radius: 999px; background: linear-gradient(90deg, var(--brand), #818cf8); display: block; }
.bar-val { text-align: right; font-weight: 600; }

/* 登录页 */
.login-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
    background: radial-gradient(1000px 500px at 10% -10%, #6366f1 0%, transparent 55%), linear-gradient(135deg, #312e81, #1e1b4b); }
.login-card { width: 100%; max-width: 400px; background: #fff; border-radius: 20px; padding: 38px 34px 32px; box-shadow: 0 30px 60px -20px rgba(15,23,42,.5); }
.login-logo { font-size: 34px; text-align: center; }
.login-card h1 { text-align: center; font-size: 21px; color: var(--ink); margin: 8px 0 4px; }
.login-sub { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 22px; }

/* 用户端公开页 */
.pub-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
    background: radial-gradient(900px 450px at 20% -10%, #38bdf8 0%, transparent 55%), linear-gradient(135deg, #0f172a, #1e293b); }
.pub-card { width: 100%; max-width: 480px; background: #fff; border-radius: 18px; padding: 30px 28px; box-shadow: 0 30px 60px -24px rgba(0,0,0,.6); }
.pub-icon { font-size: 32px; text-align: center; }
.pub-card h1 { text-align: center; font-size: 20px; color: var(--ink); margin: 8px 0 4px; }
.pub-sub { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.cred { background: #f8faff; border: 1px solid #e5eaff; border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.cred-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.cred-label { width: 44px; color: #64748b; font-size: 13px; flex: none; }
.cred-row code { flex: 1; font-size: 14px; word-break: break-all; }
.pub-stats { display: flex; flex-direction: column; gap: 6px; font-size: 13px; margin-bottom: 16px; }
.pub-stats > div { display: flex; justify-content: space-between; gap: 10px; }
.pub-tutorials { border-top: 1px dashed var(--line); padding-top: 14px; }
.pub-tutorials h2 { font-size: 14px; color: var(--ink); margin-bottom: 10px; }
.tut { margin-bottom: 10px; }
.tut-title { font-weight: 600; color: var(--ink2); font-size: 13.5px; }
.tut-body { color: #64748b; font-size: 13px; }
.tut-edit { border: 1px dashed #dbe2f5; border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.tut-edit-head { font-size: 13px; font-weight: 600; color: var(--brand-dark); margin-bottom: 10px; }

@media (max-width: 900px) {
    .wrap { flex-direction: column; }
    .side { width: 100%; height: auto; position: relative; }
    .main { padding: 16px 16px 40px; }
    .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
    .bar-row { grid-template-columns: 90px 1fr 46px; }
}
