:root {
    --primary: #37474f;
    --primary-dim: rgba(55, 71, 79, 0.15);
    --bg: #0a0a0f;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.07);
    --bg-sidebar: #0d0d14;
    --text: #c5c5d0;
    --text-dim: #6b6b80;
    --text-bright: #f0f0f5;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --radius: 10px;
    --radius-sm: 6px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --sidebar-width: 240px;
    --green: #10b981;
    --orange: #f59e0b;
    --red: #ef4444;
    --blue: #3b82f6;
}

/* === LIGHT THEME === */
[data-theme="light"] {
    --bg: #f5f5f7;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f0f2;
    --bg-sidebar: #ffffff;
    --text: #374151;
    --text-dim: #6b7280;
    --text-bright: #111827;
    --border: rgba(0, 0, 0, 0.1);
    --border-hover: rgba(0, 0, 0, 0.2);
    --primary-dim: rgba(59, 130, 246, 0.1);
}
[data-theme="light"] select.form-control option {
    background: #ffffff;
    color: #111827;
}
[data-theme="light"] select.form-control option:checked {
    background: var(--primary);
    color: #fff;
}
[data-theme="light"] .form-control {
    background: rgba(0, 0, 0, 0.03);
}
[data-theme="light"] .data-table tbody td {
    border-bottom-color: rgba(0, 0, 0, 0.05);
}
[data-theme="light"] .invoice-items-table thead th {
    background: rgba(0, 0, 0, 0.02);
}
[data-theme="light"] .invoice-notes,
[data-theme="light"] .invoice-bank {
    background: rgba(0, 0, 0, 0.02);
}
[data-theme="light"] .product-quick-btn {
    background: rgba(0, 0, 0, 0.02);
}
[data-theme="light"] .badge--draft { background: rgba(107, 114, 128, 0.12); color: #4b5563; }
[data-theme="light"] .badge--sent { background: rgba(59, 130, 246, 0.12); color: #2563eb; }
[data-theme="light"] .badge--paid { background: rgba(16, 185, 129, 0.12); color: #059669; }
[data-theme="light"] .badge--overdue { background: rgba(239, 68, 68, 0.12); color: #dc2626; }
[data-theme="light"] .badge--cancelled { background: rgba(107, 114, 128, 0.1); color: #4b5563; }
[data-theme="light"] .alert-success { background: rgba(16, 185, 129, 0.1); color: #059669; border-color: rgba(16, 185, 129, 0.25); }
[data-theme="light"] .alert-error,
[data-theme="light"] .alert-danger { background: rgba(239, 68, 68, 0.1); color: #dc2626; border-color: rgba(239, 68, 68, 0.25); }
[data-theme="light"] .alert-warning { background: rgba(245, 158, 11, 0.1); color: #d97706; border-color: rgba(245, 158, 11, 0.25); }
[data-theme="light"] .alert-info { background: rgba(59, 130, 246, 0.1); color: #2563eb; border-color: rgba(59, 130, 246, 0.25); }
[data-theme="light"] .stat-card-icon--green { background: rgba(16, 185, 129, 0.1); }
[data-theme="light"] .stat-card-icon--orange { background: rgba(245, 158, 11, 0.1); }
[data-theme="light"] .stat-card-icon--red { background: rgba(239, 68, 68, 0.1); }
[data-theme="light"] .stat-card-icon--blue { background: rgba(59, 130, 246, 0.1); }
[data-theme="light"] .btn-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.25);
}
[data-theme="light"] .card--danger {
    border-color: rgba(239, 68, 68, 0.25);
}
[data-theme="light"] .card--danger .card-header {
    border-bottom-color: rgba(239, 68, 68, 0.15);
}
/* Theme toggle button */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 8px;
    color: var(--text-dim);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--font);
    width: 100%;
    transition: color 0.2s, background 0.2s;
}
.theme-toggle:hover {
    color: var(--text);
    background: var(--bg-card);
}
.mobile-theme-toggle {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    transition: color 0.2s;
}
.mobile-theme-toggle:hover { color: var(--text); }

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* === SIDEBAR === */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease;
}
.sidebar-header {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.sidebar-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--primary-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
    overflow: hidden;
}
.sidebar-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sidebar-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-bright);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-nav {
    flex: 1;
    padding: 0.75rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 8px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s, background 0.2s;
}
.sidebar-link:hover {
    color: var(--text);
    background: var(--bg-card);
}
.sidebar-link.active {
    color: var(--text-bright);
    background: var(--primary-dim);
}
.sidebar-link.active svg {
    color: var(--primary);
}
.sidebar-footer {
    padding: 0.75rem 0.5rem;
    border-top: 1px solid var(--border);
}

/* === MOBILE HEADER === */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--border);
    align-items: center;
    padding: 0 1rem;
    gap: 0.75rem;
    z-index: 101;
}
.mobile-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}
.mobile-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-bright);
}

