/* ============================================================
   ADMIN PANEL — Modern Dark Glass-Morphism Theme
   ============================================================ */

:root {
    --bg: #0f1117;
    --bg-secondary: #161921;
    --surface: rgba(255, 255, 255, 0.05);
    --surface-hover: rgba(255, 255, 255, 0.08);
    --surface-strong: rgba(255, 255, 255, 0.1);
    --glass: rgba(22, 25, 33, 0.85);
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.12);
    --text: #e8eaed;
    --text-secondary: #9aa0a6;
    --muted: rgba(255, 255, 255, 0.45);
    --accent: #7c5cfc;
    --accent-light: #a78bfa;
    --accent-soft: rgba(124, 92, 252, 0.15);
    --accent-glow: rgba(124, 92, 252, 0.3);
    --success: #34d399;
    --success-soft: rgba(52, 211, 153, 0.15);
    --warning: #fbbf24;
    --warning-soft: rgba(251, 191, 36, 0.15);
    --danger: #f87171;
    --danger-soft: rgba(248, 113, 113, 0.15);
    --info: #60a5fa;
    --info-soft: rgba(96, 165, 250, 0.15);
    --gradient-brand: linear-gradient(135deg, #7c5cfc, #c084fc, #f472b6);
    --gradient-card: linear-gradient(135deg, rgba(124, 92, 252, 0.08), rgba(192, 132, 252, 0.04));
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(124, 92, 252, 0.2);
    --radius-xs: 8px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 22px;
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 260px;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(124, 92, 252, 0.12), transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(244, 114, 182, 0.08), transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(96, 165, 250, 0.05), transparent 60%);
    pointer-events: none;
    z-index: 0;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }

/* ============================================================
   SHELL LAYOUT
   ============================================================ */
.shell {
    position: relative;
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    min-height: 100vh;
    z-index: 1;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 0.85rem;
    background: var(--glass);
    border-right: 1px solid var(--line);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 10;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.4rem 0.85rem;
    border-bottom: 1px solid var(--line);
    margin-bottom: 0.5rem;
}

.sidebar__logo {
    display: grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: var(--radius-sm);
    background: var(--gradient-brand);
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-glow);
}

.sidebar__eyebrow,
.topbar__eyebrow {
    margin: 0 0 0.15rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--muted);
}

.sidebar__brand h1 {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- Nav Links ---- */
.sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    padding: 0.15rem 0;
    overflow-y: auto;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.7rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 55%;
    border-radius: 0 4px 4px 0;
    background: var(--gradient-brand);
    transition: transform var(--transition-base);
}

.nav-link:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.nav-link.is-active {
    background: var(--accent-soft);
    color: #fff;
}

.nav-link.is-active::before {
    transform: translateY(-50%) scaleY(1);
}

.nav-link__icon {
    display: grid;
    place-items: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: var(--radius-xs);
    font-size: 1.15rem;
    flex-shrink: 0;
    transition: transform var(--transition-fast);
    line-height: 1;
}

.nav-link:hover .nav-link__icon { transform: scale(1.12); }

.nav-link.is-active .nav-link__icon {
    filter: drop-shadow(0 0 6px rgba(124, 92, 252, 0.4));
}

/* ---- Sidebar Footer ---- */
.card--contrast {
    margin-top: auto;
    padding: 0.8rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: none;
    font-size: 0.85rem;
}

.card--contrast .sidebar__eyebrow { color: var(--accent-light); }

.card--contrast strong {
    display: block;
    color: var(--text);
    font-size: 0.9rem;
}

.card--contrast span {
    display: block;
    color: var(--text-secondary);
    font-size: 0.78rem;
    margin-bottom: 0.5rem;
    word-break: break-all;
}

/* ============================================================
   MAIN
   ============================================================ */
.main {
    padding: 0.85rem;
    padding-bottom: 2.5rem;
    min-width: 0;
    z-index: 1;
}

.main__inner {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.page-stack {
    display: grid;
    gap: 0.85rem;
}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0.5rem;
    z-index: 20;
    margin-bottom: 0.85rem;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm);
}

