:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --border: #e2e8f0;
    --text: #0f172a;
    --text-secondary: #64748b;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    --success: #10b981;
    --success-bg: #d1fae5;
    --warning: #f59e0b;
    --warning-bg: #fef3c7;
    --danger: #ef4444;
    --danger-bg: #fee2e2;
    --error: #ef4444;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg:
        0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --font: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.app {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 10;
}

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

.logo {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.brand-text h1 {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.brand-text span {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.nav {
    padding: 16px 12px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
    margin-bottom: 4px;
}

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

.nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
}

.nav-item .icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.status-indicator .dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Main */
.main {
    flex: 1;
    margin-left: 260px;
    padding: 24px 32px;
    max-width: 1200px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.header h2 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    border: none;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 12px;
}

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

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Download button for invoice files */
.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--primary);
    background: var(--primary-light);
    color: var(--primary);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
}

.download-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

/* Cards */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.card-hero {
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    color: white;
    border: none;
}

.card-hero h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.card-hero p {
    opacity: 0.9;
    font-size: 14px;
    max-width: 600px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-header h4 {
    font-size: 16px;
    font-weight: 600;
}

/* Form */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 14px;
    transition: border-color 0.15s;
    background: var(--surface);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.hint {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* Progress */
.progress-bar {
    height: 6px;
    background: var(--bg);
    border-radius: 3px;
    overflow: hidden;
    margin: 16px 0;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.job-meta {
    display: flex;
    gap: 24px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.job-meta code {
    background: var(--bg);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: "SF Mono", monospace;
    font-size: 12px;
}

.job-actions {
    margin-top: 12px;
}

.link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.link:hover {
    text-decoration: underline;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-pending {
    background: var(--bg);
    color: var(--text-secondary);
}
.badge-processing {
    background: var(--primary-light);
    color: var(--primary);
}
.badge-completed {
    background: var(--success-bg);
    color: var(--success);
}
.badge-failed {
    background: var(--danger-bg);
    color: var(--danger);
}
.badge-draft {
    background: var(--warning-bg);
    color: var(--warning);
}

/* Tables */
.table-container {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th {
    text-align: left;
    padding: 14px 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.data-table tr:hover td {
    background: var(--bg);
}

.data-table .empty td {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px;
}

.data-table code {
    font-family: "SF Mono", monospace;
    font-size: 12px;
    background: var(--bg);
    padding: 2px 8px;
    border-radius: 4px;
}

/* Toolbar */
.toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.search-box {
    flex: 1;
}

.search-box input {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 14px;
    background: var(--surface);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
}

.select {
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 14px;
    background: var(--surface);
    min-width: 140px;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius);
    width: 90%;
    max-width: 900px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.btn-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.15s;
}

.btn-close:hover {
    background: var(--bg);
}

.modal-body {
    padding: 24px;
}

/* ── Job Detail Modal ── */
.job-detail-header {
    padding: 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
}

.job-detail-header h3 {
    font-size: 16px;
    font-family: "SF Mono", monospace;
    margin: 0 0 6px 0;
}

.job-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

@media (max-width: 600px) {
    .job-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.job-summary-card {
    text-align: center;
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 16px 12px;
    border: 1px solid var(--border);
}

.job-summary-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
}

.job-summary-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.job-summary-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

/* Failed sheets */
.failed-sheets-section {
    margin-bottom: 20px;
    background: var(--danger-bg);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
}

.failed-sheets-section summary {
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 8px;
}

.failed-sheet-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.failed-sheet-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(239, 68, 68, 0.08);
    border-radius: 6px;
    font-size: 13px;
}

.failed-sheet-name {
    font-weight: 600;
}

.failed-sheet-error {
    color: var(--danger);
    font-size: 12px;
    max-width: 50%;
    text-align: right;
}

/* Invoice detail table */
.invoice-table-wrapper {
    overflow-x: auto;
    margin-bottom: 20px;
}

.invoice-detail-table {
    font-size: 13px;
}

.invoice-detail-table th {
    white-space: nowrap;
}

.invoice-detail-table code {
    font-size: 11px;
}

/* Download button */
.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--primary-light);
    color: var(--primary);
    text-decoration: none;
    font-size: 16px;
    transition: all 0.15s;
}

.download-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.08);
}

/* Audit trail */
.audit-trail {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-left: 2px solid var(--border);
    margin-left: 8px;
}

.audit-entry {
    display: flex;
    gap: 12px;
    padding: 10px 0 10px 16px;
    position: relative;
}

.audit-entry::before {
    content: "";
    position: absolute;
    left: -5px;
    top: 14px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
}

.audit-entry-failed::before {
    background: var(--danger);
}

.audit-icon {
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 2px;
}

.audit-body {
    flex: 1;
    min-width: 0;
}

.audit-action {
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
}

.audit-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.audit-error {
    font-size: 12px;
    color: var(--danger);
    margin-top: 4px;
    background: var(--danger-bg);
    padding: 4px 8px;
    border-radius: 4px;
}

/* Invoice cards in modal */
.invoice-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 12px;
}

