/* =====================================================
   NETCOMPTA — Design System Glassmorphism
   Bootstrap 5.3.0 + Font Awesome 6.4.0 + Custom Glass
   ===================================================== */

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

/* =====================================================
   CSS Variables (Design Tokens)
   ===================================================== */
:root {
    /* Primary — Deep Teal / Emerald */
    --primary: #0d9488;
    --primary-light: #14b8a6;
    --primary-dark: #0f766e;
    --primary-glow: rgba(13, 148, 136, 0.35);

    /* Accent — Warm Gold */
    --accent: #f59e0b;
    --accent-light: #fbbf24;
    --accent-dark: #d97706;

    /* Dark Background System */
    --bg-body: #0b1120;
    --bg-sidebar: linear-gradient(180deg, #0f172a 0%, #1a2332 100%);
    --bg-content: #101827;
    --bg-card: rgba(15, 23, 42, 0.6);

    /* Glass Effect Tokens */
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(16px);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

    --glass-premium-bg: rgba(255, 255, 255, 0.06);
    --glass-premium-border: rgba(255, 255, 255, 0.12);
    --glass-premium-blur: blur(24px);
    --glass-premium-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);

    /* Text colors */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-accent: #5eead4;

    /* Semantic */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    /* Sidebar */
    --sidebar-width: 270px;

    /* Header */
    --header-height: 64px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
    --transition-slow: 0.4s ease;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* =====================================================
   Reset & Base
   ===================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 14px; scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

a { color: var(--primary-light); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--text-accent); }

/* =====================================================
   .glass — Base glass effect
   ===================================================== */
.glass {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--glass-shadow);
}

/* =====================================================
   .glass-premium — Enhanced glass with stronger effect
   ===================================================== */
.glass-premium {
    background: var(--glass-premium-bg);
    backdrop-filter: var(--glass-premium-blur);
    -webkit-backdrop-filter: var(--glass-premium-blur);
    border: 1px solid var(--glass-premium-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-premium-shadow);
}

/* =====================================================
   Login Page
   ===================================================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0b1120 0%, #1a2332 40%, #0f3b35 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(13,148,136,0.2) 0%, transparent 70%);
    top: -150px; right: -150px;
    border-radius: 50%;
    animation: floatOrb 8s ease-in-out infinite;
}

.login-page::after {
    content: '';
    position: absolute;
    width: 350px; height: 350px;
    background: radial-gradient(circle, rgba(245,158,11,0.12) 0%, transparent 70%);
    bottom: -80px; left: -80px;
    border-radius: 50%;
    animation: floatOrb 10s ease-in-out infinite reverse;
}

@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -30px) scale(1.1); }
}

.login-card {
    position: relative; z-index: 2;
    width: 440px;
    padding: 48px 40px;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.login-logo .logo-icon {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
    font-size: 28px; color: #fff;
    box-shadow: 0 8px 24px var(--primary-glow);
}

.login-logo h1 {
    color: #fff; font-size: 1.8rem; font-weight: 800; letter-spacing: -0.5px;
}

.login-logo p {
    color: var(--text-secondary); font-size: 0.85rem; margin-top: 4px;
}

.login-field { margin-bottom: 20px; }

.login-field label {
    display: block; color: var(--text-secondary); font-size: 0.82rem;
    font-weight: 500; margin-bottom: 6px; letter-spacing: 0.3px;
}

.login-field .form-control {
    background: rgba(255,255,255,0.06) !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    color: #fff !important;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: all var(--transition-base);
}

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

.login-field .form-control:focus {
    border-color: var(--primary) !important;
    background: rgba(255,255,255,0.08) !important;
    box-shadow: 0 0 0 3px var(--primary-glow) !important;
}

.login-btn {
    width: 100%; padding: 13px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; border: none; border-radius: var(--radius-sm);
    font-size: 0.95rem; font-weight: 600; cursor: pointer;
    transition: all var(--transition-base);
    letter-spacing: 0.3px;
}

.login-btn:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    box-shadow: 0 8px 24px var(--primary-glow);
    transform: translateY(-1px);
}

.login-error {
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.3);
    border-radius: var(--radius-sm);
    padding: 10px 14px; color: #fca5a5;
    font-size: 0.85rem; margin-bottom: 16px;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* =====================================================
   App Layout
   ===================================================== */
