@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Sora:wght@400;500;600;700&display=swap');

:root {
    --ink: #0f172a;
    --ink-soft: #1f2937;
    --muted: #64748b;
    --paper: #ffffff;
    --accent: #7c3aed;
    --accent-2: #0ea5e9;
    --glow: rgba(124, 58, 237, 0.12);
    --border: #e2e8f0;
    --shadow-1: 0 20px 70px rgba(15, 23, 42, 0.1);
    --shadow-2: 0 10px 30px rgba(15, 23, 42, 0.12);
}

body.app-body {
    font-family: 'Sora', 'Space Grotesk', system-ui, -apple-system, Segoe UI, sans-serif;
    background:
        radial-gradient(circle at 15% 20%, rgba(14, 165, 233, 0.18), transparent 28%),
        radial-gradient(circle at 80% 0%, rgba(124, 58, 237, 0.18), transparent 25%),
        radial-gradient(circle at 70% 70%, rgba(16, 185, 129, 0.12), transparent 30%),
        #f8fafc;
    color: var(--ink);
    min-height: 100vh;
}

body.app-body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.4), transparent 40%);
}

.page-shell {
    position: relative;
    z-index: 1;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: blur(16px);
    background: linear-gradient(120deg, #0f172a 0%, #0c1c34 55%, #0a223f 100%);
    color: #e2e8f0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.25);
}

.app-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.brand-mark {
    height: 44px;
    width: 44px;
    border-radius: 14px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.24), transparent 50%), linear-gradient(135deg, #7c3aed, #0ea5e9);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: var(--shadow-2);
}

.brand-name {
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: 0.01em;
}

.top-nav a {
    color: #cbd5e1;
    padding: 10px 14px;
    border-radius: 12px;
    transition: all 0.2s ease;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.top-nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-ghost {
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
    font-weight: 700;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.panel {
    background: var(--paper);
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: 18px;
    box-shadow: var(--shadow-1);
}

.panel.dense {
    border-radius: 14px;
}

.stat-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(14, 165, 233, 0.05));
}

.stat-card::after {
    content: '';
    position: absolute;
    inset: -30% 50% auto auto;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.18), transparent 60%);
    transform: rotate(12deg);
}

.stat-card strong {
    position: relative;
    z-index: 1;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.02em;
    background: rgba(226, 232, 240, 0.7);
    color: var(--ink-soft);
}

.tag.success {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
}

.tag.warning {
    background: rgba(251, 191, 36, 0.18);
    color: #b45309;
}

.tag.neutral {
    background: rgba(148, 163, 184, 0.26);
    color: #334155;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 12px;
    background: linear-gradient(120deg, #7c3aed, #0ea5e9);
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.32);
    border: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 36px rgba(14, 165, 233, 0.28);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(124, 58, 237, 0.08);
    color: #4338ca;
    font-weight: 700;
    letter-spacing: 0.01em;
    border: 1px solid rgba(124, 58, 237, 0.16);
    transition: all 0.15s ease;
}

.btn-secondary:hover {
    background: rgba(124, 58, 237, 0.14);
    border-color: rgba(124, 58, 237, 0.28);
}

.btn-muted {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.04);
    color: var(--ink);
    font-weight: 700;
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.15s ease;
}

.btn-muted:hover {
    background: rgba(15, 23, 42, 0.06);
    border-color: rgba(124, 58, 237, 0.24);
}

.table-wrap {
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(226, 232, 240, 0.7);
    box-shadow: var(--shadow-1);
}

table.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

table.data-table thead {
    background: linear-gradient(120deg, rgba(124, 58, 237, 0.08), rgba(14, 165, 233, 0.06));
}

table.data-table th {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 11px;
    color: #475569;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

table.data-table td {
    padding: 14px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.7);
}

table.data-table tbody tr:hover {
    background: rgba(14, 165, 233, 0.06);
}

.form-field {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    padding: 12px 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    background: rgba(255, 255, 255, 0.9);
}

.form-field:focus {
    outline: none;
    border-color: rgba(124, 58, 237, 0.5);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.16);
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.section-subtitle {
    color: var(--muted);
}

.empty-state {
    padding: 18px;
    color: #475569;
    text-align: center;
    background: rgba(226, 232, 240, 0.4);
    border-radius: 12px;
}

.login-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: var(--shadow-1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.login-hero {
    background: radial-gradient(circle at 20% 30%, rgba(14, 165, 233, 0.16), transparent 36%), radial-gradient(circle at 90% 10%, rgba(124, 58, 237, 0.16), transparent 32%), linear-gradient(145deg, #0f172a, #0c1f3b);
}

.logo-login {
    width: 240px;
    max-width: 70vw;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(15, 23, 42, 0.25));
}
