/* 
   NOC GIS & Reporting System - Custom Premium Stylesheet (Glassmorphism & Dark Mode)
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-primary: #020617;
    --bg-secondary: #0f172a;
    --bg-tertiary: #1e293b;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(59, 130, 246, 0.15);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --color-primary: #3b82f6;
    /* Cyan-blue */
    --color-primary-glow: rgba(59, 130, 246, 0.4);
    --color-success: #10b981;
    /* Emerald */
    --color-success-glow: rgba(16, 185, 129, 0.4);
    --color-warning: #f59e0b;
    /* Amber */
    --color-warning-glow: rgba(245, 158, 11, 0.4);
    --color-danger: #ef4444;
    /* Rose */
    --color-danger-glow: rgba(239, 68, 68, 0.4);
    --color-purple: #8b5cf6;
    /* Indigo */

    --glass-bg: rgba(15, 23, 42, 0.65);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

    --font-heading: 'Outfit', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;

    --sidebar-width: 260px;
    --transition-speed: 0.3s;
}

/* Light Theme Variables & Overrides */
[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --border-color: rgba(99, 102, 241, 0.08);
    --border-glow: rgba(99, 102, 241, 0.15);

    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;

    --color-primary: #4f46e5; /* Indigo */
    --color-primary-glow: rgba(79, 70, 229, 0.15);
    --color-success: #10b981; /* Emerald */
    --color-success-glow: rgba(16, 185, 129, 0.15);
    --color-warning: #f59e0b; /* Amber */
    --color-warning-glow: rgba(245, 158, 11, 0.15);
    --color-danger: #ef4444; /* Rose */
    --color-danger-glow: rgba(239, 68, 68, 0.15);
    --color-purple: #7c3aed; /* Violet */

    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(99, 102, 241, 0.06);
    --glass-shadow: 0 8px 32px 0 rgba(79, 70, 229, 0.06), 0 1px 3px rgba(0, 0, 0, 0.02);
}

[data-theme="light"] body {
    background: radial-gradient(circle at 10% 10%, rgba(99, 102, 241, 0.04), transparent 45%),
                radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.04), transparent 45%),
                #f8fafc;
}

[data-theme="light"] .form-control {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(99, 102, 241, 0.12);
}

[data-theme="light"] ::-webkit-scrollbar-track {
    background: #f8fafc;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.15);
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

[data-theme="light"] .top-bar {
    background: rgba(255, 255, 255, 0.65);
    border-bottom: 1px solid rgba(99, 102, 241, 0.08);
}

[data-theme="light"] .brand-name {
    background: linear-gradient(to right, var(--color-primary), var(--color-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .menu-item a:hover {
    background: rgba(79, 70, 229, 0.05);
    color: var(--color-primary);
}

[data-theme="light"] .btn-secondary {
    background: rgba(79, 70, 229, 0.06);
    border-color: rgba(79, 70, 229, 0.12);
    color: var(--color-primary);
}

[data-theme="light"] .btn-secondary:hover {
    background: rgba(79, 70, 229, 0.1);
    border-color: rgba(79, 70, 229, 0.2);
}

[data-theme="light"] table.modern-table th,
[data-theme="light"] .dataTables_wrapper table.dataTable th {
    background: rgba(99, 102, 241, 0.03) !important;
    color: var(--text-secondary) !important;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1) !important;
}

[data-theme="light"] table.modern-table td,
[data-theme="light"] .dataTables_wrapper table.dataTable td {
    border-bottom: 1px solid rgba(99, 102, 241, 0.06) !important;
}

[data-theme="light"] table.modern-table tr:hover td,
[data-theme="light"] .dataTables_wrapper table.dataTable tbody tr:hover td {
    background: rgba(99, 102, 241, 0.02) !important;
}

[data-theme="light"] .todo-item {
    background: rgba(99, 102, 241, 0.02);
    border-color: rgba(99, 102, 241, 0.08);
}

[data-theme="light"] .todo-item:hover {
    background: rgba(99, 102, 241, 0.04);
    border-color: rgba(99, 102, 241, 0.15);
}

[data-theme="light"] .stat-icon {
    background: rgba(99, 102, 241, 0.04);
}

[data-theme="light"] .dataTables_wrapper .dataTables_length select,
[data-theme="light"] .dataTables_wrapper .dataTables_filter input {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(99, 102, 241, 0.15);
    color: var(--text-primary);
}

[data-theme="light"] .dataTables_wrapper .dataTables_paginate .paginate_button {
    background: rgba(79, 70, 229, 0.05) !important;
    border-color: rgba(79, 70, 229, 0.1) !important;
    color: var(--text-primary) !important;
}

[data-theme="light"] .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: rgba(79, 70, 229, 0.1) !important;
    border-color: rgba(79, 70, 229, 0.2) !important;
    color: var(--color-primary) !important;
}

[data-theme="light"] .dataTables_wrapper .dataTables_paginate .paginate_button.current,
[data-theme="light"] .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: #ffffff !important;
}

[data-theme="light"] .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
[data-theme="light"] .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    background: rgba(0, 0, 0, 0.02) !important;
    border-color: rgba(0, 0, 0, 0.05) !important;
    color: var(--text-muted) !important;
}

[data-theme="light"] .progress-track {
    background: rgba(99, 102, 241, 0.08);
}

