:root{--bg:#f5f4ee;--card:#fffefa;--ink:#272e29;--muted:#7a8078;--line:#e6e6dc;--gold:#b79b5e;--dark:#171e19;--green:#4f715c;--red:#a8584b}*{box-sizing:border-box}body{margin:0;color:var(--ink);background:var(--bg);font:14px/1.5 Inter,Arial,sans-serif}h1,h2,h3,p{margin:0}h1,h2,h3{font-weight:500;letter-spacing:-.6px}h1{font-size:32px;line-height:1.2}h2{font-size:22px}h3{font-size:17px}button,input,select,textarea{font:inherit}button,a{touch-action:manipulation}button{cursor:pointer;border:0;border-radius:7px;background:var(--dark);color:#fff;padding:11px 18px;font-weight:600;font-size:12px}button:hover{filter:brightness(1.15)}button:disabled{opacity:.5;cursor:wait}a{color:var(--green)}.secondary{background:transparent;color:var(--ink);border:1px solid #dcded3}.gold{background:var(--gold);color:#211f17}.danger{background:#f7e7e2;color:var(--red)}.icon{padding:7px 12px;background:transparent;color:inherit;font-size:20px}button:focus-visible,a:focus-visible{outline:3px solid var(--gold);outline-offset:3px}.eyebrow{font-size:9px;letter-spacing:2px;color:#9a8657;font-weight:700;text-transform:uppercase}.muted,small{color:var(--muted)}.shell{display:grid;grid-template-columns:226px 1fr;min-height:100vh}aside{background:var(--dark);color:#c4ccc0;padding:24px 20px;display:flex;flex-direction:column;position:fixed;inset:0 auto 0 0;width:226px}aside .logo{width:87px;height:104px;display:block;margin:2px auto 32px}nav{display:grid;gap:5px}nav button{background:none;text-align:left;color:#9da89a;padding:13px 14px;font-weight:400;font-size:12px}nav button.active{background:#c5ac6e1c;color:#e6cf92;border-left:2px solid #d0b571;border-radius:4px}nav button span{display:inline-block;width:28px;font-size:16px}.side-foot{margin-top:auto;border-top:1px solid #ffffff12;padding-top:20px;font-size:11px}.avatar{border:1px solid #8e825951;border-radius:50%;display:inline-grid;place-items:center;width:31px;height:31px;color:#dac797;margin-right:10px}.side-foot button{color:#a9b1a3}.main{grid-column:2;min-width:0}.topbar{padding:20px 42px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;color:var(--muted);font-size:11px;background:#fafaf5}.online{color:#547963;font-size:10px}.online:before{content:'●';margin-right:6px;font-size:8px}.workspace{padding:34px 42px;max-width:1550px;margin:auto}.page-head{display:flex;justify-content:space-between;gap:18px;align-items:center;margin-bottom:28px}.page-head p{margin-top:9px;font-size:12px;color:var(--muted)}.actions{display:flex;gap:9px;flex-wrap:wrap}.hero{display:grid;grid-template-columns:1.2fr 1fr;background:#1f2c24;color:#efeade;border-radius:12px;overflow:hidden;min-height:225px;margin-bottom:25px}.hero-copy{padding:30px 34px}.hero h2{font:32px/1.15 Georgia,serif;margin:13px 0}.hero p{font-size:12px;color:#b3bfb0;max-width:350px}.hero .eyebrow{color:#c6ad73}.route-art{position:relative;min-height:180px;background:radial-gradient(ellipse at 80% 50%,#45634d44,transparent 70%);overflow:hidden}.route-art svg{width:100%;height:100%;position:absolute;inset:0;opacity:.75}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:15px;margin-bottom:26px}.stat{background:var(--card);border:1px solid var(--line);border-radius:9px;padding:20px}.stat label{font-size:10px;color:var(--muted);display:block}.stat strong{display:block;font-weight:500;font-size:26px;letter-spacing:-1px;margin:10px 0 4px}.stat small{font-size:10px}.stat .good{color:var(--green)}.section-title{display:flex;align-items:center;justify-content:space-between;margin:22px 0 14px}.section-title p{font-size:11px;color:var(--muted)}.grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.panel,.trip-card{border:1px solid var(--line);background:var(--card);border-radius:10px;padding:23px}.panel h3{margin-bottom:15px}.trip-card{display:flex;flex-direction:column;gap:17px}.trip-top{display:flex;justify-content:space-between;gap:12px}.badge{display:inline-block;background:#eff2e9;color:#607354;padding:4px 9px;font-size:9px;border-radius:4px;white-space:nowrap}.badge.warn{background:#f7efd8;color:#9b8035}.badge.red{background:#faeae5;color:#a75d4d}.journey{display:grid;grid-template-columns:1fr 32px 1fr;align-items:center;gap:12px}.journey strong{display:block;font-size:18px;font-weight:500}.journey small{display:block;font-size:10px}.journey .arrow{color:#b59b61;text-align:center}.trip-bottom{border-top:1px solid var(--line);padding-top:15px;display:flex;justify-content:space-between;align-items:center;font-size:11px}.trip-bottom button{padding:8px 13px}.empty{padding:36px 20px;text-align:center;border:1px dashed #d9dccc;border-radius:9px;background:#fbfbf6}.empty .empty-icon{color:#bca56f;font-size:30px;display:block;margin-bottom:12px}.empty h3{margin-bottom:8px}.empty p{color:var(--muted);font-size:12px;max-width:400px;margin:0 auto 18px}.list-row{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line);padding:15px 0}.list-row:last-child{border:0}.list-row strong{display:block;font-size:13px;font-weight:500}.list-row small{font-size:10px}.amount{font-weight:600;white-space:nowrap}.positive{color:var(--green)}.negative{color:var(--red)}.tabs{display:flex;gap:6px;border-bottom:1px solid var(--line);padding-bottom:13px;margin-bottom:20px;overflow:auto}.tabs button{background:none;color:var(--muted);white-space:nowrap}.tabs button.active{color:var(--ink);background:#e9e9df}.filters{display:flex;gap:12px;margin-bottom:20px;flex-wrap:wrap}.filters input{flex:1;min-width:180px}.filters select{max-width:200px}input,select,textarea{width:100%;border:1px solid #dfe2d7;background:#fffefa;color:var(--ink);border-radius:6px;padding:11px 12px;outline:none}input:focus,select:focus,textarea:focus{border-color:#b39b60;box-shadow:0 0 0 3px #b39b601a}label.field{display:block;font-size:11px;font-weight:600;margin-bottom:16px}label.field input,label.field select,label.field textarea{margin-top:7px;font-size:13px;font-weight:400}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 16px}.form-grid .wide{grid-column:1/-1}.hint{background:#f3f2e8;padding:13px;border-radius:6px;font-size:11px;color:#777b6c;margin:5px 0 18px}.error{color:#a54f44;font-size:12px}.file-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:12px}.file-card{border:1px solid var(--line);padding:8px;border-radius:6px}.file-card img{width:100%;height:100px;object-fit:cover;border-radius:4px}.file-card a{font-size:11px;display:block;word-break:break-word}.file-card small{font-size:9px}.upload{display:block;padding:20px;border:1px dashed #bdc2ad;border-radius:7px;text-align:center;font-size:12px}.upload input{margin-top:12px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;white-space:nowrap;font-size:12px}th{text-align:left;font-size:9px;letter-spacing:.4px;color:var(--muted);font-weight:500;background:#f5f5ed}td,th{padding:13px 12px;border-bottom:1px solid var(--line)}td button{padding:7px 10px;font-size:10px}.note{font-size:11px;color:var(--muted);margin:16px 0}.section-note{border-left:2px solid var(--gold);padding:4px 0 4px 14px;font-size:12px;color:#7e806f;margin:20px 0}.loan-sum{border:1px solid #e6ddc5;border-radius:7px;padding:16px;background:#fbf8ef;margin-bottom:16px}.loan-sum strong{font-size:21px;display:block}dialog{border:1px solid var(--line);border-radius:12px;width:min(620px,94vw);max-height:92dvh;padding:26px;color:var(--ink);background:var(--card)}dialog::backdrop{background:#0f1a13aa;backdrop-filter:blur(3px)}dialog header{display:flex;justify-content:space-between;gap:15px;margin-bottom:25px}dialog footer{display:flex;justify-content:flex-end;gap:10px;border-top:1px solid var(--line);padding-top:20px}#toast{position:fixed;bottom:25px;right:25px;background:#203729;color:white;padding:14px 22px;border-radius:8px;font-size:12px;z-index:100;display:none;max-width:90vw}.login{min-height:100dvh;display:grid;grid-template-columns:1fr 1fr}.login-art{background:#17251c;padding:10vw 7vw;color:#ded6bf;display:flex;flex-direction:column;justify-content:center}.login-art img{width:100px;margin-bottom:35px}.login-art h1{font:48px/1.15 Georgia,serif;max-width:440px}.login-art p{color:#a7b2a1;font-size:13px;margin-top:20px;max-width:330px}.login-box{display:grid;place-items:center;padding:30px}.login-box form{width:340px;max-width:100%}.login-box h2{font-size:30px;margin:13px 0}.login-box p{font-size:12px;color:var(--muted);margin-bottom:28px}.login-box button{width:100%;margin-top:14px}.copyright{font-size:9px!important;letter-spacing:1px;margin-top:35px!important}.loading{display:grid;place-items:center;height:100vh;color:var(--muted)}#printArea{display:none}.mobile-logo{display:none}@media(max-width:1000px){.workspace{padding:25px}.topbar{padding:18px 25px}.stats{grid-template-columns:1fr 1fr}.hero{grid-template-columns:1.3fr 1fr}.grid{grid-template-columns:1fr}}@media(max-width:680px){.shell{display:block;padding-bottom:75px}aside{position:fixed;inset:auto 0 0;width:100%;height:66px;padding:0;z-index:10;display:block}aside>.logo,.side-foot{display:none}nav{display:flex;height:100%;justify-content:space-around;gap:0}nav button{font-size:8px;padding:8px 4px;text-align:center;flex:1;line-height:1.2}nav button span{display:block;font-size:18px;width:auto;margin-bottom:5px}nav button.active{border:0;border-top:2px solid var(--gold);border-radius:0}.topbar{padding:12px 18px}.mobile-logo{display:block;height:38px;width:36px}.topbar>span{display:none}.workspace{padding:24px 18px}.page-head{align-items:flex-start}h1{font-size:27px}.page-head .actions button{padding:10px 12px;font-size:10px}.hero{grid-template-columns:1fr;min-height:0}.hero-copy{padding:25px}.hero h2{font-size:29px}.route-art{display:none}.stats{gap:10px}.stat{padding:15px}.stat strong{font-size:22px}.stat small{font-size:9px}.panel,.trip-card{padding:18px}.form-grid{grid-template-columns:1fr}.form-grid .wide{grid-column:auto}.login{grid-template-columns:1fr}.login-art{display:none}.login-box{min-height:100dvh}.login-box:before{content:'H';font:80px Georgia;color:var(--gold);position:absolute;top:4vh}.table-wrap{margin:0 -8px}dialog{padding:20px}.journey strong{font-size:16px}.actions{gap:6px}}
@media print{@page{size:A4;margin:13mm}body{background:white;color:#111;font:11px/1.5 Arial}.shell,#modal,#toast,.login{display:none!important}#printArea{display:block}.print-head{display:flex;align-items:center;justify-content:space-between;border-bottom:2px solid #ad9259;padding-bottom:15px;margin-bottom:20px}.print-head img{width:50px;background:#17251c;border-radius:5px}.print-head h1{font-size:23px}.print-head p{font-size:10px}.print-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:15px 0}.print-box{border:1px solid #ccc;padding:10px}.print-box strong{display:block}#printArea h2{font-size:15px;margin:20px 0 9px}#printArea table{white-space:normal;font-size:10px}#printArea td,#printArea th{padding:7px 6px}#printArea th{color:#333}#printArea tr,.print-box,.receipt-print{break-inside:avoid}#printArea .receipt-print{display:inline-block;width:46%;vertical-align:top;margin:1%;border:1px solid #ddd;padding:10px}#printArea .receipt-print img{max-width:100%;max-height:280px;object-fit:contain}#printArea .signature{margin-top:50px;border-top:1px solid #888;width:50%;padding-top:8px}.print-note{font-size:9px;color:#555}}

@media(max-width:680px){input,select,textarea,label.field input,label.field select,label.field textarea{font-size:16px}button{min-height:44px}nav button{min-height:66px;font-size:8px}.topbar button{min-height:36px}.workspace{padding:18px 14px}.page-head{margin-bottom:20px}.page-head p{font-size:11px;line-height:1.5}.hero-copy{padding:21px}.hero h2{font-size:25px}.hero-copy p{font-size:11px}.stat strong{font-size:21px}.stat{padding:13px}.tabs button{padding:9px 12px}.panel,.trip-card{padding:16px}.loan-sum{position:relative}dialog{padding:18px;max-height:90dvh}dialog footer{position:sticky;bottom:-18px;background:var(--card);padding-bottom:18px;margin-bottom:-18px}.login-box{padding-top:125px;padding-bottom:50px}.login-box:before{top:25px}.side-foot{padding-bottom:env(safe-area-inset-bottom)}aside{height:calc(66px + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom)}.shell{padding-bottom:calc(76px + env(safe-area-inset-bottom))}}
.journey-event{display:flex;align-items:flex-start;gap:14px;padding:16px 0;position:relative;border-bottom:1px solid #e7e7df}.journey-event:last-child{border:0}.journey-event>div{flex:1;min-width:0}.journey-event strong{display:block;font-size:17px;overflow-wrap:anywhere}.journey-event small{font-size:10px;letter-spacing:.08em;color:#777d70}.journey-event p{font-size:12px;line-height:1.7;margin:7px 0 0;color:#62695d}.journey-dot{height:10px;width:10px;flex-shrink:0;border:2px solid #af9250;border-radius:50%;margin-top:5px}.journey-event .secondary{padding:9px 12px}.tabs{max-width:100%;overflow-x:auto;flex-wrap:nowrap}.tabs button{flex-shrink:0}.filters input{width:100%}
@media(max-width:600px){.journey-event{gap:10px;padding:13px 0}.journey-event strong{font-size:16px}.trip-bottom b{font-size:14px}.page-head .actions{width:100%}.page-head .actions button{flex:1}}
.trip-live{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:19px;background:#eae8d9;border:1px solid #d8d3b9;border-radius:16px;margin-bottom:20px}.trip-live p{font-size:12px;margin:6px 0 0}.diary-text{white-space:pre-wrap;overflow-wrap:anywhere}.attachment-link{display:inline-block;font-size:12px;color:#70602b;margin-top:8px;min-height:32px}.trip-live .actions{flex-wrap:wrap}.trip-live .gold{font-size:13px}
@media(max-width:600px){.trip-live{display:block;padding:14px}.trip-live .actions{display:grid;grid-template-columns:1fr 1fr;margin-top:14px;gap:8px}.trip-live button{min-height:44px;padding:10px 6px;font-size:11px}.trip-live .gold{font-size:12px}.trip-live .eyebrow{font-size:9px}.tabs{margin-bottom:16px}}
.finish-summary{display:grid;gap:0;background:#f2f0e5;border-radius:12px;padding:7px 14px}.finish-summary>span{display:flex;justify-content:space-between;gap:12px;padding:10px 0;font-size:12px;border-bottom:1px solid #dfdfd1}.finish-summary>span:last-child{border:0}.category-summary{margin:24px 0}.category-row{margin:13px 0}.category-row>div:first-child{display:flex;justify-content:space-between;gap:12px;font-size:12px}.category-row small{font-size:10px;color:#7b806f}.category-track{height:5px;background:#eaeadd;border-radius:8px;margin:5px 0}.category-track span{display:block;height:5px;background:#a68c45;border-radius:8px}.online.offline{color:#9d493b;background:#f8e9e3}.expense-end{display:grid;gap:6px;justify-items:end}.expense-end button{padding:5px 10px;font-size:11px}.continue-panel{margin-bottom:22px}.continue-panel .trip-card{box-shadow:none}
@media(max-width:600px){.continue-panel{padding:14px}.continue-panel .grid{gap:10px}.finish-summary>span{font-size:12px}.expense-end button{min-height:36px}}
/* Themes share the same layout and financial colors. */
:root{color-scheme:light;--soft:#f3f2e8;--top:#fafaf5;--field:#fffefa;--hero:#1f2c24;--aside-ink:#c4ccc0;--nav-ink:#a8b2a4;--accent-ink:#211f17;--good-soft:#eff2e9;--warn-soft:#f7efd8;--warn-ink:#846821;--bad-soft:#faeae5;--progress:#eaeadd;--live:#eae8d9;--accent-text:#876c33;--focus:#b39b6028}
:root[data-theme="dark"]{color-scheme:dark;--bg:#101715;--card:#1b2520;--ink:#edf1eb;--muted:#b0beb3;--line:#3a493e;--gold:#d2b46f;--dark:#0b120e;--green:#a1d1b0;--red:#f1aba0;--soft:#27342b;--top:#17211b;--field:#142019;--hero:#243d2c;--aside-ink:#d4dfd4;--nav-ink:#b1c2b1;--accent-ink:#171d14;--good-soft:#243b2b;--warn-soft:#423b22;--warn-ink:#efce7c;--bad-soft:#432b28;--progress:#35473b;--live:#2b3627;--accent-text:#d2b46f;--focus:#d2b46f33}
:root[data-theme="ocean"]{color-scheme:light;--bg:#edf4f8;--card:#ffffff;--ink:#153247;--muted:#5c7384;--line:#d0e0eb;--gold:#65b9dc;--dark:#092d47;--green:#176d70;--red:#a33f49;--soft:#e6f0f6;--top:#f5f9fc;--field:#ffffff;--hero:#113e5a;--aside-ink:#d4eaf5;--nav-ink:#a5c9dd;--accent-ink:#082b41;--good-soft:#e2f2ed;--warn-soft:#fff0d3;--warn-ink:#806015;--bad-soft:#fce9eb;--progress:#d2e5ef;--live:#dcecf5;--accent-text:#1d6989;--focus:#65b9dc40}
.topbar{background:var(--top)}input,select,textarea{background:var(--field);border-color:var(--line)}input:focus,select:focus,textarea:focus{border-color:var(--gold);box-shadow:0 0 0 3px var(--focus)}.secondary,.empty,.loan-sum,.journey-event,.trip-live{border-color:var(--line)}.empty{background:var(--card)}.hint,.loan-sum,.finish-summary,.tabs button.active,th{background:var(--soft)}.hint,.section-note,.journey-event p,.journey-event small,.category-row small{color:var(--muted)}.hero,.login-art{background:var(--hero)}aside{color:var(--aside-ink)}nav button{color:var(--nav-ink)}nav button.active{color:var(--gold);border-color:var(--gold);background:var(--focus)}.gold{background:var(--gold);color:var(--accent-ink)}.eyebrow,.journey .arrow,.empty .empty-icon,.attachment-link{color:var(--accent-text)}.journey-dot{border-color:var(--gold)}.trip-live{background:var(--live)}.finish-summary>span{border-color:var(--line)}.category-track{background:var(--progress)}.category-track span{background:var(--gold)}.badge{background:var(--good-soft);color:var(--green)}.badge.warn{background:var(--warn-soft);color:var(--warn-ink)}.badge.red,.danger,.online.offline{background:var(--bad-soft);color:var(--red)}.error{color:var(--red)}.online{color:var(--green)}.theme-panel{margin-bottom:22px}.theme-options{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.theme-choice{padding:14px;background:var(--card);color:var(--ink);border:2px solid var(--line);text-align:left;min-width:0;display:grid;gap:9px}.theme-choice.selected{border-color:var(--gold);box-shadow:0 0 0 2px var(--focus)}.theme-choice strong{font-size:12px}.theme-choice small{font-size:10px;color:var(--muted)}.theme-preview{display:flex;gap:5px;padding:12px;border-radius:5px;background:#f5f4ee;border:1px solid #dcded3}.theme-preview i{height:24px;border-radius:3px;flex:1;background:#fffefa}.theme-preview i:first-child{background:#171e19}.theme-preview i:last-child{background:#b79b5e}.theme-choice.dark .theme-preview{background:#101715;border-color:#3a493e}.theme-choice.dark .theme-preview i{background:#1b2520}.theme-choice.dark .theme-preview i:first-child{background:#3a493e}.theme-choice.dark .theme-preview i:last-child{background:#d2b46f}.theme-choice.ocean .theme-preview{background:#edf4f8;border-color:#d0e0eb}.theme-choice.ocean .theme-preview i{background:#ffffff}.theme-choice.ocean .theme-preview i:first-child{background:#092d47}.theme-choice.ocean .theme-preview i:last-child{background:#65b9dc}
@media(max-width:680px){.login-box:before{content:'HS';font-size:70px}.theme-options{grid-template-columns:1fr;gap:10px}.theme-choice{grid-template-columns:90px 1fr;align-items:center;gap:3px 14px}.theme-preview{grid-row:span 2;padding:8px}.theme-choice strong{font-size:14px}.theme-choice small{font-size:11px}.topbar>[data-network]{display:inline;font-size:9px}}
@media print{:root[data-theme]{color-scheme:light;--ink:#111;--muted:#555;--line:#ccc;--card:white;--soft:#f4f4f4;--green:#333;--gold:#ad9259}body{background:white!important;color:#111!important}.print-head p,.print-box{color:#111!important}}
