/* =========================================================
   GoNix 2.0 — Shared Design System
   Theme: Futuristic midnight, navy glass, electric blue/cyan
========================================================= */

:root {
    color-scheme: dark;
    --bg: #080b12;
    --bg-deep: #05070d;
    --surface: #101725;
    --surface-glass: rgba(18, 28, 45, 0.82);
    --surface-hover: #17243a;
    --border: rgba(133, 163, 207, 0.19);
    --text: #f4f7ff;
    --muted: #a7b4ca;
    --blue: #4775ff;
    --cyan: #55d5ff;
    --purple: #9b7bff;
    --green: #55e6a5;
    --red: #ff7185;
    --gold: #f6c96b;
    --radius: 20px;
    --radius-sm: 12px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
    --max-width: 1180px;
    --font: Inter, ui-sans-serif, system-ui, -apple-system,
            BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(ellipse at 10% 0%, rgba(71, 117, 255, 0.13), transparent 36%),
        radial-gradient(ellipse at 90% 15%, rgba(85, 213, 255, 0.07), transparent 30%),
        var(--bg);
    font-family: var(--font);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: linear-gradient(
        rgba(255, 255, 255, 0.018) 1px,
        transparent 1px
    ), linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.018) 1px,
        transparent 1px
    );
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, black, transparent 80%);
}

a {
    color: var(--cyan);
    text-decoration: none;
}

a:hover {
    color: #b2edff;
}

button,
input,
textarea,
select {
    font: inherit;
}

button,
input,
textarea,
select,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    cursor: pointer;
}

button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

img,
svg {
    max-width: 100%;
}

:focus-visible {
    outline: 3px solid var(--cyan);
    outline-offset: 4px;
}

[hidden] {
    display: none !important;
}

/* Layout */

.container {
    width: min(var(--max-width), calc(100% - 40px));
    margin-inline: auto;
}

.section {
    padding-block: 76px;
}

.section-heading {
    max-width: 680px;
    margin-bottom: 32px;
}

.section-heading h2 {
    margin: 0 0 12px;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.section-heading p {
    color: var(--muted);
    margin: 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cyan);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 22px;
    height: 2px;
    background: var(--cyan);
    box-shadow: 0 0 12px rgba(85, 213, 255, 0.7);
}

/* Header */

.site-header {
    position: relative;
    z-index: 10;
    border-bottom: 1px solid var(--border);
    background: rgba(5, 7, 13, 0.78);
    backdrop-filter: blur(18px);
}

.header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--text);
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: white;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 0 28px rgba(71, 117, 255, 0.3);
}

.brand-mark span {
    font-size: 1.2rem;
    font-weight: 950;
}

.brand small {
    display: block;
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

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

.public-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 22px;
}

.public-nav a {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 650;
}

.public-nav a:hover {
    color: var(--text);
}

/* Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 46px;
    padding: 11px 18px;
    border: 1px solid transparent;
    border-radius: 13px;
    font-weight: 800;
    text-align: center;
    transition: transform 0.2s ease, border-color 0.2s ease,
                background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: white;
    background: linear-gradient(135deg, #4775ff, #3261ed);
    box-shadow: 0 8px 26px rgba(71, 117, 255, 0.24);
}

.btn-primary:hover {
    color: white;
    box-shadow: 0 12px 32px rgba(71, 117, 255, 0.38);
}

.btn-secondary {
    color: var(--text);
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.035);
}

.btn-secondary:hover {
    color: white;
    border-color: rgba(85, 213, 255, 0.5);
    background: rgba(85, 213, 255, 0.06);
}

.btn-full {
    width: 100%;
}

/* Cards */

.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-glass);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.card-pad {
    padding: clamp(22px, 4vw, 34px);
}

.card h2,
.card h3 {
    margin-top: 0;
    letter-spacing: -0.025em;
}

/* Forms */

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

.form-field {
    display: grid;
    gap: 8px;
}

.form-field label {
    color: #e4ebf9;
    font-size: 0.88rem;
    font-weight: 750;
}

.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    color: var(--text);
    background: rgba(4, 8, 16, 0.75);
    border: 1px solid rgba(133, 163, 207, 0.25);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: #78869e;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(85, 213, 255, 0.09);
}

