/* Design Tokens & Theme Variables */
:root {
    --primary: #0a5c36;
    --primary-rgb: 10, 92, 54;
    --primary-hover: #074528;
    --primary-light: #e6f4ea;
    --accent: #c69214;
    --accent-rgb: 198, 146, 20;
    --accent-hover: #a3750d;
    --bg-grad-1: #f9fbf9;
    --bg-grad-2: #e3ede6;
    --bg-grad-3: #c9e0d1;
    
    --text-main: #1e293b;
    --text-muted: #64748b;
    
    --error: #e11d48;
    --error-light: #fff1f2;
    --error-border: #fca5a5;
    
    --success: #10b981;
    --success-light: #ecfdf5;
    --success-border: #a7f3d0;
    
    --input-bg: rgba(255, 255, 255, 0.7);
    --input-bg-focus: rgba(255, 255, 255, 0.95);
    --input-border: rgba(10, 92, 54, 0.15);
    --input-focus-border: #0a5c36;
    
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.75);
    --glass-shadow: rgba(10, 92, 54, 0.08);
}

/* ===== Constellation Particle Canvas ===== */
.particle-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* ===== Modern DatePicker ===== */
.custom-datepicker {
    position: relative;
    width: 100%;
}

.datepicker-input-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--input-border);
    border-radius: 10px;
    background: var(--input-bg);
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.015);
}

.datepicker-input-wrap:hover {
    border-color: rgba(10, 92, 54, 0.4);
    background: var(--input-bg-focus);
}

.datepicker-input-wrap:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(10, 92, 54, 0.08);
    background: #ffffff;
}

.datepicker-display {
    flex: 1;
    padding: 0.85rem 1.1rem;
    border: none;
    background: transparent;
    font-size: 0.9rem;
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', sans-serif;
    outline: none;
    cursor: pointer;
    font-weight: 500;
}

.datepicker-display::placeholder { color: var(--text-muted); font-weight: 400; }

.datepicker-icon-btn {
    flex-shrink: 0;
    width: 40px;
    background: transparent;
    border: none;
    border-left: 1px solid rgba(10, 92, 54, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    transition: background 0.2s ease;
}

.datepicker-icon-btn:hover { background: var(--primary-light); }
.datepicker-icon-btn svg   { width: 15px; height: 15px; stroke: var(--primary); }

/* Calendar floating panel — moved to body, position:fixed via JS */
.datepicker-panel {
    position: fixed;
    min-width: 260px;
    background: #ffffff;
    border: 1.5px solid transparent;
    border-radius: 14px;
    z-index: 9999;
    padding: 0.65rem 0.75rem;
    box-shadow: 0 18px 44px rgba(10, 92, 54, 0.14);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.16,1,0.3,1), visibility 0.22s;
}

.datepicker-panel.open {
    opacity: 1;
    border-color: var(--primary);
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Calendar header */
.dp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.dp-nav {
    width: 24px; height: 24px;
    border: none;
    background: var(--primary-light);
    border-radius: 6px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.18s ease;
    padding: 0;
    flex-shrink: 0;
}

.dp-nav:hover { background: rgba(10, 92, 54, 0.18); }
.dp-nav svg   { width: 12px; height: 12px; stroke: var(--primary); }

.dp-title {
    display: flex; gap: 0.4rem; align-items: center;
    font-family: 'Outfit', sans-serif;
}

.dp-month-name {
    font-size: 0.82rem; font-weight: 700; color: var(--primary);
}

.dp-year-badge {
    font-size: 0.73rem; font-weight: 600; color: var(--text-muted);
    background: var(--primary-light);
    padding: 0.05rem 0.35rem; border-radius: 5px;
}

/* Weekday labels */
.dp-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 0.3rem;
}

.dp-weekdays span {
    text-align: center;
    font-size: 0.63rem; font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.3px;
    text-transform: uppercase;
    padding: 0.1rem 0;
}

