:root {
    /* ==========================================================================
       LIGHT DESIGN GUIDE v2.0 TOKENS (VERIFIED FROM FIGMA)
       ========================================================================== */

    /* Typography (1 Typeface Rule: Lato) */
    --font-family-base: 'Lato', sans-serif;
    
    --font-h0: 300 180px/1.2 var(--font-family-base);
    --font-h1: 300 68px/1.2 var(--font-family-base);
    --font-h2: 300 32px/1.3 var(--font-family-base);
    --font-h3: 600 14px/1.4 var(--font-family-base);
    --font-h4: 400 34px/1.5 var(--font-family-base);
    --font-h5: 400 24px/1.5 var(--font-family-base);
    --font-h6: 400 20px/1.5 var(--font-family-base);
    --font-body-1: 400 18px/1.5 var(--font-family-base);
    --font-body-2: 400 24px/1.5 var(--font-family-base);

    --font-primary: var(--font-family-base);
    --font-heading: var(--font-family-base);
    --font-secondary: var(--font-family-base);

    /* Elevations (Material 3-Layer Box Shadows) */
    --elevation-00dp: none;
    --elevation-01dp: 0px 1px 3px 0px rgba(0, 0, 0, 0.20), 0px 2px 1px 0px rgba(0, 0, 0, 0.12), 0px 1px 1px 0px rgba(0, 0, 0, 0.14);
    --elevation-02dp: 0px 1px 5px 0px rgba(0, 0, 0, 0.20), 0px 3px 1px 0px rgba(0, 0, 0, 0.12), 0px 2px 2px 0px rgba(0, 0, 0, 0.14);
    --elevation-03dp: 0px 1px 8px 0px rgba(0, 0, 0, 0.20), 0px 3px 3px 0px rgba(0, 0, 0, 0.12), 0px 3px 4px 0px rgba(0, 0, 0, 0.14);
    --elevation-04dp: 0px 2px 4px 0px rgba(0, 0, 0, 0.20), 0px 1px 10px 0px rgba(0, 0, 0, 0.12), 0px 4px 5px 0px rgba(0, 0, 0, 0.14);
    --elevation-06dp: 0px 3px 5px 0px rgba(0, 0, 0, 0.20), 0px 1px 18px 0px rgba(0, 0, 0, 0.12), 0px 6px 10px 0px rgba(0, 0, 0, 0.14);
    --elevation-08dp: 0px 5px 5px 0px rgba(0, 0, 0, 0.20), 0px 3px 14px 0px rgba(0, 0, 0, 0.12), 0px 8px 10px 0px rgba(0, 0, 0, 0.14);
    --elevation-12dp: 0px 7px 8px 0px rgba(0, 0, 0, 0.20), 0px 5px 22px 0px rgba(0, 0, 0, 0.12), 0px 12px 17px 0px rgba(0, 0, 0, 0.14);
    --elevation-16dp: 0px 8px 10px 0px rgba(0, 0, 0, 0.20), 0px 6px 30px 0px rgba(0, 0, 0, 0.12), 0px 16px 24px 0px rgba(0, 0, 0, 0.14);
    --elevation-24dp: 0px 11px 15px 0px rgba(0, 0, 0, 0.20), 0px 9px 46px 0px rgba(0, 0, 0, 0.12), 0px 24px 38px 0px rgba(0, 0, 0, 0.14);

    /* State Modifiers (Opacities/Effects) */
    --state-disabled: 0.38;
    --state-enabled: 1;
    --state-focus: 0.12;
    --state-select: 0.08;
    --state-hover: 0.04;
    --state-click: 0.12;
    --state-drag: 0.16;

    /* Light Theme + Monochromatic Brand */
    --bg-page: rgb(250, 250, 250);
    --bg-card: rgb(255, 255, 255);
    --bg-card-alt: rgb(240, 240, 240);
    --text-primary: rgba(0, 0, 0, 0.87);
    --text-secondary: rgba(0, 0, 0, 0.60);
    --text-muted: rgba(0, 0, 0, 0.38);
    --text-disabled: rgba(0, 0, 0, var(--state-disabled));
    --color-primary: rgb(17, 17, 17); /* Primary/C1 from visual slides */
    --color-primary-hover: rgb(51, 51, 51); /* Primary/C1 700 */
    --color-secondary: rgb(119, 119, 119); /* Primary/C-1 */
    --color-success: rgb(16, 185, 129); /* Sleek Emerald Green */
    --color-warning: rgb(255, 193, 7);
    --color-danger: rgb(220, 53, 69);
    --color-info: rgb(23, 162, 184);
    --color-tertiary: rgb(153, 153, 153);
    --gradient-primary: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    --border-color: rgb(224, 224, 224);
    --shadow-main: var(--elevation-04dp);
    --shadow-hover: var(--elevation-08dp);
}

