@import url("https://fonts.googleapis.com/css2?family=Reddit+Mono:wght@200..900&display=swap");

:root {
    --background: oklch(0.9578 0.0058 264.5321);
    --foreground: oklch(0.4355 0.043 279.325);
    --card: oklch(1 0 0);
    --card-foreground: oklch(0.4355 0.043 279.325);
    --popover: oklch(0.8575 0.0145 268.4756);
    --popover-foreground: oklch(0.4355 0.043 279.325);
    --primary: oklch(0.5547 0.2503 297.0156);
    --primary-foreground: oklch(1 0 0);
    --secondary: oklch(0.8575 0.0145 268.4756);
    --secondary-foreground: oklch(0.4355 0.043 279.325);
    --muted: oklch(0.906 0.0117 264.5071);
    --muted-foreground: oklch(0.5471 0.0343 279.0837);
    --accent: oklch(0.682 0.1448 235.3822);
    --accent-foreground: oklch(1 0 0);
    --destructive: oklch(0.5505 0.2155 19.8095);
    --destructive-foreground: oklch(1 0 0);
    --border: oklch(0.8083 0.0174 271.1982);
    --input: oklch(0.8575 0.0145 268.4756);
    --ring: oklch(0.5547 0.2503 297.0156);
    --chart-1: oklch(0.5547 0.2503 297.0156);
    --chart-2: oklch(0.682 0.1448 235.3822);
    --chart-3: oklch(0.625 0.1772 140.4448);
    --chart-4: oklch(0.692 0.2041 42.4293);
    --chart-5: oklch(0.7141 0.1045 33.0967);
    --sidebar: oklch(0.9335 0.0087 264.5206);
    --sidebar-foreground: oklch(0.4355 0.043 279.325);
    --sidebar-primary: oklch(0.5547 0.2503 297.0156);
    --sidebar-primary-foreground: oklch(1 0 0);
    --sidebar-accent: oklch(0.682 0.1448 235.3822);
    --sidebar-accent-foreground: oklch(1 0 0);
    --sidebar-border: oklch(0.8083 0.0174 271.1982);
    --sidebar-ring: oklch(0.5547 0.2503 297.0156);
    --font-sans: Montserrat, sans-serif;
    --font-serif: Georgia, serif;
    --font-mono: Fira Code, monospace;
    --radius: 0.35rem;
    --shadow-x: 0px;
    --shadow-y: 4px;
    --shadow-blur: 6px;
    --shadow-spread: 0px;
    --shadow-opacity: 0.12;
    --shadow-color: hsl(240 30% 25%);
    --shadow-2xs: 0px 4px 6px 0px hsl(240 30% 25% / 0.06);
    --shadow-xs: 0px 4px 6px 0px hsl(240 30% 25% / 0.06);
    --shadow-sm:
        0px 4px 6px 0px hsl(240 30% 25% / 0.12),
        0px 1px 2px -1px hsl(240 30% 25% / 0.12);
    --shadow:
        0px 4px 6px 0px hsl(240 30% 25% / 0.12),
        0px 1px 2px -1px hsl(240 30% 25% / 0.12);
    --shadow-md:
        0px 4px 6px 0px hsl(240 30% 25% / 0.12),
        0px 2px 4px -1px hsl(240 30% 25% / 0.12);
    --shadow-lg:
        0px 4px 6px 0px hsl(240 30% 25% / 0.12),
        0px 4px 6px -1px hsl(240 30% 25% / 0.12);
    --shadow-xl:
        0px 4px 6px 0px hsl(240 30% 25% / 0.12),
        0px 8px 10px -1px hsl(240 30% 25% / 0.12);
    --shadow-2xl: 0px 4px 6px 0px hsl(240 30% 25% / 0.3);
    --tracking-normal: 0em;
    --spacing: 0.25rem;
}

