/**
 * Sanmarg Prakashan - Auth Popup Modal Stylesheet
 * File: public/siteassets/css/components/modal/auth-modal.css
 * 2-Column Split Modal Layout (Left: Banner Image | Right: Form Content)
 */

:root {
    --auth-primary: #8B1E1E;
    --auth-primary-hover: #721616;
    --auth-primary-light: rgba(139, 30, 30, 0.08);
    --auth-primary-glow: rgba(139, 30, 30, 0.18);
    --auth-gold: #c59b27;
    --auth-dark: #181c20;
    --auth-muted: #64748b;
    --auth-border: #e2e8f0;
    --auth-border-focus: #8B1E1E;
    --auth-card-bg: #ffffff;
    --auth-radius-outer: 22px;
    --auth-radius-inner: 16px;
    --auth-radius-sm: 10px;
    --auth-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.25), 0 10px 25px -5px rgba(0, 0, 0, 0.08);
}

/* Modal Backdrop & Wrapper */
.sanmarg-auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.sanmarg-auth-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Blurred Frosted Backdrop */
.auth-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
}

/* Modal Dialog Box (Wider for 2-column) */
.auth-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 820px;
    z-index: 2;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.sanmarg-auth-modal.active .auth-modal-dialog {
    transform: translateY(0) scale(1);
}

/* Modal Card Body */
.auth-modal-card {
    position: relative;
    background: var(--auth-card-bg);
    border-radius: var(--auth-radius-outer);
    padding: 18px;
    box-shadow: var(--auth-shadow);
    border: 1px solid rgba(255, 255, 255, 0.85);
    overflow: hidden;
}

/* Close Button (Clean X like reference image) */
.auth-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.auth-modal-close:hover {
    background: #fee2e2;
    color: var(--auth-primary);
    border-color: #fecaca;
    transform: rotate(90deg);
}

/* Two-Column Layout Grid */
.auth-modal-grid {
    display: flex;
    align-items: stretch;
    gap: 20px;
}

/* Left Column: Banner Image */
.auth-modal-media {
    flex: 0 0 46%;
    max-width: 46%;
    position: relative;
    min-height: 480px;
    border-radius: var(--auth-radius-inner);
    overflow: hidden;
    background: #f1f5f9;
}

.auth-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: var(--auth-radius-inner);
    transition: transform 0.3s ease;
}

/* Right Column: Form Content */
.auth-modal-content {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 14px 20px 14px 10px;
}

/* Loader Overlay */
.auth-card-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 20;
    border-radius: var(--auth-radius-inner);
    transition: opacity 0.2s ease;
}

.auth-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(139, 30, 30, 0.15);
    border-top-color: var(--auth-primary);
    border-radius: 50%;
    animation: authSpin 0.75s linear infinite;
}

@keyframes authSpin {
    to { transform: rotate(360deg); }
}

.auth-loader-text {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--auth-dark);
}

/* Header Text (Clean, Centered, No Logo) */
.auth-modal-header {
    margin-bottom: 16px;
}

.auth-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #6e1818;
    margin: 0 0 6px 0;
    letter-spacing: -0.4px;
    font-family: inherit;
}

.auth-modal-subtitle {
    font-size: 13px;
    color: var(--auth-muted);
    margin: 0;
    line-height: 1.45;
}

/* Section Title & Desc (Like Reference Image) */
.auth-section-heading {
    margin-bottom: 18px;
}

.auth-section-title {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--auth-primary);
    margin: 0 0 4px 0;
}

.auth-section-desc {
    font-size: 12px;
    color: var(--auth-muted);
    margin: 0;
    line-height: 1.4;
}

/* Alert Notification Banner */
.auth-modal-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--auth-radius-sm);
    margin-bottom: 16px;
    font-size: 12.5px;
    line-height: 1.4;
    animation: authAlertFadeIn 0.25s ease;
}

