/* ===================================================
   音创·财务  —  管理后台 Aero 样式
   =================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --aero-blue:       #1a6bbf;
    --aero-blue-dark:  #0f4a8a;
    --aero-blue-light: #3a8de0;
    --aero-glass-bg:   rgba(210, 230, 255, 0.6);
    --aero-glass-border: rgba(255,255,255,0.78);
    --aero-shadow:     0 4px 20px rgba(20, 80, 160, 0.2);
    --aero-inset:      inset 0 1px 0 rgba(255,255,255,0.85);
    --text-primary:    #1a1a2e;
    --text-secondary:  #4a5568;
    --bg-page:         #dde8f5;
    --sidebar-bg:      linear-gradient(180deg, #1e3a6e 0%, #162d56 100%);
    --sidebar-width:   220px;
    --topbar-h:        56px;
}

html, body { height: 100%; }
body {
    font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-page);
    background-image:
        radial-gradient(ellipse at 15% 10%, rgba(100,160,240,0.15) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 85%, rgba(60,120,200,0.10) 0%, transparent 55%);
    display: flex; flex-direction: column;
}

/* ---- 顶栏 ---- */
.admin-topbar {
    height: var(--topbar-h);
    background: linear-gradient(180deg, rgba(60,120,210,0.9) 0%, rgba(15,74,138,0.95) 100%);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255,255,255,0.25);
    box-shadow: 0 3px 16px rgba(10,40,120,0.4);
    display: flex; align-items: center; padding: 0 24px; gap: 16px;
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    flex-shrink: 0;
}
.topbar-brand {
    color: #fff; font-size: 17px; font-weight: 700; letter-spacing: 0.5px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
    display: flex; align-items: center; gap: 10px;
    text-decoration: none !important;
}
.topbar-brand .badge-admin {
    font-size: 10px; font-weight: 700; background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.35); color: rgba(255,255,255,0.9);
    padding: 2px 8px; border-radius: 10px; letter-spacing: 1px;
}
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.topbar-user { color: rgba(255,255,255,0.85); font-size: 13px; }
.topbar-logout {
    color: rgba(255,255,255,0.75); font-size: 13px; padding: 5px 14px;
    border: 1px solid rgba(255,255,255,0.3); border-radius: 5px;
    text-decoration: none !important; transition: all 0.18s;
}
.topbar-logout:hover {
    background: rgba(255,255,255,0.15); color: #fff; text-decoration: none !important;
}

/* ---- 布局 ---- */
.admin-layout {
    display: flex;
    min-height: 100vh;
    padding-top: var(--topbar-h);
}
.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    position: fixed; left: 0; top: var(--topbar-h); bottom: 0;
    overflow-y: auto; overflow-x: hidden;
    padding: 20px 0;
    border-right: 1px solid rgba(255,255,255,0.08);
    box-shadow: 3px 0 15px rgba(0,0,0,0.2);
}
.sidebar-section-title {
    color: rgba(255,255,255,0.4); font-size: 10px; letter-spacing: 1.5px;
    text-transform: uppercase; padding: 16px 20px 6px; font-weight: 600;
}
.sidebar-link {
    display: flex; align-items: center; gap: 11px;
    padding: 10px 20px; color: rgba(255,255,255,0.72); font-size: 13px;
    transition: all 0.18s; text-decoration: none !important;
    border-left: 3px solid transparent;
}
.sidebar-link:hover, .sidebar-link.active {
    background: rgba(255,255,255,0.1); color: #fff;
    border-left-color: var(--aero-blue-light);
    text-decoration: none !important;
}
.sidebar-link svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ---- 主内容 ---- */
.admin-main {
    margin-left: var(--sidebar-width);
    padding: 28px 32px;
    flex: 1;
    min-height: calc(100vh - var(--topbar-h));
}
.page-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--aero-glass-border);
}
.page-title { font-size: 22px; font-weight: 800; color: var(--text-primary); }
.page-subtitle { font-size: 13px; color: var(--text-secondary); margin-top: 3px; }

