/* Components CSS for Famma Dhaw & Ma? (فمة ضو وماء؟) */

/* Dual Filter Select Box & Dropdown Option Contrast Fix */
select, select.form-control {
    color: var(--text-primary) !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
    cursor: pointer;
}

select option, select.form-control option {
    background-color: #1e293b !important;
    color: #ffffff !important;
}

[data-theme="light"] select, [data-theme="light"] select.form-control {
    color: #0f172a !important;
    background-color: rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] select option, [data-theme="light"] select.form-control option {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

/* 1. Header & Navigation */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-dark);
    margin-bottom: 2rem;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
}

.brand-icon {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(14, 165, 233, 0.2));
    border: 1px solid var(--border-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.brand-text h1 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    line-height: 1.2;
    background: linear-gradient(90deg, #f59e0b 0%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-text p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.icon-btn {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-dark);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

/* Share Dropdown Wrapper & Menu Styles */
.share-dropdown-wrapper {
    position: relative;
}

.share-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: #0f172a;
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    padding: 0.5rem 0;
    min-width: 170px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    flex-direction: column;
}

.share-dropdown-menu.active {
    display: flex;
}

.share-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    transition: var(--transition);
}

.share-item:hover {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
}

.share-icon {
    font-size: 1.1rem;
}

[data-theme="light"] .share-dropdown-menu {
    background: #ffffff;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* 2. Hero & Global Stats Summary */
.hero-section {
    margin-bottom: 2.5rem;
}

.hero-header {
    text-align: center;
    max-width: 780px;
    margin: 0 auto 2rem auto;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.hero-title span.highlight-el {
    color: var(--electricity-color);
    position: relative;
}

.hero-title span.highlight-wa {
    color: var(--water-color);
    position: relative;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Quick Summary Cards Grid */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.summary-card {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
}

.summary-card.el-card::before { background: var(--electricity-color); }
.summary-card.wa-card::before { background: var(--water-color); }
.summary-card.total-card::before { background: #ef4444; }

.summary-info h3 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.summary-info .val {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
}

.summary-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.el-card .summary-icon { background: var(--electricity-glow); color: var(--electricity-color); }
.wa-card .summary-icon { background: var(--water-glow); color: var(--water-color); }
.total-card .summary-icon { background: rgba(239, 68, 68, 0.2); color: #ef4444; }

/* 3. Search & Filter Bar */
.search-filter-section {
    margin-bottom: 2rem;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 1.25rem;
    margin-bottom: 1.25rem;
}

.search-box input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1.05rem;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.filter-tabs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.filter-tab {
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-dark);
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.filter-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.filter-tab.active {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.2) 0%, rgba(245, 158, 11, 0.2) 100%);
    border-color: rgba(14, 165, 233, 0.4);
    color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 4. Main Content Layout (Grid + Interactive Map & Timeline) */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 1.75rem;
    margin-bottom: 3rem;
}

@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
}

/* 5. Regional Cards Grid */
.governorates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
    min-height: 70vh;
}

.gov-card {
    padding: 1.25rem;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.gov-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.gov-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-dark);
}

.gov-card-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
}

.gov-card-code {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
}

.gov-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.65rem;
    font-size: 0.9rem;
}

.gov-status-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.gov-card-footer {
    margin-top: 1rem;
    padding-top: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.775rem;
    color: var(--text-muted);
}

/* Delegation Chips inside Governorate Cards */
.delegation-chips-container {
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--border-dark);
}

.delegation-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.delegation-chip {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-dark);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.delegation-chip:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.delegation-chip.chip-cut {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
}

.delegation-chip.chip-ok {
    border-color: rgba(16, 185, 129, 0.2);
    background: rgba(16, 185, 129, 0.05);
    color: #6ee7b7;
}

/* Dual Filter Select Box */
.dual-filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 640px) {
    .dual-filter-row {
        grid-template-columns: 1fr;
    }
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Interactive Map Widget */
.map-container {
    padding: 1.25rem;
    text-align: center;
}

.tn-map-svg {
    width: 100%;
    max-height: 420px;
    margin: 0 auto;
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.3));
}

.map-region {
    fill: rgba(255, 255, 255, 0.08);
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 1.5;
    transition: var(--transition);
    cursor: pointer;
}

.map-region:hover, .map-region.active {
    fill: rgba(14, 165, 233, 0.4);
    stroke: #38bdf8;
}

.map-region.has-cut {
    fill: rgba(239, 68, 68, 0.35);
    stroke: #ef4444;
}

/* Live Feed Sidebar Stream */
.live-feed-panel {
    padding: 1.25rem;
}

.feed-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-height: 480px;
    overflow-y: auto;
    padding-left: 0.25rem;
}

.feed-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    padding: 0.9rem;
    transition: var(--transition);
}

.feed-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.feed-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.4rem;
}

.feed-location {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
}

