/* ============================================
   Blue Collar Quotes — Main Stylesheet
   ============================================ */

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

:root {
    --primary: #1a3a5c;
    --primary-light: #2c5f8a;
    --primary-dark: #0f2540;
    --accent: #e8913a;
    --accent-hover: #d17e2e;
    --bg: #f5f7fa;
    --card: #ffffff;
    --text: #1a1a1a;
    --text-secondary: #666666;
    --text-light: #999999;
    --border: #e2e8f0;
    --border-light: #f0f0f0;
    --success: #22c55e;
    --success-bg: #dcfce7;
    --warning: #f59e0b;
    --warning-bg: #fef3c7;
    --danger: #ef4444;
    --danger-bg: #fee2e2;
    --info: #3b82f6;
    --info-bg: #dbeafe;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --radius: 10px;
    --radius-sm: 6px;
    --transition: 0.2s ease;
    --sidebar-width: 250px;
}

html { font-size: 15px; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

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

/* ---------- Typography ---------- */
h1 { font-size: 1.75rem; font-weight: 700; color: var(--primary); }
h2 { font-size: 1.4rem; font-weight: 600; color: var(--primary); }
h3 { font-size: 1.1rem; font-weight: 600; }

/* ---------- Utility ---------- */
.hidden { display: none !important; }
.text-secondary { color: var(--text-secondary); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.gap-1 { gap: 0.5rem; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }

/* ============================================
   Landing Page
   ============================================ */
.landing {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    color: #fff;
}

.landing-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.landing-logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.landing-logo svg { width: 32px; height: 32px; }

.landing-nav-links { display: flex; gap: 1rem; }
.landing-nav-links a {
    color: rgba(255,255,255,0.85);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-weight: 500;
}
.landing-nav-links a:hover { color: #fff; background: rgba(255,255,255,0.1); }
.landing-nav-links .btn-accent { color: #fff; }

.hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 3rem 4rem;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
}

.hero h1 {
    font-size: 3rem;
    line-height: 1.15;
    color: #fff;
    margin-bottom: 1.25rem;
    font-weight: 800;
}

.hero h1 span { color: var(--accent); }

.hero p {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-visual {
    background: rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.12);
}

.hero-card {
    background: rgba(255,255,255,0.95);
    border-radius: var(--radius);
    padding: 1.5rem;
    color: var(--text);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-md);
}
.hero-card:last-child { margin-bottom: 0; }
.hero-card h4 { color: var(--primary); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.5rem; }
.hero-card .amount { font-size: 1.6rem; font-weight: 700; color: var(--primary); }
.hero-card .meta { font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.25rem; }

.features {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 3rem;
}

.features h2 {
    text-align: center;
    color: #fff;
    font-size: 2rem;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-card {
    background: rgba(255,255,255,0.08);
    border-radius: var(--radius);
    padding: 2rem;
    border: 1px solid rgba(255,255,255,0.1);
    transition: var(--transition);
}
.feature-card:hover { background: rgba(255,255,255,0.12); transform: translateY(-2px); }
.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--accent);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}
.feature-card h3 { color: #fff; margin-bottom: 0.5rem; }
.feature-card p { color: rgba(255,255,255,0.7); font-size: 0.95rem; }

.landing-footer {
    text-align: center;
    padding: 2rem 3rem;
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    max-width: 1200px;
    margin: 0 auto;
}

/* ============================================
   Auth Forms
   ============================================ */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    padding: 2rem;
}

.auth-card {
    background: var(--card);
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}

.auth-card .logo {
    text-align: center;
    margin-bottom: 2rem;
}
.auth-card .logo h2 { color: var(--primary); font-size: 1.5rem; }
.auth-card .logo p { color: var(--text-secondary); font-size: 0.9rem; margin-top: 0.25rem; }

.auth-card h3 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    color: var(--text);
}

.auth-card .switch-link {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); color: #fff; }

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

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--primary); background: var(--bg); }

.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }

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

.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
.btn-lg { padding: 0.85rem 2rem; font-size: 1.05rem; }
.btn-white { background: #fff; color: var(--primary); font-weight: 600; }
.btn-white:hover { background: #f0f0f0; color: var(--primary); }
.btn-outline-white { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.4); }
.btn-outline-white:hover { border-color: #fff; background: rgba(255,255,255,0.1); }

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

/* ============================================
   Form Elements
   ============================================ */
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.35rem;
}

.form-control {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text);
    background: var(--card);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(44, 95, 138, 0.12);
}

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

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
}