.dark {
    --background: oklch(0.2155 0.0254 284.0647);
    --foreground: oklch(0.8787 0.0426 272.2767);
    --card: oklch(0.2429 0.0304 283.911);
    --card-foreground: oklch(0.8787 0.0426 272.2767);
    --popover: oklch(0.4037 0.032 280.152);
    --popover-foreground: oklch(0.8787 0.0426 272.2767);
    --primary: oklch(0.7871 0.1187 304.7693);
    --primary-foreground: oklch(0.2429 0.0304 283.911);
    --secondary: oklch(0.4765 0.034 278.643);
    --secondary-foreground: oklch(0.8787 0.0426 272.2767);
    --muted: oklch(0.2973 0.0294 276.2144);
    --muted-foreground: oklch(0.751 0.0396 273.932);
    --accent: oklch(0.8467 0.0833 210.2545);
    --accent-foreground: oklch(0.2429 0.0304 283.911);
    --destructive: oklch(0.7556 0.1297 2.7642);
    --destructive-foreground: oklch(0.2429 0.0304 283.911);
    --border: oklch(0.324 0.0319 281.9784);
    --input: oklch(0.324 0.0319 281.9784);
    --ring: oklch(0.7871 0.1187 304.7693);
    --chart-1: oklch(0.7871 0.1187 304.7693);
    --chart-2: oklch(0.8467 0.0833 210.2545);
    --chart-3: oklch(0.8577 0.1092 142.7153);
    --chart-4: oklch(0.8237 0.1015 52.6294);
    --chart-5: oklch(0.9226 0.0238 30.4919);
    --sidebar: oklch(0.1828 0.0204 284.2039);
    --sidebar-foreground: oklch(0.8787 0.0426 272.2767);
    --sidebar-primary: oklch(0.7871 0.1187 304.7693);
    --sidebar-primary-foreground: oklch(0.2429 0.0304 283.911);
    --sidebar-accent: oklch(0.8467 0.0833 210.2545);
    --sidebar-accent-foreground: oklch(0.2429 0.0304 283.911);
    --sidebar-border: oklch(0.4037 0.032 280.152);
    --sidebar-ring: oklch(0.7871 0.1187 304.7693);
    --font-sans: Montserrat, sans-serif;
    --font-serif: Georgia, serif;
    --font-mono: Fira Code, monospace;
    --radius: 0.35rem;
    --shadow-x: 0px;
    --shadow-y: 4px;
    --shadow-blur: 6px;
    --shadow-spread: 0px;
    --shadow-opacity: 0.12;
    --shadow-color: hsl(240 30% 25%);
    --shadow-2xs: 0px 4px 6px 0px hsl(240 30% 25% / 0.06);
    --shadow-xs: 0px 4px 6px 0px hsl(240 30% 25% / 0.06);
    --shadow-sm:
        0px 4px 6px 0px hsl(240 30% 25% / 0.12),
        0px 1px 2px -1px hsl(240 30% 25% / 0.12);
    --shadow:
        0px 4px 6px 0px hsl(240 30% 25% / 0.12),
        0px 1px 2px -1px hsl(240 30% 25% / 0.12);
    --shadow-md:
        0px 4px 6px 0px hsl(240 30% 25% / 0.12),
        0px 2px 4px -1px hsl(240 30% 25% / 0.12);
    --shadow-lg:
        0px 4px 6px 0px hsl(240 30% 25% / 0.12),
        0px 4px 6px -1px hsl(240 30% 25% / 0.12);
    --shadow-xl:
        0px 4px 6px 0px hsl(240 30% 25% / 0.12),
        0px 8px 10px -1px hsl(240 30% 25% / 0.12);
    --shadow-2xl: 0px 4px 6px 0px hsl(240 30% 25% / 0.3);
}

@theme inline {
    --color-background: var(--background);
    --color-foreground: var(--foreground);
    --color-card: var(--card);
    --color-card-foreground: var(--card-foreground);
    --color-popover: var(--popover);
    --color-popover-foreground: var(--popover-foreground);
    --color-primary: var(--primary);
    --color-primary-foreground: var(--primary-foreground);
    --color-secondary: var(--secondary);
    --color-secondary-foreground: var(--secondary-foreground);
    --color-muted: var(--muted);
    --color-muted-foreground: var(--muted-foreground);
    --color-accent: var(--accent);
    --color-accent-foreground: var(--accent-foreground);
    --color-destructive: var(--destructive);
    --color-destructive-foreground: var(--destructive-foreground);
    --color-border: var(--border);
    --color-input: var(--input);
    --color-ring: var(--ring);
    --color-chart-1: var(--chart-1);
    --color-chart-2: var(--chart-2);
    --color-chart-3: var(--chart-3);
    --color-chart-4: var(--chart-4);
    --color-chart-5: var(--chart-5);
    --color-sidebar: var(--sidebar);
    --color-sidebar-foreground: var(--sidebar-foreground);
    --color-sidebar-primary: var(--sidebar-primary);
    --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
    --color-sidebar-accent: var(--sidebar-accent);
    --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
    --color-sidebar-border: var(--sidebar-border);
    --color-sidebar-ring: var(--sidebar-ring);

    --font-sans: var(--font-sans);
    --font-mono: var(--font-mono);
    --font-serif: var(--font-serif);

    --radius-sm: calc(var(--radius) - 4px);
    --radius-md: calc(var(--radius) - 2px);
    --radius-lg: var(--radius);
    --radius-xl: calc(var(--radius) + 4px);

    --shadow-2xs: var(--shadow-2xs);
    --shadow-xs: var(--shadow-xs);
    --shadow-sm: var(--shadow-sm);
    --shadow: var(--shadow);
    --shadow-md: var(--shadow-md);
    --shadow-lg: var(--shadow-lg);
    --shadow-xl: var(--shadow-xl);
    --shadow-2xl: var(--shadow-2xl);
}

