/* ============================================
   seguAPP municipal - Tema Oscuro Profesional
   Colores: #1A1A2E, #16213E, #0F3460
   Acento: #00B4D8  |  Alerta: #E63946
   ============================================ */

:root {
    --bg-primary: #1A1A2E;
    --bg-secondary: #16213E;
    --bg-tertiary: #0F3460;
    --bg-card: #1E2A3A;
    --bg-input: #253547;
    --accent: #00B4D8;
    --accent-hover: #0096B7;
    --accent-light: rgba(0, 180, 216, 0.15);
    --danger: #E63946;
    --danger-hover: #C5303C;
    --warning: #F4A261;
    --success: #2EC4B6;
    --info: #00B4D8;
    --text-primary: #E8E8E8;
    --text-secondary: #A0AEC0;
    --text-muted: #6B7A8D;
    --border-color: #2D3E50;
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --header-height: 60px;
    --transition: all 0.3s ease;

    /* Bootstrap overrides para tema oscuro */
    --bs-body-color: #E8E8E8;
    --bs-body-bg: #1A1A2E;
    --bs-heading-color: #E8E8E8;
    --bs-secondary-color: #A0AEC0;
    --bs-tertiary-color: #6B7A8D;
    --bs-emphasis-color: #E8E8E8;
    --bs-link-color: #00B4D8;
    --bs-link-hover-color: #0096B7;
    --bs-border-color: #2D3E50;
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 0.875rem;
    overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--bg-tertiary); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border-right: 1px solid var(--border-color);
    z-index: 1050;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    min-height: var(--header-height);
    gap: 12px;
}

.sidebar-brand img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.sidebar-brand .brand-text {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
    overflow: hidden;
    transition: var(--transition);
}

.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav-text,
.sidebar.collapsed .sidebar-section-title,
.sidebar.collapsed .badge {
    display: none;
}

.sidebar-section-title {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 20px 20px 8px;
    white-space: nowrap;
}

.sidebar-nav {
    flex: 1;
    padding: 8px 0;
}

.nav-item {
    padding: 0 10px;
    margin-bottom: 2px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text-secondary);
    transition: var(--transition);
    gap: 12px;
    white-space: nowrap;
    position: relative;
}

.nav-link:hover {
    background: var(--accent-light);
    color: var(--accent);
}

.nav-link.active {
    background: var(--accent-light);
    color: var(--accent);
    font-weight: 600;
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--accent);
    border-radius: 0 3px 3px 0;
}

.nav-link i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.nav-link .badge {
    margin-left: auto;
    font-size: 0.65rem;
    padding: 3px 7px;
    border-radius: 10px;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed);
}

/* ============================================
   HEADER
   ============================================ */
.top-header {
    position: sticky;
    top: 0;
    z-index: 1040;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition);
}

.btn-sidebar-toggle:hover {
    background: var(--accent-light);
    color: var(--accent);
}

.service-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-dot.online { background: var(--success); }
.status-dot.offline { background: var(--danger); }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.notification-bell {
    position: relative;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition);
}

.notification-bell:hover {
    background: var(--accent-light);
    color: var(--accent);
}

.notification-bell .badge-count {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--danger);
    color: #fff;
    font-size: 0.6rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 8px;
    transition: var(--transition);
}

.user-menu:hover {
    background: var(--accent-light);
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-weight: 700;
    font-size: 0.85rem;
}

