/* ============================================
   GEO 后台样式 - 简洁 + AI 科技感
============================================ */

:root {
    --bg: #0f1424;
    --bg-2: #131a30;
    --bg-card: #1a2342;
    --bg-elev: #1f2849;
    --border: rgba(99, 102, 241, 0.2);
    --border-strong: rgba(99, 102, 241, 0.4);
    --text: #e2e8f0;
    --text-dim: #94a3b8;
    --text-soft: #cbd5e1;
    --primary: #6366f1;
    --primary-light: #818cf8;
    --accent: #06b6d4;
    --danger: #ef4444;
    --success: #10b981;
    --warn: #f59e0b;
    --gradient: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}
a { color: var(--primary-light); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }

/* ============== Login ============== */
.login-body {
    background:
        radial-gradient(circle at 30% 30%, rgba(99,102,241,0.3), transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(6,182,212,0.25), transparent 50%),
        #050816;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
}
.login-wrap {
    position: relative;
    width: 100%;
    max-width: 420px;
}
.login-card {
    position: relative;
    z-index: 2;
    background: rgba(15, 20, 36, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-strong);
    border-radius: 20px;
    padding: 40px 36px;
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.15);
}
.login-logo { text-align: center; margin-bottom: 30px; }
.login-logo .logo-icon {
    width: 50px; height: 50px;
    display: inline-grid; place-items: center;
    background: var(--gradient);
    border-radius: 14px;
    font-weight: 800;
    font-size: 22px;
    color: #fff;
    box-shadow: 0 8px 24px rgba(99,102,241,0.4);
    margin-bottom: 14px;
}
.login-logo h1 {
    font-size: 22px;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.login-logo p { color: var(--text-dim); font-size: 13px; margin-top: 6px; }

.login-form label { display: block; margin-bottom: 18px; }
.login-form label span {
    display: block;
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 6px;
}
.login-form input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    transition: all .25s;
}
.login-form input:focus {
    outline: none;
    border-color: var(--primary-light);
    background: rgba(99,102,241,0.08);
}
.btn-block { width: 100%; justify-content: center; }
.login-hint {
    margin-top: 16px;
    padding: 12px;
    background: rgba(99,102,241,0.08);
    border: 1px dashed var(--border-strong);
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-dim);
    text-align: center;
}
.login-foot { text-align: center; margin-top: 24px; }
.login-foot a { font-size: 13px; color: var(--text-dim); }
.login-bg .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}
.login-bg .o1 { width: 300px; height: 300px; background: #6366f1; top: -100px; left: -100px; }
.login-bg .o2 { width: 250px; height: 250px; background: #06b6d4; bottom: -80px; right: -80px; }
.login-bg .o3 { width: 200px; height: 200px; background: #ec4899; top: 50%; right: -50px; }

/* ============== Layout ============== */
.admin-layout { display: flex; min-height: 100vh; }
.sidebar {
    width: 240px;
    background: var(--bg-2);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    flex-shrink: 0;
}
.sidebar-logo {
    padding: 0 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-logo .logo-icon {
    width: 32px; height: 32px;
    display: grid; place-items: center;
    background: var(--gradient);
    border-radius: 8px;
    font-weight: 800;
    color: #fff;
}
.sidebar-logo .logo-text { font-weight: 700; font-size: 15px; }
.sidebar-nav { padding: 16px 12px; flex: 1; overflow-y: auto; }
.sidebar-nav a {
    display: block;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--text-soft);
    font-size: 14px;
    margin-bottom: 4px;
    transition: all .2s;
}
.sidebar-nav a:hover { background: rgba(255,255,255,0.04); color: #fff; }
.sidebar-nav a.active {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 4px 14px rgba(99,102,241,0.4);
}
.nav-divider {
    border-top: 1px solid var(--border);
    margin: 12px 8px;
}
.sidebar-foot {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}
.user-card {
    display: flex;
    align-items: center;
    gap: 10px;
}
.avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--gradient);
    display: grid; place-items: center;
    font-weight: 700;
    color: #fff;
}
.user-name { font-size: 14px; font-weight: 600; }
.user-role { font-size: 11px; color: var(--text-dim); }

.main { flex: 1; min-width: 0; }
.topbar {
    height: 64px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    background: var(--bg-2);
    position: sticky;
    top: 0;
    z-index: 10;
}
.page-title { font-size: 18px; font-weight: 700; }
.topbar-tools { display: flex; gap: 10px; }
.btn-tool {
    padding: 8px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-soft);
    font-size: 13px;
}
.btn-tool:hover { background: rgba(99,102,241,0.15); color: #fff; }

.content { padding: 32px; }

/* ============== Dashboard ============== */
.dashboard { display: flex; flex-direction: column; gap: 24px; }
.stat-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}
@media (max-width: 1200px) { .stat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px)  { .stat-grid { grid-template-columns: repeat(2, 1fr); } }

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all .25s;
}
.stat-card:hover { transform: translateY(-2px); border-color: var(--primary-light); }
.stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: grid; place-items: center;
    font-size: 22px;
}
.stat-card.c1 .stat-icon { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.stat-card.c2 .stat-icon { background: linear-gradient(135deg, #06b6d4, #0ea5e9); }
.stat-card.c3 .stat-icon { background: linear-gradient(135deg, #ec4899, #f43f5e); }
.stat-card.c4 .stat-icon { background: linear-gradient(135deg, #f59e0b, #f97316); }
.stat-card.c5 .stat-icon { background: linear-gradient(135deg, #10b981, #14b8a6); }
.stat-card.c6 .stat-icon { background: linear-gradient(135deg, #8b5cf6, #ec4899); }
.stat-value { font-size: 24px; font-weight: 800; line-height: 1; }
.stat-name { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

.dash-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
}
@media (max-width: 1000px) { .dash-row { grid-template-columns: 1fr; } }

.panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}
.panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.panel-header h3 { font-size: 15px; }
.panel-link { font-size: 13px; color: var(--primary-light); }
.panel-body { padding: 20px; }

.status-list { display: flex; flex-direction: column; gap: 10px; }
.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--bg-2);
    border-radius: 8px;
    font-size: 13px;
}
.status-label { color: var(--text-dim); }
.status-tag {
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
}
.status-tag.ok { background: rgba(16,185,129,0.15); color: #34d399; }
.status-tag.warn { background: rgba(245,158,11,0.15); color: #fbbf24; }
.status-tag.err { background: rgba(239,68,68,0.15); color: #f87171; }

.quick-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}
@media (max-width: 800px) { .quick-grid { grid-template-columns: repeat(3, 1fr); } }
.quick-card {
    padding: 18px 12px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    text-align: center;
    color: var(--text);
    transition: all .25s;
    font-size: 13px;
}
.quick-card:hover {
    transform: translateY(-3px);
    background: var(--bg-elev);
    border-color: var(--primary-light);
    color: #fff;
}
.qc-icon { font-size: 28px; margin-bottom: 8px; }

/* ============== Form / Card ============== */
.card-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px;
}
.form-section + .form-section { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); }
.form-section.highlight {
    background: linear-gradient(135deg, rgba(99,102,241,0.06), rgba(6,182,212,0.06));
    border: 1px solid rgba(99,102,241,0.3);
    border-radius: 12px;
    padding: 20px;
    margin-top: 24px;
}
.form-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.form-section h3 { font-size: 17px; font-weight: 700; }
label {
    display: block;
    margin-bottom: 16px;
}
label span {
    display: block;
    font-size: 13px;
    color: var(--text-soft);
    margin-bottom: 6px;
    font-weight: 500;
}
.required { color: var(--danger); }
input[type=text], input[type=number], input[type=email], input[type=password], input[type=date], select, textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    transition: all .2s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
textarea { resize: vertical; line-height: 1.6; }
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 700px) { .form-row { grid-template-columns: 1fr; } }

.form-actions {
    padding-top: 16px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}
.alert-success { background: rgba(16,185,129,0.15); color: #34d399; border: 1px solid rgba(16,185,129,0.3); }
.alert-error   { background: rgba(239,68,68,0.15);  color: #f87171; border: 1px solid rgba(239,68,68,0.3); }

/* ============== Buttons ============== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: 0;
    cursor: pointer;
    text-decoration: none;
    transition: all .2s;
    font-family: inherit;
}
.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 4px 14px rgba(99,102,241,0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(99,102,241,0.5); }
.btn-ghost {
    background: rgba(255,255,255,0.05);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); }
.btn-sm { padding: 6px 12px; font-size: 13px; }

.btn-link {
    background: none;
    border: 0;
    color: var(--primary-light);
    cursor: pointer;
    font-size: 13px;
    padding: 4px 8px;
    text-decoration: none;
    transition: color .2s;
    font-family: inherit;
}
.btn-link:hover { color: var(--accent); }
.btn-link.danger { color: var(--danger); }
.btn-link.danger:hover { color: #fca5a5; }

/* ============== Tables ============== */
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th, .data-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.data-table th {
    background: var(--bg-2);
    color: var(--text-dim);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.data-table tbody tr:hover { background: rgba(99,102,241,0.04); }
.data-table .empty {
    text-align: center;
    color: var(--text-dim);
    padding: 40px;
}
.data-table .empty a { color: var(--primary-light); }

/* 适配窄屏 */
@media (max-width: 768px) {
    .sidebar { width: 60px; }
    .sidebar-logo .logo-text, .sidebar-nav a span, .user-card > div:last-child { display: none; }
    .sidebar-nav a { padding: 12px 16px; text-align: center; }
    .content { padding: 16px; }
    .topbar { padding: 0 16px; }
}