body {
    color-scheme: light dark;
}
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
    margin: 0;
    padding: 0;
}
::-webkit-scrollbar {
    width: 5px;
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}
::-webkit-scrollbar-track {
    background: 0 0;
}
body {
    background-color: var(--background);
    color: var(--foreground);
    padding: 0.5rem;
    font-family: "Reddit Mono", monaco, sans-serif;
    line-height: 1.4;
}
* {
    font-family: "Reddit Mono", monaco, sans-serif;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    margin-bottom: 0.5em;
    font-weight: 700;
}
h1 {
    letter-spacing: -0.025em;
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 2.25rem;
}
h2 {
    letter-spacing: -0.025em;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.75rem;
}
h3 {
    letter-spacing: -0.025em;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.75rem;
}
h4 {
    letter-spacing: -0.025em;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.75rem;
}
h5 {
    font-size: 15px;
}
h6 {
    font-size: 14px;
}
p {
    margin: 1em 0;
}
a {
    color: var(--primary);
    text-decoration: none;
}
a:hover {
    text-decoration: none;
}
ul,
ol {
    margin-bottom: 1em;
    padding-left: 1.5em;
}
header {
}
header h1 {
    font-size: 2rem;
}
nav ul {
    gap: 1rem;
    padding: 0;
    list-style: none;
    display: flex;
}
section {
    margin-bottom: 2rem;
}
form {
    flex-direction: column;
    gap: 1rem;
    display: flex;
}
input,
input[type="password"],
input[type="text"],
input[type="date"],
input[type="color"],
input[type="time"],
input[type="file"],
input[type="search"],
input[type="email"],
select,
textarea {
    font-weight: 500;
    font: inherit;
    border-width: 1px;
    border-color: var(--border);
    border-radius: var(--radius);
    background-color: var(--background);
    color: var(--foreground);
    padding: 0.5rem;
    font-size: 0.875rem;
}
input[type="color"] {
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    padding: initial;
    max-width: initial;
    border-radius: var(--radius);
    border: none;
    outline: none;
}
input[type="color"]::-webkit-color-swatch {
    border-radius: var(--radius);
    border: none;
}
input[type="color"]::-moz-color-swatch {
    border-radius: var(--radius);
    border: none;
}
input[type="reset"],
input[type="submit"],
input[type="button"],
button {
    font: inherit;
    cursor: pointer;
    border-radius: var(--radius);
    justify-content: center;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.2s ease-in-out;
    display: flex;
    gap: 12px;
}
/* Default button styles */
button:not(.btn-secondary):not(.btn-outline):not(.btn-ghost):not(
        .btn-destructive
    ):not([secondary]):not([outline]):not([ghost]):not([destructive]) {
    background-color: var(--primary);
    color: var(--primary-foreground);
    border: none;
}

button:not(.btn-secondary):not(.btn-outline):not(.btn-ghost):not(
        .btn-destructive
    ):not([secondary]):not([outline]):not([ghost]):not([destructive]):hover {
    background-color: color-mix(in srgb, var(--primary) 90%, transparent);
}

/* Secondary button styles */
button[secondary],
button.btn-secondary {
    background-color: var(--secondary);
    color: var(--secondary-foreground);
}

button[secondary]:hover,
button.btn-secondary:hover {
    background-color: color-mix(in srgb, var(--secondary) 90%, transparent);
}

/* Outline button styles */
button[outline],
button.btn-outline,
input[type="submit"] {
    border: var(--border);
    color: var(--foreground);
    background-color: transparent;
}

button[outline]:hover,
button.btn-outline:hover,
input[type="submit"]:hover {
    background-color: color-mix(in srgb, var(--muted) 90%, transparent);
}

/* Ghost button styles */
button[ghost],
button.btn-ghost,
input[type="button"] {
    color: var(--foreground);
    background-color: transparent;
    border: none;
}