/* ---- 统计卡片 ---- */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 28px; }
.stat-card {
    padding: 22px 20px;
    background: var(--aero-glass-bg);
    backdrop-filter: blur(14px);
    border: 1px solid var(--aero-glass-border);
    border-radius: 10px;
    box-shadow: var(--aero-shadow), var(--aero-inset);
}
.stat-card .sc-num { font-size: 28px; font-weight: 800; color: var(--aero-blue); line-height: 1.1; }
.stat-card .sc-lbl { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.stat-card .sc-icon { float: right; opacity: 0.18; }
.stat-card .sc-icon svg { width: 40px; height: 40px; color: var(--aero-blue); }

/* ---- 表格 ---- */
.table-card {
    background: var(--aero-glass-bg);
    backdrop-filter: blur(14px);
    border: 1px solid var(--aero-glass-border);
    border-radius: 10px;
    box-shadow: var(--aero-shadow), var(--aero-inset);
    overflow: hidden;
    margin-bottom: 24px;
}
.table-card-header {
    padding: 16px 22px; border-bottom: 1px solid rgba(100,150,210,0.2);
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(255,255,255,0.35);
}
.table-card-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
table.admin-table { width: 100%; border-collapse: collapse; }
table.admin-table thead th {
    background: rgba(26,107,191,0.08);
    color: var(--text-secondary); font-size: 12px; font-weight: 600;
    letter-spacing: 0.5px; text-transform: uppercase;
    padding: 11px 18px; text-align: left;
    border-bottom: 1px solid rgba(100,150,210,0.2);
}
table.admin-table tbody td {
    padding: 12px 18px; font-size: 13px; color: var(--text-primary);
    border-bottom: 1px solid rgba(100,150,210,0.12);
    vertical-align: middle;
}
table.admin-table tbody tr:last-child td { border-bottom: none; }
table.admin-table tbody tr:hover td { background: rgba(26,107,191,0.04); }
.filename { font-family: Consolas, monospace; font-size: 12px; color: var(--text-secondary); }
.filesize { font-family: Consolas, monospace; font-size: 12px; }

/* ---- 表单 ---- */
.form-card {
    background: var(--aero-glass-bg);
    backdrop-filter: blur(14px);
    border: 1px solid var(--aero-glass-border);
    border-radius: 10px;
    box-shadow: var(--aero-shadow), var(--aero-inset);
    padding: 28px 32px;
    max-width: 680px;
}
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 7px; }
.form-control {
    width: 100%; padding: 9px 13px; font-size: 14px; font-family: inherit;
    border: 1px solid rgba(100,150,210,0.45); border-radius: 6px;
    background: rgba(255,255,255,0.75);
    color: var(--text-primary);
    transition: border-color 0.18s, box-shadow 0.18s;
    outline: none;
}
.form-control:focus {
    border-color: var(--aero-blue);
    box-shadow: 0 0 0 3px rgba(26,107,191,0.15);
    background: rgba(255,255,255,0.9);
}
.form-hint { font-size: 12px; color: var(--text-secondary); margin-top: 5px; }
.form-actions { display: flex; gap: 12px; margin-top: 28px; }

