/* TOKENS */

:root {
    /* surfaces */
    --bg: #0a0d14;
    --bg-alt: #0e121b;
    --surface: #151a24;
    --surface-2: #1a2029;
    --surface-hover: #1e2530;
    --border: #232a38;
    --border-strong: #323b4d;

    /* text */
    --text-primary: #f4f5f7;
    --text-secondary: #a4abbd;
    --text-muted: #6b7386;

    /* gold */
    --gold: #e9b949;
    --gold-light: #f6d988;
    --gold-dark: #b8901f;
    --gold-ink: #1a1406;

    /* status */
    --success: #34d399;
    --success-bg: #103524;
    --success-border: #1e5a3c;
    --danger: #f87171;
    --danger-bg: #35181a;
    --danger-border: #6b2a2e;
    --warning: var(--gold);
    --warning-bg: #302407;
    --warning-border: #5a4415;
    --info: #60a5fa;
    --info-bg: #10203a;
    --info-border: #24406b;

    /* misc */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-card: 0 2px 10px rgba(0, 0, 0, 0.35);
    --shadow-lift: 0 10px 30px rgba(0, 0, 0, 0.45);
    --navbar-height: 60px;
    --font-display: "Sora", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}


/* Reset / base */

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    scrollbar-gutter: stable;

}

body {
    margin: 0;
    font-family: var(--font-body);
    line-height: 1.6;
    background: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
}

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

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

button {
    cursor: pointer;
}

img {
    max-width: 100%;
    height: auto;
}

[x-cloak] {
    display: none !important;
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    color: var(--text-primary);
    line-height: 1.3;
}

h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.4px;
}

h2 {
    font-size: 20px;
    font-weight: 700;
}

h3 {
    font-size: 15px;
    font-weight: 600;
}

p {
    color: var(--text-secondary);
    font-size: 14px;
}

strong {
    color: var(--text-primary);
}

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

::-webkit-scrollbar-track {
    background: var(--bg-alt);
}

::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 20px;
    border: 2px solid var(--bg-alt);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-dark);
}


/* Layout */

.portal-layout {
    min-height: calc(100vh - 60px);
    display: flex;
}

.main-content {
    flex: 1;
    min-width: 0;
    padding: 34px;
    background:
        radial-gradient(1200px 500px at 100% -10%, rgba(233, 185, 73, 0.05), transparent 60%),
        var(--bg);
}


/* Navbar */

.navbar {
    position: sticky;
    top: 0;
    z-index: 900;
    min-height: 60px;
    height: 60px;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
}

/* signature film-leader gold hairline */
.navbar::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold) 35%, var(--gold-light) 50%, var(--gold) 65%, var(--gold-dark));
}

.navbar-brand a {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 16px;
    color: var(--text-primary);
}

.navbar-brand a::before {
    content: "GM";
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: linear-gradient(150deg, var(--gold-light), var(--gold) 55%, var(--gold-dark));
    color: var(--gold-ink);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: -0.5px;
    box-shadow: 0 4px 14px rgba(233, 185, 73, 0.25);
}

.navbar-actions {
    position: relative;
}


/* Sidebar */

.sidebar {
    position: sticky;
    top: 60px;
    align-self: flex-start;
    width: 268px;
    height: calc(100vh - 60px);
    overflow-y: auto;
    flex-shrink: 0;
    padding: 22px 14px;
    background: var(--bg-alt);
    border-right: 1px solid var(--border);
}

.sidebar-navigation {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-navigation a {
    display: block;
    min-height: 44px;
    padding: 10px 12px 10px 15px;
    border-radius: var(--radius-sm);
    border-left: 3px solid transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}


/* Page */

.page-header {
    margin-bottom: 28px;
}

.page-header h1 {
    margin-top: 0;
    margin-bottom: 8px;
}

.page-header p {
    max-width: 680px;
    margin: 0;
    line-height: 1.7;
}


/* Cards */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    margin-bottom: 20px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.card-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
}

.card-header h2 {
    margin: 0;
    font-size: 18px;
}

.card-body {
    padding: 22px;
}


/* Dashboard */

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


/* Buttons */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: transparent;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease,
                border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.button-primary {
    border-color: transparent;
    background: linear-gradient(150deg, var(--gold-light), var(--gold) 60%);
    color: var(--gold-ink);
}

.button-full {
    width: 100%;
}


/* Forms */

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
}

.form-group input,
.form-group textarea,
.form-group select,
.auth-card input,
.auth-card textarea,
.auth-card select {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder,
.auth-card input::placeholder,
.auth-card textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.auth-card input:focus,
.auth-card textarea:focus,
.auth-card select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(233, 185, 73, 0.16);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.field-error {
    margin: 5px 0 0;
    color: var(--danger);
    font-size: 12px;
}

.form-errors {
    padding: 13px 16px;
    margin-bottom: 18px;
    border: 1px solid var(--danger-border);
    border-radius: var(--radius-sm);
    background: var(--danger-bg);
    color: var(--danger);
    font-size: 13px;
}


/* Authentication */

.auth-page {
    min-height: 70vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 16px;
}

.auth-card {
    width: 100%;
    max-width: 480px;
    padding: 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lift);
}

.auth-card h1 {
    margin-top: 0;
}

.auth-header {
    margin-bottom: 24px;
}

.auth-links {
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 13px;
}

.auth-links a {
    color: var(--gold-light);
    font-weight: 600;
}


/* Messages */

.messages {
    margin-bottom: 24px;
}

.message {
    padding: 13px 16px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
}


/* User menu */

.user-menu-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.user-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 210px;
    padding: 8px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lift);
    z-index: 100;
}

.user-menu a,
.user-menu button {
    display: block;
    width: 100%;
    padding: 10px 12px;
    text-align: left;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    transition: background 0.18s ease, color 0.18s ease;
}

.user-menu form {
    margin: 0;
}


/* Empty state */

.empty-state {
    padding: 48px 24px;
    text-align: center;
    background: var(--surface);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
}

.empty-state h2,
.empty-state h3 {
    margin-top: 0;
}


/* Pagination */

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 13px;
}


/* Loading */

.loading {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
}


/* Error pages */

.error-page {
    max-width: 700px;
    margin: 80px auto;
    padding: 40px 30px;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lift);
}

.error-page h1 {
    font-size: 4rem;
    margin: 0;
    background: linear-gradient(150deg, var(--gold-light), var(--gold-dark));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}


/* Tablet */

@media (max-width: 1100px) {

    .sidebar {
        width: 230px;
    }

    .main-content {
        padding: 28px;
    }

}


/* Mobile */

@media (max-width: 768px) {

    .portal-layout {
        display: block;
    }

    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        padding: 12px 14px;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .sidebar-navigation {
        flex-direction: row;
        gap: 6px;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .sidebar-navigation a {
        flex-shrink: 0;
        white-space: nowrap;
        min-height: 40px;
        padding: 8px 14px;
        border-left: 0;
        border-bottom: 2px solid transparent;
    }

    .main-content {
        padding: 22px 16px;
    }

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

    .navbar {
        padding: 0 16px;
    }

    .auth-card {
        padding: 22px 18px;
        border-radius: var(--radius-md);
    }

    .pagination {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    h1 {
        font-size: 24px;
    }

    .button {
        min-height: 44px;
    }

}





@media (max-width: 380px) {

    .main-content {
        padding: 18px 12px;
    }

    h1 {
        font-size: 21px;
    }

}