:root {
    --brand-gradient: linear-gradient(135deg, #0066FF 0%, #00D4FF 50%, #00FFB7 100%);
    --brand-gradient-dark: linear-gradient(135deg, #003D99 0%, #0066CC 100%);
    --primary: #0066FF;
    --primary-hover: #0052CC;
    --primary-deep: #002E63;
    --accent: #00D4FF;
    --success: #00C48C;
    --warning: #FFB547;
    --danger: #F53F3F;
    --info: #1765DC;

    --bg-page: #F5F7FA;
    --bg-panel: #FFFFFF;
    --bg-soft: #FAFBFD;
    --bg-mask: rgba(0, 30, 80, 0.45);

    --border: #E6EAEE;
    --border-strong: #CFD7DF;

    --text: #1D2129;
    --text-secondary: #4E5969;
    --text-tertiary: #86909C;
    --text-inverse: #FFFFFF;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --shadow-xs: 0 1px 2px rgba(0, 26, 70, 0.04);
    --shadow-sm: 0 2px 8px rgba(0, 26, 70, 0.06);
    --shadow-md: 0 8px 24px rgba(0, 26, 70, 0.08);
    --shadow-lg: 0 16px 48px rgba(0, 26, 70, 0.12);
    --shadow-glow: 0 0 24px rgba(0, 102, 255, 0.32);

    --transition: 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }
html, body {
    margin: 0; padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue",
                 "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", Arial, sans-serif;
    font-size: 15px; line-height: 1.6;
    background: var(--bg-page); color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; display: block; }
input, button, textarea, select { font-family: inherit; }

/* ===== Scroll progress ===== */
#scrollProgress {
    position: fixed; top: 0; left: 0; height: 3px;
    background: var(--brand-gradient);
    width: 0%; z-index: 9999;
    box-shadow: 0 0 12px rgba(0, 102, 255, 0.45);
    transition: width 0.1s linear;
}

/* ===== Page background animation ===== */
.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}
.page-wrapper::before {
    content: "";
    position: fixed; inset: 0; z-index: -3;
    background:
        radial-gradient(900px 500px at 10% 10%, rgba(0,102,255,0.07), transparent 60%),
        radial-gradient(700px 400px at 90% 20%, rgba(0,212,255,0.06), transparent 55%),
        radial-gradient(600px 350px at 50% 90%, rgba(0,196,140,0.05), transparent 55%),
        var(--bg-page);
    animation: bgPulse 12s ease-in-out infinite alternate;
}
.page-wrapper::after {
    content: "";
    position: fixed; inset: 0; z-index: -3;
    background:
        radial-gradient(800px 400px at 20% 80%, rgba(0,212,255,0.05), transparent 55%),
        radial-gradient(700px 350px at 80% 10%, rgba(0,102,255,0.05), transparent 50%);
    animation: bgPulse 16s ease-in-out infinite alternate-reverse;
}
@keyframes bgPulse {
    0% { opacity: 0.8; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.03); }
}