/* === MAIN CONTENT === */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 2rem;
    min-height: 100vh;
}
.main-content--full {
    margin-left: 0;
    padding: 0;
}

/* === PAGE HEADER === */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.page-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.page-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-bright);
}

/* === CARDS === */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    overflow: hidden;
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}
.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-bright);
}
.card-body {
    padding: 1.25rem;
}
.card--danger {
    border-color: rgba(239, 68, 68, 0.3);
}
.card--danger .card-header {
    border-bottom-color: rgba(239, 68, 68, 0.2);
}
.card--danger .card-title {
    color: var(--red);
}

/* === STAT CARDS === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.stat-card-icon--green { background: rgba(16, 185, 129, 0.15); color: var(--green); }
.stat-card-icon--orange { background: rgba(245, 158, 11, 0.15); color: var(--orange); }
.stat-card-icon--red { background: rgba(239, 68, 68, 0.15); color: var(--red); }
.stat-card-icon--blue { background: rgba(59, 130, 246, 0.15); color: var(--blue); }
.stat-card-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    margin-bottom: 0.25rem;
}
.stat-card-value {
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-bright);
}

/* === CHART === */
.chart-card { margin-bottom: 1.5rem; }
.chart-container {
    padding: 1rem 1.25rem;
    height: 280px;
}

/* === DATA TABLE === */
.table-wrapper { overflow-x: auto; }
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table thead th {
    padding: 0.75rem 1rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim);
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.data-table tbody td {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.clickable-row { cursor: pointer; transition: background 0.15s; }
.clickable-row:hover { background: var(--bg-card-hover); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-bright { color: var(--text-bright); }
.text-dim { color: var(--text-dim); }
.text-danger { color: var(--red) !important; }
.font-mono { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 0.85em; }

/* === BADGES === */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.625rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}
.badge--lg {
    font-size: 0.75rem;
    padding: 0.3rem 0.875rem;
}
.badge--draft { background: rgba(107, 114, 128, 0.2); color: #9ca3af; }
.badge--sent { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.badge--paid { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.badge--overdue { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.badge--cancelled { background: rgba(107, 114, 128, 0.15); color: #6b7280; }

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    white-space: nowrap;
    font-family: var(--font);
}
.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}
.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-outline:hover {
    border-color: var(--border-hover);
    background: var(--bg-card);
}
.btn-ghost {
    background: transparent;
    color: var(--text-dim);
    padding: 0.4rem 0.625rem;
}
.btn-ghost:hover {
    color: var(--text);
    background: var(--bg-card);
}
.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--red);
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
}
.btn-block {
    width: 100%;
    justify-content: center;
}
.btn-icon {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    font-weight: 700;
    transition: color 0.2s;
}
.btn-icon:hover { color: var(--red); }
.btn-remove-item { font-size: 1.5rem; }

/* === FORMS === */
.form-group {
    margin-bottom: 1rem;
}
.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-dim);
    margin-bottom: 0.375rem;
}
.form-control {
    width: 100%;
    padding: 0.55rem 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-bright);
    font-size: 0.875rem;
    font-family: var(--font);
    transition: border-color 0.2s;
    outline: none;
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-dim);
}
.form-control::placeholder { color: var(--text-dim); }
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%236b6b80' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
}
select.form-control option {
    background: #1a1a24;
    color: var(--text-bright);
}
select.form-control option:checked {
    background: var(--primary);
    color: #fff;
}
textarea.form-control { resize: vertical; min-height: 60px; }
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.form-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}
.form-help-link {
    display: inline-block;
    margin-top: 0.375rem;
    font-size: 0.8rem;
    color: var(--primary);
    text-decoration: none;
}
.form-help-link:hover { text-decoration: underline; }
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding-top: 1.5rem;
}
.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}
.color-picker-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.color-input {
    width: 44px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: none;
    cursor: pointer;
    padding: 2px;
}

/* === FILTER === */
.filter-card { margin-bottom: 1rem; }
.filter-card .card-body { padding: 0; }
.filter-form { padding: 1rem 1.25rem; }
.filter-row {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.filter-row .form-group {
    margin-bottom: 0;
    min-width: 120px;
}
.filter-actions {
    display: flex;
    gap: 0.375rem;
    align-items: center;
    padding-bottom: 0;
}

/* === INVOICE DETAIL === */
.invoice-card { padding: 2rem; }
.invoice-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}
.invoice-from h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 0.25rem;
}
.invoice-from p, .invoice-to p {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.5;
}
.invoice-logo {
    max-height: 50px;
    margin-bottom: 0.5rem;
}
.invoice-meta { text-align: right; }
.invoice-number-lg {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}
.invoice-meta-row {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 0.25rem;
}
.invoice-meta-row strong { color: var(--text-bright); }
.invoice-to {
    margin-bottom: 2rem;
}
.invoice-to h3 {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
    font-weight: 600;
}
.invoice-items-table thead th { background: rgba(255, 255, 255, 0.02); }

