:root {
    --bg-gradient: radial-gradient(circle at 20% 20%, #312e81 0%, #111827 55%, #05080f 100%);
    --card-bg: rgba(15, 23, 42, 0.85);
    --accent: #f97316;
    --accent-2: #6366f1;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --border: rgba(148, 163, 184, 0.15);
    --radius: 18px;
    --shadow: 0 20px 60px rgba(15, 23, 42, 0.55);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg-gradient);
    color: var(--text);
    font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: var(--accent);
}

.layout {
    display: grid;
    min-height: 100vh;
    grid-template-columns: clamp(240px, 18vw, 280px) 1fr;
    background: linear-gradient(160deg, rgba(99, 102, 241, 0.12), rgba(249, 115, 22, 0.08));
}

.sidebar {
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    border-right: 1px solid var(--border);
    backdrop-filter: blur(16px);
    background: rgba(15, 23, 42, 0.65);
}

.sidebar .logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.08em;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
    color: var(--muted);
    transition: all 0.2s ease;
}

.sidebar nav a svg {
    width: 20px;
    height: 20px;
}

.sidebar nav a.active,
.sidebar nav a:hover {
    color: var(--text);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(249, 115, 22, 0.25));
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.25);
}

.main {
    padding: 2.5rem 3rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.topbar .user {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(15, 23, 42, 0.6);
    padding: 0.75rem 1.15rem;
    border-radius: 999px;
    border: 1px solid var(--border);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.25);
    color: #c7d2fe;
    font-size: 0.85rem;
    font-weight: 600;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.grid.stats {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 1.6rem;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(120deg, rgba(99, 102, 241, 0.1), rgba(249, 115, 22, 0.08));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover::after {
    opacity: 1;
}

.card h3 {
    margin: 0 0 0.4rem;
    font-size: 1.1rem;
    letter-spacing: 0.04em;
}

.card .value {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0.2rem 0 1rem;
}

.card table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.card table th,
.card table td {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.card table th {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    color: var(--muted);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.success { background: #22c55e; }
.status-dot.warning { background: #f59e0b; }
.status-dot.info { background: #3b82f6; }
.status-dot.muted { background: rgba(148, 163, 184, 0.6); }

.tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.18);
    margin-right: 0.35rem;
    font-size: 0.75rem;
    color: #e2e8f0;
}

.table-scroll {
    max-height: 320px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.table-scroll::-webkit-scrollbar {
    width: 6px;
}

.table-scroll::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.35);
    border-radius: 999px;
}

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 1.5rem;
    text-align: center;
}

.hero .logo {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    margin-bottom: 1.5rem;
    color: var(--muted);
}

.hero h1 {
    font-size: clamp(2.8rem, 7vw, 4.8rem);
    max-width: 760px;
    margin: 0 auto 1rem;
    line-height: 1.15;
    font-weight: 700;
}

.hero p {
    max-width: 640px;
    font-size: 1.1rem;
    color: var(--muted);
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.8rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #f97316, #6366f1);
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.04em;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.btn.secondary {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.4);
    color: var(--text);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(99, 102, 241, 0.35);
}

footer.hero-footer {
    margin-top: 4rem;
    color: rgba(148, 163, 184, 0.75);
    font-size: 0.88rem;
}

@media (max-width: 1080px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        grid-row: 2;
        flex-direction: row;
        overflow-x: auto;
        padding: 1.2rem 1.6rem;
    }

    .sidebar nav {
        display: flex;
        gap: 0.8rem;
    }

    .main {
        padding: 2rem 1.5rem 4rem;
    }
}

@media (max-width: 720px) {
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero p {
        font-size: 1rem;
    }
}