:root[data-theme='light'] {
    --bg-page: rgb(250, 250, 250); /* Clean light surface from Figma */
    --bg-card: rgb(255, 255, 255);
    --bg-card-alt: rgb(243, 243, 243);
    --text-primary: rgba(17, 17, 17, 1.0); /* Deep dark gray for high contrast readability */
    --text-secondary: rgba(17, 17, 17, 0.85);
    --text-muted: rgba(17, 17, 17, 0.70); /* Increased from 0.50 for readability */
    --text-disabled: rgba(17, 17, 17, var(--state-disabled));
    --color-primary: rgb(17, 17, 17);
    --color-primary-hover: rgb(51, 51, 51);
    --border-color: rgb(221, 221, 221);
    --color-warning: rgb(204, 132, 0); /* Darker orange instead of bright yellow for white bg */
}

:root[data-theme='dark'] {
    --bg-page: rgb(27, 29, 40);
    --bg-card: rgb(34, 37, 51);
    --bg-card-alt: rgb(40, 44, 60);
    --text-primary: rgb(255, 255, 255);
    --text-secondary: rgb(229, 229, 229);
    --text-muted: rgb(125, 129, 147);
    --text-disabled: rgba(255, 255, 255, var(--state-disabled));
    --color-primary: rgb(113, 50, 193);
    --color-primary-hover: rgb(130, 60, 220);
    --border-color: rgb(52, 57, 78);
}

:root[data-theme='colorful'] {
    --bg-page: rgb(255, 245, 250); /* Very soft blush pink background */
    --bg-card: rgb(255, 255, 255);
    --bg-card-alt: rgb(255, 235, 245); /* Soft pink surface */
    --text-primary: rgb(45, 15, 45); /* Deep eggplant purple for high contrast text */
    --text-secondary: rgba(45, 15, 45, 0.75);
    --text-muted: rgba(45, 15, 45, 0.50);
    --text-disabled: rgba(45, 15, 45, var(--state-disabled));
    --color-primary: rgb(187, 134, 252); /* Soft Purple from Figma */
    --color-primary-hover: rgb(160, 95, 230);
    --color-secondary: rgb(207, 102, 121); /* Soft Red/Pink from Figma */
    --border-color: rgb(255, 210, 235); /* Light pink borders */
}

/* ==========================================================================
   BASE HTML OVERRIDES (Applies Figma design universally)
   ========================================================================== */

html, body {
    font-family: var(--font-primary);
    background-color: var(--bg-page);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    margin-top: 0;
}

p {
    color: var(--text-secondary);
    line-height: 1.6;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-primary-hover);
}

hr {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 20px 0;
}

/* ==========================================================================
   GLOBAL DESIGN SYSTEM CLASSES (From Figma)
   ========================================================================== */
/* Components */
.bs-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--shadow-main);
    border: 1px solid var(--border-color);
}

/* Buttons */
.bs-btn-primary {
    background-color: var(--color-primary);
    border-radius: 8px;
    border: none;
    color: rgb(255, 255, 255); /* Pure white text for maximum contrast */
    font-size: 14px;
    font-weight: 500;
    padding: 12px 24px;
    font-family: var(--font-secondary);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.bs-btn-primary:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
}

.bs-btn-dark {
    background-color: var(--bg-card-alt);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    padding: 12px 24px;
    font-family: var(--font-secondary);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.bs-btn-dark:hover {
    background-color: var(--border-color);
    transform: translateY(-2px);
}

/* Inputs */
.bs-input {
    background-color: var(--bg-card-alt);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 16px;
    padding: 16px 24px;
    width: 100%;
    box-sizing: border-box;
    font-family: var(--font-primary);
    transition: border-color 0.2s ease;
}

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

.bs-input::placeholder {
    color: var(--text-muted);
}

/* Blazor Error UI */
#blazor-error-ui {
    background: var(--color-primary);
    color: white;
    bottom: 0;
    box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* ==========================================================================
   WIZARD ANIMATIONS & UI
   ========================================================================== */

/* Floating Back Button */
.bs-btn-floating-back {
    position: fixed;
    bottom: 30px;
    left: 20px;
    z-index: 50;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

[data-theme='dark'] .bs-btn-floating-back {
    background-color: rgba(34, 37, 51, 0.6);
}

.bs-btn-floating-back:hover {
    transform: scale(1.05);
    background-color: rgba(255, 255, 255, 0.8);
}

[data-theme='dark'] .bs-btn-floating-back:hover {
    background-color: rgba(34, 37, 51, 0.8);
}

.bs-btn-floating-back svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Lottie Swipe Hint Overlay */
.swipe-hint-overlay {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 150px;
    height: 150px;
    pointer-events: none;
    z-index: 40;
    opacity: 0.8;
}

.swipe-hint-right {
    right: 10%;
}

.swipe-hint-left {
    left: 10%;
    transform: translateY(-50%) scaleX(-1);
}