.topbar__group {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.topbar h2 {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.2;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.topbar__meta {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

/* ============================================================
   COMMON COMPONENTS
   ============================================================ */

/* ---- Status Pill ---- */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all var(--transition-fast);
}

.status-pill--accent {
    background: var(--accent-soft);
    border-color: rgba(124, 92, 252, 0.2);
    color: var(--accent-light);
}

.status-pill--success {
    background: var(--success-soft);
    border-color: rgba(52, 211, 153, 0.2);
    color: var(--success);
}

.status-pill--warning {
    background: var(--warning-soft);
    border-color: rgba(251, 191, 36, 0.2);
    color: var(--warning);
}

.status-pill--danger {
    background: var(--danger-soft);
    border-color: rgba(248, 113, 113, 0.2);
    color: var(--danger);
}

/* ---- Avatar ---- */
.avatar {
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: var(--radius-sm);
    background: var(--gradient-brand);
    color: #fff;
    font-weight: 800;
    font-size: 0.85rem;
    box-shadow: var(--shadow-glow);
}

/* ---- Icon Button ---- */
.icon-button {
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.icon-button:hover {
    background: var(--surface-hover);
    border-color: var(--line-strong);
}

/* ---- Card ---- */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1rem 1.1rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.card:hover {
    border-color: var(--line-strong);
}

.card--highlight {
    background: var(--gradient-card);
    border-color: rgba(124, 92, 252, 0.15);
    position: relative;
    overflow: hidden;
}

.card--highlight::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(124, 92, 252, 0.08), transparent 70%);
    pointer-events: none;
}

/* ---- Buttons ---- */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border: 0;
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.95rem;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.button--primary {
    background: var(--gradient-brand);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(124, 92, 252, 0.3);
}

.button--primary:hover {
    box-shadow: 0 6px 24px rgba(124, 92, 252, 0.5);
    transform: translateY(-1px);
}

.button--primary:active { transform: translateY(0); }

.button--ghost {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--line);
}

.button--ghost:hover {
    background: var(--surface-hover);
    border-color: var(--line-strong);
}

.button--danger {
    background: var(--danger-soft);
    color: var(--danger);
    border: 1px solid rgba(248, 113, 113, 0.2);
}

.button--danger:hover { background: rgba(248, 113, 113, 0.25); }

.button--full { width: 100%; }

/* ---- Grids ---- */
.hero-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 0.65rem;
    margin-bottom: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
    margin-bottom: 0;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.9fr);
    gap: 0.65rem;
    margin-bottom: 0;
}

.content-grid--single-bottom { grid-template-columns: 1fr; }

/* ---- Hero Card ---- */
.hero-card { padding: 1rem; }

.hero-card h3 {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    line-height: 1.3;
}

.hero-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-top: 0.4rem;
}

/* ---- Stat Card ---- */
.stat-card {
    display: grid;
    gap: 0.3rem;
    padding: 1rem 1.1rem;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--gradient-brand);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.stat-card:hover::before { opacity: 1; }

.stat-card p {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.stat-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.55rem;
    font-weight: 700;
    margin: 0;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card span {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

/* ---- Section Heading ---- */
.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.section-heading h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

/* ---- Stack List ---- */
.stack-list, .bar-list, .timeline {
    display: grid;
    gap: 0;
}

.list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--line);
    gap: 0.65rem;
}

.list-row:last-child { border-bottom: 0; padding-bottom: 0; }

.list-row strong { display: block; font-size: 0.92rem; }

.list-row span {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ---- Timeline ---- */
.timeline__item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.7rem 0.75rem;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--line);
    transition: all var(--transition-fast);
}

.timeline__item:hover {
    border-color: var(--line-strong);
    background: var(--surface-hover);
}

.timeline__item strong {
    min-width: 3.5rem;
    color: var(--accent-light);
    font-size: 0.9rem;
}

.timeline__item h4 {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.92rem;
}

.timeline__item p {
    color: var(--text-secondary);
    font-size: 0.84rem;
}

/* ---- Data Table ---- */
.table-wrap {
    overflow-x: auto;
    margin-top: 0.4rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th,
.data-table td {
    padding: 0.75rem 0.6rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.data-table th {
    color: var(--muted);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    background: var(--surface);
    position: sticky;
    top: 0;
}

.data-table tbody tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover { background: var(--surface); }

.data-table tbody tr:last-child td { border-bottom: 0; }

.data-table strong {
    font-size: 0.9rem;
    color: var(--text);
}

.data-table td > div + div {
    margin-top: 0.15rem;
    color: var(--text-secondary);
    font-size: 0.82rem;
}

/* ---- Bar Row ---- */
.bar-row { display: grid; gap: 0.3rem; }

.bar-row__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bar-row__head strong { display: block; }

.bar-row__track {
    width: 100%;
    height: 0.45rem;
    border-radius: 999px;
    background: var(--surface-strong);
    overflow: hidden;
}

.bar-row__track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--gradient-brand);
}

