:root {
    /* --- V6 STUNNING AMBIENT PALETTE --- */
    --bg-app: #060606;
    --bg-surface: #101012;
    /* Distinct lighter surface for the form panel to create separation */
    --bg-surface-hover: #1a1a1c;
    --border-subtle: #252525;
    --border-strong: #434343;

    --brand-blue: #40C9FF;
    --brand-blue-dark: #1ea7db;
    --brand-purple: #E81CFF;

    --gradient-primary: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-purple) 60%);
    --gradient-hover: linear-gradient(135deg, #7dd3fc 0%, #ff66ff 60%);

    --text-primary: #ffffff;
    --text-secondary: #f4f4f5;
    /* Brighter secondary text for better readability */
    --text-muted: #a1a1aa;
    /* Brighter muted text */
    --text-on-brand: #000000;

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;

    --font-heading: 'Aspekta', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-body: 'Mona Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-app);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    /* Zabrání vodorovnému scrollování kvůli glow efektům */
}

/* Typography Overrides */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.2;
}

h2 {
    font-size: 2.25rem;
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-light {
    color: var(--text-secondary) !important;
}

.text-white {
    color: var(--text-primary) !important;
}

.text-primary {
    color: var(--text-primary) !important;
}

/* ========================================================================= */
/* V7 Split-Screen Layout (Glassmorphism & Ambient Style)                    */
/* ========================================================================= */

.split-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: row;
    position: relative;
    /* overflow: hidden; odstraněno pro správné scrollování a sticky efekt */
}

/* --- Left Brand Panel & Ambient Glow --- */
.brand-panel {
    flex: 1;
    position: sticky;
    top: 0;
    height: 100vh;
    /* Pevná výška obrazovky pro sticky chování */
    padding: 4rem 5rem;
    /* Lepší odsazení podle Apple/SaaS stylů */
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    /* Stronger separator */
    background-color: var(--bg-app);
    /* Deep black for left side */
}

/* First Glow: Cyan (Top Left) */
.brand-panel::before {
    content: '';
    position: absolute;
    top: -5%;
    left: -10%;
    width: 65vw;
    height: 65vw;
    background: radial-gradient(circle, rgba(64, 201, 255, 0.5) 0%, rgba(30, 167, 219, 0.15) 40%, transparent 70%);
    filter: blur(120px);
    z-index: 0;
    pointer-events: none;
}

/* Second Glow: Magenta (Bottom Right) */
.brand-panel::after {
    content: '';
    position: absolute;
    bottom: -10%;
    right: -10%;
    width: 65vw;
    height: 65vw;
    background: radial-gradient(circle, rgba(232, 28, 255, 0.4) 0%, rgba(138, 43, 226, 0.15) 35%, transparent 70%);
    filter: blur(120px);
    z-index: 0;
    pointer-events: none;
}

.brand-content {
    position: relative;
    z-index: 10;
    max-width: 520px;
    width: 100%;
}

.brand-logo {
    max-height: 75px;
    margin-bottom: 4rem;
    display: block;
}

.brand-title {
    font-size: 4.5rem;
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 1.75rem;
    color: var(--text-primary);
    letter-spacing: 0.05em;
    /* Těsnější spacing pro moderní vzhled */

}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    font-weight: 800;
}

.brand-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.7;
    letter-spacing: 0em;
    opacity: 0.85;
    max-width: 480px;
}

/* --- Right Form Panel --- */
.form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    /* Odstraněno justify-content: center; zamezuje ořezávání dlouhého formuláře nahoře! */
    min-height: 100vh;
    background-color: var(--bg-surface);
    /* Distinct background for the form area */
    position: relative;
    z-index: 10;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    /* Sharp separation line */
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.8);
    /* Deep shadow */
}

.form-content-wrapper {
    width: 100%;
    max-width: 750px;
    margin: auto auto;
    /* Flexbox safe vertical centering */
    padding: 2rem 3rem;
}

