/* ============================================================
   SW 中央控制台 · 统一设计系统
   风格：简约现代 / 主色 Indigo / 中性 Slate
   所有页面共享，保证风格一致
   ============================================================ */
:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-soft: #eef2ff;
    --primary-line: #c7d2fe;
    --accent: #06b6d4;
    --success: #10b981;
    --success-soft: #ecfdf5;
    --warning: #f59e0b;
    --warning-soft: #fffbeb;
    --danger: #ef4444;
    --danger-soft: #fef2f2;
    --info-soft: #eff6ff;

    --bg: #f5f6fa;
    --surface: #ffffff;
    --border: #e6e8ef;
    --text: #111827;
    --text-2: #6b7280;
    --text-3: #9ca3af;

    --radius: 14px;
    --radius-sm: 10px;
    --radius-lg: 22px;

    --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
    --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
    --shadow-md: 0 12px 32px -12px rgba(16, 24, 40, 0.16);
    --shadow-lg: 0 28px 60px -16px rgba(16, 24, 40, 0.22);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; height: 100%; }

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

::selection { background: var(--primary-line); }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d4d6de; border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #b9bcc7; }

[v-cloak] { display: none !important; }

/* ---------------- 渐变文字 ---------------- */
.gradient-text {
    background: linear-gradient(120deg, #4f46e5, #0ea5e9, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ============================================================
   登录页（Auth）
   ============================================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(600px 400px at 15% 10%, rgba(79, 70, 229, 0.12), transparent 60%),
        radial-gradient(600px 400px at 85% 90%, rgba(6, 182, 212, 0.12), transparent 60%),
        linear-gradient(160deg, #f7f8fc 0%, #eef0f7 100%);
}
.auth-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(#e3e6f0 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 75%);
}
.auth-card {
    position: relative;
    width: 400px;
    max-width: calc(100vw - 32px);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 44px 40px;
    text-align: center;
}
.auth-logo {
    width: 52px;
    height: 52px;
    margin: 0 auto 18px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 10px 24px -6px rgba(79, 70, 229, 0.5);
}
.auth-title { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; margin: 0 0 6px; }
.auth-sub { color: var(--text-2); font-size: 13px; margin: 0 0 30px; }
.auth-field { margin-bottom: 16px; text-align: left; }
.auth-field label { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; letter-spacing: 0.2px; }
.auth-back {
    display: inline-block;
    margin-top: 22px;
    color: var(--text-3);
    font-size: 12px;
    text-decoration: none;
    transition: color 0.2s;
}
.auth-back:hover { color: var(--primary); }

/* ============================================================
   输入框
   ============================================================ */
.inp {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.inp:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.14); background: #fff; }
.inp::placeholder { color: var(--text-3); }
textarea.inp { resize: vertical; min-height: 80px; line-height: 1.6; }
select.inp { cursor: pointer; }

/* ============================================================
   按钮
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 18px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.18s;
    text-decoration: none;
    white-space: nowrap;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 16px -6px rgba(79, 70, 229, 0.5); }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: #eceef4; }
.btn-danger { background: var(--danger-soft); color: var(--danger); border: 1px solid #fecaca; }
.btn-danger:hover { background: #fee2e2; }
.btn-success { background: var(--success-soft); color: var(--success); border: 1px solid #bbf7d0; }
.btn-success:hover { background: #d1fae5; }
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-submit {
    width: 100%;
    padding: 13px;
    margin-top: 22px;
    background: linear-gradient(135deg, var(--primary), #6366f1);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 22px -8px rgba(79, 70, 229, 0.55);
    transition: all 0.2s;
}
.btn-submit:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 14px 26px -8px rgba(79, 70, 229, 0.6); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* ============================================================
   卡片
   ============================================================ */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-xs);
}
.card-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}

/* ============================================================
   顶栏导航
   ============================================================ */
.navbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-brand { display: flex; align-items: center; gap: 12px; }
.nav-brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 6px 14px -4px rgba(79, 70, 229, 0.5);
}
.nav-title { font-size: 15px; font-weight: 800; letter-spacing: -0.2px; }
.nav-sub { font-size: 11px; color: var(--text-3); font-weight: 600; }
.nav-actions { display: flex; align-items: center; gap: 14px; }

/* ============================================================
   标签页
   ============================================================ */
.tabs {
    display: flex;
    gap: 4px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
}
.tab {
    padding: 14px 20px;
    border: none;
    background: none;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    color: var(--text-2);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.18s, border-color 0.18s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ============================================================
   内容区
   ============================================================ */
.content { padding: 24px; max-width: 1400px; margin: 0 auto; }
.content-narrow { padding: 24px; max-width: 1000px; margin: 0 auto; }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.page-title { font-size: 18px; font-weight: 800; margin: 0; letter-spacing: -0.3px; }

/* ============================================================
   徽章
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
}
.badge-success { background: var(--success-soft); color: #047857; }
.badge-primary { background: var(--primary-soft); color: var(--primary); }
.badge-warning { background: var(--warning-soft); color: #b45309; }
.badge-muted { background: #f3f4f6; color: var(--text-2); }
.badge-info { background: var(--info-soft); color: #1d4ed8; }
.badge-danger { background: var(--danger-soft); color: #b91c1c; }
.pin-tag { background: #fef3c7; color: #92400e; padding: 1px 8px; border-radius: 6px; font-size: 10px; font-weight: 800; margin-left: 8px; }

/* ============================================================
   统计卡片
   ============================================================ */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    text-align: center;
    box-shadow: var(--shadow-xs);
}
.stat-value { font-size: 28px; font-weight: 800; color: var(--primary); line-height: 1.2; }
.stat-label { font-size: 12px; color: var(--text-2); margin-top: 4px; }

/* ============================================================
   表格
   ============================================================ */
.table-shell {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: auto;
    box-shadow: var(--shadow-xs);
}
.table-shell table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table-shell th {
    text-align: left;
    padding: 12px;
    background: #f8f9fc;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    color: var(--text-2);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}
.table-shell td { padding: 12px; border-bottom: 1px solid #f1f2f7; vertical-align: middle; }
.table-shell tbody tr:hover td { background: #f8f9fc; }
.table-shell tbody tr:last-child td { border-bottom: none; }
.table-shell .empty { text-align: center; color: var(--text-3); padding: 48px 0; }
.empty { text-align: center; color: var(--text-3); padding: 48px 0; margin: 0; }

/* ============================================================
   弹窗
   ============================================================ */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 20px;
}
.modal {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 28px;
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modal-in 0.2s ease;
}
.modal-sm { max-width: 400px; }
.modal-lg { max-width: 760px; }
@keyframes modal-in {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-title { font-size: 17px; font-weight: 800; margin: 0 0 20px; letter-spacing: -0.3px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* ============================================================
   表单组
   ============================================================ */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; }
.field-row { display: flex; gap: 16px; align-items: center; }
.check-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; user-select: none; }
.check-line input { accent-color: var(--primary); }

/* ---------------- 提示 ---------------- */
.flash {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--danger-soft);
    color: var(--danger);
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    margin-bottom: 18px;
    border: 1px solid #fecaca;
}
.notice {
    background: var(--primary-soft);
    color: #3730a3;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    border: 1px solid var(--primary-line);
    line-height: 1.7;
}
.reply-box {
    background: var(--info-soft);
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.7;
}
.ann-content {
    white-space: pre-wrap;
    background: #f8f9fc;
    padding: 16px;
    border-radius: var(--radius-sm);
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.8;
    color: var(--text);
    border: 1px solid var(--border);
}