.form-help {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.88rem;
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--muted);
    font-size: 0.88rem;
}

.checkbox-row input {
    margin-top: 5px;
    accent-color: var(--blue);
}

/* Authentication */

.auth-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.85fr);
}

.auth-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    min-height: 100%;
    padding: clamp(30px, 6vw, 80px);
    overflow: hidden;
    border-right: 1px solid var(--border);
    background:
        radial-gradient(circle at 25% 30%, rgba(71, 117, 255, 0.3), transparent 38%),
        radial-gradient(circle at 80% 75%, rgba(85, 213, 255, 0.13), transparent 30%),
        #090e1a;
}

.auth-visual h1 {
    max-width: 620px;
    margin: 25px 0 20px;
    font-size: clamp(2.6rem, 5.5vw, 5rem);
    line-height: 1.02;
    letter-spacing: -0.065em;
}

.gradient-text {
    color: transparent;
    background: linear-gradient(100deg, #86a5ff, #55d5ff);
    background-clip: text;
    -webkit-background-clip: text;
}

.auth-visual p {
    max-width: 510px;
    color: var(--muted);
    font-size: 1.05rem;
}

.auth-points {
    display: grid;
    gap: 14px;
    margin-top: 34px;
}

.auth-point {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #dce7fb;
}

.auth-point-icon {
    display: grid;
    place-items: center;
    width: 35px;
    height: 35px;
    flex: 0 0 35px;
    border: 1px solid rgba(85, 213, 255, 0.25);
    border-radius: 11px;
    color: var(--cyan);
    background: rgba(85, 213, 255, 0.07);
}

.auth-visual-footer {
    color: #78869e;
    font-size: 0.82rem;
}

.auth-main {
    display: grid;
    place-items: center;
    padding: clamp(22px, 5vw, 64px);
}

.auth-panel {
    width: min(100%, 460px);
}

.auth-panel .brand {
    margin-bottom: 35px;
}

.auth-title {
    margin: 0 0 8px;
    font-size: clamp(1.8rem, 4vw, 2.45rem);
    line-height: 1.15;
    letter-spacing: -0.045em;
}

.auth-subtitle {
    margin: 0 0 28px;
    color: var(--muted);
}

.auth-message {
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.auth-message[data-type="success"] {
    border-color: rgba(85, 230, 165, 0.35);
    color: #9af2c9;
    background: rgba(85, 230, 165, 0.07);
}

.auth-message[data-type="error"] {
    border-color: rgba(255, 113, 133, 0.35);
    color: #ffb2be;
    background: rgba(255, 113, 133, 0.07);
}

.auth-bottom {
    margin-top: 25px;
    color: var(--muted);
    font-size: 0.9rem;
    text-align: center;
}

.auth-security-note {
    margin-top: 20px;
    color: #8291a9;
    font-size: 0.78rem;
    text-align: center;
}

/* Dashboard */

.dashboard-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
}

.dashboard-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 25px 17px;
    border-right: 1px solid var(--border);
    background: rgba(5, 8, 15, 0.9);
}

.sidebar-label {
    padding-inline: 12px;
    color: #76849b;
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.sidebar-nav {
    display: grid;
    gap: 6px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 650;
}

.sidebar-nav a:hover,
.sidebar-nav a[aria-current="page"] {
    color: white;
    border-color: rgba(85, 213, 255, 0.16);
    background: rgba(71, 117, 255, 0.12);
}

.sidebar-bottom {
    margin-top: auto;
}

.dashboard-main {
    min-width: 0;
}

.dashboard-topbar {
    min-height: 76px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 16px clamp(20px, 4vw, 42px);
    border-bottom: 1px solid var(--border);
    background: rgba(8, 11, 18, 0.65);
}

.dashboard-topbar h1 {
    margin: 0;
    font-size: 1.2rem;
}

.dashboard-content {
    width: min(1400px, 100%);
    margin-inline: auto;
    padding: clamp(20px, 4vw, 42px);
}

.welcome-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.welcome-row h2 {
    margin: 0 0 7px;
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    letter-spacing: -0.05em;
}

.welcome-row p {
    margin: 0;
    color: var(--muted);
}

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

.stat-card {
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface-glass);
}

