:root{font-family:Arial,Helvetica,sans-serif;color:#193654;background:#f3f6fa}*{box-sizing:border-box}html,body{margin:0;height:100%}button,input,select,textarea{font:inherit}button{cursor:pointer}body.auth-pending .app{visibility:hidden}[hidden]{display:none!important}
.app{height:100dvh;display:grid;grid-template-columns:216px minmax(0,1fr);overflow:hidden}.sidebar{background:#183858;color:#fff;padding:14px 10px;display:flex;flex-direction:column;position:relative;overflow-y:auto}.brand{font-size:18px;font-weight:800;line-height:1.2;margin:5px 6px 20px}.theme-toggle{order:-1;align-self:flex-start;border:0;background:transparent;color:#dceaff;font-size:12px;padding:2px 5px;margin-bottom:12px}.years{display:grid;gap:3px}.year{width:100%;border:0;border-radius:6px;background:transparent;color:#fff;padding:8px 12px;text-align:left;font-size:14px;font-weight:700}.year.active{background:#34648d}.role-panel{margin-top:auto;color:#b9cee2;font-size:12px;padding:8px 5px}.sign-out{border:1px solid #7f9fbe;background:#254d77;color:#fff;border-radius:6px;text-align:left;padding:9px 11px}.guest-log-hotspot{position:absolute;top:77%;left:9px;width:188px;height:65px;border:0;background:transparent}.guest-log-hotspot:focus-visible{outline:2px solid #fff}
.main{min-width:0;min-height:0;display:flex;flex-direction:column;padding:10px 20px 16px;gap:10px;overflow:hidden}.topline{display:flex;align-items:center;gap:12px;min-height:39px}.page-title{font-size:23px;margin:0;font-weight:800;white-space:nowrap}.search{margin-left:auto;width:min(340px,42vw);border:1px solid #d2deeb;background:#fff;border-radius:7px;padding:9px 12px;color:#193654;font-size:12px}.tabs{display:flex;align-items:center;gap:8px;min-height:33px;overflow-x:auto;flex:none}.tab,.more-months{border:1px solid #d2deeb;background:#fff;border-radius:6px;color:#193654;padding:8px 12px;font-size:12px;min-width:86px;text-align:left;white-space:nowrap}.tab.active{background:#dcecfb;border-color:#176cc4;color:#176cc4;font-weight:700}.more-months{min-width:138px}.month-title{display:none}
.trip-panel,.attachments-panel,.one-c-panel{background:#fff;border:1px solid #d7e1eb;border-radius:8px;min-width:0}.trip-panel{flex:1 1 auto;min-height:150px;display:flex;flex-direction:column;overflow:auto}.trip-head,.trip-row{display:grid;grid-template-columns:minmax(110px,15%) 166px repeat(5,78px) 112px 78px minmax(0,1fr);gap:6px;align-items:center;padding:4px 11px}.trip-head,.trip-list{min-width:1012px;scrollbar-gutter:stable}.trip-head{flex:none;overflow:hidden;min-height:34px;border-bottom:1px solid #d7e1eb;color:#6d8299;font-size:11px;font-weight:800}.trip-list{overflow:auto;min-height:0}.trip-row{width:100%;min-height:53px;border:0;border-bottom:1px solid #d7e1eb;background:#fff;color:#193654;text-align:left}.trip-row.selected{background:#eaf4ff;outline:1px solid #176cc4;outline-offset:-2px;border-radius:6px}.trip-select{border:0;background:transparent;color:inherit;text-align:left;padding:0;min-width:0}.trip-name{display:block;overflow-wrap:anywhere;font-size:14px;font-weight:800;line-height:1.2}.trip-meta{display:block;font-size:11px;color:#537fae;margin-top:4px}.trip-period{font-size:12px;font-weight:700;white-space:pre-line;overflow-wrap:anywhere}.stage{display:block;border:0;border-radius:5px;min-height:24px;width:100%;padding:4px 3px;text-align:center;font-size:10px;font-weight:800;appearance:none}.stage.green{background:#dff4e7;color:#20774b}.stage.yellow{background:#fff0c5;color:#906208}.stage.red{background:#fde4e2;color:#b43c38}.stage.neutral{background:#e9eef4;color:#5d7288}.trip-note{font-size:12px;font-weight:700;line-height:1.25;white-space:pre-wrap;overflow-wrap:anywhere}.trip-note textarea{display:block;width:100%;min-height:37px;resize:vertical;overflow:hidden;border:0;background:transparent;color:#193654;font-size:12px;font-weight:700;line-height:1.25;padding:1px 0}.trip-note textarea:focus{outline:1px solid #176cc4;border-radius:3px;background:#fff}.empty-list{padding:17px;color:#6d8299;font-size:13px}
.attachments-panel{flex:none;width:min(1080px,100%);padding:6px 12px 9px}.section-head{display:flex;align-items:center;gap:10px;min-height:29px}.section-head h2{font-size:15px;font-weight:800;margin:0;flex:1}.section-actions{display:flex;gap:6px;align-items:center}.small-button{border:1px solid #176cc4;background:#fff;color:#176cc4;border-radius:6px;padding:6px 10px;font-size:11px;font-weight:700;white-space:nowrap}.small-button.primary{background:#176cc4;color:#fff}.file-cards{display:flex;gap:9px;overflow-x:auto;border-top:1px solid #d7e1eb;padding-top:7px}.file-card{flex:0 0 330px;min-width:0;min-height:58px;display:flex;align-items:center;gap:8px;border:1px solid #d7e1eb;border-radius:6px;background:#f8fbfe;padding:5px 7px}.file-ext{flex:none;display:grid;place-items:center;width:56px;height:46px;border-radius:5px;background:#dfeefc;font-size:16px;font-weight:800}.file-ext.email{background:#e4f4e9}.file-ext.archive{background:#f8ebd4}.file-info{min-width:0;flex:1}.file-kind{font-size:12px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.file-name{font-size:10px;color:#6d8299;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:3px 0}.file-links{display:flex;gap:10px;align-items:center}.file-links a,.file-links button{border:0;background:none;color:#176cc4;padding:0;text-decoration:none;font-size:11px;font-weight:700}.file-links .danger{color:#b43c38;margin-left:auto}.file-empty{font-size:12px;color:#6d8299;padding:10px 0}
.trip-files-slot{padding:4px 9px 8px;background:#f0f7ff;border-bottom:1px solid #c7dced}.trip-files-slot .attachments-panel{width:100%;border-color:#b7d5f0}.trip-files-slot .section-head h2{font-size:12px}.trip-files-slot .file-card{min-height:48px}.trip-files-slot .file-ext{height:38px;width:46px;font-size:13px}.unassigned{margin-top:6px;font-size:11px;color:#53718e}.unassigned summary{cursor:pointer;font-weight:700}.unassigned-row{display:flex;align-items:center;gap:8px;padding:5px 0;border-top:1px solid #d7e1eb}.unassigned-row span{max-width:34%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.unassigned-row select{min-width:0;flex:1;border:1px solid #c3d5e8;border-radius:5px;padding:4px;color:#193654;background:#fff}
.one-c-panel{flex:none;padding:7px 12px 10px;max-height:36vh;display:flex;flex-direction:column}.one-c-sub{font-size:11px;color:#6d8299;margin:1px 0 6px}.one-c-table{min-height:0;overflow:auto}.one-c-header,.one-c-row{display:grid;grid-template-columns:minmax(0,1fr) 122px 28px;align-items:center;gap:10px}.one-c-header{background:#e9f0f7;color:#6d8299;font-size:11px;font-weight:800;padding:7px 9px;border-radius:4px}.one-c-row{border-bottom:1px solid #d7e1eb;min-height:31px;padding:3px 9px;font-size:12px}.one-c-row:nth-child(even){background:#f2f6fb}.one-c-row.legacy:nth-child(even){background:#fff4d8}.one-c-row img{display:block;max-width:100%;max-height:29px;object-fit:contain;object-position:left center}.one-c-row .amount{font-size:13px;font-weight:800;text-align:right}.one-c-row .row-action{border:0;background:transparent;color:#176cc4;font-size:12px;padding:2px}.one-c-row input{width:100%;border:0;background:transparent;color:inherit;font-size:12px;font-weight:700}.one-c-row input:focus{outline:1px solid #176cc4;background:#fff}.source-chips{display:flex;gap:6px;overflow-x:auto;margin-top:5px}.source-chip{font-size:10px;color:#5d7288;white-space:nowrap}.source-chip button{border:0;background:none;color:#b43c38;padding:0 2px}.no-ocr{font-size:12px;color:#6d8299;padding:8px}
.modal{position:fixed;inset:0;z-index:25;background:#0d2038df;display:none;place-items:center;padding:20px}.modal.open{display:grid}.modal-controls{display:flex;gap:8px;justify-content:flex-end;position:absolute;right:18px;top:12px}.modal-controls button,.modal-controls a{background:#fff;border:0;border-radius:6px;padding:9px 12px;color:#193654;text-decoration:none}.modal-stage{max-width:100%;max-height:90vh;overflow:auto}.modal-stage img{display:block;max-width:95vw;max-height:84vh;cursor:zoom-in}.modal.zoom .modal-stage img{max-width:none;max-height:none;zoom:1.8;cursor:zoom-out}
.glass-overlay{position:fixed;inset:0;z-index:30;display:grid;place-items:center;padding:18px;background:rgba(15,35,59,.38);backdrop-filter:blur(22px) saturate(170%)}.glass-card{position:relative;width:min(480px,100%);max-height:90dvh;overflow:auto;padding:25px;border:1px solid rgba(255,255,255,.65);border-radius:24px;background:linear-gradient(145deg,rgba(255,255,255,.9),rgba(231,243,255,.75));box-shadow:0 24px 80px #09264750;color:#173957}.glass-card h2{margin:0 0 8px;font-size:24px}.glass-card p{margin:0 0 16px;color:#5a738d}.auth-tabs{display:flex;gap:8px;margin-bottom:16px}.auth-tabs button{flex:1;padding:9px;border:1px solid #abc8e2;border-radius:10px;background:#ffffff8a;color:#28577f;font-weight:700}.auth-tabs button.selected,.auth-form button[type=submit]{background:#1778d9;color:#fff;border-color:#1778d9}.auth-form{display:grid;gap:11px}.auth-form label{display:grid;gap:5px;font-size:13px;font-weight:700}.auth-form input,.ocr-edit input{width:100%;padding:9px 10px;border:1px solid #a9c4dd;border-radius:8px;background:#fff;color:#173957}.auth-form button[type=submit]{padding:10px;border:1px solid #1778d9;border-radius:10px;font-weight:700}.auth-error{min-height:17px;color:#b7322e;font-size:12px;margin-top:7px}.glass-close{position:absolute;right:16px;top:11px;border:0;background:none;font-size:25px;color:#244c71}.guest-log-card{width:min(550px,100%)}.guest-log-list{max-height:45dvh;overflow:auto}.guest-log-item{display:flex;justify-content:space-between;gap:10px;padding:8px 0;border-top:1px solid #bfd3e5;font-size:13px}.guest-log-info{display:grid}.guest-log-item time{color:#607b95}.guest-log-actions{display:flex;gap:5px}.guest-log-actions button{border:1px solid #98b7d2;border-radius:6px;background:#fff;padding:5px}.guest-log-actions .danger{color:#a22d2d}.guest-log-edit{display:grid;gap:7px;width:100%}.guest-log-edit label{display:grid;gap:3px}.guest-log-edit input{padding:6px;border:1px solid #a9c4dd;border-radius:5px}.ocr-card{width:min(780px,100%)}.ocr-preview{max-height:28vh;overflow:auto;border:1px solid #cbddec;border-radius:7px;margin:10px 0}.ocr-edit{display:grid;grid-template-columns:minmax(0,1fr) 120px 25px;gap:7px;padding:6px;border-bottom:1px solid #d7e1eb}.ocr-edit button{border:0;background:none;color:#b43c38}.ocr-actions{display:flex;gap:8px;justify-content:flex-end}.ocr-status{font-size:12px;color:#5d7288;min-height:17px}
body.role-guest .admin-only{display:none!important}html[data-theme="dark"]{color-scheme:dark;background:#000;color:#eee}html[data-theme="dark"] .main{background:#000}html[data-theme="dark"] .sidebar{background:#27292d}html[data-theme="dark"] .trip-panel,html[data-theme="dark"] .attachments-panel,html[data-theme="dark"] .one-c-panel,html[data-theme="dark"] .file-card{background:#25282c;color:#eee;border-color:#55595e}html[data-theme="dark"] .trip-row{background:#25282c;color:#eee;border-color:#55595e}html[data-theme="dark"] .trip-row.selected{background:#343d49}html[data-theme="dark"] .trip-note textarea,html[data-theme="dark"] .one-c-row input{color:#eee}html[data-theme="dark"] .tab,html[data-theme="dark"] .more-months,html[data-theme="dark"] .search,html[data-theme="dark"] .small-button{background:#34373c;color:#eee;border-color:#666a70}html[data-theme="dark"] .tab.active{background:#1a486e;color:#d3eaff;border-color:#5faaf0}html[data-theme="dark"] .one-c-header{background:#343d49;color:#c2cbd6}html[data-theme="dark"] .one-c-row:nth-child(even){background:#30343a}html[data-theme="dark"] .stage.green{background:#18533b;color:#d6ffe7}html[data-theme="dark"] .stage.yellow{background:#6a5518;color:#fff3bd}html[data-theme="dark"] .stage.red{background:#692d2b;color:#ffe2dd}html[data-theme="dark"] .stage.neutral{background:#34465a;color:#d2deec}html[data-theme="dark"] .glass-card{background:linear-gradient(145deg,rgba(53,60,68,.95),rgba(27,37,50,.9));color:#f2f6fb}html[data-theme="dark"] .glass-card p{color:#b8c7d6}html[data-theme="dark"] .auth-form input,html[data-theme="dark"] .ocr-edit input{background:#172638;color:#fff;border-color:#6c8195}
@media(max-width:900px){.app{grid-template-columns:112px minmax(0,1fr)}.sidebar{padding:9px 6px}.brand{font-size:15px}.main{padding:8px;gap:6px}.attachments-panel{width:100%}.one-c-panel{max-height:34vh}}@media(max-width:620px){.app{display:flex;flex-direction:column}.sidebar{flex:none;display:flex;flex-direction:row;align-items:center;gap:6px;padding:5px}.brand{margin:0;font-size:14px}.theme-toggle{order:0;margin:0}.years{display:flex;gap:1px}.year{padding:5px;font-size:12px}.role-panel,.guest-log-hotspot{display:none}.sign-out{margin-left:auto;padding:6px}.main{flex:1}.topline{min-height:30px}.page-title{font-size:18px}.search{width:38vw}.tabs{overflow:auto}.file-card{flex-basis:260px}.one-c-header,.one-c-row{grid-template-columns:minmax(0,1fr) 78px 20px}.one-c-row img{max-height:34px}}

.guest-name-row,.trip-date-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.trip-form-card{width:min(570px,100%)}.trip-form-card textarea{width:100%;padding:9px;border:1px solid #a9c4dd;border-radius:8px;background:#fff;color:#173957;resize:vertical}.trip-form-steps{display:grid;gap:5px}.trip-form-step{display:grid;grid-template-columns:minmax(0,1fr) 130px;gap:8px;align-items:center;font-size:12px}.trip-form-step select{width:100%;padding:6px;border:1px solid #a9c4dd;border-radius:6px;background:#fff;color:#173957}
html[data-theme="dark"] .trip-note textarea{background:#303840;color:#f3f7ff;border:1px solid #75879b;padding:4px 6px}html[data-theme="dark"] .trip-note textarea::placeholder{color:#c4d2e2;opacity:1}html[data-theme="dark"] .trip-note textarea:focus{background:#1e3146;color:#fff;outline:2px solid #77b9ff}html[data-theme="dark"] .trip-meta,html[data-theme="dark"] .file-name,html[data-theme="dark"] .one-c-sub,html[data-theme="dark"] .one-c-row .source-chip{color:#b9cfe4}html[data-theme="dark"] .trip-form-card textarea,html[data-theme="dark"] .trip-form-step select{background:#172638;color:#fff;border-color:#6c8195}
@media(max-width:900px){.app{grid-template-columns:196px minmax(0,1fr)}.sidebar{padding:9px 6px}}
@media(max-width:620px){.app{display:flex;flex-direction:column}.sidebar{overflow:visible;flex-wrap:wrap}.main{min-height:0}.guest-name-row{grid-template-columns:repeat(2,minmax(0,1fr))}}

.auth-theme-toggle{display:block;margin:0 auto}

.trip-months{display:flex;flex-wrap:wrap;gap:2px;margin-top:3px;font-size:10px;font-weight:400}
.trip-month{padding:1px 3px;border-radius:3px;background:#e9f0f8;color:#405a73}
.trip-month.active{background:#cce4ff;color:#193654;font-weight:700}
html[data-theme="dark"] .trip-month{background:#374252;color:#dbe8f5}
html[data-theme="dark"] .trip-month.active{background:#28517b;color:#fff}

.stage.blue{background:#dcecff;color:#175f9f}html[data-theme="dark"] .stage.blue{background:#174d7c;color:#e0f0ff}