/* Responzivita (Mobil/Tablet) */
@media (max-width: 991.98px) {
    .split-layout {
        flex-direction: column;
    }

    .form-panel {
        min-height: 100vh;
        border-left: none;
        box-shadow: none;
        background-color: var(--bg-app);
        /* Sjednotíme barvu pozadí s body */
    }

    .form-content-wrapper {
        padding: 2rem 1.5rem 4rem 1.5rem;
        /* Menší padding na mobilu */
    }

    /* Změny pro hlavičku a logo na mobilu */
    .form-header-wrapper {
        margin-bottom: 2.5rem !important;
    }

    .brand-logo-right {
        max-height: 40px !important;
    }

    .wizard-progress {
        margin-bottom: 2.5rem;
    }

    .step-title.h2 {
        font-size: 1.75rem;
        margin-bottom: 2rem !important;
    }

    /* Karty a volby kompaktněji */
    .selection-card {
        padding: 1.5rem 1.25rem;
    }

    .selection-card i {
        font-size: 1.75rem !important;
        margin-bottom: 0.75rem !important;
    }

    .feature-label {
        padding: 1rem 1.25rem;
    }

    .check-icon {
        width: 20px;
        height: 20px;
        margin-right: 0.75rem !important;
    }

    .check-icon i {
        font-size: 1rem;
    }

    /* Plná šířka tlačítek dole */
    .border-top.mt-5.pt-3,
    .border-top.mt-5.pt-4 {
        margin-top: 2rem !important;
        padding-top: 1.5rem !important;
        display: flex;
        flex-direction: column-reverse;
        /* Hlavní akce nad stornem */
        gap: 1rem;
    }

    .btn-lg {
        width: 100%;
        padding: 0.8rem 1.5rem;
        font-size: 1.05rem;
    }
}

/* ========================================================================= */
/* Custom Inputs & Labels (UI Bomb Linear Style)                             */
/* ========================================================================= */

.custom-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.6rem;
    display: inline-block;
}

.form-control,
.form-select {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    font-size: 1.05rem;
    padding: 1.2rem 1.25rem;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.form-control:hover,
.form-select:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background-color: rgba(255, 255, 255, 0.03);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand-blue);
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    box-shadow: 0 0 0 1px var(--brand-blue), 0 0 16px rgba(64, 201, 255, 0.15) !important;
    outline: none;
}

.form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.4;
}

/* Progress Bar Overrides */
.wizard-progress {
    margin-bottom: 4rem;
    position: relative;
    padding: 0 16px;
    /* Adjust purely for visual alignment */
}

.progress {
    background-color: rgba(255, 255, 255, 0.08);
    /* Dark glass line */
    height: 4px;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 16px;
}

.progress-bar {
    background: var(--brand-blue);
    /* Solid blue looks better than squeezed gradient */
    box-shadow: 0 0 12px rgba(64, 201, 255, 0.6);
    transition: width 0.4s ease;
}