.stat-label {
    color: var(--muted);
    font-size: 0.82rem;
}

.stat-value {
    display: block;
    margin-top: 10px;
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 900;
    letter-spacing: -0.05em;
    overflow-wrap: anywhere;
}

.stat-note {
    display: block;
    margin-top: 7px;
    color: #8291a9;
    font-size: 0.76rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
    gap: 20px;
    margin-top: 24px;
}

.panel {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface-glass);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 18px;
}

.panel-header h3 {
    margin: 0;
    font-size: 1rem;
}

.panel-description {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
}

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

.quick-action {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.025);
}

.quick-action:hover {
    color: white;
    border-color: rgba(85, 213, 255, 0.4);
    background: rgba(85, 213, 255, 0.06);
}

.quick-action strong {
    font-size: 0.9rem;
}

.quick-action span {
    color: var(--muted);
    font-size: 0.78rem;
}

.activity-list {
    display: grid;
    gap: 0;
}

.activity-item {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding-block: 15px;
    border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
    border-bottom: 0;
}

.activity-item strong {
    display: block;
    font-size: 0.88rem;
}

.activity-item small {
    color: var(--muted);
}

.empty-state {
    padding: 26px 12px;
    color: var(--muted);
    font-size: 0.9rem;
    text-align: center;
}

/* Footer */

.site-footer {
    padding-block: 30px;
    border-top: 1px solid var(--border);
    color: #8291a9;
    font-size: 0.82rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
}

/* Utilities */

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

.text-center {
    text-align: center;
}

.mt-24 {
    margin-top: 24px;
}

.mb-0 {
    margin-bottom: 0;
}

.divider {
    height: 1px;
    border: 0;
    background: var(--border);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.035);
    font-size: 0.74rem;
    font-weight: 750;
}

.badge-blue {
    color: #b8c9ff;
    border-color: rgba(71, 117, 255, 0.35);
    background: rgba(71, 117, 255, 0.1);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Responsive */

@media (max-width: 1050px) {
    .public-nav {
        gap: 13px;
    }

    .dashboard-layout {
        grid-template-columns: 215px minmax(0, 1fr);
    }

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

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

    .auth-visual {
        min-height: auto;
        padding: 28px 24px;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .auth-visual h1 {
        margin-top: 18px;
        font-size: clamp(2.2rem, 9vw, 3.5rem);
    }

    .auth-visual .auth-points,
    .auth-visual-footer {
        display: none;
    }

    .auth-main {
        padding: 34px 22px 50px;
    }

    .dashboard-layout {
        display: block;
    }

    .dashboard-sidebar {
        position: static;
        height: auto;
        padding: 14px 20px;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .dashboard-sidebar > .brand,
    .dashboard-sidebar > .sidebar-label,
    .dashboard-sidebar > .sidebar-bottom {
        display: none;
    }

    .sidebar-nav {
        display: flex;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 2px;
    }

    .sidebar-nav a {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 9px 12px;
    }

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

@media (max-width: 600px) {
    .container {
        width: min(100% - 28px, var(--max-width));
    }

    .header-inner {
        min-height: 68px;
        gap: 10px;
    }

    .brand {
        font-size: 1.05rem;
    }

    .brand-mark {
        width: 37px;
        height: 37px;
        border-radius: 12px;
    }

    .header-actions {
        gap: 7px;
    }

    .header-actions .btn {
        min-height: 40px;
        padding: 8px 11px;
        font-size: 0.82rem;
    }

    .public-nav {
        display: none;
    }

    .section {
        padding-block: 52px;
    }

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

    .stat-card {
        padding: 15px;
    }

    .dashboard-topbar {
        min-height: 64px;
        padding: 12px 16px;
    }

    .dashboard-content {
        padding: 20px 14px 90px;
    }

    .panel {
        padding: 18px;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .auth-main {
        padding-inline: 18px;
    }

    .form-options {
        align-items: flex-start;
    }

    .footer-inner {
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}