button[ghost]:hover,
button.btn-ghost:hover,
input[type="button"]:hover {
    background-color: var(--muted);
}
button[destructive],
input[type="reset"] {
    background-color: var(--destructive);
    color: var(--primary-foreground);
    border: none;
    &:hover {
        background-color: color-mix(
            in srgb,
            var(--destructive) 90%,
            transparent
        );
    }
}
fieldset {
    border: var(--border);
    border-radius: var(--radius);
    gap: 0.5rem;
    padding: 1rem;
    display: flex;
}
fieldset[role="group"] {
    border: none;
    gap: 0;
    padding: 1rem;
    display: flex;
    & > * {
        border-radius: 0;
        &:first-child {
            border-top-left-radius: var(--radius);
            border-bottom-left-radius: var(--radius);
            border-right: 0;
        }
        &:last-child {
            border-top-right-radius: var(--radius);
            border-bottom-right-radius: var(--radius);
            border-right: var(--border);
        }
    }
}
fieldset[role="otp"] {
    border: none;
    gap: 0;
    padding: 1rem;
    display: flex;
    & > input {
        text-align: center;
        border-right: 0;
        border-radius: 0;
        width: 1rem;
        &:first-child {
            border-top-left-radius: var(--radius);
            border-bottom-left-radius: var(--radius);
            border-right: 0;
        }
        &:last-child {
            border-top-right-radius: var(--radius);
            border-bottom-right-radius: var(--radius);
            border-right: var(--border);
        }
    }
}
legend {
    padding: 0 0.5rem;
}
label {
    display: block;
    & * {
        vertical-align: middle;
    }
}
small {
    color: var(--muted-foreground);
}
figure {
    margin-bottom: 1rem;
    overflow: hidden;
}
img {
    border-radius: var(--radius);
    max-width: 100%;
    height: auto;
}
img[avatar] {
    border-radius: 50%;
}
figcaption {
    color: var(--muted-foreground);
    margin-top: 0.5rem;
    font-size: 0.875rem;
}
blockquote {
    border-left: 4px solid var(--border-color);
    padding-left: 1rem;
    font-style: italic;
    & > footer {
        text-align: center;
    }
}
[type="checkbox"],
[type="radio"] {
    margin-right: 0.5rem;
}
progress {
    width: 100%;
}
dialog {
    background-color: var(--background);
    color: var(--foreground);
    border: var(--border);
    border-radius: var(--radius);
    margin: auto;
    padding: 24px;
}
dialog::backdrop {
    background-color: #000c;
}
details {
    border: var(--border);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    padding: 0.5rem;
    & > :not(summary) {
        opacity: 0;
        transition:
            opacity 0.3s,
            transform 0.3s;
        transform: translateY(-0.5em);
    }
    &[open] > :not(summary) {
        opacity: 1;
        transform: translateY(0);
    }
}
summary {
    cursor: pointer;
    font-weight: 700;
}
article {
    border: var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
    padding: 1rem;
}
footer {
    color: var(--muted-foreground);
    margin-top: 2rem;
}
[aria-busy="true"] {
    opacity: 0.7;
    cursor: progress;
}
[aria-busy="spinner"] {
    opacity: 0.7;
    cursor: progress;
    &:before {
        content: var(--loading-icon-url);
        padding-right: 1rem;
    }
}
@media (width<=600px) {
    body {
        padding: 0.5rem;
    }
    nav ul {
        flex-direction: column;
    }
}
input[type="file"]::file-selector-button {
    background-color: var(--background);
    color: var(--foreground);
    border: none;
    font-weight: 600;
}
:disabled {
    cursor: not-allowed;
}
input[type="radio"],
input[type="checkbox"],
input[type="range"] {
    accent-color: var(--primary);
    background-color: var(--background);
}
input[type="checkbox"][icon] {
    display: none;
    & + * {
        cursor: pointer;
        border-radius: var(--radius);
        box-sizing: border-box;
        padding: 0.5rem;
        &:hover {
            background-color: var(--border-color);
        }
    }
}
input[type="checkbox"][icon] {
    display: none;
    & + * {
        cursor: pointer;
        border-radius: var(--radius);
        width: 2rem;
        height: 2rem;
        padding: 0.5rem;
        &:hover {
            background-color: var(--border-color);
            stroke: var(--muted-foreground);
        }
    }
}
input[type="checkbox"][icon]:checked {
    & + * {
        background-color: var(--border-color);
        &:hover {
            stroke: var(--accent-foreground);
        }
    }
}
kbd {
    background-color: var(--primary);
    color: var(--primary-foreground);
    border-radius: 6px;
    padding: 0.125rem 0.625rem;
    font-weight: 700;
}
kbd[secondary] {
    background-color: var(--secondary);
    color: var(--secondary-foreground);
}
kbd[outline] {
    background-color: var(--background);
    color: var(--primary);
    border: var(--border);
}
kbd[destructive] {
    background-color: var(--destructive);
    color: var(--primary-foreground);
}
table {
    caption-side: bottom;
    border-collapse: collapse;
    & caption {
        color: var(--muted-foreground);
        margin-top: 1rem;
    }
    & th {
        color: var(--muted-foreground);
    }
    & tr {
        border-bottom: var(--border);
    }
    & tr:hover {
        background-color: hsl(var(--muted) / 0.5);
    }
    & td,
    & th {
        vertical-align: middle;
        text-align: start;
        padding: 0.5rem;
    }
    & tfoot {
        background-color: var(--muted);
    }
}
dialog[drawer] {
    resize: vertical;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
    max-height: 50vh;
    top: auto;
    bottom: 0;
    &[open] {
        animation: 0.2s ease-in forwards slideup;
    }
}
dialog > header {
    margin: 0;
}
dialog[sheet-top],
dialog[sheet-bottom],
dialog[sheet-left],
dialog[sheet-right] {
    border-radius: 0;
    margin: 0;
}
dialog[sheet-top],
dialog[sheet-bottom] {
    width: 100vw;
    max-height: 50vh;
}
dialog[sheet-left],
dialog[sheet-right] {
    max-width: 50vw;
    height: 100vh;
}
dialog[sheet-top][open] {
    animation: 0.2s ease-in forwards slidedown;
}
dialog[sheet-bottom][open] {
    animation: 0.2s ease-in forwards slideup;
    top: auto;
    bottom: 0;
}
dialog[sheet-left][open] {
    animation: 0.2s ease-in forwards slideright;
}
dialog[sheet-right][open] {
    animation: 0.2s ease-in forwards slideleft;
    left: auto;
    right: 0;
}
@keyframes slideup {
    0% {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}
@keyframes slidedown {
    0% {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}
@keyframes slideleft {
    0% {
        transform: translate(100%);
    }
    to {
        transform: translate(0);
    }
}
@keyframes slideright {
    0% {
        transform: translate(-100%);
    }
    to {
        transform: translate(0);
    }
}
progress {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: var(--muted);
    border: 0;
    border-radius: 9999px;
    height: 0.5rem;
}
progress[value]::-webkit-progress-value {
    background-color: var(--primary);
    border-radius: 9999px;
}
::-webkit-progress-bar {
    background-color: var(--muted);
    border-radius: 9999px;
}
::-moz-progress-bar {
    background-color: var(--primary);
    border-radius: 9999px;
}
progress:indeterminate {
    background: var(--muted)
        linear-gradient(to right, var(--primary) 35%, var(--muted) 35%) top
        left/150% 150% no-repeat;
    animation: 1.5s linear infinite progress-indeterminate;
}
progress:indeterminate::-webkit-progress-bar {
    background-color: #0000;
}
progress:indeterminate::-moz-progress-bar {
    background-color: #0000;
}
@keyframes progress-indeterminate {
    0% {
        background-position: 200% 0;
    }
    to {
        background-position: -200% 0;
    }
}
hr[role="separator"] {
    background-color: var(--border-color);
    border: 0;
    flex-shrink: 0;
    height: 1px;
    margin: 1rem 0;
}
hr[role="separator"][vertical] {
    width: 1px;
    height: auto;
    margin: 0 1rem;
}
nav[breadcrumb] {
    --separator: attr(breadcrumb, ">");
    align-items: center;
    display: flex;
    & > a {
        color: var(--muted-foreground);
        padding: 0 0.625rem 0 0;
        &:after {
            content: var(--separator);
            padding: 0 0 0 0.625rem;
            display: inline-block;
        }
        &:last-child {
            color: var(--foreground);
            &:after {
                content: "";
            }
        }
        &:hover {
            color: var(--foreground);
            text-decoration: none;
            &:after {
                color: var(--muted-foreground);
            }
        }
    }
}
div[skeleton] {
    background-color: var(--input);
    border-radius: var(--radius);
    opacity: 1;
    animation: 2s cubic-bezier(0.4, 0, 0.6, 1) infinite shimmer;
    & * {
        display: none;
    }
}
@keyframes shimmer {
    50% {
        opacity: 0.5;
    }
}
[popover] {
    inset: unset;
    bottom: calc(anchor(top) + 5px);
    justify-self: anchor-center;
    border: var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 0;
    padding: 0.5rem;
    position: absolute;
}
[role="tooltip"] {
    position: relative;
    &:after {
        white-space: nowrap;
        background-color: var(--primary);
        color: var(--primary-foreground);
        border-radius: var(--radius);
        opacity: 0;
        z-index: 10;
        pointer-events: none;
        padding: 6px 8px;
        font-size: 0.875em;
        transition: opacity 0.2s ease-in-out;
        position: absolute;
    }
    &:hover:after {
        opacity: 1;
    }
    &[tooltip-top]:after {
        content: attr(tooltip-top);
        top: -0.8rem;
        left: 50%;
        transform: translate(-50%) translateY(-100%);
    }
    &[tooltip-bottom]:after {
        content: attr(tooltip-bottom);
        top: calc(100% + 0.8rem);
        left: 50%;
        transform: translate(-50%) translateY(0%);
    }
    &[tooltip-left]:after {
        content: attr(tooltip-left);
        top: 50%;
        left: -0.3rem;
        transform: translate(-100%) translateY(-50%);
    }
    &[tooltip-right]:after {
        content: attr(tooltip-right);
        margin-left: 0.3rem;
        top: 50%;
        left: calc(100% + 0.3rem);
        transform: translate(0%) translateY(-50%);
    }
}
pre {
    border-radius: var(--radius);
    & > code {
        display: block;
        overflow-x: auto;
    }
}
code {
    border: var(--border);
    border-radius: var(--radius);
    background-color: var(--primary);
    color: var(--primary-foreground);
    padding: 0.2rem;
}
dialog[sonner],
dialog[toast] {
    padding: 1rem 1.5rem 1rem 1rem;
    inset: auto 1rem 1rem auto;
    &::backdrop {
        opacity: 0;
    }
}
dialog[toast] {
    box-shadow: var(--shadow);
    &[open] {
        animation:
            0.2s ease-in forwards slideup,
            0.2s ease-in forwards fad-in;
    }
}
dialog[sonner] {
    background-color: #0000;
    border: none;
    flex-direction: column-reverse;
    gap: 0.5rem;
    transition: gap 0.15s ease-in;
    display: flex;
    & > li {
        background-color: var(--background);
        counter-increment: sonner-counter;
        border: var(--border);
        border-radius: var(--radius);
        padding: 1rem 1.5rem 1rem 1rem;
        list-style: none;
        animation:
            0.2s ease-in forwards slideup,
            0.2s ease-in forwards fad-in;
        &:hover {
            scale: 1.1;
        }
    }
}
@keyframes fad-in {
    0% {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
aside[role="navigation"] {
    background-color: var(--sidebar);
    border: 1px solid var(--sidebar-border);
    flex-direction: column;
    justify-content: space-between;
    padding: 0.5rem;
    transition: width 0.2s;
    display: flex;
    position: relative;
    overflow: hidden;
    & > main {
        flex-direction: column;
        flex-grow: 1;
        display: flex;
        overflow-y: auto;
    }
    & > header,
    & > footer {
        position: sticky;
    }
}
menu {
    border: var(--border);
    border-radius: var(--radius);
    flex-direction: row;
    width: fit-content;
    display: flex;
    & > li {
        padding: 0.25rem 0.75rem;
        list-style: none;
    }
}
[scroll-x] {
    overflow-x: scroll;
}
[scroll-y] {
    overflow-y: scroll;
}
input[type="checkbox"][role="switch"] {
    -webkit-appearance: none;
    appearance: none;
    background-color: var(--muted);
    cursor: pointer;
    border-radius: 9999px;
    width: 2.8rem;
    height: 1.5rem;
    transition: background-color 0.2s;
    position: relative;
    &:checked {
        background-color: var(--primary);
    }
    &:before {
        content: "";
        background-color: var(--background);
        border-radius: 9999px;
        width: 1.125rem;
        height: 1.125rem;
        transition: transform 0.2s;
        position: absolute;
        top: 0.125rem;
        left: 0.125rem;
        box-shadow: 0 0.0625rem 0.125rem #0003;
    }
    &:checked:before {
        transform: translate(1.25rem);
    }
}

/* App-specific styles */
.app-container {
    max-width: 100%;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 1rem);
    gap: 0.5rem;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--foreground);
    font-weight: 200;
}

.header-brand h1 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--foreground);
}