.invoice-totals, .invoice-form-totals {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 1.25rem;
}
.invoice-totals-row {
    display: flex;
    justify-content: space-between;
    width: 260px;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-dim);
}
.invoice-totals-row span:last-child {
    font-weight: 500;
    color: var(--text);
}
.invoice-totals-total {
    border-top: 2px solid var(--border);
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    font-size: 1.1rem;
}
.invoice-totals-total span {
    font-weight: 700 !important;
    color: var(--text-bright) !important;
}

.invoice-notes, .invoice-bank {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.invoice-notes h3, .invoice-bank h3 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 0.5rem;
}
.invoice-notes p, .invoice-bank p {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.6;
}

/* === COPY LINK === */
.copy-link-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.copy-link-row .form-control {
    flex: 1;
    font-size: 0.8rem;
}

/* === DANGER ZONE === */
.danger-actions {
    display: flex;
    gap: 0.75rem;
}

/* === CLIENTS GRID === */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}
.client-card { margin-bottom: 0; }
.client-card-header {
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
}
.client-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary-dim);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    flex-shrink: 0;
    text-transform: uppercase;
}
.client-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-bright);
}
.client-vat {
    font-size: 0.75rem;
    color: var(--text-dim);
    font-family: 'SF Mono', 'Fira Code', monospace;
}
.client-card-body {
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.client-detail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-dim);
}
.client-detail svg { color: var(--text-dim); flex-shrink: 0; opacity: 0.6; }
.client-card-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
}
.client-actions {
    display: flex;
    gap: 0.25rem;
}

/* === PRODUCT QUICK LIST === */
.product-quick-list {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}
.product-quick-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 0.875rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    cursor: pointer;
    transition: all 0.15s;
    font-family: var(--font);
    font-size: 0.85rem;
}
.product-quick-btn:hover {
    border-color: var(--primary);
    background: var(--primary-dim);
}
.product-quick-name { font-weight: 500; }
.product-quick-price { color: var(--text-dim); font-size: 0.8rem; }

/* === EMPTY STATE === */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}
.empty-state svg { margin-bottom: 1rem; }
.empty-state p {
    color: var(--text-dim);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* === LOGIN === */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--bg);
}
.login-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
}
.login-header {
    text-align: center;
    margin-bottom: 2rem;
}
.login-header svg, .login-logo {
    margin-bottom: 1rem;
}
.login-logo {
    max-height: 60px;
    display: block;
    margin: 0 auto 1rem;
}
.login-header h1 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 0.375rem;
}
.login-header p {
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* === ALERTS === */
.messages-container {
    margin-bottom: 1rem;
}
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}
.alert-success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.alert-error, .alert-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.alert-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.alert-info {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}
.alert-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.7;
    line-height: 1;
}
.alert-close:hover { opacity: 1; }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .mobile-header {
        display: flex;
    }
    .main-content {
        margin-left: 0;
        padding: 1.25rem;
        padding-top: calc(56px + 1.25rem);
    }
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .page-header-actions {
        width: 100%;
        flex-wrap: wrap;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    .invoice-header-row {
        flex-direction: column;
        gap: 1.5rem;
    }
    .invoice-meta { text-align: left; }
    .invoice-card { padding: 1.25rem; }
    .clients-grid {
        grid-template-columns: 1fr;
    }
    .invoice-totals-row, .invoice-form-totals .invoice-totals-row {
        width: 100%;
    }
    .invoice-totals, .invoice-form-totals {
        align-items: stretch;
    }
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
    .page-header-left {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .data-table { font-size: 0.8rem; }
    .data-table thead th { font-size: 0.65rem; padding: 0.5rem 0.625rem; }
    .data-table tbody td { padding: 0.5rem 0.625rem; }
}

/* === FOOTER === */
.app-footer {
    background: var(--bg-sidebar);
    border-top: 1px solid var(--border);
    padding: 16px 24px;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-dim);
    margin-top: 40px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content p {
    margin: 0;
}

/* === PRINT === */
@media print {
    .sidebar, .mobile-header, .messages-container, .page-header, .filter-card, .app-footer { display: none !important; }
    .main-content { margin-left: 0; padding: 0; }
    body { background: #fff !important; color: #111 !important; }
    .card { border: 1px solid #ddd; box-shadow: none; background: #fff !important; }
    .badge { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .theme-toggle, .mobile-theme-toggle { display: none !important; }
}