[data-theme="light"] .stat-mini-box {
    background: rgba(99, 102, 241, 0.04);
}

[data-theme="light"] .stat-card.primary {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.04) 0%, #ffffff 100%);
    border-color: rgba(79, 70, 229, 0.12);
}

[data-theme="light"] .stat-card.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.04) 0%, #ffffff 100%);
    border-color: rgba(16, 185, 129, 0.12);
}

[data-theme="light"] .stat-card.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.04) 0%, #ffffff 100%);
    border-color: rgba(245, 158, 11, 0.12);
}

[data-theme="light"] .stat-card.danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.04) 0%, #ffffff 100%);
    border-color: rgba(239, 68, 68, 0.12);
}

}

[data-theme="light"] .alert-success {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.35);
    color: #065f46;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.04);
}

[data-theme="light"] .alert-danger {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.35);
    color: #991b1b;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.04);
}

[data-theme="light"] .login-error {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.3);
    color: #991b1b;
}

[data-theme="light"] .toast-notification {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-primary);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

[data-theme="light"] .toast-notification.success {
    border-top-color: rgba(16, 185, 129, 0.3);
    border-right-color: rgba(16, 185, 129, 0.3);
    border-bottom-color: rgba(16, 185, 129, 0.3);
}

[data-theme="light"] .toast-notification.error {
    border-top-color: rgba(239, 68, 68, 0.3);
    border-right-color: rgba(239, 68, 68, 0.3);
    border-bottom-color: rgba(239, 68, 68, 0.3);
}

[data-theme="light"] .toast-notification.warning {
    border-top-color: rgba(245, 158, 11, 0.3);
    border-right-color: rgba(245, 158, 11, 0.3);
    border-bottom-color: rgba(245, 158, 11, 0.3);
}

[data-theme="light"] .toast-notification.info {
    border-top-color: rgba(99, 102, 241, 0.3);
    border-right-color: rgba(99, 102, 241, 0.3);
    border-bottom-color: rgba(99, 102, 241, 0.3);
}

.progress-track {
    background: rgba(255, 255, 255, 0.05);
    height: 4px;
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}

.stat-mini-box {
    background: rgba(0, 0, 0, 0.15);
}

/* Tab Buttons */
.tab-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    padding: 10px 18px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.tab-btn.active {
    color: #ffffff;
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.15);
}

/* Light Theme Overrides for Tab Buttons */
[data-theme="light"] .tab-btn {
    background: rgba(99, 102, 241, 0.03);
    border-color: rgba(99, 102, 241, 0.1);
}

[data-theme="light"] .tab-btn:hover {
    color: var(--color-primary);
    background: rgba(79, 70, 229, 0.06);
    border-color: rgba(79, 70, 229, 0.15);
}

[data-theme="light"] .tab-btn.active {
    color: #ffffff;
    background: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

/* Card Panel Summary */
.card-panel-summary {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    gap: 15px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.card-panel-summary.primary {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(15, 23, 42, 0.65));
    border-color: var(--border-glow);
}

.card-panel-summary.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(15, 23, 42, 0.65));
    border-color: rgba(16, 185, 129, 0.15);
}

[data-theme="light"] .card-panel-summary.primary {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(255, 255, 255, 0.95));
    border-color: rgba(79, 70, 229, 0.15);
}

[data-theme="light"] .card-panel-summary.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(255, 255, 255, 0.95));
    border-color: rgba(16, 185, 129, 0.18);
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 5000;
    transition: width var(--transition-speed), left var(--transition-speed) ease;
}

.sidebar-brand {
    padding: 20px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
}

.brand-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-purple));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px var(--color-primary-glow);
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: linear-gradient(to right, #ffffff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-menu {
    list-style: none;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.menu-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-speed);
}

.menu-item a:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

.menu-item.active a {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.02) 100%);
    border-left: 3px solid var(--color-primary);
    color: var(--color-primary);
    font-weight: 600;
    box-shadow: inset 0 0 10px rgba(59, 130, 246, 0.05);
}

.sidebar-user {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.1);
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.username {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-logout {
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-logout:hover {
    color: var(--color-danger);
    background: rgba(239, 68, 68, 0.1);
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    min-width: 0; /* Prevent inner elements from stretching flex container width */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-primary);
    position: relative;
    transition: margin-left var(--transition-speed) ease;
}

.top-bar {
    height: 70px;
    border-bottom: 1px solid var(--border-color);
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 2000;
}

.page-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
}

.container {
    padding: 40px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Glassmorphism Card Panels */
.card-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 24px;
    transition: transform 0.2s, border-color 0.2s;
}

.card-panel:hover {
    border-color: rgba(59, 130, 246, 0.15);
}

.card-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-primary);
}

