/* ═══════════════════════════════════════════════════════════
   ACCOUNTINGADS — Premium Dark Fintech UI
   ═══════════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
    --bg-base:        #070b14;
    --bg-surface:     #0d1525;
    --bg-elevated:    #121e35;
    --bg-hover:       #162240;

    --border:         rgba(255, 255, 255, 0.07);
    --border-active:  rgba(0, 212, 255, 0.4);

    --cyan:           #00d4ff;
    --cyan-dim:       rgba(0, 212, 255, 0.12);
    --cyan-glow:      0 0 20px rgba(0, 212, 255, 0.25);

    --gold:           #f0b429;
    --gold-dim:       rgba(240, 180, 41, 0.12);

    --green:          #10b981;
    --green-dim:      rgba(16, 185, 129, 0.12);
    --red:            #ef4444;
    --red-dim:        rgba(239, 68, 68, 0.12);
    --amber:          #f59e0b;
    --amber-dim:      rgba(245, 158, 11, 0.12);
    --purple:         #a78bfa;
    --purple-dim:     rgba(167, 139, 250, 0.12);

    --text-primary:   #e2e8f0;
    --text-secondary: #64748b;
    --text-muted:     #334155;
    --text-accent:    #00d4ff;

    --font-ui:        'Outfit', sans-serif;
    --font-mono:      'Space Mono', monospace;
    --font-brand:     'Playfair Display', serif;

    --sidebar-w:      240px;
    --radius:         10px;
    --radius-lg:      16px;
    --transition:     all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    font-family: var(--font-ui);
    background: var(--bg-base);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

/* ── Background grid texture ────────────────────────────────── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.015) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    z-index: 0;
}

/* ── App Loader ─────────────────────────────────────────────── */
.app-loader {
    position: fixed;
    inset: 0;
    background: var(--bg-base);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loader-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.loader-logo {
    font-family: var(--font-brand);
    font-size: 2.5rem;
    color: var(--cyan);
    letter-spacing: 0.1em;
    text-shadow: var(--cyan-glow);
    animation: pulse-glow 1.5s ease-in-out infinite;
}

.loader-logo-img {
    width: 120px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(0,224,196,0.4));
    animation: pulse-glow 1.5s ease-in-out infinite;
}

.loader-bar {
    width: 160px;
    height: 2px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.loader-fill {
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    animation: loader-scan 1.2s ease-in-out infinite;
}

@keyframes loader-scan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

@keyframes pulse-glow {
    0%, 100% { opacity: 1; text-shadow: var(--cyan-glow); }
    50% { opacity: 0.7; text-shadow: 0 0 40px rgba(0, 212, 255, 0.6); }
}

/* ── App Shell ──────────────────────────────────────────────── */
.app-shell {
    display: flex;
    height: 100vh;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* ── Sidebar ────────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    min-width: var(--sidebar-w);
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
    overflow-y: hidden;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: -60px;
    left: -60px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.sidebar-brand {
    padding: 24px 20px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--cyan), #0099cc);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-brand);
    font-size: 0.85rem;
    color: var(--bg-base);
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
    flex-shrink: 0;
}

/* Subscription warning (MainLayout) */
.plan-subscription-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    margin-bottom: 16px;
    border-radius: var(--radius);
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--amber, #f59e0b);
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.35);
}
.plan-subscription-banner i { flex-shrink: 0; margin-top: 2px; }

/* Tenant / firm logo next to app name (MainLayout) */
.brand-app-logo {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    object-fit: contain;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

.brand-tagline {
    font-size: 0.65rem;
    color: var(--text-secondary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Sidebar Nav */
.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,212,255,0.15) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(0,212,255,0.2);
    border-radius: 2px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(0,212,255,0.4);
}

.nav-section-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    padding: 12px 8px 6px;
    font-weight: 600;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.nav-link.sidebar-active {
    color: var(--cyan);
    background: var(--cyan-dim);
}

.nav-link.sidebar-active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--cyan);
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.6);
}

.nav-icon {
    font-size: 1rem;
    width: 18px;
    text-align: center;
}