/* Day grid */
.dp-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.dp-day {
    aspect-ratio: 1;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.dp-day:hover:not(.empty) {
    background: var(--primary-light);
    color: var(--primary);
    transform: scale(1.08);
}

.dp-day.today {
    background: rgba(10, 92, 54, 0.1);
    color: var(--primary);
    font-weight: 700;
}

.dp-day.selected {
    background: var(--primary);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(10, 92, 54, 0.28);
    transform: scale(1.08);
}

.dp-day.empty { cursor: default; }

/* Error / Valid states */
.form-group.has-error .datepicker-input-wrap {
    border-color: var(--error);
    background: var(--error-light);
}

.form-group.has-error .datepicker-icon-btn {
    border-left-color: rgba(225, 29, 72, 0.2);
}

.form-group.is-valid .datepicker-input-wrap {
    border-color: var(--success);
}


/* Global Reset & Typography */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-main);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    position: relative;
    overflow: hidden;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
}
::-webkit-scrollbar-thumb {
    background: rgba(10, 92, 54, 0.2);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(10, 92, 54, 0.4);
}

/* Ambient Floating Background Orbs */
.bg-orbs {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-grad-1) 0%, var(--bg-grad-2) 50%, var(--bg-grad-3) 100%);
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.5;
    animation: floatOrb 22s infinite alternate ease-in-out;
}

.orb-1 {
    width: 480px;
    height: 480px;
    background: rgba(10, 92, 54, 0.14);
    top: -8%;
    left: -10%;
    animation-duration: 18s;
}

.orb-2 {
    width: 580px;
    height: 580px;
    background: rgba(198, 146, 20, 0.11);
    bottom: -15%;
    right: -8%;
    animation-duration: 25s;
}

.orb-3 {
    width: 380px;
    height: 380px;
    background: rgba(16, 185, 129, 0.07);
    top: 40%;
    left: 45%;
    animation-duration: 20s;
}

@keyframes floatOrb {
    0% {
        transform: translate(0, 0) scale(1);
    }
    100% {
        transform: translate(60px, 40px) scale(1.1);
    }
}

/* Premium Glass Container */
.glass-container {
    max-width: 820px;
    width: calc(100% - 2rem);
    max-height: 98vh;
    border-radius: 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(18px) saturate(190%);
    -webkit-backdrop-filter: blur(18px) saturate(190%);
    border: 1px solid var(--glass-border);
    box-shadow: 0 16px 40px -10px var(--glass-shadow), 
                inset 0 1px 2px rgba(255, 255, 255, 0.4);
    overflow-y: auto;
    overflow-x: hidden;
    animation: slideUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    display: flex;
    flex-direction: column;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Brand Header */
.form-header {
    background: linear-gradient(135deg, #ffffff 0%, #f0f8f3 100%);
    color: var(--primary);
    padding: 1.2rem 2rem 1.4rem;
    text-align: center;
    position: relative;
    border-bottom: 1px solid rgba(10, 92, 54, 0.1);
    flex-shrink: 0;
}

.form-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--accent), var(--primary), transparent);
}

.brand-logo {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: auto;
    height: auto;
    max-width: 200px;
    max-height: 130px;
    background: transparent;
    margin-bottom: 0.4rem;
    filter: drop-shadow(0 2px 6px rgba(10, 92, 54, 0.12));
}

.brand-logo svg {
    width: 24px;
    height: 24px;
}

.form-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--primary);
}

.form-header p {
    font-size: 0.75rem;
    opacity: 0.75;
    margin-top: 0.15rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--accent-hover);
}

/* Step Progress Wizard Tracker */
.steps-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 3rem;
    background: rgba(255, 255, 255, 0.3);
    border-bottom: 1px solid rgba(10, 92, 54, 0.05);
    flex-shrink: 0;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    z-index: 1;
}

.step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--input-border);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: all 0.4s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.step-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.4s ease;
}