/* ---- Action Group ---- */
.action-group {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.action-group .button,
.data-table .button {
    padding: 0.42rem 0.7rem;
    font-size: 0.82rem;
}

.action-group form { margin: 0; }

/* ---- Alerts ---- */
.alert {
    margin-bottom: 0.75rem;
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert--error {
    background: var(--danger-soft);
    border-color: rgba(248, 113, 113, 0.2);
    color: var(--danger);
}

.alert--success {
    background: var(--success-soft);
    border-color: rgba(52, 211, 153, 0.2);
    color: var(--success);
}

/* ---- Pagination ---- */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.7rem;
}

.pagination .page-link,
.pagination .page-item span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.1rem;
    min-height: 2.1rem;
    padding: 0.35rem 0.55rem;
    border-radius: var(--radius-xs);
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.pagination .page-link:hover {
    background: var(--surface-hover);
    border-color: var(--line-strong);
    color: var(--text);
}

.pagination .active .page-link {
    background: var(--accent-soft);
    color: var(--accent-light);
    border-color: rgba(124, 92, 252, 0.25);
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

/* ---- Animated Orbs Background ---- */
.login-orbs {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.login-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.55;
}

.login-orb--1 {
    width: 400px; height: 400px;
    background: rgba(124, 92, 252, 0.3);
    top: -10%; left: -5%;
    animation: orbFloat1 12s ease-in-out infinite;
}

.login-orb--2 {
    width: 350px; height: 350px;
    background: rgba(244, 114, 182, 0.25);
    bottom: -8%; right: -5%;
    animation: orbFloat2 14s ease-in-out infinite;
}

.login-orb--3 {
    width: 250px; height: 250px;
    background: rgba(96, 165, 250, 0.2);
    top: 50%; left: 45%;
    animation: orbFloat3 10s ease-in-out infinite;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(60px, 40px) scale(1.1); }
    66% { transform: translate(-30px, 70px) scale(0.95); }
}

@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-50px, -40px) scale(1.08); }
    66% { transform: translate(40px, -60px) scale(0.92); }
}

@keyframes orbFloat3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-40px, -30px) scale(1.15); }
}

.login-shell { width: min(960px, 100%); position: relative; z-index: 1; }

.login-panel {
    display: flex;
    gap: 1rem;
    align-items: stretch;
    animation: fadeInUp 0.6s ease both;
}

.login-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.7rem;
}

.login-badges .status-pill {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.65);
}

