/* ============================================================
   DocuMate 设计系统：深色科技感 + 动态光效
   ============================================================ */
:root {
    --bg: #070b16;
    --bg-soft: #0d1424;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-strong: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.10);
    --text: #e8edf7;
    --text-dim: #9aa6bd;
    --brand: #5b8cff;
    --brand-2: #8a5bff;
    --accent: #2ee6c4;
    --radius: 16px;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    /* 内容主轴宽度：加宽，避免内容挤在中间一窄条 */
    --maxw: 1240px;
    --gutter: clamp(20px, 6vw, 72px);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "PingFang SC", "Microsoft YaHei", -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    /* 更松弛的基础排版：行距拉开、字距微调 */
    line-height: 1.7;
    letter-spacing: 0.2px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ---------- 动态光效背景 ---------- */
.aurora {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.aurora::before,
.aurora::after {
    content: "";
    position: absolute;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.55;
    animation: float 18s ease-in-out infinite;
}

.aurora::before {
    background: radial-gradient(circle, var(--brand), transparent 60%);
    top: -15vw;
    left: -10vw;
}

.aurora::after {
    background: radial-gradient(circle, var(--brand-2), transparent 60%);
    bottom: -20vw;
    right: -10vw;
    animation-delay: -8s;
}

.grid-mask {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(4vw, 3vw) scale(1.12); }
}

/* ---------- 顶栏 ---------- */
.nav {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 26px var(--gutter);
}

.brand {
    font-weight: 800;
    font-size: 20px;
    letter-spacing: 0.5px;
}

.brand .dot {
    color: var(--accent);
}

.nav-links a {
    margin-left: 26px;
    color: var(--text-dim);
    font-size: 15px;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text);
}

/* 导航：登录按钮(高亮)、当前用户名、退出 */
.nav-links {
    display: flex;
    align-items: center;
}

.nav-cta {
    color: #fff !important;
    background: linear-gradient(100deg, var(--brand), var(--brand-2));
    padding: 8px 18px;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 0 8px 22px rgba(91, 140, 255, 0.35);
}

.nav-cta:hover {
    transform: translateY(-1px);
}

.nav-user {
    margin-left: 26px;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.nav-user::before {
    content: "👤";
    font-size: 13px;
}

.nav-admin-badge {
    margin-left: 20px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    padding: 4px 14px;
    border-radius: 999px;
    background: rgba(46, 230, 196, 0.12);
    border: 1px solid rgba(46, 230, 196, 0.28);
    letter-spacing: 0.5px;
}

.nav-links a.nav-active {
    color: #fff;
    font-weight: 600;
    position: relative;
}

.nav-links a.nav-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -22px;
    height: 2px;
    border-radius: 1px;
    background: linear-gradient(90deg, var(--brand), var(--accent));
}

.nav-logout {
    color: var(--text-dim) !important;
}

/* ---------- 下拉菜单 ---------- */
.nav-dropdown {
    position: relative;
    display: inline-block;
    margin-left: 26px;
}

.nav-dropdown-trigger {
    color: var(--text-dim);
    font-size: 15px;
    cursor: pointer;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.nav-dropdown-trigger::after {
    content: "▾";
    font-size: 12px;
    transition: transform 0.2s;
}

.nav-dropdown:hover .nav-dropdown-trigger {
    color: var(--text);
}

.nav-dropdown:hover .nav-dropdown-trigger::after {
    transform: rotate(-180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    min-width: 200px;
    background: rgba(13, 20, 36, 0.98);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px 0;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    z-index: 100;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-item {
    display: block;
    padding: 10px 20px;
    color: var(--text-dim);
    font-size: 14px;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    margin: 0 !important;
}

.nav-dropdown-item:hover {
    background: var(--surface-strong);
    color: var(--text);
}

/* 当下拉菜单的父级处于激活状态时 */
.nav-dropdown.nav-active .nav-dropdown-trigger {
    color: #fff;
    font-weight: 600;
    position: relative;
}

.nav-dropdown.nav-active .nav-dropdown-trigger::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -22px;
    height: 2px;
    border-radius: 1px;
    background: linear-gradient(90deg, var(--brand), var(--accent));
}

/* ---------- 通用容器 ---------- */
.wrap {
    position: relative;
    z-index: 2;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-dim);
    font-size: 13px;
}

.badge .pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 0 rgba(46, 230, 196, 0.7);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(46, 230, 196, 0.6); }
    70% { box-shadow: 0 0 0 10px rgba(46, 230, 196, 0); }
    100% { box-shadow: 0 0 0 0 rgba(46, 230, 196, 0); }
}