/* Wizard Steps Indicators */
.steps-indicators {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: calc(100% - 32px);
    left: 16px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.step-indicator {
    width: 36px;
    height: 36px;
    background-color: var(--bg-app);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
    z-index: 2;
    transition: all 0.3s ease;
    cursor: pointer;
    pointer-events: auto;
    /* Přepis pointer-events: none z roddiče */
}

.step-indicator.active {
    border-color: var(--brand-blue);
    background: var(--brand-blue);
    color: #000000;
    /* Max contrast for readability */
    box-shadow: 0 0 0 4px rgba(64, 201, 255, 0.15), 0 0 20px rgba(64, 201, 255, 0.4);
}

/* Base overrides for standard invalid inputs */
.form-control.is-invalid {
    border-color: #ef4444 !important;

    box-shadow: 0 0 0 0.2rem rgba(239, 68, 68, 0.25);
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* Card Selectors (New UI) */
.selection-card {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 2.5rem 2rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    height: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.selection-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background-color: rgba(255, 255, 255, 0.03);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(64, 201, 255, 0.08);
}

.selection-card.selected {
    border-color: var(--brand-blue);
    background-color: rgba(64, 201, 255, 0.05);
    box-shadow: inset 0 0 0 1px var(--brand-blue), 0 8px 32px rgba(64, 201, 255, 0.15);
}

.selection-card i {
    color: var(--text-muted) !important;
    transition: all 0.3s ease;
}

.selection-card:hover i {
    color: var(--brand-blue) !important;
}

.selection-card.selected i {
    color: var(--brand-blue) !important;
    transform: scale(1.15) translateY(-2px);
}

.selection-card p {
    color: var(--text-muted) !important;
}

/* Custom Checkbox (Features) */
.feature-checkbox {
    display: none;
}

.feature-label {
    display: flex;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.feature-label:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background-color: rgba(255, 255, 255, 0.03);
    box-shadow: 0 4px 15px rgba(64, 201, 255, 0.05);
}

.feature-checkbox:checked+.feature-label {
    background-color: rgba(64, 201, 255, 0.05);
    border-color: var(--brand-blue);
    box-shadow: inset 0 0 0 1px var(--brand-blue), 0 4px 20px rgba(64, 201, 255, 0.15);
}

.feature-checkbox:checked+.feature-label .check-icon {
    opacity: 1;
    transform: scale(1);
    background: var(--gradient-primary);
    border-color: var(--brand-blue);
    box-shadow: 0 0 10px rgba(232, 28, 255, 0.3);
}

.check-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: var(--bg-surface-hover);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.check-icon i {
    color: var(--text-primary) !important;
    font-size: 1.2rem;
}

/* Buttons */
.btn {
    border-radius: 99px;
    /* Pill layout for buttons is extremely sleek in dark mode */
    font-weight: 700;
    letter-spacing: 0.05em;
    /* Increased letter spacing for premium feel */
    text-transform: uppercase;
    font-size: 0.9rem;
    padding: 1rem 2.25rem;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.btn-primary,
.btn-success {
    background: var(--gradient-primary);
    color: var(--text-primary);
    border: none;
    box-shadow: 0 4px 15px rgba(232, 28, 255, 0.2);
}

.btn-primary:hover,
.btn-success:hover,
.hover-scale:hover {
    background: var(--gradient-hover);
    color: var(--text-primary);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(232, 28, 255, 0.35);
}

.btn-outline-secondary,
.btn-outline-light {
    background: transparent;
    border-color: var(--border-subtle);
    color: var(--text-secondary) !important;
}

.btn-outline-secondary:hover,
.btn-outline-light:hover {
    background: var(--bg-surface-hover);
    border-color: var(--text-primary);
    color: var(--text-primary) !important;
    transform: translateY(-2px);
}

/* File Upload Area */
.file-upload-area {
    background-color: rgba(255, 255, 255, 0.015);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
}

.file-upload-area:hover {
    border-color: var(--brand-blue);
    background-color: var(--bg-surface-hover);
    box-shadow: inset 0 0 0 1px var(--brand-blue), 0 0 20px rgba(64, 201, 255, 0.1);
}

/* Animations (JS controlled) */
.wizard-step {
    transition: all 0.35s cubic-bezier(0.25, 1, 0.3, 1);
}

/* Base states for transitions */
.slide-in-right {
    animation: slideInRight 0.35s cubic-bezier(0.25, 1, 0.3, 1) forwards;
}

.slide-in-left {
    animation: slideInLeft 0.35s cubic-bezier(0.25, 1, 0.3, 1) forwards;
}

.slide-out-left {
    animation: slideOutLeft 0.3s cubic-bezier(0.25, 1, 0.3, 1) forwards;
}

.slide-out-right {
    animation: slideOutRight 0.3s cubic-bezier(0.25, 1, 0.3, 1) forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(-50px);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(50px);
    }
}

.invalid-feedback {
    font-size: 0.85rem;
    color: #ef4444;
}