/* ==========================================
   Iftar Platform — Custom Styles (RTL)
   ========================================== */

:root {
    --primary: #1a6b3c;
    --primary-light: #2d9254;
    --primary-dark: #0e4a28;
    --primary-subtle: rgba(26,107,60,0.06);
    --accent: #c8a951;
    --accent-light: #f0dfa0;
    --accent-subtle: rgba(200,169,81,0.10);
    --bg-light: #f5f7f9;
    --bg-card: #ffffff;
    --text-dark: #1e293b;
    --text-body: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-focus: var(--primary);
    --shadow-xs: 0 1px 3px rgba(0,0,0,0.04);
    --shadow: 0 2px 16px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 24px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 32px rgba(0,0,0,0.10);
    --radius: 14px;
    --radius-sm: 10px;
    --radius-xs: 8px;
    --transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
}

* { box-sizing: border-box; }

/* Google Places Autocomplete dropdown must be above all elements */
.pac-container { z-index: 10000 !important; }

body {
    font-family: 'Tajawal', 'Segoe UI', system-ui, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    min-height: 100vh;
    direction: rtl;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* ── Navbar ── */
.navbar-custom {
    background: #fff;
    box-shadow: 0 1px 0 var(--border), 0 4px 20px rgba(0,0,0,0.04);
    padding: 0.4rem 1rem;
    border-bottom: 3px solid var(--primary);
    min-height: 56px;
}

.navbar-custom .navbar-brand {
    color: var(--primary-dark);
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
    padding: 0.3rem 0;
}
.navbar-custom .navbar-brand img { transition: transform 0.2s; }
.navbar-custom .navbar-brand:hover img { transform: scale(1.05); }

.navbar-custom .nav-link {
    color: var(--text-body);
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    margin: 0 1px;
    white-space: nowrap;
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
    color: var(--primary);
    background: var(--primary-subtle);
}

.navbar-custom .nav-link i {
    font-size: 0.9rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.navbar-custom .nav-link:hover i { opacity: 1; }

.navbar-custom .navbar-toggler {
    border: 2px solid var(--primary);
    border-radius: 10px;
    padding: 0.35rem 0.65rem;
    color: var(--primary);
}
.navbar-custom .navbar-toggler:focus { box-shadow: 0 0 0 3px rgba(26,107,60,0.15); }

.navbar-custom .navbar-toggler-icon {
    filter: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%231a6b3c' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-custom .dropdown-toggle { color: var(--primary-dark); font-weight: 600; }
.navbar-custom .dropdown-toggle::after {
    font-size: 0.65rem;
    vertical-align: 0.15em;
    margin-right: 2px;
    opacity: 0.5;
}

.navbar-custom .dropdown-menu {
    border: 1px solid #e8efe8;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
    padding: 0.4rem;
    margin-top: 0.3rem;
    min-width: 200px;
    animation: navDropIn 0.18s ease-out;
}
@keyframes navDropIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.navbar-custom .dropdown-item {
    border-radius: 8px;
    padding: 0.55rem 1rem;
    font-size: 0.87rem;
    font-weight: 500;
    color: var(--text-body);
    transition: all 0.15s ease;
}
.navbar-custom .dropdown-item i {
    color: var(--primary);
    font-size: 0.85rem;
    opacity: 0.6;
    transition: opacity 0.15s;
}
.navbar-custom .dropdown-item:hover {
    background: var(--primary-subtle);
    color: var(--primary-dark);
    padding-right: 1.15rem;
}
.navbar-custom .dropdown-item:hover i { opacity: 1; }
.navbar-custom .dropdown-divider { margin: 0.3rem 0.5rem; border-color: #e8efe8; }

/* Mobile nav improvements */
@media (max-width: 991.98px) {
    .navbar-custom .navbar-collapse {
        background: #fff;
        border-radius: 12px;
        border: 1px solid #e8efe8;
        box-shadow: 0 8px 24px rgba(0,0,0,0.06);
        margin-top: 0.5rem;
        padding: 0.6rem;
    }
    .navbar-custom .nav-link {
        padding: 0.6rem 1rem;
        margin: 1px 0;
        font-size: 0.9rem;
    }
    .navbar-custom .dropdown-menu {
        border: none;
        box-shadow: none;
        padding: 0 0.5rem;
        margin: 0;
        background: var(--primary-subtle);
        border-radius: 8px;
    }
    .navbar-custom .dropdown-item {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* ── Cards ── */
.card-custom {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card-custom:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

/* ── KPI Cards ── */
.kpi-card {
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    color: #fff;
    box-shadow: var(--shadow);
}
.kpi-card .kpi-value { font-size: 2.5rem; font-weight: 800; line-height: 1.2; }
.kpi-card .kpi-label { font-size: 0.92rem; opacity: 0.9; margin-top: 0.5rem; }
.kpi-bg-1 { background: linear-gradient(135deg, #1a6b3c, #2d9254); }
.kpi-bg-2 { background: linear-gradient(135deg, #c8a951, #dfc06f); }
.kpi-bg-3 { background: linear-gradient(135deg, #2980b9, #3498db); }
.kpi-bg-4 { background: linear-gradient(135deg, #8e44ad, #9b59b6); }

/* ── Hero / Landing ── */
.hero-section {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff; padding: 5rem 0 4rem; text-align: center;
    position: relative; overflow: hidden;
}
.hero-section::before {
    content: ''; position: absolute; top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    animation: pulse 6s ease-in-out infinite; pointer-events: none;
}
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.hero-section h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 1rem; position: relative; }
.hero-section .lead { font-size: 1.2rem; opacity: 0.9; max-width: 700px; margin: 0 auto 2rem; position: relative; }

/* ── Feature cards ── */
.feature-card {
    text-align: center; padding: 2rem 1.5rem; border-radius: var(--radius);
    background: var(--bg-card); box-shadow: var(--shadow); transition: var(--transition); height: 100%;
    border: 1px solid var(--border);
}
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.feature-icon { font-size: 2.5rem; color: var(--primary); margin-bottom: 1rem; }

/* ═════════════════════════════════════════════
   FORM DESIGN SYSTEM
   ═════════════════════════════════════════════ */

/* ── Form card container ── */
.form-section {
    max-width: 860px;
    margin: 2rem auto;
    padding: 2.5rem 2.8rem 2rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    position: relative;
}

.form-section::before {
    content: '';
    position: absolute;
    top: 0; right: 0; left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary-light));
    border-radius: var(--radius) var(--radius) 0 0;
}

/* ── Form header ── */
.form-header-icon {
    width: 52px; height: 52px; border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.4rem; margin-left: 14px;
    box-shadow: 0 4px 14px rgba(26,107,60,0.22);
    flex-shrink: 0;
}

/* ── Form title ── */
.form-section h3 {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.form-section > p.text-muted {
    font-size: 0.92rem;
    color: var(--text-muted) !important;
}

/* ── Fieldset / Legend ── */
.form-section fieldset {
    border: none;
    padding: 0;
    margin: 0 0 0.8rem;
}

.form-section legend {
    font-weight: 700;
    color: var(--primary-dark);
    font-size: 1.08rem;
    padding: 0.75rem 1.1rem;
    margin-bottom: 1.4rem;
    background: linear-gradient(135deg, var(--primary-subtle), var(--accent-subtle));
    border-radius: var(--radius-sm);
    border: none;
    border-right: 4px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    position: relative;
}

.form-section legend::after {
    content: '';
    position: absolute;
    bottom: -1px; right: 0; left: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--primary), transparent 60%);
    opacity: 0.15;
}

/* ── Section counter badge ── */
.section-number {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--primary); color: #fff;
    font-size: 0.78rem; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(26,107,60,0.2);
}

/* ── Form labels ── */
.form-section .form-label,
.form-section label:not(.form-check-label) {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
    margin-bottom: 0.4rem;
    display: block;
}

/* ── Text inputs, selects, textareas ── */
.form-section .form-control,
.form-section .form-select {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-xs);
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
    color: var(--text-dark);
    background: #fff;
    transition: var(--transition);
    line-height: 1.5;
}

.form-section .form-control:hover,
.form-section .form-select:hover {
    border-color: #c0cdd8;
}

.form-section .form-control:focus,
.form-section .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3.5px rgba(26,107,60,0.10);
    outline: none;
    background: #fdfffd;
}

.form-section .form-control::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.form-section textarea.form-control {
    min-height: 90px;
    resize: vertical;
}

.form-section .form-select {
    cursor: pointer;
}

/* ── Checkboxes & Radios ── */
.form-section .form-check {
    padding: 0.55rem 0.9rem 0.55rem 0;
    margin-bottom: 0.2rem;
    border-radius: var(--radius-xs);
    transition: background 0.2s;
}

.form-section .form-check:hover {
    background: var(--primary-subtle);
}

.form-section .form-check-input {
    width: 1.2em;
    height: 1.2em;
    margin-top: 0.22em;
    border: 2px solid #cbd5e1;
    border-radius: 5px;
    transition: var(--transition);
    cursor: pointer;
}

.form-section .form-check-input[type="radio"] {
    border-radius: 50%;
}

.form-section .form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(26,107,60,0.12);
}

.form-section .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(26,107,60,0.12);
    border-color: var(--primary);
}

.form-section .form-check-label {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-body);
    cursor: pointer;
    transition: color 0.2s;
}

.form-section .form-check:hover .form-check-label {
    color: var(--primary-dark);
}

/* ── Field spacing ── */
.form-section .mb-3 {
    margin-bottom: 1.15rem !important;
}

/* ── Help text ── */
.form-section .form-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

/* ── Validation ── */
.form-section .is-invalid,
.form-section .form-control.is-invalid,
.form-section .form-select.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,0.08);
}

.form-section .invalid-feedback {
    font-size: 0.82rem;
    color: #ef4444;
    margin-top: 0.3rem;
}

/* ── Error list (crispy) ── */
.form-section .errorlist {
    list-style: none;
    padding: 0;
    margin: 0.35rem 0 0;
}
.form-section .errorlist li {
    color: #ef4444;
    font-size: 0.82rem;
    padding: 0.25rem 0.6rem;
    background: rgba(239,68,68,0.05);
    border-radius: 6px;
    border-right: 3px solid #ef4444;
    margin-bottom: 0.2rem;
}

/* ── Non-field errors ── */
.form-section .alert-danger {
    background: rgba(239,68,68,0.06);
    border: 1px solid rgba(239,68,68,0.15);
    color: #b91c1c;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    padding: 0.8rem 1.1rem;
    margin-bottom: 1.2rem;
}

/* ── Submit buttons ── */
.form-section .btn-primary,
.form-section .btn-success,
.form-section button[type="submit"],
.form-section input[type="submit"] {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border: none;
    color: #fff;
    font-weight: 700;
    font-size: 1.02rem;
    padding: 0.8rem 2.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(26,107,60,0.25);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.form-section .btn-primary::after,
.form-section .btn-success::after,
.form-section button[type="submit"]::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.form-section .btn-primary:hover,
.form-section .btn-success:hover,
.form-section button[type="submit"]:hover,
.form-section input[type="submit"]:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    box-shadow: 0 6px 22px rgba(26,107,60,0.35);
    transform: translateY(-2px);
}

.form-section .btn-primary:hover::after,
.form-section .btn-success:hover::after,
.form-section button[type="submit"]:hover::after {
    opacity: 1;
}

.form-section .btn-primary:active,
.form-section .btn-success:active,
.form-section button[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(26,107,60,0.2);
}

/* ── Outline buttons inside forms ── */
.form-section .btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.form-section .btn-outline-primary:hover {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 3px 12px rgba(26,107,60,0.2);
}
.form-section .btn-outline-secondary {
    border: 2px solid var(--border);
    color: var(--text-body);
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.form-section .btn-outline-secondary:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

/* ── HR dividers in forms ── */
.form-section hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin: 1.8rem 0;
}

/* ── Read-only locked fields ── */
.form-section .form-control[readonly] {
    background: #f0f7f3 !important;
    color: var(--primary-dark) !important;
    font-weight: 600;
    border-color: #c3e6d0 !important;
    cursor: default;
    opacity: 1 !important;
}

/* ── Form progress bar ── */
.form-progress {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    margin-bottom: 1.8rem;
    overflow: hidden;
}
.form-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 3px;
    transition: width 0.5s cubic-bezier(0.4,0,0.2,1);
}

/* ── Status badges ── */
.form-status-badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 0.78rem; font-weight: 600; padding: 0.25rem 0.8rem;
    border-radius: 20px;
}
.form-status-badge.editing { background: rgba(245,158,11,0.1); color: #d97706; }
.form-status-badge.new-form { background: var(--primary-subtle); color: var(--primary); }

/* ── Photo upload slots ── */
.photo-slot {
    border: 2px dashed var(--border); border-radius: var(--radius-sm); padding: 0;
    position: relative; overflow: hidden; cursor: pointer;
    transition: all .3s cubic-bezier(0.4,0,0.2,1); background: #fafbfc; height: 190px;
    display: flex; align-items: center; justify-content: center; flex-direction: column;
}
.photo-slot:hover { border-color: var(--primary); background: var(--primary-subtle); }
.photo-slot.has-photo { border-style: solid; border-color: var(--primary); box-shadow: 0 2px 12px rgba(26,107,60,0.1); }
.photo-slot .slot-placeholder { text-align: center; color: var(--text-muted); pointer-events: none; }
.photo-slot .slot-placeholder i { font-size: 2.2rem; display: block; margin-bottom: 6px; color: var(--primary-light); opacity: 0.6; }
.photo-slot .slot-placeholder span { font-size: 0.82rem; font-weight: 600; }
.photo-slot .slot-preview {
    width: 100%; height: 100%; object-fit: cover; display: none; border-radius: 8px;
}
.photo-slot .slot-actions {
    position: absolute; top: 8px; left: 8px; display: none; gap: 4px; z-index: 2;
}
.photo-slot.has-photo .slot-actions { display: flex; }
.photo-slot.has-photo .slot-placeholder { display: none; }
.photo-slot.has-photo .slot-preview { display: block; }
.slot-btn {
    width: 30px; height: 30px; border-radius: var(--radius-xs); border: none;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; cursor: pointer; transition: var(--transition);
    backdrop-filter: blur(4px);
}
.slot-btn-del { background: rgba(239,68,68,0.85); color: #fff; }
.slot-btn-del:hover { background: #ef4444; transform: scale(1.1); }
.photo-slot .slot-label {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.55));
    color: #fff; padding: 22px 10px 8px; font-size: 0.78rem; font-weight: 600;
    text-align: center; display: none;
}
.photo-slot.has-photo .slot-label { display: block; }
.photo-slot.drag-over {
    border-color: var(--accent); background: var(--accent-subtle);
    transform: scale(1.02); box-shadow: 0 0 0 3px rgba(200,169,81,0.15);
}

/* ── Map search box (shared) ── */
#map-search-box {
    margin: 10px 14px 0 0;
    width: 320px;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-weight: 500;
    border: 2px solid transparent;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    outline: none;
    direction: rtl;
    font-family: 'Tajawal', sans-serif;
    background: #fff;
    color: var(--text-dark);
    transition: all 0.25s ease;
}
#map-search-box::placeholder {
    color: #94a3b8;
    font-weight: 400;
}
#map-search-box:focus {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(26,107,60,0.3);
    background: #fdfffd;
}
.spin-icon { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pac-container { z-index: 10000 !important; direction: rtl; font-family: 'Tajawal', sans-serif; }

/* ── Success page ── */
.success-container {
    text-align: center;
    padding: 4rem 2rem;
}

.success-icon {
    font-size: 4.5rem;
    color: var(--primary);
    animation: successPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes successPop {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.success-container h2 {
    font-weight: 800;
    letter-spacing: -0.01em;
}

/* ── QR page ── */
.qr-container {
    text-align: center;
    padding: 2.5rem;
}

.qr-container img {
    max-width: 280px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 4px solid #fff;
    outline: 2px solid var(--border);
}

/* ── Map ── */
#map-container {
    height: 70vh;
    min-height: 500px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    border: 1px solid var(--border);
}

/* ── Footer ── */
.footer {
    background: linear-gradient(135deg, var(--primary-dark), #0a3a1e);
    color: rgba(255,255,255,0.7);
    padding: 1.8rem 0;
    text-align: center;
    margin-top: 3rem;
    font-size: 0.9rem;
}

/* ── Login ── */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    padding: 2rem 1rem;
    position: relative;
    overflow: hidden;
}
.login-page::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    animation: pulse 6s ease-in-out infinite;
    pointer-events: none;
}
.login-container {
    max-width: 420px;
    width: 100%;
    padding: 2.5rem;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    border: none;
    position: relative;
    z-index: 2;
}
.login-container img {
    display: block;
    margin: 0 auto 1.5rem;
    padding: 12px 24px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.login-container h2 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 2rem;
    font-weight: 800;
}

/* ── Tables ── */
.table-custom {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    background: #fff;
}

.table-custom thead {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
}
.table-custom thead th {
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.85rem 1rem;
    border: none;
    white-space: nowrap;
}
.table-custom tbody td {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    vertical-align: middle;
    border-color: var(--border);
    color: var(--text-body);
}
.table-custom tbody tr:hover {
    background: var(--primary-subtle);
}

/* ── Badges ── */
.badge { font-weight: 600; font-size: 0.78rem; padding: 0.35em 0.7em; border-radius: 6px; }

/* ── Alerts ── */
.alert {
    border-radius: var(--radius-sm);
    border: none;
    font-size: 0.92rem;
    padding: 0.9rem 1.2rem;
}

/* ── Language switcher ── */
.lang-switcher {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.lang-switcher a {
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1.5px solid var(--border);
    color: var(--text-body);
    transition: var(--transition);
    background: #fff;
}

.lang-switcher a:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-subtle);
}