/* Dashboard Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.stat-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(12px);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--color-primary);
}

.stat-card.success::before {
    background: var(--color-success);
}

.stat-card.warning::before {
    background: var(--color-warning);
}

.stat-card.danger::before {
    background: var(--color-danger);
}

.stat-card.purple::before {
    background: var(--color-purple);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-card.primary .stat-icon {
    color: var(--color-primary);
    background: rgba(59, 130, 246, 0.1);
}

.stat-card.success .stat-icon {
    color: var(--color-success);
    background: rgba(16, 185, 129, 0.1);
}

.stat-card.warning .stat-icon {
    color: var(--color-warning);
    background: rgba(245, 158, 11, 0.1);
}

.stat-card.danger .stat-icon {
    color: var(--color-danger);
    background: rgba(239, 68, 68, 0.1);
}

.stat-card.purple .stat-icon {
    color: var(--color-purple);
    background: rgba(139, 92, 246, 0.1);
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    font-family: var(--font-body);
}

.btn-primary {
    background: var(--color-primary);
    color: #ffffff;
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background: #2563eb;
    box-shadow: 0 4px 20px 0 rgba(59, 130, 246, 0.5);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--color-success);
    color: #ffffff;
    box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: #059669;
    box-shadow: 0 4px 20px 0 rgba(16, 185, 129, 0.5);
}

.btn-danger {
    background: var(--color-danger);
    color: #ffffff;
    box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: #dc2626;
    box-shadow: 0 4px 20px 0 rgba(239, 68, 68, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 11px;
    border-radius: 6px;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

table.modern-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

table.modern-table th {
    background: rgba(255, 255, 255, 0.02);
    padding: 14px 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

table.modern-table td {
    padding: 14px 16px;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

table.modern-table tr:hover td {
    background: rgba(255, 255, 255, 0.01);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--color-warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Alerts & Flash Messages */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--color-success);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--color-danger);
}

.alert-sm {
    padding: 6px 10px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 11px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-control {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 13px;
    outline: none;
    transition: all 0.2s;
}

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

select.form-control option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

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

/* Form Row layout */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Map page GIS layout */
.gis-layout {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.gis-sidebar {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
}

.gis-sidebar-section {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.gis-sidebar-section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

#map-container {
    height: 100%;
    width: 100%;
    position: relative;
    background: #090d16;
}

/* Custom Leaflet Dark styles */
.leaflet-container {
    background: #090d16 !important;
}

.leaflet-popup-content-wrapper {
    background: var(--bg-secondary) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    box-shadow: var(--glass-shadow) !important;
    border-radius: 8px !important;
}

.leaflet-popup-tip {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
}

.leaflet-popup-content {
    margin: 14px 16px 10px 16px !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
}

.leaflet-popup-content strong {
    color: var(--text-primary);
}

.map-popup-actions {
    margin-top: 10px;
    border-top: 1px solid var(--border-color);
    padding-top: 8px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Port Grid visualizer */
.port-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
    margin: 15px 0;
}

.port-node {
    aspect-ratio: 1;
    border-radius: 50%;
    background: #475569;
    border: 2px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    color: white;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.port-node.active {
    background: var(--color-success);
    box-shadow: 0 0 8px var(--color-success-glow);
}

.port-node.odc-active {
    background: var(--color-purple);
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
}

.port-node.idle {
    background: #475569;
}

.port-node.broken {
    background: var(--color-danger);
    box-shadow: 0 0 8px var(--color-danger-glow);
}

.port-node:hover {
    transform: scale(1.15);
}

/* Tooltip on port node */
.port-node[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 10;
}

.port-node:hover::before {
    opacity: 1;
}

/* To-Do List styling */
.todo-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.todo-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s;
}

.todo-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.todo-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.todo-text {
    flex-grow: 1;
    margin: 0 16px;
    font-size: 13px;
    color: var(--text-primary);
}

.todo-item.completed .todo-text {
    text-decoration: line-through;
    color: var(--text-muted);
}

.todo-delete {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

.todo-delete:hover {
    color: var(--color-danger);
}

/* Modal dialog */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    box-shadow: var(--glass-shadow);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    padding: 24px;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.modal-backdrop.show .modal-box {
    transform: scale(1);
}

.modal-header {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
}

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

/* SLA Metric visualizer */
.sla-display {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.sla-value {
    font-family: var(--font-heading);
    font-size: 48px;
    font-weight: 800;
    color: var(--color-success);
    text-shadow: 0 0 20px var(--color-success-glow);
}

.sla-value.warning {
    color: var(--color-warning);
    text-shadow: 0 0 20px var(--color-warning-glow);
}

.sla-value.danger {
    color: var(--color-danger);
    text-shadow: 0 0 20px var(--color-danger-glow);
}

.sla-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* Login page styling */
.login-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #0f172a 0%, #020617 100%);
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(16px);
    border-radius: 16px;
    padding: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-purple));
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 0 20px var(--color-primary-glow);
    font-size: 24px;
}

.login-title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: white;
}

.login-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 6px;
}

.login-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-danger);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    font-size: 13px;
    margin-bottom: 20px;
    text-align: center;
}

