/* ============================================
   THEME VARIABLES - Light & Dark Modes
   ============================================ */

/* DEFAULT THEME - DARK MODE */
:root {
    /* Background Colors */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-hover: #475569;

    /* Text Colors */
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;

    /* Border & Dividers */
    --border-color: #334155;

    /* Accent Colors */
    --accent-orange: #f97316;
    --accent-green: #22c55e;
    --accent-red: #ef4444;
    --accent-blue: #3b82f6;
    --accent-yellow: #eab308;

    /* Component Specific */
    --input-bg: #1e293b;
    --input-border: #334155;
    --input-text: #f1f5f9;
    --input-placeholder: #64748b;

    --modal-bg: #1e293b;
    --modal-overlay: rgba(0, 0, 0, 0.7);

    --table-header-bg: #334155;
    --table-row-bg: #ffffff;
    --table-row-text: #1e293b;
    --table-row-hover: #a4dda4;

    --card-bg: #1e293b;
    --card-border: #334155;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
}

/* LIGHT THEME */
[data-theme="light"] {
    /* Background Colors - Light gray tones */
    --bg-primary: #f1f5f9;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #e2e8f0;
    --bg-hover: #cbd5e1;

    /* Text Colors - Dark for readability */
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;

    /* Border & Dividers - Light blue-gray */
    --border-color: #cbd5e1;

    /* Accent Colors */
    --accent-orange: #f97316;
    --accent-green: #22c55e;
    --accent-red: #ef4444;
    --accent-blue: #475569; /* Blue marine matte */
    --accent-yellow: #eab308;

    /* Component Specific */
    --input-bg: #ffffff;
    --input-border: #94a3b8;
    --input-text: #0f172a;
    --input-placeholder: #94a3b8;

    --modal-bg: #f8fafc;
    --modal-overlay: rgba(0, 0, 0, 0.5);

    --table-header-bg: #e2e8f0;
    --table-row-bg: #ffffff;
    --table-row-text: #0f172a;
    --table-row-hover: #a4dda4;

    --card-bg: #f8fafc;
    --card-border: #cbd5e1;

    /* Shadows - Subtle */
    --shadow-sm: 0 1px 2px rgba(71, 85, 105, 0.08);
    --shadow-md: 0 4px 6px rgba(71, 85, 105, 0.12);
    --shadow-lg: 0 10px 25px rgba(71, 85, 105, 0.15);
}

/* ============================================
   THEME TOGGLE BUTTON STYLES
   ============================================ */

.theme-toggle {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-orange);
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 12px 30px rgba(249, 115, 22, 0.4);
}

.theme-toggle:active {
    transform: scale(0.95);
}