.lang-switcher a.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(26,107,60,0.2);
}

/* ═════════════════════════════════════════════
   RESPONSIVE
   ═════════════════════════════════════════════ */

@media (max-width: 768px) {
    .hero-section h1 { font-size: 1.8rem; }
    .hero-section .lead { font-size: 1rem; }
    .kpi-card .kpi-value { font-size: 1.8rem; }

    .login-page {
        padding: 1rem;
    }
    .login-container {
        padding: 2rem 1.5rem;
        margin: 0 0.5rem;
    }
    .login-container img {
        height: 60px;
        padding: 10px 20px;
    }
    .login-container h2 {
        font-size: 1.5rem;
    }

    .form-section {
        margin: 0.8rem;
        padding: 1.5rem 1.2rem 1.2rem;
        border-radius: var(--radius-sm);
    }

    .form-section legend {
        font-size: 0.98rem;
        padding: 0.6rem 0.8rem;
    }

    .form-section .form-control,
    .form-section .form-select {
        font-size: 1rem;
        padding: 0.75rem 0.9rem;
    }

    .form-section .btn-primary,
    .form-section .btn-success,
    .form-section button[type="submit"],
    .form-section input[type="submit"] {
        width: 100%;
        justify-content: center;
        padding: 0.9rem 1.5rem;
        font-size: 1.05rem;
    }

    .form-header-icon {
        width: 44px; height: 44px; font-size: 1.2rem; margin-left: 10px;
    }

    .photo-slot { height: 160px; }

    #map-search-box {
        width: 200px;
        font-size: 0.88rem;
        padding: 10px 12px;
        margin: 8px 8px 0 0;
        border-radius: 10px;
    }
}

@media (max-width: 576px) {
    .form-section {
        margin: 0.5rem;
        padding: 1.2rem 1rem 1rem;
    }
    .form-section h3 { font-size: 1.2rem; }
    .navbar-custom .navbar-brand { font-size: 0.95rem; }
    .form-header-icon { width: 40px; height: 40px; font-size: 1.1rem; margin-left: 8px; }
    .section-number { width: 24px; height: 24px; font-size: 0.72rem; }
}