.invoice-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.invoice-card h5 {
    font-size: 15px;
    font-weight: 700;
}

.invoice-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    font-size: 13px;
}

.invoice-grid div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.invoice-grid span:first-child {
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.invoice-grid span:last-child {
    font-weight: 600;
    color: var(--text);
}

/* Job detail header - status banner */
.job-detail-header {
    padding: 20px 24px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.job-detail-header.completed {
    background: var(--success);
}
.job-detail-header.failed {
    background: var(--danger);
}
.job-detail-header.processing {
    background: var(--primary);
}
.job-detail-header.pending {
    background: var(--text-secondary);
}

.job-detail-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.job-detail-header .badge {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    font-size: 13px;
}

/* Job summary grid */
.job-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.job-summary-grid .summary-stat {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
}

.job-summary-grid .summary-stat .stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.job-summary-grid .summary-stat .stat-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.job-summary-grid .summary-stat.stat-success .stat-value {
    color: var(--success);
}
.job-summary-grid .summary-stat.stat-failed .stat-value {
    color: var(--danger);
}

/* Audit trail */
.audit-trail {
    margin-top: 16px;
}

.audit-trail h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}

.audit-trail-entry {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    align-items: flex-start;
}

.audit-trail-entry:last-child {
    border-bottom: none;
}

.audit-trail-entry .audit-time {
    color: var(--text-secondary);
    font-size: 12px;
    min-width: 80px;
    flex-shrink: 0;
}

.audit-trail-entry .audit-action {
    font-weight: 600;
    color: var(--primary);
    min-width: 140px;
    flex-shrink: 0;
}

.audit-trail-entry .audit-details {
    color: var(--text);
    flex: 1;
}

.audit-trail-entry .audit-status {
    font-weight: 600;
    flex-shrink: 0;
}

.audit-trail-entry.success .audit-status {
    color: var(--success);
}
.audit-trail-entry.failure .audit-status {
    color: var(--danger);
}

/* Failed sheet items */
.failed-sheet-item {
    background: var(--danger-bg);
    border: 1px solid var(--danger);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 8px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.failed-sheet-item .sheet-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.failed-sheet-item .sheet-name {
    font-weight: 600;
    color: var(--danger);
}

/* Collapsible section */
.collapsible-header {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    user-select: none;
    padding: 8px 0;
    font-size: 14px;
}

.collapsible-header .arrow {
    transition: transform 0.2s;
    font-size: 12px;
}

.collapsible-header.open .arrow {
    transform: rotate(90deg);
}

.collapsible-body {
    display: none;
}

.collapsible-body.open {
    display: block;
}

/* Job result table */
.job-result-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-bottom: 24px;
}

.job-result-table th {
    text-align: left;
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.job-result-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.job-result-table tr:hover td {
    background: var(--bg);
}

/* Duration display */
.duration-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Settings */
.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.setting-row:last-child {
    border-bottom: none;
}

.setting-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.setting-label {
    font-size: 13px;
    font-weight: 600;
}

.setting-value {
    font-size: 14px;
    color: var(--text-secondary);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.info-value {
    font-size: 15px;
    font-weight: 600;
}

/* Toast */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: toastIn 0.3s ease;
    font-size: 14px;
}

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

.toast-success {
    border-left: 4px solid var(--success);
}
.toast-error {
    border-left: 4px solid var(--danger);
}
.toast-info {
    border-left: 4px solid var(--primary);
}

/* Spinner */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.hidden {
    display: none !important;
}

/* Pages */
.pages {
    position: relative;
}
.page {
    display: none;
    animation: fadeIn 0.2s ease;
}

.page.active {
    display: block;
}

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

/* Tabs */
.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0;
    background: var(--surface);
    border-radius: var(--radius) var(--radius) 0 0;
    border: 1px solid var(--border);
    border-bottom: none;
    overflow: hidden;
}

.tab {
    flex: 1;
    padding: 14px 20px;
    background: var(--bg);
    border: none;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
    border-bottom: 2px solid transparent;
}

.tab:hover {
    color: var(--text);
    background: var(--surface);
}

.tab.active {
    background: var(--surface);
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content .card {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-top: none;
}

/* Dropzone */
.dropzone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 40px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg);
}

.dropzone:hover,
.dropzone.dragover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.dropzone.has-file {
    border-color: var(--success);
    border-style: solid;
    background: var(--success-bg);
}

.dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}

.dropzone-icon {
    font-size: 36px;
    margin-bottom: 4px;
}

.dropzone-content p {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    .main {
        margin-left: 0;
        padding: 16px;
    }
    .app {
        flex-direction: column;
    }
    .info-grid {
        grid-template-columns: 1fr;
    }
    .invoice-grid {
        grid-template-columns: 1fr;
    }
    .job-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