/* File Upload input custom styling */
.file-upload-wrapper {
    position: relative;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.file-upload-wrapper:hover {
    border-color: var(--color-primary);
    background: rgba(59, 130, 246, 0.02);
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-upload-text {
    font-size: 13px;
    color: var(--text-secondary);
}

.file-upload-text strong {
    color: var(--color-primary);
}

/* Print report layout */
@media print {

    .sidebar,
    .top-bar,
    .btn,
    .no-print {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
        background: white !important;
        color: black !important;
    }

    .card-panel {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        color: black !important;
    }

    .sla-display {
        border: 2px solid #ccc !important;
        background: none !important;
    }

    .sla-value {
        color: black !important;
        text-shadow: none !important;
    }

    table.modern-table th {
        color: black !important;
        border-bottom: 2px solid black !important;
    }

    table.modern-table td {
        color: black !important;
        border-bottom: 1px solid #ccc !important;
    }
}

/* --- Responsive & Mobile Layout Styles --- */

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 4999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

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

.dashboard-split {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-top: 10px;
}

.reports-split {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-bottom: 30px;
}

/* Collapsible sidebar for desktop (screen > 992px) */
@media (min-width: 993px) {
    body.sidebar-collapsed .sidebar {
        left: -260px;
    }

    body.sidebar-collapsed .main-content {
        margin-left: 0;
    }
}

#mobile-menu-btn {
    display: inline-flex;
    /* Show toggle menu button on desktop as well */
}

/* Medium Devices (Tablets and Landscape Mobile, 992px and down) */
@media (max-width: 992px) {
    .sidebar {
        left: -260px;
        transition: left 0.3s ease;
    }

    .sidebar.open {
        left: 0;
    }

    .main-content {
        margin-left: 0;
        min-width: 0 !important;
        width: 100% !important;
    }

    #mobile-menu-btn {
        display: inline-flex !important;
    }

    .top-bar {
        height: 52px !important;
        padding: 0 16px !important;
    }
    
    #mobile-menu-btn,
    #theme-toggle-btn {
        padding: 6px 10px !important;
        min-height: 34px !important;
        min-width: 34px !important;
    }

    #user-menu-trigger img,
    #user-menu-trigger > div {
        width: 30px !important;
        height: 30px !important;
        font-size: 11px !important;
    }

    .user-dropdown-content {
        margin-top: 10px !important;
    }
    
    .top-bar-clock {
        display: none !important;
    }

    .page-title {
        font-size: 15px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 250px;
    }

    .container {
        padding: 20px !important;
        gap: 20px !important;
        min-width: 0 !important;
        width: 100% !important;
    }

    .card-panel {
        padding: 20px !important;
        border-radius: 10px !important;
    }

    .form-row {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
        gap: 15px !important;
    }

    .stat-card {
        padding: 16px !important;
        gap: 12px !important;
    }

    .stat-icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 16px !important;
    }

    .stat-value {
        font-size: 20px !important;
    }

    .dashboard-split,
    .reports-split,
    .daily-overview-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    /* GIS Layout full screen on tablet/mobile */
    .gis-layout {
        height: 100vh;
        width: 100%;
        overflow: hidden;
    }

    #map-container {
        height: 100%;
        width: 100%;
    }

    /* GIS Inspector Panel layout as mobile floating drawer */
    #inspector-panel {
        left: 10px;
        right: 10px;
        width: auto !important;
        max-width: none;
        top: auto;
        bottom: 10px;
        max-height: 60vh;
    }

    /* Login Page Padding */
    .login-card {
        padding: 24px;
    }

    /* Table responsive mobile/tablet scrolling overrides */
    .table-responsive,
    .dataTables_wrapper {
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        display: block;
    }
    
    table.modern-table,
    .dataTables_wrapper table.dataTable {
        min-width: 900px !important;
    }

    /* Auto wrap all common inline grid containers to 1-column on tablet and mobile */
    div[style*="grid-template-columns: 1.2fr 1fr"],
    div[style*="grid-template-columns: 1.6fr 1fr"],
    div[style*="grid-template-columns: 1fr 2fr"],
    div[style*="grid-template-columns: 280px 1fr 1fr"],
    div[style*="grid-template-columns: 1fr 1.5fr"] {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
}

/* Small Devices (Mobile, 576px and down) */
@media (max-width: 576px) {
    .top-bar {
        height: 48px !important;
        padding: 0 10px !important;
    }

    #mobile-menu-btn,
    #theme-toggle-btn {
        padding: 4px 8px !important;
        min-height: 30px !important;
        min-width: 30px !important;
    }

    #user-menu-trigger img,
    #user-menu-trigger > div {
        width: 28px !important;
        height: 28px !important;
    }

    .page-title {
        font-size: 13px !important;
        max-width: 130px;
    }

    .container {
        padding: 12px !important;
        gap: 12px !important;
    }

    .card-panel {
        padding: 14px !important;
        border-radius: 8px !important;
    }

    .modal-box {
        padding: 16px !important;
    }

    .device-summary-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important;
        gap: 10px !important;
    }

    .stat-card {
        padding: 12px !important;
        gap: 8px !important;
    }

    .stat-icon {
        width: 36px !important;
        height: 36px !important;
        font-size: 14px !important;
    }

    .stat-value {
        font-size: 18px !important;
    }

    .stat-label {
        font-size: 10px !important;
    }

    /* Auto wrap 1fr 1fr grids on mobile to avoid overflow */
    div[style*="grid-template-columns: 1fr 1fr"],
    div[style*="grid-template-columns:1fr 1fr"],
    div[style*="display: grid; grid-template-columns: 1fr 1fr"],
    div[style*="display:grid; grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    /* Wrap flex forms */
    form[style*="display: flex"],
    form[style*="display:flex"] {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    form[style*="display: flex"] .form-control,
    form[style*="display:flex"] .form-control {
        width: 100% !important;
        flex-grow: 1 !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
    }
}

/* Geolocation marker pulsing animation */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

/* Custom Toast Notifications */
.toast-notification {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 8px;
    padding: 12px 18px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    min-width: 280px;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    opacity: 0;
    pointer-events: auto;
}

.toast-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-notification.success {
    border-left: 4px solid var(--color-success);
    border-top: 1px solid rgba(16, 185, 129, 0.2);
    border-right: 1px solid rgba(16, 185, 129, 0.2);
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
}

.toast-notification.error {
    border-left: 4px solid var(--color-danger);
    border-top: 1px solid rgba(239, 68, 68, 0.2);
    border-right: 1px solid rgba(239, 68, 68, 0.2);
    border-bottom: 1px solid rgba(239, 68, 68, 0.2);
}

.toast-notification.warning {
    border-left: 4px solid var(--color-warning);
    border-top: 1px solid rgba(245, 158, 11, 0.2);
    border-right: 1px solid rgba(245, 158, 11, 0.2);
    border-bottom: 1px solid rgba(245, 158, 11, 0.2);
}

.toast-notification.info {
    border-left: 4px solid var(--color-primary);
    border-top: 1px solid rgba(59, 130, 246, 0.2);
    border-right: 1px solid rgba(59, 130, 246, 0.2);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.toast-icon {
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-notification.success .toast-icon {
    color: var(--color-success);
}

.toast-notification.error .toast-icon {
    color: var(--color-danger);
}

.toast-notification.warning .toast-icon {
    color: var(--color-warning);
}

.toast-notification.info .toast-icon {
    color: var(--color-primary);
}

.toast-message {
    flex-grow: 1;
    line-height: 1.4;
}

/* Custom Confirm Modals */
.confirm-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.confirm-modal-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

.confirm-modal-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    box-shadow: var(--glass-shadow);
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    padding: 30px;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

[data-theme="light"] .confirm-modal-box {
    background: #ffffff;
    border-color: rgba(99, 102, 241, 0.12);
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.15);
}

.confirm-modal-backdrop.show .confirm-modal-box {
    transform: scale(1);
}

.confirm-modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 16px auto;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
}

.confirm-modal-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.confirm-modal-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 24px;
}

