:root {
    --bg-deep: #020617;
    --bg-main: #0f172a;
    --bg-soft: rgba(15, 23, 42, 0.86);
    --panel-top: rgba(2, 6, 23, 0.96);
    --panel-bottom: rgba(15, 23, 42, 0.98);
    --border: #1e293b;
    --border-soft: rgba(56, 189, 248, 0.12);
    --text-main: #e2e8f0;
    --text-soft: #cbd5e1;
    --text-muted: #94a3b8;
    --accent: #38bdf8;
    --accent-strong: #0ea5e9;
    --accent-glow: rgba(56, 189, 248, 0.18);
    --warn: #facc15;
    --danger: #ef4444;
    --success: #22c55e;
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 12px;
    --shadow-lg: 0 18px 45px rgba(2, 6, 23, 0.28);
    --shadow-md: 0 12px 30px rgba(2, 6, 23, 0.22);
    --sidebar-width: 250px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(14, 165, 233, 0.15), transparent 24%),
        radial-gradient(circle at left 20%, rgba(34, 197, 94, 0.08), transparent 22%),
        linear-gradient(180deg, #020617 0%, #0f172a 60%, #111827 100%);
    color: var(--text-main);
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: radial-gradient(circle at center, black 45%, transparent 90%);
    z-index: 0;
}

main {
    position: relative;
    z-index: 1;
    margin-left: var(--sidebar-width);
    padding: 32px 34px 40px;
    min-height: 100vh;
}

a {
    color: inherit;
}

h1 {
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.05;
}

h2 {
    font-size: 1.25rem;
    color: #f8fafc;
}

p {
    color: var(--text-soft);
    line-height: 1.65;
}

button,
.button-link,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
    color: #03111f;
    font-size: 0.95rem;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 10px 28px rgba(14, 165, 233, 0.24);
}

button:hover,
.button-link:hover,
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(14, 165, 233, 0.28);
}

button:disabled,
.btn:disabled,
.button-link.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

input,
select,
textarea {
    width: 100%;
    padding: 13px 15px;
    border-radius: 12px;
    border: 1px solid #334155;
    background: rgba(2, 6, 23, 0.86);
    color: var(--text-main);
    font-size: 0.96rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
    background: rgba(2, 6, 23, 0.98);
}

textarea {
    min-height: 130px;
    resize: vertical;
}

label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10;
    width: var(--sidebar-width);
    height: 100vh;
    padding: 18px;
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(14px);
    border-right: 1px solid rgba(56, 189, 248, 0.1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-brand {
    padding: 10px 12px 18px;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.16);
    color: #dff5ff;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #38bdf8, #22c55e);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.55);
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
}

.nav-section-label {
    padding: 14px 12px 8px;
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.navbar a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: var(--text-soft);
    text-decoration: none;
    border-radius: 14px;
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
    border: 1px solid transparent;
}

.navbar a:hover {
    transform: translateX(3px);
    background: rgba(15, 23, 42, 0.9);
    color: #ffffff;
    border-color: rgba(56, 189, 248, 0.12);
}

.nav-divider {
    height: 1px;
    margin: 12px 10px;
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.35), transparent);
}

.nav-icon-bg {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(14, 165, 233, 0.35));
    border: 1px solid rgba(56, 189, 248, 0.18);
    transition: transform 0.2s ease;
}

.navbar a:hover .nav-icon-bg {
    transform: scale(1.04);
}

.nav-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.nav-user {
    margin-top: auto;
    padding-top: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 10px 12px;
    margin-bottom: 10px;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid rgba(56, 189, 248, 0.45);
}

.login-btn,
.logout-btn {
    width: 100%;
    justify-content: center;
}

.login-btn {
    background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
    color: white;
    box-shadow: 0 12px 30px rgba(88, 101, 242, 0.28);
}

.logout-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 12px 30px rgba(239, 68, 68, 0.24);
}

.page-shell {
    display: grid;
    gap: 22px;
}

.page-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
    gap: 22px;
    align-items: stretch;
}

.hero-panel,
.panel,
.container,
.card,
.glass-panel {
    background: linear-gradient(180deg, var(--panel-top), var(--panel-bottom));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.hero-panel {
    padding: 28px;
}

.hero-panel h1 {
    margin-bottom: 14px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.12);
    color: #7dd3fc;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.page-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.ghost-btn {
    background: rgba(15, 23, 42, 0.9);
    color: var(--text-main);
    border-color: rgba(56, 189, 248, 0.18);
    box-shadow: none;
}

.ghost-btn:hover {
    box-shadow: 0 10px 26px rgba(2, 6, 23, 0.24);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 20px;
}

.stat-card {
    padding: 18px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid var(--border-soft);
}

.stat-label {
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #f8fafc;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.card {
    padding: 22px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.22);
    box-shadow: 0 20px 40px rgba(2, 6, 23, 0.32);
}

.card h3 {
    color: #f8fafc;
    margin-bottom: 8px;
}

.card h6 {
    margin-bottom: 10px;
    color: #7dd3fc;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.muted {
    color: var(--text-muted);
}

.status-banner {
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--border);
    color: var(--text-soft);
}

.stack {
    display: grid;
    gap: 18px;
}

.list {
    max-height: 320px;
    overflow: auto;
    display: grid;
    gap: 10px;
}

.list-item {
    padding: 14px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.meta {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-top: 6px;
}

table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 14px;
}

th,
td {
    padding: 12px;
    text-align: left;
}

th {
    color: var(--text-muted);
    background: rgba(15, 23, 42, 0.92);
}

tr:nth-child(even) {
    background: rgba(2, 6, 23, 0.68);
}

tr:hover {
    background: rgba(30, 41, 59, 0.86);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.full-width {
    grid-column: 1 / -1;
}

.floating-logo {
    position: fixed;
    top: 12px;
    right: 18px;
    width: 64px;
    height: auto;
    z-index: 11;
    pointer-events: none;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(2, 6, 23, 0.88);
}

::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.55);
    border-radius: 999px;
}

@media (max-width: 1120px) {
    .page-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    :root {
        --sidebar-width: 100%;
    }

    .navbar {
        position: static;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid rgba(56, 189, 248, 0.1);
    }

    .nav-links {
        gap: 4px;
    }

    .nav-user {
        margin-top: 10px;
    }

    main {
        margin-left: 0;
        padding: 22px 18px 34px;
    }

    .floating-logo {
        width: 42px;
        top: 10px;
        right: 12px;
    }
}

@media (max-width: 720px) {
    .stats-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

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