.nav-badge {
    margin-left: auto;
    font-size: 0.65rem;
    font-family: var(--font-mono);
    background: var(--cyan-dim);
    color: var(--cyan);
    padding: 1px 6px;
    border-radius: 10px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    margin-bottom: 8px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--purple), #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.user-info { flex: 1; min-width: 0; }

.user-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.btn-logout {
    width: 100%;
    padding: 8px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-family: var(--font-ui);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-logout:hover {
    border-color: var(--red);
    color: var(--red);
    background: var(--red-dim);
}

/* ── Main Content ───────────────────────────────────────────── */
.main-content {
    flex: 1;
    overflow-y: auto;
    background: var(--bg-base);
    scrollbar-width: thin;
    scrollbar-color: var(--bg-elevated) transparent;
}

.main-content::-webkit-scrollbar { width: 6px; }
.main-content::-webkit-scrollbar-track { background: transparent; }
.main-content::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: 3px; }

.page-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 36px;
}

/* ── Page Header ────────────────────────────────────────────── */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 32px;
    animation: fade-up 0.4s ease both;
}

.dash-plan-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    margin: -20px 0 24px;
    padding: 12px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: linear-gradient(135deg, var(--bg-surface), var(--bg-elevated));
    font-size: 0.85rem;
    animation: fade-up 0.45s ease both;
}

.dash-plan-strip__main {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dash-plan-strip__main .bi {
    color: var(--cyan);
    font-size: 1.1rem;
}

.dash-plan-strip__docs {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.dash-plan-strip__docs strong {
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.page-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

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

/* ── Cards ──────────────────────────────────────────────────── */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover { border-color: rgba(255,255,255,0.1); }

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
}

.card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.01em;
}

.card-body { padding: 20px; }
.card-body-flush { padding: 0; }

/* ── Stat Cards ─────────────────────────────────────────────── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    animation: fade-up 0.4s ease both;
}

.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }

.stat-card:hover {
    border-color: rgba(255,255,255,0.12);
    transform: translateY(-2px);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 80px; height: 80px;
    border-radius: 50%;
    opacity: 0.06;
    transform: translate(20px, -20px);
}

.stat-card.cyan::after  { background: var(--cyan); }
.stat-card.gold::after  { background: var(--gold); }
.stat-card.green::after { background: var(--green); }
.stat-card.red::after   { background: var(--red); }

.stat-icon {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 14px;
}

.stat-icon.cyan   { background: var(--cyan-dim);   color: var(--cyan); }
.stat-icon.gold   { background: var(--gold-dim);   color: var(--gold); }
.stat-icon.green  { background: var(--green-dim);  color: var(--green); }
.stat-icon.red    { background: var(--red-dim);    color: var(--red); }

.stat-value {
    font-family: var(--font-mono);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ── Tables ─────────────────────────────────────────────────── */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead th {
    padding: 10px 16px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    background: var(--bg-elevated);
    white-space: nowrap;
}

.data-table thead th:first-child { border-radius: 0; }

.data-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
    animation: fade-up 0.3s ease both;
}

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

.data-table tbody tr:hover { background: var(--bg-hover); cursor: pointer; }

.data-table tbody td {
    padding: 13px 16px;
    font-size: 0.875rem;
    color: var(--text-primary);
    vertical-align: middle;
}

.data-table tfoot td {
    padding: 12px 16px;
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
    background: var(--bg-elevated);
}

.invoice-number {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--cyan);
    letter-spacing: 0.04em;
}

.amount-cell {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--gold);
    font-weight: 700;
}

.client-cell {
    font-weight: 500;
}

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.badge::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.badge-draft     { background: rgba(100,116,139,0.15); color: #94a3b8; border-color: rgba(100,116,139,0.25); }
.badge-issued    { background: var(--cyan-dim);         color: var(--cyan);  border-color: rgba(0,212,255,0.25); }
.badge-sent      { background: var(--purple-dim);       color: var(--purple);border-color: rgba(167,139,250,0.25); }
.badge-paid      { background: var(--green-dim);        color: var(--green); border-color: rgba(16,185,129,0.25); }
.badge-overdue   { background: var(--red-dim);          color: var(--red);   border-color: rgba(239,68,68,0.25); }
.badge-cancelled { background: rgba(30,41,59,0.6);      color: var(--text-muted); border-color: var(--border); }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: var(--font-ui);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-primary {
    background: linear-gradient(135deg, #0099cc, var(--cyan));
    color: var(--bg-base);
    box-shadow: 0 4px 14px rgba(0, 212, 255, 0.25);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
    color: var(--bg-base);
}

.btn-success {
    background: linear-gradient(135deg, #059669, var(--green));
    color: #fff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}
.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border);
}
.btn-ghost:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: rgba(255,255,255,0.15);
}

.btn-danger-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border);
}
.btn-danger-ghost:hover {
    background: var(--red-dim);
    color: var(--red);
    border-color: rgba(239,68,68,0.4);
}

