/* =========================================================
   RESET
   ========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;

    font-family:
        var(--font-body),
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    line-height: 1.6;

    background: var(--bg);
    color: var(--text);

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    text-rendering: optimizeLegibility;
}

body,
button,
a {
    -webkit-tap-highlight-color: transparent;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

ul,
ol {
    list-style: none;
}


/* =========================================================
   ROOT VARIABLES
   ========================================================= */

:root {

    /* -----------------------------------------------------
       TYPOGRAPHY
       ----------------------------------------------------- */

    --font-body: "Manrope", sans-serif;
    --font-mono: "IBM Plex Mono", monospace;


    /* -----------------------------------------------------
       BRAND
       ----------------------------------------------------- */

    --purple-dark: #2d2753;
    --purple: #6255d9;
    --purple-light: #887cff;
    --purple-bright: #9b8fff;


    /* -----------------------------------------------------
       BACKGROUND
       ----------------------------------------------------- */

    --bg: #0d0b16;
    --bg-soft: #12101d;

    --surface: #18152a;
    --surface-light: #201b36;


    /* -----------------------------------------------------
       TEXT
       ----------------------------------------------------- */

    --text: #f5f3ff;
    --text-soft: #b7b2c8;
    --text-muted: #79738b;


    /* -----------------------------------------------------
       BORDERS
       ----------------------------------------------------- */

    --border: rgba(255, 255, 255, 0.10);
    --border-purple: rgba(136, 124, 255, 0.30);


    /* -----------------------------------------------------
       COMMON
       ----------------------------------------------------- */

    --white: #ffffff;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;

    --max-width: 1440px;

    --transition-fast: 180ms ease;
    --transition: 300ms ease;
}


/* =========================================================
   TYPOGRAPHY
   ========================================================= */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-body);

    font-weight: 700;

    line-height: 1.12;

    letter-spacing: -0.035em;

    color: var(--text);
}

p {
    letter-spacing: -0.005em;
}

code,
pre,
kbd,
samp {
    font-family: var(--font-mono);
}


/* =========================================================
   LIGHT THEME
   ========================================================= */

html[data-theme="light"] body {
    background: #f5f3fa;
    color: #211d2d;
}

html[data-theme="light"] {
    --bg: #f5f3fa;
    --bg-soft: #eeeaf5;

    --surface: #ffffff;
    --surface-light: #f8f6fc;

    --text: #211d2d;
    --text-soft: #5d5868;
    --text-muted: #827c8e;

    --border: rgba(45, 39, 83, 0.12);
    --border-purple: rgba(98, 85, 217, 0.30);
}


/* =========================================================
   GLOBAL TRANSITIONS
   ========================================================= */

a,
button {
    transition:
        background-color var(--transition-fast),
        color var(--transition-fast),
        border-color var(--transition-fast),
        transform var(--transition-fast),
        opacity var(--transition-fast);
}


/* =========================================================
   ADMIN TOPBAR
   ========================================================= */

.admin-topbar {
    position: relative;
    z-index: 100;

    width: 100%;

    background: rgba(45, 39, 83, 0.96);

    border-bottom: 1px solid rgba(255, 255, 255, 0.08);

    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.12);

    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}


.admin-topbar-inner {
    display: flex;
    align-items: center;

    width: 100%;
    max-width: var(--max-width);

    min-height: 64px;

    margin: 0 auto;
    padding: 0 1.5rem;
}


/* =========================================================
   ADMIN BRAND
   ========================================================= */

.admin-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;

    flex-shrink: 0;

    color: #ffffff;

    font-family: var(--font-mono);

    font-size: 0.72rem;
    font-weight: 600;

    letter-spacing: 0.08em;
}

.admin-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 25px;
    height: 25px;

    border: 1px solid rgba(155, 143, 255, 0.5);
    border-radius: 6px;

    background: rgba(136, 124, 255, 0.08);

    color: var(--purple-bright);

    font-size: 1rem;
    font-weight: 500;

    line-height: 1;
}

.admin-brand-name {
    opacity: 0.9;
}


