/* --- LANGUAGE SELECTOR FIX --- */
.lang-selector-container {
    display: flex; 
    justify-content: flex-end; 
    align-items: center; 
    margin-bottom: 15px;
}

.lang-icon {
    font-size: 1.3rem;
    margin-right: 8px;
}

.lang-selector-dropdown {
    width: 165px;
    font-size: 0.95rem;
    font-weight: bold;
}

/* This targets the internal Dash component to prevent double-borders */
.lang-selector-dropdown .Select-control {
    border: 2px solid #cbd5e1 !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08) !important;
    background-color: #ffffff;
}

/* -----------------------------------------
   1. CORE LOGIC (THE TOGGLES)
----------------------------------------- */
.wrapper-hidden {
    display: none !important;
}

.wrapper-visible {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

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

/* -----------------------------------------
   2. PREMIUM APP LAYOUT (The Squeeze & Soften)
----------------------------------------- */
body {
    background-color: #f8fafc;
    /* Clean, clinical slate-grey/blue */
    margin: 0;
    padding: 0;
    color: #334155;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.app-container {
    max-width: 650px;
    /* Forces a mobile-like column on desktop */
    margin: 40px auto;
    /* Centers it perfectly */
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    /* Soft, premium drop shadow */
    padding: 30px;
}

/* Hero Text */
.hero-section {
    text-align: center;
    margin-bottom: 30px;
}

.main-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 5px;
    color: #1a252f;
}

.main-subtitle {
    font-size: 1rem;
    color: #7f8c8d;
    margin-top: 0;
}

/* -----------------------------------------
   3. ELEVATED INPUTS & BUTTONS
----------------------------------------- */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

input[type="text"],
input[type="number"],
.dash-dropdown,
.full-width {
    width: 100%;
    padding: 12px 15px;
    margin: 8px 0 20px 0;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    /* Softer edges */
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    font-size: 16px;
    /* Prevents auto-zoom on iOS */
}

input[type="text"]:focus,
input[type="number"]:focus,
.full-width:focus {
    border-color: #3b82f6;
    /* Modern trust-blue focus */
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.action-btn-large {
    background-color: #10b981;
    /* High-conversion green */
    color: white;
    border: none;
    padding: 15px 20px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    margin-top: 15px;
    transition: background-color 0.2s, transform 0.1s;
}

.action-btn-large:hover {
    background-color: #059669;
    transform: translateY(-1px);
}

.action-btn-large:active {
    transform: scale(0.98);
}

/* -----------------------------------------
   4. MOBILE RESPONSIVENESS & UTILITIES
----------------------------------------- */
.horizontal-radio label {
    display: inline-block;
    margin-right: 20px;
    font-weight: normal;
}

.flex-row {
    display: flex;
    gap: 15px;
    width: 100%;
}

.flex-row>* {
    flex: 1;
    min-width: 0;
}

/* Mobile Breakpoints */
@media (max-width: 768px) {
    .flex-row {
        flex-direction: column !important;
        gap: 15px;
    }

    .flex-row>div,
    .flex-row>input {
        width: 100% !important;
    }

    .app-container {
        margin: 20px auto;
        padding: 20px;
    }
}

/* --- PREMIUM DASHBOARD POLISH --- */

/* 1. Soften the resting state of all input boxes */
input.full-width, .Select-control {
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    padding: 10px 12px !important;
    transition: all 0.2s ease-in-out !important;
    background-color: #f8fafc !important; /* Extremely subtle grey inset */
}

/* 2. The "Stripe" Glow: When the user clicks an input */
input.full-width:focus, .Select-control:focus-within {
    background-color: #ffffff !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important; /* Soft blue halo */
    outline: none !important;
}

/* 3. Section Header Anchor Weight */
h4 {
    color: #0f172a !important; /* Darker, richer slate */
    font-weight: 800 !important;
    letter-spacing: -0.5px !important;
    padding-bottom: 12px !important;
    margin-top: 45px !important; /* Gives the sections more breathing room */
}

/* --- MOBILE RESPONSIVENESS REFINEMENTS --- */
@media (max-width: 768px) {
    /* 1. Shrink the giant hero title on mobile */
    .main-title {
        font-size: 2.2rem !important; 
        line-height: 1.1 !important;
        margin-bottom: 10px !important;
    }
    
    /* 2. Tighten the spacing around the header so the form shifts up */
    .hero-section {
        padding-top: 15px !important;
        padding-bottom: 10px !important;
    }
    
    /* 3. Make the language selector a bit more compact */
    #language-selector {
        width: 145px !important;
        font-size: 0.85rem !important;
    }
}

/* --- VAULT DAY ZERO LAYOUT --- */
.vault-setup-card {
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.vault-section-title {
    color: #1a1a1a;
    font-weight: 700;
    margin-bottom: 5px;
}

.vault-input-field {
    width: 100%;
    border-radius: 5px;
}

/* Ensure the date picker fills the mobile column */
.vault-datepicker .Select-control {
    width: 100% !important;
}