/* Animated tech grid overlay */
.tech-grid {
    position: fixed; inset: 0; z-index: -2; pointer-events: none;
    background-image:
        linear-gradient(rgba(0,102,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,102,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(circle at 50% 0%, rgba(0,0,0,0.45), transparent 70%);
    -webkit-mask-image: radial-gradient(circle at 50% 0%, rgba(0,0,0,0.45), transparent 70%);
    animation: gridMove 24s linear infinite;
}
@keyframes gridMove {
    0% { background-position: 0 0; }
    100% { background-position: 60px 60px; }
}

/* ===== Global Structure ===== */
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.section { padding: 56px 0; }
.section-title {
    font-size: 30px; font-weight: 800; margin: 0 0 12px; letter-spacing: -0.5px;
    background: linear-gradient(135deg, #002E63 0%, var(--primary) 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-subtitle { color: var(--text-secondary); font-size: 15px; margin-bottom: 32px; }

/* ===== Scroll reveal ===== */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Header ===== */
.site-header {
    position: sticky; top: 0; z-index: 99;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(230, 234, 238, 0.85);
    transition: background var(--transition), box-shadow var(--transition);
}
.site-header.scrolled {
    background: rgba(255,255,255,0.96);
    box-shadow: 0 4px 20px rgba(0, 30, 80, 0.06);
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 68px;
}
.brand {
    display: flex; align-items: center; gap: 12px;
    font-size: 18px; font-weight: 700; color: var(--text);
    white-space: nowrap;
}
.brand-logo {
    width: 40px; height: 40px; border-radius: 10px;
    background: var(--brand-gradient);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 800; font-size: 18px;
    box-shadow: var(--shadow-glow);
    overflow: hidden; flex-shrink: 0;
    position: relative;
}
.brand-logo::after {
    content: "";
    position: absolute; inset: -50%;
    background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.35) 50%, transparent 60%);
    transform: rotate(30deg) translateX(-120%);
    animation: shine 4s ease-in-out infinite;
}
@keyframes shine {
    0%, 100% { transform: rotate(30deg) translateX(-120%); }
    50% { transform: rotate(30deg) translateX(120%); }
}
.brand-logo img { width: 100%; height: 100%; object-fit: cover; }
.brand-text small { display: block; font-size: 11px; color: var(--text-tertiary); font-weight: 500; margin-top: -2px; }

.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a {
    color: var(--text-secondary);
    padding: 8px 16px; border-radius: 10px;
    font-size: 15px; font-weight: 500;
    position: relative; transition: all var(--transition);
}
.site-nav a:hover { color: var(--primary); background: rgba(0,102,255,0.06); }
.site-nav a.active { color: var(--primary); background: rgba(0,102,255,0.10); }
.site-nav a.active::after {
    content: "";
    position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
    width: 16px; height: 3px; border-radius: 2px;
    background: var(--brand-gradient);
}

.header-actions { display: flex; align-items: center; gap: 10px; }

.menu-toggle {
    display: none; background: transparent; border: 1px solid var(--border);
    border-radius: 10px; width: 42px; height: 42px; cursor: pointer;
    color: var(--text-secondary); font-size: 20px;
    transition: all var(--transition);
}
.menu-toggle:hover { border-color: var(--primary); color: var(--primary); }

/* ===== Buttons ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 6px; padding: 10px 20px; border-radius: 10px;
    font-size: 14px; font-weight: 600;
    border: 1px solid transparent; cursor: pointer;
    transition: all var(--transition); user-select: none;
    line-height: 1; position: relative; overflow: hidden;
}
.btn::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.25) 50%, transparent 60%);
    transform: translateX(-120%);
    transition: transform 0.5s;
}
.btn:hover::after { transform: translateX(120%); }
.btn-primary {
    background: var(--brand-gradient); color: #fff; border: none;
    box-shadow: 0 6px 18px rgba(0,102,255,0.28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0,102,255,0.36); }
.btn-primary:active { transform: translateY(0); }
.btn-outline { background: #fff; color: var(--primary); border-color: #B8D0FF; }
.btn-outline:hover { background: rgba(0,102,255,0.06); border-color: var(--primary); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: rgba(0,0,0,0.04); color: var(--text); }
.btn-danger { background: linear-gradient(135deg, #F53F3F, #FF7D7D); color: #fff; }
.btn-danger:hover { box-shadow: 0 6px 16px rgba(245,63,63,0.3); transform: translateY(-1px); }
.btn-success { background: linear-gradient(135deg, #00C48C, #35E0AD); color: #fff; }
.btn-success:hover { box-shadow: 0 6px 16px rgba(0,196,140,0.3); transform: translateY(-1px); }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::before {
    content: "";
    position: absolute; width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff; border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ===== Badges ===== */
.badge {
    display: inline-flex; align-items: center;
    padding: 4px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 600;
    letter-spacing: 0.2px;
}
.badge-blue { background: rgba(0,102,255,0.09); color: var(--primary); }
.badge-green { background: rgba(0,196,140,0.10); color: var(--success); }
.badge-orange { background: rgba(255,181,71,0.14); color: #A16200; }
.badge-red { background: rgba(245,63,63,0.10); color: var(--danger); }
.badge-cyan { background: rgba(0,212,255,0.12); color: #007CA5; }

/* ===== Cards ===== */
.card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    position: relative;
}
.card::before {
    content: "";
    position: absolute; inset: 0; border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(135deg, rgba(0,102,255,0.18), rgba(0,212,255,0.10), transparent 60%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    opacity: 0; transition: opacity var(--transition);
    pointer-events: none;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card:hover::before { opacity: 1; }
.card-pad { padding: 28px; }
.card-title {
    font-size: 20px; font-weight: 700; margin: 0 0 20px;
    letter-spacing: -0.3px;
}
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px; border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, var(--bg-soft), #fff);
}
.card-header h3 { margin: 0; font-size: 17px; font-weight: 700; }

/* ===== Hero ===== */
.hero {
    position: relative; overflow: hidden;
    background: var(--primary-deep);
    color: #fff;
    padding: 100px 0 120px;
}
.hero-canvas {
    position: absolute; inset: 0; z-index: 0;
    opacity: 0.6;
}
.hero::before, .hero::after {
    content: ""; position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.75;
    animation: float 8s ease-in-out infinite alternate;
}
.hero::before {
    width: 520px; height: 520px;
    background: radial-gradient(circle, #00D4FF 0%, transparent 70%);
    top: -180px; right: -100px;
}
.hero::after {
    width: 460px; height: 460px;
    background: radial-gradient(circle, #0066FF 0%, transparent 70%);
    bottom: -160px; left: -120px;
    animation-delay: -4s;
}
@keyframes float {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(30px) scale(1.05); }
}
.hero-inner { position: relative; text-align: center; z-index: 1; }
.hero h1 {
    margin: 0 0 16px;
    font-size: 52px; font-weight: 800; letter-spacing: -1px;
    background: linear-gradient(135deg, #FFFFFF 0%, #B3D8FF 60%, #00D4FF 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: fadeInUp 0.8s ease-out both, glowText 3s ease-in-out infinite alternate;
}
@keyframes glowText {
    0% { filter: drop-shadow(0 0 0px rgba(0,212,255,0)); }
    100% { filter: drop-shadow(0 0 16px rgba(0,212,255,0.35)); }
}
.hero p {
    margin: 0 auto; max-width: 720px; font-size: 17px; opacity: 0.88; line-height: 1.75;
    animation: fadeInUp 0.8s ease-out 0.15s both;
}
.hero-actions {
    margin-top: 36px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}
.hero-actions .btn-outline { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.28); color: #fff; }
.hero-actions .btn-outline:hover { background: rgba(255,255,255,0.14); }
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Stats band ===== */
.stats-band { margin-top: -56px; position: relative; z-index: 2; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card {
    padding: 24px; border-radius: var(--radius-lg);
    background: #fff; border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition), box-shadow var(--transition);
    position: relative; overflow: hidden;
}
.stat-card::before {
    content: "";
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--brand-gradient);
    opacity: 0.7;
    transition: opacity var(--transition);
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.stat-card:hover::before { opacity: 1; }
.stat-card .label { color: var(--text-secondary); font-size: 13px; margin-bottom: 6px; }
.stat-card .value {
    font-size: 34px; font-weight: 800; letter-spacing: -0.5px;
    background: var(--brand-gradient); -webkit-background-clip: text;
    background-clip: text; color: transparent;
}

/* ===== Grids ===== */
.grid { display: grid; gap: 20px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* ===== Studio Cards ===== */
.studio-card {
    position: relative; display: flex; flex-direction: column;
    border-radius: var(--radius-lg); background: #fff;
    border: 1px solid var(--border); overflow: hidden;
    transition: all var(--transition);
}
.studio-card::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--brand-gradient); opacity: 0; transition: opacity var(--transition);
}
.studio-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: #B8D0FF; }
.studio-card:hover::before { opacity: 1; }
.studio-cover {
    height: 170px; position: relative; overflow: hidden;
    background:
        radial-gradient(circle at 20% 20%, rgba(0,212,255,0.22), transparent 55%),
        radial-gradient(circle at 80% 80%, rgba(0,102,255,0.20), transparent 55%),
        linear-gradient(135deg, #E8F1FF 0%, #F4FAFF 100%);
    display: flex; align-items: center; justify-content: center;
}
.studio-cover::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(rgba(255,255,255,0) 60%, rgba(255,255,255,0.8));
}
.studio-logo {
    width: 88px; height: 88px; border-radius: 24px;
    background: #fff; box-shadow: var(--shadow-md);
    padding: 8px; position: relative; z-index: 1;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    transition: transform var(--transition);
}
.studio-card:hover .studio-logo { transform: scale(1.05); }
.studio-logo img { width: 100%; height: 100%; object-fit: cover; border-radius: 18px; }
.studio-body { padding: 22px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.studio-body h3 {
    margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -0.2px;
    display: flex; align-items: center; gap: 8px;
}
.studio-meta { color: var(--text-secondary); font-size: 13px; }
.studio-desc {
    color: var(--text-secondary); font-size: 14px; line-height: 1.7;
    flex: 1;
    display: -webkit-box; -webkit-line-clamp: 3;
    -webkit-box-orient: vertical; overflow: hidden;
}
.studio-footer {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 14px; border-top: 1px dashed var(--border); margin-top: 4px;
}

/* ===== Tabs ===== */
.tabs {
    display: inline-flex; gap: 4px;
    padding: 6px; border-radius: 14px;
    background: #fff; border: 1px solid var(--border);
    box-shadow: var(--shadow-xs); margin-bottom: 24px;
    flex-wrap: wrap;
}
.tabs a {
    display: inline-block; padding: 8px 18px; border-radius: 10px;
    color: var(--text-secondary); font-weight: 500; font-size: 14px;
    transition: all var(--transition);
}
.tabs a:hover { color: var(--primary); background: rgba(0,102,255,0.06); }
.tabs a.active {
    background: var(--brand-gradient); color: #fff;
    box-shadow: 0 4px 12px rgba(0,102,255,0.24);
}

/* ===== Forms ===== */
.form-group { margin-bottom: 18px; position: relative; }
.form-label {
    display: block; margin-bottom: 6px; font-weight: 500; font-size: 14px;
    color: var(--text);
}
.form-label .req { color: var(--danger); margin-left: 2px; }
.form-label .hint { color: var(--text-tertiary); font-weight: 400; font-size: 13px; margin-left: 6px; }
.form-control {
    width: 100%; padding: 11px 14px;
    border: 1px solid var(--border); border-radius: 10px;
    font-size: 14px; color: var(--text); background: #fff;
    transition: all var(--transition);
    outline: none;
}
.form-control:hover { border-color: #B8D0FF; }
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0,102,255,0.10);
}
.form-control::placeholder { color: var(--text-tertiary); }
textarea.form-control { min-height: 110px; resize: vertical; line-height: 1.6; }
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2386909C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
    padding-right: 36px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-check {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--text-secondary); font-size: 13px;
    cursor: pointer;
}
.form-check input { width: 18px; height: 18px; accent-color: var(--primary); }
.form-split { display: flex; gap: 10px; align-items: center; }
.form-split > :first-child { flex: 1; }
.form-helper { color: var(--text-tertiary); font-size: 12px; margin-top: 4px; }

/* ===== Tables ===== */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.table thead th {
    background: linear-gradient(180deg, #F7F8FA, #EEF1F5);
    color: var(--text-secondary); font-weight: 600; font-size: 13px;
    padding: 14px 18px; text-align: left; white-space: nowrap;
    border-bottom: 1px solid var(--border);
}
.table thead th:first-child { border-top-left-radius: 12px; }
.table thead th:last-child { border-top-right-radius: 12px; }
.table tbody td {
    padding: 15px 18px; border-bottom: 1px solid #F0F2F5;
    vertical-align: middle;
}
.table tbody tr { transition: background var(--transition); }
.table tbody tr:hover { background: #FAFBFD; }
.table tbody tr:last-child td { border-bottom: none; }

/* ===== Auth pages ===== */
.auth-shell {
    min-height: 100vh;
    background:
        radial-gradient(1200px 600px at -10% -10%, rgba(0,102,255,0.12), transparent 60%),
        radial-gradient(900px 500px at 110% 20%, rgba(0,212,255,0.12), transparent 60%),
        linear-gradient(180deg, #F0F5FF 0%, #FAFBFD 50%, #FFFFFF 100%);
    display: flex; align-items: center; justify-content: center;
    padding: 40px 20px;
    position: relative;
}
.admin-auth {
    background:
        radial-gradient(1200px 600px at -10% -10%, rgba(0,30,80,0.45), transparent 60%),
        radial-gradient(900px 500px at 110% 20%, rgba(0,102,255,0.25), transparent 60%),
        linear-gradient(180deg, #0A1629 0%, #061020 100%);
}
.admin-auth .auth-card {
    background: rgba(255,255,255,0.98);
    border: 1px solid rgba(255,255,255,0.18);
}
.auth-shell::before {
    content: "";
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(0,102,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,102,255,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}
.auth-card {
    width: 100%; max-width: 480px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(0, 30, 80, 0.12);
    border: 1px solid rgba(255,255,255,0.6);
    overflow: hidden;
    backdrop-filter: blur(12px);
    position: relative;
    animation: authIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes authIn {
    from { opacity: 0; transform: translateY(30px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.auth-card-wide { max-width: 640px; }
.auth-brand {
    padding: 36px 40px 0;
    text-align: center;
}
.auth-brand .brand-mark {
    width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 16px;
    background: var(--brand-gradient); box-shadow: var(--shadow-glow);
    display: flex; align-items: center; justify-content: center; color: #fff;
    font-weight: 800; font-size: 24px;
    position: relative; overflow: hidden;
}
.auth-brand .brand-mark::after {
    content: "";
    position: absolute; inset: -50%;
    background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.35) 50%, transparent 60%);
    transform: rotate(30deg) translateX(-120%);
    animation: shine 4s ease-in-out infinite;
}
.auth-brand h2 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.5px; }
.auth-brand p { margin: 8px 0 0; color: var(--text-secondary); font-size: 14px; }
.auth-body { padding: 32px 40px 40px; }
.auth-footer {
    padding: 0 40px 32px; text-align: center; color: var(--text-tertiary); font-size: 13px;
}

/* ===== Admin layout ===== */
.admin-shell { display: flex; min-height: 100vh; background: var(--bg-page); position: relative; }
.admin-sidebar {
    width: 248px; flex-shrink: 0;
    background: linear-gradient(180deg, #0A1A2F 0%, #061222 100%);
    color: #CBD7E6; position: sticky; top: 0; height: 100vh; overflow-y: auto;
    position: relative;
}
.admin-sidebar .brand { padding: 22px 24px; color: #fff; border-bottom: 1px solid rgba(255,255,255,0.08); }
.admin-sidebar .brand-logo { background: var(--brand-gradient); }
.admin-sidebar .brand-text small { color: rgba(255,255,255,0.5); }
.admin-side-nav a {
    display: block; padding: 12px 24px;
    color: rgba(255,255,255,0.68); font-size: 14px; font-weight: 500;
    border-left: 3px solid transparent;
    transition: all var(--transition);
    position: relative;
}
.admin-side-nav a:hover { color: #fff; background: rgba(255,255,255,0.04); }
.admin-side-nav a.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(0,102,255,0.30), rgba(0,102,255,0));
    border-left-color: #00D4FF;
}
.admin-side-nav a.active::before {
    content: ""; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
    width: 6px; height: 6px; border-radius: 50%;
    background: #00D4FF; box-shadow: 0 0 12px #00D4FF;
    animation: pulseDot 1.5s ease-in-out infinite;
}
@keyframes pulseDot {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px #00D4FF; }
    50% { opacity: 0.6; box-shadow: 0 0 16px #00D4FF; }
}
.admin-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.admin-topbar {
    height: 68px; padding: 0 32px;
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(255,255,255,0.92); border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 10;
    backdrop-filter: blur(12px);
}
.admin-topbar h2 { margin: 0; font-size: 18px; font-weight: 700; }
.admin-topbar-right { display: flex; gap: 14px; align-items: center; color: var(--text-secondary); }
.admin-content { flex: 1; padding: 28px 32px; }

/* ===== Footer ===== */
.site-footer {
    margin-top: auto;
    background:
        linear-gradient(180deg, #0A1629 0%, #061020 100%);
    color: rgba(255,255,255,0.70);
    padding: 56px 0 0;
    position: relative;
    overflow: hidden;
}
.site-footer::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,212,255,0.4), transparent);
    animation: footerLine 4s linear infinite;
}
@keyframes footerLine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
.footer-col h4 {
    color: #fff; font-size: 15px; font-weight: 700; margin: 0 0 16px;
    position: relative; padding-bottom: 10px;
}
.footer-col h4::after {
    content: ""; position: absolute; left: 0; bottom: 0; width: 32px; height: 2px;
    background: var(--brand-gradient); border-radius: 2px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-col ul a { color: rgba(255,255,255,0.60); font-size: 14px; }
.footer-col ul a:hover { color: #fff; }
.footer-brand p { margin: 14px 0 0; font-size: 14px; line-height: 1.75; color: rgba(255,255,255,0.55); }
.footer-brand .brand-logo { width: 44px; height: 44px; border-radius: 12px; }
.footer-brand .brand-text { color: #fff; font-size: 18px; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,0.50);
}
.footer-bottom .footer-links { margin-bottom: 8px; display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; }
.footer-bottom a { color: rgba(255,255,255,0.65); }
.footer-bottom a:hover { color: #fff; }
.footer-bottom .police-badge { display: inline-flex; align-items: center; gap: 6px; }
.footer-bottom .police-badge::before {
    content: "";
    width: 16px; height: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FFB547'%3E%3Cpath d='M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ===== Empty state ===== */
.empty {
    padding: 72px 24px; text-align: center;
    color: var(--text-tertiary);
}
.empty svg { width: 88px; height: 88px; margin: 0 auto 20px; opacity: 0.55; }
.empty p { margin: 0; font-size: 15px; }

/* ===== Timeline ===== */
.timeline-item {
    position: relative; padding: 0 0 24px 28px;
    border-left: 2px dashed #DCE4EF;
}
.timeline-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline-item::before {
    content: ""; position: absolute; left: -8px; top: 4px;
    width: 14px; height: 14px; border-radius: 50%;
    background: #fff; border: 3px solid var(--primary);
    box-shadow: 0 0 0 4px rgba(0,102,255,0.10);
}
.timeline-item h4 { margin: 0 0 6px; font-size: 16px; font-weight: 700; }
.timeline-item .meta { color: var(--text-secondary); font-size: 13px; margin-bottom: 6px; }
.timeline-item .progress {
    height: 8px; border-radius: 999px; background: #EAF1FB; overflow: hidden;
    margin-top: 10px;
}
.timeline-item .progress > span {
    display: block; height: 100%; border-radius: 999px;
    background: var(--brand-gradient);
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== Alerts ===== */
.alert {
    padding: 12px 16px; border-radius: 10px; font-size: 14px;
    border: 1px solid transparent; margin-bottom: 16px;
}
.alert-error { background: rgba(245,63,63,0.08); color: #B83333; border-color: rgba(245,63,63,0.18); }
.alert-success { background: rgba(0,196,140,0.10); color: #007A55; border-color: rgba(0,196,140,0.18); }
.alert-info { background: rgba(0,102,255,0.08); color: var(--primary); border-color: rgba(0,102,255,0.15); }

/* ===== Toast / Alert ===== */
.toast {
    position: fixed;
    top: 24px; right: 24px;
    z-index: 9999;
    padding: 14px 20px;
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--primary);
    font-size: 14px;
    color: var(--text);
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast.show { transform: translateX(0); }
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }

/* ===== Loading spinner ===== */
.spinner {
    width: 20px; height: 20px;
    border: 2px solid rgba(0,102,255,0.15);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Decorative aurora ===== */
.aurora {
    position: fixed; inset: 0; z-index: -4; pointer-events: none;
    background:
        radial-gradient(1200px 600px at 20% 30%, rgba(0,102,255,0.07), transparent 55%),
        radial-gradient(1000px 500px at 80% 70%, rgba(0,212,255,0.05), transparent 55%);
    filter: blur(60px);
    animation: auroraMove 18s ease-in-out infinite alternate;
}
@keyframes auroraMove {
    0% { transform: translateX(-2%) translateY(-2%) rotate(0deg); }
    100% { transform: translateX(2%) translateY(2%) rotate(2deg); }
}

/* ===== Tilt card helper ===== */
.card-tilt {
    transform-style: preserve-3d;
    will-change: transform;
}

/* ===== Utility classes ===== */
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-col { display: flex; flex-direction: column; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 12px; }
.gap-3 { gap: 20px; }
.wrap { flex-wrap: wrap; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.text-muted { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-center { text-align: center; }
.w-full { width: 100%; }

/* ===== Enhanced select styling ===== */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2386909C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center;
    padding: 9px 32px 9px 12px;
    border: 1px solid var(--border); border-radius: 10px;
    font-size: 14px; color: var(--text); background-color: #fff;
    transition: all var(--transition); outline: none; cursor: pointer;
}
select:hover { border-color: #B8D0FF; }
select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(0,102,255,0.10); }

/* ===== Cursor glow ===== */
.cursor-glow {
    position: fixed; width: 320px; height: 320px; border-radius: 50%;
    background: radial-gradient(circle, rgba(0,212,255,0.10) 0%, transparent 70%);
    pointer-events: none; z-index: -1;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    opacity: 0;
}
body:hover .cursor-glow { opacity: 1; }

/* ===== Spotlight border effect ===== */
.spotlight-card {
    position: relative; overflow: hidden;
}
.spotlight-card::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit;
    padding: 1px;
    background: radial-gradient(400px circle at var(--mouse-x,50%) var(--mouse-y,50%), rgba(0,212,255,0.45), transparent 60%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    opacity: 0; transition: opacity 0.3s ease; pointer-events: none;
}
.spotlight-card:hover::before { opacity: 1; }

/* ===== Floating animation ===== */
.float { animation: floatY 5s ease-in-out infinite; }
@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ===== Pulse ring ===== */
.pulse-ring {
    position: relative;
}
.pulse-ring::after {
    content: ""; position: absolute; inset: -4px; border-radius: inherit;
    border: 2px solid rgba(0,212,255,0.35);
    animation: pulseRing 2s ease-out infinite;
    pointer-events: none;
}
@keyframes pulseRing {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.15); opacity: 0; }
}

/* ===== Data table row entrance ===== */
.table tbody tr {
    opacity: 0;
    animation: rowIn 0.4s ease-out forwards;
}
.table tbody tr:nth-child(1) { animation-delay: 0.04s; }
.table tbody tr:nth-child(2) { animation-delay: 0.08s; }
.table tbody tr:nth-child(3) { animation-delay: 0.12s; }
.table tbody tr:nth-child(4) { animation-delay: 0.16s; }
.table tbody tr:nth-child(5) { animation-delay: 0.20s; }
.table tbody tr:nth-child(6) { animation-delay: 0.24s; }
.table tbody tr:nth-child(7) { animation-delay: 0.28s; }
.table tbody tr:nth-child(8) { animation-delay: 0.32s; }
.table tbody tr:nth-child(9) { animation-delay: 0.36s; }
.table tbody tr:nth-child(10) { animation-delay: 0.40s; }
@keyframes rowIn {
    from { opacity: 0; transform: translateX(-12px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ===== Shimmer loading ===== */
.skeleton {
    background: linear-gradient(90deg, #F0F2F5 25%, #E6EAEE 50%, #F0F2F5 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== Page transition ===== */
.page-wrapper {
    animation: pageIn 0.4s ease-out;
}
@keyframes pageIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Pill progress ===== */
.pill-progress {
    display: inline-flex; align-items: center;
    padding: 4px 12px; border-radius: 999px;
    font-size: 12px; font-weight: 600;
    background: rgba(0,196,140,0.12); color: #007A55;
}
.pill-progress.warn { background: rgba(255,181,71,0.18); color: #A16200; }
.pill-progress.info { background: rgba(0,102,255,0.10); color: var(--primary); }

/* ===== Form group focused state ===== */
.form-group.focused::after {
    content: ""; position: absolute; bottom: 18px; left: 14px; right: 14px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.3; pointer-events: none;
}

/* ===== Gradient text ===== */
.gradient-text {
    background: var(--brand-gradient);
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
}

/* ===== Neon glow for admin ===== */
.admin-sidebar::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, #00D4FF, #0066FF, transparent);
    animation: neonScan 4s linear infinite;
}
@keyframes neonScan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-top { grid-template-columns: 1fr 1fr; gap: 28px; }
    .admin-sidebar { width: 220px; }
    .admin-content { padding: 20px; }
    .admin-topbar { padding: 0 20px; }
}
@media (max-width: 768px) {
    .container { padding: 0 16px; }
    .section { padding: 40px 0; }
    .hero { padding: 72px 0 96px; }
    .hero h1 { font-size: 34px; }
    .hero p { font-size: 15px; }
    .site-nav {
        display: none;
        position: absolute; top: 68px; left: 0; right: 0;
        background: #fff; padding: 14px; flex-direction: column;
        align-items: stretch; gap: 4px;
        border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm);
    }
    .site-nav.open { display: flex; }
    .site-nav a { padding: 10px 14px; }
    .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .header-actions .btn { padding: 8px 12px; font-size: 13px; }
    .header-actions .btn-primary { padding: 8px 14px; }
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .footer-top { grid-template-columns: 1fr; }
    .auth-card { border-radius: 20px; }
    .auth-brand { padding: 28px 24px 0; }
    .auth-body { padding: 24px; }
    .auth-footer { padding: 0 24px 24px; }

    .admin-shell { flex-direction: column; }
    .admin-sidebar { width: 100%; height: auto; position: static; }
    .admin-side-nav { display: flex; overflow-x: auto; padding: 8px; }
    .admin-side-nav a { flex: 0 0 auto; padding: 10px 14px; border-left: none; border-bottom: 3px solid transparent; white-space: nowrap; font-size: 13px; }
    .admin-side-nav a.active { border-bottom-color: #00D4FF; border-left-color: transparent; background: rgba(255,255,255,0.08); }
    .admin-side-nav a.active::before { display: none; }
    .admin-topbar { height: 60px; padding: 0 16px; }
    .admin-content { padding: 16px; }
    .card-pad { padding: 20px; }
    .card-header { padding: 16px 18px; }
    .stats-grid .stat-card { padding: 18px; }
    .stats-grid .stat-card .value { font-size: 24px; }
}
@media (max-width: 420px) {
    .hero h1 { font-size: 28px; }
    .section-title { font-size: 22px; }
    .tabs a { padding: 7px 12px; font-size: 13px; }
    .stats-grid { grid-template-columns: 1fr; }
}
