:root {
    --primary: #EA541E;
    --primary-glow: #FF6B3D;
    --primary-light: #FDEEE8;
    --primary-gradient: linear-gradient(135deg, #FF6B3D 0%, #EA541E 100%);
    --accent-glow: rgba(234, 84, 30, 0.25);
    --text-dark: #2E3380;
    --text-main: #1A1F3D;
    --text-muted: #6B7099;
    --bg-app: #F4F6FA;
    --card-bg: #FFFFFF;
    --border-color: #E2E8F0;
    --radius: 12px;
    --illuminate-shadow: 0 20px 40px rgba(46, 51, 128, 0.08);
    --glow-border: 0 0 0 3px rgba(234, 84, 30, 0.15);
}

* {
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-app);
    margin: 0;
    padding: 0;
    background-image: 
        radial-gradient(at 0% 0%, rgba(234, 84, 30, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(46, 51, 128, 0.05) 0px, transparent 50%);
}

.main-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

/* Outer Container */
.app-card-container {
    width: 100%;
    max-width: 1050px;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: var(--illuminate-shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Mobile Bar Header */
.mobile-header {
    padding: 16px 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.back-btn {
    background: #F0FDF4;
    border: 1px solid var(--border-color);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--primary);
    font-size: 20px;
}

.step-badge {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

/* Form Content Flex */
.form-content {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.left-section, .right-section {
    padding: 24px;
    width: 100%;
}

.brand-header {
    text-align: center;
    margin-bottom: 24px;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.brand-logo img {
    height: 60px;
    width: auto;
    display: block;
    object-fit: contain;
}

/* Desktop Banner */
.desktop-banner {
    padding: 24px 35px;
    background: #FFFFFF;
    border-bottom: 1px solid var(--border-color);
}

.desktop-banner-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.desktop-banner-row .brand-logo {
    margin-bottom: 0;
    flex: 0 0 20%;
    max-width: 20%;
    display: flex;
    justify-content: center;
}

.desktop-banner-text {
    flex: 0 0 80%;
    max-width: 80%;
    text-align: left;
}

.page-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0 0 4px 0;
}

.page-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

/* Mobile welcome message (brand-header on left-section) */
.welcome-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0 0 4px 0;
}

.welcome-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

/* Language Grid */
.lang-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
    max-height: 150px;
}

.lang-card {
    padding: 14px 12px;
    border: 1.5px solid #E2E8F0;
    border-radius: var(--radius);
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-main);
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.lang-card:hover {
    border-color: var(--primary-glow);
    background: var(--primary-light);
}

.lang-card.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
    box-shadow: var(--glow-border);
}

.field-group {
    margin-bottom: 15px;
    border: 1px solid var(--border-color); /* Light border */
    background: #FFFFFF;
    padding: 16px;
    border-radius: var(--radius); /* Rounded corners */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02); /* Very subtle depth */
}

.field-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.input-box {
    position: relative;
    display: flex;
    align-items: center;
}

.input-box i {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 18px;
    transition: color 0.2s;
    pointer-events: none;
}

.input-box input, .input-box select {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 1.5px solid #E2E8F0;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    outline: none;
    background: #fff;
    color: var(--text-main);
    transition: all 0.2s;
}

.input-box select {
    appearance: none;
    cursor: pointer;
}

.input-box input:focus, .input-box select:focus {
    border-color: var(--primary);
    box-shadow: var(--glow-border);
}

.input-box input:focus + i, .input-box select:focus + i {
    color: var(--primary);
}

/* Gender Switcher */
.gender-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.gender-card input { display: none; }
.gender-card label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 8px;
    border: 1.5px solid #E2E8F0;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    margin: 0;
    background: #fff;
}

.gender-card input:checked + label {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
    box-shadow: var(--glow-border);
}

/* Duration Grid */
.duration-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.duration-card input { display: none; }
.duration-card label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 6px;
    border: 1.5px solid #E2E8F0;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    margin: 0;
    background: #fff;
}

.duration-card .num {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
}

.duration-card .unit {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}

.duration-card input:checked + label {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: var(--glow-border);
}

.duration-card input:checked + label .num,
.duration-card input:checked + label .unit {
    color: var(--primary);
}

/* Day Selection Container */
.days-scroll-container {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    padding: 2px;
}

.day-pill input { display: none; }
.day-pill label {
    width: 100%;
    padding: 10px 4px;
    border: 1.5px solid #E2E8F0;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    margin: 0;
}

.day-pill .day-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
}

.day-pill .day-icon {
    font-size: 8px;
    margin-top: 4px;
    color: #CBD5E1;
}

.day-pill input:checked + label {
    border-color: var(--primary);
    background: var(--primary-gradient);
    box-shadow: 0 4px 12px rgba(234, 84, 30, 0.3);
}

.day-pill input:checked + label .day-name,
.day-pill input:checked + label .day-icon {
    color: #FFFFFF;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 14px;
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 20px rgba(234, 84, 30, 0.3);
    transition: all 0.2s ease;
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(234, 84, 30, 0.4);
}