.confirm-modal-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.confirm-modal-actions .btn {
    min-width: 100px;
    margin: 0;
}

/* Pagination Styling */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.pagination-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
}

.pagination-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.pagination-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff;
    box-shadow: 0 0 12px var(--color-primary-glow);
}

.pagination-btn.disabled,
.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
}

.pagination-ellipsis {
    color: var(--text-muted);
    font-size: 14px;
    padding: 0 4px;
    user-select: none;
}

/* Table Checkbox Styles */
.modern-table th.checkbox-col,
.modern-table td.checkbox-col {
    width: 46px;
    text-align: center;
    padding-right: 0;
}

.table-checkbox {
    width: 17px;
    height: 17px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
    accent-color: var(--color-primary);
    cursor: pointer;
    vertical-align: middle;
    transition: all 0.2s;
}

.table-checkbox:hover {
    border-color: var(--color-primary);
}

/* Float / Action Bar style for Bulk Actions if needed */
.bulk-actions-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* DataTables Premium Custom Styling (Dark Mode Glassmorphism) */
.dataTables_wrapper {
    color: var(--text-primary) !important;
    font-family: var(--font-body);
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_processing,
.dataTables_wrapper .dataTables_paginate {
    color: var(--text-secondary) !important;
    margin-bottom: 16px;
    font-size: 13px;
}

.dataTables_wrapper .dataTables_length select {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 24px 6px 12px;
    border-radius: 8px;
    outline: none;
    transition: all 0.2s;
    cursor: pointer;
}

.dataTables_wrapper .dataTables_length select:focus {
    border-color: var(--color-primary);
}

.dataTables_wrapper .dataTables_filter input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 14px;
    border-radius: 8px;
    outline: none;
    transition: all 0.2s;
    margin-left: 10px !important;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-primary-glow);
}

.dataTables_wrapper table.dataTable {
    border-collapse: collapse !important;
    margin: 15px 0 !important;
    width: 100% !important;
    border: none !important;
}

.dataTables_wrapper table.dataTable th {
    background: rgba(255, 255, 255, 0.02) !important;
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 14px 16px !important;
}

.dataTables_wrapper table.dataTable td {
    padding: 14px 16px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03) !important;
    color: var(--text-primary) !important;
}

.dataTables_wrapper table.dataTable.no-footer {
    border-bottom: 1px solid var(--border-color) !important;
}

.dataTables_wrapper table.dataTable tbody tr {
    background: transparent !important;
}

.dataTables_wrapper table.dataTable tbody tr:hover td {
    background: rgba(255, 255, 255, 0.01) !important;
}

/* Paginate controls override */
.dataTables_wrapper .dataTables_paginate {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    justify-content: center;
    float: none !important;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    min-width: 38px;
    height: 38px;
    padding: 0 12px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: none;
    box-sizing: border-box;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: var(--text-primary) !important;
    transform: translateY(-1px);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: #ffffff !important;
    box-shadow: 0 0 12px var(--color-primary-glow) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active {
    opacity: 0.4 !important;
    color: var(--text-muted) !important;
    cursor: not-allowed !important;
    background: rgba(255, 255, 255, 0.02) !important;
    border-color: var(--border-color) !important;
    transform: none !important;
}

.dataTables_wrapper .dataTables_info {
    float: none !important;
    text-align: center;
    margin-top: 10px;
    color: var(--text-muted) !important;
}

/* Profile Layout */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 30px;
    margin-top: 20px;
}

