:root {
    color-scheme: light;
    --size-header: 60px;
    --size-footer: 44px;
    --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-display: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: "JetBrains Mono", "Cascadia Code", Consolas, monospace;

    /* Palette Tokens - Modern Industrial Precision */
    --color-slate-50: #f8fafc;
    --color-slate-100: #f1f5f9;
    --color-slate-200: #e2e8f0;
    --color-slate-300: #cbd5e1;
    --color-slate-400: #94a3b8;
    --color-slate-500: #64748b;
    --color-slate-600: #475569;
    --color-slate-700: #334155;
    --color-slate-800: #1e293b;
    --color-slate-900: #0f172a;
    --color-slate-950: #020617;

    --color-obsidian: #0b1120;
    --color-primary-600: #2563eb;
    --color-primary-700: #1d4ed8;
    --color-indigo-700: #4338ca;

    --color-indigo-600: #4f46e5;
    --color-emerald-500: #10b981;
    --color-emerald-600: #059669;
    --color-amber-500: #f59e0b;
    --color-amber-600: #d97706;
    --color-rose-500: #ef4444;
    --color-rose-600: #e11d48;
    --color-purple-600: #8b5cf6;
    --color-sky-600: #0284c7;

    --color-brand-primary: #0b1120;
    --color-brand-accent: #2563eb;

    --color-bg-app: #f3f6fa;                      /* Canvas Principal #F3F6FA */
    --color-bg-surface: #ffffff;                  /* Cards bg-white */
    --color-border-subtle: #e2e8f0;               /* Border subtle */
    --color-border-strong: #cbd5e1;

    --color-text-main: #0f172a;
    --color-text-muted: #64748b;
    --color-text-soft: #94a3b8;
    --color-text-disabled: #cbd5e1;

    /* Status Tokens */
    --color-success: #059669;    /* Emerald #059669 */
    --color-warning: #d97706;    /* Amber #d97706 */
    --color-danger: #e11d48;     /* Rose #e11d48 */
    --color-info: #2563eb;       /* Primary #2563eb */

    /* LCD Hardware Display */
    --color-lcd-bg: #0b1120;
    --color-lcd-text: #10b981;

    /* Compatibility Mappings */
    --primary: var(--color-brand-primary);
    --primary-hover: #1e293b;
    --primary-light: var(--color-border-subtle);
    --secondary: #475569;
    --secondary-hover: #334155;
    --success: var(--color-success);
    --success-hover: #047857;
    --success-light: #d1fae5;
    --warning: var(--color-warning);
    --warning-hover: #b45309;
    --warning-light: #fef3c7;
    --error: var(--color-danger);
    --error-hover: #be123c;
    --error-light: #ffe4e6;
    --info: var(--color-info);
    --info-hover: #0369a1;
    --info-light: #e0f2fe;

    --bg-main: var(--color-bg-app);
    --bg-surface: var(--color-bg-surface);
    --bg-elevated: #ffffff;
    --bg-muted: var(--color-slate-50);
    --border-color: var(--color-border-subtle);
    --border-strong: var(--color-border-strong);
    --border-focus: rgba(79, 70, 229, 0.2);
    --text-main: var(--color-text-main);
    --text-muted: var(--color-text-muted);
    --text-soft: var(--color-text-soft);
    --text-disabled: var(--color-text-disabled);

    --shadow-soft: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-card: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-panel: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

* {
    box-sizing: border-box;
    min-width: 0;
}

html,
body {
    height: 100%;
    margin: 0;
    overflow: hidden;
    background-color: var(--color-bg-app);
}

body {
    color: var(--text-main);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

#app {
    height: 100%;
}

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

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

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

::selection {
    background: rgba(15, 23, 42, 0.14);
    color: var(--text-main);
}

.font-headline {
    font-family: var(--font-display);
}

.font-mono {
    font-family: var(--font-mono);
}

main::-webkit-scrollbar,
.app-scrollbar::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

main::-webkit-scrollbar-track,
.app-scrollbar::-webkit-scrollbar-track {
    background: rgba(226, 232, 240, 0.8);
    border-radius: 999px;
}

main::-webkit-scrollbar-thumb,
.app-scrollbar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #94a3b8, #64748b);
    border-radius: 999px;
}

.animate-fade-in-down {
    animation: fade-in-down 0.32s ease-out;
}

.animate-fade-in {
    animation: fade-in 0.24s ease-out;
}

@keyframes fade-in-down {
    0% {
        opacity: 0;
        transform: translateY(18px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

input::-ms-reveal,
input::-ms-clear {
    display: none !important;
}