.new-session-btn {
    margin-left: 1.5rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--background);
    color: var(--muted-foreground);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s;
}

.new-session-btn:hover {
    background: var(--secondary);
    color: var(--foreground);
    border-color: var(--primary);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.upload-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.file-status {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8rem;
}

/* Icons */
.icon {
    width: 1.25rem;
    height: 1.25rem;
}

.icon-sm {
    width: 1rem;
    height: 1rem;
}

.icon-large {
    width: 4rem;
    height: 4rem;
    stroke-width: 1.5;
    color: var(--primary);
}

.icon-xlarge {
    width: 6rem;
    height: 6rem;
    stroke-width: 1;
    opacity: 0.8;
}

.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.flex {
    display: flex;
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.flexy {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-around;
}

.gap-5 {
    gap: 0.5rem;
}

/* Tabs */
.tabs-container {
    background: transparent;
    padding: 0;
    display: flex;
    justify-content: space-between;
}

.tabs-menu {
    display: flex;
    gap: 0;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    overflow-x: auto;
}

.tab-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 5px 8px;
    background: rgba(255, 255, 255, 0.02);
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    min-width: 80px;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.tab-item:hover {
    color: var(--foreground);
    background: rgba(255, 255, 255, 0.1);
}

.tab-item.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
}

.tab-name {
    flex: 1;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tab-close {
    padding: 0.125rem;
    border-radius: var(--radius-sm);
    opacity: 0.5;
    transition: opacity 0.15s;
    background: transparent;
    border: none;
    color: var(--muted-foreground);
}

.tab-close:hover {
    opacity: 1;
    background: var(--muted);
}

/* Main content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow: hidden;
}

/* Query Section */
.query-section {
    background: transparent;
    margin: 0;
}

.query-input-group {
    display: flex;
    align-items: stretch;
    padding: 0;
    border: none;
}

.query-input {
    flex: 1;
    font-size: 0.825rem;
    line-height: 1.4;
    background: var(--muted);
    border: 1px solid var(--border);
    transition:
        border-color 0.15s,
        background-color 0.15s;
    padding: 0.5rem;
    resize: none;
    border-radius-top-right: 0;
    border-radius-bottom-right: 0;
}

.query-input:focus {
    background: var(--background);
    border-color: var(--primary);
    outline: none;
}

.btn-execute {
    position: absolute;
    right: 20px;
    margin-top: 14px;
    border-radius: 44px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    white-space: nowrap;
    font-size: 0.875rem;
}
.btn-execute:disabled {
    opacity: 0.1;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: var(--primary);
    color: var(--primary-foreground);
    padding: 0.5rem 1rem;
}

.btn-plain {
    background: transparent;
}

/* Data Section */
.data-section {
    flex: 1;
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    background: transparent;
    padding: 2px 5px;
    font-size: 12px;
}

.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--border);
    background: var(--muted);
    font-size: 0.875rem;
}