textarea.form-control { resize: vertical; min-height: 80px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }

.form-error { color: var(--danger); font-size: 0.8rem; margin-top: 0.25rem; }

/* ============================================
   App Layout
   ============================================ */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--primary);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar-header h2 { color: #fff; font-size: 1.1rem; font-weight: 700; }
.sidebar-header p { color: rgba(255,255,255,0.5); font-size: 0.75rem; margin-top: 0.15rem; }

.sidebar-nav { flex: 1; padding: 0.75rem 0; overflow-y: auto; }
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1.5rem;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
}
.sidebar-nav a:hover { color: #fff; background: rgba(255,255,255,0.05); }
.sidebar-nav a.active {
    color: #fff;
    background: rgba(255,255,255,0.1);
    border-left-color: var(--accent);
}
.sidebar-nav a .nav-icon { font-size: 1.1rem; width: 24px; text-align: center; }

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.sidebar-footer a { color: rgba(255,255,255,0.6); font-size: 0.85rem; display: flex; align-items: center; gap: 0.5rem; }
.sidebar-footer a:hover { color: #fff; }

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

.topbar {
    background: var(--card);
    padding: 0.85rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-left { display: flex; align-items: center; gap: 1rem; }
.topbar-left h1 { font-size: 1.25rem; }

.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--text);
    cursor: pointer;
    padding: 0.25rem;
}

.topbar-right { display: flex; align-items: center; gap: 1rem; }
.user-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.user-menu:hover { background: var(--bg); }
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

.page-content { padding: 2rem; max-width: 1400px; }

/* ============================================
   Cards
   ============================================ */
.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.card-body { padding: 1.5rem; }
.card-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border-light); }

/* ============================================
   Dashboard Stats
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.stat-icon.blue { background: var(--info-bg); color: var(--info); }
.stat-icon.green { background: var(--success-bg); color: var(--success); }
.stat-icon.orange { background: var(--warning-bg); color: var(--warning); }
.stat-icon.red { background: var(--danger-bg); color: var(--danger); }

.stat-info h3 { font-size: 1.5rem; font-weight: 700; color: var(--text); line-height: 1.2; }
.stat-info p { font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.15rem; }

/* ============================================
   Tables
   ============================================ */
.table-container { overflow-x: auto; }

.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border);
    background: var(--bg);
}
.data-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9rem;
    vertical-align: middle;
}
.data-table tbody tr { transition: var(--transition); }
.data-table tbody tr:hover { background: var(--bg); }
.data-table .row-actions { display: flex; gap: 0.35rem; }

/* ============================================
   Badges
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.7rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}
.badge-draft { background: #e5e7eb; color: #4b5563; }
.badge-sent { background: var(--info-bg); color: var(--info); }
.badge-accepted { background: var(--success-bg); color: #16a34a; }
.badge-declined { background: var(--danger-bg); color: var(--danger); }
.badge-unpaid { background: var(--danger-bg); color: var(--danger); }
.badge-partial { background: var(--warning-bg); color: #b45309; }
.badge-paid { background: var(--success-bg); color: #16a34a; }

/* ============================================
   Modal
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}
.modal-overlay.active { opacity: 1; visibility: visible; }

.modal {
    background: var(--card);
    border-radius: 12px;
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: transform 0.25s;
}
.modal-overlay.active .modal { transform: translateY(0); }

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h3 { font-size: 1.15rem; }
.modal-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 1.5rem; }
.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.modal-lg { max-width: 800px; }

/* ============================================
   Toast Notifications
   ============================================ */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--card);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1.25rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 280px;
    max-width: 400px;
    animation: slideIn 0.3s ease;
    border-left: 4px solid var(--primary);
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast-message { flex: 1; font-size: 0.9rem; }
.toast-close {
    background: none; border: none; color: var(--text-light); cursor: pointer;
    font-size: 1.1rem; padding: 0; line-height: 1;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ============================================
   Loading
   ============================================ */
.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-secondary);
    gap: 1rem;
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.4; }
.empty-state h3 { color: var(--text); margin-bottom: 0.5rem; }
.empty-state p { margin-bottom: 1.5rem; font-size: 0.9rem; }

