/* ============ 轻舟云主机 · 控制台样式 ============ */
:root {
    --bg: #f5f7fb;
    --panel: #ffffff;
    --line: #e6eaf2;
    --line-soft: #f1f4f9;
    --text: #0f172a;
    --text-2: #475569;
    --muted: #8492a6;
    --primary: #4f46e5;
    --primary-2: #6366f1;
    --primary-soft: #eef2ff;
    --ok: #059669;
    --ok-soft: #ecfdf5;
    --bad: #dc2626;
    --bad-soft: #fef2f2;
    --warn: #d97706;
    --warn-soft: #fffbeb;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 30px -18px rgba(15, 23, 42, .18);
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: none; }
code, pre { font-family: var(--mono); }
img { max-width: 100%; }

/* ---------- 应用骨架 ---------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
    width: 236px;
    flex: 0 0 236px;
    background: #fff;
    border-right: 1px solid var(--line);
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px 20px;
}
.sidebar .brand .logo {
    width: 36px; height: 36px; border-radius: 11px;
    background: linear-gradient(135deg, #6366f1, #38bdf8);
    display: grid; place-items: center; color: #fff; font-size: 18px;
    box-shadow: 0 6px 16px -6px rgba(79, 70, 229, .6);
    flex: 0 0 36px;
}
.sidebar .brand > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.sidebar .brand .name { display: block; font-weight: 700; font-size: 15px; letter-spacing: -.2px; line-height: 1.25; }
.sidebar .brand .sub { display: block; font-size: 11px; color: var(--muted); line-height: 1.3; }

.nav-group { margin-bottom: 18px; }
.nav-label {
    font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em;
    color: #a2adbd; font-weight: 700; padding: 0 10px; margin-bottom: 6px;
}
.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 11px; border-radius: 9px; color: var(--text-2);
    font-size: 13.5px; font-weight: 500; margin-bottom: 2px;
    transition: .15s;
}
.nav-item:hover { background: #f6f8fc; color: var(--text); }
.nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav-item .ico { width: 18px; text-align: center; font-size: 15px; opacity: .9; }
.nav-item .count {
    margin-left: auto; font-size: 11px; background: #eef1f6; color: var(--muted);
    padding: 1px 7px; border-radius: 20px; font-weight: 600;
}
.nav-item.active .count { background: #e0e7ff; color: var(--primary); }

.sidebar-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.user-chip {
    display: flex; align-items: center; gap: 10px; padding: 9px 10px;
    border-radius: 10px; background: #f8fafc; border: 1px solid var(--line-soft);
}
.avatar {
    width: 32px; height: 32px; border-radius: 9px; flex: 0 0 32px;
    background: linear-gradient(135deg, #a5b4fc, #67e8f9);
    display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px;
    text-transform: uppercase;
}
.user-chip > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.user-chip .u-name { display: block; font-size: 13px; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .u-role { display: block; font-size: 11px; color: var(--muted); line-height: 1.3; }
.user-chip .out { margin-left: auto; color: var(--muted); font-size: 15px; }
.user-chip .out:hover { color: var(--bad); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    height: 62px; display: flex; align-items: center; gap: 14px;
    padding: 0 28px; background: rgba(255, 255, 255, .85);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 16.5px; font-weight: 650; letter-spacing: -.2px; }
.topbar .crumb { font-size: 12.5px; color: var(--muted); }
.topbar .spacer { flex: 1; }

.content { padding: 26px 28px 60px; max-width: 1240px; width: 100%; }

/* ---------- 卡片 ---------- */
.card {
    background: var(--panel); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-pad { padding: 22px 24px; }
.card-head {
    padding: 18px 24px; border-bottom: 1px solid var(--line-soft);
    display: flex; align-items: center; gap: 12px;
}
.card-head h2 { font-size: 15px; font-weight: 650; letter-spacing: -.1px; }
.card-head .desc { font-size: 12.5px; color: var(--muted); }
.card-head .spacer { flex: 1; }
.card-body { padding: 22px 24px; }

/* ---------- 统计卡 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 18px 20px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat::after {
    content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
    background: linear-gradient(180deg, #6366f1, #38bdf8); opacity: .9;
}
.stat .k { font-size: 12px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.stat .v { font-size: 25px; font-weight: 700; letter-spacing: -.6px; margin-top: 4px; line-height: 1.2; }
.stat .v small { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.stat .foot { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 8px 16px; border-radius: 9px; font-size: 13.5px; font-weight: 600;
    border: 1px solid var(--line); background: #fff; color: var(--text);
    cursor: pointer; transition: .16s; font-family: inherit; white-space: nowrap;
    line-height: 1.5;
}
.btn:hover { border-color: #cfd8e6; background: #f9fafc; }
.btn-primary {
    background: linear-gradient(135deg, #4f46e5, #6366f1); color: #fff; border-color: transparent;
    box-shadow: 0 5px 16px -6px rgba(79, 70, 229, .6);
}
.btn-primary:hover { filter: brightness(1.07); background: linear-gradient(135deg, #4f46e5, #6366f1); transform: translateY(-1px); }
.btn-danger { color: var(--bad); border-color: #fecaca; background: #fff; }
.btn-danger:hover { background: var(--bad-soft); border-color: #fca5a5; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: #f2f5fa; border-color: transparent; }
.btn-sm { padding: 5px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th {
    text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em;
    color: var(--muted); font-weight: 700; padding: 10px 16px;
    background: #fafbfd; border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tbody tr:hover { background: #fbfcfe; }
.tbl tr:last-child td { border-bottom: none; }
.tbl .mono { font-family: var(--mono); font-size: 12.5px; color: var(--text-2); }
.tbl .muted { color: var(--muted); font-size: 12.5px; }
.tbl .actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- 徽章 ---------- */
.badge {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 20px;
    background: #f1f5f9; color: var(--text-2); white-space: nowrap;
}
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-info { background: var(--primary-soft); color: var(--primary); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field > label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field .hint { display: block; font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.5; }
.input, .select, .textarea {
    width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px;
    font-size: 13.5px; background: #fbfcfe; color: var(--text); font-family: inherit;
    transition: .16s;
}
.input:focus, .select:focus, .textarea:focus {
    outline: none; border-color: var(--primary-2); background: #fff;
    box-shadow: 0 0 0 3.5px rgba(99, 102, 241, .12);
}
.textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238492a6' d='M6 8.5 1.8 4.3l.9-.9L6 6.7l3.3-3.3.9.9z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; padding-right: 32px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.grid-2 > * { min-width: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.form-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 20px; }
.form-actions .right { margin-left: auto; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--primary); }

/* ---------- 提示 ---------- */
.alert { border-radius: 11px; padding: 11px 15px; font-size: 13.5px; margin-bottom: 16px; line-height: 1.7; }
.alert-success { background: var(--ok-soft); border: 1px solid #a7f3d0; color: #047857; }
.alert-error { background: var(--bad-soft); border: 1px solid #fecaca; color: #b91c1c; }
.alert-info { background: var(--primary-soft); border: 1px solid #c7d2fe; color: #4338ca; }
.alert-warn { background: var(--warn-soft); border: 1px solid #fde68a; color: #b45309; }

/* ---------- 进度 ---------- */
.progress { height: 7px; background: #eef1f6; border-radius: 20px; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 20px; background: linear-gradient(90deg, #6366f1, #38bdf8); transition: width .4s; }
.progress.warn > span { background: linear-gradient(90deg, #f59e0b, #f97316); }
.progress.danger > span { background: linear-gradient(90deg, #ef4444, #f43f5e); }

/* ---------- 站点卡 ---------- */
.site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 16px; }
.site-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 18px 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px;
    transition: .18s;
}
.site-card:hover { border-color: #cdd7e8; transform: translateY(-2px); box-shadow: 0 14px 34px -18px rgba(15, 23, 42, .28); }
.site-card .head { display: flex; align-items: flex-start; gap: 12px; }
.site-icon {
    width: 40px; height: 40px; border-radius: 11px; flex: 0 0 40px;
    background: linear-gradient(135deg, #eef2ff, #e0f2fe); color: var(--primary);
    display: grid; place-items: center; font-size: 18px; font-weight: 700;
}
.site-card .title { font-size: 14.5px; font-weight: 650; line-height: 1.3; }
.site-card .url { font-size: 12px; color: var(--muted); font-family: var(--mono); word-break: break-all; }
.site-card .meta { display: flex; gap: 12px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.site-card .foot { display: flex; gap: 8px; margin-top: auto; padding-top: 4px; }

/* ---------- 文件管理器 ---------- */
.crumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 13px; }
.crumbs a { color: var(--text-2); padding: 2px 6px; border-radius: 6px; }
.crumbs a:hover { background: #f1f5f9; color: var(--primary); }
.crumbs .sep { color: #cbd5e1; }
.crumbs .cur { color: var(--text); font-weight: 600; padding: 2px 6px; }

.file-list { font-size: 13.5px; }
.file-row {
    display: flex; align-items: center; gap: 12px; padding: 9px 16px;
    border-bottom: 1px solid var(--line-soft); transition: .12s;
}
.file-row:hover { background: #fbfcfe; }
.file-row:last-child { border-bottom: none; }
.file-row .ico { width: 22px; text-align: center; font-size: 15px; flex: 0 0 22px; }
.file-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .nm a { color: var(--text); font-weight: 500; }
.file-row .nm a:hover { color: var(--primary); }
.file-row .sz { width: 84px; text-align: right; color: var(--muted); font-size: 12px; font-family: var(--mono); flex: 0 0 84px; }
.file-row .dt { width: 120px; text-align: right; color: var(--muted); font-size: 12px; flex: 0 0 120px; }
.file-row .ops { width: auto; display: flex; gap: 3px; justify-content: flex-end; flex: 0 0 auto; opacity: .5; transition: .15s; }
.file-row:hover .ops { opacity: 1; }
.icon-btn {
    width: 27px; height: 27px; border-radius: 7px; border: 1px solid transparent; background: transparent;
    color: var(--muted); cursor: pointer; display: grid; place-items: center; font-size: 13px;
    transition: .14s; padding: 0; font-family: inherit;
}
.icon-btn:hover { background: #eef2f8; color: var(--text); border-color: var(--line); }
.icon-btn.danger:hover { background: var(--bad-soft); color: var(--bad); border-color: #fecaca; }

.upload-zone {
    border: 1.5px dashed #cdd7e8; border-radius: 12px; padding: 22px; text-align: center;
    background: #fafbfe; transition: .18s; cursor: pointer;
}
.upload-zone:hover, .upload-zone.drag { border-color: var(--primary-2); background: var(--primary-soft); }
.upload-zone .big { font-size: 24px; margin-bottom: 4px; }
.upload-zone .t { font-size: 13.5px; font-weight: 600; }
.upload-zone .s { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------- 编辑器 ---------- */
.editor-shell { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.editor-bar {
    display: flex; align-items: center; gap: 10px; padding: 9px 14px;
    background: #f8fafc; border-bottom: 1px solid var(--line); font-size: 12.5px;
}
.editor-bar .file { font-family: var(--mono); color: var(--text-2); }
.editor-area {
    width: 100%; min-height: 58vh; border: none; padding: 16px 18px; resize: vertical;
    font-family: var(--mono); font-size: 13px; line-height: 1.7; color: #1e293b;
    background: #fff; outline: none; tab-size: 4;
}

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 56px 20px; }
.empty .ico { font-size: 38px; opacity: .55; margin-bottom: 10px; }
.empty h3 { font-size: 15px; font-weight: 650; margin-bottom: 5px; }
.empty p { font-size: 13px; color: var(--muted); margin-bottom: 18px; }

/* ---------- 分页 ---------- */
.pager { display: flex; align-items: center; gap: 6px; padding: 14px 20px; border-top: 1px solid var(--line-soft); }
.pager .info { font-size: 12.5px; color: var(--muted); margin-right: auto; }
.pager a, .pager span.cur {
    min-width: 30px; height: 30px; padding: 0 9px; border-radius: 8px; display: inline-flex;
    align-items: center; justify-content: center; font-size: 13px; color: var(--text-2);
    border: 1px solid var(--line); background: #fff;
}
.pager a:hover { border-color: #c7d2fe; color: var(--primary); background: var(--primary-soft); }
.pager span.cur { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 600; }
.pager span.dis { opacity: .45; }

/* ---------- 工具 ---------- */
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.flex { display: flex; } .between { justify-content: space-between; } .center-y { align-items: center; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; }
.w-full { width: 100%; }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.divider { height: 1px; background: var(--line-soft); margin: 18px 0; }
.hidden { display: none !important; }

/* ---------- 提示气泡 ---------- */
.flash-wrap { position: fixed; top: 16px; right: 18px; z-index: 999; display: flex; flex-direction: column; gap: 8px; max-width: 380px; }
.flash {
    background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--primary);
    border-radius: 10px; padding: 11px 15px; font-size: 13px; box-shadow: 0 12px 32px -12px rgba(15, 23, 42, .3);
    animation: slideIn .28s ease; display: flex; gap: 9px; align-items: flex-start;
}
.flash.success { border-left-color: var(--ok); }
.flash.error { border-left-color: var(--bad); }
.flash .x { margin-left: auto; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; }
@keyframes slideIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }

/* ---------- 弹窗 ---------- */
.modal-mask {
    position: fixed; inset: 0; background: rgba(15, 23, 42, .38); backdrop-filter: blur(2px);
    display: none; place-items: center; z-index: 900; padding: 20px;
}
.modal-mask.show { display: grid; }
.modal {
    background: #fff; border-radius: 16px; width: 100%; max-width: 420px;
    box-shadow: 0 30px 70px -20px rgba(15, 23, 42, .45); overflow: hidden;
    animation: pop .2s ease;
}
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(6px); } to { opacity: 1; transform: none; } }
.modal-head { padding: 18px 22px 0; font-size: 15.5px; font-weight: 650; }
.modal-body { padding: 12px 22px 4px; font-size: 13.5px; color: var(--text-2); line-height: 1.7; }
.modal-foot { padding: 18px 22px; display: flex; gap: 10px; justify-content: flex-end; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
    .sidebar { position: fixed; left: -240px; z-index: 100; transition: .22s; box-shadow: 0 0 40px rgba(0,0,0,.1); }
    .sidebar.open { left: 0; }
    .content { padding: 18px 16px 50px; }
    .topbar { padding: 0 16px; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .file-row .dt { display: none; }
    .file-row .ops { opacity: 1; }
    .menu-toggle { display: inline-flex !important; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
}
.menu-toggle { display: none; }

/* ---------- 公开页 ---------- */
.public-nav {
    height: 64px; display: flex; align-items: center; gap: 14px;
    padding: 0 32px; max-width: 1180px; margin: 0 auto;
}
.public-nav .brand { display: flex; align-items: center; gap: 10px; }
.public-nav .brand .logo {
    width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(135deg, #6366f1, #38bdf8);
    display: grid; place-items: center; color: #fff; font-size: 18px;
    box-shadow: 0 6px 16px -6px rgba(79, 70, 229, .55);
}
.public-nav .brand .name { font-weight: 700; font-size: 15px; }
.public-nav .brand > span:last-child { display: flex; flex-direction: column; }
.public-nav .links { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.public-nav .links a.navlink { color: var(--text-2); font-size: 13.5px; font-weight: 500; padding: 6px 10px; border-radius: 8px; }
.public-nav .links a.navlink:hover { background: #eef2ff; color: var(--primary); }

.hero { max-width: 1180px; margin: 0 auto; padding: 60px 32px 40px; text-align: center; }
.hero .pill {
    display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600;
    color: var(--primary); background: var(--primary-soft); border: 1px solid #e0e7ff;
    padding: 5px 14px; border-radius: 30px; margin-bottom: 20px;
}
.hero h1 { font-size: 44px; line-height: 1.18; letter-spacing: -1.4px; font-weight: 800; margin-bottom: 16px; }
.hero h1 .grad { background: linear-gradient(120deg, #4f46e5, #0ea5e9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 16px; color: var(--text-2); max-width: 620px; margin: 0 auto 28px; line-height: 1.75; }
.hero .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero .cta .btn { padding: 11px 24px; font-size: 14px; }
.hero-stats { display: flex; gap: 36px; justify-content: center; margin-top: 44px; flex-wrap: wrap; }
.hero-stats .n { font-size: 26px; font-weight: 750; letter-spacing: -.6px; }
.hero-stats .l { font-size: 12.5px; color: var(--muted); }

.section { max-width: 1180px; margin: 0 auto; padding: 40px 32px; }
.section-title { text-align: center; margin-bottom: 32px; }
.section-title h2 { font-size: 27px; letter-spacing: -.7px; font-weight: 750; margin-bottom: 8px; }
.section-title p { color: var(--muted); font-size: 14px; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.feature {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
    box-shadow: var(--shadow);
}
.feature .ico {
    width: 40px; height: 40px; border-radius: 11px; background: linear-gradient(135deg, #eef2ff, #e0f2fe);
    display: grid; place-items: center; font-size: 19px; margin-bottom: 13px;
}
.feature h3 { font-size: 14.5px; font-weight: 650; margin-bottom: 5px; }
.feature p { font-size: 13px; color: var(--muted); line-height: 1.7; }

.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; align-items: start; }
.plan {
    background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 26px 24px;
    box-shadow: var(--shadow); position: relative;
}
.plan.pop { border-color: #c7d2fe; box-shadow: 0 20px 50px -24px rgba(79, 70, 229, .45); }
.plan.pop::before {
    content: "推荐"; position: absolute; top: -11px; right: 20px; font-size: 11px; font-weight: 700;
    background: linear-gradient(135deg, #4f46e5, #6366f1); color: #fff; padding: 3px 12px; border-radius: 20px;
}
.plan h3 { font-size: 15px; font-weight: 650; }
.plan .price { font-size: 34px; font-weight: 800; letter-spacing: -1.2px; margin: 10px 0 2px; }
.plan .price small { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan .feat { list-style: none; margin: 18px 0 22px; font-size: 13px; color: var(--text-2); }
.plan .feat li { padding: 5px 0 5px 22px; position: relative; }
.plan .feat li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }

.public-foot {
    border-top: 1px solid var(--line); margin-top: 40px; padding: 28px 32px;
    text-align: center; font-size: 12.5px; color: var(--muted);
}

/* ---------- 认证页 ---------- */
.auth-wrap { min-height: calc(100vh - 64px); display: grid; place-items: center; padding: 30px 20px 60px; }
.auth-card {
    width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line);
    border-radius: 18px; padding: 34px 34px 30px;
    box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 24px 60px -30px rgba(15,23,42,.3);
}
.auth-card h1 { font-size: 22px; letter-spacing: -.5px; font-weight: 750; margin-bottom: 5px; }
.auth-card .sub { font-size: 13.5px; color: var(--muted); margin-bottom: 24px; }
.auth-card .foot { text-align: center; font-size: 13px; color: var(--muted); margin-top: 18px; }

/* ---------- 错误页 ---------- */
.err-wrap { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 40px 20px; }
.err-code {
    font-size: 78px; font-weight: 800; letter-spacing: -5px; line-height: 1;
    background: linear-gradient(135deg, #6366f1, #38bdf8); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.err-wrap h1 { font-size: 20px; margin: 10px 0 8px; }
.err-wrap p { color: var(--muted); font-size: 14px; }

/* ---------- 积分签到 ---------- */
.checkin-hero {
    position: relative; overflow: hidden;
    border-radius: 18px; padding: 28px 30px;
    background: linear-gradient(125deg, #4f46e5 0%, #6d5ce8 45%, #0ea5e9 100%);
    color: #fff; display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
    box-shadow: 0 18px 44px -22px rgba(79, 70, 229, .75);
}
.checkin-hero::after {
    content: ""; position: absolute; right: -60px; top: -80px;
    width: 260px; height: 260px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.22), transparent 68%);
    pointer-events: none;
}
.checkin-hero::before {
    content: ""; position: absolute; right: 120px; bottom: -110px;
    width: 220px; height: 220px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.14), transparent 70%);
    pointer-events: none;
}
.ch-left { position: relative; z-index: 1; flex: 1; min-width: 200px; }
.ch-label { font-size: 12.5px; opacity: .82; display: flex; align-items: center; gap: 6px; }
.ch-points { font-size: 44px; font-weight: 800; letter-spacing: -1.6px; line-height: 1.15; margin: 2px 0 4px; }
.ch-points small { font-size: 14px; font-weight: 600; letter-spacing: 0; opacity: .8; margin-left: 4px; }
.ch-sub { font-size: 12.5px; opacity: .82; }
.ch-right { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.btn-checkin {
    background: #fff; color: #4338ca; border: none; border-radius: 12px;
    padding: 12px 26px; font-size: 14.5px; font-weight: 700; cursor: pointer;
    display: inline-flex; align-items: center; gap: 8px; font-family: inherit;
    box-shadow: 0 10px 24px -10px rgba(15, 23, 42, .45); transition: .18s;
}
.btn-checkin:hover { transform: translateY(-1.5px); box-shadow: 0 14px 30px -10px rgba(15, 23, 42, .5); }
.btn-checkin.done {
    background: rgba(255, 255, 255, .18); color: #fff; cursor: default;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); backdrop-filter: blur(4px);
}
.btn-checkin.done:hover { transform: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); }
.ch-streak {
    display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px;
    background: rgba(255, 255, 255, .16); padding: 5px 12px; border-radius: 20px;
    backdrop-filter: blur(4px);
}

.checkin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
.cstat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow); }
.cstat .k { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.cstat .v { font-size: 22px; font-weight: 750; letter-spacing: -.5px; margin-top: 3px; }
.cstat .v small { font-size: 12.5px; font-weight: 500; color: var(--muted); letter-spacing: 0; }

.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
.cal .wd { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .04em; padding-bottom: 4px; }
.cal .day {
    height: 46px; display: grid; place-items: center; border-radius: 10px;
    font-size: 12.5px; background: #f7f9fc; color: var(--text-2); position: relative;
    border: 1px solid transparent;
}
.cal .day.pad { background: transparent; border-color: transparent; padding: 0; }
.cal .day.future { color: #cbd5e1; background: #fafbfd; }
.cal .day.done {
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    color: var(--primary); font-weight: 700; border-color: #dbe2ff;
}
.cal .day.done::after {
    content: ""; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
    width: 4px; height: 4px; border-radius: 50%; background: var(--primary); opacity: .65;
}
.cal .day.today { box-shadow: inset 0 0 0 1.8px var(--primary); color: var(--primary); font-weight: 700; }

.redeem-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.redeem-card {
    border: 1px solid var(--line); border-radius: 13px; padding: 13px 14px;
    background: #fbfcfe; display: flex; align-items: center; gap: 12px;
}
.redeem-card .rc-ico {
    width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
    background: linear-gradient(135deg, #eef2ff, #e0f2fe); color: var(--primary); flex: 0 0 36px;
}
.redeem-card .rc-main { flex: 1; min-width: 0; }
.redeem-card .rc-title { font-size: 13.5px; font-weight: 650; }
.redeem-card .rc-desc { font-size: 11.5px; color: var(--muted); line-height: 1.55; margin-top: 1px; }
.redeem-card .btn { flex: 0 0 auto; }
.redeem-card.disabled { opacity: .55; }

.checkin-log { display: flex; flex-direction: column; }
.checkin-log .row {
    display: flex; align-items: center; gap: 10px; padding: 9px 0;
    border-bottom: 1px solid var(--line-soft); font-size: 12.5px;
}
.checkin-log .row:last-child { border-bottom: none; }
.checkin-log .row .d { color: var(--text-2); }
.checkin-log .row .p { margin-left: auto; font-weight: 700; color: var(--ok); font-family: var(--mono); font-size: 12px; }
.checkin-log .row .s { color: var(--muted); font-size: 11.5px; }

@media (max-width: 900px) {
    .checkin-stats { grid-template-columns: 1fr; }
    .redeem-grid { grid-template-columns: 1fr; }
    .checkin-hero { padding: 22px; }
    .ch-points { font-size: 36px; }
    .ch-right { width: 100%; align-items: flex-start; }
}

/* ---------- 导航红点与状态点 ---------- */
.nav-item .dot-badge {
    width: 7px; height: 7px; border-radius: 50%; background: #ef4444;
    margin-left: auto; box-shadow: 0 0 0 3px #fee2e2; flex: 0 0 7px;
}
.status-dot {
    width: 8px; height: 8px; border-radius: 50%; background: var(--ok);
    display: inline-block; flex: 0 0 8px;
}
.status-dot.off { background: #cbd5e1; }

/* 文件/空状态图标统一尺寸 */
.ico-svg { display: inline-flex; align-items: center; justify-content: center; color: #7c8aa0; }
.empty .ico-svg { color: #b6c2d4; margin-bottom: 10px; }
.feature .ico svg { color: var(--primary); }

/* 设置页小标签 */
.mini-label { font-size: 12.5px; font-weight: 600; color: var(--text); margin-bottom: 6px; }

/* ---------- 站点子导航 ---------- */
.site-tabs {
    display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
    margin-bottom: 18px; padding: 5px; border-radius: 12px;
    background: #f4f7fb; border: 1px solid var(--line-soft);
}
.site-tab {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 12px; border-radius: 9px; font-size: 12.5px; font-weight: 550;
    color: var(--text-2); transition: .15s;
}
.site-tab:hover { background: #fff; color: var(--text); }
.site-tab.active { background: #fff; color: var(--primary); font-weight: 650; box-shadow: 0 1px 3px rgba(15, 23, 42, .08); }
.site-tab svg { opacity: .85; }
.site-tabs .spacer { flex: 1; }

/* ---------- 分段切换 ---------- */
.seg { display: inline-flex; padding: 3px; border-radius: 9px; background: #eef2f8; gap: 2px; }
.seg-item {
    padding: 5px 12px; border-radius: 7px; font-size: 12.5px; color: var(--text-2); font-weight: 550;
}
.seg-item:hover { color: var(--text); }
.seg-item.active { background: #fff; color: var(--primary); font-weight: 650; box-shadow: 0 1px 2px rgba(15, 23, 42, .1); }

/* ---------- 键值列表 ---------- */
.kv-list { display: flex; flex-direction: column; gap: 11px; }
.kv { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; font-size: 13px; }
.kv .k { color: var(--muted); flex: 0 0 auto; }
.kv .v { text-align: right; min-width: 0; color: var(--text); display: flex; align-items: center; gap: 5px; justify-content: flex-end; flex-wrap: wrap; }
.kv .v .icon-btn { width: 24px; height: 24px; }

/* ---------- 代码块 ---------- */
.code-block { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: #0f172a; }
.code-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 7px 12px; font-size: 11.5px; color: #94a3b8;
    background: rgba(148, 163, 184, .1); border-bottom: 1px solid rgba(148, 163, 184, .16);
}
.code-head .icon-btn { color: #94a3b8; border-color: transparent; background: transparent; width: 24px; height: 24px; }
.code-head .icon-btn:hover { color: #e2e8f0; background: rgba(148, 163, 184, .18); border-color: transparent; }
.code-block pre {
    margin: 0; padding: 13px 14px; overflow-x: auto;
    font-family: var(--mono); font-size: 12px; line-height: 1.7; color: #cbd5e1; white-space: pre;
}

/* ---------- 解析检查 ---------- */
.check-list { display: flex; flex-direction: column; gap: 8px; }
.check-row {
    display: flex; gap: 9px; align-items: flex-start;
    padding: 10px 12px; border-radius: 10px; font-size: 13px;
    border: 1px solid var(--line-soft); background: #fbfcfe;
}
.check-row .ico { flex: 0 0 16px; margin-top: 1px; }
.check-row.ok { background: #f0fdf6; border-color: #bbf7d0; }
.check-row.ok .ico { color: var(--ok); }
.check-row.bad { background: #fff7f7; border-color: #fecaca; }
.check-row.bad .ico { color: var(--bad); }
.check-row .txt { min-width: 0; }

/* ---------- 24 小时柱状图 ---------- */
.hourbars { display: flex; align-items: flex-end; gap: 4px; height: 150px; }
.hourbars .hb {
    flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column;
    align-items: center; justify-content: flex-end; gap: 4px; position: relative;
}
.hourbars .hb-bar {
    width: 100%; max-width: 22px; border-radius: 5px 5px 2px 2px; min-height: 0;
    background: linear-gradient(180deg, #818cf8, #6366f1); transition: .2s;
}
.hourbars .hb:hover .hb-bar { background: linear-gradient(180deg, #6366f1, #4f46e5); }
.hourbars .hb-v { font-size: 10px; color: var(--muted); height: 12px; font-family: var(--mono); }
.hourbars .hb-l { font-size: 9.5px; color: #a3aec0; font-family: var(--mono); }
.hourbars .hb:nth-child(even) .hb-l { opacity: .55; }

/* ---------- 排行条 ---------- */
.rank-list { display: flex; flex-direction: column; gap: 13px; }
.rank-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 5px; font-size: 12.5px; }
.rank-name { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.rank-name svg { color: #94a3b8; flex: 0 0 auto; }
.rank-val { color: var(--muted); font-size: 12px; flex: 0 0 auto; font-family: var(--mono); }
.rank-bar { height: 6px; border-radius: 20px; background: #eef1f6; overflow: hidden; }
.rank-bar > span { display: block; height: 100%; border-radius: 20px; background: linear-gradient(90deg, #818cf8, #38bdf8); }

/* ---------- 邮件预览 ---------- */
.mail-preview { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #f5f7fb; }
.mail-preview iframe { width: 100%; height: 320px; border: 0; display: block; background: #f5f7fb; }

/* ---------- 邮箱验证提示条 ---------- */
.verify-bar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 11px 16px; border-radius: 11px; margin-bottom: 16px;
    background: #fffbeb; border: 1px solid #fde68a; color: #92400e; font-size: 13px;
}
.verify-bar .spacer { flex: 1; }
.verify-bar form { display: inline; }

/* ---------- 语言切换 ---------- */
.lang-switch {
    display: inline-flex; padding: 2px; border-radius: 8px;
    background: #eef2f8; gap: 1px; margin: 0 4px;
}
.lang-item {
    padding: 3px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600;
    color: var(--text-2); letter-spacing: .02em;
}
.lang-item:hover { color: var(--primary); }
.lang-item.active { background: #fff; color: var(--primary); box-shadow: 0 1px 2px rgba(15, 23, 42, .1); }

/* ---------- 站点工具入口 ---------- */
.tool-row {
    display: flex; align-items: center; gap: 11px;
    padding: 9px 10px; border-radius: 10px; color: var(--text);
    transition: .15s;
}
.tool-row:hover { background: #f6f8fc; }
.tool-row > svg { color: #b6c2d4; flex: 0 0 auto; }
.tool-ico {
    width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
    background: linear-gradient(135deg, #eef2ff, #e0f2fe); color: var(--primary); flex: 0 0 32px;
}
.tool-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tool-name { font-size: 13px; font-weight: 600; line-height: 1.35; }
.tool-desc { font-size: 11.5px; color: var(--muted); line-height: 1.35; }

/* ---------- 两步验证 ---------- */
.secret-box {
    display: flex; align-items: center; gap: 10px; padding: 13px 15px;
    border: 1px dashed var(--line); border-radius: 11px; background: #fbfcfe;
}
.secret-val {
    font-family: var(--mono); font-size: 15px; letter-spacing: 2.5px;
    color: var(--text); word-break: break-all; line-height: 1.7;
}
.code-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.code-item {
    font-family: var(--mono); font-size: 13px; text-align: center; letter-spacing: 1px;
    padding: 9px 6px; border: 1px solid var(--line); border-radius: 9px; background: #fff;
}
@media (max-width: 640px) { .code-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- WAF ---------- */
.rule-list { display: flex; flex-direction: column; gap: 6px; }
.rule-row {
    display: flex; align-items: center; gap: 10px; padding: 8px 11px;
    border: 1px solid var(--line-soft); border-radius: 9px; font-size: 12.5px; background: #fbfcfe;
}
.rule-row .rid { font-family: var(--mono); font-size: 11px; color: var(--muted); flex: 0 0 auto; }
.rule-row .rname { flex: 1; min-width: 0; }
.sev { display: inline-flex; gap: 2px; flex: 0 0 auto; }
.sev i { width: 5px; height: 5px; border-radius: 50%; background: var(--line); display: block; }
.sev i.on { background: var(--bad); }
.payload {
    font-family: var(--mono); font-size: 11.5px; color: #9f1239; background: var(--bad-soft);
    padding: 2px 6px; border-radius: 5px; word-break: break-all; display: inline-block; max-width: 100%;
}

.table-scroll { overflow-x: auto; }
.table-scroll table { min-width: 720px; }