.step-line {
    flex: 1;
    height: 3px;
    background: rgba(10, 92, 54, 0.1);
    margin: 0 1.2rem;
    margin-top: -1.5rem;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

/* Interactive progress lines */
.step-indicator.active .step-num {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 0 0 4px rgba(10, 92, 54, 0.15);
}

.step-indicator.active .step-label {
    color: var(--primary);
    font-weight: 700;
}

.step-indicator.completed .step-num {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.step-indicator.completed .step-label {
    color: var(--accent-hover);
}

/* Form Styles & Grid */
form {
    padding: 1rem 2.2rem;
    flex: 1;
}

.step-content {
    display: none;
    opacity: 0;
    transform: translateX(25px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.step-content.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    position: relative;
}

.form-group.full-width {
    grid-column: span 2;
}

/* Elegant Floating Label Inputs */
.input-wrapper {
    position: relative;
    width: 100%;
}

.input-wrapper input,
.input-wrapper select,
.input-wrapper textarea {
    width: 100%;
    padding: 0.85rem 1.1rem;
    border: 1px solid var(--input-border);
    border-radius: 10px;
    background: var(--input-bg);
    font-size: 0.9rem;
    color: var(--text-main);
    outline: none;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.015);
    font-family: inherit;
}

.input-wrapper textarea {
    min-height: 72px;
    resize: none;
}

.input-wrapper label {
    position: absolute;
    left: 1.1rem;
    top: 0.9rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Textarea label starts higher up */
.input-wrapper textarea + label {
    top: 0.9rem;
}

.required {
    color: var(--error);
    margin-left: 1px;
}

/* Float Label Animation Trigger */
.input-wrapper input:focus + label,
.input-wrapper input:not(:placeholder-shown) + label,
.input-wrapper textarea:focus + label,
.input-wrapper textarea:not(:placeholder-shown) + label {
    top: 0;
    left: 0.8rem;
    transform: translateY(-50%) scale(0.8);
    font-weight: 700;
    color: var(--primary);
    background: #ffffff;
    padding: 0 0.4rem;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

/* Static Float Groups for Date and Dropdowns */
.form-group.float-static .input-wrapper label {
    top: 0;
    left: 0.8rem;
    transform: translateY(-50%) scale(0.8);
    font-weight: 700;
    color: var(--primary);
    background: #ffffff;
    padding: 0 0.4rem;
    border-radius: 4px;
}

/* Modern Custom Select Dropdown */
.input-wrapper select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 3rem;
    cursor: pointer;
    background-color: var(--input-bg);
    /* Animated chevron SVG arrow */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%230a5c36' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    background-size: 1rem;
    font-weight: 500;
    color: var(--text-main);
    transition: all 0.3s ease;
}

.input-wrapper select:focus {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%230a5c36' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='18 15 12 9 6 15'%3E%3C/polyline%3E%3C/svg%3E");
}

/* Style native option items */
.input-wrapper select option {
    background: #ffffff;
    color: var(--text-main);
    font-size: 0.9rem;
    padding: 0.5rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.input-wrapper select option:checked,
.input-wrapper select option:hover {
    background: var(--primary-light);
    color: var(--primary);
}

/* Focus and hover glows */
.input-wrapper input:hover,
.input-wrapper select:hover,
.input-wrapper textarea:hover {
    border-color: rgba(10, 92, 54, 0.35);
    background: var(--input-bg-focus);
}

.input-wrapper input:focus,
.input-wrapper select:focus,
.input-wrapper textarea:focus {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(10, 92, 54, 0.08), 
                inset 0 2px 4px rgba(0, 0, 0, 0.01);
}

/* Focus border slider line — disabled */
.focus-border { display: none; }

/* Real-Time Form Validation States */
.form-group.has-error .input-wrapper input,
.form-group.has-error .input-wrapper select,
.form-group.has-error .input-wrapper textarea {
    border-color: var(--error);
    background-color: var(--error-light);
}

.form-group.has-error .input-wrapper label {
    color: var(--error) !important;
}

.form-group.has-error .focus-border {
    background: var(--error);
}

.form-group .error-msg {
    font-size: 0.725rem;
    font-weight: 600;
    color: var(--error);
    margin-left: 0.3rem;
    opacity: 0;
    height: 0;
    overflow: hidden;
    transition: all 0.25s ease;
}

.form-group.has-error .error-msg {
    opacity: 1;
    height: auto;
    margin-top: 0.15rem;
}

/* Validation Valid green check */
.form-group.is-valid .input-wrapper input,
.form-group.is-valid .input-wrapper select,
.form-group.is-valid .input-wrapper textarea {
    border-color: var(--success);
}

.form-group.is-valid .input-wrapper::after {
    content: '';
    position: absolute;
    right: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
}

.form-group.is-valid.float-static .input-wrapper::after {
    /* Offset right slightly if dropdown menu arrows exist */
    right: 2.3rem;
}

.form-group.float-static#group-dob .input-wrapper::after,
.form-group.float-static#group-doj .input-wrapper::after {
    /* Remove checkmark on dates to avoid overlaying the default date picker icons */
    display: none;
}

/* Button layout & interactions */
.btn-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(10, 92, 54, 0.05);
}

.action-btn {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    padding: 0.95rem 1.8rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    outline: none;
}

.btn-icon {
    width: 1.1rem;
    height: 1.1rem;
}

.next-btn, .submit-btn {
    background: var(--primary);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(10, 92, 54, 0.22);
}

.next-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 92, 54, 0.3);
}