.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-lg { padding: 13px 28px; font-size: 0.95rem; }
.btn-block { width: 100%; justify-content: center; }

/* ── Filter Tabs ────────────────────────────────────────────── */
.filter-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 6px 14px;
    border-radius: 7px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-ui);
    letter-spacing: 0.02em;
}

.filter-tab:hover { color: var(--text-primary); background: var(--bg-hover); }
.filter-tab.active { background: var(--bg-base); color: var(--cyan); border: 1px solid var(--border-active); box-shadow: 0 2px 8px rgba(0,212,255,0.12); }

/* ── Forms ──────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }

.form-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin-bottom: 7px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: var(--font-ui);
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--cyan);
    background: var(--bg-hover);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.08);
}

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

.form-control-mono {
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2364748b'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.input-group {
    display: flex;
    align-items: center;
}
.input-group .form-control { border-radius: 8px 0 0 8px; }
.input-group-text {
    padding: 10px 14px;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-left: none;
    border-radius: 0 8px 8px 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
    white-space: nowrap;
}

/* ── Auth Layout ────────────────────────────────────────────── */
.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 460px;
    position: relative;
    z-index: 1;
}

.auth-visual {
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.auth-visual::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,212,255,0.08) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.auth-visual-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.auth-logo-large {
    font-family: var(--font-brand);
    font-size: 3.5rem;
    color: var(--cyan);
    text-shadow: var(--cyan-glow);
    margin-bottom: 16px;
    display: block;
}

.auth-logo-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

.auth-logo-img {
    width: 140px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 16px rgba(0,224,196,0.35));
}

.auth-logo-name {
    font-family: var(--font-brand);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--cyan);
    letter-spacing: 0.04em;
    text-shadow: var(--cyan-glow);
}

.auth-logo-by {
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.auth-visual-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.auth-visual-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    max-width: 360px;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 36px;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.auth-feature-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--cyan-dim);
    border: 1px solid rgba(0,212,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--cyan);
    flex-shrink: 0;
}

.auth-panel {
    background: var(--bg-base);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
}

.auth-form-container {
    width: 100%;
    max-width: 380px;
}

.auth-form-header {
    margin-bottom: 32px;
}

.auth-form-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.auth-form-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.auth-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 24px 0;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.auth-link a {
    color: var(--cyan);
    text-decoration: none;
    font-weight: 600;
}
.auth-link a:hover { text-decoration: underline; }

/* Wide auth (register) */
.auth-shell-wide {
    grid-template-columns: 1fr 580px;
}

/* ── Alerts ─────────────────────────────────────────────────── */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    border: 1px solid transparent;
}

.alert-danger {
    background: var(--red-dim);
    color: #fca5a5;
    border-color: rgba(239,68,68,0.25);
}

.alert-success {
    background: var(--green-dim);
    color: #6ee7b7;
    border-color: rgba(16,185,129,0.25);
}

/* ── Invoice Form ───────────────────────────────────────────── */
.invoice-builder {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    align-items: start;
    animation: fade-up 0.4s ease both;
}

.form-section {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    overflow: hidden;
}

.form-section-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-elevated);
}

.form-section-header i {
    color: var(--cyan);
    font-size: 0.9rem;
}