.app-layout {
    display: flex;
    min-height: 100vh;
    background: var(--bg-body);
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    position: fixed;
    top: 0; left: 0; height: 100vh;
    z-index: 100;
    display: flex; flex-direction: column;
    border-right: 1px solid rgba(255,255,255,0.06);
    transition: all var(--transition-base);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.sidebar-header {
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.sidebar-brand {
    display: flex; align-items: center; gap: 12px;
}

.sidebar-brand .brand-icon {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: #fff; flex-shrink: 0;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.sidebar-brand .brand-text h2 {
    color: #fff; font-size: 1.1rem; font-weight: 700;
    letter-spacing: -0.3px; line-height: 1.2;
}

.sidebar-brand .brand-text small {
    color: var(--text-muted); font-size: 0.7rem;
    text-transform: uppercase; letter-spacing: 1px;
}

.sidebar-nav { padding: 12px 10px; flex: 1; }

.nav-section { margin-bottom: 6px; }

.nav-section-title {
    color: var(--text-muted); font-size: 0.68rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 1.2px;
    padding: 14px 14px 6px;
}

.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    font-size: 0.88rem; font-weight: 450;
    position: relative; margin-bottom: 2px;
}

.nav-item i { width: 20px; text-align: center; font-size: 0.95rem; flex-shrink: 0; }

.nav-item:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
}

.nav-item.active {
    background: rgba(13, 148, 136, 0.15);
    color: var(--text-accent);
    font-weight: 550;
}

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

.sidebar-footer {
    padding: 14px 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.sidebar-user {
    display: flex; align-items: center; gap: 10px;
}

.sidebar-user .user-avatar {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--accent-dark));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 0.8rem; flex-shrink: 0;
}

.sidebar-user .user-info { flex: 1; min-width: 0; }
.sidebar-user .user-name {
    color: var(--text-primary); font-size: 0.82rem; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user .user-role {
    color: var(--text-muted); font-size: 0.7rem;
}

.sidebar-logout {
    color: var(--text-muted);
    transition: all var(--transition-fast);
    cursor: pointer; padding: 6px;
    border-radius: var(--radius-sm);
    border: none; background: none;
    font-size: 1rem;
}
.sidebar-logout:hover { color: var(--danger); background: rgba(239,68,68,0.1); }

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex; flex-direction: column;
    min-height: 100vh;
    background: var(--bg-content);
}

/* Header */
.app-header {
    height: var(--header-height);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 28px;
    position: sticky; top: 0; z-index: 50;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: rgba(16, 24, 39, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.page-title {
    font-size: 1.15rem; font-weight: 700;
    color: var(--text-primary); letter-spacing: -0.3px;
}

.breadcrumb {
    margin: 0; padding: 0;
    background: none;
    font-size: 0.78rem;
}
.breadcrumb-item a { color: var(--text-muted); }
.breadcrumb-item a:hover { color: var(--primary-light); }
.breadcrumb-item.active { color: var(--text-secondary); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--text-muted); }

.header-badge {
    padding: 5px 14px;
    background: rgba(13,148,136,0.12);
    color: var(--text-accent);
    border-radius: 20px;
    font-size: 0.78rem; font-weight: 600;
    border: 1px solid rgba(13,148,136,0.2);
}

/* Page Content */
.page-content {
    flex: 1;
    padding: 24px 28px;
    max-width: 1440px;
    width: 100%;
}

/* =====================================================
   Bootstrap Overrides — Dark Mode
   ===================================================== */

/* Forms */
.form-control, .form-select {
    background-color: rgba(255,255,255,0.05) !important;
    border-color: rgba(255,255,255,0.1) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.form-control:focus, .form-select:focus {
    background-color: rgba(255,255,255,0.08) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--primary-glow) !important;
    color: var(--text-primary) !important;
}

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

.form-label {
    color: var(--text-secondary);
    font-size: 0.82rem; font-weight: 550;
    margin-bottom: 5px;
}

.form-label .text-danger { font-size: 0.9em; }

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

.form-check-input {
    background-color: rgba(255,255,255,0.1) !important;
    border-color: rgba(255,255,255,0.2) !important;
}
.form-check-input:checked {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

/* Buttons */
.btn { border-radius: var(--radius-sm); font-weight: 550; font-size: 0.85rem; transition: all var(--transition-fast); }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
    border: none !important;
    color: #fff !important;
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary)) !important;
    box-shadow: 0 4px 16px var(--primary-glow);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border: none !important;
}
.btn-success:hover { box-shadow: 0 4px 16px rgba(16,185,129,0.3); }

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    border: none !important;
}
.btn-danger:hover { box-shadow: 0 4px 16px rgba(239,68,68,0.3); }

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    border: none !important; color: #fff !important;
}