.submit-btn {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(198, 146, 20, 0.25);
    position: relative;
    overflow: hidden;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(198, 146, 20, 0.38);
}

.prev-btn {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(10, 92, 54, 0.15);
}

.prev-btn:hover {
    color: var(--primary);
    background: rgba(10, 92, 54, 0.05);
    border-color: var(--primary);
}

.action-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Spinner element for submitting states */
.btn-spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top: 2.5px solid white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    position: absolute;
    right: 1.5rem;
}

.btn-spinner.hidden {
    display: none;
}

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

/* ================= SUCCESS MODAL OVERLAY ================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 92, 54, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    padding: 1rem;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.success-card {
    background: #ffffff;
    max-width: 480px;
    width: 100%;
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    border: 1px solid rgba(10, 92, 54, 0.1);
    box-shadow: 0 24px 48px rgba(10, 92, 54, 0.15);
    transform: translateY(40px) scale(0.95);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.15);
}

.modal-overlay.active .success-card {
    transform: translateY(0) scale(1);
}

.success-icon-wrapper {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--success-light);
    border: 2px solid var(--success-border);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
}

/* Interactive Drawing Checkmark Animation */
.checkmark-svg {
    width: 38px;
    height: 38px;
    stroke: var(--success);
    stroke-width: 4;
}

.checkmark-circle {
    stroke: var(--success);
    stroke-width: 4;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-linecap: round;
    fill: none;
    animation: drawCircle 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke-linecap: round;
    animation: drawCheck 0.4s cubic-bezier(0.65, 0, 0.45, 1) 0.5s forwards;
}

@keyframes drawCircle {
    to { stroke-dashoffset: 0; }
}

@keyframes drawCheck {
    to { stroke-dashoffset: 0; }
}

.success-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.6rem;
}

.success-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.success-desc strong {
    color: var(--text-main);
    font-weight: 700;
}