.feed-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.feed-body {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
    line-height: 1.5;
}

.feed-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.confirm-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-dark);
    color: var(--text-secondary);
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: var(--transition);
}

.confirm-btn:hover, .confirm-btn.voted {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

/* 7. Scheduled Maintenance Section */
.maintenance-section {
    margin-bottom: 3rem;
}

.maint-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
}

.maint-card {
    padding: 1.25rem;
    position: relative;
}

.maint-badge {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
}

.maint-provider {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.maint-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.maint-region {
    font-size: 0.875rem;
    color: var(--electricity-color);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.maint-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.maint-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-dark);
}

/* 8. Modals (Report & Emergency) */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

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

.modal-card {
    width: 100%;
    max-width: 520px;
    background: var(--bg-dark);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    padding: 1.75rem;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-dark);
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
}

.close-modal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover { color: var(--text-primary); }

/* Form Controls inside modal */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: #38bdf8;
    background: rgba(255, 255, 255, 0.08);
}

/* Service Selector Tabs in Modal */
.service-selector {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.service-option {
    padding: 0.75rem 0.5rem;
    text-align: center;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-dark);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 700;
    font-size: 0.875rem;
}

.service-option:hover {
    background: rgba(255, 255, 255, 0.08);
}

.service-option.active {
    background: rgba(14, 165, 233, 0.2);
    border-color: #38bdf8;
    color: #38bdf8;
}

/* Status Selector Options in Modal */
.status-option {
    padding: 0.75rem 0.5rem;
    text-align: center;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-dark);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 700;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.status-option:hover {
    background: rgba(255, 255, 255, 0.08);
}

.status-option[data-status="cut"].active {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: #ef4444 !important;
    color: #fca5a5 !important;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.35);
}

.status-option[data-status="available"].active {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: #10b981 !important;
    color: #6ee7b7 !important;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.35);
}

/* Emergency Contact Cards */
.emergency-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.emergency-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.5rem;
}

.emergency-item h4 {
    font-size: 0.85rem;
    font-weight: 700;
}

.emergency-number {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: #38bdf8;
    direction: ltr;
    text-align: right;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background: #0f172a;
    border: 1px solid var(--border-dark);
    color: var(--text-primary);
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    animation: slideIn 0.3s ease forwards;
}

@keyframes slideIn {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Language selector custom styles */
.lang-selector-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

#lang-select {
    padding-left: 1.75rem !important;
    font-size: 0.85rem;
    font-weight: 700;
}

[dir="ltr"] #lang-select {
    padding-left: 0.75rem !important;
    padding-right: 1.75rem !important;
}

/* Pulsing map ring animations */
.map-pulse-ring {
    fill: #ef4444;
    fill-opacity: 0.35;
    stroke: #ef4444;
    stroke-width: 1.5;
    animation: mapPulseAnim 2.5s infinite ease-out;
    pointer-events: none;
    transform-box: fill-box;
    transform-origin: center;
}

.map-pulse-center {
    fill: #ef4444;
    stroke: #ffffff;
    stroke-width: 1;
    pointer-events: none;
}

@keyframes mapPulseAnim {
    0% {
        r: 6px;
        opacity: 1;
    }
    100% {
        r: 28px;
        opacity: 0;
    }
}

/* Outage Peak Hours CSS Chart */
.chart-bar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 32px;
}

.chart-bar {
    width: 24px;
    background: linear-gradient(180deg, var(--electricity-color) 0%, rgba(245, 158, 11, 0.1) 100%);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.15);
}

.chart-bar:hover {
    background: linear-gradient(180deg, #ef4444 0%, rgba(239, 68, 68, 0.1) 100%);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.chart-bar::after {
    content: attr(data-val);
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-primary);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.chart-bar:hover::after {
    opacity: 1;
}

/* Floating Navigation Bar for Mobile */
.floating-nav-bar {
    display: none;
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 420px;
    height: 65px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 99px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    justify-content: space-around;
    align-items: center;
    padding: 0 1rem;
    direction: inherit;
}

[data-theme="dark"] .floating-nav-bar {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
}

.nav-item-btn {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-family: var(--font-heading);
    font-weight: 700;
    gap: 3px;
    transition: var(--transition);
    padding: 0.5rem;
}

.nav-item-btn:hover, .nav-item-btn.active {
    color: var(--electricity-color);
}

[data-theme="dark"] .nav-item-btn:hover, [data-theme="dark"] .nav-item-btn.active {
    color: var(--electricity-color);
}

.nav-item-btn-center {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--electricity-color);
    border: 4px solid #ffffff;
    transform: translateY(-16px);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #0f172a;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .nav-item-btn-center {
    border-color: #0f172a;
}

.nav-item-btn-center:hover {
    transform: translateY(-20px) scale(1.05);
    background: #ef4444;
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.5);
    color: #ffffff;
}