/* ---- 按钮 ---- */
.btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 20px; border-radius: 6px; border: 1px solid transparent;
    font-size: 13px; font-family: inherit; cursor: pointer; font-weight: 600;
    transition: all 0.18s; text-decoration: none !important; white-space: nowrap;
}
.btn-primary {
    background: linear-gradient(180deg, #4da6ff 0%, var(--aero-blue) 45%, var(--aero-blue-dark) 100%);
    color: #fff; border-color: var(--aero-blue-dark);
    box-shadow: 0 2px 6px rgba(15,74,138,0.4), inset 0 1px 0 rgba(255,255,255,0.5);
    text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}
.btn-primary:hover { background: linear-gradient(180deg,#5db8ff 0%,#3a8de0 45%,#1a6bbf 100%); color:#fff; }
.btn-danger {
    background: linear-gradient(180deg, #e74c3c 0%, #c0392b 100%);
    color: #fff; border-color: #922b21;
    box-shadow: 0 2px 6px rgba(192,57,43,0.4), inset 0 1px 0 rgba(255,255,255,0.3);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.btn-danger:hover { background: linear-gradient(180deg,#f05040 0%,#c0392b 100%); color:#fff; }
.btn-secondary {
    background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(200,220,245,0.8) 100%);
    color: var(--aero-blue-dark); border-color: rgba(100,150,210,0.5);
    box-shadow: 0 2px 5px rgba(20,80,160,0.12), inset 0 1px 0 rgba(255,255,255,0.9);
}
.btn-secondary:hover { background: linear-gradient(180deg,#fff 0%,rgba(180,210,245,0.9) 100%); color:var(--aero-blue); }
.btn-sm { padding: 5px 12px; font-size: 12px; }

/* ---- 提示/徽章 ---- */
.badge {
    display: inline-block; padding: 3px 9px; border-radius: 10px;
    font-size: 11px; font-weight: 600; line-height: 1.5;
}
.badge-success { background: #d4edda; color: #1a7a3c; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-secondary { background: #e2e8f0; color: #4a5568; }

/* ---- Alert ---- */
.alert { padding: 12px 18px; border-radius: 7px; font-size: 13px; margin-bottom: 20px; }
.alert-success { background: rgba(212,237,218,0.8); border: 1px solid #b8ddc3; color: #1a7a3c; }
.alert-error   { background: rgba(248,215,218,0.8); border: 1px solid #f5c6cb; color: #721c24; }
.alert-info    { background: rgba(209,236,241,0.8); border: 1px solid #bee5eb; color: #0c5460; }

/* ---- 登录页 ---- */
.admin-login-wrap {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 40px 20px;
}
.admin-login-card {
    width: 100%; max-width: 400px; padding: 40px 36px;
    background: var(--aero-glass-bg);
    backdrop-filter: blur(18px);
    border: 1px solid var(--aero-glass-border);
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(20,80,160,0.22), var(--aero-inset);
}
.login-logo {
    text-align: center; margin-bottom: 28px;
}
.login-logo-icon {
    width: 60px; height: 60px; margin: 0 auto 12px;
    background: linear-gradient(135deg, var(--aero-blue) 0%, #00a2e8 100%);
    border-radius: 15px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 24px rgba(26,107,191,0.4);
}
.login-logo-icon svg { width: 32px; height: 32px; color: #fff; }
.login-title { font-size: 20px; font-weight: 800; color: var(--text-primary); }
.login-sub { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }

/* ---- 上传区 ---- */
.upload-zone {
    border: 2px dashed rgba(26,107,191,0.35);
    border-radius: 10px; padding: 32px; text-align: center;
    background: rgba(255,255,255,0.4);
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
}
.upload-zone:hover {
    border-color: var(--aero-blue);
    background: rgba(26,107,191,0.05);
}
.upload-zone-icon svg { width: 40px; height: 40px; color: var(--aero-blue); opacity: 0.6; margin-bottom: 10px; }
.upload-zone-text { font-size: 14px; color: var(--text-secondary); }
.upload-zone-hint { font-size: 12px; color: var(--text-light); margin-top: 4px; }

/* ---- 分页 ---- */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 20px; }
.page-btn {
    padding: 6px 14px; border-radius: 6px; border: 1px solid rgba(100,150,210,0.4);
    background: rgba(255,255,255,0.7); color: var(--aero-blue);
    font-size: 13px; font-weight: 600; cursor: pointer;
    transition: all 0.15s; text-decoration: none !important;
}
.page-btn:hover, .page-btn.active {
    background: linear-gradient(180deg, #4da6ff 0%, var(--aero-blue) 100%);
    color: #fff; border-color: var(--aero-blue-dark); text-decoration: none !important;
}

@media (max-width: 900px) {
    .admin-sidebar { transform: translateX(-100%); }
    .admin-main { margin-left: 0; padding: 20px 16px; }
    .stat-cards { grid-template-columns: repeat(2, 1fr); }
}