.btn-submit:active { transform: translateY(0); }

/* DESKTOP SPLIT VIEW IMPROVEMENTS */
@media (min-width: 768px) {
    .mobile-header { display: none; }

    /* Desktop par English ek line me aur Hindi / agla option next line me vertical layout */
    .lang-grid {
        display: grid;
        grid-template-columns: 1fr; /* Har language card next line (Row wise) aayega */
        gap: 12px;
       
    }

    /* Bengali span reset */
    .lang-card[style*="grid-column: span 2"] {
        grid-column: span 1 !important;
    }

    .lang-card {
        padding: 14px 16px;
        justify-content: flex-start; /* Icon aur text left-aligned row wise attractive dikhenge */
    }

    .form-content { 
        flex-direction: row; 
        align-items: stretch;
    }

    .left-section {
        width: 42%;
        border-right: 1px solid var(--border-color);
        padding: 35px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        background: #FAFBFD;
    }

    .right-section {
        width: 58%;
        padding: 35px;
        opacity: 1;
        pointer-events: auto;
    }

    .left-section .brand-header { display: none; }

    #nextBtn {
        display: none;
    }
}

/* MOBILE VIEW ADJUSTMENTS */
@media (max-width: 767px) {
    body {
        background-color: var(--card-bg); /* Mobile me seamless clean look ke liye */
    }

    .main-wrapper {
        padding: 2px !important; /* Extra outer padding hatayi */
        min-height: 100vh;
        min-height: -webkit-fill-available;
        align-items: flex-start;
    }

    .app-card-container {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 0 !important; /* Full edge-to-edge view */
        border: none !important;
        box-shadow: none !important;
        min-height: 100vh;
    }

    .left-section, .right-section {
        padding: 20px 16px !important; /* Mobile me balanced inner padding */
    }

    .desktop-banner { 
        display: none !important; 
    }

    .right-section { 
        display: none; 
    }

    .right-section.mobile-active { 
        display: block; 
    }

    .left-section.mobile-hidden { 
        display: none; 
    }

    /* Preferred Dose Day Grid Fix */
    .days-scroll-container {
        display: flex;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .days-scroll-container::-webkit-scrollbar { 
        display: none; 
    }
    .day-pill label { 
        min-width: 52px; 
    }

    .lang-grid {
        display: grid;
        grid-template-columns: 1fr; /* Har language card next line (Row wise) aayega */
        gap: 12px;
        max-height: 360px ;
        overflow-y: auto;
    }

    /* Bengali span reset */
    .lang-card[style*="grid-column: span 2"] {
        grid-column: span 1 !important;
    }

    .lang-card {
        padding: 14px 16px;
        justify-content: flex-start; /* Icon aur text left-aligned row wise attractive dikhenge */
    }
    .brand-logo {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 36px;

    }
}



/* Feedback Messages */
.feedback-msg {
    font-size: 12px;
    font-weight: 600;
    margin-top: 6px;
    display: none;
}
.feedback-msg.show-error {
    display: block;
    color: #DC2626;
}
.feedback-msg.show-success {
    display: block;
    color: var(--primary);
}
.input-box.is-invalid input, .input-box.is-invalid select {
    border-color: #DC2626 !important;
}
.input-box.is-valid input, .input-box.is-valid select {
    border-color: var(--primary-glow) !important;
}

/* Thank You Page */
.modern-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modern-card {
    background: var(--card-bg);
    border-radius: 24px;
    box-shadow: var(--illuminate-shadow);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 500px;
    overflow: hidden;
}

.modern-banner {
    text-align: center;
    padding: 35px 30px 25px;
    background: linear-gradient(180deg, var(--primary-light) 0%, var(--card-bg) 100%);
    border-bottom: 1px solid var(--border-color);
}

.success-icon-box {
    width: 64px;
    height: 64px;
    background: var(--primary-gradient);
    color: #FFFFFF;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin: 0 auto 16px;
    box-shadow: var(--glow-border);
}

.modern-title {
    color: var(--text-dark);
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 8px 0;
}

.modern-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.details-body {
    padding: 10px 30px 30px;
}

.section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dark);
    margin-bottom: 16px;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 6px;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-item.full-width {
    grid-column: span 2;
}

.info-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.info-label i {
    font-size: 15px;
    color: var(--primary);
}

.info-value {
    font-size: 15px;
    color: var(--text-main);
    font-weight: 600;
    padding-left: 21px;
}

.info-value.highlight {
    font-size: 18px;
    color: var(--primary);
    font-weight: 700;
}

.btn-modern-home {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary-gradient);
    color: #FFFFFF;
    text-decoration: none;
    padding: 14px;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 700;
    transition: all 0.2s ease;
    margin-top: 15px;
    box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-modern-home:hover {
    box-shadow: 0 8px 25px var(--accent-glow);
}