.user-info .user-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.user-info .user-role {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.role-badge {
    font-size: 0.6rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-badge.admin { background: rgba(230, 57, 70, 0.2); color: var(--danger); }
.role-badge.operador { background: var(--accent-light); color: var(--accent); }

/* ============================================
   PAGE CONTENT
   ============================================ */
.page-content {
    flex: 1;
    padding: 24px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.page-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 16px 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: 20px;
}

/* KPI Cards */
.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

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

.kpi-card.pendientes::before { background: var(--danger); }
.kpi-card.en-proceso::before { background: var(--warning); }
.kpi-card.resueltas::before { background: var(--success); }
.kpi-card.descartadas::before { background: var(--text-muted); }

.kpi-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
}

.kpi-value.text-danger { color: var(--danger); }
.kpi-value.text-warning { color: var(--warning); }
.kpi-value.text-success { color: var(--success); }
.kpi-value.text-muted { color: var(--text-muted); }

.kpi-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-icon {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 2rem;
    opacity: 0.15;
}

/* ============================================
   TABLES
   ============================================ */
.table {
    color: var(--text-primary);
    --bs-table-bg: transparent;
    --bs-table-hover-bg: rgba(0, 180, 216, 0.05);
    --bs-table-striped-bg: rgba(255, 255, 255, 0.02);
    margin-bottom: 0;
}

.table thead th {
    border-bottom: 2px solid var(--border-color);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    font-weight: 600;
    padding: 12px 16px;
    white-space: nowrap;
}

.table tbody td {
    border-bottom: 1px solid var(--border-color);
    padding: 12px 16px;
    vertical-align: middle;
    font-size: 0.82rem;
}

.table tbody tr:hover {
    background: var(--bs-table-hover-bg);
}

.table-row-panico {
    border-left: 3px solid var(--danger) !important;
}

/* ============================================
   BADGES
   ============================================ */
.badge-estado {
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.badge-pendiente { background: rgba(230, 57, 70, 0.2); color: var(--danger); }
.badge-en-proceso,
.badge-enproceso { background: rgba(244, 162, 97, 0.2); color: var(--warning); }
.badge-resuelta { background: rgba(46, 196, 182, 0.2); color: var(--success); }
.badge-descartada { background: rgba(107, 122, 141, 0.2); color: var(--text-muted); }
.badge-prueba { background: rgba(107, 122, 141, 0.2); color: var(--text-muted); }

.badge-categoria {
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 500;
    color: #fff;
}

/* ============================================
   FORMS
   ============================================ */
.form-control, .form-select {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 0.85rem;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    background: var(--bg-input);
    border-color: var(--accent);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.15);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.form-check-input {
    background-color: var(--bg-input);
    border-color: var(--border-color);
}

.form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-accent {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 20px;
    font-weight: 600;
    font-size: 0.82rem;
    transition: var(--transition);
}

.btn-accent:hover {
    background: var(--accent-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 180, 216, 0.3);
}

.btn-danger-custom {
    background: var(--danger);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 20px;
    font-weight: 600;
}

.btn-danger-custom:hover {
    background: var(--danger-hover);
    color: #fff;
}

.btn-outline-accent {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 8px 20px;
    font-weight: 600;
    font-size: 0.82rem;
    transition: var(--transition);
}

.btn-outline-accent:hover {
    background: var(--accent);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.82rem;
    transition: var(--transition);
}

.btn-ghost:hover {
    background: var(--accent-light);
    color: var(--accent);
    border-color: var(--accent);
}

/* ============================================
   MODALS
   ============================================ */
.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    color: var(--text-primary);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 20px 24px;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 16px 24px;
}

.modal-title { font-weight: 700; }

.btn-close {
    filter: invert(1) brightness(0.8);
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination .page-link {
    background: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-secondary);
    font-size: 0.82rem;
    padding: 8px 14px;
    transition: var(--transition);
}

.pagination .page-link:hover {
    background: var(--accent-light);
    border-color: var(--accent);
    color: var(--accent);
}

.pagination .page-item.active .page-link {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.pagination .page-item.disabled .page-link {
    background: var(--bg-primary);
    border-color: var(--border-color);
    color: var(--text-muted);
}

/* ============================================
   FILTERS BAR
   ============================================ */
.filters-bar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

/* ============================================
   TABS
   ============================================ */
.nav-tabs {
    border-bottom: 2px solid var(--border-color);
}

.nav-tabs .nav-link {
    color: var(--text-secondary);
    border: none;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 0.82rem;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.nav-tabs .nav-link:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.nav-tabs .nav-link.active {
    color: var(--accent);
    background: transparent;
    border-bottom: 2px solid var(--accent);
}

/* ============================================
   ALERTS / TOASTS
   ============================================ */
.alert-custom {
    border-radius: 10px;
    border: none;
    padding: 12px 20px;
    font-size: 0.82rem;
    font-weight: 500;
}

.alert-custom.success {
    background: rgba(46, 196, 182, 0.15);
    color: var(--success);
    border-left: 4px solid var(--success);
}

.alert-custom.error {
    background: rgba(230, 57, 70, 0.15);
    color: var(--danger);
    border-left: 4px solid var(--danger);
}

.alert-custom.warning {
    background: rgba(244, 162, 97, 0.15);
    color: var(--warning);
    border-left: 4px solid var(--warning);
}

/* ============================================
   MAINTENANCE BANNER
   ============================================ */
.maintenance-banner {
    background: linear-gradient(90deg, rgba(244, 162, 97, 0.2), rgba(244, 162, 97, 0.1));
    border: 1px solid var(--warning);
    border-radius: 10px;
    padding: 12px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.82rem;
}

.maintenance-banner i {
    color: var(--warning);
    font-size: 1.2rem;
}

/* ============================================
   SLA RISK BANNER
   ============================================ */
.sla-risk-banner {
    background: linear-gradient(90deg, rgba(230, 57, 70, 0.2), rgba(230, 57, 70, 0.1));
    border: 1px solid var(--danger);
    border-radius: 10px;
    padding: 12px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.82rem;
}

.sla-risk-banner i {
    color: var(--danger);
    font-size: 1.2rem;
}

/* ============================================
   PANIC MODAL
   ============================================ */
.panic-modal .modal-content {
    border: 2px solid var(--danger);
    animation: panic-flash 0.5s ease-in-out infinite alternate;
}

@keyframes panic-flash {
    from { border-color: var(--danger); }
    to { border-color: transparent; }
}

.panic-modal .modal-header {
    background: rgba(230, 57, 70, 0.2);
}

/* ============================================
   MAP STYLES
   ============================================ */
.map-container {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.map-fullscreen {
    height: calc(100vh - var(--header-height) - 48px);
    border-radius: 12px;
}

.map-sidebar-panel {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    width: 280px;
    max-height: calc(100% - 20px);
    overflow-y: auto;
}

.leaflet-popup-content-wrapper {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

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

/* Pin parpadeante para pánico */
.panic-pin {
    animation: panic-blink 0.8s ease-in-out infinite alternate;
}

@keyframes panic-blink {
    from { opacity: 1; filter: brightness(1); }
    to { opacity: 0.4; filter: brightness(1.5); }
}

/* ============================================
   CHART CONTAINERS
   ============================================ */
.chart-container {
    position: relative;
    padding: 16px;
}

/* ============================================
   TIMELINE
   ============================================ */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
    padding-left: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -23px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg-card);
}

.timeline-date {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.timeline-content {
    font-size: 0.82rem;
}

/* ============================================
   LIGHTBOX
   ============================================ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.gallery-item {
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1;
    transition: var(--transition);
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============================================
   COLOR SWATCH
   ============================================ */
.color-swatch {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid var(--border-color);
    vertical-align: middle;
}

/* ============================================
   TOGGLE SWITCH
   ============================================ */
.form-switch .form-check-input {
    width: 40px;
    height: 20px;
    cursor: pointer;
}

/* ============================================
   FOOTER
   ============================================ */
.main-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 12px 24px;
    font-size: 0.72rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-status {
    display: flex;
    gap: 20px;
    align-items: center;
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

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

.login-logo img {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    margin-bottom: 12px;
}

.login-logo h1 {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--accent);
}

.login-logo p {
    color: var(--text-muted);
    font-size: 0.82rem;
}

/* ============================================
   STATUS PAGE (PUBLIC)
   ============================================ */
.status-page {
    min-height: 100vh;
    background: var(--bg-primary);
    padding: 40px 20px;
}

.status-card {
    max-width: 700px;
    margin: 0 auto;
}

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

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.85rem;
}

.status-indicator.online { color: var(--success); }
.status-indicator.offline { color: var(--danger); }

/* ============================================
   ERROR PAGES
   ============================================ */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--bg-primary);
}

.error-code {
    font-size: 6rem;
    font-weight: 900;
    color: var(--accent);
    line-height: 1;
    opacity: 0.3;
}

.error-message {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* ============================================
   NOTIFICATION DROPDOWN
   ============================================ */
.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 350px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    z-index: 1060;
    display: none;
    max-height: 400px;
    overflow-y: auto;
}

.notification-dropdown.show { display: block; }

.notification-dropdown-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 700;
    font-size: 0.85rem;
}

