.section-title{display:flex;align-items:center;justify-content:space-between;margin:24px 0 14px}
.section-title h2{margin:0}
.filters label{font-size:16px;font-weight:600}
.filters select{font-size:16px}
.fuel-summary span{font-size:16px}
.fuel-summary b{font-size:20px}
.fuel-summary div:nth-child(1){background:#f0faff;border-color:#a5e1ff}.fuel-summary div:nth-child(2){background:#effff7;border-color:#8ff2c3}.fuel-summary div:nth-child(3){background:#fff3ff;border-color:#f5c5ff}.fuel-summary div:nth-child(4){background:#fff8e8;border-color:#ffe0a6}.fuel-summary div:nth-child(1) b{color:#147cbd}.fuel-summary div:nth-child(2) b{color:#009d68}.fuel-summary div:nth-child(3) b{color:#c916d8}.fuel-summary div:nth-child(4) b{color:#c87308}
.chip{font-size:14px;padding:4px 10px}
.tank{font-size:25px;line-height:1}
.edit-action,.delete-action{font-size:20px;line-height:1;padding:7px}
.edit-action{color:#246bff}
.delete-action{color:#e92323}
.condition-mixed{color:#c87308;background:#fff8e8;border:1px solid #ffe0a6}
.condition-highway{color:#16986b;background:#eafff4;border:1px solid #a8f0ce}
.location-gazprom{color:#2768dc;background:#edf4ff;border:1px solid #c8dcff}
.location-lukoil{color:#d84b4b;background:#fff0f0;border:1px solid #ffcaca}
.location-tatneft{color:#139e76;background:#ebfff7;border:1px solid #b8f2db}
.location-expert{color:#8154d5;background:#f5efff;border:1px solid #dfccff}
.location-irbis{color:#1686a3;background:#e9faff;border:1px solid #b9e9f6}
.location-default{color:#65717c;background:#f4f6f7;border:1px solid #dce1e4}
.country-russia{color:#246bff;background:#eef5ff;border:1px solid #c8ddff}
.country-default{color:#65717c;background:#f4f6f7;border:1px solid #dce1e4}
.site-footer{max-width:1980px;margin:40px auto 0;padding:22px 32px;border-top:1px solid var(--line);display:flex;justify-content:space-between;color:var(--muted);font-size:14px}
.vehicle-card{display:grid;grid-template-columns:180px 1fr auto;gap:28px;align-items:center;background:var(--paper);border:1px solid #e4e4e4;border-radius:24px;padding:24px 30px;margin-bottom:28px;box-shadow:0 2px 3px #00000010}.vehicle-photo{width:180px;height:120px;border-radius:15px;overflow:hidden;background:#eef0f1}.vehicle-photo img{width:100%;height:100%;object-fit:cover}.vehicle-placeholder{display:grid;place-items:center;height:100%;font-size:46px;color:#a8afb5}.vehicle-details h2{font-size:30px;margin:0 0 14px}.vehicle-details .eyebrow{font-size:13px;margin-bottom:8px}.vehicle-fields{display:flex;gap:30px}.vehicle-fields span{font-weight:650}.vehicle-fields small{display:block;color:var(--muted);font-size:12px;font-weight:400;margin-bottom:4px}.vehicle-details p{color:var(--muted);margin:14px 0 0}.vehicle-actions{display:flex;gap:8px;align-self:start}.danger{background:#fff0f0;color:#d32626;border:1px solid #ffcaca}.vehicle-card+.hero{margin-top:0}
#vehicle-switcher select{min-width:170px;padding:9px 12px;border-radius:10px;font-size:15px}
.vehicle-add{margin-left:5px;padding:7px 10px;background:#f1f1f1;color:#121416;font-size:18px}
.theme-toggle{margin-left:8px;padding:8px 11px;background:transparent;border:1px solid var(--line);color:var(--ink);font-size:18px}
.vehicle-fields small{font-size:15px;font-weight:650}
#vehicleEditor .field label{font-size:16px;font-weight:650}
@media(max-width:640px){#vehicle-switcher{order:3;width:100%}#vehicle-switcher select{width:100%}.site-footer{padding:18px 14px}}
@media(max-width:800px){.vehicle-card{grid-template-columns:100px 1fr;padding:18px;gap:16px}.vehicle-photo{width:100px;height:84px}.vehicle-actions{grid-column:1/-1}.vehicle-fields{gap:14px;flex-wrap:wrap}}
@media(max-width:640px){body{zoom:.9}}
.metrics{grid-template-columns:repeat(4,1fr);gap:18px}.metric{min-height:125px;padding:22px}.metric .label{font-size:16px;margin-bottom:8px}.metric strong{font-size:27px}.metric p{font-size:14px;margin:18px 34px 0 0}.metric .metric-icon{width:42px;height:42px;right:20px;top:19px;font-size:20px}
.period-filter{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.period-filter label{font-size:14px;color:var(--muted);font-weight:600}.period-filter select,.period-filter input{min-width:150px;padding:10px;border-radius:9px}.period-custom{display:none;gap:8px}.period-custom.visible{display:flex}
.period-filter-panel{display:flex;align-items:center;justify-content:space-between;margin-top:0}.period-filter-panel h1{margin:0;font-size:34px}.period-filter-panel+.vehicle-card+.hero,.vehicle-card+.period-filter-panel+.hero{display:none}
html[data-theme="dark"] .metric-icon{background:#53627a!important;color:#f4f8ff!important;box-shadow:0 0 0 1px #71839d}
@media(max-width:980px){.metrics{grid-template-columns:repeat(2,1fr)}}
.period-filter-panel{margin-bottom:28px}
.panel table th{text-align:center;white-space:normal;line-height:1.25}.panel table th:first-child{text-align:left}
.expense-total-text{color:#f0a35b}.cost-km-text{color:#8ec7ff}
.period-filter-panel~.panel table td:nth-child(6){color:#f0a35b}.period-filter-panel~.panel table td:nth-child(8){color:#8ec7ff}
#app .period-filter-panel~.panel table thead th{text-align:center!important;white-space:normal!important;vertical-align:middle;line-height:1.2}
#app .period-filter-panel~.panel table thead th:first-child{text-align:left!important}
#app .period-filter-panel~.panel table{table-layout:fixed}
#app .period-filter-panel~.panel table th,#app .period-filter-panel~.panel table td{overflow-wrap:anywhere}
#app .period-filter-panel~.panel table td:not(:first-child){text-align:right!important}
html[data-theme="dark"] .expense-total-text{color:#ffbd72}html[data-theme="dark"] .cost-km-text{color:#9ed3ff}
.period-filter{gap:16px}.period-filter label{gap:8px;display:inline-flex;align-items:center;font-size:17px}.period-filter select{min-width:190px;font-size:16px;padding:9px 12px}.period-filter label#period-year{gap:8px}.period-filter label#period-year select{min-width:190px}

html[data-theme="dark"]{--ink:#e7edf5;--muted:#aab6c7;--line:#46536a;--paper:#303d52;--bg:#1b2028;--blue:#62a0ff;--pink:#e57af4;--red:#ff7373;--teal:#38c9be}
html[data-theme="dark"] body{background:var(--bg);color:var(--ink)}
html[data-theme="dark"] .topbar{background:#202b3a;border-color:#3b485c}
html[data-theme="dark"] .brand-icon{background:#111923}
html[data-theme="dark"] nav a{color:#aeb9c8}
html[data-theme="dark"] nav a.active{color:#fff;background:#3b485c}
html[data-theme="dark"] .hero,html[data-theme="dark"] .panel,html[data-theme="dark"] .metric,html[data-theme="dark"] .vehicle-card{background:var(--paper);border-color:#46536a;box-shadow:0 2px 5px #10151d66}
html[data-theme="dark"] .metric.blue{background:#29465f;border-color:#3b79a6}html[data-theme="dark"] .metric.violet{background:#4a3958;border-color:#8e5c9e}html[data-theme="dark"] .metric.green{background:#294d4c;border-color:#4d9a90}
html[data-theme="dark"] select,html[data-theme="dark"] input,html[data-theme="dark"] textarea{background:#263246;color:var(--ink);border-color:#53627a}
html[data-theme="dark"] button:not(.primary){background:#3a475b;color:var(--ink)}html[data-theme="dark"] .primary{background:#2d83e5;color:#fff}html[data-theme="dark"] .danger{background:#583a45;color:#ffb0b0;border-color:#875161}
html[data-theme="dark"] th{color:#d5deea}html[data-theme="dark"] td,html[data-theme="dark"] th{border-color:#46536a}html[data-theme="dark"] .filter-panel{border-color:#46536a;background:#2a3649}
html[data-theme="dark"] .vehicle-placeholder{color:#8494aa}html[data-theme="dark"] .site-footer{border-color:#46536a}
html[data-theme="dark"] .chip-condition,html[data-theme="dark"] .condition-mixed{background:#5b4b2d;color:#ffd38b;border-color:#876b35}html[data-theme="dark"] .condition-highway{background:#285846;color:#99f2c8;border-color:#438d70}
html[data-theme="dark"] .location-gazprom,html[data-theme="dark"] .country-russia{background:#294d7c;color:#a8c9ff;border-color:#477bc1}html[data-theme="dark"] .location-lukoil{background:#613a44;color:#ffb5b5;border-color:#965d69}html[data-theme="dark"] .location-tatneft{background:#28584f;color:#a4f4d6;border-color:#438f7f}html[data-theme="dark"] .location-expert{background:#514071;color:#d3b6ff;border-color:#8264ad}html[data-theme="dark"] .location-irbis{background:#28566a;color:#a9eaff;border-color:#448ca5}
.condition-palette-0,.location-palette-0,.country-palette-0{color:#2768dc;background:#edf4ff;border-color:#c8dcff}.condition-palette-1,.location-palette-1,.country-palette-1{color:#d84b4b;background:#fff0f0;border-color:#ffcaca}.condition-palette-2,.location-palette-2,.country-palette-2{color:#139e76;background:#ebfff7;border-color:#b8f2db}.condition-palette-3,.location-palette-3,.country-palette-3{color:#8154d5;background:#f5efff;border-color:#dfccff}.condition-palette-4,.location-palette-4,.country-palette-4{color:#1686a3;background:#e9faff;border-color:#b9e9f6}.condition-palette-5,.location-palette-5,.country-palette-5{color:#9a6500;background:#fff8df;border-color:#f0d98e}.condition-palette-6,.location-palette-6,.country-palette-6{color:#b34f8b;background:#fff0f8;border-color:#efc6df}.condition-palette-7,.location-palette-7,.country-palette-7{color:#65717c;background:#f4f6f7;border-color:#dce1e4}html[data-theme="dark"] .condition-palette-0,html[data-theme="dark"] .location-palette-0,html[data-theme="dark"] .country-palette-0{background:#294d7c;color:#a8c9ff;border-color:#477bc1}html[data-theme="dark"] .condition-palette-1,html[data-theme="dark"] .location-palette-1,html[data-theme="dark"] .country-palette-1{background:#613a44;color:#ffb5b5;border-color:#965d69}html[data-theme="dark"] .condition-palette-2,html[data-theme="dark"] .location-palette-2,html[data-theme="dark"] .country-palette-2{background:#28584f;color:#a4f4d6;border-color:#438f7f}html[data-theme="dark"] .condition-palette-3,html[data-theme="dark"] .location-palette-3,html[data-theme="dark"] .country-palette-3{background:#514071;color:#d3b6ff;border-color:#8264ad}html[data-theme="dark"] .condition-palette-4,html[data-theme="dark"] .location-palette-4,html[data-theme="dark"] .country-palette-4{background:#28566a;color:#a9eaff;border-color:#448ca5}
html[data-theme="dark"] dialog{background:#303d52;color:var(--ink)}html[data-theme="dark"] .modal-head .close{color:var(--ink)}html[data-theme="dark"] #editor input,html[data-theme="dark"] #editor textarea,html[data-theme="dark"] #vehicleEditor input,html[data-theme="dark"] #vehicleEditor textarea{background:#263246;color:var(--ink);border-color:#53627a}html[data-theme="dark"] #editor button:not(.primary),html[data-theme="dark"] #vehicleEditor button:not(.primary){background:#3a475b;color:var(--ink)}html[data-theme="dark"] #vehicleEditor .photo-preview{background:#263246;border-color:#53627a}.photo-preview{display:none;margin-top:10px;padding:10px;border:1px solid var(--line);border-radius:10px}.photo-preview.visible{display:flex;align-items:center;gap:10px}.photo-preview img{width:120px;height:80px;object-fit:cover;border-radius:8px}.photo-preview .danger{font-size:14px;padding:8px 10px}
html[data-theme="dark"] .condition-palette-5,html[data-theme="dark"] .location-palette-5,html[data-theme="dark"] .country-palette-5{background:#5b4b2d;color:#ffd38b;border-color:#876b35}html[data-theme="dark"] .condition-palette-6,html[data-theme="dark"] .location-palette-6,html[data-theme="dark"] .country-palette-6{background:#613d59;color:#f3b9df;border-color:#945d88}html[data-theme="dark"] .condition-palette-7,html[data-theme="dark"] .location-palette-7,html[data-theme="dark"] .country-palette-7{background:#3a475b;color:#c9d3df;border-color:#596a82}
#editor input[type="number"]::-webkit-inner-spin-button,#editor input[type="number"]::-webkit-outer-spin-button{appearance:none;margin:0}#editor input[type="number"]{-moz-appearance:textfield}
html[data-theme="dark"] .fuel-summary div:nth-child(1){background:#29445d;border-color:#39769a}html[data-theme="dark"] .fuel-summary div:nth-child(2){background:#254b48;border-color:#3a8f78}html[data-theme="dark"] .fuel-summary div:nth-child(3){background:#4c3854;border-color:#805d8d}html[data-theme="dark"] .fuel-summary div:nth-child(4){background:#51452f;border-color:#8c753d}html[data-theme="dark"] .fuel-summary div:nth-child(1) b{color:#8dd8ff}html[data-theme="dark"] .fuel-summary div:nth-child(2) b{color:#91edc6}html[data-theme="dark"] .fuel-summary div:nth-child(3) b{color:#efb1ff}html[data-theme="dark"] .fuel-summary div:nth-child(4) b{color:#ffd38b}
#editor .modal-head{border-bottom:1px solid var(--line);padding-bottom:16px}#editor .form-actions{border-top:1px solid var(--line);padding-top:18px}#editor #formFields{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 12px}#editor #formFields .field label{font-size:15px;font-weight:600}#editor #formFields .field:has(input[name="fuel_date"]){grid-column:1/-1}#editor #formFields .field:has(input[name="previous_odometer"]),#editor #formFields .field:has(input[name="odometer"]),#editor #formFields .field:has(input[name="distance"]){grid-column:span 1}#editor #formFields .field:has(input[name="quantity"]),#editor #formFields .field:has(input[name="price"]),#editor #formFields .field:has(input[name="total"]){padding:10px;border-radius:10px;background:#f0faff;border:1px solid #a5e1ff}#editor #formFields .field:has(input[name="full_nofull"]){grid-column:1/-1;flex-direction:row;align-items:center;gap:10px}#editor #formFields .field:has(input[name="full_nofull"]) label{order:2;margin:0}#editor #formFields .field:has(input[name="full_nofull"]) input{width:22px;height:22px}#editor #formFields .field:has(select[name="conditions"]),#editor #formFields .field:has(select[name="location"]),#editor #formFields .field:has(select[name="country"]){grid-column:span 1}html[data-theme="dark"] #editor #formFields .field:has(input[name="quantity"]),html[data-theme="dark"] #editor #formFields .field:has(input[name="price"]),html[data-theme="dark"] #editor #formFields .field:has(input[name="total"]){background:#29445d;border-color:#39769a}#editor #formFields input[type="text"],#editor #formFields input[type="number"]{font-variant-numeric:tabular-nums}
@media(max-width:640px){#editor #formFields{grid-template-columns:1fr}#editor #formFields .field:has(input[name="previous_odometer"]),#editor #formFields .field:has(input[name="odometer"]),#editor #formFields .field:has(input[name="distance"]),#editor #formFields .field:has(input[name="quantity"]),#editor #formFields .field:has(input[name="price"]),#editor #formFields .field:has(input[name="total"]),#editor #formFields .field:has(select[name="conditions"]),#editor #formFields .field:has(select[name="location"]),#editor #formFields .field:has(select[name="country"]){grid-column:auto}}
@media(max-width:640px){#editor #formFields .field:has(input[name="full_nofull"]),#editor #formFields .field:has(input[name="consumption"]),#editor #formFields .field:has(select[name="conditions"]),#editor #formFields .field:has(select[name="location"]),#editor #formFields .field:has(select[name="country"]){grid-column:1;grid-row:auto}}
.fuel-add-action{justify-content:flex-end}
.fuel-summary{grid-template-columns:repeat(5,1fr)}.fuel-summary .fuel-distance{background:#fff0e8;border-color:#f3b680}.fuel-summary .fuel-distance b{color:#bc5e14}.fuel-summary .fuel-average{background:#eef3f8;border-color:#bdcad8}.fuel-summary .fuel-average b{color:#546d86}.fuel-add-action{display:flex;justify-content:flex-end;margin:18px 0}.fuel-clean-chart{margin:18px 0;padding:22px}.fuel-clean-wrap{height:520px;position:relative}html[data-theme="dark"] .fuel-summary .fuel-distance{background:#563d2b;border-color:#936645}html[data-theme="dark"] .fuel-summary .fuel-distance b{color:#ffc08d}html[data-theme="dark"] .fuel-summary .fuel-average{background:#39485b;border-color:#647b95}html[data-theme="dark"] .fuel-summary .fuel-average b{color:#b7d0e9}
#editor #formFields .field:has(input[name="full_nofull"]){grid-column:span 1}#editor #formFields .field:has(input[name="consumption"]){grid-column:span 1}
#editor #formFields .field:has(input[name="consumption"]){background:#fff3f3;border:1px solid #ffc8c8;border-radius:10px;padding:10px}#editor #formFields .field:has(select[name="conditions"]),#editor #formFields .field:has(select[name="location"]),#editor #formFields .field:has(select[name="country"]){background:#effff7;border:1px solid #a9edca;border-radius:10px;padding:10px}html[data-theme="dark"] #editor #formFields .field:has(input[name="consumption"]){background:#513b43;border-color:#895b68}html[data-theme="dark"] #editor #formFields .field:has(select[name="conditions"]),html[data-theme="dark"] #editor #formFields .field:has(select[name="location"]),html[data-theme="dark"] #editor #formFields .field:has(select[name="country"]){background:#294b46;border-color:#4b8d79}#editor #formFields input[type="text"]{min-width:0;width:100%;white-space:nowrap;transition:none;font-variant-numeric:tabular-nums}#editor #formFields .field{min-width:0}
#editor #formFields .field:has(input[name="full_nofull"]){grid-column:1;grid-row:4}#editor #formFields .field:has(input[name="consumption"]){grid-column:2;grid-row:4}#editor #formFields .field:has(select[name="conditions"]){grid-column:1;grid-row:5}#editor #formFields .field:has(select[name="location"]){grid-column:2;grid-row:5}#editor #formFields .field:has(select[name="country"]){grid-column:3;grid-row:5}#editor #formFields select{min-width:0;width:100%}
#editor #formFields{row-gap:30px;column-gap:24px;padding-top:6px}.country-label{color:var(--ink);font-size:14px;font-weight:600;white-space:nowrap}.country-flag{display:inline-block;width:30px;height:20px;line-height:20px;font-size:20px;text-align:center;vertical-align:-5px}
.vehicle-card-v2{grid-template-columns:minmax(0,1fr) auto;gap:16px 28px}.vehicle-card-v2 .vehicle-card-heading{grid-column:1}.vehicle-card-v2 .vehicle-card-heading .eyebrow{font-size:13px;margin-bottom:7px}.vehicle-card-v2 .vehicle-card-heading h2{margin:0;font-size:30px}.vehicle-card-v2 .vehicle-card-content{grid-column:1;display:flex;align-items:center;gap:24px}.vehicle-card-v2 .vehicle-actions{grid-column:2;grid-row:1/3;align-self:center}.vehicle-card-v2 .vehicle-details{min-width:0}
@media(max-width:640px){body{zoom:1!important}.topbar{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;padding:13px 14px;gap:12px}.brand{grid-column:1;grid-row:1;min-width:0}.brand-icon{width:42px;height:42px}.brand b{white-space:nowrap}nav{grid-column:1/-1;grid-row:2;width:100%;display:flex;justify-content:flex-start;gap:8px;overflow-x:auto;scrollbar-width:none}nav::-webkit-scrollbar{display:none}nav a{flex:0 0 auto;padding:9px 13px;font-size:15px}#theme-toggle{margin-left:auto;flex:0 0 auto}#vehicle-switcher{grid-column:1/-1;grid-row:3;order:initial;width:100%;display:flex;align-items:center;gap:8px}#vehicle-switcher select{flex:1;min-width:0;width:auto;height:44px}#vehicle-switcher .vehicle-add{flex:0 0 44px;width:44px;height:44px;margin:0;padding:0}.vehicle-card-v2{display:grid;grid-template-columns:1fr;gap:16px;padding:20px;margin-bottom:20px}.vehicle-card-v2 .vehicle-card-heading{justify-self:start}.vehicle-card-v2 .vehicle-card-heading .eyebrow{font-size:13px;margin-bottom:6px}.vehicle-card-v2 .vehicle-card-heading h2{font-size:29px;line-height:1.1;margin:0}.vehicle-card-v2 .vehicle-card-content{display:grid;grid-template-columns:110px minmax(0,1fr);gap:16px;align-items:start}.vehicle-card-v2 .vehicle-photo{width:110px;height:86px}.vehicle-card-v2 .vehicle-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px 16px}.vehicle-card-v2 .vehicle-fields span:last-child{grid-column:1/-1;min-width:0;overflow-wrap:anywhere}.vehicle-card-v2 .vehicle-fields small{font-size:13px}.vehicle-card-v2 .vehicle-actions{justify-self:end;grid-column:auto;margin-top:0}.period-filter-panel{display:block;padding:22px;margin-bottom:20px}.period-filter-panel h1{font-size:34px;line-height:1.08}.period-filter-panel .period-filter{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:22px}.period-filter-panel .period-filter label{display:flex;flex-direction:column;align-items:stretch;gap:7px;font-size:15px}.period-filter-panel .period-filter select{min-width:0;width:100%;font-size:15px}.metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.metric{min-height:178px;padding:18px}.metric .label{min-height:36px;padding-right:42px;font-size:14px;line-height:1.25}.metric strong{font-size:24px;letter-spacing:-1px}.metric p{margin:16px 0 0;font-size:13px;line-height:1.28}.metric .metric-icon{right:14px;top:14px;width:34px;height:34px;font-size:16px}.filter-panel{padding:16px;margin:16px 0}.filters{grid-template-columns:1fr 1fr;gap:12px}.filters label{font-size:14px}.filters select{font-size:14px}.panel{padding:20px}.panel h2{font-size:24px}.subtitle{font-size:16px}.chart-wrap{height:340px}.period-filter-panel~.panel .table-wrap{overflow-x:auto;margin:0 -4px;padding-bottom:6px}.period-filter-panel~.panel table{width:max-content!important;min-width:1040px!important;table-layout:auto!important}.period-filter-panel~.panel table th,.period-filter-panel~.panel table td{white-space:nowrap!important;overflow:visible!important;overflow-wrap:normal!important}.period-filter-panel~.panel table th{font-size:15px;padding:13px 11px}.period-filter-panel~.panel table td{font-size:15px;padding:13px 11px}.table-note{font-size:14px}.fuel-clean-wrap{height:380px}}
@media(max-width:640px){.period-filter-panel .eyebrow{font-size:14px;line-height:1.2;margin:0}.vehicle-card-v2 .vehicle-actions{justify-self:stretch;justify-content:flex-end;margin-top:4px}.fuel-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0}.fuel-summary div{min-height:118px;padding:16px}.fuel-summary span{font-size:14px;line-height:1.25}.fuel-summary b{font-size:22px}.fuel-summary .fuel-average{grid-column:span 2;min-height:auto}.page-head+.panel .table-wrap{overflow-x:auto;margin:0 -4px;padding-bottom:6px}.page-head+.panel .table-wrap table{min-width:1120px;width:max-content;font-size:13px}.page-head+.panel .table-wrap th,.page-head+.panel .table-wrap td{font-size:13px;padding:11px 9px;white-space:nowrap}.page-head+.panel .chip{font-size:12px;padding:3px 7px}.page-head+.panel .tank{font-size:20px}}

/* Home uses the same large surface as the fuel page. */
.home-overview{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(340px,.85fr);gap:22px;align-items:stretch;margin:0 0 24px}.home-overview .vehicle-card,.home-overview .period-filter-panel{margin:0}.home-overview .period-filter-panel{display:flex;flex-direction:column;justify-content:center;min-height:100%;padding:24px}.period-filter-panel .eyebrow{font-size:14px!important;line-height:1.2!important;margin:0!important;font-weight:700;letter-spacing:.06em}.home-dashboard-shell{background:var(--paper);border:1px solid var(--line);border-radius:22px;padding:24px;box-shadow:0 2px 3px #00000010;margin:0 0 28px}.home-dashboard-shell>.metrics{margin:0 0 22px}.home-dashboard-shell>.panel{margin:22px 0 0}.home-dashboard-shell>.panel:last-child{margin-bottom:0}.home-dashboard-shell .hero{display:none!important}

@media(max-width:640px){.home-overview{grid-template-columns:1fr;gap:16px;margin-bottom:18px}.home-overview .vehicle-card{margin:0}.home-overview .period-filter-panel{padding:20px;min-height:0}.home-overview .period-filter-panel .period-filter{margin-top:16px}.vehicle-card-v2 .vehicle-actions{grid-column:1/-1!important;grid-row:auto!important;justify-self:stretch!important;width:100%;display:flex;justify-content:flex-end;margin-top:4px!important}.home-dashboard-shell{border-radius:20px;padding:14px;margin-bottom:20px}.home-dashboard-shell>.metrics{margin-bottom:16px}.home-dashboard-shell>.panel{margin-top:16px}.fuel-summary div{min-height:0!important;padding:14px!important}.fuel-summary .fuel-average{min-height:0!important}.fuel-summary span{line-height:1.2}.fuel-summary b{line-height:1.15}.table-wrap table th:first-child,.table-wrap table td:first-child{position:sticky;left:0;z-index:2;background:var(--paper);box-shadow:8px 0 12px -12px rgba(0,0,0,.9)}.table-wrap table th:first-child{z-index:3}.table-wrap table tfoot td:first-child{z-index:2}}

/* The home period control deliberately uses the same field grid as fuel filters. */
.home-overview .period-filter-panel{display:block;padding:20px 22px}.home-overview .period-filter-panel .filter-title{margin-bottom:15px}.home-overview .period-filter-panel .period-filter{display:grid;grid-template-columns:1fr 1fr;gap:12px}.home-overview .period-filter-panel .period-filter label{display:flex;flex-direction:column;gap:5px;color:var(--muted);font-size:13px}.home-overview .period-filter-panel .period-filter select{min-width:0;width:100%;padding:10px;border-radius:9px;font-size:15px}

@media(max-width:640px){.home-overview .period-filter-panel{padding:16px}.home-overview .period-filter-panel .period-filter{gap:12px}.home-dashboard-shell .table-wrap,#app>.panel .table-wrap{overflow-x:auto;margin:0 -4px;padding-bottom:6px}.home-dashboard-shell .table-wrap table,#app>.panel .table-wrap table{width:max-content!important;min-width:1040px!important;table-layout:auto!important;font-size:13px!important}.home-dashboard-shell .table-wrap th,.home-dashboard-shell .table-wrap td,#app>.panel .table-wrap th,#app>.panel .table-wrap td{font-size:13px!important;padding:11px 9px!important;white-space:nowrap!important;overflow:visible!important;overflow-wrap:normal!important}.table-wrap table th:first-child,.table-wrap table td:first-child{position:sticky;left:0;z-index:2;background:var(--paper);box-shadow:none;border-right:1px solid var(--line)}.table-wrap table th:first-child{z-index:3}.table-wrap table tfoot td:first-child{z-index:2}}

/* The period selector sits below the vehicle card, with fuel-filter typography. */
.home-dashboard-shell>.vehicle-card{margin:0 0 22px}.home-dashboard-shell>.period-filter-panel{display:block;margin:0 0 22px;padding:20px}.home-dashboard-shell>.period-filter-panel .filter-title{margin-bottom:15px}.home-dashboard-shell>.period-filter-panel .period-filter{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.home-dashboard-shell>.period-filter-panel .period-filter label{display:flex;flex-direction:column;gap:5px;color:var(--muted);font-size:13px}.home-dashboard-shell>.period-filter-panel .period-filter select{min-width:0;width:100%;padding:10px;border-radius:9px;font-size:15px}

@media(max-width:640px){.home-dashboard-shell>.vehicle-card{margin-bottom:16px}.home-dashboard-shell>.period-filter-panel{padding:16px;margin-bottom:16px}.home-dashboard-shell>.period-filter-panel .period-filter{gap:12px}.pagination{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;margin-top:16px;font-size:13px;line-height:1.25}.pagination>span:first-child{max-width:132px}.pagination>span:last-child{display:flex;align-items:center;justify-content:flex-end;gap:6px;white-space:nowrap}.pagination button{padding:7px 9px;font-size:13px}.pagination button:disabled{display:none}}

/* Compact, left-aligned period controls — matching the fuel-filter field hierarchy. */
.home-dashboard-shell>.period-filter-panel .period-filter{grid-template-columns:repeat(2,210px);justify-content:start;gap:12px}.home-dashboard-shell>.period-filter-panel .period-filter label{display:flex;align-items:stretch;justify-content:start;gap:5px;font-size:16px!important;font-weight:600!important;text-align:left;color:var(--muted)}.home-dashboard-shell>.period-filter-panel .period-filter select,.home-dashboard-shell>.period-filter-panel .period-filter label#period-year select{min-width:0!important;width:100%;font-size:16px}
@media(max-width:640px){.home-dashboard-shell>.period-filter-panel .period-filter{grid-template-columns:repeat(2,minmax(0,1fr));justify-content:start;width:100%;gap:12px}.home-dashboard-shell>.period-filter-panel .period-filter label{font-size:14px!important;font-weight:600!important;text-align:left}.home-dashboard-shell>.period-filter-panel .period-filter select,.home-dashboard-shell>.period-filter-panel .period-filter label#period-year select{font-size:14px;min-width:0!important;width:100%;max-width:100%}}

/* Expenses ledger. */
.expenses-panel{margin-top:0!important}.expenses-filter .filters{grid-template-columns:repeat(3,minmax(0,1fr))}.expenses-filter .expense-search{grid-column:1/-1}.expenses-filter .expense-search input{width:100%;padding:10px;border-radius:9px;font-size:15px}.expense-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:15px;margin:20px 0}.expense-summary>div{padding:17px;border:1px solid var(--line);border-radius:13px;background:#fff7ec;border-color:#f2cd9e}.expense-summary span{display:block;color:var(--muted);font-size:16px;margin-bottom:6px}.expense-summary b{font-size:20px;color:#b76816}.expense-summary .expense-count{background:#f0faff;border-color:#a5e1ff}.expense-summary .expense-count b{color:#147cbd}.expense-add-action{display:flex;justify-content:flex-end;margin:18px 0}.expense-name{color:#00a441;font-weight:600}.expense-contractor{color:var(--muted)}.expense-amount{font-weight:700}.note-action,.link-action{display:inline-grid;place-items:center;width:34px;height:34px;padding:0!important;border-radius:9px;background:transparent;color:var(--muted);text-decoration:none}.note-action.is-active{background:#eef3ff;color:#5368d8}.link-action.is-active{background:#e9fbf3;color:#149469}.expense-category-0{color:#2768dc;background:#edf4ff;border-color:#c8dcff}.expense-category-1{color:#d84b4b;background:#fff0f0;border-color:#ffcaca}.expense-category-2{color:#139e76;background:#ebfff7;border-color:#b8f2db}.expense-category-3{color:#8154d5;background:#f5efff;border-color:#dfccff}.expense-category-4{color:#1686a3;background:#e9faff;border-color:#b9e9f6}.expense-category-5{color:#9a6500;background:#fff8df;border-color:#f0d98e}.expense-category-6{color:#b34f8b;background:#fff0f8;border-color:#efc6df}.expense-category-7{color:#65717c;background:#f4f6f7;border-color:#dce1e4}#expenseNoteEditor{width:min(720px,calc(100% - 26px));background:var(--paper);color:var(--ink)}#expenseNoteEditor form{padding:25px}#expenseNoteEditor .modal-head{border-bottom:1px solid var(--line);padding-bottom:16px}#expenseNoteEditor .form-actions{border-top:1px solid var(--line);padding-top:18px}#expenseNoteEditor textarea{min-height:250px;resize:vertical;line-height:1.45}
html[data-theme="dark"] .expense-summary>div{background:#4a4030;border-color:#806843}html[data-theme="dark"] .expense-summary b{color:#ffd38b}html[data-theme="dark"] .expense-summary .expense-count{background:#29445d;border-color:#39769a}html[data-theme="dark"] .expense-summary .expense-count b{color:#8dd8ff}html[data-theme="dark"] .note-action.is-active{background:#39456f;color:#b9c6ff}html[data-theme="dark"] .link-action.is-active{background:#28584f;color:#a4f4d6}html[data-theme="dark"] .expense-category-0{background:#294d7c;color:#a8c9ff;border-color:#477bc1}html[data-theme="dark"] .expense-category-1{background:#613a44;color:#ffb5b5;border-color:#965d69}html[data-theme="dark"] .expense-category-2{background:#28584f;color:#a4f4d6;border-color:#438f7f}html[data-theme="dark"] .expense-category-3{background:#514071;color:#d3b6ff;border-color:#8264ad}html[data-theme="dark"] .expense-category-4{background:#28566a;color:#a9eaff;border-color:#448ca5}html[data-theme="dark"] .expense-category-5{background:#5b4b2d;color:#ffd38b;border-color:#876b35}html[data-theme="dark"] .expense-category-6{background:#613d59;color:#f3b9df;border-color:#945d88}html[data-theme="dark"] .expense-category-7{background:#3a475b;color:#c9d3df;border-color:#596a82}
@media(max-width:640px){.expenses-panel{padding:20px}.expenses-filter .filters{grid-template-columns:1fr 1fr}.expenses-filter .expense-search{grid-column:1/-1}.expenses-filter .expense-search input{font-size:14px}.expense-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.expense-summary>div{padding:14px;min-height:0}.expense-summary span{font-size:14px;line-height:1.2}.expense-summary b{font-size:20px}.expenses-panel .table-wrap{overflow-x:auto;margin:0 -4px;padding-bottom:6px}.expenses-panel .table-wrap table{min-width:1010px;width:max-content;font-size:13px}.expenses-panel .table-wrap th,.expenses-panel .table-wrap td{font-size:13px;padding:11px 9px;white-space:nowrap}.expenses-panel .table-wrap th:first-child,.expenses-panel .table-wrap td:first-child{position:sticky;left:0;z-index:2;background:var(--paper);box-shadow:none;border-right:1px solid var(--line)}.expenses-panel .table-wrap th:first-child{z-index:3}.note-action,.link-action{width:30px;height:30px}.expense-add-action{margin:16px 0}}

.expenses-filter .filter-title{display:flex;align-items:center;justify-content:space-between}.filter-clear{padding:5px 8px;background:transparent!important;color:var(--muted)!important;font-size:13px}.expense-period-total{background:#fff0f0!important;border-color:#ffcaca!important}.expense-period-total b{color:#d84b4b!important}.expenses-panel table th:nth-child(3),.expenses-panel table td:nth-child(3){text-align:center!important}.expenses-panel table th:nth-child(4),.expenses-panel table td:nth-child(4),.expenses-panel table th:nth-child(5),.expenses-panel table td:nth-child(5){text-align:left!important}.expense-name{font-weight:400!important}.note-action{opacity:.35;border:1px solid transparent}.note-action.is-active{opacity:1!important;background:#f5eaff!important;color:#8e339f!important;border-color:#d8a5e4!important;font-size:17px}.link-action{opacity:.35}.link-action.is-active{opacity:1!important}.expense-amount{font-variant-numeric:tabular-nums}
html[data-theme="dark"] .expense-summary .expense-count{background:#2d4050;border-color:#466779}html[data-theme="dark"] .expense-summary .expense-count b{color:#9bd8ef}html[data-theme="dark"] .expense-period-total{background:#493b43!important;border-color:#765566!important}html[data-theme="dark"] .expense-period-total b{color:#edb4c1!important}html[data-theme="dark"] .note-action.is-active{background:#563f61!important;color:#f3b9ff!important;border-color:#976fa5!important}
@media(max-width:640px){.filter-clear{font-size:12px}.expenses-panel table th:nth-child(3),.expenses-panel table td:nth-child(3){text-align:center!important}}
.expense-search-control{position:relative;display:block}.expense-search-control input{padding-right:42px!important}.expense-search-control button{position:absolute;right:7px;top:50%;transform:translateY(-50%);padding:2px 7px;background:transparent!important;color:var(--muted)!important;font-size:20px;line-height:1}
.empty-page{min-height:280px;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center}.empty-page .subtitle{margin:8px 0 0}
.expense-chart{margin:22px 0;padding:22px;border:1px solid var(--line);border-radius:18px;background:var(--paper)}.expense-chart h2{margin:0}.expense-chart .subtitle{margin:5px 0 14px}.expense-chart-wrap{position:relative;height:665px}html[data-theme="dark"] .expense-chart{background:#2a3649;border-color:#46536a}
@media(max-width:640px){.expense-chart{padding:16px;margin:16px 0}.expense-chart-wrap{height:545px}.expense-chart h2{font-size:21px}.expense-chart .subtitle{font-size:14px}}

/* Expense editor: grouped fields match the expense-entry workflow. */
#editor #formFields.expense-form{grid-template-columns:repeat(6,minmax(0,1fr));gap:22px 18px;padding-top:6px}#editor #formFields.expense-form .field label{font-size:15px;font-weight:600}#editor #formFields.expense-form .field:has(input[name="expense_date"]),#editor #formFields.expense-form .field:has(input[name="odometer"]){grid-column:span 3}#editor #formFields.expense-form .field:has(input[name="expense_name"]),#editor #formFields.expense-form .field:has(input[name="link"]),#editor #formFields.expense-form .field:has(textarea[name="note"]){grid-column:1/-1}#editor #formFields.expense-form .field:has(input[name="expense_name"]){padding:10px;border:1px solid #a5e1ff;border-radius:10px;background:#f0faff}#editor #formFields.expense-form .field:has(select[name="expense_type"]),#editor #formFields.expense-form .field:has(input[name="amount"]),#editor #formFields.expense-form .field:has(input[name="contractor"]){grid-column:span 2;padding:10px;border:1px solid #a9edca;border-radius:10px;background:#effff7}#editor #formFields.expense-form textarea[name="note"]{min-height:210px;resize:vertical}html[data-theme="dark"] #editor #formFields.expense-form .field:has(input[name="expense_name"]){background:#29445d;border-color:#39769a}html[data-theme="dark"] #editor #formFields.expense-form .field:has(select[name="expense_type"]),html[data-theme="dark"] #editor #formFields.expense-form .field:has(input[name="amount"]),html[data-theme="dark"] #editor #formFields.expense-form .field:has(input[name="contractor"]){background:#294b46;border-color:#4b8d79}
@media(max-width:640px){#editor #formFields.expense-form{grid-template-columns:1fr;gap:18px}#editor #formFields.expense-form .field:has(input[name="expense_date"]),#editor #formFields.expense-form .field:has(input[name="odometer"]),#editor #formFields.expense-form .field:has(select[name="expense_type"]),#editor #formFields.expense-form .field:has(input[name="amount"]),#editor #formFields.expense-form .field:has(input[name="contractor"]){grid-column:1}}
# Fuel editor: the desktop grid has explicit row placements.  On a phone those
# placements must be fully reset, otherwise fields overlap each other.
@media (max-width: 640px) {
  #editor {
    width: calc(100% - 24px);
    max-width: none;
  }

  #editor form {
    padding: 20px 18px;
  }

  #editor #formFields {
    grid-template-columns: minmax(0, 1fr) !important;
    row-gap: 18px !important;
    column-gap: 0 !important;
    padding-top: 4px;
  }

  #editor #formFields .field,
  #editor #formFields .field:has(input[name="fuel_date"]),
  #editor #formFields .field:has(input[name="previous_odometer"]),
  #editor #formFields .field:has(input[name="odometer"]),
  #editor #formFields .field:has(input[name="distance"]),
  #editor #formFields .field:has(input[name="quantity"]),
  #editor #formFields .field:has(input[name="price"]),
  #editor #formFields .field:has(input[name="total"]),
  #editor #formFields .field:has(input[name="full_nofull"]),
  #editor #formFields .field:has(input[name="consumption"]),
  #editor #formFields .field:has(select[name="conditions"]),
  #editor #formFields .field:has(select[name="location"]),
  #editor #formFields .field:has(select[name="country"]) {
    grid-column: 1 !important;
    grid-row: auto !important;
    min-width: 0;
    width: 100%;
  }

  #editor #formFields .field input,
  #editor #formFields .field select,
  #editor #formFields .field textarea {
    min-width: 0;
    max-width: 100%;
  }

  #editor #formFields .field:has(input[name="full_nofull"]) {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }

  #editor #formFields .field:has(input[name="full_nofull"]) label {
    order: 2;
    margin: 0;
  }

  #editor #formFields .field:has(input[name="full_nofull"]) input {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
  }

  #editor .form-actions {
    gap: 8px;
  }

  #editor .form-actions button {
    min-width: 0;
    padding: 11px 13px;
  }
}

/* A modal is a compact surface even on a tablet.  Reset every explicit desktop
   grid placement here, including the expense form's old `span 3` date rule. */
@media (max-width: 980px) {
  dialog#editor {
    width: min(640px, calc(100% - 24px));
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
  }

  #editor #formFields,
  #editor #formFields.expense-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-columns: minmax(0, 1fr) !important;
    column-gap: 0 !important;
  }

  #editor #formFields .field,
  #editor #formFields.expense-form .field {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  #editor #formFields .field > input,
  #editor #formFields .field > select,
  #editor #formFields .field > textarea {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Date controls used to preserve a three-column span from desktop mode. */
  #editor #formFields .field:has(input[type="date"]),
  #editor #formFields.expense-form .field:has(input[name="expense_date"]),
  #editor #formFields .field:has(input[name="fuel_date"]) {
    grid-column: 1 !important;
    max-width: 100% !important;
    overflow: hidden;
  }

  #editor #formFields .field:has(input[type="date"]) > input,
  #editor #formFields .field:has(input[name="expense_date"]) > input,
  #editor #formFields .field:has(input[name="fuel_date"]) > input {
    inline-size: 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  #editor #formFields,
  #editor form {
    max-width: 100%;
    overflow-x: hidden;
  }
}

/* Tire history and resource statistics. */
.tires-panel{margin-top:0!important}.tires-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.tires-head h2,.tire-resource h2,.tire-history h2{margin:0}.tires-head .subtitle{margin:5px 0 0}.tires-filter .filters{grid-template-columns:minmax(210px,280px)}.tire-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;margin:20px 0}.tire-summary>div{padding:17px;border:1px solid var(--line);border-radius:13px}.tire-summary span,.tire-summary small{display:block;color:var(--muted)}.tire-summary span{font-size:16px;margin-bottom:6px}.tire-summary b{display:block;font-size:22px;line-height:1.2}.tire-summary small{font-size:14px;line-height:1.3;margin-top:6px}.tire-count{background:#f0faff;border-color:#a5e1ff!important}.tire-count b{color:#147cbd}.tire-summer{background:#fff7e7;border-color:#f2d08a!important}.tire-summer b{color:#b97913}.tire-winter{background:#edf4ff;border-color:#b6d3ff!important}.tire-winter b{color:#3177d4}.tire-resource,.tire-history{margin-top:22px;padding:22px;border:1px solid var(--line);border-radius:18px;background:var(--paper)}.tire-resource .subtitle{margin:5px 0 14px}.tire-history h2{margin-bottom:14px}.tire-season{display:inline-flex;padding:4px 9px;border-radius:999px;font-size:13px;font-weight:700}.tire-season.summer{color:#a96c00;background:#fff2cf}.tire-season.winter{color:#2765bb;background:#e8f1ff}.tire-distance{color:#8853cc;font-weight:700}.tire-set-name{color:#15935f!important}.tire-resource th:nth-child(1),.tire-resource th:nth-child(2),.tire-resource th:nth-child(3),.tire-resource th:nth-child(5),.tire-resource td:nth-child(1),.tire-resource td:nth-child(2),.tire-resource td:nth-child(3),.tire-resource td:nth-child(5),.tire-history th:nth-child(2),.tire-history th:nth-child(3),.tire-history th:nth-child(4),.tire-history th:nth-child(7),.tire-history td:nth-child(2),.tire-history td:nth-child(3),.tire-history td:nth-child(4),.tire-history td:nth-child(7){text-align:left!important}#tireEditor{width:min(760px,calc(100% - 26px));background:var(--paper);color:var(--ink);border-color:var(--line)}#tireEditor form{padding:25px}#tireEditor .modal-head{border-bottom:1px solid var(--line);padding-bottom:16px}#tireEditor .form-actions{border-top:1px solid var(--line);padding-top:18px}#tireEditor .tire-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:22px 0}#tireEditor .tire-form-grid .field{min-width:0}#tireEditor .tire-form-grid .wide{grid-column:1/-1}#tireEditor textarea{min-height:130px;resize:vertical}html[data-theme="dark"] .tire-count{background:#29445d;border-color:#39769a!important}html[data-theme="dark"] .tire-count b{color:#8dd8ff}html[data-theme="dark"] .tire-summer{background:#56462b;border-color:#896d39!important}html[data-theme="dark"] .tire-summer b{color:#ffd486}html[data-theme="dark"] .tire-winter{background:#294d7c;border-color:#477bc1!important}html[data-theme="dark"] .tire-winter b{color:#a8c9ff}html[data-theme="dark"] .tire-resource,html[data-theme="dark"] .tire-history{background:#2a3649;border-color:#46536a}html[data-theme="dark"] .tire-season.summer{color:#ffd486;background:#5b4b2d}html[data-theme="dark"] .tire-season.winter{color:#a8c9ff;background:#294d7c}html[data-theme="dark"] .tire-set-name{color:#83e8b7!important}
@media(max-width:640px){.tires-panel{padding:20px}.tires-head{align-items:center}.tires-head h2{font-size:24px}.tires-head .subtitle{font-size:14px}.tires-head .primary{padding:10px 12px;white-space:nowrap}.tires-filter .filters{grid-template-columns:1fr}.tire-summary{grid-template-columns:1fr;gap:12px}.tire-summary>div{padding:14px}.tire-summary span{font-size:14px}.tire-summary b{font-size:20px}.tire-resource,.tire-history{margin-top:16px;padding:16px}.tire-resource h2,.tire-history h2{font-size:21px}.tires-panel .table-wrap{overflow-x:auto;margin:0 -4px;padding-bottom:6px}.tires-panel .table-wrap table{min-width:780px;width:max-content;font-size:13px}.tires-panel .table-wrap th,.tires-panel .table-wrap td{font-size:13px;padding:11px 9px;white-space:nowrap}.tires-panel .table-wrap th:first-child,.tires-panel .table-wrap td:first-child{position:sticky;left:0;z-index:2;background:var(--paper);border-right:1px solid var(--line)}.tires-panel .table-wrap th:first-child{z-index:3}html[data-theme="dark"] .tires-panel .table-wrap th:first-child,html[data-theme="dark"] .tires-panel .table-wrap td:first-child{background:#2a3649}#tireEditor{width:calc(100% - 24px);max-height:calc(100dvh - 24px);overflow-y:auto}#tireEditor form{padding:20px 18px}#tireEditor .tire-form-grid{grid-template-columns:1fr;gap:18px;margin:18px 0}#tireEditor .tire-form-grid .wide{grid-column:auto}}

/* Keep the tire editor typography and field rhythm identical to the existing editors. */
#tireEditor .field{gap:6px}#tireEditor .field label{font-size:15px;font-weight:600;color:var(--muted)}#tireEditor .field small{display:block;margin-top:3px;color:var(--muted);font-size:13px;line-height:1.3}#tireEditor input,#tireEditor select,#tireEditor textarea{font-size:16px;min-height:44px}#tireEditor textarea{min-height:150px}.tires-panel h2{font-size:25px}.tires-panel .subtitle{font-size:19px}.tires-panel table{font-size:17px}.tires-panel th{font-size:18px}.tires-panel td{font-size:17px}
@media(max-width:640px){#tireEditor .field label{font-size:14px}#tireEditor input,#tireEditor select,#tireEditor textarea{font-size:16px}#tireEditor textarea{min-height:130px}.tires-panel .subtitle{font-size:16px}.tires-panel table,.tires-panel th,.tires-panel td{font-size:13px!important}}

/* Clear visual separation between mileage and time columns in tire tables. */
.tire-resource th:nth-child(4),.tire-resource td:nth-child(4),.tire-history th:nth-child(6),.tire-history td:nth-child(6){padding-right:52px!important}.tire-resource th:nth-child(5),.tire-resource td:nth-child(5),.tire-history th:nth-child(7),.tire-history td:nth-child(7){padding-left:30px!important}
.tire-calculated{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:16px 18px;border:1px dashed var(--line);border-radius:12px;background:#f4f8fc}.tire-calculated span,.tire-calculated small{display:block;color:var(--muted)}.tire-calculated span{font-size:14px;margin-bottom:4px}.tire-calculated b{font-size:18px;color:#1686a3}.tire-calculated small{grid-column:1/-1;font-size:13px;line-height:1.35}html[data-theme="dark"] .tire-calculated{background:#2a4052;border-color:#496d83}html[data-theme="dark"] .tire-calculated b{color:#9bdcf5}@media(max-width:640px){.tire-calculated{grid-template-columns:1fr;padding:14px}.tire-calculated b{font-size:17px}}

/* Plans and reminders. */
.plans-panel{margin-top:22px;padding:22px}.plans-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px}.plans-head h2{margin:0;font-size:25px}.plans-head .subtitle{margin:5px 0 0;font-size:16px}.plans-highlights{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;margin:22px 0 14px}.plan-highlight{min-height:105px;padding:17px 19px;border:1px solid var(--line);border-radius:14px;background:#f5f8fc}.plan-highlight span,.plan-highlight p{display:block;color:var(--muted)}.plan-highlight span{font-size:15px}.plan-highlight strong{display:block;margin-top:5px;font-size:22px;line-height:1.2}.plan-highlight p{margin:8px 0 0;font-size:14px;line-height:1.35}.plan-highlight p b{color:var(--ink);font-size:14px}.plan-highlight.overdue{background:#fff0f1;border-color:#ef9da5}.plan-highlight.overdue strong{color:#c83c4c}.plan-highlight.next{background:#eef7ff;border-color:#92c8f0}.plan-highlight.next strong{color:#176caf}.plan-highlight.empty{opacity:.8}.plans-guide{margin-bottom:18px;padding:12px 15px;border-radius:10px;background:#f6f8fb;color:var(--muted);font-size:14px;line-height:1.4}.plans-table table{min-width:1100px}.plans-table th:not(:nth-child(7)),.plans-table td:not(:nth-child(7)){text-align:left!important}.plans-table th:nth-child(7),.plans-table td:nth-child(7){text-align:right!important}.plans-table td small,.plans-table td b{display:block}.plans-table td small{margin-top:5px;color:var(--muted);font-size:13px}.plan-status{display:inline-flex;white-space:nowrap;border-radius:999px;padding:5px 9px;font-size:12px;font-weight:700}.plan-status.overdue{background:#ffe5e8;color:#b92f40}.plan-status.upcoming{background:#e6f4ff;color:#176eae}.plan-name{color:#16875a}.plan-row-overdue{background:rgba(207,58,70,.04)}.plan-actions{white-space:nowrap}.plan-actions .small{padding:7px 9px;font-size:12px}.plan-alert-badge{display:inline-grid;place-items:center;margin-left:6px;width:17px;height:17px;border-radius:50%;background:#dc3e4e;color:#fff;font-size:12px;font-weight:800;vertical-align:top}.plan-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:22px 0}.plan-form-grid .wide{grid-column:1/-1}.plan-section{padding:16px;border:1px solid var(--line);border-radius:12px;background:#f7fafc}.plan-section>b{display:block;margin-bottom:12px}.plan-section small{display:block;margin-top:8px;color:var(--muted);font-size:13px}.plan-inline-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.plan-inline-fields label{display:block;color:var(--muted);font-size:14px;font-weight:600}.plan-inline-fields label:has(.plan-time-control),.plan-inline-fields label:has(input[name="interval_km"]){grid-column:1/-1}.plan-inline-fields label:has(input[name="interval_km"]){max-width:310px}.plan-inline-fields input{display:block;width:100%;box-sizing:border-box;margin-top:6px}.plan-active{display:flex;align-items:center;gap:10px;font-weight:600}.plan-active input{width:20px;height:20px}.empty-state{text-align:center!important;color:var(--muted)!important;padding:34px!important}
.plan-time-control{display:grid;grid-template-columns:minmax(86px,.55fr) minmax(130px,1fr);gap:10px;margin-top:6px}.plan-time-control input,.plan-time-control select{display:block;width:100%;box-sizing:border-box;margin:0!important}
html[data-theme="dark"] .plans-panel{background:#304058;border-color:#46556d}html[data-theme="dark"] .plan-highlight{background:#2b3b51;border-color:#485b76}html[data-theme="dark"] .plan-highlight.next{background:#29485e;border-color:#427b9d}html[data-theme="dark"] .plan-highlight.next strong{color:#8ed2ff}html[data-theme="dark"] .plan-highlight.overdue{background:#56343f;border-color:#975361}html[data-theme="dark"] .plan-highlight.overdue strong{color:#ffadb7}html[data-theme="dark"] .plans-guide,html[data-theme="dark"] .plan-section{background:#27364a;border-color:#44546d}html[data-theme="dark"] .plan-status.overdue{background:#713b4c;color:#ffc2ca}html[data-theme="dark"] .plan-status.upcoming{background:#284f70;color:#a9dcff}html[data-theme="dark"] .plan-name{color:#82e5b0}html[data-theme="dark"] .plan-row-overdue{background:rgba(255,115,128,.07)}html[data-theme="dark"] #planEditor{background:#304058;border-color:#46556d;color:var(--ink)}
@media(max-width:640px){.plans-panel{margin-top:16px;padding:17px}.plans-head{align-items:center}.plans-head h2{font-size:22px}.plans-head .subtitle{font-size:14px}.plans-head .primary{font-size:13px;padding:10px}.plans-highlights{grid-template-columns:1fr;gap:10px;margin:16px 0 12px}.plan-highlight{min-height:0;padding:14px}.plan-highlight strong{font-size:19px}.plans-guide{font-size:13px}.plans-table{margin:0 -4px;padding-bottom:6px;overflow-x:auto}.plans-table table{font-size:13px}.plans-table th,.plans-table td{padding:11px 9px;font-size:13px;white-space:nowrap}.plans-table th:first-child,.plans-table td:first-child{position:sticky;left:0;z-index:2;background:var(--paper);border-right:1px solid var(--line)}.plans-table th:first-child{z-index:3}html[data-theme="dark"] .plans-table th:first-child,html[data-theme="dark"] .plans-table td:first-child{background:#304058}.plan-actions .small{font-size:11px;padding:7px}.plan-alert-badge{margin-left:3px}.plan-form-grid{grid-template-columns:1fr;gap:16px;margin:18px 0}.plan-form-grid .wide{grid-column:auto}.plan-inline-fields{grid-template-columns:1fr;gap:12px}.plan-time-control{grid-template-columns:90px 1fr}#planEditor{width:calc(100% - 24px);max-height:calc(100dvh - 24px);overflow-y:auto}#planEditor form{padding:20px 18px}}

/* Keep the plans editor on the same typographic and structural rhythm as the
   fuel and expense editors. */
#planEditor{width:min(760px,calc(100% - 26px));background:var(--paper);color:var(--ink);border-color:var(--line)}#planEditor form{padding:25px}#planEditor .modal-head{padding-bottom:16px;border-bottom:1px solid var(--line)}#planEditor .modal-head h2{font-size:26px;line-height:1.2}#planEditor .form-actions{padding-top:18px;border-top:1px solid var(--line)}#planEditor .field{gap:6px}#planEditor .field label,#planEditor .plan-section>b,#planEditor .plan-inline-fields label{font-size:15px;font-weight:600;color:var(--muted)}#planEditor input,#planEditor select,#planEditor textarea{font-size:16px;min-height:44px}#planEditor textarea{min-height:130px}.plan-time-control{grid-template-columns:120px 132px;width:max-content;max-width:100%;gap:8px}.plan-time-control input,.plan-time-control select{width:100%;min-width:0}.plan-inline-fields label:has(input[name="interval_km"]){max-width:265px}.plans-table td:nth-child(7){padding-right:28px!important}.plan-actions{padding-left:28px!important}.plan-actions>*+*{margin-left:8px!important}
@media(max-width:640px){#planEditor{width:calc(100% - 24px);max-height:calc(100dvh - 24px);overflow-y:auto}#planEditor form{padding:20px 18px}#planEditor .modal-head h2{font-size:24px}#planEditor .field label,#planEditor .plan-section>b,#planEditor .plan-inline-fields label{font-size:14px}#planEditor input,#planEditor select,#planEditor textarea{font-size:16px}.plan-time-control{grid-template-columns:110px 120px}.plan-inline-fields label:has(input[name="interval_km"]){max-width:100%}.plan-actions{padding-left:18px!important}}

/* Plans table: amount stays below its heading, actions sit at the true edge. */
.plans-table th:nth-child(7),.plans-table td:nth-child(7){text-align:right!important;padding-left:28px!important;padding-right:14px!important}.plans-table th:last-child,.plans-table td:last-child{text-align:right!important}.plan-actions{padding-left:48px!important;padding-right:0!important;white-space:nowrap}.plan-actions>*+*{margin-left:10px!important}.plans-table .blue-text{font-size:inherit;font-weight:inherit;color:var(--blue)}.plan-mileage-detail{font-size:14px;font-weight:600;color:#15935f}.plan-highlight .plan-mileage-detail{display:inline;color:#15935f}
html[data-theme="dark"] .plans-table .blue-text{color:#77afff}html[data-theme="dark"] .plan-mileage-detail,html[data-theme="dark"] .plan-highlight .plan-mileage-detail{color:#83e8b7}

/* Light theme buttons use the same calm blue accent as the rest of the UI. */
html:not([data-theme="dark"]) .primary{background:#2d83e5;color:#fff}html:not([data-theme="dark"]) button:not(.primary):not(.danger):not(.row-action){background:#eef3fa;color:#33445e;border:1px solid #d8e1ee}html:not([data-theme="dark"]) .secondary{background:#eef3fa;color:#33445e;border-color:#d8e1ee}html:not([data-theme="dark"]) .row-action{background:#f1f5fa;color:#5d6d84}html:not([data-theme="dark"]) .row-action.edit-action{color:#2d83e5}html:not([data-theme="dark"]) .row-action.delete-action{color:#d34c5c}

/* My Home shell.  The sidebar only changes navigation; individual modules keep
   their established desktop and mobile layouts. */
@media(min-width:861px){body{padding-left:266px}.house-sidebar{position:fixed;z-index:50;inset:0 auto 0 0;width:266px;box-sizing:border-box;padding:24px 16px 18px;background:var(--paper);border-right:1px solid var(--line);display:flex;flex-direction:column}.house-sidebar .brand{margin:0 6px 22px}.house-sidebar .house-logo{display:grid;place-items:center;width:32px;height:32px;font-size:20px}.house-nav{display:flex;flex-direction:column;align-items:stretch;gap:3px}.house-nav a{display:block;padding:10px 12px;border-radius:9px;color:var(--muted);font-size:14px;font-weight:650;text-decoration:none}.house-nav a:hover,.house-nav a.active{background:var(--soft);color:var(--ink)}.nav-section{margin:18px 12px 5px;color:var(--muted);font-size:11px;font-weight:800;letter-spacing:.09em;text-transform:uppercase}.sidebar-vehicle{margin-top:auto;padding:14px 10px;border-top:1px solid var(--line)}.sidebar-vehicle>span{display:block;margin-bottom:4px;color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.07em}.sidebar-vehicle>b{display:block;margin-bottom:9px;font-size:14px}.sidebar-vehicle #vehicle-switcher{display:flex;gap:6px}.sidebar-vehicle select{min-width:0;flex:1;font-size:13px;padding:8px}.sidebar-vehicle .vehicle-add{padding:6px 9px}.house-sidebar .theme-toggle{align-self:flex-end;margin-top:12px}.site-footer{max-width:1980px}}
.my-home-dashboard{padding:38px 0 4px}.my-home-head{display:flex;justify-content:space-between;align-items:end;margin-bottom:25px}.my-home-head h1{margin:4px 0 5px;font-size:34px}.my-home-head p{margin:0;color:var(--muted);font-size:16px}.home-module-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.home-module{display:flex;gap:14px;min-height:128px;padding:20px;border:1px solid var(--line);border-radius:16px;background:var(--paper);color:var(--ink);text-decoration:none;transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease}.home-module:hover{transform:translateY(-2px);border-color:var(--blue);box-shadow:0 8px 22px rgba(31,75,120,.1)}.home-module .module-icon,.placeholder-icon{display:grid;place-items:center;flex:0 0 42px;width:42px;height:42px;border-radius:12px;background:#edf4ff;color:#287bd7;font-size:22px}.home-module span:last-child{display:flex;min-width:0;flex-direction:column}.home-module small{color:var(--muted);font-size:11px;font-weight:750;letter-spacing:.07em}.home-module strong{margin-top:8px;font-size:19px;line-height:1.2}.home-module em{margin-top:7px;color:var(--muted);font-size:13px;font-style:normal;line-height:1.35}.home-module.plans-module{background:#f4ecfb;border-color:#d7b6ef}.plans-module .module-icon{background:#e8d6f8;color:#884db7}.home-module.automobile-module{background:#edf7ff;border-color:#b7d9f5}.automobile-module .module-icon{background:#d8edff;color:#1879bd}.module-placeholder{display:flex;align-items:flex-start;gap:20px;margin-top:38px;padding:32px}.module-placeholder h1{margin:4px 0;font-size:30px}.module-placeholder .subtitle{margin:0}.module-placeholder .placeholder-icon{width:52px;height:52px;flex-basis:52px;font-size:27px}.module-soon{margin:22px 0 0;color:var(--muted)}.module-data-note{margin-top:22px;padding:15px 18px;border-radius:12px;background:var(--soft);font-size:14px}.module-data-note ul{margin:8px 0 0;padding-left:18px}.automobile-dashboard{padding-top:30px}
html[data-theme="dark"] .house-sidebar,.house-sidebar{background:var(--paper)}html[data-theme="dark"] .house-nav a:hover,html[data-theme="dark"] .house-nav a.active{background:#3c4d66}.house-sidebar .brand{color:var(--ink)}html[data-theme="dark"] .home-module{background:#304058;border-color:#46556d}html[data-theme="dark"] .home-module.plans-module{background:#493857;border-color:#715384}html[data-theme="dark"] .home-module.automobile-module{background:#29475b;border-color:#3d718c}html[data-theme="dark"] .home-module .module-icon{background:#243e56;color:#8ec9ff}html[data-theme="dark"] .plans-module .module-icon{background:#523d63;color:#d6b4ed}html[data-theme="dark"] .module-data-note{background:#26354a}
@media(max-width:860px){body{padding-left:0}.house-sidebar{position:relative;box-sizing:border-box;padding:14px;border-bottom:1px solid var(--line);background:var(--paper)}.house-sidebar .brand{margin:0 0 12px}.house-sidebar .house-logo{display:grid;place-items:center;width:30px;height:30px}.house-nav{display:flex;gap:6px;overflow-x:auto;padding-bottom:8px}.house-nav a{flex:0 0 auto;padding:8px 10px;border-radius:8px;color:var(--muted);font-size:13px;font-weight:650;text-decoration:none}.house-nav a.active{background:var(--soft);color:var(--ink)}.nav-section{display:none}.sidebar-vehicle{display:flex;align-items:center;gap:8px;margin-top:4px}.sidebar-vehicle>span,.sidebar-vehicle>b{display:none}.sidebar-vehicle #vehicle-switcher{display:flex;gap:6px;flex:1}.sidebar-vehicle select{min-width:0;flex:1}.sidebar-vehicle .vehicle-add{padding:6px 10px}.house-sidebar .theme-toggle{position:absolute;top:15px;right:14px}.my-home-dashboard{padding:21px 0}.my-home-head{margin-bottom:18px}.my-home-head h1{font-size:27px}.my-home-head p{font-size:14px}.home-module-grid{grid-template-columns:1fr;gap:11px}.home-module{min-height:0;padding:15px}.home-module strong{font-size:17px}.module-placeholder{margin-top:18px;padding:20px}.module-placeholder h1{font-size:26px}}

/* Expanded information architecture in the sidebar. */
@media(min-width:861px){.house-sidebar{padding:22px 15px 14px;overflow-y:auto}.house-sidebar .brand{margin-bottom:17px}.house-nav{gap:2px}.sidebar-group{display:flex;flex-direction:column;margin:0}.sidebar-group .nav-section{display:block;margin:15px 10px 6px;padding:7px 9px;border-radius:8px;background:#edf2f8;color:#47617d;font-size:13px;font-weight:800;letter-spacing:.06em}.house-nav>a,.sidebar-group>a{padding:9px 12px;font-size:16px;line-height:1.22}.vehicle-group .sidebar-vehicle{margin:0 9px 8px;padding:0 0 11px;border-top:0;border-bottom:1px solid var(--line)}.sidebar-vehicle>span{font-size:12px}.sidebar-vehicle>b{font-size:15px}.sidebar-vehicle select{font-size:14px}.sidebar-bottom{margin-top:auto;padding:14px 9px 0;border-top:1px solid var(--line)}.sidebar-settings .nav-section{display:block;margin:0 0 8px;padding:7px 9px;border-radius:8px;background:#edf2f8;color:#47617d;font-size:13px;font-weight:800;letter-spacing:.06em}.house-sidebar .theme-toggle{width:100%;margin:0;padding:9px 12px;text-align:left;font-size:15px}.sidebar-version{display:block;margin-top:12px;color:var(--muted);font-size:12px;text-align:center}html[data-theme="dark"] .sidebar-group .nav-section,html[data-theme="dark"] .sidebar-settings .nav-section{background:#394b65;color:#b9cbe1}}
.finance-panel{margin-top:34px;padding:26px}.finance-panel>div:first-child{display:inline-block}.finance-panel h1{margin:4px 0}.finance-panel .subtitle{margin:0}.finance-external{float:right;margin-top:6px;text-decoration:none}.finance-frame-wrap{clear:both;margin-top:24px;overflow:hidden;border:1px solid var(--line);border-radius:14px;background:var(--soft)}.finance-frame-wrap iframe{display:block;width:100%;height:calc(100vh - 210px);min-height:560px;border:0;background:#fff}.finance-frame-help{padding:10px 14px;color:var(--muted);font-size:13px}.finance-frame-wrap:has(iframe){background:var(--paper)}
@media(max-width:860px){.house-nav{display:block;overflow:visible;padding-bottom:0}.sidebar-group{display:block}.house-nav>a,.sidebar-group>a{display:inline-block;margin:2px 2px 2px 0;padding:8px 10px}.sidebar-group .nav-section{display:block;margin:14px 0 4px;color:var(--muted);font-size:13px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}.vehicle-group .sidebar-vehicle{display:flex;margin:4px 0 7px}.vehicle-group .sidebar-vehicle>span,.vehicle-group .sidebar-vehicle>b{display:none}.sidebar-bottom{margin-top:13px;padding-top:12px;border-top:1px solid var(--line)}.sidebar-settings .nav-section{display:block;margin-bottom:5px;color:var(--muted);font-size:13px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}.house-sidebar .theme-toggle{position:static;width:auto;margin:0;padding:8px 10px;font-size:14px}.sidebar-version{display:block;margin-top:8px;color:var(--muted);font-size:12px}.finance-panel{margin-top:18px;padding:18px}.finance-panel h1{font-size:26px}.finance-external{float:none;display:inline-block;margin-top:16px}.finance-frame-wrap iframe{height:70vh;min-height:470px}}

/* Page-level car selector, settings and a compact mobile navigation drawer. */
.vehicle-switcher-staging{display:none!important}.site-footer{display:none!important}.automobile-context{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:26px 0 18px;padding:14px 17px;border:1px solid var(--line);border-radius:13px;background:var(--paper)}.automobile-context>div:first-child{display:flex;flex-direction:column;gap:3px}.automobile-context span{font-size:12px;font-weight:750;letter-spacing:.07em;text-transform:uppercase;color:var(--muted)}.automobile-context b{font-size:17px}.automobile-context #vehiclePickerSlot #vehicle-switcher{display:flex;gap:7px}.automobile-context #vehicle-switcher select{min-width:210px;font-size:14px}.automobile-context #vehicle-switcher .vehicle-add{padding:6px 10px}html[data-theme="dark"] .automobile-context{background:#304058;border-color:#46556d}
#settingsDialog{width:min(460px,calc(100% - 28px));background:var(--paper);color:var(--ink);border:1px solid var(--line);border-radius:18px}#settingsDialog form{padding:24px}#settingsDialog .modal-head{padding-bottom:16px;border-bottom:1px solid var(--line)}.settings-body{padding:22px 0}.settings-body>label{display:block;margin-bottom:11px;color:var(--muted);font-size:15px;font-weight:700}.settings-theme-actions{display:flex;gap:10px}.settings-theme-actions button{flex:1;padding:12px;font-size:15px}.mobile-menu-toggle{display:none}.finance-fullscreen{position:fixed;z-index:25;top:0;right:0;bottom:0;left:266px;background:#fff}.finance-fullscreen iframe{display:block;width:100%;height:100%;border:0;background:#fff}.finance-mode #app{margin:0;padding:0;max-width:none}.finance-mode .house-sidebar{z-index:30}
@media(max-width:860px){.mobile-menu-toggle{display:flex;align-items:center;gap:7px;margin:0 0 10px;padding:8px 11px;font-size:14px}.house-nav,.sidebar-bottom{display:none!important}.house-sidebar.mobile-menu-open .house-nav,.house-sidebar.mobile-menu-open .sidebar-bottom{display:block!important}.house-sidebar.mobile-menu-open .house-nav{margin-top:4px}.house-sidebar.mobile-menu-open .sidebar-bottom{margin-top:13px}.sidebar-group .nav-section{padding-top:12px;border-top:1px solid var(--line)}.sidebar-group:first-of-type .nav-section{border-top:0}.automobile-context{margin:16px 0 14px;padding:12px;align-items:flex-start;flex-direction:column}.automobile-context #vehiclePickerSlot,.automobile-context #vehiclePickerSlot #vehicle-switcher{width:100%}.automobile-context #vehiclePickerSlot select{min-width:0;flex:1;width:auto}.finance-fullscreen{position:relative;top:auto;right:auto;bottom:auto;left:auto;margin:0 -14px;min-height:calc(100dvh - 98px)}.finance-fullscreen iframe{height:calc(100dvh - 98px);min-height:560px}#settingsDialog form{padding:20px}.settings-theme-actions{flex-direction:column}}

/* v0.2.010 — navigation and embedded finance refinements */
.vehicle-group .sidebar-vehicle{display:none!important}.settings-open{cursor:pointer}.settings-open:focus-visible{outline:2px solid var(--blue);outline-offset:2px}.menu-icon,.section-icon{display:inline-grid;place-items:center;flex:0 0 20px;width:20px;height:20px;font-style:normal}.house-nav a{display:flex!important;align-items:center;gap:10px}.sidebar-group .nav-section{display:flex;align-items:center;gap:7px}.sidebar-collapse{position:absolute;top:26px;right:-13px;z-index:2;display:grid;place-items:center;width:26px;height:26px;padding:0;border:1px solid var(--line);border-radius:50%;background:var(--paper);color:var(--ink);font-size:24px;line-height:1;box-shadow:0 2px 7px #0002}.finance-fullscreen{overflow:hidden}.finance-fullscreen iframe{width:83.3334%;height:83.3334%;min-width:0;min-height:0;transform:scale(1.2);transform-origin:top left}.settings-open .section-icon{font-size:15px}
@media(min-width:861px){body.sidebar-compact{padding-left:74px}.sidebar-compact .house-sidebar{width:74px;padding:22px 10px 14px;overflow:visible}.sidebar-compact .house-sidebar .brand{justify-content:center;margin:0 0 17px}.sidebar-compact .house-sidebar .brand b,.sidebar-compact .menu-label,.sidebar-compact .section-label,.sidebar-compact .sidebar-version{display:none}.sidebar-compact .house-nav a{justify-content:center;padding:10px}.sidebar-compact .sidebar-group .nav-section,.sidebar-compact .sidebar-settings .nav-section{justify-content:center;margin:15px 0 6px;padding:7px}.sidebar-compact .sidebar-bottom{padding:14px 0 0}.sidebar-compact .sidebar-settings .nav-section{margin:0}.sidebar-compact .sidebar-collapse{right:-13px}.sidebar-compact .finance-fullscreen{left:74px}.sidebar-compact .house-sidebar .brand .house-logo{width:34px;height:34px}.sidebar-compact .menu-icon{font-size:18px}}
@media(max-width:860px){.sidebar-collapse{display:none}.house-nav a{display:inline-flex!important;align-items:center;gap:6px}.house-nav .menu-icon{font-size:15px}.house-nav .menu-label{font-size:13px}.sidebar-group .nav-section{display:flex;align-items:center;gap:6px}.sidebar-settings .settings-open{display:flex;align-items:center;gap:7px}.finance-fullscreen{overflow:hidden}.finance-fullscreen iframe{width:83.3334%;height:83.3334%;min-height:0;transform:scale(1.2);transform-origin:top left}}

/* Keep the native calendar control while giving date fields the same width as every other input. */
@media(max-width:980px){#editor #formFields>.field>input[type=date],#editor #formFields.expense-form>.field>input[type=date]{box-sizing:border-box!important;inline-size:100%!important;width:100%!important;max-width:100%!important}}

/* v0.2.011 — compact navigation and responsive finance view */
.sidebar-collapse{position:fixed;top:18px;left:248px;right:auto;z-index:100;display:grid;place-items:center;width:38px;height:38px;border:1px solid color-mix(in srgb,var(--line) 80%,#fff);border-radius:50%;background:var(--soft);color:var(--ink);font-size:32px;font-weight:700;line-height:.75;box-shadow:0 4px 14px #0004}.menu-icon,.section-icon{flex-basis:24px;width:24px;height:24px;font-size:18px}.finance-fullscreen iframe{width:100%;height:100%;min-width:0;min-height:0;transform:none}.finance-fullscreen{overflow:hidden}
@media(min-width:861px){.sidebar-compact .house-sidebar{width:74px}.sidebar-compact .house-nav,.sidebar-compact .sidebar-bottom{width:100%}.sidebar-compact .house-nav a{width:100%;box-sizing:border-box;justify-content:center;padding:11px 0}.sidebar-compact .sidebar-group .nav-section,.sidebar-compact .sidebar-settings .nav-section{width:100%;box-sizing:border-box;justify-content:center;padding:8px 0}.sidebar-compact .menu-icon,.sidebar-compact .section-icon{margin:0!important;justify-self:center}.sidebar-compact .sidebar-collapse{left:56px;right:auto}.sidebar-compact .house-sidebar .brand{width:100%;box-sizing:border-box}.sidebar-compact .house-sidebar .brand .house-logo{margin:0 auto}}
@media(max-width:860px){.finance-fullscreen iframe{width:100%;height:calc(100dvh - 98px);min-height:560px;transform:none}}

/* The selector belongs in the individual automobile screens, never in navigation. */
.vehicle-group .sidebar-vehicle{display:none!important}
.house-logo img{display:block;width:100%;height:100%}

/* Home overview */
.home-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(280px, .82fr) minmax(360px, 1.28fr);
  gap: 18px;
  align-items: start;
}
.home-dashboard-column { display: grid; gap: 18px; min-width: 0; }
.home-widget {
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 2px 3px #00000010;
}
.home-widget h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-size: 21px;
  line-height: 1.2;
}
.home-widget h2 > span { font-size: 21px; }
.home-empty, .today-empty { margin: 16px 0 0; color: var(--muted); line-height: 1.45; }
.plans-widget { min-height: 170px; }
.weather-widget { background: #edf7ff; border-color: #b8dbf4; }
.weather-reading { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 12px; margin-top: 17px; }
.weather-reading > span { font-size: 34px; }
.weather-reading > strong { font-size: 32px; letter-spacing: -1px; }
.weather-reading b, .weather-reading small { display: block; }
.weather-reading b { font-size: 14px; }
.weather-reading small { margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.3; }
.weather-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 17px; }
.weather-links a {
  padding: 7px 9px;
  border-radius: 8px;
  background: #fff;
  color: #2276af;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.widget-source { display: block; margin-top: 14px; color: var(--muted); font-size: 11px; }
.today-widget { padding: 0; overflow: hidden; }
.today-heading { display: flex; align-items: start; justify-content: space-between; gap: 14px; padding: 21px 21px 16px; }
.today-heading h2 { font-size: 22px; }
.today-heading p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.today-heading > a { padding: 5px; color: var(--blue); font-size: 19px; line-height: 1; text-decoration: none; }
.today-block { padding: 15px 21px; border-top: 1px solid var(--line); }
.today-block h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; }
.today-block h3 > span { font-size: 17px; }
.today-list { display: grid; gap: 8px; margin: 11px 0 0; padding: 0; list-style: none; }
.today-list li { color: var(--ink); font-size: 13px; line-height: 1.38; }
.today-list b { color: var(--blue); }
.today-list a { color: inherit; text-decoration: none; }
.today-list a:hover { color: var(--blue); text-decoration: underline; }
.today-block .today-empty { margin: 10px 0 0; font-size: 13px; }
.today-widget > .widget-source { padding: 0 21px 18px; }
html[data-theme="dark"] .home-widget { background: #304058; border-color: #46556d; box-shadow: none; }
html[data-theme="dark"] .weather-widget { background: #29485e; border-color: #427b9d; }
html[data-theme="dark"] .weather-links a { background: #26384d; color: #9bd8ff; }
html[data-theme="dark"] .today-list b, html[data-theme="dark"] .today-list a:hover { color: #82b8ff; }

@media (max-width: 1180px) {
  .home-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .today-column { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .home-overview-grid { grid-template-columns: 1fr; gap: 14px; }
  .today-column { grid-column: auto; }
  .home-dashboard-column { gap: 14px; }
  .home-widget { padding: 17px; border-radius: 15px; }
  .home-widget h2 { font-size: 19px; }
  .plans-widget { min-height: 130px; }
  .today-widget { padding: 0; }
  .today-heading { padding: 18px 17px 14px; }
  .today-heading h2 { font-size: 20px; }
  .today-block { padding: 14px 17px; }
  .today-widget > .widget-source { padding: 0 17px 16px; }
}
