    :root {
        --ease-in-cubic: cubic-bezier(0.55, 0.055, 0.675, 0.19);
        --gap-sm: clamp(0.5rem, 1.2vw, 1rem);
        --gap-md: clamp(0.75rem, 2vw, 1.5rem);
        --gap-lg: clamp(1rem, 3vw, 2.25rem);
        --radius-sm: 6px;
        --radius-md: 10px;
        --header-h: 64px;
        --content-max: 760px;
        --fg: #111;
        --muted: #6b7280;
        --border: #d1d5db;
        --bg: #ffffff;
        --card-bg: #ffffff;
        --chip-bg: #f9fafb;
        --grid-line: rgba(0, 0, 0, 0.05);
        --header-bg: #000;
        --header-fg: #fff;
    }

    [data-theme="dark"] {
        --fg: #f3f4f6;
        --muted: #9ca3af;
        --border: #374151;
        --bg: #0b0c0f;
        --card-bg: #14161a;
        --chip-bg: #1f2228;
        --grid-line: rgba(255, 255, 255, 0.05);
        --header-bg: #14161a;
        --header-fg: #f3f4f6;
    }

    @font-face {
        font-family: "Space Grotesk";
        font-weight: 400 900;
        font-style: normal;
        src: url("/assets/fonts/Space_Grotesk/SpaceGrotesk-VariableFont_wght.ttf") format("truetype-variations");
    }

    *,
    *::before,
    *::after {
        box-sizing: border-box;
    }

    * {
        text-rendering: optimizeLegibility;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        font-family: "Space Grotesk", "Inter", system-ui, -apple-system, sans-serif;

    }

    html,
    body {
        margin: 0;
        padding: 0;
        width: 100%;
        min-height: 100%;
        scroll-behavior: smooth;
    }

    body {
        color: var(--fg);
        background-color: var(--bg);
        background-image:
            linear-gradient(var(--grid-line) 1px, transparent 1px),
            linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
        background-size: 8px 8px;
        align-content: center;
    }

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

    button {
        font: inherit;
        cursor: pointer;
    }

    header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 100;
        height: var(--header-h);
        background-color: var(--header-bg);
        color: var(--header-fg);
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 clamp(0.75rem, 3vw, 2rem);
        gap: var(--gap-sm);
    }

    .header-left {
        display: flex;
        align-items: center;
        gap: 0.6rem;
    }

    .header-right {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .brand {
        font-weight: 700;
        color: var(--header-fg);
    }

    header>nav {
        display: flex;
        gap: 0.5rem;
    }

    header>nav>a {
        color: rgb(185, 185, 185);
        padding: 0.4rem 0.7rem;
        border-radius: var(--radius-sm);
        font-size: 0.9rem;
        transition: color 0.15s ease, background-color 0.15s ease;
    }

    header>nav>a:hover {
        color: white;
        background: rgba(255, 255, 255, 0.08);
    }

    /* Day/night toggle (top-left) */
    .theme-toggle {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: var(--header-fg);
        padding: 0.25rem 0.4rem 0.25rem 0.3rem;
        border-radius: 999px;
        cursor: pointer;
        font-size: 0.8rem;
        transition: background 0.15s ease;
    }

    .theme-toggle:hover {
        background: rgba(255, 255, 255, 0.16);
    }

    .theme-toggle .knob {
        width: 22px;
        height: 22px;
        border-radius: 999px;
        background: #fff;
        color: #111;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 0.85rem;
    }

    [data-theme="dark"] .theme-toggle .knob {
        background: #111;
        color: #fff;
    }

    .logout-btn {
        background: white;
        color: black;
        border: 2px solid black;
        border-radius: var(--radius-sm);
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
        font-weight: 600;
    }

    main {
        padding: calc(var(--header-h) + clamp(1.5rem, 5vw, 3rem)) clamp(1rem, 4vw, 2rem) clamp(2rem, 6vw, 4rem);
        max-width: var(--content-max);
        margin: 0 auto;
        margin: auto;
    }

    .page-header {
        display: flex;
        flex-direction: column;
        gap: 0.4rem;
        margin-bottom: var(--gap-lg);
    }

    .page-header h1 {
        font-size: clamp(1.6rem, 4vw, 2.2rem);
        margin: 0;
    }

    .page-header p {
        margin: 0;
        color: var(--muted);
    }

    /* Tabs */
    .tabs {
        display: flex;
        gap: 0.4rem;
        margin-bottom: var(--gap-md);
        border-bottom: 1px solid var(--border);
        flex-wrap: wrap;
    }

    .tab {
        background: transparent;
        border: none;
        color: var(--muted);
        padding: 0.6rem 0.9rem;
        font-size: 0.95rem;
        font-weight: 600;
        border-bottom: 2px solid transparent;
        margin-bottom: -1px;
    }

    .tab.is-active {
        color: var(--fg);
        border-bottom-color: var(--fg);
    }

    form.upload-form {
        display: grid;
        gap: var(--gap-md);
        background: var(--card-bg);
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        padding: clamp(1rem, 3vw, 1.75rem);
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
    }

    .field {
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
    }

    .field label {
        font-size: 0.85rem;
        font-weight: 600;
    }

    .field .hint {
        font-size: 0.75rem;
        color: var(--muted);
    }

    .field input[type="email"],
    .field input[type="password"],
    .field input[type="text"],
    .field input[type="url"],
    .field input[type="number"],
    .field input[type="datetime-local"],
    .field select,
    .field textarea {
        padding: 0.6rem 0.7rem;
        border-radius: var(--radius-sm);
        border: 1px solid var(--border);
        background: var(--card-bg);
        color: var(--fg);
        font-size: 0.95rem;
        width: 100%;
        font-family: inherit;
    }

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

    .field input[type="file"] {
        padding: 0.4rem 0;
        font-size: 0.9rem;
        color: var(--fg);
    }

    .row-2 {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--gap-md);
    }

    @media (max-width: 600px) {
        .row-2 {
            grid-template-columns: 1fr;
        }
    }

    .checkbox-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 0.4rem;
    }

    .checkbox-grid label {
        display: flex;
        align-items: center;
        gap: 0.4rem;
        font-size: 0.85rem;
        font-weight: 500;
        background: var(--chip-bg);
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        padding: 0.45rem 0.6rem;
        cursor: pointer;
    }

    .actions {
        display: flex;
        gap: 0.5rem;
        justify-content: flex-end;
        flex-wrap: wrap;
    }

    .btn {
        width: 120px;
        border-radius: var(--radius-sm);
        border: 2px solid var(--fg);
        padding: 0.55rem 1rem;
        font-size: 0.95rem;
        font-weight: 600;
        background: var(--card-bg);
        color: var(--fg);
        transition: transform 0.15s ease, filter 0.15s ease;

    }

    .btn:hover {
        filter: invert(1);
        transform: scale(1.03);
    }

    .btn.primary {
        background: var(--fg);
        color: var(--bg);
    }

    .feedback {
        padding: 0.7rem 0.85rem;
        border-radius: var(--radius-sm);
        font-size: 0.9rem;
        display: none;
        margin-bottom: var(--gap-md);
    }

    .feedback.is-visible {
        display: block;
    }

    .feedback.success {
        background: #ecfdf5;
        color: #065f46;
        border: 1px solid #6ee7b7;
    }

    .feedback.error {
        background: #fef2f2;
        color: #991b1b;
        border: 1px solid #fca5a5;
    }

    [data-theme="dark"] .feedback.success {
        background: #052e22;
        color: #a7f3d0;
        border-color: #065f46;
    }

    [data-theme="dark"] .feedback.error {
        background: #3b0d0d;
        color: #fecaca;
        border-color: #7f1d1d;
    }

    .pane {
        display: none;
    }

    .pane.is-active {
        display: block;
    }