/* ========================================
   main.css - 陌尘短视频分发系统
   Enterprise Blue + White · 企业级蓝白
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Noto+Sans+SC:wght@400;500;600;700&display=swap');

:root {
    --bg-color: #F1F5F9;
    --bg-secondary: #E2E8F0;
    --bg-gradient: linear-gradient(180deg, #EFF6FF 0%, #F8FAFC 42%, #F1F5F9 100%);

    --text-color: #0F172A;
    --text-secondary: #334155;
    --text-muted: #64748B;

    --card-bg: #FFFFFF;
    --card-border: #E2E8F0;
    --card-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(37, 99, 235, 0.06);
    --card-hover-shadow: 0 4px 12px rgba(15, 23, 42, 0.06), 0 16px 40px rgba(37, 99, 235, 0.10);

    --primary-color: #2563EB;
    --primary-hover: #1D4ED8;
    --primary-light: rgba(37, 99, 235, 0.08);
    --primary-glow: rgba(37, 99, 235, 0.22);
    --secondary-color: #1E40AF;

    --success-color: #16A34A;
    --danger-color: #DC2626;
    --warning-color: #D97706;
    --info-color: #0284C7;

    --input-bg: #FFFFFF;
    --input-border: #CBD5E1;
    --input-focus: #2563EB;

    --nav-bg: rgba(255, 255, 255, 0.92);
    --nav-height: 64px;
    --sidebar-bg: #0B1F3A;
    --sidebar-width: 248px;

    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    --border-radius-xl: 20px;
    --transition-speed: 0.25s;

    --font-sans: 'Plus Jakarta Sans', 'Noto Sans SC', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }

body {
    font-family: var(--font-sans);
    background: var(--bg-gradient);
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 15px;
    line-height: 1.6;
    transition: background 0.35s ease, color 0.25s ease;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    position: relative;
    letter-spacing: 0.01em;
}

/* soft blue atmosphere (not glass orbs) */
body::before {
    content: '';
    position: fixed;
    top: -20%;
    right: -8%;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, transparent 68%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    filter: blur(40px);
}
body::after {
    content: '';
    position: fixed;
    bottom: -18%;
    left: -10%;
    width: 460px;
    height: 460px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.10) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    filter: blur(48px);
}

a { color: var(--primary-color); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; height: auto; }

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--card-shadow);
    padding: 1.5rem;
    margin: 0.75rem 0;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s;
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-hover-shadow);
    border-color: #BFDBFE;
}
.card-static:hover {
    transform: none;
    box-shadow: var(--card-shadow);
    border-color: var(--card-border);
}

.glass {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--card-shadow);
}

.btn, button:not(.auth-tab):not(.theme-toggle):not(.theme-toggle-nav):not(.hamburger), input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(180deg, #3B82F6 0%, #2563EB 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 22px;
    font-size: 0.95em;
    font-weight: 650;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}
.btn:hover,
button:not(.auth-tab):not(.theme-toggle):not(.theme-toggle-nav):not(.hamburger):hover,
input[type="submit"]:hover {
    background: linear-gradient(180deg, #2563EB 0%, #1D4ED8 100%);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.32);
}
.btn:active,
button:not(.auth-tab):not(.theme-toggle):not(.theme-toggle-nav):not(.hamburger):active { transform: scale(0.98); }
.btn:disabled,
button:not(.auth-tab):disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; box-shadow: none; }

/* 带左侧图标的输入框 */
.input-icon-wrap {
    position: relative;
    display: block;
    width: 100%;
}
.input-icon-wrap > i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94A3B8;
    font-size: 0.9em;
    width: 16px;
    text-align: center;
    z-index: 2;
    pointer-events: none;
    line-height: 1;
}
.input-icon-wrap:focus-within > i { color: var(--primary-color); }
.input-icon-wrap > input,
.input-icon-wrap > .form-input {
    padding-left: 44px !important;
}