.login-features {
    display: grid;
    gap: 0.4rem;
    margin-top: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.login-feature {
    font-size: 0.82rem;
    color: var(--text-secondary);
    padding: 0.3rem 0;
}

.login-copy,
.login-card {
    flex: 1;
    padding: 1.5rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
}

.login-copy {
    background: linear-gradient(140deg, rgba(124, 92, 252, 0.15), rgba(244, 114, 182, 0.06), rgba(96, 165, 250, 0.05));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-copy::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 60%;
    height: 120%;
    background: radial-gradient(circle, rgba(124, 92, 252, 0.1), transparent 60%);
    pointer-events: none;
    animation: orbFloat3 8s ease-in-out infinite;
}

.login-copy__badge {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.login-copy h1 {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
    line-height: 1.3;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-copy p,
.login-copy .topbar__eyebrow {
    color: var(--text-secondary);
}

.login-copy > p {
    margin-top: 0.5rem;
    line-height: 1.55;
}

.login-card {
    background: var(--glass);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    display: grid;
    gap: 0.85rem;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gradient-brand);
}

.login-card__header {
    text-align: center;
    padding-bottom: 0.3rem;
}

.login-card__icon {
    font-size: 2.2rem;
    margin-bottom: 0.3rem;
}

.login-card__subtitle {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 0.15rem;
}

.login-card h2 {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    color: var(--text);
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.button--login {
    padding: 0.7rem 1rem;
    font-size: 0.92rem;
    margin-top: 0.2rem;
    letter-spacing: 0.02em;
}

/* ---- Form Fields ---- */
.field { display: grid; gap: 0.25rem; }

.field span {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.field input {
    width: 100%;
    padding: 0.65rem 0.8rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    transition: all var(--transition-fast);
}

.field input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.field input::placeholder { color: var(--muted); }

.checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.checkbox input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--accent);
}

.credentials-box { display: none; }

/* ============================================================
   BACKDROP & BOTTOM NAV
   ============================================================ */
.backdrop, .mobile-only { display: none; }

.bottom-nav {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 35;
    display: none;
    align-items: center;
    gap: 0;
    overflow-x: auto;
    padding: 0.4rem 0.4rem calc(0.4rem + env(safe-area-inset-bottom));
    background: var(--glass);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.bottom-nav__link {
    flex: 1;
    min-width: 0;
    padding: 0.5rem 0.2rem;
    border-radius: var(--radius-xs);
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 700;
    transition: all var(--transition-fast);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bottom-nav__link.is-active {
    background: var(--accent-soft);
    color: var(--accent-light);
}

/* ============================================================
   RESPONSIVE — Tablet
   ============================================================ */
@media (max-width: 1100px) {
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .content-grid, .hero-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   RESPONSIVE — Mobile
   ============================================================ */
@media (max-width: 820px) {
    html { font-size: 15px; }

    .shell { grid-template-columns: 1fr; }

    .sidebar {
        position: fixed;
        left: 0; top: 0; bottom: 0;
        z-index: 50;
        width: min(82vw, 300px);
        transform: translateX(-110%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border-right: 1px solid var(--line);
        border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
        box-shadow: var(--shadow-lg);
    }

    body.sidebar-open .sidebar { transform: translateX(0); }

    .backdrop {
        position: fixed;
        inset: 0;
        z-index: 40;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(4px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    body.sidebar-open .backdrop {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }

    .main {
        padding: 0.6rem;
        padding-bottom: 5rem;
    }

    .mobile-only, .bottom-nav { display: flex; }

    .topbar {
        top: 0.25rem;
        padding: 0.6rem 0.75rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0.45rem;
    }

    .topbar__meta {
        width: 100%;
        justify-content: space-between;
    }

    .topbar h2 { font-size: 1.1rem; }

    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .login-panel { flex-direction: column; }

    .section-heading, .list-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .list-row .button,
    .list-row .status-pill {
        width: 100%;
        justify-content: center;
    }

    .table-wrap { overflow: visible; }

    .data-table,
    .data-table tbody,
    .data-table tr,
    .data-table td {
        display: block;
        width: 100%;
    }

    .data-table thead { display: none; }

    .data-table tbody {
        display: grid;
        gap: 0.5rem;
    }

    .data-table tr {
        padding: 0.1rem;
        border: 1px solid var(--line);
        border-radius: var(--radius-md);
        background: var(--surface);
    }

    .data-table tr:hover { border-color: var(--line-strong); }

    .data-table td {
        display: grid;
        grid-template-columns: minmax(85px, 34%) 1fr;
        gap: 0.55rem;
        padding: 0.55rem 0.75rem;
        border-bottom: 1px solid var(--line);
    }

    .data-table td:last-child { border-bottom: 0; }

    .data-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 0.72rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        align-self: center;
    }

    .data-table td[data-label='Action'],
    .data-table td[data-label='Copy'] {
        grid-template-columns: 1fr;
    }

    .data-table td .action-group,
    .data-table td .button { width: 100%; }

    .data-table td .action-group form { flex: 1; }
    .data-table td .action-group .button { width: 100%; }
}

/* ---- Small phones ---- */
@media (max-width: 480px) {
    .stats-grid, .hero-grid { grid-template-columns: 1fr; }
    .login-copy { display: none; }
    .login-card { padding: 1.4rem; }
    .login-card__icon { font-size: 2.5rem; }
    .login-card h2 { font-size: 1.4rem; }
    .login-shell { width: 100%; }
    .bottom-nav__link { font-size: 0.66rem; padding: 0.45rem 0.1rem; }
    .login-orb--1 { width: 250px; height: 250px; }
    .login-orb--2 { width: 200px; height: 200px; }
    .login-orb--3 { width: 150px; height: 150px; }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes subtleGlow {
    0%, 100% { box-shadow: 0 0 0 rgba(124, 92, 252, 0); }
    50% { box-shadow: 0 0 12px rgba(124, 92, 252, 0.15); }
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.page-stack > * {
    animation: fadeInUp 0.35s ease both;
}

.page-stack > *:nth-child(1) { animation-delay: 0.04s; }
.page-stack > *:nth-child(2) { animation-delay: 0.08s; }
.page-stack > *:nth-child(3) { animation-delay: 0.12s; }
.page-stack > *:nth-child(4) { animation-delay: 0.16s; }

.stat-card { animation: fadeInUp 0.35s ease both; }
.stats-grid .stat-card:nth-child(1) { animation-delay: 0.04s; }
.stats-grid .stat-card:nth-child(2) { animation-delay: 0.08s; }
.stats-grid .stat-card:nth-child(3) { animation-delay: 0.12s; }
.stats-grid .stat-card:nth-child(4) { animation-delay: 0.16s; }

.nav-link.is-active {
    animation: subtleGlow 3s ease-in-out infinite;
}

.button--primary {
    background-size: 200% auto;
    background-image: linear-gradient(135deg, #7c5cfc, #c084fc, #f472b6, #7c5cfc);
    transition: all var(--transition-fast);
}

.button--primary:hover {
    background-position: right center;
}

.button--login {
    animation: shimmer 3s ease-in-out infinite;
    background-size: 300% 100%;
    background-image: linear-gradient(90deg, #7c5cfc, #c084fc, #f472b6, #c084fc, #7c5cfc);
}