.btn-outline-light {
    border-color: rgba(255,255,255,0.15) !important;
    color: var(--text-secondary) !important;
}
.btn-outline-light:hover {
    background: rgba(255,255,255,0.06) !important;
    color: var(--text-primary) !important;
}

.btn-secondary {
    background: rgba(255,255,255,0.08) !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    color: var(--text-secondary) !important;
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.12) !important;
    color: var(--text-primary) !important;
}

/* Tables */
.table { color: var(--text-primary); }

.table > thead > tr > th {
    background: rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    color: var(--text-secondary);
    font-size: 0.78rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.5px;
    padding: 12px 16px;
    white-space: nowrap;
}

.table > tbody > tr > td {
    border-bottom: 1px solid rgba(255,255,255,0.04);
    padding: 11px 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    vertical-align: middle;
}

.table > tbody > tr:hover > td {
    background: rgba(255,255,255,0.03);
}

.table > tbody > tr:last-child > td { border-bottom: none; }

/* Badges */
.badge { font-weight: 600; font-size: 0.72rem; letter-spacing: 0.3px; padding: 4px 10px; border-radius: 20px; }

.bg-success-subtle { background: rgba(16,185,129,0.12) !important; color: #5eead4 !important; }
.bg-warning-subtle { background: rgba(245,158,11,0.12) !important; color: #fbbf24 !important; }
.bg-danger-subtle { background: rgba(239,68,68,0.12) !important; color: #fca5a5 !important; }
.bg-info-subtle { background: rgba(59,130,246,0.12) !important; color: #93c5fd !important; }
.bg-secondary-subtle { background: rgba(255,255,255,0.06) !important; color: var(--text-secondary) !important; }

/* Alerts */
.alert { border-radius: var(--radius-sm); animation: slideDown 0.3s ease; }

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-success { background: rgba(16,185,129,0.12); color: #5eead4; border: 1px solid rgba(16,185,129,0.25); }
.alert-danger { background: rgba(239,68,68,0.12); color: #fca5a5; border: 1px solid rgba(239,68,68,0.25); }
.alert-warning { background: rgba(245,158,11,0.12); color: #fbbf24; border: 1px solid rgba(245,158,11,0.25); }
.alert-info { background: rgba(59,130,246,0.12); color: #93c5fd; border: 1px solid rgba(59,130,246,0.25); }

/* Modals */
.modal-content {
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: var(--glass-premium-blur);
    border: 1px solid var(--glass-premium-border) !important;
    border-radius: var(--radius-lg) !important;
    color: var(--text-primary);
}

.modal-header {
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
    padding: 20px 24px;
}
.modal-header .modal-title { font-weight: 650; }
.modal-header .btn-close { filter: invert(1) grayscale(100%); }

.modal-body { padding: 24px; }

.modal-footer {
    border-top: 1px solid rgba(255,255,255,0.08) !important;
    padding: 16px 24px;
}

/* =====================================================
   Stat Cards
   ===================================================== */
.stat-card {
    padding: 22px;
    display: flex; align-items: flex-start; gap: 16px;
    transition: all var(--transition-base);
    position: relative; overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute; top: 0; left: 0;
    width: 100%; height: 3px;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.stat-card:hover { transform: translateY(-3px); }
.stat-card:hover::after { opacity: 1; }

.stat-card.stat-primary::after { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.stat-card.stat-accent::after { background: linear-gradient(90deg, var(--accent), var(--accent-light)); }
.stat-card.stat-info::after { background: linear-gradient(90deg, var(--info), #60a5fa); }
.stat-card.stat-danger::after { background: linear-gradient(90deg, var(--danger), #f87171); }

.stat-icon {
    width: 48px; height: 48px;
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; flex-shrink: 0;
}

.stat-icon.primary { background: rgba(13,148,136,0.15); color: var(--text-accent); }
.stat-icon.accent { background: rgba(245,158,11,0.15); color: var(--accent-light); }
.stat-icon.info { background: rgba(59,130,246,0.15); color: #93c5fd; }
.stat-icon.danger { background: rgba(239,68,68,0.15); color: #fca5a5; }

.stat-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; margin-bottom: 4px; }
.stat-value { font-size: 1.5rem; font-weight: 800; color: var(--text-primary); letter-spacing: -0.5px; line-height: 1.2; }
.stat-change { font-size: 0.75rem; color: var(--primary-light); font-weight: 500; margin-top: 4px; }

/* =====================================================
   Écritures comptables — Grille de saisie
   ===================================================== */
.ecriture-lines-table > thead > tr > th {
    background: rgba(13, 148, 136, 0.15) !important;
    color: var(--text-accent) !important;
    font-size: 0.78rem;
    border-bottom: 2px solid rgba(13,148,136,0.3) !important;
}

.ecriture-lines-table > thead > tr > th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.ecriture-lines-table > thead > tr > th:last-child { border-radius: 0 var(--radius-sm) 0 0; }

.ecriture-lines-table input,
.ecriture-lines-table select {
    width: 100%; padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-family: inherit; font-size: 0.85rem;
    background: transparent;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.ecriture-lines-table input:focus,
.ecriture-lines-table select:focus {
    border-color: var(--primary);
    background: rgba(13,148,136,0.08);
    outline: none;
}

.ecriture-lines-table input[type="number"] {
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.ecriture-totals {
    display: flex; justify-content: flex-end; gap: 24px;
    padding: 16px 22px;
    background: rgba(255,255,255,0.03);
    border-top: 2px solid rgba(255,255,255,0.08);
}

.ecriture-total-item { text-align: right; }
.ecriture-total-item .label {
    font-size: 0.75rem; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.5px;
}
.ecriture-total-item .value {
    font-size: 1.2rem; font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.ecriture-total-item .value.balanced { color: var(--success); }
.ecriture-total-item .value.unbalanced { color: var(--danger); }

/* Amount formatting */
.amount { font-variant-numeric: tabular-nums; font-weight: 500; }
.text-success-glow { color: var(--text-accent) !important; }
.text-debit { color: var(--text-accent); }
.text-credit { color: #93c5fd; }

/* =====================================================
   Ligne financière automatique (mode trésorerie)
   ===================================================== */
.financial-line-row {
    position: relative;
    background: rgba(59, 130, 246, 0.07) !important;
    border-left: 3px solid rgba(59, 130, 246, 0.5) !important;
}

.financial-line-row > td {
    border-bottom: 1px solid rgba(59, 130, 246, 0.15) !important;
    color: var(--text-secondary);
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

/* Pulse doux sur les montants auto */
.financial-line-row .financial-debit,
.financial-line-row .financial-credit {
    transition: color 0.3s ease;
}

.financial-line-row .financial-debit:not([value=""]):not([value="0"]),
.financial-line-row .financial-credit:not([value=""]):not([value="0"]) {
    color: #3b82f6 !important;
    font-weight: 700 !important;
}

/* Icône cadenas */
.financial-line-row .fa-lock {
    opacity: 0.6;
    font-size: 0.8rem;
}

/* Bandeau info trésorerie */
#banner_tresorerie {
    border-left: 4px solid rgba(59, 130, 246, 0.6);
    border-radius: var(--radius-sm);
    animation: slideDown 0.3s ease;
}

#banner_tresorerie strong { color: #93c5fd; }

/* Light theme overrides */
[data-theme="light"] .financial-line-row {
    background: rgba(59, 130, 246, 0.05) !important;
    border-left-color: rgba(59, 130, 246, 0.4) !important;
}

[data-theme="light"] .financial-line-row .financial-debit:not([value=""]):not([value="0"]),
[data-theme="light"] .financial-line-row .financial-credit:not([value=""]):not([value="0"]) {
    color: #2563eb !important;
}

[data-theme="light"] #banner_tresorerie strong { color: #1d4ed8; }

/* =====================================================
   États financiers
   ===================================================== */
.etat-financier { font-variant-numeric: tabular-nums; }

.etat-title {
    text-align: center; padding: 20px;
    border-bottom: 2px solid rgba(255,255,255,0.1);
}
.etat-title h2 { font-size: 1.3rem; color: var(--text-primary); }
.etat-title p { color: var(--text-secondary); font-size: 0.85rem; }

.total-row > td {
    background: rgba(255,255,255,0.04) !important;
    font-weight: 700 !important;
    border-top: 2px solid rgba(255,255,255,0.1) !important;
    border-bottom: 2px solid rgba(255,255,255,0.1) !important;
}

.grand-total-row > td {
    background: rgba(13, 148, 136, 0.15) !important;
    color: var(--text-accent) !important;
    font-weight: 700 !important;
    font-size: 0.95rem;
    padding: 14px 16px !important;
}

.section-header > td {
    background: rgba(13,148,136,0.08) !important;
    font-weight: 700;
    color: var(--text-accent) !important;
    border-bottom: 1px solid rgba(13,148,136,0.2) !important;
}

/* =====================================================
   Autocomplete
   ===================================================== */
.autocomplete-dropdown {
    position: absolute;
    top: 100%; left: 0; right: auto; min-width: 450px;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-sm);
    box-shadow: 0 16px 40px rgba(0,0,0,0.5);
    max-height: 400px; overflow-y: auto;
    z-index: 200;
    display: none;
}
.autocomplete-dropdown.show { display: block; }

.autocomplete-item {
    padding: 10px 16px; cursor: pointer;
    display: flex; align-items: center; gap: 12px;
    transition: background var(--transition-fast);
    font-size: 0.95rem;
}
.autocomplete-item:hover { background: rgba(13,148,136,0.15); }
.autocomplete-item .ac-number { font-weight: 600; color: var(--text-accent); min-width: 60px; }
.autocomplete-item .ac-label { color: var(--text-secondary); }

/* =====================================================
   Trésorerie widget
   ===================================================== */
.tresorerie-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.tresorerie-item:last-child { border-bottom: none; }

/* =====================================================
   Utilities
   ===================================================== */
.text-accent { color: var(--text-accent) !important; }
.text-muted-custom { color: var(--text-muted) !important; }
.fw-semi { font-weight: 600; }
.fw-800 { font-weight: 800; }

/* =====================================================
   Spinner
   ===================================================== */
.spinner-border-sm { width: 1rem; height: 1rem; }

/* =====================================================
   Print Styles
   ===================================================== */
@media print {
    .sidebar, .app-header, .no-print, .btn { display: none !important; }
    .main-content { margin-left: 0 !important; }
    .page-content { padding: 0; }
    .glass, .glass-premium { background: #fff !important; border: 1px solid #ddd !important; backdrop-filter: none !important; box-shadow: none !important; }
    body { background: #fff !important; color: #000 !important; }
    .table > thead > tr > th { background: #f0f0f0 !important; color: #333 !important; }
    .table > tbody > tr > td { color: #333 !important; }
    .print-only { display: block !important; }
}

.print-only { display: none; }

/* =====================================================
   Responsive
   ===================================================== */
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
}

@media (max-width: 768px) {
    .page-content { padding: 16px; }
}

/* =====================================================
   Scrollbar global
   ===================================================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.18); }

/* =====================================================
   Card glass header variants
   ===================================================== */
.card-glass-header {
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex; align-items: center; justify-content: space-between;
}

.card-glass-header h3 {
    font-size: 1rem; font-weight: 650;
    color: var(--text-primary);
    display: flex; align-items: center; gap: 8px;
}

.card-glass-footer {
    padding: 14px 22px;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex; align-items: center; justify-content: flex-end; gap: 10px;
}

/* Tabs in dark mode */
.nav-tabs {
    border-bottom: 2px solid rgba(255,255,255,0.08);
}
.nav-tabs .nav-link {
    color: var(--text-muted);
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: 10px 20px;
}
.nav-tabs .nav-link:hover { color: var(--text-primary); border-color: transparent; }
.nav-tabs .nav-link.active {
    color: var(--text-accent);
    border-bottom-color: var(--primary);
    background: transparent;
}

/* Empty state */
.empty-state {
    text-align: center; padding: 48px 24px;
    color: var(--text-muted);
}
.empty-state i { font-size: 3rem; margin-bottom: 12px; opacity: 0.4; }
.empty-state h5 { color: var(--text-secondary); font-weight: 600; margin-bottom: 6px; }
.empty-state p { font-size: 0.85rem; }

/* =====================================================
   THEME TOGGLE BUTTON
   ===================================================== */
.theme-toggle {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 1rem;
}
.theme-toggle:hover {
    background: rgba(255,255,255,0.12);
    color: var(--accent-light);
    transform: rotate(20deg);
}

/* =====================================================
   LIGHT THEME
   ===================================================== */
[data-theme="light"] {
    /* Backgrounds */
    --bg-body: #f1f5f9;
    --bg-sidebar: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    --bg-content: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.7);

    /* Glass — Light */
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);

    --glass-premium-bg: rgba(255, 255, 255, 0.75);
    --glass-premium-border: rgba(0, 0, 0, 0.1);
    --glass-premium-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);

    /* Text */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-accent: #0d9488;

    /* Primary stays the same */
    --primary-glow: rgba(13, 148, 136, 0.2);
}

/* Sidebar — Light */
[data-theme="light"] .sidebar {
    border-right: 1px solid #e2e8f0;
    box-shadow: 2px 0 12px rgba(0,0,0,0.04);
}

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

[data-theme="light"] .sidebar-brand .brand-text h2 { color: #0f172a; }
[data-theme="light"] .sidebar-brand .brand-text small { color: #94a3b8; }

[data-theme="light"] .sidebar::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); }

[data-theme="light"] .nav-item { color: #475569; }
[data-theme="light"] .nav-item:hover { background: rgba(0,0,0,0.04); color: #0f172a; }
[data-theme="light"] .nav-item.active { background: rgba(13,148,136,0.1); color: var(--primary); }

[data-theme="light"] .sidebar-footer { border-top: 1px solid #e2e8f0; }
[data-theme="light"] .sidebar-user .user-name { color: #0f172a; }
[data-theme="light"] .sidebar-logout:hover { background: rgba(239,68,68,0.08); }

/* Header — Light */
[data-theme="light"] .app-header {
    background: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid #e2e8f0;
}

[data-theme="light"] .header-badge {
    background: rgba(13,148,136,0.08);
    color: var(--primary-dark);
    border-color: rgba(13,148,136,0.15);
}

/* Card glass header/footer — Light */
[data-theme="light"] .card-glass-header { border-bottom: 1px solid #e2e8f0; }
[data-theme="light"] .card-glass-footer { border-top: 1px solid #e2e8f0; }

/* Forms — Light */
[data-theme="light"] .form-control,
[data-theme="light"] .form-select {
    background-color: #fff !important;
    border-color: #d1d5db !important;
    color: #0f172a !important;
}

[data-theme="light"] .form-control:focus,
[data-theme="light"] .form-select:focus {
    background-color: #fff !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--primary-glow) !important;
}

[data-theme="light"] .form-control::placeholder { color: #9ca3af !important; }
[data-theme="light"] .form-label { color: #374151; }

[data-theme="light"] .form-check-input {
    background-color: #fff !important;
    border-color: #d1d5db !important;
}

/* Buttons — Light */
[data-theme="light"] .btn-secondary {
    background: #f3f4f6 !important;
    border: 1px solid #d1d5db !important;
    color: #374151 !important;
}
[data-theme="light"] .btn-secondary:hover {
    background: #e5e7eb !important;
    color: #111827 !important;
}

[data-theme="light"] .btn-outline-light {
    border-color: #d1d5db !important;
    color: #475569 !important;
}
[data-theme="light"] .btn-outline-light:hover {
    background: #f3f4f6 !important;
    color: #111827 !important;
}

/* Tables — Light */
[data-theme="light"] .table { color: #0f172a; }

[data-theme="light"] .table > thead > tr > th {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    color: #64748b;
}

[data-theme="light"] .table > tbody > tr > td {
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

[data-theme="light"] .table > tbody > tr:hover > td {
    background: #f8fafc;
}

/* Badges — Light */
[data-theme="light"] .bg-success-subtle { background: rgba(16,185,129,0.1) !important; color: #047857 !important; }
[data-theme="light"] .bg-warning-subtle { background: rgba(245,158,11,0.1) !important; color: #b45309 !important; }
[data-theme="light"] .bg-danger-subtle { background: rgba(239,68,68,0.1) !important; color: #b91c1c !important; }
[data-theme="light"] .bg-info-subtle { background: rgba(59,130,246,0.1) !important; color: #1d4ed8 !important; }
[data-theme="light"] .bg-secondary-subtle { background: #f1f5f9 !important; color: #475569 !important; }

/* Alerts — Light */
[data-theme="light"] .alert-success { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
[data-theme="light"] .alert-danger { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
[data-theme="light"] .alert-warning { background: #fffbeb; color: #92400e; border-color: #fde68a; }
[data-theme="light"] .alert-info { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }

/* Modals — Light */
[data-theme="light"] .modal-content {
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    color: #0f172a;
}
[data-theme="light"] .modal-header { border-bottom: 1px solid #e2e8f0 !important; }
[data-theme="light"] .modal-header .btn-close { filter: none; }
[data-theme="light"] .modal-footer { border-top: 1px solid #e2e8f0 !important; }

/* Stat icons — Light */
[data-theme="light"] .stat-icon.primary { background: rgba(13,148,136,0.1); color: var(--primary); }
[data-theme="light"] .stat-icon.accent { background: rgba(245,158,11,0.1); color: var(--accent-dark); }
[data-theme="light"] .stat-icon.info { background: rgba(59,130,246,0.1); color: #2563eb; }
[data-theme="light"] .stat-icon.danger { background: rgba(239,68,68,0.1); color: #dc2626; }
[data-theme="light"] .stat-change { color: var(--primary-dark); }

/* Écriture lines — Light */
[data-theme="light"] .ecriture-lines-table > thead > tr > th {
    background: rgba(13,148,136,0.08) !important;
    color: var(--primary-dark) !important;
    border-bottom-color: rgba(13,148,136,0.2) !important;
}
[data-theme="light"] .ecriture-lines-table input:focus,
[data-theme="light"] .ecriture-lines-table select:focus {
    background: rgba(13,148,136,0.05);
}
[data-theme="light"] .ecriture-totals {
    background: #f8fafc;
    border-top: 2px solid #e2e8f0;
}

/* États financiers — Light */
[data-theme="light"] .etat-title { border-bottom-color: #e2e8f0; }
[data-theme="light"] .total-row > td {
    background: #f8fafc !important;
    border-top-color: #e2e8f0 !important;
    border-bottom-color: #e2e8f0 !important;
}
[data-theme="light"] .grand-total-row > td {
    background: rgba(13,148,136,0.08) !important;
    color: var(--primary-dark) !important;
}
[data-theme="light"] .section-header > td {
    background: rgba(13,148,136,0.05) !important;
    color: var(--primary-dark) !important;
    border-bottom-color: rgba(13,148,136,0.15) !important;
}

/* Autocomplete — Light */
[data-theme="light"] .autocomplete-dropdown {
    background: #fff;
    border-color: #e2e8f0;
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}
[data-theme="light"] .autocomplete-item:hover { background: #f0fdf4; }
[data-theme="light"] .autocomplete-item .ac-number { color: var(--primary-dark); }
[data-theme="light"] .autocomplete-item .ac-label { color: #475569; }

/* Trésorerie widget — Light */
[data-theme="light"] .tresorerie-item { border-bottom-color: #f1f5f9; }

/* Text utilities — Light */
[data-theme="light"] .text-debit { color: var(--primary-dark); }
[data-theme="light"] .text-credit { color: #2563eb; }

/* Scrollbar — Light */
[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); }
[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.2); }

/* Tabs — Light */
[data-theme="light"] .nav-tabs { border-bottom-color: #e2e8f0; }
[data-theme="light"] .nav-tabs .nav-link.active { color: var(--primary); }

/* Theme toggle button — Light */
[data-theme="light"] .theme-toggle {
    border-color: #d1d5db;
    background: #f3f4f6;
    color: #475569;
}
[data-theme="light"] .theme-toggle:hover {
    background: #e5e7eb;
    color: #f59e0b;
}

/* Login page — Light */
[data-theme="light"] .login-page {
    background: linear-gradient(135deg, #e2e8f0 0%, #f1f5f9 40%, #d1fae5 100%);
}
[data-theme="light"] .login-page .login-card {
    background: rgba(255,255,255,0.75) !important;
    border-color: rgba(0,0,0,0.08) !important;
    box-shadow: 0 16px 48px rgba(0,0,0,0.1) !important;
}
[data-theme="light"] .login-logo h1 { color: #0f172a; }
[data-theme="light"] .login-logo p { color: #64748b; }
[data-theme="light"] .login-field label { color: #475569; }
[data-theme="light"] .login-field .form-control {
    background: #fff !important;
    border-color: #d1d5db !important;
    color: #0f172a !important;
}
[data-theme="light"] .login-field .form-control:focus {
    background: #fff !important;
    border-color: var(--primary) !important;
}
[data-theme="light"] .login-field .form-control::placeholder { color: #9ca3af; }
[data-theme="light"] .login-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

/* Smooth transition for theme switching */
body, .sidebar, .app-header, .main-content,
.glass, .glass-premium, .card-glass-header, .card-glass-footer,
.form-control, .form-select, .table, .modal-content,
.stat-card, .theme-toggle, .nav-item, .btn-secondary,
.btn-outline-light, .alert, .badge, .tresorerie-item {
    transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

/* =====================================================
   PWA — Install Banner
   ===================================================== */
#pwa-install-banner {
    position: fixed;
    bottom: -200px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    width: calc(100% - 32px);
    max-width: 520px;
    transition: bottom 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

#pwa-install-banner.show {
    bottom: 20px;
    pointer-events: all;
}

.pwa-install-content {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255,255,255,0.05) inset;
}

.pwa-install-icon {
    flex-shrink: 0;
}

.pwa-install-text {
    flex: 1;
    min-width: 0;
}

.pwa-install-text strong {
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
    color: #e8edf5;
    margin-bottom: 2px;
}

.pwa-install-text span {
    display: block;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.3;
}

.pwa-install-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.pwa-install-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.pwa-install-btn:hover {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.pwa-install-dismiss {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.pwa-install-dismiss:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

/* =====================================================
   PWA — Connection Status Indicator
   ===================================================== */
#pwa-connection-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: slideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

#pwa-connection-indicator.offline {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

#pwa-connection-indicator.online {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: #86efac;
}

.connection-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

#pwa-connection-indicator.offline .connection-dot {
    background: #ef4444;
    animation: blink-dot 1.5s ease-in-out infinite;
}

#pwa-connection-indicator.online .connection-dot {
    background: #22c55e;
}

@keyframes blink-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* =====================================================
   PWA — Update Banner
   ===================================================== */
#pwa-update-banner {
    position: fixed;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10001;
    width: calc(100% - 32px);
    max-width: 480px;
    transition: top 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

#pwa-update-banner.show {
    top: 20px;
}

.pwa-update-content {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(59, 130, 246, 0.15);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #93c5fd;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.pwa-update-content span {
    flex: 1;
}

.pwa-update-btn {
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.pwa-update-btn:hover {
    background: #2563eb;
}

.pwa-update-dismiss {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.pwa-update-dismiss:hover {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
}

/* =====================================================
   PWA — Toast Notifications
   ===================================================== */
.pwa-toast {
    position: fixed;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10002;
    padding: 10px 24px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: top 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.pwa-toast.show {
    top: 20px;
}

.pwa-toast-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: #86efac;
}

.pwa-toast-warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #fcd34d;
}

.pwa-toast-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

.pwa-toast-info {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #93c5fd;
}

/* =====================================================
   PWA — Light Theme Overrides
   ===================================================== */
[data-theme="light"] .pwa-install-content {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .pwa-install-text strong { color: #0f172a; }
[data-theme="light"] .pwa-install-text span { color: #64748b; }

[data-theme="light"] .pwa-install-dismiss {
    background: rgba(0, 0, 0, 0.05);
    color: rgba(0, 0, 0, 0.4);
}
[data-theme="light"] .pwa-install-dismiss:hover {
    background: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.7);
}

[data-theme="light"] #pwa-connection-indicator {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}
[data-theme="light"] #pwa-connection-indicator.offline {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
}
[data-theme="light"] #pwa-connection-indicator.online {
    background: rgba(34, 197, 94, 0.1);
    color: #15803d;
}

[data-theme="light"] .pwa-update-content {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.2);
    color: #1d4ed8;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .pwa-toast-success {
    background: rgba(34, 197, 94, 0.1);
    color: #15803d;
}
[data-theme="light"] .pwa-toast-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
}
[data-theme="light"] .pwa-toast-error {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
}
[data-theme="light"] .pwa-toast-info {
    background: rgba(59, 130, 246, 0.1);
    color: #1d4ed8;
}

/* =====================================================
   PWA — Responsive
   ===================================================== */
@media (max-width: 480px) {
    #pwa-install-banner {
        width: calc(100% - 16px);
    }
    
    .pwa-install-content {
        padding: 12px 14px;
        gap: 10px;
    }
    
    .pwa-install-text span {
        display: none;
    }
    
    #pwa-connection-indicator {
        bottom: 12px;
        right: 12px;
        font-size: 0.75rem;
        padding: 6px 12px;
    }
}