/* ============================================
   Search & Filters Bar
   ============================================ */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.toolbar-left { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.toolbar-right { display: flex; gap: 0.75rem; align-items: center; }

.search-input {
    position: relative;
}
.search-input input {
    padding-left: 2.25rem;
    min-width: 250px;
}
.search-input .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 0.9rem;
}

.filter-pills { display: flex; gap: 0.35rem; }
.filter-pill {
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    border: 1.5px solid var(--border);
    background: var(--card);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}
.filter-pill:hover { border-color: var(--primary-light); color: var(--primary); }
.filter-pill.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ============================================
   Line Items Editor
   ============================================ */
.line-items-table { width: 100%; border-collapse: collapse; margin-bottom: 0.5rem; }
.line-items-table th {
    text-align: left; padding: 0.5rem; font-size: 0.8rem; font-weight: 600;
    color: var(--text-secondary); border-bottom: 1px solid var(--border);
}
.line-items-table td { padding: 0.35rem; }
.line-items-table input { width: 100%; }
.line-items-table .col-desc { width: 40%; }
.line-items-table .col-qty { width: 15%; }
.line-items-table .col-rate { width: 20%; }
.line-items-table .col-amt { width: 15%; text-align: right; padding: 0.5rem; font-weight: 600; color: var(--text); }
.line-items-table .col-action { width: 10%; text-align: center; }

.line-total {
    text-align: right;
    padding: 0.75rem 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    border-top: 2px solid var(--primary);
}

/* ============================================
   Payment Terms Editor
   ============================================ */
.payment-term-row { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.5rem; }
.payment-term-row input { flex: 1; }

/* ============================================
   Detail View
   ============================================ */
.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.detail-header h2 { margin-bottom: 0.25rem; }
.detail-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.detail-section { margin-bottom: 1.5rem; }
.detail-section h4 {
    font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--text-secondary); margin-bottom: 0.75rem;
    padding-bottom: 0.35rem; border-bottom: 1px solid var(--border-light);
}

.detail-field { margin-bottom: 0.5rem; }
.detail-field .label { font-size: 0.8rem; color: var(--text-secondary); }
.detail-field .value { font-weight: 500; }

/* ============================================
   Sidebar overlay (mobile)
   ============================================ */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 99;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .hero { grid-template-columns: 1fr; padding: 3rem 2rem; }
    .hero-visual { display: none; }
    .features-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.active { display: block; }

    .main-content { margin-left: 0; }
    .hamburger { display: block; }

    .page-content { padding: 1.25rem; }
    .topbar { padding: 0.75rem 1.25rem; }

    .stats-grid { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }

    .toolbar { flex-direction: column; align-items: stretch; }
    .toolbar-left, .toolbar-right { width: 100%; }
    .search-input input { min-width: 0; width: 100%; }

    .features-grid { grid-template-columns: 1fr; }
    .landing-nav { padding: 1rem 1.5rem; }
    .hero { padding: 2rem 1.5rem; }
    .hero h1 { font-size: 2rem; }
    .features { padding: 2rem 1.5rem; }

    /* Table to cards */
    .data-table thead { display: none; }
    .data-table tbody tr {
        display: block;
        padding: 1rem;
        margin-bottom: 0.75rem;
        border: 1px solid var(--border-light);
        border-radius: var(--radius-sm);
        background: var(--card);
    }
    .data-table td {
        display: flex;
        justify-content: space-between;
        padding: 0.35rem 0;
        border: none;
    }
    .data-table td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.8rem;
        color: var(--text-secondary);
        text-transform: uppercase;
    }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.7rem; }
    .hero-cta { flex-direction: column; }
    .hero-cta .btn { width: 100%; }
    .landing-nav { flex-direction: column; gap: 1rem; }
}

/* ============================================
   Misc
   ============================================ */
.clickable { cursor: pointer; }
.clickable:hover { color: var(--primary-light); }

.money { font-family: 'Inter', monospace; }

.divider { height: 1px; background: var(--border-light); margin: 1.5rem 0; }

/* Animate page transitions */
.page-enter { animation: fadeUp 0.3s ease; }
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