.profile-avatar-wrapper {
    text-align: center;
    padding: 10px 0;
}

.profile-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-purple));
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 15px;
    box-shadow: 0 0 20px var(--color-primary-glow);
}

.profile-details {
    text-align: left;
    margin-top: 25px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.profile-detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 13px;
}

.profile-detail-label {
    color: var(--text-muted);
    font-weight: 500;
}

.profile-detail-value {
    color: var(--text-primary);
    font-weight: 600;
}

@media (max-width: 992px) {
    .profile-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Header User Dropdown Widget */
.header-user-dropdown #user-menu-trigger {
    transition: opacity 0.2s ease;
}

.header-user-dropdown #user-menu-trigger:hover {
    opacity: 0.85;
}

.user-dropdown-content {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--glass-shadow) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    overflow: hidden;
}

.dropdown-item {
    transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

[data-theme="light"] .dropdown-item:hover {
    background: rgba(0, 0, 0, 0.03) !important;
}



/* Settings Vertical Tabs Layout */
.settings-container {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 30px;
    align-items: start;
    margin-top: 10px;
}

.settings-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px;
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.settings-nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: none;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.settings-nav-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.settings-nav-btn.active {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.02) 100%);
    border-left: 3px solid var(--color-primary);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    font-weight: 600;
}

[data-theme="light"] .settings-nav-btn:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .settings-nav-btn.active {
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.08) 0%, rgba(79, 70, 229, 0.01) 100%);
    border-left: 3px solid var(--color-primary);
    color: var(--color-primary);
}

.settings-tab-content {
    display: none;
}

.settings-tab-content.active {
    display: block;
}

@media (max-width: 992px) {
    .settings-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .settings-nav {
        flex-direction: row;
        overflow-x: auto;
        padding: 10px;
        gap: 10px;
    }
    .settings-nav-btn {
        padding: 10px 14px;
        font-size: 13px;
        white-space: nowrap;
        width: auto;
    }
    .settings-nav-btn.active {
        border-left: none;
        border-bottom: 3px solid var(--color-primary);
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        background: rgba(59, 130, 246, 0.08);
    }
    [data-theme="light"] .settings-nav-btn.active {
        background: rgba(79, 70, 229, 0.05);
    }
    .settings-header-banner {
        padding: 16px !important;
        margin-bottom: 20px !important;
        gap: 14px !important;
    }
    .settings-header-icon {
        width: 44px !important;
        height: 44px !important;
        border-radius: 10px !important;
    }
    .settings-header-icon i {
        font-size: 16px !important;
    }
    .settings-header-banner h2 {
        font-size: 16px !important;
    }
    .settings-header-banner p {
        font-size: 12px !important;
    }
}

/* Logo & Favicon Theme Styles */
.logo-theme-light {
    display: none !important;
}
.logo-theme-dark {
    display: block !important;
}
[data-theme="light"] .logo-theme-light {
    display: block !important;
}
[data-theme="light"] .logo-theme-dark {
    display: none !important;
}

.brand-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    width: 100%;
}

/* Settings Responsive Header Banner & Panels */
.settings-header-banner {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(139, 92, 246, 0.08));
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.settings-header-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.logo-favicon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.logo-upload-panel {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 280px;
    padding: 20px;
}

.logo-preview-box {
    width: 100%;
    height: 120px;
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 12px;
    padding: 10px;
}

@media (max-width: 576px) {
    .settings-header-banner {
        padding: 12px !important;
        margin-bottom: 16px !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }
    .settings-header-icon {
        width: 36px !important;
        height: 36px !important;
        border-radius: 8px !important;
    }
    .settings-header-icon i {
        font-size: 14px !important;
    }
    .settings-header-banner h2 {
        font-size: 13px !important;
        margin-bottom: 2px !important;
    }
    .settings-header-banner p {
        display: block !important;
        font-size: 11px !important;
        line-height: 1.3 !important;
        color: var(--text-muted) !important;
    }
}

/* Logo & Favicon Grid Row inside unified General Settings */
.logo-favicon-grid-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 10px;
}