.table-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.375rem;
    height: 44px;
}

.table-nav {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.view-toggle button {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0;
    border: none;
}

.pagination button {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

.page-info {
    padding: 0.25rem 0.5rem;
    min-width: 60px;
    text-align: center;
    font-size: 0.8rem;
}

/* Data display */
.data-display {
    flex: 1;
    overflow: hidden;
}

/* Table */
.table-container {
    height: 100%;
    border: 1px solid var(--border);
    overflow: hidden;
    background: var(--background);
}

.virtual-table {
    background: var(--background);
}

:root {
    --row-alt-bg: rgba(0, 0, 0, 0.015);
}

.dark {
    --row-alt-bg: rgba(255, 255, 255, 0.015);
}

/* Loading state */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 0.75rem;
}

/* Empty state */
.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 2rem;
}

.drop-zone {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.drop-zone figcaption {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

/* Drop overlay */
.drop-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 2rem;
}

.drop-overlay-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 3rem;
    background: var(--card);
    border-radius: var(--radius-xl);
    border: 2px dashed var(--primary);
}

.drop-overlay-content h2 {
    margin: 0;
    color: var(--primary);
}

/* Theme toggle */
.theme-toggle {
    padding: 0.375rem;
    border-radius: var(--radius);
    color: var(--foreground);
    background-color: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease-in-out;
}