/* Theme Toggle in Navigation */
.nav-theme-toggle {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: rgba(249, 115, 22, 0.15);
    border: 1px solid rgba(249, 115, 22, 0.3);
    color: var(--accent-orange);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.nav-theme-toggle:hover {
    background: var(--accent-orange);
    color: white;
    transform: scale(1.05);
}

/* Smooth transition for theme changes */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Prevent transition on page load */
.preload * {
    transition: none !important;
}

/* ============================================
   LIGHT THEME OVERRIDES FOR SPECIFIC COMPONENTS
   ============================================ */

/* Body background in light mode */
[data-theme="light"] body {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

/* Navigation in Light Mode - Light gray with dark text */
[data-theme="light"] .top-nav {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .nav-brand .brand-text {
    color: #0f172a !important;
}

[data-theme="light"] .nav-link {
    color: #475569 !important;
}

[data-theme="light"] .nav-link:hover,
[data-theme="light"] .nav-link.active {
    color: #f97316 !important;
    background: rgba(249, 115, 22, 0.1) !important;
}

[data-theme="light"] .nav-dropdown-menu {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .nav-dropdown-item {
    color: #475569 !important;
}

[data-theme="light"] .nav-dropdown-item:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

/* User info in light mode */
[data-theme="light"] .nav-user-name {
    color: #0f172a !important;
}

[data-theme="light"] .nav-user-role {
    color: #64748b !important;
}

[data-theme="light"] .nav-user-avatar {
    background: #f97316 !important;
    color: white !important;
}

/* Status Badges - ensure they work in both themes */
.status-badge {
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Forms in Light Mode */
[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
    background: var(--input-bg);
    color: var(--input-text);
    border-color: var(--input-border);
}

[data-theme="light"] input:focus,
[data-theme="light"] select:focus,
[data-theme="light"] textarea:focus {
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

/* Modal in Light Mode */
[data-theme="light"] .modal-panel {
    background: var(--modal-bg);
    box-shadow: var(--shadow-lg);
}

[data-theme="light"] .modal-overlay {
    background: var(--modal-overlay);
}

/* Cards in Light Mode */
[data-theme="light"] .dossier-card,
[data-theme="light"] .card {
    background: var(--card-bg);
    border-color: var(--card-border);
}

[data-theme="light"] .dossier-card:hover {
    box-shadow: var(--shadow-md);
}

/* Tables - keep white background for data visibility */
[data-theme="light"] .positions-table td,
[data-theme="light"] .dossiers-table td,
[data-theme="light"] table td {
    background: var(--table-row-bg);
    color: var(--table-row-text);
}

[data-theme="light"] .positions-table th,
[data-theme="light"] .dossiers-table th,
[data-theme="light"] table th {
    background: var(--table-header-bg);
    color: var(--text-secondary);
}

.positions-table tbody tr:hover td,
.dossiers-table tbody tr:hover td {
    background: #a4dda4 !important;
}

/* Excel-style tables */
[data-theme="light"] .excel-table {
    background: var(--bg-secondary);
}

[data-theme="light"] .excel-table th {
    background: var(--table-header-bg);
    color: var(--text-primary);
}

[data-theme="light"] .excel-table td {
    background: #ffffff;
    color: #1e293b;
    border-color: #e2e8f0;
}

/* Buttons */
[data-theme="light"] .btn {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="light"] .btn:hover {
    background: var(--bg-hover);
}

[data-theme="light"] .btn-primary {
    background: var(--accent-orange);
    color: white;
    border: none;
}

[data-theme="light"] .btn-primary:hover {
    background: #ea580c;
}

/* Stat Cards - ensure white text in dark mode */
.stat-card .stat-label {
    color: var(--text-muted) !important;
}

.stat-card .stat-value {
    color: var(--text-primary) !important;
}

/* Stats Dashboard ensure visibility */
.stats-dashboard .stat-card {
    background: var(--card-bg);
    border-color: var(--card-border);
}

/* ============================================
   COMPREHENSIVE LIGHT THEME OVERRIDES
   ============================================ */

/* Page headers and sections */
[data-theme="light"] .page-header {
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    color: #0f172a !important;
}

[data-theme="light"] .page-header h1 {
    color: #0f172a !important;
}

[data-theme="light"] .page-header p {
    color: #64748b !important;
}

/* Stats dashboard */
[data-theme="light"] .stats-dashboard {
    background: #f8fafc !important;
}

[data-theme="light"] .stats-dashboard .stat-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .stats-dashboard .stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

/* Filters and search bars */
[data-theme="light"] .filters-bar {
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .filter-group label {
    color: #64748b !important;
}

[data-theme="light"] .search-input {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

[data-theme="light"] .search-input::placeholder {
    color: #94a3b8 !important;
}

/* Containers and panels */
[data-theme="light"] .positions-table-container,
[data-theme="light"] .dossiers-table-container,
[data-theme="light"] .dossiers-grid {
    background: #f8fafc !important;
}

/* Position cards */
[data-theme="light"] .position-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #0f172a !important;
}

[data-theme="light"] .position-card-header {
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
    color: #0f172a !important;
}

[data-theme="light"] .position-card-body {
    color: #334155 !important;
}

/* Dossier cards */
[data-theme="light"] .dossier-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .dossier-card-header {
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .dossier-id {
    color: #f97316 !important;
}

[data-theme="light"] .client-name {
    color: #0f172a !important;
}

[data-theme="light"] .dossier-info-row .label {
    color: #64748b !important;
}

[data-theme="light"] .dossier-info-row .value {
    color: #0f172a !important;
}

/* Mini stats */
[data-theme="light"] .stat-mini {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .stat-mini .value {
    color: #0f172a !important;
}

[data-theme="light"] .stat-mini .label {
    color: #64748b !important;
}

/* All text elements */
[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6 {
    color: #0f172a !important;
}

[data-theme="light"] p {
    color: #334155 !important;
}

[data-theme="light"] label {
    color: #475569 !important;
}

/* Form hints and helper text */
[data-theme="light"] .form-hint {
    color: #64748b !important;
}

/* Icon colors */
[data-theme="light"] .nav-icon {
    color: #64748b !important;
}

/* Ensure content sections have proper background */
[data-theme="light"] .content-section,
[data-theme="light"] .main-content {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

/* Shipment Register & Dynamic Tracking Section */
[data-theme="light"] .register-section,
[data-theme="light"] .tracking-section {
    background: #f8fafc !important;
}

[data-theme="light"] .register-section h2,
[data-theme="light"] .tracking-section h2 {
    color: #0f172a !important;
}

[data-theme="light"] .section-title {
    color: #0f172a !important;
}

[data-theme="light"] .section-subtitle {
    color: #475569 !important;
}

/* Position register items */
[data-theme="light"] .position-item {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #0f172a !important;
}

[data-theme="light"] .position-item-title {
    color: #0f172a !important;
}

[data-theme="light"] .position-item-subtitle {
    color: #64748b !important;
}

[data-theme="light"] .position-item-meta {
    color: #94a3b8 !important;
}

/* Timeline and tracking */
[data-theme="light"] .timeline-item {
    border-left: 2px solid #e2e8f0 !important;
}

[data-theme="light"] .timeline-item-title {
    color: #0f172a !important;
}

[data-theme="light"] .timeline-item-time {
    color: #64748b !important;
}

[data-theme="light"] .timeline-item-description {
    color: #475569 !important;
}

/* Tracking cards */
[data-theme="light"] .tracking-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .tracking-card-header {
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
    color: #0f172a !important;
}

[data-theme="light"] .tracking-card-body {
    color: #334155 !important;
}

[data-theme="light"] .tracking-status {
    color: #0f172a !important;
}

/* Info rows and details */
[data-theme="light"] .info-row {
    border-bottom: 1px solid #f1f5f9 !important;
}

[data-theme="light"] .info-row .label {
    color: #64748b !important;
}

[data-theme="light"] .info-row .value {
    color: #0f172a !important;
}

/* Badges and tags */
[data-theme="light"] .badge {
    background: #f1f5f9 !important;
    color: #475569 !important;
}

[data-theme="light"] .tag {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
}

/* Data tables text */
[data-theme="light"] .data-table {
    color: #0f172a !important;
}

[data-theme="light"] .data-table th {
    color: #475569 !important;
    background: #f8fafc !important;
}

[data-theme="light"] .data-table td {
    color: #0f172a !important;
}

/* Metadata and descriptions */
[data-theme="light"] .meta-info {
    color: #64748b !important;
}

[data-theme="light"] .description {
    color: #475569 !important;
}

[data-theme="light"] .helper-text {
    color: #64748b !important;
}

/* All spans and small text */
[data-theme="light"] span {
    color: inherit !important;
}

[data-theme="light"] small {
    color: #64748b !important;
}

/* Container numbers and references */
[data-theme="light"] .container-num,
[data-theme="light"] .reference-num,
[data-theme="light"] .dossier-num {
    color: #0f172a !important;
    font-weight: 600 !important;
}

/* Strong and emphasis */
[data-theme="light"] strong,
[data-theme="light"] b {
    color: #0f172a !important;
}

[data-theme="light"] em,
[data-theme="light"] i {
    color: #334155 !important;
}

/* Links in light mode */
[data-theme="light"] a {
    color: #f97316 !important;
}

[data-theme="light"] a:hover {
    color: #ea580c !important;
}

/* All divs with class containing 'text' */
[data-theme="light"] [class*="text-"] {
    color: #0f172a !important;
}

[data-theme="light"] .text-muted {
    color: #64748b !important;
}

[data-theme="light"] .text-secondary {
    color: #475569 !important;
}

/* Ensure all content areas have dark text */
[data-theme="light"] .content,
[data-theme="light"] .main,
[data-theme="light"] .container,
[data-theme="light"] .wrapper {
    color: #0f172a !important;
}

/* ============================================
   COMPREHENSIVE DIV AND ELEMENT OVERRIDES
   ============================================ */

/* All divs - ensure light gray background by default */
[data-theme="light"] div {
    background-color: inherit;
    color: inherit;
}

/* Sections and containers */
[data-theme="light"] section {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

[data-theme="light"] article {
    background: #f8fafc !important;
    color: #0f172a !important;
}

/* All buttons - Blue marine matte with white text */
[data-theme="light"] button {
    background: #475569 !important;
    color: #ffffff !important;
    border: 1px solid #334155 !important;
}

[data-theme="light"] button:hover {
    background: #334155 !important;
    border-color: #1e293b !important;
}

/* Primary buttons - Keep orange */
[data-theme="light"] .btn-primary,
[data-theme="light"] button.btn-primary {
    background: #f97316 !important;
    color: #ffffff !important;
    border: none !important;
}

[data-theme="light"] .btn-primary:hover,
[data-theme="light"] button.btn-primary:hover {
    background: #ea580c !important;
}

/* Secondary buttons */
[data-theme="light"] .btn,
[data-theme="light"] button.btn {
    background: #475569 !important;
    color: #ffffff !important;
    border: 1px solid #334155 !important;
}

[data-theme="light"] .btn:hover,
[data-theme="light"] button.btn:hover {
    background: #334155 !important;
}

/* Icon buttons */
[data-theme="light"] .btn-icon,
[data-theme="light"] button.btn-icon {
    background: #e2e8f0 !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
}

[data-theme="light"] .btn-icon:hover,
[data-theme="light"] button.btn-icon:hover {
    background: #475569 !important;
    color: #ffffff !important;
}

/* All borders - Light blue-gray marine */
[data-theme="light"] * {
    border-color: #cbd5e1;
}

/* Panels and boxes */
[data-theme="light"] .panel,
[data-theme="light"] .box,
[data-theme="light"] .widget {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

/* Grid containers */
[data-theme="light"] .grid,
[data-theme="light"] .grid-container {
    background: #f1f5f9 !important;
}

/* Lists */
[data-theme="light"] ul,
[data-theme="light"] ol {
    color: #0f172a !important;
}

[data-theme="light"] li {
    color: #334155 !important;
}

/* Blockquotes */
[data-theme="light"] blockquote {
    background: #f8fafc !important;
    border-left: 4px solid #475569 !important;
    color: #334155 !important;
}

/* Code blocks */
[data-theme="light"] code,
[data-theme="light"] pre {
    background: #e2e8f0 !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}

/* Headers and footers */
[data-theme="light"] header,
[data-theme="light"] footer {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

/* Asides and sidebars */
[data-theme="light"] aside,
[data-theme="light"] .sidebar {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

/* Toolbars and action bars */
[data-theme="light"] .toolbar,
[data-theme="light"] .action-bar {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
}

/* Dropdown menus */
[data-theme="light"] .dropdown,
[data-theme="light"] .menu {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 4px 12px rgba(71, 85, 105, 0.12) !important;
}

[data-theme="light"] .dropdown-item,
[data-theme="light"] .menu-item {
    color: #334155 !important;
}

[data-theme="light"] .dropdown-item:hover,
[data-theme="light"] .menu-item:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

/* Select dropdowns */
[data-theme="light"] select {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #94a3b8 !important;
}

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

/* Textareas */
[data-theme="light"] textarea {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #94a3b8 !important;
}

/* HR dividers */
[data-theme="light"] hr {
    border-color: #cbd5e1 !important;
}

/* Progress bars */
[data-theme="light"] .progress {
    background: #e2e8f0 !important;
}

[data-theme="light"] .progress-bar {
    background: #475569 !important;
}

/* Alerts and notifications */
[data-theme="light"] .alert {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

/* Tooltips */
[data-theme="light"] .tooltip {
    background: #334155 !important;
    color: #ffffff !important;
    border: 1px solid #1e293b !important;
}

/* Popover */
[data-theme="light"] .popover {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 4px 12px rgba(71, 85, 105, 0.12) !important;
}

/* Scrollbars */
[data-theme="light"] ::-webkit-scrollbar {
    background: #f1f5f9 !important;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: #cbd5e1 !important;
    border: 2px solid #f1f5f9 !important;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: #94a3b8 !important;
}

/* ============================================
   NOTIFICATION CENTER — Option 4 (Gradient Circle + Sidebar)
   ============================================ */

/* Floating Bubble */
.notification-bubble {
    position: fixed;
    bottom: 5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue), #6366f1) !important;
    border: none !important;
    color: #fff !important;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification-bubble:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, var(--accent-blue), #6366f1) !important;
}

.notification-bubble:active {
    transform: scale(0.95) !important;
}

/* Badge on bubble */
.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    background: var(--accent-red) !important;
    color: #fff !important;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid var(--bg-primary);
    line-height: 1;
}

/* Pulse animation */
@keyframes notif-pulse {
    0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.5); }
    70% { box-shadow: 0 0 0 12px rgba(99, 102, 241, 0); }
    100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

.notification-bubble.pulsing {
    animation: notif-pulse 2s infinite;
}

/* Right Sidebar Panel */
.notification-sidebar {
    position: fixed;
    top: 0;
    right: -380px;
    bottom: 0;
    width: 380px;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification-sidebar.visible {
    right: 0;
}

/* Sidebar backdrop */
.notification-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.notification-backdrop.visible {
    opacity: 1;
    visibility: visible;
}

/* Sidebar Header */
.notif-sidebar-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.notif-sidebar-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notif-sidebar-close {
    background: none !important;
    border: none !important;
    color: var(--text-muted) !important;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    border-radius: 4px;
    transition: all 0.15s;
}

.notif-sidebar-close:hover {
    color: var(--text-primary) !important;
    background: var(--bg-tertiary) !important;
}

/* Sidebar Tabs */
.notif-sidebar-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    background: var(--bg-secondary);
}

.notif-sidebar-tab {
    flex: 1;
    padding: 10px 16px;
    font-size: 0.78rem;
    font-weight: 600;
    background: none !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    color: var(--text-muted) !important;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.notif-sidebar-tab:hover {
    color: var(--text-secondary) !important;
    background: var(--bg-tertiary) !important;
}

.notif-sidebar-tab.active {
    color: var(--accent-blue) !important;
    border-bottom-color: var(--accent-blue) !important;
    background: none !important;
}

.notif-tab-count {
    padding: 1px 7px;
    border-radius: 9px;
    font-size: 0.6rem;
    background: rgba(239, 68, 68, 0.15) !important;
    color: var(--accent-red) !important;
    font-weight: 700;
    border: none !important;
    line-height: 1.4;
}

/* Sidebar Body */
.notif-sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* Notification Items */
.notif-item {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s;
}

.notif-item:hover {
    background: var(--bg-tertiary);
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-item.pending-task {
    border-left: 3px solid var(--accent-orange);
}

.notif-item.info-notif {
    border-left: 3px solid var(--accent-blue);
}

.notif-item .ni-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.notif-item .ni-icon {
    font-size: 0.95rem;
    flex-shrink: 0;
}

.notif-item .ni-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
}

.notif-item .ni-time {
    margin-left: auto;
    font-size: 0.62rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.notif-item .ni-body {
    font-size: 0.74rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-left: 0;
}

.notif-item .ni-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

.notif-item .ni-btn {
    padding: 5px 14px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.notif-item .ni-btn-approve {
    background: var(--accent-green) !important;
    color: #fff !important;
    border: none !important;
}

.notif-item .ni-btn-approve:hover {
    filter: brightness(1.15);
    background: var(--accent-green) !important;
}

.notif-item .ni-btn-read {
    background: var(--bg-tertiary) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border-color) !important;
}

.notif-item .ni-btn-read:hover {
    background: var(--bg-hover) !important;
}

.notif-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.notif-empty-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 8px;
    opacity: 0.5;
}

/* Light theme overrides for notification center */
[data-theme="light"] .notification-bubble {
    background: linear-gradient(135deg, #3b82f6, #6366f1) !important;
    border: none !important;
    color: #fff !important;
}

[data-theme="light"] .notification-sidebar {
    background: #ffffff !important;
    border-left: 1px solid #e2e8f0 !important;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .notif-sidebar-header {
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .notif-sidebar-tabs {
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .notif-sidebar-tab {
    color: #64748b !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
}

[data-theme="light"] .notif-sidebar-tab.active {
    color: #3b82f6 !important;
    border-bottom-color: #3b82f6 !important;
}

[data-theme="light"] .notif-sidebar-tab:hover {
    color: #334155 !important;
    background: #f1f5f9 !important;
}

[data-theme="light"] .notif-item {
    border-bottom: 1px solid #f1f5f9 !important;
}

[data-theme="light"] .notif-item:hover {
    background: #f8fafc !important;
}

[data-theme="light"] .notif-item .ni-title {
    color: #0f172a !important;
}

[data-theme="light"] .notif-item .ni-body {
    color: #64748b !important;
}

[data-theme="light"] .notif-sidebar-close {
    color: #94a3b8 !important;
    background: none !important;
    border: none !important;
}

[data-theme="light"] .notif-sidebar-close:hover {
    color: #0f172a !important;
    background: #f1f5f9 !important;
}

[data-theme="light"] .notif-item .ni-btn-approve {
    background: #22c55e !important;
    color: #fff !important;
    border: none !important;
}

[data-theme="light"] .notif-item .ni-btn-read {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
}