@media (max-width: 992px) {
    .logo-favicon-grid-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* GIS Map Context Menu (Right Click) */
.map-context-menu {
    position: absolute;
    z-index: 9999;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    min-width: 220px;
    padding: 6px 0;
    display: none;
    animation: fadeInContextMenu 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInContextMenu {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-5px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.map-context-menu-title {
    padding: 8px 16px 6px;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    margin-bottom: 4px;
}

[data-theme="light"] .map-context-menu-title {
    border-bottom-color: rgba(0, 0, 0, 0.03);
}

.map-context-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.map-context-menu-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .map-context-menu-item:hover {
    background: rgba(0, 0, 0, 0.02);
}

/* Custom left border colors for each element type on hover */
.map-context-menu-item.pop:hover {
    border-left-color: var(--color-warning);
    background: rgba(245, 158, 11, 0.08);
}
.map-context-menu-item.odc:hover {
    border-left-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.08);
}
.map-context-menu-item.jb:hover {
    border-left-color: #f97316;
    background: rgba(249, 115, 22, 0.08);
}
.map-context-menu-item.pole:hover {
    border-left-color: #64748b;
    background: rgba(100, 116, 139, 0.08);
}
.map-context-menu-item.odp:hover {
    border-left-color: var(--color-success);
    background: rgba(16, 185, 129, 0.08);
}
.map-context-menu-item.cable:hover {
    border-left-color: var(--color-primary);
    background: rgba(59, 130, 246, 0.08);
}

.map-context-menu-separator {
    height: 1px;
    background: var(--border-color);
    margin: 6px 0;
}

/* ═══════════════════════════════════════════════════════
   Floating Info Card — shows on marker click
   ═══════════════════════════════════════════════════════ */

#map-floating-info-card {
    position: absolute;
    z-index: 1200;
    pointer-events: all;
    min-width: 270px;
    max-width: 320px;
    display: none;
    filter: drop-shadow(0 16px 40px rgba(0, 0, 0, 0.55));
}

/* Slide-up + fade in */
@keyframes infoCardIn {
    from { opacity: 0; transform: translateY(10px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)   scale(1);    }
}
@keyframes infoCardOut {
    from { opacity: 1; transform: translateY(0)   scale(1);    }
    to   { opacity: 0; transform: translateY(6px) scale(0.97); }
}

#map-floating-info-card .info-card-inner {
    background: var(--bg-card, rgba(15, 23, 42, 0.97));
    border: 1px solid var(--border-color, rgba(255,255,255,0.08));
    border-radius: 14px;
    overflow: hidden;
    animation: infoCardIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: var(--font-primary, 'Inter', sans-serif);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

#map-floating-info-card.info-card-closing .info-card-inner {
    animation: infoCardOut 0.18s ease-in forwards;
}

/* ── Header ── */
.ic-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 14px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: relative;
}

/* Colored accent line at top of header */
.ic-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary, #3b82f6), rgba(139,92,246,0.5));
    border-radius: 14px 14px 0 0;
}

.ic-icon-wrap {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.ic-title-wrap {
    flex: 1;
    min-width: 0;
}

.ic-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    word-break: break-word;
}

.ic-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 5px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

/* X Close button */
.info-card-close-btn {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    margin-top: -2px;
    margin-right: -2px;
}
.info-card-close-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

/* ── Body ── */
.ic-body {
    padding: 12px 14px 14px;
    max-height: 340px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.ic-section {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 8px;
}

.ic-row-space {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.ic-bar-track {
    height: 5px;
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
    overflow: hidden;
}
.ic-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}

.ic-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.ic-value {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 1px;
    font-weight: 500;
}

.ic-info-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

.ic-info-row .ic-icon {
    font-size: 11px;
    margin-top: 4px;
    flex-shrink: 0;
    width: 14px;
    text-align: center;
}

.ic-divider {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 10px 0;
}

/* Google Maps button */
.ic-gmaps-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 9px 14px;
    border-radius: 10px;
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #ffffff !important;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none !important;
    margin-top: 4px;
    transition: opacity 0.15s, transform 0.1s;
    box-sizing: border-box;
}
.ic-gmaps-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    text-decoration: none !important;
}
.ic-gmaps-btn i {
    font-size: 13px;
    color: #ffffff !important;
}

/* ── Light theme ── */
[data-theme="light"] #map-floating-info-card .info-card-inner {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] #map-floating-info-card {
    filter: drop-shadow(0 16px 40px rgba(0, 0, 0, 0.2));
}
[data-theme="light"] .info-card-close-btn {
    border-color: rgba(0,0,0,0.1);
    background: rgba(0,0,0,0.03);
    color: var(--text-muted);
}
[data-theme="light"] .ic-bar-track {
    background: rgba(0,0,0,0.08);
}
[data-theme="light"] .ic-section {
    background: rgba(0,0,0,0.02);
    border-color: rgba(0,0,0,0.06);
}
[data-theme="light"] .ic-divider {
    background: rgba(0,0,0,0.07);
}



/* Override Leaflet's default tooltip shell */
.leaflet-tooltip.map-hover-tooltip {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    color: inherit !important;
    white-space: normal !important;
    pointer-events: none;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.5));
}

/* Remove the little arrow/tip that Leaflet draws */
.leaflet-tooltip.map-hover-tooltip::before {
    display: none !important;
}

/* Animate in */
@keyframes tooltipFadeIn {
    from { opacity: 0; transform: translateY(6px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)  scale(1);    }
}

/* The actual tooltip card */
.map-tooltip-card {
    background: var(--bg-card, rgba(17, 24, 39, 0.96));
    border: 1px solid var(--border-color, rgba(255,255,255,0.08));
    border-radius: 12px;
    padding: 12px 14px 10px;
    min-width: 210px;
    max-width: 280px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    font-family: var(--font-primary, 'Inter', sans-serif);
    animation: tooltipFadeIn 0.15s ease-out;
    position: relative;
    overflow: hidden;
}

/* Subtle top accent gradient line */
.map-tooltip-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary, #3b82f6), transparent);
    border-radius: 12px 12px 0 0;
    opacity: 0.6;
}

/* Header row: icon + name + badges */
.map-tooltip-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.06));
}

.map-tooltip-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.map-tooltip-title {
    flex: 1;
    min-width: 0;
}

/* Body section */
.map-tooltip-body {
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-secondary, #9ca3af);
}

/* Light theme adjustments */
[data-theme="light"] .map-tooltip-card {
    background: rgba(255, 255, 255, 0.97);
    border-color: rgba(0, 0, 0, 0.1);
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.18));
}