/* Mobile responsive layout overrides */
@media (max-width: 768px) {
    .floating-nav-bar {
        display: flex;
    }

    body {
        padding-bottom: 90px !important;
    }
    
    .navbar {
        padding: 0.4rem 0.5rem !important;
    }

    .nav-wrapper {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        gap: 0.25rem !important;
    }
    
    .brand {
        gap: 0.4rem !important;
    }
    
    .brand-icon {
        width: 34px !important;
        height: 34px !important;
        font-size: 1rem !important;
    }
    
    .brand-text h1 {
        font-size: 1.05rem !important;
    }
    
    .brand-text p {
        display: none !important;
    }

    .nav-actions {
        width: auto !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.4rem !important;
    }

    /* Hide redundant desktop header elements on mobile to clear clutter */
    #theme-toggle-btn,
    #open-report-btn,
    #open-emergency-btn,
    #open-contact-btn {
        display: none !important;
    }

    .lang-selector-wrapper select {
        padding: 0.35rem 0.5rem !important;
        font-size: 0.75rem !important;
        height: 32px !important;
    }

    .hero-title {
        font-size: 1.65rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .summary-cards {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .dual-filter-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .filter-tabs {
        padding-bottom: 0.85rem;
    }

    /* Put map below or stack correctly so it doesn't block card viewing */
    .main-layout {
        display: flex;
        flex-direction: column-reverse;
        gap: 1.5rem;
    }

    .map-container {
        padding: 0.85rem;
    }

    .tn-map-svg {
        max-height: 280px;
    }

    .governorates-grid {
        grid-template-columns: 1fr;
    }

    .gov-card {
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .modal-card {
        padding: 1.25rem;
        border-radius: var(--radius-md);
    }
}

/* Footer */
footer {
    border-top: 1px solid var(--border-dark);
    padding: 2.5rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 4rem;
}

footer p {
    margin-bottom: 0.5rem;
}

/* --- Admin Panel Styling --- */
.admin-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid var(--border-dark) !important;
    border-radius: var(--radius-md) !important;
    padding: 0.35rem !important;
    gap: 0.35rem !important;
    margin-bottom: 1.25rem !important;
}

.admin-tabs button {
    flex: 1 !important;
    background: transparent !important;
    border: none !important;
    color: var(--text-secondary) !important;
    padding: 0.6rem 0.5rem !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
}

.admin-tabs button.active {
    background: rgba(56, 189, 248, 0.15) !important;
    color: #38bdf8 !important;
}

@media (max-width: 768px) {
    #admin-dashboard-modal .modal-title {
        font-size: 1.1rem !important;
    }
    
    .admin-tabs button {
        font-size: 0.75rem !important;
        padding: 0.5rem 0.25rem !important;
    }
}

.admin-msg-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.admin-msg-card:hover {
    border-color: rgba(56, 189, 248, 0.15);
    background: rgba(255, 255, 255, 0.03);
}

.admin-msg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.6rem;
}

.admin-msg-user-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.admin-msg-body {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    background: rgba(0, 0, 0, 0.15);
    border-right: 3px solid #38bdf8;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    word-break: break-word;
}

.admin-msg-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.6rem;
    margin-top: 0.25rem;
}

/* Mobile Drawer Styles */
.mobile-side-drawer {
    position: fixed;
    top: 0;
    width: 290px;
    height: 100vh;
    background: #0f172a;
    z-index: 2000;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1), left 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
    display: flex;
    flex-direction: column;
    visibility: hidden;
}

/* LTR Direction: Slide drawer from the right */
html[dir="ltr"] .mobile-side-drawer {
    right: -300px;
    left: auto;
    border-left: 1px solid var(--border-dark);
    border-right: none;
    box-shadow: -10px 0 25px rgba(0, 0, 0, 0.5);
}

html[dir="ltr"] .mobile-side-drawer.active {
    right: 0;
    left: auto;
    visibility: visible;
}

/* RTL Direction: Slide drawer from the left */
html[dir="rtl"] .mobile-side-drawer {
    left: -300px;
    right: auto;
    border-right: 1px solid var(--border-dark);
    border-left: none;
    box-shadow: 10px 0 25px rgba(0, 0, 0, 0.5);
}

html[dir="rtl"] .mobile-side-drawer.active {
    left: 0;
    right: auto;
    visibility: visible;
}

.drawer-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1900;
}

.drawer-overlay.active {
    display: block;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-dark);
}

.close-drawer-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.75rem;
    cursor: pointer;
    line-height: 1;
}

.drawer-body {
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
}

.drawer-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    transition: var(--transition);
}

.drawer-link:hover {
    background: rgba(56, 189, 248, 0.08);
    color: #38bdf8;
}

[data-theme="light"] .mobile-side-drawer {
    background: #ffffff;
    box-shadow: -10px 0 25px rgba(0, 0, 0, 0.08);
}

@media (max-width: 768px) {
    #mobile-menu-toggle-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
}