.notification-dropdown-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.notification-dropdown-item:hover {
    background: var(--accent-light);
}

.notification-dropdown-item.unread {
    border-left: 3px solid var(--accent);
}

.notification-dropdown-item .notif-title {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.notification-dropdown-item .notif-time {
    font-size: 0.68rem;
    color: var(--text-muted);
}

/* ============================================
   DRAG & DROP
   ============================================ */
.drag-handle {
    cursor: grab;
    color: var(--text-muted);
    padding: 4px 8px;
}

.drag-handle:active { cursor: grabbing; }

.dragging {
    opacity: 0.5;
    background: var(--accent-light) !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0 !important;
    }
}

@media (max-width: 768px) {
    .page-content { padding: 16px; }
    .kpi-value { font-size: 1.5rem; }
    .page-title { font-size: 1.2rem; }
}

/* ============================================
   UTILITIES
   ============================================ */
/* ============================================
   BOOTSTRAP DARK OVERRIDES
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
}

p, span, label, li, td, th, div {
    color: inherit;
}

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

.dropdown-menu {
    background: var(--bg-card);
    border-color: var(--border-color);
}

.dropdown-item {
    color: var(--text-primary);
}

.dropdown-item:hover, .dropdown-item:focus {
    background: var(--accent-light);
    color: var(--accent);
}

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

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

.list-group-item {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.input-group-text {
    background: var(--bg-input);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.form-text {
    color: var(--text-muted) !important;
}

.text-dark {
    color: var(--text-primary) !important;
}

.text-body {
    color: var(--text-primary) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.card-title {
    color: var(--text-primary);
}

.card-text {
    color: var(--text-secondary);
}

.table > :not(caption) > * > * {
    color: var(--text-primary);
    background-color: transparent;
    border-bottom-color: var(--border-color);
}

.accordion-button {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.accordion-body {
    background: var(--bg-card);
    color: var(--text-primary);
}

.breadcrumb-item, .breadcrumb-item a {
    color: var(--text-secondary);
}

.breadcrumb-item.active {
    color: var(--text-muted);
}

.alert {
    color: var(--text-primary);
}

strong, b {
    color: inherit;
}

small, .small {
    color: inherit;
}

.text-accent { color: var(--accent) !important; }
.text-danger-custom { color: var(--danger) !important; }
.text-success-custom { color: var(--success) !important; }
.text-warning-custom { color: var(--warning) !important; }
.bg-accent-light { background: var(--accent-light) !important; }
.border-accent { border-color: var(--accent) !important; }
.truncate-text {
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