.form-section-body {
    padding: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.form-row-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* Line Items */
.line-table-wrapper {
    overflow-x: auto;
}

.line-table {
    width: 100%;
    border-collapse: collapse;
}

.line-table thead th {
    padding: 8px 10px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    background: var(--bg-elevated);
    white-space: nowrap;
}

.line-table tbody tr {
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.line-table tbody td { padding: 8px 6px; vertical-align: middle; }

.line-table .form-control {
    padding: 7px 10px;
    font-size: 0.82rem;
}

.line-total {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--gold);
    font-weight: 700;
    text-align: right;
    padding: 0 10px;
}

.remove-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}
.remove-btn:hover { background: var(--red-dim); color: var(--red); border-color: rgba(239,68,68,0.4); }

/* Summary Card */
.summary-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: sticky;
    top: 24px;
}

.summary-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    background: var(--bg-elevated);
}

.summary-body { padding: 20px; }

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.summary-row-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0 0;
    margin-top: 6px;
    border-top: 1px solid var(--border);
}

.summary-total-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.summary-total-value {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gold);
}

/* ── Pagination ─────────────────────────────────────────────── */
.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg-elevated);
}

.pagination-info {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.pagination-controls { display: flex; gap: 4px; }

.page-btn {
    width: 32px;
    height: 32px;
    border-radius: 7px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-ui);
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.page-btn:hover:not(:disabled) { background: var(--bg-hover); color: var(--text-primary); }
.page-btn.current { background: var(--cyan-dim); color: var(--cyan); border-color: var(--border-active); }
.page-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ── Company Context Bar (compact, in footer) ───────────────── */
.ctx-bar {
    position: relative;
    padding: 7px 10px;
    border-radius: var(--radius);
    cursor: pointer;
    margin-bottom: 8px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    transition: border-color 0.15s;
    user-select: none;
}
.ctx-bar:hover, .ctx-bar.open { border-color: var(--border-active); }

.ctx-badge-platform {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: 4px;
}

.ctx-company {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.ctx-company-logo {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--border);
}
.ctx-company-name {
    flex: 1;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.ctx-chevron { font-size: 0.6rem; color: var(--text-muted); flex-shrink: 0; }

.ctx-dropdown {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0; right: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border-active);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 -8px 24px rgba(0,0,0,0.5);
    z-index: 200;
    animation: ctx-slide-up 0.12s ease;
}
@keyframes ctx-slide-up {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.ctx-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    cursor: pointer;
    transition: background 0.12s;
    font-size: 0.8rem;
}
.ctx-item:hover { background: var(--bg-hover); }
.ctx-item.active { background: rgba(0,212,255,0.06); }
.ctx-item-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
}
.ctx-item-dot.active { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
.ctx-item-logo {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--border);
}
.ctx-item-info { flex: 1; min-width: 0; }
.ctx-item-name { font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctx-item-eik { font-size: 0.66rem; color: var(--text-muted); }
.ctx-add {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    font-size: 0.75rem;
    color: var(--cyan);
    cursor: pointer;
    border-top: 1px solid var(--border);
    transition: background 0.12s;
}
.ctx-add:hover { background: var(--cyan-dim); }

/* ── Empty States ───────────────────────────────────────────── */
.empty-state {
    padding: 64px 24px;
    text-align: center;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.empty-state p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* ── Loading ────────────────────────────────────────────────── */
.page-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 2px solid var(--border);
    border-top-color: var(--cyan);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Animations ─────────────────────────────────────────────── */
@keyframes fade-up {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Blazor Error UI ────────────────────────────────────────── */
#blazor-error-ui {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--bg-surface);
    border: 1px solid rgba(239,68,68,0.4);
    border-radius: 10px;
    padding: 14px 18px;
    z-index: 9999;
    display: none;
    max-width: 360px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.error-content {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    color: var(--red);
}

.reload-link { color: var(--cyan); text-decoration: none; margin-left: 8px; }

/* ── Section Label (form) ───────────────────────────────────── */
.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    width: 100%;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .invoice-builder { grid-template-columns: 1fr; }
    .summary-card { position: static; }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-visual { display: none; }
    .auth-shell-wide { grid-template-columns: 1fr; }
}

/* ── SuperAdmin Nav ────────────────────────────────────────── */
.sa-nav-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, rgba(0,224,196,0.1), rgba(99,102,241,0.08));
    border: 1px solid rgba(0,224,196,0.2);
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: .07em;
}
.sa-nav-banner i { font-size: 0.9rem; }

