:root{color:#111827;background:#f6f7f9;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-synthesis:none;text-rendering:optimizeLegibility}*{box-sizing:border-box}body{margin:0;min-width:320px;min-height:100vh;background:#f6f7f9}.login-shell{display:grid;min-height:100vh;place-items:center;padding:20px}.login-panel{display:grid;gap:14px;width:min(420px,100%);padding:28px;border:1px solid #e2e8f0;border-radius:8px;background:#fff}.login-panel h1,.login-panel p{margin:0}.login-panel h1{font-size:28px}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.55}.app-shell{display:grid;grid-template-columns:280px minmax(0,1fr);min-height:100vh}.sidebar{position:sticky;top:0;display:flex;flex-direction:column;gap:28px;height:100vh;padding:28px 20px;border-right:1px solid #e2e8f0;background:#fff}.brand{display:flex;align-items:center;gap:12px}.brand-mark{display:grid;width:42px;height:42px;place-items:center;border-radius:8px;background:#111827;color:#fff;font-weight:800}.brand h1,.brand p,.workspace h2,.workspace p,.panel h3{margin:0}.brand h1{font-size:18px}.brand p,.eyebrow,.panel p,.summary-row p,.receipt-title p,.rule-row p,.rule-row small{color:#64748b}.nav-list{display:grid;gap:6px}.nav-list a{display:flex;align-items:center;gap:10px;min-height:42px;padding:10px 12px;border-radius:8px;color:#334155;text-decoration:none}.nav-list a:hover{background:#f1f5f9;color:#0f172a}.nav-list a.active{background:#e0f2fe;color:#075985}.token-box{display:grid;gap:8px;margin-top:auto}.emergency-token{margin-top:8px;padding-top:14px;border-top:1px solid #edf2f7}.signed-in{display:grid;gap:8px}label{display:grid;gap:6px;color:#475569;font-size:13px;font-weight:700}input,select,textarea{width:100%;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#111827;outline:none}input,select{min-height:42px;padding:0 12px}textarea{resize:vertical;padding:10px 12px}input:focus,select:focus,textarea:focus{border-color:#2563eb;box-shadow:0 0 0 3px #2563eb24}.workspace{display:grid;align-content:start;gap:22px;padding:28px}.topbar,.panel-heading,.receipt-heading,.topbar-actions,.filters,.gmail-actions,.row-actions{display:flex;align-items:center}.topbar,.panel-heading,.receipt-heading{justify-content:space-between;gap:16px}.workspace h2{font-size:clamp(28px,4vw,42px);letter-spacing:0}.eyebrow{margin-bottom:4px;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.topbar-actions,.gmail-actions,.row-actions{gap:8px}.button-count{display:inline-grid;min-width:22px;min-height:22px;place-items:center;border-radius:999px;background:#ffffff3d;font-size:12px}.primary-button,.secondary-button,.icon-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;border:1px solid transparent;border-radius:8px;font-weight:800}.primary-button{padding:0 14px;background:#2563eb;color:#fff}.secondary-button{padding:0 14px;border-color:#cbd5e1;background:#fff;color:#111827}.icon-button{width:42px;background:#fff;border-color:#cbd5e1;color:#1f2937}.icon-button.small{width:34px;min-height:34px;border-radius:7px}.icon-button.danger{color:#b91c1c}.notice{border-radius:8px;padding:12px 14px;font-weight:700}.notice-error{border:1px solid #fecaca;background:#fef2f2;color:#991b1b}.notice-ok{border:1px solid #bbf7d0;background:#f0fdf4;color:#166534}.metric-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px}.metric,.panel{border:1px solid #e2e8f0;border-radius:8px;background:#fff}.metric{display:flex;align-items:center;gap:14px;min-height:100px;padding:18px}.metric-icon{display:grid;width:44px;height:44px;place-items:center;border-radius:8px}.metric-blue{background:#dbeafe;color:#1d4ed8}.metric-red{background:#fee2e2;color:#b91c1c}.metric-green{background:#dcfce7;color:#15803d}.metric-orange{background:#ffedd5;color:#c2410c}.metric-purple{background:#ede9fe;color:#6d28d9}.metric-teal{background:#ccfbf1;color:#0f766e}.metric p{margin:0 0 4px;color:#64748b;font-size:13px;font-weight:800}.metric strong{font-size:24px}.compact-metric{min-height:82px}.receipt-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.receipts-workspace{display:grid;gap:18px}.receipts-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:18px;align-items:start}.receipts-ledger{min-width:0}.receipt-side-stack{display:grid;gap:18px}.receipt-entry-panel{position:static}.dashboard-receipts{display:none}.content-grid{display:grid;grid-template-columns:minmax(0,1fr) 390px;gap:18px;align-items:start}.main-column,.side-column{display:grid;gap:18px}.panel{padding:18px}.panel-heading{margin-bottom:16px}.panel h3{font-size:18px}.summary-list,.form-stack,.rule-list,.account-list,.queue-list{display:grid;gap:10px}.ops-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.ops-grid h4{margin:0 0 8px;font-size:14px}.mini-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:38px;border-top:1px solid #edf2f7;color:#475569}.mini-row strong{color:#111827}.summary-row{display:grid;grid-template-columns:14px minmax(0,1fr) auto;gap:12px;align-items:center;min-height:58px;padding:10px 0;border-bottom:1px solid #edf2f7}.summary-row:last-child{border-bottom:0}.swatch{width:12px;height:36px;border-radius:8px}.filters{flex-wrap:wrap;gap:8px}.date-filter{grid-template-columns:auto 146px;align-items:center;min-height:42px;gap:8px;padding:0 8px 0 10px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#64748b;font-size:12px;font-weight:900;text-transform:uppercase}.date-filter input{min-height:32px;padding:0 6px;border:0;border-radius:6px;background:#f8fafc}.search-field{position:relative;display:block;min-width:220px}.search-field svg{position:absolute;top:13px;left:12px;color:#64748b}.search-field input{padding-left:36px}.receipt-table{display:grid}.clean-ledger{overflow-x:auto;border:1px solid #e2e8f0;border-radius:8px;background:#fff}.receipt-ledger-table{width:100%;min-width:1280px;border-collapse:collapse;table-layout:fixed;font-size:12px}.receipt-ledger-table th,.receipt-ledger-table td{min-width:0;height:42px;padding:7px 9px;border-right:1px solid #edf2f7;border-bottom:1px solid #edf2f7;vertical-align:middle}.receipt-ledger-table th:last-child,.receipt-ledger-table td:last-child{border-right:0}.receipt-ledger-table thead th{position:sticky;top:0;z-index:1;background:#f8fafc;color:#64748b;font-size:11px;font-weight:900;text-align:left;text-transform:uppercase}.receipt-ledger-table tbody tr{cursor:pointer}.receipt-ledger-table tbody tr:hover,.receipt-ledger-table tbody tr:focus{background:#f8fafc;outline:none}.receipt-ledger-table tr.selected{background:#eff6ff}.receipt-ledger-table th:nth-child(1){width:104px}.receipt-ledger-table th:nth-child(2){width:178px}.receipt-ledger-table th:nth-child(3){width:210px}.receipt-ledger-table th:nth-child(4){width:240px}.receipt-ledger-table th:nth-child(5){width:150px}.receipt-ledger-table th:nth-child(6){width:112px}.receipt-ledger-table th:nth-child(7){width:96px}.receipt-ledger-table th:nth-child(8){width:132px}.receipt-ledger-table th:nth-child(9){width:128px}.receipt-ledger-table th:nth-child(10){width:84px}.receipt-ledger-table th:nth-child(11){width:92px}.receipt-ledger-table th:nth-child(12){width:116px}.ledger-date-cell,.ledger-title,.gmail-cell,.compact-cell{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ledger-date-cell strong,.ledger-date-cell span,.ledger-title strong,.ledger-title p,.table-link-button span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ledger-date-cell strong,.ledger-title strong{color:#111827;font-weight:900}.ledger-date-cell span,.ledger-title p{margin:2px 0 0;color:#64748b;font-size:11px;font-weight:700}.gmail-cell{color:#334155;font-weight:800}.numeric-cell{justify-items:end;text-align:right}.compact-status{min-height:24px;padding:0 7px;font-size:11px}.compact-category{min-height:24px;max-width:100%;padding:0 7px;border-radius:7px;font-size:12px}.table-link-button{display:inline-grid;width:100%;min-height:30px;padding:3px 6px;border:1px solid #cbd5e1;border-radius:7px;background:#fff;color:#111827;font-size:12px;font-weight:900;text-align:left}.table-link-button span{color:#64748b;font-size:10px}.table-link-button:hover:not(:disabled){border-color:#64748b;background:#f8fafc}.table-link-button:disabled{color:#94a3b8;cursor:default}.ledger-actions{justify-content:flex-end}.empty-table-cell{height:70px;color:#64748b;text-align:center}.table-row{display:grid;grid-template-columns:minmax(220px,1.8fr) minmax(150px,.9fr) 110px 110px 84px;gap:12px;align-items:center;min-height:64px;padding:10px 0;border-top:1px solid #edf2f7}.clean-receipt-row{grid-template-columns:minmax(240px,1.4fr) minmax(180px,1fr) minmax(160px,.9fr) 106px 104px 130px 132px 86px 106px 132px;min-width:1320px}.table-row.selected{margin-inline:-10px;padding-inline:10px;border-radius:8px;background:#f8fafc}.table-head{min-height:38px;color:#64748b;font-size:12px;font-weight:900;text-transform:uppercase}.receipt-title{min-width:0}.receipt-title strong,.rule-row strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.receipt-title p,.rule-row p,.summary-row p,.table-note{margin:4px 0 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.table-note{color:#64748b;font-size:12px;font-weight:800}.amount-cell{display:grid;justify-items:end;gap:2px}.file-cell,.review-cell{display:grid;gap:2px}.file-cell p{margin:0;color:#64748b;font-size:12px;font-weight:800}.review-note{margin:0;color:#b45309;font-size:12px;font-weight:900}.status-pill{display:inline-flex;align-items:center;justify-content:center;width:fit-content;min-height:30px;padding:0 10px;border-radius:999px;background:#f1f5f9;color:#334155;font-size:12px;font-weight:900}.status-draft,.status-submitted{background:#eff6ff;color:#1d4ed8}.status-approved,.status-reimbursed{background:#dcfce7;color:#15803d}.status-rejected{background:#fee2e2;color:#b91c1c}.status-paid,.status-completed,.status-reimbursed{background:#dcfce7;color:#15803d}.status-planned{background:#fef3c7;color:#b45309}.status-failed{background:#fee2e2;color:#b91c1c}.status-partial{background:#fef3c7;color:#b45309}.status-refunded{background:#e0f2fe;color:#075985}.receipt-tabs{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:14px}.receipt-tabs button{display:inline-flex;align-items:center;gap:8px;min-height:34px;padding:0 10px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#334155;font-weight:900}.receipt-tabs button.active{border-color:#2563eb;background:#eff6ff;color:#1d4ed8}.receipt-tabs span{display:inline-grid;min-width:24px;min-height:22px;place-items:center;border-radius:999px;background:#e2e8f0;color:#334155;font-size:12px}.review-badge,.ok-badge{display:inline-flex;align-items:center;gap:5px;width:fit-content;min-height:28px;padding:0 8px;border-radius:999px;font-size:12px;font-weight:900}.review-badge{background:#fef3c7;color:#92400e}.ok-badge{background:#ecfdf5;color:#047857}.detail-stack{display:grid;gap:14px}.detail-title{display:grid;gap:4px;padding-bottom:12px;border-bottom:1px solid #edf2f7}.detail-title strong{overflow-wrap:anywhere}.detail-title p,.detail-muted{margin:0;color:#64748b;font-size:13px}.detail-grid{display:grid;grid-template-columns:132px minmax(0,1fr);gap:8px 12px;align-items:baseline}.detail-grid span{color:#64748b;font-size:12px;font-weight:900;text-transform:uppercase}.detail-grid strong{min-width:0;overflow-wrap:anywhere}.detail-section{display:grid;gap:8px;padding-top:12px;border-top:1px solid #edf2f7}.detail-section h4{margin:0;font-size:13px;text-transform:uppercase}.detail-section p{margin:0}.attachment-list{display:grid;gap:8px}.attachment-row{display:grid;grid-template-columns:20px minmax(0,1fr) 18px;gap:10px;align-items:center;min-height:54px;width:100%;padding:8px 10px;border:1px solid #e2e8f0;border-radius:8px;background:#fff;color:#111827;text-align:left;cursor:pointer}.attachment-row:hover{border-color:#94a3b8;background:#f8fafc}.attachment-row strong,.attachment-row p{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.attachment-row p{margin-top:3px;color:#64748b;font-size:12px;font-weight:800}.attachment-row svg{color:#475569}.review-reason{display:flex;align-items:center;gap:7px;color:#92400e;font-size:13px;font-weight:800}.detail-actions{display:grid;gap:8px}.category-pill{display:inline-flex;align-items:center;gap:7px;width:fit-content;max-width:100%;min-height:30px;padding:0 10px;border:1px solid #e2e8f0;border-radius:999px;font-size:13px;font-weight:800}.category-pill i{width:8px;height:8px;border-radius:999px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.compact{margin-top:14px;padding-top:14px;border-top:1px solid #edf2f7}.rule-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;padding:12px 0;border-top:1px solid #edf2f7}.account-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;padding:10px 0;border-top:1px solid #edf2f7}.gmail-account-grid{display:grid;gap:10px}.gmail-account-card{display:grid;gap:12px;padding:14px;border:1px solid #e2e8f0;border-radius:8px;background:#fff}.gmail-account-main{display:grid;grid-template-columns:10px minmax(0,1fr);gap:10px;align-items:center}.status-dot{width:10px;height:10px;border-radius:999px}.status-dot.connected{background:#16a34a}.status-dot.failed{background:#dc2626}.gmail-account-stats{display:flex;flex-wrap:wrap;gap:8px;align-items:center;color:#64748b;font-size:13px;font-weight:800}.gmail-account-stats strong{color:#111827}.gmail-card-actions{display:flex;gap:8px;align-items:center;justify-content:flex-end}.sync-error{margin:0;color:#b91c1c;font-size:13px;font-weight:800}.queue-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:12px;align-items:center;min-height:62px;padding:10px 0;border-top:1px solid #edf2f7}.queue-actions{display:flex;align-items:center;gap:8px}.compact-button{min-height:34px;padding:0 10px;font-size:13px}.account-row p{margin:4px 0 0;color:#64748b;font-size:13px}.rule-row small{display:inline-block;margin-top:6px;font-weight:800}.empty{margin:0;padding:18px 0;color:#64748b}@media(max-width:1120px){.app-shell{grid-template-columns:1fr}.sidebar{position:static;height:auto;padding:18px}.nav-list{grid-template-columns:repeat(3,minmax(0,1fr))}.token-box{margin-top:0}.content-grid,.receipts-layout{grid-template-columns:1fr}.receipt-side-stack{position:static}}@media(max-width:760px){.workspace{padding:18px}.topbar,.receipt-heading{align-items:stretch;flex-direction:column}.topbar-actions,.gmail-actions{width:100%}.primary-button,.secondary-button{flex:1}.metric-grid,.receipt-kpis,.nav-list,.form-grid,.ops-grid{grid-template-columns:1fr}.filters,.filters select,.date-filter,.search-field{width:100%}.date-filter{grid-template-columns:auto minmax(0,1fr)}.table-row{grid-template-columns:minmax(0,1fr);gap:8px;align-items:start}.clean-receipt-row{grid-template-columns:minmax(0,1fr);min-width:0}.amount-cell{justify-items:start}.table-head{display:none}.row-actions{justify-content:flex-start}.queue-row{grid-template-columns:minmax(0,1fr);align-items:start}}