/* ---------- Hero —— 松弛大气版 ---------- */
.hero {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: clamp(120px, 16vh, 180px) var(--gutter) clamp(100px, 14vh, 160px);
}

.hero h1 {
    font-size: clamp(40px, 7vw, 72px);
    line-height: 1.22;
    margin: 44px auto 36px;
    max-width: 16ch;
    font-weight: 800;
    letter-spacing: -1.2px;
}

.gradient-text {
    background: linear-gradient(100deg, var(--brand), var(--accent) 60%, var(--brand-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p.lead {
    font-size: clamp(17px, 2.6vw, 21px);
    color: var(--text-dim);
    max-width: 680px;
    margin: 0 auto 56px;
    line-height: 2;
}

.lead code {
    background: var(--surface-strong);
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.9em;
    color: var(--accent);
}

.cta-row {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 15px 28px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(100deg, var(--brand), var(--brand-2));
    box-shadow: 0 10px 30px rgba(91, 140, 255, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(91, 140, 255, 0.55);
}

.btn-ghost {
    color: var(--text);
    background: var(--surface);
    border-color: var(--border);
}

.btn-ghost:hover {
    background: var(--surface-strong);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 9px 16px;
    font-size: 14px;
    border-radius: 10px;
}

/* ---------- 数据条 ---------- */
.stats {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    margin: clamp(72px, 10vh, 96px) auto 0;
    max-width: 760px;
    padding: 30px 16px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
}

.stat {
    flex: 1 1 150px;
    padding: 6px 26px;
    position: relative;
}

.stat + .stat::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 36px;
    width: 1px;
    background: var(--border);
}

.stat .num {
    font-size: clamp(28px, 3.2vw, 34px);
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
}

.stat .label {
    color: var(--text-dim);
    font-size: 13px;
    margin-top: 6px;
}

/* ---------- 一级功能入口 ---------- */
.tool-entries {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: clamp(24px, 3vw, 36px);
}

.tool-card {
    padding: 48px 40px;
    border-radius: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    backdrop-filter: blur(8px);
    text-align: center;
    transition: transform 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.tool-card:hover {
    transform: translateY(-6px);
    border-color: rgba(91, 140, 255, 0.6);
    background: var(--surface-strong);
    box-shadow: 0 20px 50px rgba(91, 140, 255, 0.25);
}

.tool-card .ico {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    font-size: 36px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, rgba(91, 140, 255, 0.3), rgba(138, 91, 255, 0.3));
    box-shadow: 0 12px 32px rgba(91, 140, 255, 0.3);
}

.tool-card h3 {
    margin: 0 0 16px;
    font-size: 24px;
    font-weight: 700;
}

.tool-card p {
    margin: 0 0 28px;
    color: var(--text-dim);
    font-size: 15px;
    line-height: 1.8;
}

.btn-secondary {
    color: #fff;
    background: linear-gradient(100deg, rgba(91, 140, 255, 0.8), rgba(138, 91, 255, 0.8));
    border: 1px solid rgba(91, 140, 255, 0.5);
    box-shadow: 0 8px 24px rgba(91, 140, 255, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(100deg, var(--brand), var(--brand-2));
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(91, 140, 255, 0.45);
}

/* ---------- 特性卡片 ---------- */
.section {
    position: relative;
    z-index: 2;
    padding: clamp(88px, 12vh, 140px) 0;
}

/* 编辑式区块头 */
.section-head {
    max-width: 760px;
    margin-bottom: clamp(48px, 8vh, 72px);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
}

.eyebrow::before {
    content: "";
    width: 26px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
}

.section h2 {
    text-align: left;
    font-size: clamp(30px, 4.4vw, 44px);
    line-height: 1.3;
    letter-spacing: -0.4px;
    margin: 0 0 18px;
}

.section .sub {
    text-align: left;
    color: var(--text-dim);
    font-size: clamp(15px, 1.8vw, 18px);
    line-height: 1.9;
    margin: 0;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: clamp(22px, 2vw, 30px);
}

.card {
    padding: 40px 36px;
    border-radius: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    backdrop-filter: blur(8px);
    transition: transform 0.2s, border-color 0.2s, background 0.2s;
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(91, 140, 255, 0.5);
    background: var(--surface-strong);
}

.card .ico {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    font-size: 24px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, rgba(91, 140, 255, 0.25), rgba(138, 91, 255, 0.25));
}

.card h3 {
    margin: 0 0 14px;
    font-size: 19px;
}

.card p {
    margin: 0;
    color: var(--text-dim);
    font-size: 15px;
    line-height: 1.9;
}

/* ---------- 步骤 ---------- */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: clamp(22px, 2vw, 30px);
    counter-reset: step;
}

.step {
    padding: 40px 36px;
    border-radius: 18px;
    border: 1px dashed var(--border);
    position: relative;
    line-height: 1.9;
}

.step h3 {
    margin: 0 0 12px;
    font-size: 19px;
}

.step::before {
    counter-increment: step;
    content: counter(step);
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(100deg, var(--brand), var(--brand-2));
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 16px;
}

/* ---------- 页脚 ---------- */
.footer {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: var(--maxw);
    margin: clamp(48px, 8vh, 80px) auto 0;
    padding: clamp(48px, 8vh, 72px) var(--gutter) 72px;
    color: var(--text-dim);
    font-size: 14px;
    border-top: 1px solid var(--border);
    line-height: 2;
}

/* 窄屏 */
@media (max-width: 560px) {
    .stats { max-width: 100%; }
    .stat { flex-basis: 100%; padding: 14px 8px; }
    .stat + .stat::before { display: none; }
    .stat + .stat { border-top: 1px solid var(--border); }
}

/* ============================================================
   应用页(工作台 / 历史 / 管理)：浅色应用外壳
   ============================================================ */
.app-body {
    background: var(--bg-soft);
}

.app-shell {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    margin: 0 auto;
    padding: 36px 5vw 88px;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
}

.panel.locked {
    opacity: 0.5;
    pointer-events: none;
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

.panel-title .n {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 14px;
    background: linear-gradient(100deg, var(--brand), var(--brand-2));
    color: #fff;
}

/* ---------- 工作台 / 管理页头部 ---------- */
.wb-header {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.wb-header h1 {
    font-size: 28px;
    margin: 0;
    font-weight: 800;
    letter-spacing: -0.4px;
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    background: rgba(46, 230, 196, 0.12);
    border: 1px solid rgba(46, 230, 196, 0.3);
}

.trial-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: #cdd9ff;
    background: rgba(91, 140, 255, 0.12);
    border: 1px solid rgba(91, 140, 255, 0.3);
}

.trial-badge b {
    color: #fff;
    font-size: 15px;
}

/* ---------- 管理员工具栏 ---------- */
.admin-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

/* ---------- 上传拖拽区 ---------- */
.dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 40px 24px;
    border-radius: 16px;
    border: 1.5px dashed rgba(255, 255, 255, 0.16);
    background: radial-gradient(130% 120% at 50% -10%, rgba(91, 140, 255, 0.08), transparent 60%);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.dropzone:hover {
    border-color: rgba(91, 140, 255, 0.6);
    background: radial-gradient(130% 120% at 50% -10%, rgba(91, 140, 255, 0.14), transparent 62%);
}

.dropzone.dragover {
    border-style: solid;
    border-color: var(--brand);
    background: rgba(91, 140, 255, 0.14);
    box-shadow: inset 0 0 0 3px rgba(91, 140, 255, 0.18), 0 18px 44px rgba(91, 140, 255, 0.22);
}

.dz-icon {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    color: #cdd9ff;
    background: linear-gradient(135deg, rgba(91, 140, 255, 0.28), rgba(138, 91, 255, 0.28));
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 10px 28px rgba(91, 140, 255, 0.28);
    transition: transform 0.2s ease;
}

.dropzone:hover .dz-icon { transform: translateY(-3px); }
.dropzone.dragover .dz-icon { transform: translateY(-6px) scale(1.06); }

.dz-icon svg { width: 28px; height: 28px; }

.dz-title { font-size: 16px; font-weight: 600; color: var(--text); }
.dz-title b { color: var(--brand); }
.dz-sub { font-size: 13px; color: var(--text-dim); }

/* ---------- 选中后的文件卡片 ---------- */
.file-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 18px;
    border-radius: 14px;
    background: var(--surface-strong);
    border: 1px solid rgba(46, 230, 196, 0.35);
}

.file-card .fc-ico {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    color: var(--accent);
    background: rgba(46, 230, 196, 0.14);
    flex-shrink: 0;
}

.file-card .fc-meta { flex: 1; min-width: 0; }
.file-card .fc-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.file-card .fc-size { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.file-card .fc-act {
    color: var(--text-dim);
    cursor: pointer;
    font-size: 13px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 12px;
    background: transparent;
    transition: color 0.15s, border-color 0.15s;
    flex-shrink: 0;
}
.file-card .fc-act:hover { color: #fff; border-color: var(--brand); }

/* ---------- 竖向步骤器 ---------- */
.stepper { margin-top: 28px; }

.s-step {
    position: relative;
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 18px;
    padding-bottom: 22px;
}

.s-step:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 21px;
    top: 46px;
    bottom: -2px;
    width: 2px;
    background: linear-gradient(var(--border), transparent);
}

.s-step-node {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 16px;
    color: var(--text-dim);
    background: var(--surface);
    border: 1px solid var(--border);
    transition: all 0.25s ease;
}

.s-step.active .s-step-node {
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    border-color: transparent;
    box-shadow: 0 0 0 5px rgba(91, 140, 255, 0.16), 0 10px 24px rgba(91, 140, 255, 0.3);
}

.s-step.done .s-step-node {
    color: #04130f;
    background: var(--accent);
    border-color: transparent;
}

.s-step-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    transition: border-color 0.25s ease, opacity 0.25s ease;
}

.s-step.active .s-step-card { border-color: rgba(91, 140, 255, 0.45); }
.s-step.locked .s-step-card { opacity: 0.72; }

.s-step-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 6px;
}

.s-step-tag {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    color: var(--text-dim);
    background: var(--surface-strong);
    border: 1px solid var(--border);
}
.s-step.active .s-step-tag { color: #cdd9ff; background: rgba(91, 140, 255, 0.16); border-color: rgba(91, 140, 255, 0.4); }
.s-step.done .s-step-tag { color: var(--accent); background: rgba(46, 230, 196, 0.14); border-color: rgba(46, 230, 196, 0.35); }

.lock-note {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dim);
    font-size: 14px;
    padding: 18px;
    border: 1px dashed var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
}

@media (prefers-reduced-motion: reduce) {
    .dropzone, .dz-icon, .s-step-node, .s-step-card { transition: none; }
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.chip {
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 13px;
    background: rgba(91, 140, 255, 0.15);
    border: 1px solid rgba(91, 140, 255, 0.35);
    color: #cdd9ff;
}

.chip.warn {
    background: rgba(255, 193, 7, 0.12);
    border-color: rgba(255, 193, 7, 0.4);
    color: #ffd86b;
}

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-top: 14px;
}

.alert-ok { background: rgba(46, 230, 196, 0.12); border: 1px solid rgba(46, 230, 196, 0.35); color: #9af0df; }
.alert-warn { background: rgba(255, 193, 7, 0.12); border: 1px solid rgba(255, 193, 7, 0.4); color: #ffd86b; }
.alert-err { background: rgba(255, 86, 86, 0.12); border: 1px solid rgba(255, 86, 86, 0.4); color: #ff9a9a; }

.muted { color: var(--text-dim); font-size: 13px; }

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table th, .table td {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid var(--border);
}

.table th { color: var(--text-dim); font-weight: 600; }

/* 用户管理列表列宽:内容自适应不截断 */
.admin-table .col-id     { width: 44px; }
.admin-table .col-user   { white-space: nowrap; }
.admin-table .col-name   { white-space: nowrap; }
.admin-table .col-role   { width: 52px; white-space: nowrap; }
.admin-table .col-trial  { width: 76px; white-space: nowrap; text-align: center; }
.admin-table .col-status { width: 56px; white-space: nowrap; text-align: center; }
.admin-table .col-login  { width: 148px; white-space: nowrap; }
.admin-table .col-acts   { white-space: nowrap; }
/* 操作按钮更紧凑 */
.admin-table .col-acts .btn-sm { padding: 5px 10px; font-size: 12px; margin-right: 4px; }

/* 用户名旁角色小标签 */
.role-tag {
    display: inline;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 6px;
    color: var(--accent);
    background: rgba(46, 230, 196, 0.12);
    border: 1px solid rgba(46, 230, 196, 0.25);
    vertical-align: middle;
    white-space: nowrap;
}

.tag-ok { color: var(--accent); }
.tag-fail { color: #ff9a9a; }

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    display: inline-block;
    animation: spin 0.8s linear infinite;
    vertical-align: -3px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

/* ============================================================
   登录 / 注册 页
   ============================================================ */
.auth-wrap {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    padding: clamp(56px, 10vh, 108px) var(--gutter) 80px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 44px 40px;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
}

.auth-title {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 8px;
    letter-spacing: -0.4px;
}

.auth-sub {
    color: var(--text-dim);
    font-size: 14px;
    line-height: 1.9;
    margin: 0 0 28px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    color: var(--text-dim);
}

.auth-field em {
    font-style: normal;
    font-size: 12px;
    color: var(--text-dim);
    opacity: 0.7;
    margin-left: 6px;
}

.auth-field input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font-size: 15px;
    transition: border-color 0.18s, background 0.18s;
}

.auth-field input:focus {
    outline: none;
    border-color: var(--brand);
    background: rgba(91, 140, 255, 0.08);
}

.auth-submit {
    width: 100%;
    justify-content: center;
    margin-top: 6px;
}

.auth-foot {
    margin: 22px 0 0;
    text-align: center;
    color: var(--text-dim);
    font-size: 14px;
}

.auth-foot a {
    color: var(--brand);
    font-weight: 600;
}

/* 注册页实时校验提示 */
.field-hint {
    font-size: 12px;
    min-height: 16px;
    line-height: 1.5;
}
.field-hint.hint-ok { color: var(--accent); }
.field-hint.hint-err { color: #ff9a9a; }

/* ============================================================
   弹窗(模态框)
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
}

.modal-card {
    width: 100%;
    max-width: 420px;
    background: #0d1424;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 36px 32px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}

.modal-card h2 {
    font-size: 21px;
    font-weight: 700;
    margin: 0 0 20px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}