[data-theme="light"] .leaflet-tooltip.map-hover-tooltip {
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.18));
}

/* ── Pinned tooltip state (when clicked / locked open) ── */

/* Ensure pinned tooltip renders above other UI */
.leaflet-tooltip.map-hover-tooltip.map-tooltip-pinned {
    filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.65)) !important;
    z-index: 2000 !important;
}

/* Pulse ring animation when first pinned */
@keyframes tooltipPinPulse {
    0%   { box-shadow: 0 0 0 0 rgba(var(--color-primary-rgb, 59,130,246), 0.5); }
    70%  { box-shadow: 0 0 0 8px rgba(var(--color-primary-rgb, 59,130,246), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--color-primary-rgb, 59,130,246), 0); }
}

/* The card itself when pinned */
.map-tooltip-pinned .map-tooltip-card {
    border-color: rgba(59, 130, 246, 0.45) !important;
    animation: tooltipFadeIn 0.15s ease-out, tooltipPinPulse 0.6s ease-out 0.1s;
    background: var(--bg-card, rgba(15, 23, 42, 0.98));
}

/* Gradient top line becomes brighter blue when pinned */
.map-tooltip-pinned .map-tooltip-card::before {
    background: linear-gradient(90deg, var(--color-primary, #3b82f6), rgba(139,92,246,0.6));
    opacity: 1;
}

/* Pin indicator badge — small tag in top-right of the header */
.map-tooltip-pinned .map-tooltip-header::after {
    content: '\f08d'; /* fa-thumbtack unicode */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 9px;
    color: var(--color-primary, #3b82f6);
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 4px;
    padding: 2px 5px;
    margin-left: auto;
    flex-shrink: 0;
    letter-spacing: 0;
    line-height: 1.5;
    align-self: flex-start;
    position: relative;
    top: -2px;
}

/* Dismiss hint text — changes when pinned */
.map-tooltip-pinned .map-tooltip-hint {
    color: rgba(59, 130, 246, 0.8) !important;
    border-top-color: rgba(59, 130, 246, 0.15) !important;
}

.map-tooltip-pinned .map-tooltip-hint .hint-hover-text {
    display: none;
}

.map-tooltip-pinned .map-tooltip-hint::after {
    content: 'Klik marker lagi untuk tutup';
}

/* Light theme pinned */
[data-theme="light"] .map-tooltip-pinned .map-tooltip-card {
    background: rgba(248, 250, 252, 0.99);
    border-color: rgba(59, 130, 246, 0.4) !important;
}

/* --- Form Control Responsive Enhancement --- */
.form-control {
    width: 100%;
}

/* --- Card Title Mobile Responsive Wrap --- */
@media (max-width: 576px) {
    .card-title {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }
    .card-title button,
    .card-title .btn {
        width: 100% !important;
        justify-content: center !important;
        margin-top: 5px;
    }
}

/* --- Incidents Toolbar Responsive Layout --- */
.incident-toolbar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 16px;
    flex-wrap: wrap;
}

.toolbar-search-input {
    max-width: 300px;
    flex-grow: 1;
    margin-bottom: 0;
}

.toolbar-filter-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-select {
    width: 140px;
    margin-bottom: 0;
}

.toolbar-filter-form select.select-category {
    width: 160px;
}

.toolbar-action-buttons {
    display: inline-flex;
    gap: 10px;
    align-items: center;
}

@media (max-width: 768px) {
    .incident-toolbar-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .toolbar-search-input {
        max-width: 100% !important;
        width: 100%;
    }
    
    .toolbar-filter-form {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
    }
    
    .filter-select {
        width: 100% !important;
    }
    
    .toolbar-filter-form select.select-category {
        width: 100% !important;
        grid-column: span 2;
    }
    
    .filter-btn {
        width: 100% !important;
        grid-column: span 2;
        height: 38px;
        padding: 8px 12px;
    }
    
    .toolbar-action-buttons {
        width: 100%;
        display: flex;
    }
    
    .toolbar-action-buttons .btn {
        width: 100%;
        justify-content: center;
        padding: 10px 14px;
    }
    
    .bulk-actions-wrapper,
    .bulk-actions-wrapper .btn {
        width: 100%;
    }
}

/* --- NAPs Action Bar Responsive Layout --- */
.nap-action-bar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.nap-action-header {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    flex-grow: 1;
}

.nap-filter-form {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: 10px;
}

.nap-action-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.nap-search-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 16px;
    flex-wrap: wrap;
}

.nap-search-input {
    max-width: 300px;
    flex-grow: 1;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .nap-action-bar-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .nap-action-header {
        flex-direction: column;
        align-items: stretch;
        margin-left: 0;
        gap: 10px;
    }
    
    .nap-filter-form {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin-left: 0;
        width: 100%;
    }
    
    .nap-filter-form select {
        width: 100% !important;
    }
    
    .nap-filter-form .filter-btn {
        grid-column: span 2;
        width: 100% !important;
        height: 38px;
        padding: 8px 12px;
    }
    
    .nap-action-buttons {
        width: 100%;
    }
    
    .nap-action-buttons .btn {
        width: 100%;
        justify-content: center;
        padding: 10px 14px;
    }
    
    .nap-search-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .nap-search-input {
        max-width: 100% !important;
        width: 100%;
    }
}