@keyframes authAlertFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-modal-alert.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.auth-modal-alert.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.auth-modal-alert.alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.auth-modal-alert .alert-icon {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Modern intl-tel-input (v29) integration */
:root {
    --iti-path-flags-1x: url('/siteassets/vendor/intl-tel-input/img/flags.webp');
    --iti-path-flags-2x: url('/siteassets/vendor/intl-tel-input/img/flags@2x.webp');
}

.auth-phone-row {
    position: relative;
    width: 100%;
}

.auth-phone-row .iti {
    width: 100%;
    display: block;
    position: relative;
}

/* The Phone Input Field */
.auth-phone-row .iti input.auth-phone-input,
.auth-phone-input {
    width: 100%;
    height: 48px;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--auth-dark);
    background: #ffffff;
    border: 1.5px solid var(--auth-border);
    border-radius: 12px;
    outline: none;
    box-sizing: border-box;
    letter-spacing: 0.3px;
    padding-right: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-phone-row .iti input.auth-phone-input:focus,
.auth-phone-input:focus {
    border-color: var(--auth-border-focus);
    box-shadow: 0 0 0 3px var(--auth-primary-glow);
    background: #ffffff;
}

.auth-phone-row .iti input.auth-phone-input::placeholder,
.auth-phone-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

/* Unified Country Selector Button (Left side of input) */
.auth-phone-row .iti__country-container {
    position: absolute;
    top: 1.5px;
    bottom: 1.5px;
    left: 1.5px;
    padding: 0;
    z-index: 2;
}

.auth-phone-row .iti__selected-country {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 10px 0 12px;
    background: #f8fafc;
    border-right: 1.5px solid var(--auth-border);
    border-radius: 10px 0 0 10px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.auth-phone-row .iti__selected-country:hover,
.auth-phone-row .iti__selected-country[aria-expanded="true"] {
    background-color: #f1f5f9;
}

/* Reorder children so it reads: 1: Flag -> 2: Dial Code (+91) -> 3: Arrow (▾) */
.auth-phone-row .iti__selected-country-primary {
    display: contents;
    background: transparent !important;
    padding: 0 !important;
}

.auth-phone-row .iti--has-country-selector .iti__country-container:not(:has(+ input[disabled])):not(:has(+ input[readonly])) .iti__selected-country[aria-expanded=true] .iti__selected-country-primary,
.auth-phone-row .iti--has-country-selector .iti__country-container:not(:has(+ input[disabled])):not(:has(+ input[readonly])) .iti__selected-country:hover .iti__selected-country-primary {
    background: transparent !important;
    background-color: transparent !important;
}

.auth-phone-row .iti__flag {
    order: 1;
    border-radius: 2px;
    box-shadow: 0 0 1px rgba(0, 0, 0, 0.35);
    flex-shrink: 0;
}

.auth-phone-row .iti__selected-dial-code {
    order: 2;
    font-size: 13.5px;
    font-weight: 600;
    color: #1e293b;
    margin-left: 8px;
    letter-spacing: 0.2px;
}

.auth-phone-row .iti__arrow {
    order: 3;
    margin-left: 7px;
    margin-right: 2px;
    width: 6px;
    height: 6px;
    border: none;
    border-right: 1.5px solid #64748b;
    border-bottom: 1.5px solid #64748b;
    transform: rotate(45deg);
    transition: transform 0.2s ease, margin-top 0.2s ease;
}

.auth-phone-row .iti__arrow--up {
    transform: rotate(-135deg);
    margin-top: 3px;
}

/* =============================================================
   COUNTRY DROPDOWN & SEARCH
   ============================================================= */
.iti__country-selector {
    border-radius: 14px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.04);
    background: #ffffff;
    z-index: 10005;
    overflow: hidden;
    margin-top: 6px;
}

/* Search Header Bar */
.iti__search-input-wrapper {
    position: relative;
    padding: 10px 12px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
}

.iti__search-icon {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 3;
}

.iti__search-icon-svg {
    width: 14px;
    height: 14px;
    stroke: #64748b;
    fill: none;
    stroke-width: 2.2;
}

.iti__search-input {
    width: 100%;
    height: 38px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 34px 8px 36px !important;
    font-size: 13.5px;
    font-weight: 500;
    color: #1e293b;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.iti__search-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.iti__search-input:focus {
    border-color: #94a3b8;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.18);
    background: #ffffff;
}

.iti__search-clear {
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.iti__search-clear-svg {
    width: 13px;
    height: 13px;
}

/* Country List in Dropdown */
.iti__country-list {
    max-height: 220px;
    list-style: none;
    padding: 6px 0;
    margin: 0;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.iti__country-list::-webkit-scrollbar {
    width: 6px;
}

.iti__country-list::-webkit-scrollbar-track {
    background: transparent;
}

.iti__country-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.iti__country-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.iti__country {
    padding: 9px 14px;
    font-size: 13.5px;
    font-weight: 500;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.iti__country.iti__highlight {
    background-color: #fef2f2;
    color: var(--auth-primary);
    font-weight: 600;
}

.iti__country-name {
    font-size: 13px;
    flex-grow: 1;
}

.iti__dial-code {
    font-size: 12.5px;
    color: #64748b;
    font-weight: 500;
}

.iti__country.iti__highlight .iti__dial-code {
    color: var(--auth-primary);
}

/* Custom Checkbox */
.auth-form-check {
    margin-top: 10px;
}

.auth-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    cursor: pointer;
    font-size: 12px;
    line-height: 1.45;
    color: #64748b;
    user-select: none;
}

.auth-checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.custom-checkbox {
    width: 17px;
    height: 17px;
    border: 1.5px solid #cbd5e1;
    border-radius: 4px;
    background: #ffffff;
    flex-shrink: 0;
    margin-top: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s ease;
}

.auth-checkbox-label input[type="checkbox"]:checked ~ .custom-checkbox {
    background: var(--auth-primary);
    border-color: var(--auth-primary);
}

.auth-checkbox-label input[type="checkbox"]:checked ~ .custom-checkbox::after {
    content: '';
    width: 4px;
    height: 8px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.checkbox-text a {
    color: #334155;
    text-decoration: underline;
    font-weight: 500;
}

.checkbox-text a:hover {
    color: var(--auth-primary);
}

/* Submit Action Button */
.auth-submit-btn {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, #8B1E1E 0%, #a02222 100%);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(139, 30, 30, 0.25);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-submit-btn:hover {
    background: linear-gradient(135deg, #741717 0%, #8c1e1e 100%);
    box-shadow: 0 6px 18px rgba(139, 30, 30, 0.35);
    transform: translateY(-1px);
}

.auth-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(139, 30, 30, 0.2);
}

.auth-submit-btn .btn-icon {
    font-size: 18px;
    transition: transform 0.2s ease;
}

.auth-submit-btn:hover .btn-icon {
    transform: translateX(3px);
}

.auth-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* OR Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 16px 0 12px;
    text-align: center;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.auth-divider span {
    padding: 0 10px;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* Google Login Button */
.auth-google-btn {
    width: 100%;
    height: 44px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    color: #334155;
    font-size: 13.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.auth-google-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.auth-google-btn .google-icon {
    width: 18px;
    height: 18px;
}

/* Notice Card (For New User Registration) */
.auth-notice-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 14px;
}

.notice-icon-box {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fef3c7;
    color: #b45309;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.notice-content strong {
    display: block;
    font-size: 13px;
    color: #92400e;
    margin-bottom: 2px;
}

.notice-content p {
    font-size: 11.5px;
    color: #b45309;
    margin: 0;
    line-height: 1.35;
}

/* Phone Number Pill (Active Number Context) */
.auth-phone-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 8px 12px;
}

.auth-phone-pill .pill-left {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    color: #475569;
}

.auth-phone-pill .pill-icon {
    font-size: 17px;
    color: var(--auth-primary);
}

.auth-phone-pill .pill-label {
    color: #64748b;
    font-size: 11.5px;
}

.auth-phone-pill .pill-number {
    font-weight: 700;
    color: var(--auth-dark);
}

.pill-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: transparent;
    border: none;
    color: var(--auth-primary);
    font-size: 12px;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.18s ease;
}

.pill-action-btn:hover {
    background: var(--auth-primary-light);
}

/* Step 2 Inputs */
.auth-form-group {
    margin-bottom: 14px;
}

.auth-form-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12.5px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.auth-form-label .required-star {
    color: #dc2626;
    font-size: 13px;
}

.auth-form-control {
    width: 100%;
    height: 46px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--auth-dark);
    background: #ffffff;
    border: 1.5px solid var(--auth-border);
    border-radius: 12px;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.auth-form-control:focus {
    border-color: var(--auth-border-focus);
    box-shadow: 0 0 0 3px var(--auth-primary-glow);
}

.auth-input-wrapper {
    position: relative;
    width: 100%;
}

.auth-input-wrapper .input-addon-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #94a3b8;
    pointer-events: none;
    transition: color 0.2s ease;
}

.auth-form-control.with-icon {
    padding-left: 40px;
}

.auth-input-wrapper .auth-form-control:focus + .input-addon-icon,
.auth-form-control.with-icon:focus ~ .input-addon-icon {
    color: var(--auth-primary);
}

.auth-optional-badge {
    font-size: 11px;
    font-weight: 500;
    color: #94a3b8;
    margin-left: 4px;
}

.auth-date-control {
    font-size: 13px;
    color: #334155;
    cursor: pointer;
    background-color: #ffffff !important;
}

.auth-date-control[readonly] {
    background-color: #ffffff !important;
}

/* ==========================================================================
   Flatpickr Datepicker Custom Theme for Sanmarg Prakashan Auth Modal
   ========================================================================== */
.flatpickr-calendar {
    z-index: 100005 !important;
    font-family: inherit !important;
    border-radius: 14px !important;
    box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(15, 23, 42, 0.08) !important;
    border: none !important;
    padding: 12px 14px 14px !important;
    background: #ffffff !important;
    width: 310px !important;
    box-sizing: border-box !important;
}

.flatpickr-calendar.arrowTop:before,
.flatpickr-calendar.arrowTop:after {
    border-bottom-color: #ffffff !important;
}

.flatpickr-calendar.arrowBottom:before,
.flatpickr-calendar.arrowBottom:after {
    border-top-color: #ffffff !important;
}

/* Header Row: Month / Year on Left | Prev / Next on Right */
.flatpickr-months {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 40px !important;
    padding: 0 0 6px 0 !important;
    border-bottom: 1px solid #f1f5f9 !important;
    margin-bottom: 8px !important;
    background: transparent !important;
}

.flatpickr-months .flatpickr-month {
    position: static !important;
    height: 100% !important;
    overflow: visible !important;
    display: flex !important;
    align-items: center !important;
    flex: 1 1 auto !important;
    order: 1 !important;
    text-align: left !important;
}

.flatpickr-current-month {
    position: static !important;
    left: auto !important;
    top: auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 0 !important;
    width: auto !important;
    height: 100% !important;
    transform: none !important;
    line-height: normal !important;
}

/* Month Dropdown */
.flatpickr-current-month .flatpickr-monthDropdown-months {
    appearance: none !important;
    -webkit-appearance: none !important;
    background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    padding: 4px 22px 4px 9px !important;
    cursor: pointer !important;
    height: 32px !important;
    line-height: normal !important;
    outline: none !important;
    transition: all 0.2s ease !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months:hover,
.flatpickr-current-month .flatpickr-monthDropdown-months:focus {
    border-color: var(--auth-primary) !important;
    background-color: #ffffff !important;
}

/* Year Number Input with Default Increase / Decrease Buttons */
.flatpickr-current-month .numInputWrapper {
    width: 72px !important;
    height: 32px !important;
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
}

.flatpickr-current-month .numInputWrapper:hover,
.flatpickr-current-month .numInputWrapper:focus-within {
    border-color: var(--auth-primary) !important;
    background-color: #ffffff !important;
}

.flatpickr-current-month input.cur-year {
    width: 100% !important;
    height: 30px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    padding: 0 20px 0 8px !important;
    text-align: left !important;
    box-sizing: border-box !important;
    outline: none !important;
    cursor: text !important;
    line-height: 30px !important;
    margin: 0 !important;
}

/* Increase button (arrowUp) & Decrease button (arrowDown) */
.flatpickr-current-month .numInputWrapper span {
    position: absolute !important;
    right: 2px !important;
    width: 16px !important;
    height: 14px !important;
    padding: 0 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0.8 !important;
    transition: opacity 0.15s ease, background-color 0.15s ease !important;
    border-radius: 3px !important;
    box-sizing: border-box !important;
}

.flatpickr-current-month .numInputWrapper span:hover {
    opacity: 1 !important;
    background: var(--auth-primary-light) !important;
}

.flatpickr-current-month .numInputWrapper span.arrowUp {
    top: 2px !important;
}

.flatpickr-current-month .numInputWrapper span.arrowDown {
    bottom: 2px !important;
    top: auto !important;
}

.flatpickr-current-month .numInputWrapper span.arrowUp:after {
    content: "" !important;
    display: block !important;
    width: 0 !important;
    height: 0 !important;
    border-left: 3.5px solid transparent !important;
    border-right: 3.5px solid transparent !important;
    border-bottom: 4px solid #475569 !important;
    border-top: none !important;
}

.flatpickr-current-month .numInputWrapper span.arrowDown:after {
    content: "" !important;
    display: block !important;
    width: 0 !important;
    height: 0 !important;
    border-left: 3.5px solid transparent !important;
    border-right: 3.5px solid transparent !important;
    border-top: 4px solid #475569 !important;
    border-bottom: none !important;
}

.flatpickr-current-month .numInputWrapper span.arrowUp:hover:after {
    border-bottom-color: var(--auth-primary) !important;
}

.flatpickr-current-month .numInputWrapper span.arrowDown:hover:after {
    border-top-color: var(--auth-primary) !important;
}

/* Navigation Arrows (Prev & Next) */
.flatpickr-prev-month,
.flatpickr-next-month {
    position: static !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    height: 30px !important;
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    border-radius: 8px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.18s ease !important;
    padding: 0 !important;
    margin: 0 !important;
    color: #475569 !important;
    fill: #475569 !important;
    transform: none !important;
}

.flatpickr-prev-month {
    order: 2 !important;
    margin-right: 4px !important;
}

.flatpickr-next-month {
    order: 3 !important;
}

.flatpickr-prev-month svg,
.flatpickr-next-month svg {
    width: 12px !important;
    height: 12px !important;
    fill: currentColor !important;
    stroke: currentColor !important;
    stroke-width: 1 !important;
    vertical-align: middle !important;
}

.flatpickr-prev-month:hover,
.flatpickr-next-month:hover {
    background: var(--auth-primary-light) !important;
    border-color: rgba(139, 30, 30, 0.25) !important;
    color: var(--auth-primary) !important;
    fill: var(--auth-primary) !important;
}

/* Weekday Row: 7 Equal Columns */
.flatpickr-weekdays {
    width: 100% !important;
    height: 30px !important;
    display: flex !important;
    align-items: center !important;
    margin-bottom: 2px !important;
}

.flatpickr-weekdaycontainer {
    width: 100% !important;
    display: flex !important;
}

.flatpickr-calendar span.flatpickr-weekday {
    width: 14.2857% !important;
    flex: 0 0 14.2857% !important;
    max-width: 14.2857% !important;
    text-align: center !important;
    color: #94a3b8 !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    line-height: 30px !important;
}

/* Days Container: Strict 7-Column Grid */
.flatpickr-days {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
}

.dayContainer {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    padding: 0 !important;
    outline: 0 !important;
    box-sizing: border-box !important;
}

.flatpickr-day {
    flex: 0 0 14.2857% !important;
    max-width: 14.2857% !important;
    width: 14.2857% !important;
    height: 36px !important;
    line-height: 36px !important;
    margin: 1px 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    font-size: 13px !important;
    color: #334155 !important;
    border: 1px solid transparent !important;
    transition: all 0.15s ease !important;
    cursor: pointer !important;
}

.flatpickr-day:hover {
    background: var(--auth-primary-light) !important;
    color: var(--auth-primary) !important;
    border-color: transparent !important;
}

.flatpickr-day.today {
    border-color: var(--auth-primary) !important;
    color: var(--auth-primary) !important;
    background: transparent !important;
    font-weight: 700 !important;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.selected:focus {
    background: var(--auth-primary) !important;
    color: #ffffff !important;
    border-color: var(--auth-primary) !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 10px var(--auth-primary-glow) !important;
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
    color: #cbd5e1 !important;
    font-weight: 400 !important;
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
    color: #e2e8f0 !important;
    cursor: not-allowed !important;
}

.auth-field-hint {
    display: block;
    font-size: 11px;
    color: #64748b;
    margin-top: 4px;
}

/* Step 3: 6-Digit OTP Container */
.auth-otp-container {
    width: 100%;
}

.auth-otp-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
}

.auth-otp-box {
    width: 44px;
    height: 50px;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    color: var(--auth-dark);
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    outline: none;
    transition: all 0.18s ease;
    caret-color: var(--auth-primary);
    box-sizing: border-box;
}

.auth-otp-box:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px var(--auth-primary-glow);
    transform: translateY(-2px);
}

.auth-otp-box.filled {
    border-color: var(--auth-primary);
}

/* Resend OTP Row */
.auth-resend-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #64748b;
}

.auth-resend-row .resend-countdown strong {
    color: var(--auth-primary);
    font-weight: 700;
}

.auth-resend-trigger {
    background: transparent;
    border: none;
    color: var(--auth-primary);
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 3px 5px;
    border-radius: 6px;
    transition: all 0.18s ease;
}

.auth-resend-trigger:hover:not(:disabled) {
    background: var(--auth-primary-light);
    color: var(--auth-primary-hover);
}

.auth-resend-trigger:disabled {
    color: #94a3b8;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Shake Animation for Invalid OTP */
@keyframes authShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.auth-otp-row.shake {
    animation: authShake 0.4s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .auth-modal-dialog {
        max-width: 460px;
    }

    .auth-modal-grid {
        flex-direction: column;
    }

    .auth-modal-media {
        display: none; /* Hide banner on mobile to keep keyboard-friendly form compact */
    }

    .auth-modal-content {
        padding: 16px 8px 8px;
    }

    .auth-modal-card {
        padding: 24px 18px 20px;
        border-radius: 18px;
    }

    .auth-modal-title {
        font-size: 21px;
    }
}

@media (max-width: 480px) {
    .auth-otp-box {
        width: 38px;
        height: 46px;
        font-size: 18px;
        border-radius: 8px;
    }

    .auth-otp-row {
        gap: 5px;
    }
}