.nav-link-sa {
    border-left: 2px solid transparent;
}
.nav-link-sa:hover {
    border-left-color: rgba(0,224,196,0.4);
}
.nav-link-sa.sidebar-active {
    border-left-color: var(--cyan);
}

/* ── Mobile Header ──────────────────────────────────────────── */
.mobile-header {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 54px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 1001;
}
.mobile-header-brand {
    font-family: var(--font-brand);
    font-size: 1rem;
    color: var(--cyan);
    letter-spacing: .06em;
}
.mobile-hamburger {
    width: 38px; height: 38px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-secondary);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
}
.mobile-hamburger:hover { color: var(--cyan); border-color: var(--cyan); }

.mobile-logout-btn {
    height: 36px;
    padding: 0 10px;
    background: rgba(248,113,113,0.1);
    border: 1px solid rgba(248,113,113,0.35);
    border-radius: 10px;
    color: #f87171;
    display: flex; align-items: center; gap: 5px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.mobile-logout-btn i { font-size: 0.95rem; }
.mobile-logout-btn:hover { background: rgba(248,113,113,0.2); border-color: #f87171; }

/* ── Sidebar Backdrop ───────────────────────────────────────── */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 999;
}

/* ── Mobile Bottom Navigation ────────────────────────────────── */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 62px;
    background: rgba(13, 21, 37, 0.97);
    border-top: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 1002;
    padding: 0 4px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    align-items: center;
    justify-content: space-around;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-bottom-nav.hide { transform: translateY(100%); }
.mob-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.64rem;
    font-weight: 500;
    border-radius: var(--radius);
    transition: color 0.15s;
    min-width: 48px;
}
.mob-nav-item i { font-size: 1.3rem; line-height: 1; }
.mob-nav-item:hover { color: var(--text-primary); }
.mob-nav-item.mob-nav-active { color: var(--cyan); }
.mob-nav-item.mob-nav-active i { filter: drop-shadow(0 0 6px rgba(0, 212, 255, 0.55)); }

/* ── Upload FAB (Floating Action Button) ────────────────────── */
.upload-fab {
    display: none;
    position: fixed;
    bottom: calc(62px + 14px);
    right: 18px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--cyan);
    color: #070b14;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    z-index: 1003;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.45);
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.upload-fab:active { transform: scale(0.92); }
.upload-fab.fab-active {
    background: rgba(239, 68, 68, 0.18);
    color: #ef4444;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.3);
    transform: rotate(45deg);
}

/* ── Upload Bottom Sheet ─────────────────────────────────────── */
.upload-sheet-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 1004;
    animation: fade-in 0.2s ease;
}
.upload-sheet {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--bg-elevated);
    border-top: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px 20px 0 0;
    padding: 12px 20px 28px;
    padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
    z-index: 1005;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.upload-sheet.open { transform: translateY(0); }