.theme-toggle:hover {
    background-color: var(--muted);
}

/* Responsive */
@media (max-width: 768px) {
    .app-header {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.5rem;
    }

    .header-controls {
        width: 100%;
        justify-content: space-between;
    }

    .table-controls {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
        padding: 0.375rem 0.5rem;
    }

    .table-nav {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }

    .view-toggle,
    .pagination {
        width: 100%;
    }

    .tabs-menu {
        font-size: 0.8rem;
    }

    .tab-item {
        padding: 0.375rem 0.5rem;
    }
}

/* Toast Styles */
.toast-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 350px;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-height: auto;
    font-size: 0.875rem;
}

.toast-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    margin-top: 0.125rem;
}

.toast-icon svg {
    width: 1rem;
    height: 1rem;
}

.toast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.toast-title {
    font-weight: 600;
    line-height: 1.3;
    color: var(--foreground);
}

.toast-description {
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--muted-foreground);
}

.toast-close {
    flex-shrink: 0;
    background: transparent;
    border: none;
    padding: 0.125rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.15s;
    color: var(--muted-foreground);
}

.toast-close:hover {
    opacity: 1;
    background: var(--muted);
}

.toast-close svg {
    width: 0.875rem;
    height: 0.875rem;
}

/* Toast variants */
.toast-default {
    border-left: 3px solid var(--primary);
}