.btn-outline {
    background: transparent !important;
    border: 1.5px solid var(--primary-color) !important;
    color: var(--primary-color) !important;
    box-shadow: none !important;
}
.btn-outline:hover {
    background: var(--primary-light) !important;
    color: var(--primary-hover) !important;
}
a.btn { color: #fff; text-decoration: none; }
a.btn:hover { color: #fff; }
a.btn-outline,
a.btn-outline:hover { color: var(--primary-color) !important; }
.btn-danger { background: linear-gradient(180deg, #EF4444, #DC2626); box-shadow: 0 4px 14px rgba(220, 38, 38, 0.25); }
.btn-success { background: linear-gradient(180deg, #22C55E, #16A34A); box-shadow: 0 4px 14px rgba(22, 163, 74, 0.25); }
.btn-sm { padding: 8px 14px; font-size: 0.85em; border-radius: 8px; }

.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-height);
    background: var(--nav-bg);
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    z-index: 1000;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15em;
    font-weight: 800;
    color: var(--text-color) !important;
    letter-spacing: -0.02em;
}
.navbar-brand i {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9em;
}
.navbar-links { display: flex; align-items: center; gap: 4px; }
.navbar-links a {
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9em;
}
.navbar-links a:hover,
.navbar-links a.active {
    color: var(--primary-color);
    background: var(--primary-light);
}
.navbar-right { display: flex; align-items: center; gap: 12px; }
.navbar-user {
    font-size: 0.88em;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 6px 12px;
    background: var(--bg-color);
    border-radius: 999px;
    border: 1px solid var(--card-border);
}

.mobile-tab {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 64px;
    background: #fff;
    border-top: 1px solid var(--card-border);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    padding: 0 8px;
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.06);
}
.mobile-tab a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 0.7em;
    font-weight: 600;
    padding: 8px 10px;
    border-radius: 10px;
}
.mobile-tab a i { font-size: 1.25em; }
.mobile-tab a.active,
.mobile-tab a:hover { color: var(--primary-color); background: var(--primary-light); }

.main-content {
    max-width: 1120px;
    margin: calc(var(--nav-height) + 20px) auto 40px;
    padding: 0 24px 40px;
    position: relative;
    z-index: 1;
}

.hero-section {
    background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 55%, #0EA5E9 100%);
    color: #fff;
    border-radius: var(--border-radius-xl);
    padding: 42px 36px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(37, 99, 235, 0.28);
}
.hero-section::after {
    content: '';
    position: absolute;
    right: -40px; top: -40px;
    width: 220px; height: 220px;
    background: radial-gradient(circle, rgba(255,255,255,0.18), transparent 70%);
    pointer-events: none;
}
.hero-section h1 {
    font-size: 1.75em;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
    color: #fff;
}
.hero-section p { opacity: 0.92; margin-bottom: 20px; max-width: 520px; color: rgba(255,255,255,0.92); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-actions .btn {
    background: #fff;
    color: #1D4ED8;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.hero-actions .btn-outline {
    background: transparent !important;
    border-color: rgba(255,255,255,0.7) !important;
    color: #fff !important;
}

.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin: 18px 0 24px;
}
.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    padding: 20px 18px;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--card-hover-shadow); }
.stat-card .stat-label { font-size: 0.82em; color: var(--text-muted); font-weight: 600; margin-bottom: 6px; }
.stat-card .stat-value {
    font-size: 1.65em;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.02em;
}
.stat-card .stat-icon {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1em; margin-bottom: 10px;
    background: linear-gradient(135deg, #3B82F6, #2563EB);
}
.stat-card .stat-icon.purple,
.stat-card .stat-icon.blue { background: linear-gradient(135deg, #3B82F6, #2563EB); }
.stat-card .stat-icon.green { background: linear-gradient(135deg, #22C55E, #16A34A); }
.stat-card .stat-icon.orange { background: linear-gradient(135deg, #F59E0B, #D97706); }
.stat-card .stat-icon.red { background: linear-gradient(135deg, #EF4444, #DC2626); }
.stat-card .stat-icon.pink { background: linear-gradient(135deg, #0EA5E9, #0284C7); }
.stats-bar { display: flex; flex-wrap: wrap; gap: 16px; margin: 12px 0; }

.material-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}
.mat-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
    position: relative;
}
.mat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-hover-shadow);
    border-color: #BFDBFE;
}
.mat-thumb {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: #E2E8F0;
    display: block;
}
.mat-body { padding: 16px; }
.mat-title { font-weight: 700; font-size: 1em; margin-bottom: 8px; color: var(--text-color); }
.mat-meta { font-size: 0.84em; color: var(--text-muted); margin-bottom: 12px; }
.mat-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--card-border);
}
.mat-time { font-size: 0.79em; color: var(--text-muted); }
.mat-card.claimed { opacity: 0.72; }
.mat-card.claimed::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 12px; right: 12px;
    width: 32px; height: 32px;
    background: var(--success-color);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8em;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.35);
    z-index: 2;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--card-border);
}
.history-item .his-title { font-weight: 650; font-size: 0.98em; color: var(--text-color); }
.history-item .his-meta { font-size: 0.85em; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 16px; }

.wd-record { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 12px 0; }
.wd-record .wd-left { display: flex; flex-direction: column; gap: 6px; }
.wd-record .wd-amount { font-size: 1.25em; font-weight: 800; color: var(--primary-color); }
.wd-record .wd-meta { font-size: 0.84em; color: var(--text-muted); }

.divider {
    height: 1px;
    background: var(--card-border);
    margin: 20px 0;
    border: none;
}

.msg-box,
.msg-success,
.msg-error {
    padding: 14px 18px; border-radius: 12px;
    margin: 10px 0; display: flex; align-items: center; gap: 10px;
    font-weight: 500;
}
.msg-success, .msg-box.msg-success {
    background: #ECFDF5; color: #166534; border: 1px solid #A7F3D0;
}
.msg-error, .msg-box.msg-error {
    background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA;
}
.err-tip { color: var(--danger-color); font-size: 0.9em; margin: 8px 0; min-height: 1.2em; }

.toast-fixed {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    min-width: 240px;
    max-width: min(92vw, 420px);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
    transition: opacity 0.25s, transform 0.25s;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1.4;
}
.badge-info { background: #EFF6FF; color: #1D4ED8; }
.badge-success { background: #ECFDF5; color: #166534; }
.badge-warning { background: #FFFBEB; color: #B45309; }
.badge-danger { background: #FEF2F2; color: #B91C1C; }

.stats-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #EFF6FF;
    color: #1E40AF;
    border: 1px solid #BFDBFE;
    font-size: 0.88em;
    font-weight: 650;
}
.page-transition { animation: fadeInUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) both; }
.page-info { color: var(--text-muted); font-size: 0.88em; font-weight: 600; }
.mat-desc {
    font-size: 0.86em;
    color: var(--text-muted);
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#catTabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.card form > label,
.card form label {
    display: block;
    font-weight: 650;
    font-size: 0.88em;
    color: var(--text-secondary);
    margin: 12px 0 6px;
}
.card form > label:first-child,
.card form > *:first-child label { margin-top: 0; }
.card form input,
.card form select,
.card form textarea { margin-bottom: 4px; }
.card form .btn { margin-top: 14px; }

.empty-state {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 60px 24px; color: var(--text-muted);
    background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--border-radius-lg);
}
.empty-state i { font-size: 3em; margin-bottom: 16px; color: #94A3B8; }
.empty-state p { font-size: 0.96em; font-weight: 500; }

.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 14px;
    margin: 20px 0;
}
.quick-item {
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    padding: 24px 16px;
    border-radius: var(--border-radius-lg);
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 0.88em; font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--card-border);
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: var(--card-shadow);
}
.quick-item:hover {
    transform: translateY(-3px);
    border-color: #93C5FD;
    box-shadow: var(--card-hover-shadow);
    color: var(--primary-color);
}
.quick-item i { font-size: 1.8em; color: var(--primary-color); }

.announcement-card {
    border-left: 3px solid var(--primary-color);
    padding-left: 18px;
    transition: transform 0.2s;
}
.announcement-card:hover { transform: translateX(3px); }
.ann-title { font-weight: 700; font-size: 1.02em; margin-bottom: 8px; color: var(--text-color); }
.ann-content { color: var(--text-secondary); font-size: 0.9em; line-height: 1.65; }
.ann-time { font-size: 0.79em; color: var(--text-muted); margin-top: 10px; display: flex; align-items: center; gap: 6px; }

.pagination { display: flex; justify-content: center; align-items: center; gap: 10px; margin: 28px 0; }
.pagination button {
    min-width: 40px;
    background: #fff;
    color: var(--text-secondary);
    border: 1px solid var(--card-border);
    box-shadow: none;
    padding: 8px 14px;
}
.pagination button:hover,
.pagination button.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

@keyframes fadeInUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInScale { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes spin { to { transform: rotate(360deg); } }

.fade-in-up { animation: fadeInUp 0.45s cubic-bezier(0.22, 1, 0.36, 1) both; }
.fade-in { animation: fadeIn 0.35s ease-out both; }
.fade-in-scale { animation: fadeInScale 0.4s cubic-bezier(0.22, 1, 0.36, 1) both; }
.anim-delay-1 { animation-delay: 0.06s; }
.anim-delay-2 { animation-delay: 0.12s; }
.anim-delay-3 { animation-delay: 0.18s; }
.anim-delay-4 { animation-delay: 0.24s; }

.spinner {
    display: inline-block; width: 22px; height: 22px;
    border: 3px solid #DBEAFE; border-top-color: var(--primary-color);
    border-radius: 50%; animation: spin 0.7s linear infinite;
}

.form-stack { display: flex; flex-direction: column; gap: 16px; }
.form-stack .form-group { margin-bottom: 0; }
.form-label, .form-group label {
    display: block; font-weight: 600; font-size: 0.88em;
    color: var(--text-secondary); margin-bottom: 6px;
}
.form-input, input[type="text"], input[type="password"], input[type="email"],
input[type="number"], input[type="url"], select, textarea {
    width: 100%; padding: 12px 16px; margin: 0;
    border: 1.5px solid var(--input-border);
    border-radius: 10px;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 0.94em; font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.form-input:focus, input:focus, select:focus, textarea:focus {
    border-color: var(--input-focus);
    box-shadow: 0 0 0 4px var(--primary-glow);
}
.form-actions { display: flex; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-row > .form-group { flex: 1; min-width: 180px; }

.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.info-item {
    display: flex; flex-direction: column; gap: 6px; padding: 14px;
    background: var(--bg-color); border-radius: 12px; border: 1px solid var(--card-border);
}
.info-label { font-size: 0.82em; color: var(--text-muted); font-weight: 550; }
.info-value { font-size: 0.96em; color: var(--text-color); font-weight: 600; }

.auth-page { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 160px); }
.auth-card {
    max-width: 440px; width: 100%; padding: 36px 32px;
    border-radius: var(--border-radius-xl);
    background: #fff;
    border: 1px solid var(--card-border);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}
.auth-icon-wrap {
    width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 16px;
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6em; color: #fff;
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.35);
}
.auth-btn { padding: 14px 28px !important; font-size: 1em !important; border-radius: 10px !important; font-weight: 700 !important; }

.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 2000;
    display: flex; align-items: center; justify-content: center;
}
.modal-content {
    max-width: 440px; width: 90%; text-align: center; padding: 32px;
    background: #fff; border: 1px solid var(--card-border);
    border-radius: 16px; box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary-color); }
.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 18px; }
.mt-3 { margin-top: 28px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 18px; }
.mb-3 { margin-bottom: 28px; }
.gap-1 { gap: 10px; }
.gap-2 { gap: 16px; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.hidden { display: none !important; }

.page-header {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin-bottom: 22px; padding-bottom: 14px;
    border-bottom: 1px solid var(--card-border);
}
.page-header h2 { font-size: 1.35em; font-weight: 800; color: var(--text-color); letter-spacing: -0.02em; }
.page-header h2 i { color: var(--primary-color); }

.theme-toggle, .theme-toggle-nav {
    width: 40px; height: 40px; border-radius: 10px;
    background: #fff; border: 1px solid var(--card-border);
    color: var(--text-secondary); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: none; padding: 0;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.theme-toggle:hover, .theme-toggle-nav:hover {
    background: var(--primary-light); color: var(--primary-color); border-color: #93C5FD;
    transform: none; box-shadow: none;
}
.theme-toggle {
    position: fixed; top: 18px; right: 18px; z-index: 1100;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.skeleton-card {
    background: #fff; border: 1px solid var(--card-border);
    border-radius: 16px; padding: 18px; overflow: hidden;
}
.skeleton-img, .skeleton-line {
    border-radius: 10px;
    background: linear-gradient(90deg, #F1F5F9 25%, #E2E8F0 50%, #F1F5F9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.6s infinite;
}
.skeleton-img { width: 100%; height: 140px; }

.error-state {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 60px 20px; text-align: center;
    background: #fff; border: 1px dashed #CBD5E1; border-radius: 16px;
}
.error-state .error-icon { font-size: 48px; color: var(--warning-color); margin-bottom: 18px; }
.error-state h3 { font-size: 1.2em; font-weight: 700; color: var(--text-color); margin-bottom: 10px; }
.error-state p { color: var(--text-muted); font-size: 0.9em; margin-bottom: 22px; max-width: 320px; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #F1F5F9; border-radius: 4px; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }

@media (max-width: 768px) {
    .navbar-links { display: none; }
    .mobile-tab { display: flex; }
    .navbar { padding: 0 16px; height: 58px; }
    .main-content { padding: 0 14px 96px; margin-top: calc(var(--nav-height) + 12px); }
    .material-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
    .quick-grid { grid-template-columns: repeat(3, 1fr); }
    .hero-section { padding: 28px 20px; }
    .hero-section h1 { font-size: 1.4em; }
    .stat-cards { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .navbar-user span { display: none; }
}

@media (max-width: 480px) {
    body { font-size: 14px; }
    .main-content { padding: 0 12px 88px; }
    .card { padding: 1.1rem; }
    .material-grid { grid-template-columns: 1fr; }
    .quick-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .quick-item { padding: 18px 10px; }
    .form-row { flex-direction: column; gap: 0; }
    .form-row > .form-group { min-width: 100%; }
    .navbar-brand span { display: none; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .stat-cards { grid-template-columns: 1fr 1fr; }
    .info-grid { grid-template-columns: 1fr; }
}