.upload-sheet-handle {
    width: 36px; height: 4px;
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
    margin: 0 auto 18px;
}
.upload-sheet-title {
    font-size: 1rem; font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
    text-align: center;
}
.upload-sheet-type-row { display: flex; gap: 8px; margin-bottom: 16px; }
.upload-sheet-type-btn {
    flex: 1; padding: 10px;
    background: var(--bg-surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 0.78rem; font-weight: 500;
    display: flex; flex-direction: column;
    align-items: center; gap: 4px;
    cursor: pointer; transition: all 0.15s;
}
.upload-sheet-type-btn i { font-size: 1.1rem; }
.upload-sheet-type-btn.active { border-color: var(--cyan); color: var(--cyan); background: var(--cyan-dim); }
.upload-sheet-type-btn.active.credit { border-color: #f97316; color: #f97316; background: rgba(249,115,22,0.08); }
.upload-sheet-options { display: flex; flex-direction: column; gap: 10px; }
.upload-sheet-option {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer; transition: all 0.15s;
}
.upload-sheet-option:active { transform: scale(0.98); }
.camera-option { border-color: rgba(0, 212, 255, 0.25); }
.camera-option:hover, .camera-option:active { border-color: var(--cyan); background: var(--cyan-dim); }
.file-option:hover, .file-option:active { border-color: rgba(255,255,255,0.15); background: var(--bg-hover); }
.upload-sheet-option-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; flex-shrink: 0;
}
.camera-option .upload-sheet-option-icon { background: var(--cyan-dim); color: var(--cyan); }
.file-option .upload-sheet-option-icon { background: rgba(255,255,255,0.05); color: var(--text-secondary); }
.upload-sheet-option-text { display: flex; flex-direction: column; gap: 2px; }
.upload-sheet-option-text span { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); }
.upload-sheet-option-text small { font-size: 0.75rem; color: var(--text-secondary); }

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ── Mobile Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
    /* Show mobile header */
    .mobile-header { display: flex; }

    /* Bottom nav, FAB, upload sheet */
    .mobile-bottom-nav { display: flex; }
    .upload-fab { display: flex; }
    .upload-sheet { display: block; }
    .upload-sheet-backdrop { display: block; }

    /* Main content shifts down for header, up for bottom nav */
    .main-content { padding-top: 54px; padding-bottom: 74px; }
    .page-wrapper { padding: 16px; }

    /* Sidebar → скрит вляво по подразбиране */
    .sidebar {
        position: fixed;
        top: 54px; left: 0; bottom: 0;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        width: 240px !important;
        min-width: 240px !important;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    /* App shell — let page scroll naturally on mobile */
    .app-shell {
        display: block;
        height: auto;
        overflow: visible;
    }

    /* Main content — natural document scroll (not container scroll) */
    .main-content {
        overflow-y: visible;
        height: auto;
        min-height: calc(100vh - 54px);
    }

    /* Tables → horizontal scroll */
    .data-table-wrap, .card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .data-table { font-size: 0.78rem; min-width: 520px; }
    .data-table th, .data-table td { padding: 10px 12px; }

    /* Page header */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .page-header .btn, .page-header button {
        width: 100%;
        justify-content: center;
    }

    /* Stats grid */
    .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat-card { padding: 14px; }

    /* Forms */
    .form-section-body [style*="grid-template-columns"] {
        display: flex !important;
        flex-direction: column !important;
    }

    /* Modals */
    .modal-box { margin: 16px; width: calc(100% - 32px) !important; max-width: none !important; }

    /* Invoice builder */
    .invoice-builder { grid-template-columns: 1fr; }
    .summary-card { position: static; }

    /* Hide less important table columns */
    .data-table .hide-mobile { display: none; }

    /* Bigger touch targets */
    .btn { min-height: 40px; }
    .nav-link { min-height: 44px; }
    .form-control { font-size: 16px; } /* prevents iOS zoom */
}

/* ── Sidebar current company strip (logo is in .sidebar-brand) ── */
.sidebar-company-strip {
    padding: 12px 20px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: rgba(0,0,0,0.12);
}
.sidebar-company-strip-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.sidebar-company-strip-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: contain;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    flex-shrink: 0;
}
.sidebar-company-strip-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--bg-elevated), var(--bg-surface));
    border: 1px solid var(--border);
    color: var(--cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 800;
    flex-shrink: 0;
}
.sidebar-company-strip-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.sidebar-company-strip-label {
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}
.sidebar-company-strip-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}

.sidebar-add-firm {
    padding: 0 16px 10px;
}
.sidebar-add-firm-btn {
    width: 100%;
    justify-content: center;
    border: 1px dashed rgba(0, 212, 255, 0.25);
    border-radius: var(--radius);
    color: var(--cyan) !important;
    font-size: 0.78rem !important;
}
.sidebar-add-firm-btn:hover {
    border-color: rgba(0, 212, 255, 0.45);
    background: rgba(0, 212, 255, 0.06);
}

/* Legacy / optional */
.sidebar-company-logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: rgba(0,0,0,0.15);
}
.company-logo-img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: contain;
    background: var(--bg-surface);
    border: 1px solid var(--border);
}
.company-logo-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--bg-elevated), var(--bg-surface));
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--cyan);
}
.company-logo-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Modals (Add Company etc) ── */
.modal-backdrop {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}
.modal-box {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideUp {
    from { transform: translateY(20px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