.toast-default .toast-icon {
    color: var(--primary);
}

.toast-success {
    border-left: 3px solid #22c55e;
    background: color-mix(in srgb, #22c55e 5%, var(--card));
}

.toast-success .toast-icon {
    color: #22c55e;
}

.toast-destructive {
    border-left: 3px solid var(--destructive);
    background: color-mix(in srgb, var(--destructive) 5%, var(--card));
}

.toast-destructive .toast-icon {
    color: var(--destructive);
}

/* Toast animations */
@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutToRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Responsive toast styles */
@media (max-width: 640px) {
    .toast-container {
        bottom: 0.5rem;
        right: 0.5rem;
        left: 0.5rem;
        max-width: none;
    }

    .toast {
        padding: 0.625rem;
        font-size: 0.8rem;
    }

    .toast-title {
        font-size: 0.875rem;
    }

    .toast-description {
        font-size: 0.75rem;
    }
}

/* Upload Progress Components */
.upload-progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 2rem;
}

.upload-progress-container {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow-lg);
    min-width: 400px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.upload-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.upload-progress-header h3 {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--foreground);
}

.upload-progress-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.upload-progress-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--muted);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition:
        opacity 0.5s ease,
        transform 0.5s ease;
}

.upload-progress-item.fade-out {
    opacity: 0.6;
    transform: scale(0.98);
}

.upload-progress-info {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
}

.upload-file-details {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 0.125rem;
    min-width: 0;
    flex: 1;
}

.upload-filename {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-filesize {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

.upload-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.status-pending {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    padding: 0.125rem 0.5rem;
    background: var(--background);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.text-success {
    color: #22c55e;
}

.text-error {
    color: var(--destructive);
}

.upload-progress-bar-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.upload-progress-bar {
    flex: 1;
    height: 0.5rem;
    background: var(--background);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    position: relative;
}

.upload-progress-bar.error {
    border-color: var(--destructive);
}

.upload-progress-bar.completed {
    border-color: #22c55e;
}

.upload-progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: inherit;
    transition: width 0.3s ease;
}

.upload-progress-bar.error .upload-progress-fill {
    background: var(--destructive);
}

.upload-progress-bar.completed .upload-progress-fill {
    background: #22c55e;
}

.upload-progress-text {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    font-weight: 500;
    min-width: 4rem;
    text-align: right;
}

.btn-sm {
    padding: 0.25rem 0.375rem;
    font-size: 0.75rem;
}

.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Dark mode adjustments */
.dark .upload-progress-container {
    background: var(--card);
}

.dark .upload-progress-item {
    background: var(--background);
}

.dark .upload-progress-bar {
    background: var(--muted);
}

/* Responsive design */
@media (max-width: 640px) {
    .upload-progress-overlay {
        padding: 1rem;
    }

    .upload-progress-container {
        min-width: auto;
        width: 100%;
        max-width: none;
        padding: 0.75rem;
    }

    .upload-progress-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .upload-status {
        align-self: flex-end;
    }
}

/* Splash Page Styles */
.splash-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--background);
    color: var(--foreground);
    padding: 2rem;
}

.splash-content {
    max-width: 800px;
    text-align: center;
    animation: fadeIn 0.6s ease-out;
}

.splash-header {
    margin-bottom: 3rem;
}

.splash-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.splash-brand h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--foreground);
}

.splash-brand h1 span {
    color: var(--primary);
}

.splash-subtitle {
    font-size: 1.25rem;
    color: var(--muted-foreground);
    margin-top: 1rem;
}

.splash-features {
    margin-bottom: 3rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    padding: 2rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.feature-card .icon {
    width: 3rem;
    height: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--foreground);
}

.feature-card p {
    color: var(--muted-foreground);
    line-height: 1.5;
}

.splash-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.splash-start-btn {
    font-size: 1.125rem;
    padding: 1rem 2rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
}

.splash-start-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.splash-note {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}
.splash-credit {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.icon-large {
    width: 4rem;
    height: 4rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive design for splash page */
@media (max-width: 640px) {
    .splash-container {
        padding: 1rem;
    }

    .splash-brand h1 {
        font-size: 2rem;
    }

    .splash-subtitle {
        font-size: 1rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-card {
        padding: 1.5rem;
    }
}