/* =========================================================
   ADMIN NAVIGATION
   ========================================================= */

.admin-navigation {
    display: flex;
    align-items: center;

    gap: 0.2rem;

    margin-left: 3rem;
}

.admin-nav-link {
    position: relative;

    display: inline-flex;
    align-items: center;

    padding: 0.55rem 0.75rem;

    color: rgba(255, 255, 255, 0.62);

    font-family: var(--font-body);

    font-size: 0.74rem;
    font-weight: 600;

    letter-spacing: 0.01em;

    border-radius: 6px;
}

.admin-nav-link:hover {
    color: #ffffff;

    background: rgba(255, 255, 255, 0.055);
}


/* ---------------------------------------------------------
   NAVIGATION UNDERLINE
   --------------------------------------------------------- */

.admin-nav-link::after {
    content: "";

    position: absolute;

    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.25rem;

    height: 1px;

    background: var(--purple-bright);

    transform: scaleX(0);
    transform-origin: center;

    transition:
        transform var(--transition-fast);
}

.admin-nav-link:hover::after {
    transform: scaleX(1);
}


/* =========================================================
   ADMIN NAV ITEM
   ========================================================= */

.admin-nav-admin {
    color: rgba(155, 143, 255, 0.9);
}


/* =========================================================
   REQUEST ACCESS BUTTON
   ========================================================= */

.admin-access-button {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;

    margin-left: auto;

    padding: 0.55rem 0.9rem;

    background: var(--purple);

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 7px;

    color: #ffffff;

    font-family: var(--font-body);

    font-size: 0.72rem;
    font-weight: 700;

    letter-spacing: 0.01em;

    box-shadow:
        0 5px 18px rgba(98, 85, 217, 0.18);
}

.admin-access-button:hover {
    background: var(--purple-light);

    color: #ffffff;

    transform: translateY(-1px);

    box-shadow:
        0 7px 22px rgba(98, 85, 217, 0.28);
}

.admin-access-button span:last-child {
    font-size: 0.95rem;

    line-height: 1;

    transition:
        transform var(--transition-fast);
}

.admin-access-button:hover span:last-child {
    transform: translateX(3px);
}


/* =========================================================
   COMMON ACCESS BUTTON
   ========================================================= */

.btn-request-access {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: var(--purple);
    color: #ffffff;

    padding: 0.75rem 1.25rem;

    border: 1px solid transparent;
    border-radius: var(--radius-sm);

    font-family: var(--font-body);

    font-weight: 700;

    letter-spacing: -0.01em;
}

.btn-request-access:hover {
    background: var(--purple-light);

    color: #ffffff;

    transform: translateY(-2px);
}


/* =========================================================
   FORM ELEMENTS
   ========================================================= */

input,
textarea,
select {
    font-family: var(--font-body);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}


/* =========================================================
   FOCUS
   ========================================================= */

:focus-visible {
    outline: 2px solid var(--purple-light);
    outline-offset: 4px;
}


/* =========================================================
   SELECTION
   ========================================================= */

::selection {
    background: var(--purple);
    color: #ffffff;
}


/* =========================================================
   SCROLLBAR
   ========================================================= */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--purple-dark);

    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--purple);
}


/* =========================================================
   MOBILE NAVIGATION
   ========================================================= */

@media (max-width: 800px) {

    .admin-topbar-inner {
        min-height: 60px;

        padding: 0 1rem;
    }

    .admin-navigation {
        margin-left: 1rem;
    }

    .admin-nav-link {
        padding: 0.5rem 0.55rem;
    }

    /*
       On smaller screens, hide less important
       navigation items to keep the header clean.
    */

    .admin-nav-link:nth-child(2),
    .admin-nav-link:nth-child(4) {
        display: none;
    }

    .admin-access-button span:first-child {
        display: none;
    }

    .admin-access-button {
        padding: 0.55rem 0.7rem;
    }
}


@media (max-width: 500px) {

    .admin-brand-name {
        display: none;
    }

    .admin-navigation {
        margin-left: auto;
    }

    .admin-nav-link {
        font-size: 0.68rem;
    }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .admin-topbar {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}