/* Submitted Record details card inside Success popup */
.details-summary {
    background: var(--primary-light);
    border: 1px solid rgba(10, 92, 54, 0.08);
    border-radius: 12px;
    padding: 1.2rem;
    text-align: left;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.summary-row span {
    color: var(--text-muted);
    font-weight: 500;
}

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

.modal-close-btn {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    width: 100%;
    padding: 1rem;
    border-radius: 10px;
    border: none;
    background: var(--primary);
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(10, 92, 54, 0.2);
    transition: all 0.3s ease;
}

.modal-close-btn:hover {
    background: var(--primary-hover);
    box-shadow: 0 6px 18px rgba(10, 92, 54, 0.3);
}

/* ================= MOBILE OPTIMIZATIONS ================= */
@media (max-width: 768px) {
    body {
        padding: 1rem 0.5rem;
    }
    
    .glass-container {
        border-radius: 14px;
    }

    .form-header {
        padding: 1.8rem 1rem;
    }

    .form-header h2 {
        font-size: 1.5rem;
    }

    .steps-progress {
        padding: 1.2rem 1.5rem;
    }

    .step-label {
        font-size: 0.725rem;
    }

    form {
        padding: 1.2rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .form-group.full-width {
        grid-column: span 1;
    }

    .btn-group {
        margin-top: 1.6rem;
        padding-top: 1.2rem;
    }

    .action-btn {
        padding: 0.85rem 1.4rem;
        font-size: 0.925rem;
    }

    .success-card {
        padding: 1.8rem;
    }
}

/* ================= MODERN CUSTOM DROPDOWN ================= */
.custom-dropdown {
    position: relative;
    width: 100%;
}

.custom-dropdown-trigger {
    width: 100%;
    padding: 0.85rem 1.1rem;
    border: 1.5px solid var(--input-border);
    border-radius: 10px;
    background: var(--input-bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.015);
    user-select: none;
}

.custom-dropdown-trigger:hover {
    border-color: rgba(10, 92, 54, 0.4);
    background: var(--input-bg-focus);
}

.custom-dropdown.open .custom-dropdown-trigger {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(10, 92, 54, 0.08);
    border-radius: 10px;
}

.custom-dropdown-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', sans-serif;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-dropdown-value.placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.dropdown-chevron {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    margin-left: 0.5rem;
    color: var(--primary);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.custom-dropdown.open .dropdown-chevron {
    transform: rotate(180deg);
}

/* Dropdown panel — moved to body, position:fixed via JS */
.dropdown-panel {
    position: fixed;
    background: #ffffff;
    border: 1.5px solid transparent;
    border-radius: 10px;
    z-index: 9999;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
    box-shadow: 0 12px 28px rgba(10, 92, 54, 0.12);
}

.dropdown-panel.open {
    max-height: 220px;
    border-color: var(--primary);
    visibility: visible;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Scrollbar inside dropdown */
.dropdown-panel::-webkit-scrollbar { width: 5px; }
.dropdown-panel::-webkit-scrollbar-thumb { background: rgba(10, 92, 54, 0.2); border-radius: 4px; }

/* Search box */
.dropdown-search-wrap {
    padding: 0.55rem 0.75rem;
    background: #fff;
    border-bottom: 1px solid rgba(10, 92, 54, 0.07);
    position: sticky;
    top: 0;
    z-index: 1;
}

.dropdown-search {
    width: 100%;
    padding: 0.42rem 0.75rem;
    border: 1.5px solid rgba(10, 92, 54, 0.18);
    border-radius: 7px;
    font-size: 0.82rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    outline: none;
    color: var(--text-main);
    background: var(--primary-light);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dropdown-search:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(10, 92, 54, 0.08);
}

/* Options list */
.dropdown-options {
    list-style: none;
    margin: 0;
    padding: 0.35rem 0;
}

.dropdown-option {
    padding: 0.6rem 1rem;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    transition: background 0.15s ease, color 0.15s ease;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.dropdown-option:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.dropdown-option.selected {
    color: var(--primary);
    font-weight: 700;
    background: rgba(10, 92, 54, 0.06);
}

.dropdown-option svg {
    flex-shrink: 0;
    stroke: var(--primary);
}

.dropdown-no-results {
    padding: 0.8rem 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    font-style: italic;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Floating label for custom dropdown */
.dropdown-float-label {
    position: absolute;
    top: 0;
    left: 0.8rem;
    transform: translateY(-50%) scale(0.8);
    font-weight: 700;
    color: var(--primary);
    background: #ffffff;
    padding: 0 0.4rem;
    border-radius: 4px;
    font-size: 0.9rem;
    pointer-events: none;
    font-family: 'Plus Jakarta Sans', sans-serif;
    z-index: 1;
}

/* Error state */
.form-group.has-error .custom-dropdown-trigger {
    border-color: var(--error);
    background-color: var(--error-light);
}

.form-group.has-error .dropdown-float-label {
    color: var(--error) !important;
}

.form-group.has-error .custom-dropdown.open .dropdown-panel {
    border-color: var(--error);
}

/* Valid state */
.form-group.is-valid .custom-dropdown-trigger {
    border-color: var(--success);
}

/* ================= CUSTOM CHECKBOX GROUPS ================= */
.section-sub-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    margin-left: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

/* Focus color change on label */
.form-group:focus-within .section-sub-label {
    color: var(--primary);
}

.checkbox-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 1px solid var(--input-border);
    border-radius: 10px;
    background: var(--input-bg);
    transition: all 0.3s ease;
}

.checkbox-group:hover {
    border-color: rgba(10, 92, 54, 0.35);
    background: var(--input-bg-focus);
}

.form-group:focus-within .checkbox-group {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(10, 92, 54, 0.08);
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    cursor: pointer;
    user-select: none;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    transition: color 0.2s ease;
}

.checkbox-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    background: #ffffff;
    border: 1.5px solid var(--input-border);
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.25s ease;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.checkbox-item:hover .checkbox-custom {
    border-color: var(--primary);
    background: var(--primary-light);
}

.checkbox-item input[type="checkbox"]:checked ~ .checkbox-custom {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 4px 8px rgba(10, 92, 54, 0.15);
}

.checkbox-custom::after {
    content: '';
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.2s cubic-bezier(0.12, 0.4, 0.29, 1.46);
    margin-top: -2px;
}

.checkbox-item input[type="checkbox"]:checked ~ .checkbox-custom::after {
    transform: rotate(45deg) scale(1);
}

.checkbox-item input[type="checkbox"]:checked ~ .checkbox-text {
    color: var(--primary);
    font-weight: 600;
}

/* Red error border state for Checkbox Group */
.form-group.has-error .checkbox-group {
    border-color: var(--error);
    background-color: var(--error-light);
}

.form-group.has-error .section-sub-label {
    color: var(--error) !important;
}

/* Valid state border check for Checkbox Group */
.form-group.is-valid .checkbox-group {
    border-color: var(--success);
}

/* Mobile Optimizations for Checkbox Group */
@media (max-width: 480px) {
    .checkbox-group {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }
}

/* ================= FOOTER STYLING ================= */
.form-footer {
    text-align: center;
    padding: 0.75rem 2rem;
    background: rgba(10, 92, 54, 0.03);
    border-top: 1px solid rgba(10, 92, 54, 0.08);
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    animation: fadeInFooter 1s ease 0.6s forwards;
    opacity: 0;
    flex-shrink: 0;
}

@keyframes fadeInFooter {
    to { opacity: 1; }
}

.form-footer p {
    margin-bottom: 0.4rem;
}

.form-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.form-footer a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.form-footer .whatsapp-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.form-footer .whatsapp-link:hover {
    color: #25d366;
    text-decoration: none;
}

.form-footer .complaint-link {
    display: inline-block;
    background: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
    margin-left: 2px;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: rgba(10, 92, 54, 0.4);
}

.form-footer .complaint-link:hover {
    background: transparent;
    border: none;
    color: var(--accent-hover);
    text-decoration: underline;
    text-decoration-color: var(--accent);
}

/* ================= ADMIN COG STYLING ================= */
.admin-settings-link {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-settings-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.15);
    transform: rotate(45deg);
}

.admin-settings-link svg {
    width: 20px;
    height: 20px;
}




