
/* /annual_proposal_slides.css */
@font-face{font-family:AnnualSans;src:url('/assets/travel-fonts/sans-cn.woff2?v=7a2ef8d709264285') format('woff2');font-display:swap}
@font-face{font-family:AnnualSerif;src:url('/assets/travel-fonts/serif-cn.woff2?v=182e671dfa755022') format('woff2');font-display:swap}
.annual-slide{--annual-paper:#F7F4EE;--annual-ink:#183D3A;--annual-muted:#64736F;--annual-line:#C6B389;position:relative;box-sizing:border-box;width:1280px;height:720px;flex:none;overflow:hidden;background:var(--annual-paper);color:var(--annual-ink);font-family:AnnualSans,"Noto Sans SC",sans-serif;font-size:24px;font-weight:400;line-height:1.6;text-align:left}
.annual-slide *{box-sizing:border-box}
.annual-slide .annual-rule{position:absolute;left:64px;top:48px;width:72px;height:3px;background:var(--annual-line)}
.annual-slide .annual-heading{position:absolute;left:64px;top:76px;right:64px;height:144px}
.annual-slide .annual-title{font-family:AnnualSans,"Noto Sans SC",sans-serif;font-size:48px;line-height:1.22;font-weight:600;margin:0;height:66px;white-space:pre-wrap;overflow-wrap:anywhere;overflow:hidden;letter-spacing:0}
.annual-slide .annual-subtitle{font-size:24px;line-height:1.5;height:72px;margin-top:8px;color:var(--annual-muted);white-space:pre-wrap;overflow-wrap:anywhere;overflow:hidden}
.annual-slide .annual-content{position:absolute;left:64px;right:64px;top:240px;height:368px;display:flex;gap:48px}
.annual-slide .annual-body,.annual-slide .annual-body-right{white-space:pre-wrap;overflow-wrap:anywhere;overflow:hidden;flex:1;min-width:0;height:100%;font-size:24px;line-height:1.6}
.annual-slide .annual-footer{position:absolute;left:64px;right:64px;top:660px;height:28px;display:flex;justify-content:space-between;gap:24px;border-top:1px solid var(--annual-line);padding-top:8px;color:var(--annual-muted);font-size:18px;line-height:1.2}
.annual-slide .annual-figure{margin:0;width:600px;flex:none;display:flex;flex-direction:column;gap:12px;min-width:0}
.annual-slide .annual-photo{display:block;object-fit:contain;max-width:100%;width:600px;height:320px;background:transparent}
.annual-slide .annual-caption{height:36px;max-width:600px;overflow:hidden;white-space:pre-wrap;overflow-wrap:anywhere;font-size:18px;line-height:1.5;color:var(--annual-muted)}
.annual-layout-image .annual-body{flex:1}
.annual-layout-cover .annual-rule{top:116px}
.annual-layout-cover .annual-heading{top:176px;height:228px;right:160px}
.annual-layout-cover .annual-title{font-family:AnnualSerif,"Noto Serif SC",serif;font-size:48px;line-height:1.35;height:132px}
.annual-layout-cover .annual-subtitle{margin-top:24px;height:72px}
.annual-layout-cover .annual-content{top:440px;height:152px;right:160px}
.annual-layout-two-column .annual-body-right{border-left:1px solid var(--annual-line);padding-left:48px}
.annual-print{margin:0;padding:0;background:#fff}
.annual-print .annual-slide{page:annual-proposal;break-after:page;page-break-after:always;print-color-adjust:exact;-webkit-print-color-adjust:exact}
.annual-print .annual-slide:last-child{break-after:auto;page-break-after:auto}
@page annual-proposal{size:1280px 720px;margin:0}


/* /annual_proposal_template_slides.css */
/* Original 16:9 geometry from the user-provided Keynote template. */
.annual-slide.annual-layout-template{padding:0;margin:0;border:0;background:#fff;color:#000;line-height:1;font-weight:400}
.annual-template-element{position:absolute;box-sizing:border-box;min-width:0;min-height:0;margin:0}
.annual-template-image-slot{overflow:hidden}
.annual-template-image-slot img{position:absolute;display:block;max-width:none;max-height:none;margin:0;padding:0;border:0}
.annual-template-text{display:flex;flex-direction:column;overflow:visible;align-items:stretch}
.annual-template-text-inner{width:100%;flex:none;overflow:visible;word-break:normal;overflow-wrap:normal}
.annual-template-paragraph{padding:0;border:0;min-height:0}
.annual-template-paragraph span{font-synthesis:weight;line-height:1}
.annual-template-shape{pointer-events:none}
.ap-canvas [data-annual-element]{cursor:pointer}
.ap-canvas [data-annual-element]:hover{outline:2px dashed #496f6b;outline-offset:3px}
.annual-template-missing{display:grid;place-items:center;font-size:30px}
.annual-print [data-annual-element]{outline:none!important}


/* /styles_annual_proposals.css */
#annualProposals{--ap-border:var(--line,#d6dcd7);--ap-muted:var(--muted,#64736f);--ap-paper:var(--paper,#fff);--ap-ink:var(--ink,#183d3a);color:var(--ap-ink);min-width:0}
#annualProposals *{box-sizing:border-box}
#annualProposals button,#annualProposals input,#annualProposals select,#annualProposals textarea{font:inherit;max-width:100%}
#annualProposals button:focus-visible,#annualProposals input:focus-visible,#annualProposals select:focus-visible,#annualProposals textarea:focus-visible{outline:3px solid #96772e;outline-offset:3px}
#annualProposals h2,#annualProposals h3,#annualProposals p{margin:0}
#annualProposals .ap-list-head,#annualProposals .ap-editor-head,#annualProposals .ap-editor-meta,#annualProposals .ap-list-row,#annualProposals .ap-list-paging,#annualProposals .ap-pane-heading,#annualProposals .ap-canvas-caption,#annualProposals .ap-history-row{display:flex;align-items:center;justify-content:space-between;gap:16px}
#annualProposals .ap-list-head{margin-bottom:16px;align-items:flex-start}
#annualProposals .ap-list-head h2{font-size:24px;margin-bottom:8px}
#annualProposals .ap-list-head p,#annualProposals .ap-list-row p,#annualProposals .ap-help{color:var(--ap-muted);font-size:13px;line-height:1.6}
#annualProposals .ap-template-note{font-size:13px;line-height:1.6;background:#f5f2e9;border-left:3px solid #bca36f;padding:10px 14px;margin:12px 0;color:#5c573f}
#annualProposals .ap-search{display:flex;gap:16px;align-items:flex-end;margin:24px 0}
#annualProposals label{display:grid;gap:8px;font-size:13px;font-weight:600;min-width:0}
#annualProposals input,#annualProposals select,#annualProposals textarea{width:100%;border:1px solid var(--ap-border);border-radius:6px;padding:10px 12px;color:var(--ap-ink);background:var(--ap-paper);min-width:0}
#annualProposals textarea{resize:vertical;line-height:1.6;font-weight:400}
#annualProposals .ap-search label:first-child{flex:1;max-width:440px}
#annualProposals [data-ap-status]{min-height:24px;font-size:14px;line-height:1.6;margin:12px 0;white-space:pre-wrap;overflow-wrap:anywhere}
#annualProposals .ap-list{border-top:1px solid var(--ap-border)}
#annualProposals .ap-list-row{padding:20px 0;border-bottom:1px solid var(--ap-border)}
#annualProposals .ap-list-row>div{min-width:0}
#annualProposals .ap-list-row h3{font-size:17px;margin-bottom:8px;overflow-wrap:anywhere}
#annualProposals .ap-list-row button{flex:none}
#annualProposals .ap-list-paging{justify-content:flex-end;padding:20px 0;font-size:13px}
#annualProposals .ap-empty{padding:56px 24px;text-align:center;border-bottom:1px solid var(--ap-border)}
#annualProposals .ap-empty p{margin:12px 0 24px}
#annualProposals .ap-editor-head{align-items:flex-end;flex-wrap:wrap}
#annualProposals .ap-title-group{display:flex;gap:16px;align-items:flex-end;flex:1;min-width:280px}
#annualProposals .ap-title-group label{flex:1;max-width:440px}
#annualProposals .ap-title-group>.btn{font-size:13px;flex:none}
#annualProposals .ap-actions,#annualProposals .ap-page-actions{display:flex;gap:8px;flex-wrap:wrap}
#annualProposals .ap-actions .btn,#annualProposals .ap-page-actions .btn{font-size:13px}
#annualProposals .ap-editor-meta{justify-content:flex-start;color:var(--ap-muted);font-size:12px;margin:16px 0;flex-wrap:wrap}
#annualProposals .ap-editor-meta .btn{margin-left:auto;padding:6px 10px;font-size:12px}
#annualProposals .ap-workspace{display:grid;grid-template-columns:176px minmax(0,1fr) 272px;border:1px solid var(--ap-border);background:var(--ap-paper);min-height:600px;border-radius:8px;overflow:hidden}
#annualProposals .ap-pages{padding:16px 12px;background:#f1f3ef;border-right:1px solid var(--ap-border);min-width:0;max-height:850px;overflow:auto}
#annualProposals .ap-pane-heading{margin-bottom:16px;gap:8px}
#annualProposals .ap-pane-heading h3{font-size:14px}
#annualProposals .ap-pane-heading .btn{font-size:11px;padding:6px}
#annualProposals .ap-thumb{display:block;width:100%;border:2px solid transparent;border-radius:6px;padding:5px;margin:0 0 12px;background:transparent;cursor:pointer;text-align:left;color:var(--ap-ink)}
#annualProposals .ap-thumb.is-selected{border-color:#183d3a;background:#e1e9e3}
#annualProposals .ap-thumb-label{display:flex;gap:8px;font-size:11px;line-height:1.5;margin-top:6px;min-width:0}
#annualProposals .ap-thumb-label span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#annualProposals .ap-scale-box{position:relative;display:block;width:100%;aspect-ratio:16/9;overflow:hidden;background:#F7F4EE;box-shadow:0 1px 4px #183d3a1a}
#annualProposals .ap-scale-box>.annual-slide{position:absolute;top:0;left:0;transform-origin:top left;pointer-events:none}
#annualProposals .ap-canvas-panel{padding:24px;min-width:0;background:#e8ebe7}
#annualProposals .ap-canvas-caption{font-size:12px;color:var(--ap-muted);margin-bottom:16px}
#annualProposals .ap-properties{padding:20px;border-left:1px solid var(--ap-border);min-width:0}
#annualProposals .ap-properties h3{font-size:15px;margin-bottom:20px}
#annualProposals [data-ap-fields]{display:grid;gap:16px}
#annualProposals .ap-help{margin-top:12px}
#annualProposals .ap-upload{border:1px dashed var(--ap-border);padding:12px;border-radius:6px}
#annualProposals .ap-upload input{padding:8px 0;border:0;font-size:11px}
#annualProposals .ap-upload .btn{margin-top:12px;font-size:12px}
#annualProposals .ap-page-actions{margin-top:16px;justify-content:center}
#annualProposals .ap-overflow{min-height:40px;color:#875000;font-size:13px;line-height:1.5;padding-top:12px}
#annualProposals .ap-conflict{padding:16px;border:1px solid #cba874;background:#fff9e9;border-radius:6px;line-height:1.6}
#annualProposals .ap-conflict p{margin-bottom:12px}
#annualProposals .ap-conflict button{margin:0 8px 8px 0}
#annualProposals .ap-dialog{width:min(1100px,calc(100vw - 32px));max-height:90vh;padding:24px;border:1px solid var(--ap-border);border-radius:8px;color:var(--ap-ink);background:#f2f3ef}
#annualProposals .ap-dialog::backdrop{background:#102c2480}
#annualProposals .ap-dialog [data-ap-dialog-content]>h2{font-size:20px;margin-bottom:20px}
#annualProposals .ap-dialog>[data-ap=close-dialog]{margin-top:20px}
#annualProposals .ap-preview-stack{display:grid;gap:24px}
#annualProposals .ap-history-row{padding:16px 0;border-bottom:1px solid var(--ap-border)}
@media(min-width:1500px){#annualProposals .ap-workspace{grid-template-columns:192px minmax(0,1fr) 304px}}
@media(max-width:1100px){#annualProposals .ap-workspace{grid-template-columns:136px minmax(0,1fr)}#annualProposals .ap-properties{grid-column:1/-1;border-left:0;border-top:1px solid var(--ap-border)}#annualProposals [data-ap-fields]{grid-template-columns:repeat(2,minmax(0,1fr))}#annualProposals .ap-canvas-panel{padding:16px}#annualProposals .ap-pages{padding:12px 8px}}
@media(max-width:600px){#annualProposals .ap-editor-head,#annualProposals .ap-title-group{display:grid;width:100%;min-width:0}#annualProposals .ap-title-group>button{justify-self:start}#annualProposals .ap-title-group label{max-width:none}#annualProposals .ap-actions{gap:6px}#annualProposals .ap-actions .btn{padding:8px;font-size:12px}#annualProposals .ap-search{flex-wrap:wrap;gap:12px}#annualProposals .ap-search label:first-child{flex-basis:100%;max-width:none}#annualProposals .ap-workspace{grid-template-columns:minmax(0,1fr)}#annualProposals .ap-pages{border-right:0;border-bottom:1px solid var(--ap-border);max-height:none}#annualProposals [data-ap-pages]{display:flex;gap:8px;overflow:auto}#annualProposals .ap-thumb{width:120px;flex:none;margin-bottom:8px}#annualProposals .ap-pane-heading{margin-bottom:8px}#annualProposals .ap-properties{grid-column:auto;padding:16px}#annualProposals [data-ap-fields]{grid-template-columns:minmax(0,1fr)}#annualProposals .ap-canvas-panel{padding:12px}#annualProposals .ap-list-row{align-items:flex-start}#annualProposals .ap-list-row button{padding:8px;font-size:12px}#annualProposals .ap-list-head{flex-wrap:wrap}#annualProposals .ap-dialog{padding:16px}}

/* Template pages retain their original geometry; these controls edit each element. */
#annualProposals .ap-page-kind{display:block;font-size:10px;line-height:1.5;color:var(--ap-muted);margin:4px 0 0 24px}
#annualProposals .ap-template-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:24px 0}
#annualProposals .ap-template-choice{display:grid;gap:10px;align-content:start;padding:12px;border:1px solid var(--ap-border);border-radius:6px;background:var(--ap-paper);color:var(--ap-ink);cursor:pointer;text-align:left;min-width:0;overflow:hidden}
#annualProposals .ap-template-choice>strong{font-size:15px;line-height:1.5;overflow-wrap:anywhere}
#annualProposals .ap-template-choice>span:not(.ap-scale-box){font-size:12px;color:var(--ap-muted);line-height:1.5}
#annualProposals .ap-template-choice:hover{border-color:#183d3a;background:#f2f5f1}
#annualProposals .ap-blank-choice{min-height:176px;place-content:center;text-align:center}
#annualProposals .ap-blank-choice>span[aria-hidden]{font-size:40px;color:#183d3a}
#annualProposals .ap-page-choices{grid-template-columns:repeat(3,minmax(0,1fr))}
#annualProposals .ap-fixed-notice,#annualProposals .ap-template-warning{padding:16px;background:#f1f3ef;border:1px solid var(--ap-border);border-radius:6px;line-height:1.7;font-size:13px}
#annualProposals .ap-fixed-notice>p{margin-top:8px}
#annualProposals .ap-properties{max-height:850px;overflow:auto;scroll-padding:20px}
#annualProposals .ap-element-field{scroll-margin:20px;min-width:0}
#annualProposals .ap-element-field:focus-within{outline:2px solid #bca36f;outline-offset:5px;border-radius:4px}
#annualProposals .ap-element-hint{margin:0 0 4px;grid-column:1/-1}
#annualProposals .ap-template-image{padding-top:12px;border-top:1px solid var(--ap-border)}
#annualProposals .ap-template-image-thumb{display:block;width:100%;max-height:140px;object-fit:contain;background:#f1f3ef;border:1px solid var(--ap-border);border-radius:4px}
#annualProposals .ap-template-image input{font-size:11px;padding:8px 0;border:0}
#annualProposals .ap-element-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
#annualProposals .ap-element-actions .btn{font-size:12px;padding:7px 9px}
#annualProposals .ap-image-empty{font-size:12px;font-weight:400;padding:16px;border:1px dashed var(--ap-border);text-align:center;color:var(--ap-muted)}
#annualProposals .ap-main-preview>.annual-slide{pointer-events:auto}
#annualProposals .ap-main-preview [data-annual-element]{cursor:pointer}
#annualProposals .ap-main-preview [data-annual-element]:hover{outline:3px dashed #bca36f;outline-offset:3px}
#annualProposals .ap-main-preview [data-annual-element].ap-element-selected{outline:4px solid #bca36f;outline-offset:3px}
@media(max-width:1100px){#annualProposals .ap-properties{max-height:620px}}
@media(max-width:600px){#annualProposals .ap-template-choices,#annualProposals .ap-page-choices{grid-template-columns:minmax(0,1fr)}#annualProposals .ap-properties{max-height:none;overflow:visible}}


/* /styles_delivery_stats.css */
.statistics-heading { margin-bottom: 16px; }
.statistics-heading h2 { margin: 0 0 6px; }
.statistics-heading p { margin: 0; }
.statistics-tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line, #d4dfd9); margin-bottom: 24px; padding-bottom: 12px; }
.statistics-tabs[hidden] { display: none !important; }
.statistics-tabs [aria-selected="true"] { color: #fff; background: var(--green, #124b3c); border-color: var(--green, #124b3c); }
#salesStatsPanel[hidden], #deliveryStatsPanel[hidden], .delivery-stats-details[hidden] { display: none !important; }
#deliveryStatsPanel { min-width: 0; }
.delivery-stats-controls { display: flex; align-items: end; flex-wrap: wrap; gap: 16px; }
.delivery-stats-controls label { display: grid; gap: 6px; min-width: 0; color: var(--muted, #5b6b64); font-size: 14px; font-weight: 600; }
.delivery-stats-controls input { min-height: 42px; max-width: 100%; min-width: 0; box-sizing: border-box; }
.delivery-stats-controls .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.delivery-stats-status { min-height: 22px; margin: 16px 0; }
.delivery-statistics-section, .delivery-stats-details { margin: 20px 0; border: 1px solid var(--line, #d4dfd9); border-radius: 12px; background: var(--surface, #fff); overflow: hidden; }
.delivery-statistics-section > header, .delivery-stats-details > header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--line, #d4dfd9); }
.delivery-statistics-section h3, .delivery-stats-details h3 { margin: 0; font-size: 19px; }
.delivery-statistics-section header p { margin: 6px 0 0; }
.delivery-stats-table-wrap { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.delivery-stats-table { border-collapse: collapse; width: 100%; text-align: left; font-variant-numeric: tabular-nums; }
.delivery-stats-table th, .delivery-stats-table td { padding: 16px 24px; vertical-align: middle; border-bottom: 1px solid var(--line, #d4dfd9); white-space: nowrap; }
.delivery-stats-table thead { background: var(--surface-2, #f3f6f3); color: var(--muted, #5b6b64); font-size: 13px; }
.delivery-stats-table tbody tr:last-child > * { border-bottom: 0; }
.delivery-stats-table small { display: block; font-size: 12px; font-weight: 400; color: var(--muted, #5b6b64); margin-top: 4px; }
.delivery-stat-quantity strong { display: block; font-size: 25px; line-height: 1.2; color: var(--green, #124b3c); }
.delivery-stat-quantity strong small { display: inline; font-size: 13px; }
.delivery-stat-quantity > span { display: block; margin-top: 6px; color: var(--muted, #5b6b64); font-size: 14px; }
.delivery-landing-grid { display: grid; grid-template-columns: 1fr 1fr; }
.delivery-landing-grid article { padding: 20px 24px; }
.delivery-landing-grid article + article { border-left: 1px solid var(--line, #d4dfd9); }
.delivery-landing-grid h4 { margin: 0 0 16px; font-size: 15px; }
.delivery-landing-grid .btn { margin-top: 16px; }
.delivery-completed-summary { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; padding: 20px 24px; }
.delivery-completed-summary p { margin: 0; font-size: 14px; color: var(--muted, #5b6b64); }
.delivery-completed-summary p span { margin: 0 8px; }
.delivery-statistics-section > p { margin: 0; padding: 16px 24px; border-top: 1px solid var(--line, #d4dfd9); }
.delivery-statistics-definitions { margin: 16px 0 24px; }
.delivery-statistics-definitions summary { cursor: pointer; font-size: 14px; font-weight: 600; }
.delivery-statistics-definitions p { margin: 12px 0; max-width: 85ch; }
.delivery-detail-table th:first-child { white-space: normal; min-width: 120px; max-width: 260px; overflow-wrap: anywhere; }
.delivery-stats-details > h3, .delivery-stats-details > p, .delivery-stats-details > button { margin: 20px 24px; }
.delivery-stats-pagination { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 16px 24px; border-top: 1px solid var(--line, #d4dfd9); font-size: 14px; }
@media (max-width: 720px) {
  .delivery-stats-controls label { flex: 1 1 140px; }
  .delivery-stats-controls .actions { width: 100%; }
  .delivery-stats-controls .actions .primary { margin-left: auto; }
  .delivery-statistics-section > header, .delivery-stats-details > header { padding: 16px; }
  .delivery-stats-table th, .delivery-stats-table td { padding: 12px 16px; }
  .delivery-landing-grid article { padding: 16px; }
  .delivery-stat-quantity strong { font-size: 23px; }
  .delivery-completed-summary { padding: 16px; gap: 16px; }
  .delivery-statistics-section > p { padding: 16px; }
  .delivery-stats-pagination { padding: 12px 16px; }
}


/* /styles_delivery_guides.css */
.delivery-guides{padding:24px}
.delivery-guides .guide-toolbar,.guide-dialog .guide-toolbar{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin-bottom:16px}
.delivery-guides label,.guide-dialog label{display:flex;flex-direction:column;gap:6px;font-size:14px}
.delivery-guides input,.guide-dialog input,.guide-dialog select,.guide-dialog textarea{max-width:100%;font:inherit}
.guide-table-wrap{overflow:auto;border:1px solid var(--line,#d9e3de);border-radius:10px}
.guide-table{width:100%;border-collapse:collapse;font-size:14px;min-width:720px}
.guide-table th,.guide-table td{padding:14px 12px;text-align:left;border-bottom:1px solid var(--line,#d9e3de);vertical-align:middle;white-space:normal}
.guide-table th{background:var(--soft,#edf3ef);font-weight:600}
.guide-state{display:block;font-size:12px;color:var(--muted,#66736c)}
.guide-dialog{width:min(900px,calc(100vw - 32px));max-height:90vh;overflow:auto;padding:24px;border:1px solid var(--line,#d9e3de);border-radius:12px;color:var(--ink,#173f35);background:var(--paper,#fff)}
.guide-dialog::backdrop{background:rgba(12,35,29,.4)}
.guide-dialog>header{display:flex;gap:16px;align-items:center;justify-content:space-between;margin-bottom:20px}
.guide-dialog h2{font-size:22px;margin:0}.guide-dialog h3{font-size:18px;margin:0 0 12px}
.guide-dialog [data-body]>form{display:grid;gap:14px}
.guide-dialog fieldset{border:1px solid var(--line,#d9e3de);padding:16px;border-radius:8px}
.guide-choices{display:flex;flex-wrap:wrap;gap:10px 20px;max-height:220px;overflow:auto}
.guide-choices label,.guide-review-images label{display:flex;flex-direction:row;align-items:center}
.guide-dialog input[type=checkbox]{width:18px;height:18px;min-height:0;flex:0 0 18px;margin:0}
.guide-review-images>div{width:140px}.guide-review-images label{gap:8px}
.guide-reviews{display:grid;gap:18px}.guide-review{display:grid;gap:12px;padding:18px;border:1px solid var(--line,#d9e3de);border-radius:10px}
.guide-review-images{display:flex;gap:12px;flex-wrap:wrap}.guide-review-images img{width:120px;height:100px;object-fit:contain;border:1px solid var(--line,#d9e3de);border-radius:6px}
.guide-upload{border:1px dashed var(--line,#a4b8ad);border-radius:8px;padding:14px}.guide-upload:focus{outline:2px solid var(--green,#174f40);outline-offset:2px}
.guide-dialog [data-status]:empty,.delivery-guides [data-status]:empty{display:none}
.guide-dialog .error,.delivery-guides .error{color:#a2342d}.guide-empty{padding:24px;background:var(--soft,#edf3ef)}
.guide-case-list{display:grid;gap:10px}.guide-case-list article{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px;border-bottom:1px solid var(--line,#d9e3de)}
@media(max-width:600px){.delivery-guides{padding:16px}.guide-dialog{padding:16px}.guide-dialog .guide-toolbar>.btn{flex:1}.guide-dialog h2{font-size:20px}.guide-dialog>header{align-items:start}.guide-review{padding:12px}.delivery-guides .guide-toolbar label{flex:1 1 160px}}


/* /styles_complaint_cases.css */
.complaint-toolbar,.complaint-card header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap}
#complaintCasesPanel [hidden]{display:none!important}
.complaint-filters,.complaint-fields,.complaint-source-search{display:flex;gap:12px;align-items:end;flex-wrap:wrap}
.complaint-filters label{display:flex;flex-direction:column;gap:6px;min-width:160px}
.complaint-filters label:has(input){flex:1}
.complaint-card{padding:20px;border:1px solid var(--border,#d9e2dd);border-radius:10px;margin:16px 0;background:var(--surface,#fff);overflow-wrap:anywhere}
.complaint-card h3{margin:4px 0 12px}.complaint-meta{font-size:13px;color:var(--muted,#63756f);margin:0 0 8px}
.complaint-summary{white-space:pre-wrap;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;line-height:1.7}
.complaint-dialog{width:min(780px,calc(100vw - 32px));max-height:90vh;box-sizing:border-box;overflow:auto;padding:24px;border:1px solid var(--border,#d9e2dd);border-radius:12px;color:var(--text,#163d34);background:var(--surface,#fff)}
.complaint-dialog::backdrop{background:#09271d66}.complaint-dialog>header{display:flex;justify-content:space-between;align-items:center;gap:12px}.complaint-dialog h2{margin:0}
.complaint-dialog form>label,.complaint-dialog fieldset>label,.complaint-dialog .complaint-fields>label,.complaint-dialog [data-source-controls]>label{display:flex;flex-direction:column;gap:6px;margin:14px 0}
.complaint-dialog input:not([type=checkbox]),.complaint-dialog select,.complaint-dialog textarea{width:100%;box-sizing:border-box;min-width:0}
.complaint-dialog .complaint-fields>label{flex:1;min-width:150px}.complaint-dialog textarea{resize:vertical;line-height:1.65}
.complaint-dialog fieldset{border:1px solid var(--border,#d9e2dd);border-radius:8px;margin:18px 0;padding:12px}
.complaint-source-search input{flex:1;min-width:140px!important}.complaint-dialog [hidden]{display:none!important}
.complaint-detail{line-height:1.8;overflow-wrap:anywhere}.complaint-detail dt{font-weight:700;margin-top:18px}.complaint-detail dd{margin:6px 0 0;white-space:pre-wrap}
.complaint-review{border-top:1px solid var(--border,#d9e2dd);margin-top:24px;padding-top:8px}.complaint-dialog label.complaint-check{display:flex;flex-direction:row;align-items:flex-start}.complaint-check input{margin-top:5px;flex:none}
.complaint-dialog [data-message]{white-space:pre-wrap;overflow-wrap:anywhere}.complaint-dialog details{margin-top:18px}
@media(max-width:600px){.complaint-dialog{padding:16px}.complaint-filters label{min-width:100%;width:100%}.complaint-card{padding:16px}.complaint-fields{gap:4px}.complaint-dialog .complaint-fields>label{min-width:100%}}


/* /styles_sales_pool.css */

#salesPoolPage {width:min(100%,var(--workspace-content-max,1680px));margin-inline:auto;padding:16px 20px 24px;box-sizing:border-box}
@media(max-width:720px){#salesPoolPage {padding:12px 12px calc(var(--workspace-mobile-nav-height,64px) + var(--offline-banner-space,0px) + env(safe-area-inset-bottom,0px) + 24px)}}
.sp-intro {display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1rem}
.sp-intro h2 {margin:0 0 .5rem;color:var(--ink,#153d34);font-size:1.4rem}
.sp-intro p {margin:0;color:var(--muted,#63746c)}
.sp-tabs {display:flex;gap:.75rem;margin:1rem 0;flex-wrap:wrap}
.sp-tabs button {flex:1;min-width:0;display:grid;grid-template-columns:1fr auto;gap:.35rem 1rem;text-align:left;border:1px solid var(--line,#d5dfd9);border-radius:.5rem;background:var(--paper,#fff);color:var(--ink,#153d34);padding:1rem;cursor:pointer;font:inherit}
.sp-tabs button[aria-pressed=true] {background:#e8f1eb;border-color:#164c3b;box-shadow:inset 0 -3px #164c3b}
.sp-tabs button:focus-visible {outline:3px solid #8aaea0;outline-offset:3px}
.sp-tabs strong {grid-row:span 2;font-size:1.6rem;align-self:center}.sp-tabs span {font-weight:700}.sp-tabs small {color:var(--muted,#63746c)}
.sp-role-hint {background:#fff2d9;color:#755018;padding:.75rem;border-radius:.4rem}
.sp-claim-block {display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}.sp-claim-block small {max-width:20rem;color:var(--muted,#63746c)}
.sp-claim-time {color:#164c3b;font-weight:600}.sp-row-head .sp-contact {margin:.15rem}
#spClaimStatusLabel[hidden],#spRoleHint[hidden] {display:none}
.sp-filters {display:flex;gap:.75rem;align-items:end;flex-wrap:wrap}.sp-filters label {display:grid;gap:.4rem;font-weight:600}.sp-search {flex:1;min-width:12rem}.sp-filters input,.sp-filters select {min-height:44px;width:100%}
.sp-row {border:1px solid var(--line,#d5dfd9);border-radius:.5rem;background:var(--paper,#fff);padding:1rem;margin:.75rem 0}
.sp-row-head,.sp-row-bottom {display:flex;align-items:center;justify-content:space-between;gap:.75rem;flex-wrap:wrap}.sp-row h3 {margin:0;font-size:1.15rem}.sp-row p {margin:.6rem 0;overflow-wrap:anywhere}.sp-row-bottom {border-top:1px solid var(--line,#d5dfd9);padding-top:.75rem}.sp-row-bottom>div {display:flex;gap:.5rem;flex-wrap:wrap}
.sp-contact {display:inline-block;padding:.3rem .65rem;border-radius:.3rem;background:#e8f1eb;color:#164c3b;font-size:.85rem;font-weight:650}.sp-contact.is-new {background:#fff2d9;color:#755018}
.sp-detail-grid {display:grid;grid-template-columns:1fr 1fr;gap:.75rem}.sp-detail-grid p {margin:0;overflow-wrap:anywhere}.sp-detail-grid span {display:block;color:#63746c;font-size:.85rem}.sp-dialog {width:min(720px,calc(100vw - 2rem));max-height:90dvh;box-sizing:border-box;border:1px solid #cddbd3;border-radius:.75rem;padding:1.25rem;color:#163c32}.sp-dialog::backdrop {background:#102d2466}.sp-dialog header {display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1rem}.sp-dialog h2 {margin:0;font-size:1.3rem}.sp-dialog textarea {width:100%;box-sizing:border-box;min-height:6rem;margin:.5rem 0}.sp-history {list-style:none;padding:0}.sp-history li {padding:.75rem 0;border-bottom:1px solid #dde5df;overflow-wrap:anywhere}.sp-history small {display:block;color:#65786d}.sp-history p {white-space:pre-wrap;margin:.3rem 0}.sp-empty {padding:2rem;text-align:center;background:#f3f6f2;border-radius:.5rem}
@media(max-width:600px){.sp-tabs button {gap:.35rem;padding:.75rem}.sp-tabs small {grid-column:1/-1}.sp-tabs strong {grid-row:auto;font-size:1.2rem}.sp-filters>label {flex:1 1 100%;min-width:0}.sp-detail-grid {grid-template-columns:1fr}.sp-row-bottom button {min-height:44px}.sp-intro {align-items:start}.sp-dialog {padding:1rem}.sp-intro h2 {font-size:1.2rem}}

.sp-contact.is-lost {background:#f3e6e1;color:#863d29}.sp-loss-note {color:#863d29}#spLostForm {border-top:1px solid var(--line,#d5dfd9);margin-top:1rem;padding-top:1rem}


/* /styles_refunds.css */
.refund-dialog{width:min(1040px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:92dvh;padding:24px;border:1px solid #c6d6cd;border-radius:16px;color:#203b30;background:#fafbf8;overflow:auto;box-sizing:border-box}.refund-dialog::backdrop{background:#142a2266}.refund-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.refund-dialog label,.refund-fields label{display:grid;gap:8px}.refund-dialog input:not([type=checkbox]),.refund-dialog select,.refund-dialog textarea,.refund-fields input,.refund-fields select{box-sizing:border-box;width:100%;min-width:0;padding:12px;border:1px solid #b6c8bd;border-radius:8px;background:white;font:inherit;color:inherit}.refund-comparison{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:20px 0}.refund-comparison section{min-width:0;padding:18px;border:1px solid #d8e2db;border-radius:12px;background:white}.refund-card{padding:18px;border:1px solid #d8e2db;border-radius:12px;margin:12px 0;background:white}.refund-card p,.refund-dialog p{white-space:pre-wrap;overflow-wrap:anywhere}.refund-images{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0}.refund-images img{width:100px;height:110px;object-fit:contain;border:1px solid #c6d6cd}.refund-actions{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0}.refund-owner-grid{display:flex;flex-wrap:wrap;gap:16px}.refund-owner-grid label{display:flex;align-items:center}.refund-review{border-top:1px solid #c6d6cd;padding-top:20px}.refund-upload{border:1px dashed #9eafa4;padding:14px;border-radius:10px}.refund-verdict{color:#875817}.refund-dialog [data-message]{min-height:24px;color:#84500c}.refund-dialog button:focus-visible,.refund-dialog [tabindex]:focus-visible{outline:3px solid #b88636;outline-offset:2px}@media(max-width:700px){.refund-fields,.refund-comparison{grid-template-columns:1fr}.refund-dialog{padding:16px}.refund-comparison{gap:12px}.refund-card{padding:14px}.refund-dialog .management-row{flex-wrap:wrap}}


/* /styles_overseas.css */
#overseasPage { --ov-green:#184b3d; color:var(--ink,#22382f); max-width:1280px; margin:0 auto; }
#overseasPage *, .ov-dialog * { box-sizing:border-box; }
@media(max-width:720px) { #overseasPage { padding-bottom:calc(var(--workspace-mobile-nav-height,64px) + 20px); } }
.ov-heading,.ov-actions,.ov-member,.ov-search { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.ov-heading h2 { margin:4px 0 12px; font-size:25px; }
.ov-eyebrow { font-size:11px; letter-spacing:.16em; color:#836b40; margin:0; }
.ov-muted { color:#66756d; font-size:13px; line-height:1.7; }
.ov-card { background:#fffefa; border:1px solid #dce3db; border-radius:12px; padding:24px; margin:18px 0; box-shadow:0 3px 14px #15382a04; }
.ov-card h3 { margin-top:0; }
#overseasPage label, .ov-dialog label { display:grid; gap:7px; font-weight:600; font-size:13px; color:#4b6257; }
#overseasPage input:not([type=checkbox]),#overseasPage select,#overseasPage textarea,.ov-dialog input:not([type=checkbox]),.ov-dialog textarea,.ov-dialog select { width:100%; padding:11px 12px; border:1px solid #c9d4cd; border-radius:7px; background:#fff; color:#233b30; font:inherit; font-size:15px; min-height:44px; }
#overseasPage input:focus,#overseasPage textarea:focus,.ov-dialog input:focus { outline:2px solid #4e8771; outline-offset:2px; }
#overseasPage textarea,.ov-dialog textarea { min-height:82px; resize:vertical; font-weight:400; line-height:1.7; }
.ov-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; margin-bottom:20px; }
.ov-search { align-items:end; justify-content:start; }.ov-search label { flex:1; max-width:400px; }
.ov-scenarios { border:0; padding:8px 0 18px; display:flex; flex-wrap:wrap; gap:10px; }.ov-scenarios legend { margin-bottom:12px; font-weight:600; }
#overseasPage .ov-scenarios label { display:flex; align-items:center; border:1px solid #d0dbd2; padding:10px 13px; border-radius:8px; gap:8px; cursor:pointer; }.ov-scenarios label:has(:checked) { background:#eaf2eb; border-color:#527b62; }
#overseasPage input[type=checkbox],.ov-dialog input[type=checkbox] { width:18px; height:18px; margin:0; accent-color:#184b3d; }
.ov-sticky { position:sticky; bottom:12px; z-index:5; background:#f3f6efee; border:1px solid #b9c9ba; backdrop-filter:blur(10px); padding:14px 18px; border-radius:10px; }.ov-sticky p { margin:0; }
.ov-tabs { display:flex; gap:6px; border-bottom:1px solid #d6dfd5; margin:24px 0; overflow-x:auto; }.ov-tabs button { background:none; border:0; border-bottom:3px solid transparent; border-radius:0; padding:12px 15px; white-space:nowrap; font-size:15px; color:#5e7064; cursor:pointer; }.ov-tabs [aria-pressed=true] { border-color:#184b3d; color:#184b3d; font-weight:700; }
.ov-day { padding:16px 0 24px; border-bottom:1px solid #e1e6dd; margin-bottom:14px; }.ov-day header { display:flex; gap:16px; align-items:start; margin-bottom:18px; }.ov-day-num { color:#917546; font:32px Georgia,serif; min-width:46px; }.ov-day h3 { margin:0; font-size:19px; }.ov-day header p { margin:6px 0; font-size:13px; color:#6a796f; }.ov-day-edit { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }.ov-lock { margin-left:auto; display:flex!important; align-items:center; white-space:nowrap; }
.ov-text { white-space:pre-wrap; line-height:1.8; }.ov-warning { background:#fff2d4; border-left:3px solid #bc9042; padding:12px; line-height:1.7; }.ov-budget-summary { padding:20px; background:#edf3ed; border-radius:8px; }.ov-budget-summary strong { font-size:25px; color:#184b3d; }
.ov-table-wrap { overflow:auto; }.ov-table-wrap table { border-collapse:collapse; width:100%; min-width:650px; text-align:left; font-size:14px; margin:20px 0; }.ov-table-wrap th,.ov-table-wrap td { padding:14px 12px; vertical-align:top; border-bottom:1px solid #dce3dc; }.ov-table-wrap th { background:#edf2ed; }
.ov-sight { padding:16px 0; border-bottom:1px solid #dce3dc; line-height:1.8; }.ov-checks { padding:15px 0; }.ov-checks li { margin:10px 0; }.ov-result a { color:#276e54; text-decoration:underline; overflow-wrap:anywhere; }.ov-empty { padding:40px 24px; text-align:center; color:#647266; }
.ov-proposal-list { display:grid; gap:12px; margin:20px 0; }.ov-proposal { width:100%; text-align:left; background:#fffefa; border:1px solid #d6ded5; border-radius:10px; padding:20px; cursor:pointer; }.ov-proposal strong { display:block; font-size:17px; color:#1c4b39; margin-bottom:8px; }.ov-proposal span { font-size:13px; color:#6a786c; }.ov-match { text-align:left; margin:10px 8px 0 0; }
.ov-dialog { width:min(1040px,94vw); max-height:88vh; border:1px solid #c5d2c7; border-radius:12px; padding:24px; color:#243e2e; }.ov-dialog::backdrop { background:#183b2a66; }.ov-dialog .ov-close { float:right; }.ov-dialog details { margin:16px 0; }.ov-config-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; border:1px solid #d3ded5; padding:15px; margin:14px 0; border-radius:8px; }.ov-dialog .ov-inline { display:flex; gap:8px; align-items:center; margin:18px 0; }
@media(max-width:700px) { .ov-grid,.ov-day-edit,.ov-config-row { grid-template-columns:1fr; }.ov-card { padding:18px 14px; }.ov-heading h2 { font-size:22px; }.ov-day header { flex-wrap:wrap; }.ov-lock { margin-left:0; }.ov-sticky { position:static; }.ov-sticky .btn { flex:1; }.ov-tabs button { padding:12px 8px; }.ov-dialog { padding:18px 12px; } }

.ov-client-edit { display:grid; gap:14px; }.ov-quote { padding:20px; border:1px solid #c6d3c6; border-radius:8px; margin-bottom:18px; line-height:1.7; }.ov-quote input { max-width:360px; }.ov-customer-total { padding:20px; background:#edf3ed; font-size:21px; }

.ov-current-needs{margin-bottom:1.5rem}.ov-current-needs textarea{min-height:8rem;resize:vertical}.ov-member-tags{display:flex;flex-wrap:wrap;gap:.5rem}.ov-member-tags>span{padding:.25rem .65rem;border:1px solid var(--line,#d7e2db);border-radius:.4rem;overflow-wrap:anywhere}

[data-ov-export-image] canvas{display:block;width:100%;height:auto;margin:20px 0;} [data-ov-export-pages] [aria-pressed="true"]{background:var(--green,#123f3a);color:#fff;}

.tl-filters{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.75rem;margin:.75rem 0}.tl-filters label{display:grid;gap:.4rem;font-size:.875rem}.tl-filters input,.tl-filters select{width:100%;min-width:0;min-height:44px;border:1px solid var(--line,#c9d4cd);border-radius:.4rem;padding:.5rem;background:var(--paper,#fff);color:inherit;font:inherit}.tl-filter-form{margin-bottom:1rem}.tl-filter-form>.btn{margin-right:.5rem}.tl-filters input:focus,.tl-filters select:focus{outline:2px solid var(--green,#123f3a);outline-offset:2px}@media(max-width:768px){.tl-filters{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:400px){.tl-filters{grid-template-columns:1fr}}

.ov-current-needs{padding-top:20px;border-top:1px solid #d7e2db;margin-top:20px}.ov-quote-suggestion{padding:16px;background:#edf4ef;border:1px solid #ceded3;border-radius:8px;margin:16px 0}.ov-quote-suggestion p{margin:8px 0}

.ov-cost-editor{margin-top:12px}.ov-cost-editor summary{cursor:pointer;font-weight:600;color:#174c3e}.ov-cost-editor .ov-grid{margin-top:12px;min-width:280px}.ov-cost-editor input{min-width:0}.ov-cost-editor .ov-muted{max-width:520px}

.ov-sales-message{padding:18px 20px;margin:14px 0;border:1px solid var(--border,#dce5df);border-radius:10px;background:#fcfcf9}.ov-sales-message header{display:flex;justify-content:space-between;gap:12px;align-items:center}.ov-sales-message p{max-width:48em;line-height:1.8}.ov-plan-reasons{padding-left:22px;line-height:1.9}


/* /styles_hotel_proposals.css */
/* Hotel inquiry workspace uses the existing green and ivory system palette. */
.hp-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.hp-inquiries{display:grid;gap:8px;margin-top:16px}
.hp-inquiry{display:flex;align-items:center;justify-content:space-between;gap:16px;text-align:left;padding:16px;border:1px solid var(--line);border-radius:var(--control-radius,8px);background:var(--panel,#fff);color:var(--ink);font:inherit;cursor:pointer}
.hp-inquiry span{font-size:13px;color:var(--muted);flex-shrink:0}
.hotel-proposals-page,.hotel-proposal-page-content{min-width:0;width:100%}
.hotel-proposal-page-content{border:1px solid var(--line);border-radius:var(--panel-radius,12px);background:var(--panel,#fff)}
.hp-dialog{width:100%;padding:0;border:0;color:var(--ink);background:var(--panel,#fff);box-sizing:border-box;overflow:visible}
.hp-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:24px;border-bottom:1px solid var(--line)}
.hp-heading>div{min-width:0}
.hp-heading h2{margin:4px 0 8px;font-size:22px;overflow-wrap:anywhere}
.hp-heading .small{margin:0}
.hp-heading>button{flex-shrink:0}
.hp-trip{padding:24px;border-bottom:1px solid var(--line);background:var(--surface,#f5f7f3)}
.hp-trip h3{margin:0 0 8px;font-size:17px}
.hp-trip>.small{margin:0 0 20px;line-height:1.7}
.hp-trip .hp-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.hp-trip .destination-picker{grid-column:1/-1}
.hp-workspace-message{padding:12px 16px;border:1px solid var(--line);border-radius:8px;background:var(--surface,#f5f7f3)}
.hp-price-basis,.hp-legacy-note{padding:12px 16px;border-radius:8px;background:var(--surface,#f5f7f3);line-height:1.7}
.hp-workspace{display:grid;grid-template-columns:224px minmax(0,1fr);min-height:440px}
.hp-sidebar{min-width:0;padding:20px 16px;border-right:1px solid var(--line);background:var(--surface,#f5f7f3)}
.hp-proposal-list{min-width:0;max-width:100%;display:grid;gap:8px;margin-top:16px}
.hp-proposal-tab{display:grid;gap:6px;width:100%;border:1px solid var(--line);border-radius:8px;background:var(--panel,#fff);padding:12px;text-align:left;font:inherit;color:var(--ink);overflow-wrap:anywhere;cursor:pointer}
.hp-proposal-tab span,.hp-proposal-tab small{font-size:12px;color:var(--muted)}
.hp-proposal-tab strong{font-size:14px;line-height:1.5}
.hp-proposal-tab.is-current{border-color:var(--primary,#124d3c);box-shadow:inset 3px 0 0 var(--primary,#124d3c)}
.hp-inquiry-note{margin-top:20px;font-size:13px}
.hp-inquiry-note p{white-space:pre-wrap;overflow-wrap:anywhere}
.hp-editor{min-width:0;padding:24px}
.hp-editor-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:20px}
.hp-editor h3{font-size:17px;margin:0 0 8px}
.hp-editor-head p{margin:0}
.hp-decision{display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px;padding:12px 0;margin-bottom:16px;background:var(--panel,#fff);border-bottom:1px solid var(--line)}
.hp-decision p,.hp-next-step p{margin:0;line-height:1.6}
.hp-decision .btn,.hp-next-step .btn{white-space:normal;text-align:left}
.hp-next-step{display:grid;justify-items:start;gap:12px;margin-top:20px}
.hp-handling{margin-top:24px;padding:16px;border:1px solid var(--line);border-radius:8px;background:var(--surface,#f5f7f3)}
.hp-handling>summary{font-weight:600;cursor:pointer;line-height:1.6}
.hp-handling>.small{margin:12px 0 16px;line-height:1.7}
.hp-message:empty{display:none}
.hp-local-message{padding:12px 16px;border-left:3px solid var(--primary,#124d3c);border-radius:4px;background:var(--surface,#f5f7f3);margin:12px 0}
.hp-local-message[data-tone="error"]{border-color:var(--danger,#a33535)}
.hp-local-message .btn{display:block;margin-top:8px}
.hp-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.hp-wide{grid-column:1/-1}
.hp-fields{padding:0;margin:0;border:0;min-width:0}
.hp-dialog .field{display:grid;gap:6px;margin:0;min-width:0}
.hp-dialog .field>span{font-size:13px;font-weight:600}
.hp-dialog .field small{color:var(--muted);font-size:12px;line-height:1.6}
.hp-dialog input,.hp-dialog select,.hp-dialog textarea{width:100%;min-width:0;box-sizing:border-box}
.hp-dialog textarea{min-height:112px;resize:vertical;line-height:1.65}
.hp-fields>.hp-actions{margin-top:20px}
.hp-photos,.hp-export{margin-top:24px;padding-top:24px;border-top:1px solid var(--line)}
.hp-upload{position:relative;overflow:hidden;display:inline-flex;align-items:center}
.hp-upload input{width:100%;height:100%;position:absolute;inset:0;opacity:0;cursor:pointer}
.hp-upload:focus-within{outline:2px solid var(--primary,#124d3c);outline-offset:2px}
.hp-upload:has(input:disabled){opacity:.5;cursor:not-allowed}
.hp-photo-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:16px}
.hp-photo-grid figure{margin:0;border:1px solid var(--line);border-radius:8px;overflow:hidden;background:var(--surface,#f5f7f3)}
.hp-photo-grid img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover}
.hp-photo-grid figcaption{padding:8px 8px 0;font-size:12px;font-weight:600}
.hp-photo-actions{display:flex;flex-wrap:wrap;gap:4px;padding:8px}
.hp-photo-actions .btn{font-size:12px;padding:6px 8px;min-height:32px}
.hp-empty{padding:24px;color:var(--muted);border:1px dashed var(--line);border-radius:8px;font-size:14px;line-height:1.7;grid-column:1/-1}
.hp-preview{margin-top:20px;min-height:72px;border:1px solid var(--line);background:var(--surface,#f5f7f3);padding:16px}
.hp-preview canvas{display:block;width:100%;height:auto;max-width:540px;margin:auto}
.hp-message{white-space:pre-wrap;line-height:1.7;overflow-wrap:anywhere;font-size:14px}
.hp-dialog [data-hp-recovery]{overflow-wrap:anywhere;font-size:14px}
.hp-dialog [data-hp-recovery] pre{white-space:pre-wrap;font:inherit;background:var(--surface,#f5f7f3);padding:12px;line-height:1.7}
#hotelInquiryForm,.hp-dialog> .hp-message,.hp-dialog> [data-hp-recovery]{margin:24px}
#hotelInquiryForm{display:grid;gap:20px}
#hotelInquiryForm>button{justify-self:start}
.hp-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.hp-source{margin:20px 0;padding:16px;border:1px solid var(--line);border-radius:8px}
.hp-source p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7}
.hp-source-fields{display:grid;gap:12px;margin:16px 0}
.hp-source-fields>div{display:grid;grid-template-columns:100px minmax(0,1fr);gap:12px;line-height:1.7}
.hp-source-fields dt{font-weight:600}.hp-source-fields dd{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}
.hp-source-photos{display:flex;gap:8px;flex-wrap:wrap}
.hp-source-photos a{display:block;width:128px}
.hp-source-photos img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:4px}
@media(max-width:720px){.hotel-proposals-page{padding-bottom:calc(var(--workspace-mobile-nav-height,64px) + 20px)}}
@media(max-width:900px){.hp-workspace{grid-template-columns:180px minmax(0,1fr)}.hp-editor{padding:20px}.hp-photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.hp-trip .hp-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.hp-heading{padding:16px}.hp-heading>div{min-width:0}
.hp-heading h2{font-size:20px}.hp-workspace{grid-template-columns:1fr}.hp-sidebar{border-right:0;border-bottom:1px solid var(--line);padding:16px}.hp-proposal-list{min-width:0;max-width:100%;display:flex;overflow-x:auto;padding-bottom:4px}.hp-proposal-tab{flex:0 0 200px}.hp-editor{padding:16px}.hp-editor-head{display:block}.hp-editor-head>.hp-actions{margin-top:12px}.hp-grid,.hp-trip .hp-grid{grid-template-columns:1fr}.hp-trip{padding:16px}.hp-inquiry{display:grid;gap:8px}.hp-photo-actions .btn{min-height:36px}.hp-preview{padding:8px}.hp-actions>.btn{white-space:normal}.hp-inquiry-note{margin-top:12px}.hp-decision>.btn,.hp-next-step>.btn{width:100%}.hp-handling{padding:12px}}

.hp-embedded{width:100%;max-height:none;border:0;border-radius:0;overflow:visible}
.hp-embedded>.mb-workflow,.hp-return{margin:16px 24px}
.mb-dialog .hp-fields{padding:0;margin:0;border:0}
.mb-dialog .hp-dialog .field{margin:0}
@media(max-width:600px){.hp-embedded{width:100%;max-height:none}.hp-embedded>.mb-workflow,.hp-return{margin:16px}}

.hp-proposal-tab .hp-option-price{color:var(--primary,#124d3c);font-size:16px;margin-top:4px}


/* /styles_outcome_reviews.css */
#outcomeReviewsPage{max-width:1200px;margin:auto;padding:24px;box-sizing:border-box}.outcome-card{margin:18px 0;padding:22px;background:var(--surface,#fff);border:1px solid var(--line,#d7dfd9);border-radius:10px;overflow-wrap:anywhere}.outcome-card header{display:flex;align-items:start;justify-content:space-between;gap:16px}.outcome-card h3{margin:0;font-size:20px}.outcome-card header p{color:var(--muted,#5e6c66);font-size:14px}.outcome-comparison{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin:18px 0}.outcome-comparison section+section{border-left:1px solid var(--line,#d7dfd9);padding-left:24px}.outcome-comparison h4{font-size:15px;margin:0 0 12px}.outcome-comparison p,.outcome-comparison dd,.outcome-history p{white-space:pre-wrap;overflow-wrap:anywhere}.outcome-comparison dt{font-weight:650;margin-top:12px}.outcome-comparison dd{margin:4px 0}.outcome-verdict{font-weight:650;color:var(--green,#174d3e)}.outcome-pending{color:var(--muted,#5e6c66)}:is(.outcome-dialog,.outcome-inline){width:min(1060px,94vw);max-height:92vh;overflow:auto;padding:24px;border:1px solid var(--line,#d7dfd9);border-radius:12px;box-sizing:border-box}:is(.outcome-dialog,.outcome-inline)::backdrop{background:#172b2566}:is(.outcome-dialog,.outcome-inline) form{border-top:1px solid var(--line,#d7dfd9);padding:18px 0}:is(.outcome-dialog,.outcome-inline) textarea{width:100%;box-sizing:border-box;resize:vertical}:is(.outcome-dialog,.outcome-inline) label{gap:8px}:is(.outcome-dialog,.outcome-inline) input[type=checkbox]{width:auto}.outcome-history{padding:16px;border-bottom:1px solid var(--line,#d7dfd9)}:is(.outcome-dialog,.outcome-inline) [data-message]{color:#864115;white-space:pre-wrap}:is(.outcome-dialog,.outcome-inline) .of-images img{width:110px;height:120px;object-fit:contain}:is(.outcome-dialog,.outcome-inline) [hidden],#outcomeReviewsPage [hidden]{display:none!important}@media(max-width:650px){#outcomeReviewsPage,:is(.outcome-dialog,.outcome-inline){padding:14px}.outcome-card{padding:16px}.outcome-comparison{grid-template-columns:1fr;gap:18px}.outcome-comparison section+section{padding-left:0;border-left:0;border-top:1px solid var(--line,#d7dfd9);padding-top:18px}.outcome-card header{display:block}:is(.outcome-dialog,.outcome-inline) input[type=file]{max-width:100%}}

.outcome-inline{width:100%;max-height:none;padding:0;border:0}.outcome-inline h2{font-size:18px}.outcome-inline form{margin:0}.outcome-inline [data-file-label]{font-size:14px;color:var(--muted)}


/* /styles_okr_feedback.css */

.of-section{margin-top:28px;padding-top:24px;border-top:1px solid var(--line)}.of-controls,.of-heading{display:flex;align-items:center;flex-wrap:wrap;gap:12px}.of-heading{justify-content:space-between}.of-controls{margin:16px 0}.of-controls label{display:grid;gap:6px}.of-list{display:grid;gap:16px}.of-card{padding:20px;border:1px solid var(--line);border-radius:10px;background:var(--surface,#fff);min-width:0}.of-card header{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.of-priority{font-weight:750;padding:3px 9px;background:#f0f3f1;border-radius:5px}.of-priority[data-priority=P0]{color:#922d29;background:#fbebe8}.of-priority[data-priority=P1]{color:#765019;background:#faf1dc}.of-problem,.of-note{white-space:pre-wrap;overflow-wrap:anywhere}.of-note{padding:12px;background:#f4f6f2;border-radius:6px}.of-images{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0}.of-images img{width:96px;height:96px;object-fit:cover;border:1px solid var(--line);border-radius:6px}.of-dialog{width:min(680px,92vw);max-height:90vh;box-sizing:border-box;overflow:auto;padding:24px;border:1px solid var(--line);border-radius:12px}.of-dialog::backdrop{background:#152d2570}.of-dialog label{display:grid;gap:6px;margin:16px 0}.of-dialog input,.of-dialog select,.of-dialog textarea{width:100%;min-width:0;box-sizing:border-box}.of-dialog textarea{resize:vertical;min-height:110px}.of-dialog footer{display:flex;gap:12px;flex-wrap:wrap;margin-top:20px}.of-dialog [role=alert]{color:#9b2929;white-space:pre-wrap;overflow-wrap:anywhere}.of-upload-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 12px;padding:10px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}.of-upload-row small{grid-column:1;grid-row:2}.of-upload-row button{grid-column:2;grid-row:1/3;align-self:center}#okrPage [hidden]{display:none!important}@media(max-width:650px){.of-dialog{padding:16px}.of-card{padding:14px}.of-controls>*{max-width:100%}.of-controls label{width:100%}}

.of-owners{border:1px solid var(--line);border-radius:8px;margin:16px 0;padding:12px}.of-owners label{display:flex;align-items:center;gap:10px;margin:8px 0}.of-owners input[type=checkbox]{width:18px;height:18px;flex:none}


/* /styles_management.css */
.management-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:space-between}.management-row h2,.management-row h3{margin:0}.management-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,360px),1fr));gap:16px}.okr-card,.collection-panel{border:1px solid var(--border,#dce2e3);border-radius:12px;padding:20px;background:var(--surface,#fff);min-width:0;overflow-wrap:anywhere}.okr-card progress{width:100%;accent-color:#236451}.okr-card h4{font-size:15px;margin:20px 0 10px}.okr-key{display:flex;align-items:flex-start;gap:10px;margin:12px 0;font-size:14px}.okr-key input{width:18px;height:18px;flex:none;margin-top:2px}.okr-key small{display:block;color:#63726f;margin-top:4px}.management-empty{padding:32px 0;color:#63726f}.okr-dialog{width:min(640px,90vw);max-height:85vh;overflow:auto;border:1px solid #dce2e3;border-radius:12px;padding:24px}.okr-dialog input,.okr-dialog textarea{box-sizing:border-box;width:100%}.okr-objective{border:1px solid #dce2e3;margin:16px 0;padding:16px;display:grid;gap:12px}.collection-panel{margin:16px 0}.collection-panel input,.collection-panel select,.collection-panel textarea{max-width:100%;box-sizing:border-box}.collection-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr));gap:12px;margin:16px 0}.collection-form .field{min-width:0}.collection-record{border-top:1px solid #dce2e3;padding:12px 0;display:flex;gap:14px}.collection-record img{width:70px;height:100px;object-fit:contain;border:1px solid #dce2e3}.collection-record p{margin:5px 0;font-size:13px}.collection-error{color:#9a3412}.collection-gate{border:1px solid #c79848;background:#fff9ec;padding:14px;border-radius:8px;margin:12px 0}.collection-full{max-width:85vw;max-height:75vh;object-fit:contain}#okrPage{padding:20px}#okrSummary{margin:16px 0}.collection-panel button{white-space:normal}dialog::backdrop{background:#10211f66}@media(max-width:600px){.okr-card,.collection-panel{padding:14px}#okrPage{padding:8px}.okr-dialog{padding:14px}.collection-record{gap:10px}}

.handoff-checklist {padding:16px;border:1px solid #d4ddd6;border-radius:10px;margin:16px 0;background:#f7faf7;}
.handoff-checklist ul {padding-left:20px;margin:10px 0;}
.handoff-gap {background:none;border:0;text-align:left;color:#795416;text-decoration:underline;cursor:pointer;padding:6px 2px;font:inherit;}
.handoff-gap:focus-visible {outline:2px solid #164f3d;outline-offset:2px;}
.collection-form {flex-wrap:wrap;}
.collection-form input {max-width:100%;}

.export-version {flex-basis:100%;margin:6px 0;}
.export-stale {color:#895b15;font-weight:600;}
/* Actual receipt date/account stay readable beside or below the proof image. */
.collection-record > div {min-width:0;flex:1;}
.collection-record > [data-image] {align-self:flex-start;}
.collection-form input,.collection-form select {min-width:0;width:100%;}
@media(max-width:480px){.collection-record{flex-direction:column;}.collection-record > div{width:100%;}}


/* /styles_payroll.css */
#payrollPage {padding:28px;max-width:1480px;margin:0 auto;min-width:0}
.payroll-controls {display:flex;gap:16px;align-items:end;flex-wrap:wrap;margin-bottom:16px}
.payroll-controls label {display:grid;gap:6px;min-width:160px}
.payroll-controls select,.payroll-controls input {width:100%;min-width:0;max-width:100%;box-sizing:border-box}
.payroll-total {padding:24px;margin:20px 0;border-top:4px solid var(--accent,#164e40)}
.payroll-total h3 {display:flex;gap:16px;align-items:baseline;flex-wrap:wrap;margin:12px 0}
.payroll-total h3 strong {font-size:32px;font-variant-numeric:tabular-nums}
.payroll-formula {line-height:1.9;overflow-wrap:anywhere}
.payroll-components {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:20px 0}
.payroll-components>div {border:1px solid var(--line,#ddd8cd);padding:16px;border-radius:8px}
.payroll-components strong {display:block;font-size:20px;margin-top:8px;font-variant-numeric:tabular-nums}
.payroll-rules,.payroll-okr {padding:16px;margin:16px 0;line-height:1.8}
.payroll-rules summary {cursor:pointer;font-weight:700}
.payroll-table-wrap {overflow-x:auto;border:1px solid var(--line,#ddd8cd);border-radius:8px}
.payroll-table-wrap table {width:100%;min-width:780px;border-collapse:collapse}
.payroll-table-wrap th,.payroll-table-wrap td {padding:16px;text-align:left;vertical-align:top;border-bottom:1px solid var(--line,#ddd8cd)}
.payroll-table-wrap th {background:var(--surface-soft,#f2f0e9)}
.payroll-table-wrap td strong,.payroll-table-wrap small,.payroll-okr small {display:block;margin-top:6px;overflow-wrap:anywhere}
.payroll-table-wrap td:first-child {max-width:220px}
.payroll-pagination {justify-content:flex-end;margin:16px 0}
.payroll-owner-check {display:inline-flex;gap:8px;align-items:center;margin:8px 20px 8px 0}
.payroll-owner-check input {width:20px;height:20px}
.delivery-feedback-card {border-bottom:1px solid var(--line,#ddd8cd);padding:16px 0}
.delivery-feedback-card img {max-width:160px;max-height:180px;object-fit:contain}
.delivery-feedback-card select,.delivery-feedback-card textarea,.delivery-feedback-card input {max-width:100%}
.delivery-feedback-actions {display:flex;gap:12px;flex-wrap:wrap;margin-top:12px}
@media(max-width:768px){.payroll-components {grid-template-columns:repeat(2,minmax(0,1fr))}.payroll-total {padding:16px}.payroll-total h3 strong {font-size:26px}.payroll-controls label {min-width:0;flex:1 1 180px}}

@media(max-width:768px){#payrollPage {padding:18px 12px}}

.group-payroll-basis {grid-column:1 / -1;min-width:0;padding:16px;border:1px solid var(--line,#ddd8cd);border-radius:8px}
.group-payroll-basis input,.group-payroll-basis select {min-width:0;max-width:100%}
.feedback-dispute-card{border-bottom:1px solid var(--line);padding:16px 0}.feedback-dispute-card img{max-width:140px;max-height:180px;object-fit:contain}.feedback-dispute-card p{overflow-wrap:anywhere}
.payroll-table-wrap td .btn{display:block;margin-top:8px;max-width:100%;white-space:normal}
@media(max-width:768px){.payroll-table-wrap{border:0;overflow:visible}.payroll-table-wrap table{min-width:0}.payroll-table-wrap thead{display:none}.payroll-table-wrap tbody,.payroll-table-wrap tr,.payroll-table-wrap td{display:block;max-width:none!important}.payroll-table-wrap tr{border:1px solid var(--line);border-radius:8px;padding:8px;margin-bottom:16px}.payroll-table-wrap td{padding:8px;border:0}.payroll-table-wrap td::before{content:attr(data-label);display:block;color:var(--muted);font-size:12px;margin-bottom:6px}}

.payroll-deductions fieldset{border:0;padding:0;margin:0;min-width:0}
.payroll-deductions .form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:14px}
.payroll-deductions label{display:grid;gap:6px;min-width:0}
@media(max-width:768px){.payroll-deductions .form-grid{grid-template-columns:1fr}}

.payroll-okr-total{padding:16px 0;border-top:1px solid var(--border,#dce2e3);line-height:1.8}.payroll-okr-total strong{font-variant-numeric:tabular-nums}.payroll-okr-total small{display:block;color:var(--muted,#63726f)}


/* /styles_customer_tags.css */
#dealCustomerTags { margin-top: 24px; border-top: 1px solid var(--line, #d9dedb); padding-top: 20px; }
.customer-tag-group { border: 0; border-top: 1px solid #e9e6de; margin: 18px 0 0; padding: 12px 0 0; min-width: 0; }
.customer-tag-group legend { font-size: 15px; font-weight: 700; padding: 0 12px 0 0; }
.customer-tag-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.customer-tag-choice { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; border: 1px solid #cbd5cf; border-radius: 8px; background: #fff; cursor: pointer; font-size: 14px; line-height: 1.5; max-width: 100%; box-sizing: border-box; }
.customer-tag-choice:has(input:checked) { background: #edf5f0; border-color: #175442; color: #143e30; }
.customer-tag-choice:focus-within { outline: 2px solid #aa8344; outline-offset: 2px; }
.customer-tag-choice input[type=checkbox] { width: 17px; height: 17px; flex: 0 0 17px; margin: 0; accent-color: #175442; }
.customer-tag-help { font-size: 13px; margin-top: 10px; color: #5f6a63; }
.customer-tag-help summary { cursor: pointer; padding: 6px 0; }
.customer-tag-help dt { font-weight: 700; margin-top: 8px; }
.customer-tag-help dd { margin: 4px 0 10px; line-height: 1.7; }
.customer-tag-error { color: #a83223; font-size: 14px; }
.customer-tag-summary .pill { display: inline-block; margin-top: 6px; white-space: normal; }


/* /styles_legacy_base.css */
    :root {
      --bg: #f4f0e8;
      --surface: #fffdf8;
      --ink: #1d2f27;
      --muted: #697469;
      --line: #ddd2c0;
      --green: #143d2a;
      --gold: #b89b64;
      --red: #a64032;
      --ok: #2f6f49;
      --soft: #ebe3d6;
      --shadow: 0 18px 42px rgba(35, 42, 34, 0.08);
    }

    * { box-sizing: border-box; }

    body {
      margin: 0;
      background: var(--bg);
      color: var(--ink);
      font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Songti SC", Arial, sans-serif;
    }

    button, input, textarea, select { font: inherit; }

    .hidden { display: none !important; }

    .login {
      min-height: 100vh;
      display: grid;
      place-items: center;
      padding: 24px;
    }

    .login-card {
      width: min(440px, 100%);
      padding: 30px;
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: 8px;
      box-shadow: var(--shadow);
    }

    .brand {
      font-family: Georgia, "Times New Roman", serif;
      font-size: 25px;
      font-weight: 800;
      margin-bottom: 6px;
    }

    .sub {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.6;
      margin-bottom: 22px;
      font-weight: 700;
    }

    .account-box {
      margin: -6px 0 18px;
      padding: 12px;
      border: 1px solid rgba(184, 155, 100, 0.36);
      border-radius: 8px;
      background: #fbf7ef;
      display: grid;
      gap: 8px;
    }

    .account-box h2 {
      margin: 0;
      font-size: 13px;
      line-height: 1.25;
    }

    .account-row {
      display: grid;
      grid-template-columns: 72px 1fr;
      gap: 8px;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.35;
      font-weight: 800;
    }

    .account-row code {
      color: var(--green);
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
      font-weight: 900;
    }

    .topbar {
      min-height: 68px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding: 14px 24px;
      border-bottom: 1px solid var(--line);
      background: rgba(244, 240, 232, 0.94);
      position: sticky;
      top: 0;
      z-index: 4;
    }

    .topbar h1 {
      margin: 0;
      font-family: Georgia, "Times New Roman", serif;
      font-size: 22px;
      line-height: 1;
    }

    .userbar {
      display: flex;
      gap: 10px;
      align-items: center;
      flex-wrap: wrap;
      justify-content: flex-end;
    }

    .workflow-nav {
      display: flex;
      gap: 10px;
      padding: 14px 24px;
      border-bottom: 1px solid var(--line);
      background: #fbf7ef;
      overflow: auto;
    }

    .workflow-tab {
      min-height: 40px;
      padding: 0 15px;
      border: 1px solid var(--line);
      background: var(--surface);
      color: var(--muted);
      border-radius: 6px;
      font-weight: 900;
      cursor: pointer;
      white-space: nowrap;
    }

    .workflow-tab.active {
      background: var(--green);
      border-color: var(--green);
      color: #fffaf0;
    }

    .workflow-tab.locked {
      opacity: 0.58;
      cursor: not-allowed;
    }

    .workflow-tab.locked:not(.active) {
      background: #f3eadc;
    }

    .btn:disabled {
      cursor: not-allowed;
      opacity: 0.58;
    }

    .pill {
      height: 30px;
      display: inline-flex;
      align-items: center;
      border-radius: 999px;
      padding: 0 10px;
      background: var(--soft);
      color: var(--green);
      font-size: 12px;
      font-weight: 900;
    }

    .pill.confirmed {
      background: rgba(47, 111, 73, 0.12);
      color: var(--ok);
    }

    .layout {
      display: grid;
      grid-template-columns: 360px minmax(0, 1fr);
      min-height: calc(100vh - 123px);
    }

    .layout.page-archive,
    .layout.page-admin {
      display: block;
      padding: 20px;
    }

    .layout.page-archive .sidebar,
    .layout.page-admin .sidebar {
      display: none;
    }

    .layout.page-archive .workspace,
    .layout.page-admin .workspace {
      max-width: 980px;
      margin: 0 auto;
      padding: 0;
    }

    .layout.page-archive .output-grid,
    .layout.page-admin .output-grid {
      display: block;
      margin-top: 0;
    }

    .layout.page-archive .side,
    .layout.page-admin .side {
      max-width: 980px;
      margin: 0 auto;
    }

    .sidebar {
      border-right: 1px solid var(--line);
      background: #f8f4ed;
      padding: 18px;
    }

    .workspace {
      padding: 20px;
      overflow: auto;
    }

    .grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }

    .field.full { grid-column: 1 / -1; }

    .section {
      border-top: 1px solid var(--line);
      padding-top: 18px;
      margin-top: 18px;
    }

    .section:first-child {
      border-top: 0;
      padding-top: 0;
      margin-top: 0;
    }

    .section-heading {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 8px;
    }

    .section-heading h2 {
      margin: 0;
      color: var(--green);
      font-size: 15px;
      line-height: 1.25;
    }

    .sop-workflow {
      padding: 14px;
      border: 1px solid rgba(184, 155, 100, 0.42);
      border-radius: 8px;
      background: #fffaf0;
    }

    .sop-workflow .field:last-child {
      margin-bottom: 0;
    }

    .sales-cockpit {
      margin-bottom: 16px;
      padding: 16px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--surface);
      box-shadow: var(--shadow);
    }

    .cockpit-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 14px;
      margin-bottom: 14px;
    }

    .cockpit-head h2 {
      margin: 0;
      font-size: 17px;
      line-height: 1.25;
    }

    .cockpit-head p {
      margin: 4px 0 0;
    }

    .cockpit-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 12px;
    }

    .cockpit-item {
      min-height: 118px;
      padding: 13px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #fbf7ef;
    }

    .cockpit-item span {
      display: block;
      color: var(--muted);
      font-size: 11px;
      line-height: 1.2;
      font-weight: 900;
      margin-bottom: 8px;
    }

    .cockpit-item strong {
      display: block;
      color: var(--green);
      font-size: 18px;
      line-height: 1.25;
      margin-bottom: 8px;
    }

    .cockpit-item p {
      margin: 0;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.48;
      font-weight: 800;
    }

    .sop-trace {
      display: grid;
      gap: 6px;
      margin: 12px 0 0;
      padding-left: 18px;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.45;
      font-weight: 800;
    }

    .cards {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 14px;
      margin-bottom: 16px;
    }

    .card {
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 16px;
      min-height: 132px;
      box-shadow: var(--shadow);
    }

    .card h2, .card h3 {
      margin: 0 0 10px;
      font-size: 15px;
      line-height: 1.2;
      display: flex;
      justify-content: space-between;
      gap: 10px;
    }

    .card ul {
      margin: 0;
      padding-left: 18px;
      display: grid;
      gap: 8px;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.45;
    }

    .warn { border-color: rgba(154, 107, 29, 0.42); }
    .bad { border-color: rgba(166, 64, 50, 0.45); }
    .good { border-color: rgba(47, 111, 73, 0.34); }

    .tabs {
      display: flex;
      gap: 8px;
      border-bottom: 1px solid var(--line);
      overflow: auto;
    }

    .tab {
      border: 0;
      background: transparent;
      color: var(--muted);
      min-height: 44px;
      padding: 0 12px;
      border-bottom: 3px solid transparent;
      cursor: pointer;
      font-weight: 900;
      white-space: nowrap;
    }

    .tab.active {
      color: var(--green);
      border-bottom-color: var(--gold);
    }

    .output-grid {
      display: grid;
      grid-template-columns: minmax(680px, 1fr) 320px;
      gap: 16px;
      margin-top: 16px;
      align-items: start;
    }

    .doc {
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: 8px;
      box-shadow: var(--shadow);
      overflow: hidden;
      min-height: calc(100vh - 310px);
      width: 100%;
      max-width: 1040px;
      justify-self: center;
    }

    .doc-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 16px 18px;
      border-bottom: 1px solid var(--line);
      background: #fbf7ef;
    }


/* /styles_legacy_workspace.css */

    .doc-head h2 {
      margin: 0;
      font-size: 17px;
      line-height: 1.25;
    }

    .doc-toolbar {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      flex-wrap: wrap;
    }

    .doc-actions {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }

    pre {
      margin: 0;
      white-space: pre-wrap;
      word-break: break-word;
      padding: 18px;
      font-family: "PingFang SC", Arial, sans-serif;
      font-size: 14px;
      line-height: 1.76;
      color: #26372f;
    }

    .output-editor {
      width: 100%;
      min-height: calc(100vh - 390px);
      border: 0;
      border-radius: 0;
      padding: 22px 24px;
      background: var(--surface);
      color: #26372f;
      font-size: 15px;
      line-height: 1.82;
      resize: vertical;
      box-shadow: none;
    }

    .sheet-output {
      padding: 18px;
      background: #f5efe4;
    }

    .sheet-composer {
      background: #f5efe4;
    }

    .composer-panel {
      padding: 18px;
      border-bottom: 1px solid var(--line);
      background: #fbf7ef;
    }

    .composer-panel h3 {
      margin: 0 0 8px;
      font-size: 16px;
      line-height: 1.3;
    }

    .composer-panel textarea {
      min-height: 340px;
      background: #fffdf8;
      font-size: 13px;
      line-height: 1.72;
    }

    .composer-note {
      margin: 0 0 12px;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.55;
      font-weight: 800;
    }

    .image-page {
      padding: 22px;
      min-height: calc(100vh - 123px);
    }

    .image-grid {
      display: grid;
      grid-template-columns: minmax(340px, 460px) 1fr;
      gap: 16px;
      align-items: start;
    }

    .image-doc {
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: 8px;
      box-shadow: var(--shadow);
      overflow: hidden;
      min-height: 620px;
    }

    .image-actions {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      align-items: center;
      margin-top: 12px;
    }

    .itinerary-sheet {
      max-width: 920px;
      margin: 0 auto;
      background: #fffdf8;
      border: 1px solid var(--line);
      color: var(--ink);
    }

    .sheet-hero {
      padding: 34px 34px 28px;
      background: #173d2d;
      color: #fffaf0;
    }

    .sheet-kicker {
      font-size: 12px;
      line-height: 1.4;
      letter-spacing: 0;
      font-weight: 900;
      color: rgba(255, 250, 240, 0.72);
      text-transform: uppercase;
      margin-bottom: 12px;
    }

    .sheet-title {
      margin: 0;
      font-family: Georgia, "Times New Roman", serif;
      font-size: 34px;
      line-height: 1.12;
      font-weight: 800;
    }

    .sheet-subtitle {
      margin: 12px 0 0;
      font-size: 15px;
      line-height: 1.7;
      color: rgba(255, 250, 240, 0.82);
      font-weight: 700;
    }

    .sheet-body {
      padding: 28px 34px 34px;
    }

    .sheet-meta {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 10px;
      margin-bottom: 24px;
    }

    .meta-item {
      min-height: 82px;
      border: 1px solid var(--line);
      background: #fbf7ef;
      padding: 12px;
    }

    .meta-item span {
      display: block;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.2;
      font-weight: 900;
      margin-bottom: 8px;
    }

    .meta-item strong {
      display: block;
      font-size: 14px;
      line-height: 1.45;
    }

    .sheet-section {
      border-top: 1px solid var(--line);
      padding-top: 24px;
      margin-top: 24px;
    }

    .sheet-section:first-child {
      border-top: 0;
      padding-top: 0;
      margin-top: 0;
    }

    .sheet-section h3 {
      margin: 0 0 14px;
      font-size: 19px;
      line-height: 1.3;
      font-family: Georgia, "Times New Roman", serif;
    }

    .hotel-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 12px;
    }

    .hotel-item {
      border: 1px solid var(--line);
      background: #fffaf0;
      padding: 14px;
      min-height: 120px;
    }

    .hotel-item .region {
      color: var(--gold);
      font-size: 12px;
      line-height: 1.3;
      font-weight: 900;
      margin-bottom: 7px;
    }

    .hotel-item h4 {
      margin: 0;
      font-size: 16px;
      line-height: 1.35;
    }

    .hotel-item p {
      margin: 8px 0 0;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.55;
      font-weight: 700;
    }

    .day-list {
      display: grid;
      gap: 12px;
    }

    .day-card {
      display: grid;
      grid-template-columns: 92px 1fr;
      gap: 16px;
      border: 1px solid var(--line);
      background: #fffaf0;
      padding: 14px;
    }

    .day-no {
      color: var(--green);
      font-weight: 900;
      font-size: 18px;
      line-height: 1.2;
    }

    .day-date {
      display: block;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.2;
      margin-top: 5px;
      font-weight: 800;
    }

    .day-main h4 {
      margin: 0 0 8px;
      font-size: 16px;
      line-height: 1.35;
    }

    .day-route {
      margin: 0;
      color: #26372f;
      font-size: 14px;
      line-height: 1.72;
      font-weight: 700;
    }

    .day-tags {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-top: 10px;
    }

    .day-tags span {
      border: 1px solid var(--line);
      background: #fbf7ef;
      padding: 6px 8px;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.2;
      font-weight: 900;
    }

    .sheet-note {
      margin: 16px 0 0;
      padding: 14px;
      border: 1px solid rgba(184, 155, 100, 0.38);
      background: #fbf7ef;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.7;
      font-weight: 800;
    }

    .sheet-footer {
      padding: 18px 34px;
      border-top: 1px solid var(--line);
      background: #fbf7ef;
      display: flex;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.45;
      font-weight: 900;
    }

    .final-sheet .sheet-body {
      display: grid;
      gap: 18px;
    }

    .final-block {
      border: 1px solid var(--line);
      background: #fffaf0;
      padding: 16px;
    }

    .final-block h3 {
      margin: 0 0 10px;
      font-size: 18px;
      line-height: 1.35;
      font-family: Georgia, "Times New Roman", serif;
    }

    .final-block p {
      margin: 0 0 7px;
      color: #26372f;
      font-size: 14px;
      line-height: 1.72;
      font-weight: 700;
    }

    .final-block p:last-child { margin-bottom: 0; }

    .raw-template-sheet {
      max-width: 760px;
      margin: 0 auto;
      padding: 34px;
      background: #f7f4ed;
      border: 1px solid rgba(221, 210, 192, 0.95);
      color: #173d2d;
      box-shadow: 0 18px 42px rgba(35, 42, 34, 0.08);
    }

    .template-top {
      display: flex;
      justify-content: space-between;
      gap: 20px;
      align-items: flex-start;
      border-bottom: 1px solid #d8cbb7;
      padding-bottom: 20px;
      margin-bottom: 28px;
    }

    .template-kicker,
    .template-date,
    .template-side-label,
    .template-hero-caption,
    .template-label,
    .template-table th,
    .template-footer {
      color: #8c897f;
      font-size: 10px;
      line-height: 1.3;
      font-weight: 900;
      letter-spacing: 0;
      text-transform: uppercase;
    }

    .template-brand {
      margin-top: 3px;
      color: #1f2f27;
      font-family: Georgia, "Times New Roman", serif;
      font-size: 22px;
      line-height: 1.1;
      font-weight: 900;
    }

    .template-date { text-align: right; }

    .template-eyebrow {
      margin: 0 0 12px;
      color: #b89b64;
      font-size: 11px;
      line-height: 1.3;
      font-weight: 900;
      text-transform: uppercase;
    }

    .template-title-row {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 18px;
      align-items: end;
      margin-bottom: 22px;
    }

    .template-title-row h1 {
      margin: 0;
      color: #173d2d;
      font-family: "Songti SC", "STSong", Georgia, serif;
      font-size: 30px;
      line-height: 1.18;
      font-weight: 900;
    }

    .template-side-label {
      color: #c2a675;
      font-family: Georgia, "Times New Roman", serif;
      font-size: 24px;
      font-style: italic;
      text-align: right;
      white-space: nowrap;
      text-transform: none;
    }

    .template-hero {
      position: relative;
      overflow: hidden;
      border-radius: 8px;
      margin-bottom: 42px;
      background: #16382d;
      aspect-ratio: 984 / 463;
    }


/* /styles_legacy_print.css */

    .template-hero img {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .template-details {
      position: relative;
      margin-bottom: 42px;
      padding: 26px 28px 28px;
      border-radius: 8px;
      background: #143d2a;
      color: #fffaf0;
    }

    .template-details-head {
      display: flex;
      justify-content: space-between;
      gap: 18px;
      align-items: center;
      padding-bottom: 16px;
      margin-bottom: 18px;
      border-bottom: 1px solid rgba(255, 250, 240, 0.16);
      font-weight: 900;
    }

    .template-badge {
      padding: 6px 10px;
      border-radius: 999px;
      background: #d2b876;
      color: #173d2d;
      font-size: 10px;
      line-height: 1;
      font-weight: 900;
      white-space: nowrap;
    }

    .template-details-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 18px 22px;
    }

    .template-detail {
      border-bottom: 1px solid rgba(255, 250, 240, 0.1);
      padding-bottom: 12px;
      min-height: 58px;
    }

    .template-label {
      display: block;
      color: rgba(255, 250, 240, 0.58);
      margin-bottom: 6px;
      text-transform: none;
    }

    .template-value {
      display: block;
      color: #fffaf0;
      font-size: 13px;
      line-height: 1.45;
      font-weight: 900;
    }

    .template-section-title {
      display: flex;
      justify-content: space-between;
      gap: 20px;
      align-items: end;
      margin: 0 0 18px;
      padding-bottom: 12px;
      border-bottom: 1px solid #d8cbb7;
    }

    .template-section-title h2 {
      margin: 0;
      color: #173d2d;
      font-family: "Songti SC", "STSong", Georgia, serif;
      font-size: 24px;
      line-height: 1.2;
      font-weight: 900;
    }

    .template-section-title h2::before {
      content: "";
      display: inline-block;
      width: 5px;
      height: 24px;
      margin-right: 10px;
      vertical-align: -5px;
      background: #173d2d;
    }

    .template-table-wrap {
      overflow-x: auto;
      margin-bottom: 18px;
      border: 1px solid #ded5c8;
      border-radius: 8px;
      background: #fffdf8;
    }

    .template-table {
      width: 100%;
      border-collapse: collapse;
      table-layout: fixed;
    }

    .template-table th {
      padding: 16px 14px;
      background: #143d2a;
      color: #fffaf0;
      text-align: left;
      text-transform: none;
    }

    .template-table td {
      padding: 18px 14px;
      border-top: 1px solid #ebe3d6;
      color: #26372f;
      font-size: 12px;
      line-height: 1.55;
      font-weight: 800;
      vertical-align: top;
      word-break: break-word;
    }

    .template-day {
      display: block;
      color: #173d2d;
      font-size: 20px;
      line-height: 1;
      font-weight: 900;
      margin-bottom: 8px;
    }

    .template-small-note {
      margin: 8px 0 38px;
      color: #8c897f;
      font-size: 11px;
      line-height: 1.55;
      text-align: right;
      font-weight: 800;
    }

    .template-notes {
      margin-bottom: 42px;
      padding: 22px;
      border: 1px solid #ded5c8;
      border-radius: 8px;
      background: #fffdf8;
    }

    .template-notes h3 {
      margin: 0 0 14px;
      color: #26372f;
      font-size: 14px;
      line-height: 1.3;
      font-weight: 900;
    }

    .template-notes ol {
      margin: 0;
      padding-left: 18px;
      color: #5f675d;
      font-size: 11px;
      line-height: 1.78;
      font-weight: 800;
    }

    .registry-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      margin-bottom: 12px;
      border: 1px solid #ded5c8;
      border-radius: 8px;
      overflow: hidden;
      background: #fffdf8;
    }

    .registry-cell {
      min-height: 62px;
      padding: 12px;
      border-right: 1px solid #ebe3d6;
      border-bottom: 1px solid #ebe3d6;
      color: #8c897f;
      font-size: 10px;
      line-height: 1.35;
      font-weight: 800;
    }

    .registry-cell strong {
      display: block;
      margin-top: 8px;
      color: #173d2d;
      font-size: 12px;
      line-height: 1.35;
      font-weight: 900;
    }

    .template-cta {
      display: grid;
      grid-template-columns: 1fr 86px;
      gap: 24px;
      align-items: center;
      margin: 42px 0 28px;
      padding: 28px;
      border: 1px solid #ded5c8;
      border-radius: 10px;
      background: #fffdf8;
    }

    .template-cta small {
      display: block;
      margin-bottom: 8px;
      color: #b89b64;
      font-size: 10px;
      line-height: 1.2;
      font-weight: 900;
      text-transform: uppercase;
    }

    .template-cta h2 {
      margin: 0 0 12px;
      color: #173d2d;
      font-family: "Songti SC", "STSong", Georgia, serif;
      font-size: 22px;
      line-height: 1.22;
      font-weight: 900;
    }

    .template-cta p {
      margin: 0;
      color: #5f675d;
      font-size: 12px;
      line-height: 1.7;
      font-weight: 800;
    }

    .template-qr {
      display: grid;
      place-items: center;
      width: 86px;
      height: 86px;
      background:
        linear-gradient(90deg, #173d2d 9px, transparent 9px) 0 0 / 18px 18px,
        linear-gradient(#173d2d 9px, transparent 9px) 0 0 / 18px 18px,
        #fffdf8;
      border: 8px solid #fff;
      box-shadow: 0 0 0 1px #ded5c8;
      color: #173d2d;
      font-size: 11px;
      font-weight: 900;
    }

    .template-footer {
      display: flex;
      justify-content: center;
      gap: 34px;
      padding-top: 14px;
      border-top: 1px solid #d8cbb7;
    }

    .side {
      display: grid;
      gap: 14px;
    }

    .qa-list, .feedback-list {
      display: grid;
      gap: 9px;
      margin: 0;
      padding: 0;
      list-style: none;
      font-size: 13px;
      line-height: 1.45;
    }

    .qa-list li, .feedback-list li {
      padding: 9px 10px;
      border-radius: 6px;
      background: rgba(47, 111, 73, 0.08);
      color: var(--ok);
      font-weight: 800;
    }

    .qa-list li.fail {
      background: rgba(166, 64, 50, 0.09);
      color: var(--red);
    }

    .feedback-list li {
      background: #f8f4ed;
      color: var(--ink);
      border: 1px solid var(--line);
    }

    .feedback-list button {
      width: 100%;
      border: 0;
      background: transparent;
      color: inherit;
      text-align: left;
      cursor: pointer;
      font: inherit;
      font-weight: 800;
      padding: 0;
    }

    .audit-list li {
      display: grid;
      gap: 4px;
      background: #f3f7f1;
      color: var(--ink);
    }

    .audit-list span {
      color: var(--muted);
      font-size: 12px;
    }

    .status-banner {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 10px 24px;
      border-bottom: 1px solid var(--line);
      background: #fbf7ef;
    }

    .status-banner.warning {
      background: #fff6e7;
      border-color: rgba(184, 155, 100, 0.55);
    }

    .quality-pill.ready {
      background: rgba(47, 111, 73, 0.12);
      color: var(--ok);
    }

    .quality-pill.review {
      background: rgba(184, 155, 100, 0.16);
      color: #8a641e;
    }

    .quality-pill.blocked {
      background: rgba(166, 64, 50, 0.12);
      color: var(--red);
    }

    .admin-detail {
      margin-top: 12px;
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #fbf7ef;
    }

    .admin-detail pre {
      max-height: 240px;
      overflow: auto;
      margin: 10px 0;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: var(--surface);
      font-size: 12px;
      line-height: 1.55;
    }

    .diff-box {
      margin: 10px 0 14px;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: #fbf7ef;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.55;
      font-weight: 800;
    }

    .gate-diagnosis {
      margin: 10px 18px 16px;
      padding: 10px 12px;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: #fbf7ef;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.55;
      font-weight: 800;
      white-space: pre-wrap;
    }

    .gate-diagnosis.warn {
      border-color: rgba(184, 155, 100, 0.48);
      background: #fff6e7;
      color: #7c5a1b;
    }

    .gate-diagnosis.bad {
      border-color: rgba(166, 64, 50, 0.38);
      background: rgba(166, 64, 50, 0.07);
      color: var(--red);
    }

    .small {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.6;
      font-weight: 700;
    }

    .actions {
      display: flex;
      gap: 10px;
      align-items: center;
      flex-wrap: wrap;
      margin-top: 12px;
    }

    .toast {
      position: fixed;
      right: 22px;
      bottom: 22px;
      background: var(--green);
      color: #fffaf0;
      border-radius: 8px;
      padding: 12px 14px;
      box-shadow: var(--shadow);
      font-size: 13px;
      font-weight: 900;
      opacity: 0;
      pointer-events: none;
      transition: opacity 160ms ease;
      z-index: 10;
    }

    .toast.show { opacity: 1; }

    @media (max-width: 1120px) {
      .layout, .cards, .output-grid, .image-grid, .guide-grid, .cockpit-grid { grid-template-columns: 1fr; }
      .sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
    }

    @media (max-width: 720px) {
      .topbar { align-items: flex-start; flex-direction: column; }
      .workflow-nav { padding: 12px 16px; }
      .grid { grid-template-columns: 1fr; }
      .sidebar, .workspace, .image-page { padding: 16px; }
      .doc-head { align-items: flex-start; flex-direction: column; }
      .doc-toolbar { justify-content: flex-start; }
      .cockpit-head { flex-direction: column; }
      .sheet-output { padding: 12px; }
      .composer-panel { padding: 14px; }
      .sheet-hero, .sheet-body, .sheet-footer { padding-left: 18px; padding-right: 18px; }
      .sheet-title { font-size: 28px; }
          .sheet-meta, .hotel-grid { grid-template-columns: 1fr; }
      .day-card { grid-template-columns: 1fr; }
      .raw-template-sheet { padding: 18px; }
      .template-top,
      .template-title-row,
      .template-section-title,
      .template-footer { display: block; }
      .template-date,
      .template-side-label { margin-top: 10px; text-align: left; }
      .template-title-row h1 { font-size: 24px; }
      .template-side-label { font-size: 20px; }
      .template-details-grid,
      .registry-grid,
      .template-cta { grid-template-columns: 1fr; }
      .template-qr { width: 76px; height: 76px; }
    }

    @media print {
      body { background: #fff; }
      .topbar, .sidebar, .cards, .tabs, .side, .doc-head { display: none !important; }
      .layout, .output-grid { display: block; min-height: auto; }
      .workspace, .sheet-output { padding: 0; }
      .doc { border: 0; box-shadow: none; min-height: auto; }
      .itinerary-sheet { border: 0; max-width: none; }
      .sheet-hero { background: #173d2d !important; color: #fffaf0 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    }


/* /styles_app.css */

/* /styles_app_shell.css */
/* 2026-06 redesign: operational sales workspace */
:root {
  --bg: #f6f7f3;
  --surface: #ffffff;
  --surface-2: #f9faf7;
  --surface-3: #eef3ee;
  --ink: #17211d;
  --muted: #68736d;
  --line: #dfe5dc;
  --line-strong: #c7d2ca;
  --green: #123d31;
  --green-2: #0f2f28;
  --gold: #b68a3a;
  --amber: #8a641e;
  --red: #a64032;
  --ok: #2f6f49;
  --soft: #edf3ee;
  --shadow: 0 18px 44px rgba(18, 45, 36, 0.08);
  --shadow-soft: 0 10px 26px rgba(21, 38, 30, 0.06);
}

html {
  min-width: 320px;
}

body {
  background:
    linear-gradient(180deg, rgba(18, 61, 49, 0.04), transparent 260px),
    var(--bg);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
  font-size: 14px;
}

.app-view {
  min-height: 100vh;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr);
}

.app-view.editor-focus-mode .app-shell {
  grid-template-columns: minmax(0, 1fr);
}

.app-view.editor-focus-mode .app-rail {
  display: none;
}

.app-rail {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  padding: 20px 16px;
  background: var(--green-2);
  color: #f7fbf5;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.rail-brand {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(246, 247, 243, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fffdf6;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 900;
}

.rail-title {
  font-size: 15px;
  line-height: 1.25;
  font-weight: 900;
}

.rail-subtitle {
  margin-top: 3px;
  color: rgba(247, 251, 245, 0.64);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
}

.workflow-nav {
  display: grid;
  gap: 8px;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow-y: auto;
  overscroll-behavior: contain;
  align-content: start;
}

.workflow-tab {
  min-height: 64px;
  width: 100%;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: rgba(247, 251, 245, 0.72);
  text-align: left;
}

.workflow-tab:hover:not(.locked),
.workflow-tab:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: #fffdf6;
}

.workflow-tab.active {
  background: #f7fbf5;
  border-color: #f7fbf5;
  color: var(--green);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
}

.workflow-tab.locked {
  opacity: 0.42;
}

.workflow-tab.locked:not(.active) {
  background: transparent;
}

.tab-index {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  color: inherit;
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
}

.workflow-tab.active .tab-index {
  background: var(--green);
  color: #fffdf6;
}

.tab-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.tab-copy strong {
  color: inherit;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.tab-copy small {
  color: currentColor;
  opacity: 0.68;
  font-size: 11px;
  line-height: 1.25;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.rail-footer {
  display: grid;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.rail-footer .pill {
  justify-content: center;
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  color: #f7fbf5;
}

.app-main {
  min-width: 0;
  max-width: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  min-height: 96px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  align-items: center;
  gap: 24px;
  padding: 20px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 247, 243, 0.92);
  backdrop-filter: blur(16px);
  min-width: 0;
}

.topbar h1 {
  margin: 3px 0 5px;
  color: var(--ink);
  font-family: inherit;
  font-size: 24px;
  line-height: 1.22;
  font-weight: 900;
}

.topbar.context-compact {
  min-height: 72px;
  grid-template-columns: minmax(320px, 520px);
  justify-content: end;
  padding-block: 14px;
}

.topbar.context-compact > div:first-child {
  display: none;
}

.page-kicker {
  color: var(--gold);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 900;
  text-transform: uppercase;
}

.topbar-actions {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.status-banner,
.draft-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.status-banner.warning {
  border-color: rgba(182, 138, 58, 0.38);
  background: #fffaf0;
}

.draft-banner {
  grid-template-columns: minmax(0, 1fr) auto auto;
  border-color: rgba(20, 61, 42, 0.24);
  background: #f2f7f1;
}

.layout {
  min-height: calc(100vh - 96px);
  display: grid;
  grid-template-columns: minmax(320px, 440px) minmax(0, 1fr);
  gap: 20px;
  padding: 20px;
  min-width: 0;
}

.layout.page-archive,
.layout.page-admin {
  display: block;
  padding: 22px;
}

.layout.page-archive .workspace,
.layout.page-admin .workspace {
  max-width: 1120px;
}

.layout.page-archive .side,
.layout.page-admin .side {
  max-width: 760px;
}

.sidebar {
  position: sticky;
  top: 116px;
  align-self: start;
  max-height: calc(100vh - 136px);
  overflow: auto;
  padding: 0;
  border: 0;
  background: transparent;
}

.workspace {
  min-width: 0;
  padding: 0;
  overflow: visible;
}

.section,
.sop-workflow,
.sales-cockpit,
.card,
.doc,
.image-doc,
.composer-panel,
.login-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.section {
  margin: 0 0 12px;
  padding: 16px;
  border-top: 1px solid var(--line);
}

.section:first-child {
  border-top: 1px solid var(--line);
}

.sop-workflow {
  background: var(--surface);
}

.section-heading {
  margin-bottom: 12px;
}

.section-heading h2,
.cockpit-head h2,
.card h2,
.card h3,
.doc-head h2,
.composer-panel h3 {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.28;
  font-weight: 900;
}


/* /styles_components.css */
/* Shared primitives. Product-specific layouts belong in their own stylesheets. */
:root { --space-1:4px; --space-2:8px; --space-3:12px; --space-4:16px; --space-5:24px; --space-6:32px; --control-radius:8px; --panel-radius:12px; }
.field {
  display: grid;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

label {
  color: #536058;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 850;
}

.field-label {
  color: #536058;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 850;
}

input,
textarea,
select {
  width: 100%;
  outline: none;
  min-height: 38px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--control-radius);
  background: #fbfcfa;
  color: var(--ink);
}

textarea {
  resize: vertical;
  min-height: 76px;
  line-height: 1.58;
}

input:hover,
textarea:hover,
select:hover {
  border-color: #b9c7bd;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(18, 61, 49, 0.12);
}

.grid {
  gap: 10px;
}

.btn {
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  min-height: 38px;
  padding: 0 var(--space-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--control-radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 1px 0 rgba(18, 33, 29, 0.03);
}

.btn:hover:not(:disabled) {
  border-color: var(--green);
  color: var(--green);
}

.btn.primary {
  background: var(--green);
  border-color: var(--green);
  color: #fffdf6;
}

.btn.primary:hover:not(:disabled) {
  background: #0c3127;
  color: #fffdf6;
}

.btn.danger {
  border-color: rgba(166, 64, 50, 0.32);
  color: var(--red);
}

.btn.compact {
  min-height: 34px;
  padding: 0 11px;
  font-size: 12px;
}

.pill {
  min-height: 28px;
  height: auto;
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--soft);
  color: var(--green);
  line-height: 1.25;
}

.pill.ready {
  background: #e8f5ec;
  color: #1f6b3a;
}

.pill.review {
  background: #fff7dc;
  color: #8a6200;
}

.pill.blocked {
  background: #fff0ed;
  color: var(--red);
}

.small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  font-weight: 700;
}

.btn:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline:2px solid var(--green); outline-offset:3px; }
.btn:disabled { opacity:.55; cursor:not-allowed; }
.kkm-panel { border:1px solid var(--line); border-radius:var(--panel-radius); background:var(--surface); }
.kkm-eyebrow { color:var(--muted); font-size:12px; font-weight:700; line-height:1.5; }
.kkm-notice { padding:var(--space-3) var(--space-4); background:#fff8e7; border-left:3px solid var(--gold); border-radius:var(--control-radius); color:var(--amber); }
.kkm-notice p { margin:var(--space-1) 0; }
dialog::backdrop { background:rgba(15,47,40,.35); }
@media (prefers-reduced-motion:reduce) { .btn { transition:none; } }

.closeout-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr));gap:10px}.closeout-grid .btn{display:flex;flex-direction:column;align-items:flex-start;text-align:left;white-space:normal;gap:6px}.closeout-grid span{font-size:13px;font-weight:400;line-height:1.6}

.btn.full { width: 100%; }

.detail-section-nav {position:sticky;top:0;z-index:8;display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px 12px;margin:12px 0;background:var(--surface);border:1px solid var(--line);border-radius:var(--control-radius);box-shadow:0 3px 12px #123d310d;}
[data-detail-section], [data-delivery-region] {scroll-margin-top:110px;}
.member-history-entry {margin:12px 0;}
.member-history-entry > summary {cursor:pointer;padding:12px;background:var(--soft);border-radius:8px;}
@media(max-width:680px){.detail-section-nav{flex-wrap:nowrap;overflow-x:auto}.detail-section-nav>*{flex-shrink:0}.detail-section-nav>strong{display:none}}

[aria-invalid="true"] {border-color:var(--red);box-shadow:0 0 0 2px #a6403215;}
.field-error {display:block;color:var(--red);font-size:12px;line-height:1.5;}
.field-error-summary {padding:12px;margin:8px 0;background:#fff2ef;border-left:3px solid var(--red);border-radius:6px;color:var(--red);}
.field-error-link {display:block;border:0;background:none;color:inherit;text-align:left;text-decoration:underline;cursor:pointer;padding:5px 0;font:inherit;}

[data-delivery-region="navigation"] {position:sticky;top:0;z-index:8;background:var(--surface);}
[data-delivery-region="navigation"] .detail-section-nav {position:static;}


/* /styles_app_customer.css */

.sales-cockpit {
  margin-bottom: 16px;
  padding: 18px;
}

.cockpit-head {
  margin-bottom: 16px;
}

.cockpit-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.cockpit-item {
  min-height: 132px;
  padding: 14px;
  border-color: var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.cockpit-item strong {
  color: var(--green);
  font-size: 18px;
}

.sop-trace {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface-3);
  list-style: none;
}

.cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.card {
  min-height: 0;
  padding: 16px;
}

.card ul {
  color: var(--muted);
  font-size: 13px;
}

.warn {
  border-left: 4px solid var(--gold);
}

.bad {
  border-left: 4px solid var(--red);
}

.good {
  border-left: 4px solid var(--ok);
}

.tabs {
  display: inline-flex;
  max-width: 100%;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
}

.tab {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
}

.tab.active {
  background: var(--surface);
  color: var(--green);
  border-bottom-color: transparent;
  box-shadow: 0 1px 5px rgba(18, 45, 36, 0.08);
}

.output-grid {
  grid-template-columns: minmax(520px, 1fr) minmax(300px, 360px);
  gap: 16px;
  margin-top: 14px;
}

.doc {
  max-width: none;
  min-height: calc(100vh - 300px);
  overflow: hidden;
}

.doc-head {
  padding: 14px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.doc-toolbar {
  gap: 7px;
}

.gate-diagnosis {
  margin: 12px 16px 0;
  border-radius: 8px;
  background: var(--surface-2);
}

pre {
  padding: 18px 20px;
  font-family: "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.72;
}

.output-editor {
  min-height: calc(100vh - 370px);
  padding: 20px;
  background: var(--surface);
  font-size: 14px;
}

.side {
  gap: 14px;
}

.admin-detail {
  border-radius: 8px;
  background: var(--surface-2);
}

.duplicate-note {
  display: block;
  margin-top: 6px;
  color: #8a5a20;
  font-size: 12px;
  font-weight: 800;
}

.customer-timeline-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 32px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 70px rgba(18, 45, 36, 0.22);
}

.customer-timeline-dialog::backdrop {
  background: rgba(20, 35, 30, 0.42);
}

.customer-timeline-dialog.customer-planning-dialog {
  padding: 20px;
  overflow: auto;
}

.customer-planning-dialog .section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.customer-planning-dialog h2 { margin: 0; overflow-wrap: anywhere; }
.customer-planning-dialog .mb-row { text-align: left; }

.ai-task-center [hidden], #financeExceptionsRoot [hidden] { display: none !important; }
.ai-task-center .section-heading { flex-wrap: wrap; }
.ai-task-center .kkm-panel { padding: 16px; margin: 12px 0; }
.ai-task-center h2 { margin-right: auto; }
#financeExceptionsRoot .kkm-panel { margin-block: 12px; padding: 16px; }
#financeExceptionsRoot input { max-width: 100%; }

.customer-timeline-head,
.customer-timeline-summary {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.customer-timeline-head,
.customer-timeline-item-head,
.customer-timeline-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.customer-timeline-head h2 {
  margin: 2px 0 0;
  font-size: 20px;
}

.customer-timeline-metrics {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.customer-timeline-list {
  max-height: min(620px, calc(100vh - 190px));
  padding: 8px 20px 20px;
  overflow-y: auto;
}

.customer-timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  padding: 14px 0;
}

.customer-timeline-item:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 28px;
  bottom: -4px;
  left: 6px;
  width: 2px;
  background: var(--line);
}

.customer-timeline-dot {
  position: relative;
  z-index: 1;
  width: 14px;
  height: 14px;
  margin-top: 3px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 1px var(--green);
}

.customer-timeline-content p {
  margin: 5px 0 0;
}

.customer-timeline-content .timeline-effect {
  margin-top: 7px;
  padding: 7px 9px;
  border-left: 3px solid #9db6a7;
  background: #f5f8f4;
}

.customer-timeline-content .timeline-effect.reopens {
  border-left-color: #a64032;
  background: #fff7f3;
  color: #7f2d24;
}

.customer-timeline-item-head {
  align-items: baseline;
}

.customer-timeline-item-head .small {
  text-align: right;
}

.customer-timeline-empty {
  padding: 28px 0;
  text-align: center;
}

@media (max-width: 640px) {
  .customer-timeline-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  .customer-timeline-head,
  .customer-timeline-summary,
  .customer-timeline-list {
    padding-right: 14px;
    padding-left: 14px;
  }

  .customer-timeline-item-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .customer-timeline-item-head .small {
    text-align: left;
  }
}

/* Shared rhythm for focused internal work: compact controls, readable facts. */
.customer-planning-dialog { line-height: 1.6; }
.customer-planning-dialog .section-heading { margin-bottom: 16px; }
.customer-planning-dialog .management-row { gap: 10px; flex-wrap: wrap; }
.customer-planning-dialog .mb-list { margin: 12px 0; }
.workspace-empty { padding: 28px 16px; text-align: center; border: 1px dashed var(--line); border-radius: 10px; }
.workspace-empty p { color: var(--muted); margin-bottom: 0; }
.exception-help, .expense-help { margin: 8px 0 14px; color: var(--muted); }
.exception-help summary, .expense-help summary { cursor: pointer; font-size: 13px; }
.exception-counts { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.exception-counts > span { background: var(--subtle, #f1f5f2); padding: 8px 12px; border-radius: 6px; font-size: 13px; }
.exception-counts strong { margin-left: 8px; font-variant-numeric: tabular-nums; }
.exception-table-scroll { max-height: 620px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.exception-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
.exception-table th { position: sticky; top: 0; z-index: 1; background: #edf4ef; }
.exception-table :is(td, th) { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.exception-table small { display: block; font-size: 12px; margin-top: 5px; color: var(--muted); }
.exception-table .exception-money { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.exception-flag { display: block; color: #934b29; font-weight: 600; }
.group-expenses-dialog .expense-save-bar { position: sticky; top: -1px; background: var(--surface, #fff); z-index: 3; padding: 12px 0; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); }
.group-expenses-dialog [data-payments] { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.group-expenses-dialog [data-payments] .kkm-panel { margin: 0; display: block; min-width: 0; padding: 16px; }
.group-expenses-dialog [data-payments] .group-fixed-expense-fields { display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 12px; }
.group-expenses-dialog [data-payments] .group-fixed-expense-note { grid-column: 1 / -1; }
.group-expenses-dialog [data-payments] h3 { margin: 0 0 12px; }
.group-expenses-dialog [data-payments] :is(input,textarea,select) { min-width: 0; width: 100%; box-sizing: border-box; }
.group-expenses-dialog .group-expense-actions { margin-top: 12px; }
.group-expenses-dialog [data-summary] p { margin-bottom: 8px; }
.group-expenses-dialog [data-save-result] { border-left: 3px solid #a34528; padding-left: 10px; }
@media(max-width:760px) {
  .group-expenses-dialog [data-payments] { grid-template-columns: 1fr; }
  .exception-table-scroll { border: 0; max-height: none; }
  .exception-table, .exception-table tbody { display: block; }
  .exception-table thead { display: none; }
  .exception-table tr { display: block; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 12px; padding: 12px; }
  .exception-table td { display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 8px; padding: 8px 0; border: 0; overflow-wrap: anywhere; }
  .exception-table td::before { content: attr(data-label); font-size: 12px; color: var(--muted); text-align: left; }
  .exception-table td small { grid-column: 2; margin-top: 0; }
  .exception-table td .btn { justify-self: start; }
  .exception-table .exception-money { text-align: left; }
  .ai-task-center.customer-planning-dialog { padding: 14px; }
}

/* Keep the existing mobile cards; align editable totals on larger workstations. */
@media (min-width: 960px) {
  .group-expenses-dialog [data-payments] { display:block; }
  .group-expenses-dialog [data-payments] .group-fixed-expense { display:grid; grid-template-columns:minmax(120px,1fr) 90px 130px minmax(150px,1.5fr) auto; border-radius:0; margin:0; border-width:0 0 1px; padding:12px 8px; }
  .group-expenses-dialog [data-payments] .group-fixed-expense-fields { display:contents; }
  .group-expenses-dialog [data-payments] .group-fixed-expense-note { grid-column:auto; }
}
.group-expenses-dialog .expense-paste { padding:12px 0; }
.group-expenses-dialog [data-paste-preview] { overflow-wrap:anywhere; }
.group-expenses-dialog [data-conflict], .group-expenses-dialog [data-save-result] { grid-column:1 / -1; }

.ai-task-center [data-task-rows] { overflow-wrap:anywhere; }
.ai-task-center select { max-width:100%; }


/* /styles_app_image_guide.css */
.image-page {
  min-height: calc(100vh - 96px);
  padding: 20px;
  min-width: 0;
  overflow-x: hidden;
}

.deal-editor-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.deal-editor-grid input[readonly] {
  background: #f3f5f2;
  color: #3f4d47;
}

#imagePage .image-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  min-width: 0;
}

.image-page.editor-focus-mode {
  padding: 12px;
}

.image-page.editor-focus-mode .image-grid {
  grid-template-columns: minmax(0, 1fr);
}

.image-page.editor-focus-mode .image-doc {
  display: none;
}

.guide-page.editor-focus-mode {
  padding: 12px;
}

.guide-page.editor-focus-mode .guide-grid {
  grid-template-columns: minmax(0, 1fr);
}

.guide-page.editor-focus-mode .image-doc {
  display: none;
}

.editor-mode-actions {
  display: flex;
  justify-content: flex-end;
  margin: 12px 0 14px;
}

.guide-page {
  min-height: calc(100vh - 96px);
  padding: 20px;
  min-width: 0;
  overflow: visible;
}

.guide-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(360px, 0.58fr);
  gap: 20px;
  align-items: start;
  min-width: 0;
}

.guide-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 16px;
}

.guide-page-head h3 {
  margin: 2px 0 6px;
  color: var(--green);
  font-size: 22px;
}

.guide-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.danger-pill {
  border-color: rgba(167, 48, 39, 0.32);
  background: #fff0ed;
  color: #a73027;
}

.warning-pill {
  border-color: rgba(138, 90, 32, 0.34);
  background: #fff7e8;
  color: #8a5a20;
}

.priority-pill {
  border-color: rgba(20, 61, 42, 0.22);
  background: #eef7f1;
  color: var(--green);
}

.guide-source-card {
  position: sticky;
  top: 112px;
  z-index: 20;
  isolation: isolate;
  background: #fffdf8;
  box-shadow: 0 10px 20px rgba(33, 42, 31, 0.08);
}

.guide-source-card:not(.is-expanded) {
  padding-bottom: 12px;
}

.guide-source-card:not(.is-expanded) .compact-heading {
  margin-bottom: 8px;
}

.guide-source-card:not(.is-expanded) .guide-source-help,
.guide-source-card:not(.is-expanded) .guide-source-meta {
  display: none;
}

.guide-source-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.guide-source-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.guide-source-meta span {
  min-height: 26px;
  padding: 5px 9px;
  border: 1px solid rgba(20, 61, 42, 0.12);
  border-radius: 999px;
  background: #f4f0e8;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.guide-source-table-wrap {
  max-height: 176px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf0;
}

.guide-source-card.is-expanded .guide-source-table-wrap {
  max-height: min(420px, calc(100vh - 240px));
}

.guide-source-table {
  width: 100%;
  min-width: 940px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
}

.guide-source-table th,
.guide-source-table td {
  padding: 10px;
  border-bottom: 1px solid rgba(20, 61, 42, 0.1);
  vertical-align: top;
  text-align: left;
  line-height: 1.55;
}

.guide-source-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f4f0e8;
  color: var(--green);
  font-size: 12px;
}

.guide-source-table th span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.guide-source-table td:first-child {
  width: 86px;
  color: var(--green);
  font-weight: 900;
}

.guide-source-table th:nth-child(1) { width: 86px; }
.guide-source-table th:nth-child(2) { width: 34%; }
.guide-source-table th:nth-child(3) { width: 17%; }
.guide-source-table th:nth-child(4) { width: 230px; }
.guide-source-table th:nth-child(5) { width: 17%; }

.guide-source-price-editor {
  display: grid;
  grid-template-columns: 88px minmax(110px, 1fr);
  gap: 6px;
  align-items: center;
}

.guide-source-price-editor select,
.guide-source-price-editor input {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 7px 8px;
  font-size: 12px;
}

.guide-source-no-price {
  color: var(--muted);
}

#caseLockStatus.warn {
  color: #9a6b1d;
  font-weight: 900;
}

.guest-paste-panel {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.guest-paste-panel > label {
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.guest-paste-panel textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
}

.guest-paste-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.guest-paste-actions .small {
  margin-left: auto;
}

.pricing-process-card textarea {
  min-height: 128px;
}

.guide-flight-grid {
  margin-top: 14px;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}

.guide-guests-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  background: #f7f7f7;
}

.editable-trip-table.guide-guests-table {
  min-width: 2700px;
}

.editable-trip-table.guide-guests-table th {
  font-size: 12px;
  line-height: 1.2;
  padding: 8px 6px;
}

.guide-guests-card .editable-trip-table.guide-guests-table td textarea {
  height: 58px;
  min-height: 58px;
  font-size: 13px;
  line-height: 1.42;
  padding: 8px;
}

.editable-trip-table.guide-guests-table th:nth-child(1) { width: 130px; }
.editable-trip-table.guide-guests-table th:nth-child(2) { width: 160px; }
.editable-trip-table.guide-guests-table th:nth-child(3) { width: 80px; }
.editable-trip-table.guide-guests-table th:nth-child(4) { width: 145px; }
.editable-trip-table.guide-guests-table th:nth-child(5) { width: 115px; }
.editable-trip-table.guide-guests-table th:nth-child(6) { width: 125px; }
.editable-trip-table.guide-guests-table th:nth-child(7) { width: 145px; }
.editable-trip-table.guide-guests-table th:nth-child(8) { width: 105px; }
.editable-trip-table.guide-guests-table th:nth-child(9) { width: 135px; }
.editable-trip-table.guide-guests-table th:nth-child(10) { width: 85px; }
.editable-trip-table.guide-guests-table th:nth-child(11) { width: 130px; }
.editable-trip-table.guide-guests-table th:nth-child(12) { width: 240px; }
.editable-trip-table.guide-guests-table th:nth-child(13) { width: 170px; }
.editable-trip-table.guide-guests-table th:nth-child(14) { width: 140px; }
.editable-trip-table.guide-guests-table th:nth-child(15),
.editable-trip-table.guide-guests-table th:nth-child(16) { width: 200px; }
.editable-trip-table.guide-guests-table th:nth-child(17) { width: 160px; }
.editable-trip-table.guide-guests-table th:last-child { width: 110px; }

.editable-trip-table.guide-guests-table td:last-child {
  padding: 8px;
  vertical-align: middle;
}

@media (max-width: 620px) {
  .guest-paste-actions .btn,
  .guest-paste-actions .small {
    width: 100%;
    margin-left: 0;
  }
}

.composer-panel {
  position: static;
  top: auto;
  min-width: 0;
  border-bottom: 1px solid var(--line);
}

.composer-panel textarea {
  min-height: 360px;
  background: var(--surface-2);
}

.image-doc {
  overflow: hidden;
}

.sheet-output {
  background: #e9eee8;
}

.table-editor-card {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 16px;
  margin-bottom: 16px;
}

.customer-lookup-card {
  background: #fbf7ef;
}

.image-customer-search {
  grid-template-columns: minmax(240px, 1fr) auto;
  align-items: center;
}

.guide-lookup-card {
  background: #fbf7ef;
}

.guide-customer-search {
  grid-template-columns: minmax(240px, 1fr) auto;
  align-items: center;
}

.image-customer-list {
  max-height: 220px;
  overflow: auto;
  margin-top: 10px;
}

.image-customer-list li {
  background: var(--surface);
}

.template-insert-card,
.template-manager-card {
  background: #f7fbf7;
}

.template-insert-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.1fr) minmax(220px, 0.9fr) auto;
  gap: 12px;
  align-items: end;
}

.template-insert-grid select,
.template-insert-grid input,
.template-manager-form select,
.template-manager-form input {
  min-height: 46px;
  background: #fffdf8;
  font-weight: 800;
}

.template-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.template-status {
  margin: 10px 0 0;
}

.template-page {
  min-height: calc(100vh - 96px);
  padding: 20px;
}

.editor-save-status { margin: 0 0 12px; padding: 10px 14px; border-left: 3px solid var(--green); background: #f3f5f2; color: var(--green); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.editor-save-status[data-state="error"], .editor-save-status[data-state="pending"] { color: #8a3828; border-color: #a73027; background: #fff0ed; }
.editor-save-status[data-state="dirty"] { color: #70551f; border-color: #ab8442; background: #fff7e8; }

.receipt-upload-list { display: grid; gap: 8px; }
.receipt-upload-item { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--line); flex-wrap: wrap; }
.receipt-upload-item img { width: 56px; height: 56px; object-fit: contain; }
.receipt-upload-item span { flex: 1; min-width: 120px; overflow-wrap: anywhere; font-size: 13px; }
.receipt-upload-item progress { width: 100px; accent-color: var(--green); }

/* Preview panels can be narrow even on a desktop. These rules never affect canvas exports. */
.image-doc { container-type: inline-size; }
@container (max-width: 500px) {
  .sheet-output .raw-template-sheet { padding: 20px; }
  .sheet-output .template-title-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .sheet-output .template-title-row h1 { font-size: 26px; }
  .sheet-output .template-side-label { text-align: left; font-size: 20px; }
  .sheet-output .template-details-head { flex-wrap: wrap; gap: 12px; }
}

/* Independent privileges card, matching editable Figma source 4:7. */
.benefits-sheet { margin-top:48px; padding:64px; background:#f7f4ed; color:#173d2d; font-size:28px; }
.benefits-brand { font:600 76px/1.5 Georgia,serif; }
.benefits-rule { border-top:1px solid #d8cbb7; margin:48px 0; }
.benefits-eyebrow { color:#b89b64; font-size:24px; }
.benefits-sheet h1 { font:600 58px/1.5 "Songti SC",serif; margin:12px 0; }
.benefits-subtitle { color:#536257; font-size:27px; margin-bottom:48px; }
.benefits-sheet ol { padding:0; margin:0; list-style:none; }
.benefits-sheet li { padding:32px 0; border-bottom:1px solid #d8cbb7; }
.benefits-sheet li:last-child { border:0; }
.benefits-sheet li span { display:block; color:#b89b64; font:600 30px/1.5 Georgia,serif; margin-bottom:16px; }
.benefits-sheet li div { font-size:36px; line-height:1.5; white-space:pre-wrap; overflow-wrap:anywhere; }
.benefits-sheet footer { margin-top:48px; border-top:1px solid #d8cbb7; padding-top:48px; font-size:24px; line-height:1.6; color:#536257; }
.customer-export-files { display:flex; gap:12px; flex-wrap:wrap; margin-top:12px; }
@media(max-width:700px) { .sheet-output .benefits-sheet { padding:24px; } .sheet-output .benefits-sheet h1 { font-size:30px; } .sheet-output .benefits-sheet li div { font-size:22px; } .sheet-output .benefits-brand { font-size:52px; } }


/* /styles_app_delivery.css */
.delivery-handoff-card {
  background: #f7faf6;
}

.delivery-benefits-entry {
  display: grid;
  gap: 7px;
  margin: 0 0 12px;
}

.delivery-benefits-entry textarea {
  min-height: 112px;
  resize: vertical;
  background: var(--surface);
}

.delivery-benefits-entry small {
  color: var(--muted);
  line-height: 1.5;
}

.delivery-handoff-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}

.delivery-handoff-controls .field {
  margin: 0;
  min-width: 0;
  flex: 1 1 320px;
}

.delivery-handoff-controls > .btn {
  max-width: 100%;
  white-space: normal;
}

.delivery-assignee-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 42px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.delivery-assignee-option {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.delivery-assignee-option input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.delivery-page {
  min-width: 0;
  min-height: calc(100vh - 96px);
  max-width: 100%;
  padding: 20px;
  overflow-x: hidden;
}

.delivery-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.delivery-page-head h2,
.delivery-detail-header h2 {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 24px;
  line-height: 1.2;
  font-weight: 900;
}

.delivery-filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.delivery-filter-bar input {
  width: min(280px, 100%);
}

.delivery-filter-bar select {
  min-width: 150px;
}

.delivery-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.delivery-summary-grid > div {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.delivery-summary-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
  font-weight: 800;
}

.delivery-summary-grid strong {
  display: block;
  margin-top: 6px;
  color: var(--green);
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
}

.delivery-workbench {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
  align-items: start;
}

.delivery-case-pane {
  position: sticky;
  top: 116px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  max-height: calc(100vh - 136px);
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.delivery-case-pane .section-heading {
  margin-bottom: 8px;
}

.delivery-case-list {
  min-height: 160px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.delivery-list-controls { margin-bottom: 8px; }
.delivery-list-progress { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.delivery-list-controls [role="alert"] { margin: 8px 0 0; color: var(--danger, #9f3128); overflow-wrap: anywhere; }
.delivery-case-year { margin: 0; padding: 10px 9px 6px; color: var(--green); font-size: 14px; font-weight: 800; border-top: 1px solid var(--line); }

.delivery-case-group-title,
.delivery-completed-cases > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 9px;
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
}

.delivery-case-group-title strong,
.delivery-completed-cases > summary strong {
  min-width: 25px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #e8f0e9;
  text-align: center;
}

.delivery-case-group-empty {
  padding: 18px 10px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.delivery-completed-cases {
  margin-top: 10px;
  border-top: 1px solid var(--line);
}

.delivery-completed-cases > summary {
  cursor: pointer;
  list-style: none;
}

.delivery-completed-cases > summary::-webkit-details-marker {
  display: none;
}

.delivery-completed-cases > summary::before {
  content: "+";
  width: 18px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
}

.delivery-completed-cases[open] > summary::before {
  content: "−";
}

.delivery-completed-cases > summary span {
  flex: 1;
}

.delivery-case-item {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 12px 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.delivery-case-item:first-child {
  border-top: 1px solid var(--line);
}

.delivery-case-item:hover,
.delivery-case-item:focus-visible {
  background: var(--surface-2);
}

.delivery-case-item.is-active {
  background: #eef4ef;
  box-shadow: inset 3px 0 0 var(--green);
}

.delivery-case-item-head {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.delivery-case-item-head strong {
  min-width: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.delivery-case-item-name {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
}

.delivery-customer-grade {
  flex: 0 0 auto;
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--green);
  font-size: 11px;
  line-height: 1.3;
  font-weight: 700;
  white-space: nowrap;
}

.delivery-status-badge {
  flex: 0 0 auto;
  padding: 3px 6px;
  border-radius: 5px;
  background: #eef3ee;
  color: var(--green);
  font-size: 10px;
  line-height: 1.3;
  font-weight: 900;
}

.delivery-status-badge[data-status="trip_ended"] {
  background: #fff5de;
  color: #7d5c16;
}

.delivery-status-badge[data-status="payment_completed"] {
  background: #e7f4ea;
  color: #24653b;
}

.delivery-case-item-meta {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.delivery-case-item-timing {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: var(--green);
  font-size: 11px;
  line-height: 1.35;
}

.delivery-case-item-timing strong {
  font-size: 13px;
  font-weight: 900;
}

.delivery-case-item-timing span {
  min-width: 0;
  color: var(--amber);
  font-weight: 900;
  text-align: right;
  overflow-wrap: anywhere;
}

.delivery-case-item-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
  font-weight: 800;
}

.delivery-case-item-flags .is-warning {
  color: var(--amber);
}

.delivery-case-item-flags .is-danger {
  color: var(--red);
}

.delivery-detail-pane {
  min-width: 0;
  max-height: calc(100vh - 116px);
  padding-right: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.delivery-detail-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.delivery-status-control {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(94px, 1fr));
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-2);
}

.delivery-status-control button {
  min-height: 34px;
  padding: 6px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  font-weight: 900;
}

.delivery-status-control button:hover,
.delivery-status-control button:focus-visible {
  color: var(--green);
}

.delivery-status-control button.is-active {
  background: var(--green);
  color: #fff;
}

.delivery-finance-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(100px, 0.45fr);
  gap: 10px;
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--ok);
  border-radius: 8px;
  background: var(--surface);
}

.delivery-finance-summary.has-blockers {
  border-left-color: var(--gold);
  background: #fffaf0;
}

.delivery-finance-summary div {
  min-width: 0;
}

.delivery-finance-summary span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.delivery-finance-summary strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.delivery-finance-summary p {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid rgba(18, 61, 49, 0.1);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  font-weight: 700;
}

.delivery-hotel-price-limits {
  margin-top: 10px;
  padding: 14px;
  border: 1px solid #d6bd77;
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  background: #fffaf0;
}

.delivery-hotel-price-limits.is-legacy {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.delivery-hotel-price-limits-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.delivery-hotel-price-limits h2 {
  margin: 0;
  color: var(--green);
  font-size: 16px;
}

.delivery-hotel-price-limits p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  font-weight: 700;
}

.delivery-hotel-price-limit-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin-top: 11px;
}

.delivery-hotel-price-limit-list > div {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(18, 61, 49, 0.14);
  border-radius: 6px;
  background: #fff;
}

.delivery-hotel-price-limit-list span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.delivery-hotel-price-limit-list strong {
  color: #9a6715;
  font-size: 16px;
  letter-spacing: 0;
}

.delivery-required-checklist {
  margin-top: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  background: #fffaf0;
}

.delivery-required-checklist.is-complete {
  border-left-color: var(--ok);
  background: #f3f8f4;
}

.delivery-required-checklist-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.delivery-required-checklist-head h2 {
  margin: 0 0 3px;
  color: var(--green);
  font-size: 15px;
  line-height: 1.3;
}

.delivery-required-checklist-head p {
  margin: 0;
}

.delivery-required-checklist-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.delivery-required-check {
  min-width: 0;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 4px 10px;
  align-items: start;
  padding: 11px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
}

.delivery-required-check.is-checked {
  border-color: rgba(36, 101, 59, 0.42);
  background: #f5faf6;
}

.delivery-required-check.is-not-required {
  cursor: default;
}

.delivery-required-check input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--green);
}

.delivery-required-check span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.delivery-required-check strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.delivery-required-check small,
.delivery-required-check em {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  font-style: normal;
  overflow-wrap: anywhere;
}

.delivery-required-check em {
  grid-column: 2;
}

.delivery-visa-check {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  cursor: default;
}

.delivery-visa-check-heading {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.delivery-visa-check-heading > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.delivery-visa-check-heading em {
  max-width: 48%;
  text-align: right;
}

.delivery-visa-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.delivery-visa-field {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.delivery-visa-field > span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  font-weight: 700;
}

.delivery-visa-field select {
  width: 100%;
  min-height: 36px;
  padding: 6px 30px 6px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}

.delivery-visa-field select:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.delivery-visa-completion {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  cursor: pointer;
}

.delivery-visa-completion input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--green);
}

.delivery-visa-completion > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.delivery-visa-completion strong {
  color: var(--ink);
  font-size: 12px;
}

.delivery-visa-completion small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.delivery-source-section,
.delivery-operations-section {
  margin-top: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.delivery-detail-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  align-items: start;
}

.delivery-benefits-section {
  margin-top: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.delivery-benefit-list {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.delivery-benefit-item {
  display: grid;
  grid-template-columns: minmax(240px, 1.35fr) minmax(150px, 0.5fr) minmax(240px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid #b68a34;
  border-radius: 7px;
  background: #fffaf0;
}

.delivery-benefit-item.is-available {
  border-left-color: #2f7559;
  background: #f0f8f3;
}

.delivery-benefit-item.is-unavailable {
  border-left-color: #a64b40;
  background: #fff5f3;
}

.delivery-benefit-copy {
  display: grid;
  gap: 4px;
  align-self: stretch;
}

.delivery-benefit-copy > span,
.delivery-benefit-copy > small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.delivery-benefit-copy > strong {
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.delivery-benefit-item .field {
  margin: 0;
}

.delivery-benefit-notes textarea {
  min-height: 70px;
  resize: vertical;
}

.delivery-operation-stream {
  min-width: 0;
}

.delivery-operations-section {
  min-width: 0;
  container-name: delivery-operations;
  container-type: inline-size;
}

.delivery-source-section {
  position: relative;
  z-index: 1;
  max-height: none;
  overflow: visible;
  box-shadow: 0 8px 20px rgba(18, 45, 36, 0.08);
}

body.delivery-source-fullscreen-open {
  overflow: hidden;
}

body.delivery-source-image-open {
  overflow: hidden;
}

.delivery-source-image-dialog {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 14px;
  background: rgba(17, 35, 29, 0.78);
  backdrop-filter: blur(5px);
}

.delivery-source-image-dialog.hidden {
  display: none;
}

.delivery-source-image-dialog > header {
  width: min(1140px, 100%);
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
  background: var(--surface);
}

.delivery-source-image-dialog > header h2 {
  margin: 2px 0 0;
  font-size: 18px;
}

.delivery-source-image-stage {
  width: min(1140px, 100%);
  min-height: 0;
  margin: 0 auto;
  padding: 18px;
  overflow: auto;
  text-align: center;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: #e8e5de;
  box-shadow: 0 24px 70px rgba(12, 34, 27, 0.3);
}

.delivery-source-image-stage > img {
  display: block;
  width: min(1080px, 100%);
  height: auto;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 12px 32px rgba(17, 35, 29, 0.16);
}

.delivery-source-section.is-fullscreen {
  position: fixed;
  inset: 12px;
  z-index: 1200;
  width: auto;
  max-height: none;
  margin: 0;
  padding: 18px;
  overflow-y: auto;
  border-color: var(--line-strong);
  box-shadow: 0 24px 70px rgba(12, 34, 27, 0.28);
}

.delivery-source-section.is-fullscreen > .compact-heading {
  top: -18px;
  margin: -18px -18px 16px;
  padding: 16px 18px;
}

.delivery-source-section.is-fullscreen .delivery-guide-meta,
.delivery-source-section.is-fullscreen .delivery-reference-guest-list,
.delivery-source-section.is-fullscreen .delivery-reference-flight {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.delivery-source-section.is-fullscreen .delivery-guide-meta-guests,
.delivery-source-section.is-fullscreen .delivery-reference-guest-phone {
  grid-column: auto;
}

.delivery-source-section.is-fullscreen .delivery-reference-days {
  grid-template-columns: 1fr;
  align-items: start;
  gap: 12px;
}

.delivery-source-section > .compact-heading {
  position: sticky;
  top: -14px;
  z-index: 4;
  margin: -14px -14px 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.compact-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.compact-heading > div {
  min-width: 0;
}

.compact-heading h2 {
  margin: 0 0 4px;
}

.delivery-source-table-wrap,
.delivery-guest-table-wrap {
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.delivery-guide-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.delivery-guide-meta-guests {
  grid-column: 1 / -1;
}

.delivery-reference-days {
  display: grid;
  gap: 8px;
}

.delivery-reference-day {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
}

.delivery-reference-day > header {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
  padding: 9px 10px;
  background: var(--green);
  color: #fff;
}

.delivery-reference-day > header > div:first-child,
.delivery-reference-hotel {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.delivery-reference-day > header span,
.delivery-reference-hotel span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  line-height: 1.25;
  font-weight: 800;
}

.delivery-reference-day > header strong {
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.delivery-reference-room {
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
  background: #f3f7f3;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.delivery-reference-activities {
  display: grid;
}

.delivery-reference-activities > div {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
}

.delivery-reference-activities > div:last-child {
  border-bottom: 0;
}

.delivery-reference-activities time {
  color: var(--gold);
  font-size: 11px;
  line-height: 1.45;
  font-weight: 900;
}

.delivery-reference-activities p {
  min-width: 0;
  margin: 0;
}

.delivery-reference-activities strong,
.delivery-reference-activities small {
  display: block;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.delivery-reference-activities small {
  margin-top: 3px;
  color: var(--muted);
}

.delivery-reference-amenity {
  margin: 0;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.45;
}

.delivery-reference-amenity span {
  margin-right: 7px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 900;
}

.delivery-day-bookings {
  border-top: 1px solid var(--line-strong);
  background: #f8faf7;
}

.delivery-day-bookings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
}

.delivery-day-bookings-head > div {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.delivery-day-bookings-head strong {
  color: var(--green);
  font-size: 12px;
}

.delivery-day-bookings-head span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.delivery-day-booking-list {
  display: grid;
  gap: 8px;
  padding: 9px;
}

.delivery-day-bookings-empty {
  margin: 0;
  padding: 8px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
  text-align: center;
}

.delivery-unassigned-bookings {
  margin-top: 10px;
  border: 1px solid #dfb761;
  border-radius: 7px;
  background: #fff9eb;
  overflow: hidden;
}

.delivery-unassigned-bookings > p {
  margin: 0;
  padding: 0 10px 8px;
  color: #76551d;
  font-size: 10px;
  line-height: 1.45;
}

.delivery-payment-row.delivery-day-booking {
  padding: 0;
  overflow: hidden;
  background: var(--surface);
}

.delivery-payment-row.delivery-day-booking:not([open]) {
  border-color: #dfc58e;
  background: #fff8e8;
  box-shadow: inset 4px 0 0 #b7812b;
}

.delivery-payment-row.delivery-day-booking.is-settled:not([open]) {
  border-color: #b8cebf;
  background: #edf6f0;
  box-shadow: inset 4px 0 0 var(--ok);
}

.delivery-payment-row.delivery-day-booking:not([open]) > summary {
  padding-left: 15px;
}

.delivery-payment-row.delivery-day-booking:not([open]) > summary:hover {
  background: rgba(255, 255, 255, 0.42);
}

.delivery-day-booking > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  cursor: pointer;
  list-style: none;
}

.delivery-day-booking > summary::-webkit-details-marker {
  display: none;
}

.delivery-day-booking > summary > div:first-child,
.delivery-day-booking-summary-meta {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.delivery-day-booking > summary strong {
  overflow-wrap: anywhere;
}

.delivery-day-booking > summary span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.delivery-day-booking-summary-meta {
  text-align: right;
}

.delivery-day-booking-summary-meta strong {
  color: var(--green);
  font-size: 11px;
}

.delivery-day-booking > summary::after {
  content: "展开";
  grid-column: 1 / -1;
  color: var(--gold);
  font-size: 9px;
  font-weight: 900;
}

.delivery-day-booking[open] > summary::after {
  content: "收起编辑";
}

.delivery-day-booking-editor {
  padding: 11px;
  border-top: 1px solid var(--line);
  background: #fbfcfa;
}

.delivery-day-booking-editor > .delivery-row-actions {
  margin-bottom: 10px;
}

.delivery-day-booking .delivery-payment-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.delivery-booking-audit {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.delivery-booking-audit > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.delivery-booking-audit .delivery-checklist-block {
  margin: 0 10px 10px;
}

.delivery-reference-details {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.delivery-reference-details summary {
  padding: 9px 10px;
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.delivery-reference-guest-list,
.delivery-reference-flight {
  display: grid;
  gap: 6px;
  padding: 0 10px 10px;
}

.delivery-reference-guest-list > article,
.delivery-reference-flight > div {
  display: grid;
  gap: 2px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.delivery-reference-guest-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 3px 8px;
}

.delivery-reference-guest-head span,
.delivery-reference-flight span {
  color: var(--muted);
  font-size: 10px;
  overflow-wrap: anywhere;
}

.delivery-reference-guest-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
  margin: 6px 0 0;
}

.delivery-reference-guest-fields > div {
  min-width: 0;
}

.delivery-reference-guest-fields dt {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.delivery-reference-guest-fields dd {
  margin: 1px 0 0;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.delivery-reference-guest-phone {
  grid-column: 1 / -1;
}

.delivery-reference-details .delivery-source-text {
  margin: 0 10px 10px;
}

.delivery-guide-meta > div,
.delivery-guide-flight-grid > div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}

.delivery-guide-meta span,
.delivery-guide-flight-grid span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
  font-weight: 800;
}

.delivery-guide-meta strong,
.delivery-guide-flight-grid strong {
  display: block;
  margin-top: 4px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.delivery-guide-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.delivery-guide-table {
  width: 100%;
  min-width: 1500px;
  border-collapse: collapse;
  table-layout: fixed;
}

.delivery-guide-table th,
.delivery-guide-table td {
  padding: 8px 9px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.delivery-guide-table th {
  background: var(--green);
  color: #fff;
  font-size: 10px;
  text-align: center;
}

.delivery-guide-table th:first-child,
.delivery-guide-table td:first-child {
  width: 84px;
}

.delivery-guide-table th:nth-child(2),
.delivery-guide-table td:nth-child(2) {
  width: 82px;
}

.delivery-guide-table th:nth-child(3),
.delivery-guide-table td:nth-child(3) {
  width: 280px;
}

.delivery-guide-table th:nth-child(7),
.delivery-guide-table td:nth-child(7),
.delivery-guide-table th:nth-child(12),
.delivery-guide-table td:nth-child(12) {
  width: 180px;
}

.delivery-guide-activity {
  font-weight: 750;
}

.delivery-missing-value {
  color: var(--red);
  font-weight: 800;
}

.delivery-guide-subsection {
  margin-top: 12px;
}

.delivery-guide-subsection h3,
.delivery-checklist-block h3 {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 13px;
  line-height: 1.3;
}

.delivery-guide-flight-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.delivery-source-table-wrap {
  max-height: min(34vh, 360px);
}

.delivery-source-table,
.delivery-guest-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  table-layout: fixed;
}

.delivery-source-table th,
.delivery-source-table td,
.delivery-guest-table th,
.delivery-guest-table td {
  padding: 9px 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.delivery-source-table th,
.delivery-guest-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--green);
  color: #fff;
  font-size: 11px;
}

.delivery-source-table th:first-child,
.delivery-source-table td:first-child {
  width: 90px;
}

.delivery-source-table th:nth-child(3),
.delivery-source-table td:nth-child(3),
.delivery-source-table th:nth-child(4),
.delivery-source-table td:nth-child(4) {
  width: 18%;
}

.delivery-source-activity {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 6px;
  padding: 5px 0;
  border-bottom: 1px dashed var(--line);
}

.delivery-source-activity:last-child {
  border-bottom: 0;
}

.delivery-source-activity time {
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
}

.delivery-source-activity small {
  grid-column: 2;
  color: var(--muted);
}

.delivery-source-text {
  max-height: 320px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  line-height: 1.6;
}

.delivery-customer-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.delivery-customer-meta div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}

.delivery-customer-meta span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.delivery-customer-meta strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.delivery-settlement-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.delivery-settlement-metrics > div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}

.delivery-settlement-metrics > div.is-warning {
  border-color: var(--gold);
  background: #fffaf0;
}

.delivery-settlement-metrics span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.delivery-settlement-metrics strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.delivery-settlement-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.delivery-manual-cost-toggle {
  align-self: end;
  min-height: 42px;
}

.delivery-case-fields,
.delivery-payment-fields,
.delivery-change-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.delivery-payment-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.delivery-change-fields {
  grid-template-columns: minmax(140px, 0.65fr) minmax(140px, 0.65fr) minmax(220px, 1.4fr);
}

.delivery-change-details {
  grid-column: 1 / -1;
}

.delivery-change-details textarea {
  min-height: 96px;
  resize: vertical;
}

.delivery-change-details em {
  color: var(--danger);
  font-style: normal;
}

.delivery-case-fields .field,
.delivery-payment-fields .field,
.delivery-change-fields .field {
  min-width: 0;
  margin: 0;
}

.delivery-field-wide {
  grid-column: span 2;
}

.delivery-field-full {
  grid-column: 1 / -1;
}

.delivery-hotel-limit-hint {
  grid-column: 1 / -1;
  padding: 9px 10px;
  border-left: 3px solid var(--gold);
  border-radius: 5px;
  background: #fff8e8;
  color: #76551d;
  font-size: 11px;
  line-height: 1.45;
  font-weight: 800;
}

.delivery-hotel-limit-hint.is-ok {
  border-left-color: var(--ok);
  background: #eef7f0;
  color: var(--green);
}

.delivery-hotel-limit-hint.is-danger {
  border-left-color: var(--danger);
  background: #fff1ef;
  color: var(--danger);
}

.delivery-payment-list,
.delivery-change-list {
  display: grid;
  gap: 10px;
}

.delivery-checklist-block {
  margin: 12px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.delivery-checklist-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.delivery-checklist-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.delivery-checklist-table th,
.delivery-checklist-table td {
  padding: 8px 9px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.delivery-checklist-table th {
  background: #eaf1eb;
  color: var(--green);
  font-size: 10px;
  font-weight: 900;
}

.delivery-checklist-table tbody tr {
  cursor: pointer;
}

.delivery-checklist-table tbody tr:hover,
.delivery-checklist-table tbody tr:focus-visible {
  background: #f4f8f4;
  outline: 2px solid var(--green);
  outline-offset: -2px;
}

.delivery-checklist-empty {
  padding: 12px;
  color: var(--muted);
  text-align: center;
}

.delivery-change-ledger {
  display: grid;
  gap: 6px;
}

.delivery-change-ledger-item {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.delivery-change-ledger-item:hover,
.delivery-change-ledger-item:focus-visible {
  border-color: var(--green);
  background: #f4f8f4;
  outline: 2px solid rgba(15, 75, 61, 0.16);
}

.delivery-change-ledger-item > span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.delivery-change-ledger-item strong,
.delivery-change-ledger-item small {
  overflow-wrap: anywhere;
}

.delivery-change-ledger-item small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.delivery-change-ledger-item em {
  color: var(--muted);
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.delivery-change-ledger-item em.is-charge {
  color: #8a5b12;
}

.delivery-change-ledger-item em.is-refund {
  color: var(--green);
}

.delivery-editor-caption {
  margin: 14px 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.delivery-payment-row,
.delivery-change-row {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fbfcfa;
}

.delivery-change-row.is-new {
  border-left: 4px solid var(--gold);
  background: #fffaf0;
}

.delivery-change-row-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.delivery-change-row-head > div:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.delivery-change-row-head span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.delivery-change-row-head strong {
  overflow-wrap: anywhere;
}

.delivery-payment-row.is-settled {
  border-left: 4px solid var(--ok);
}

.delivery-payment-row > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.delivery-payment-row > header > div:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.delivery-payment-row > header strong {
  overflow-wrap: anywhere;
}

.delivery-payment-row > header span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.delivery-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.delivery-attachment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.delivery-attachment-zone {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--surface-2);
  outline: none;
}

.delivery-attachment-zone:focus-visible,
.delivery-attachment-zone:focus-within,
.delivery-attachment-zone.is-awaiting-paste {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(19, 77, 56, 0.12);
}

.delivery-attachment-zone.is-awaiting-paste {
  background: rgba(19, 77, 56, 0.06);
}

.delivery-payment-row.is-uploading .delivery-attachment-zone {
  opacity: 0.72;
  cursor: progress;
}

.delivery-attachment-zone [data-upload-status] {
  min-width: 0;
  overflow-wrap: anywhere;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.delivery-attachment-zone [data-upload-message] {
  margin: 0 0 10px;
}

.delivery-attachment-head {
  display: grid;
  gap: 2px;
}

.delivery-attachment-head strong {
  color: var(--green);
  font-size: 12px;
}

.delivery-attachment-head span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.delivery-attachment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.delivery-receipts {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.delivery-receipts figure {
  width: 110px;
  margin: 0;
  display: grid;
  gap: 5px;
}

.delivery-receipts img {
  width: 110px;
  height: 76px;
  display: block;
  border: 1px solid var(--line);
  border-radius: 6px;
  object-fit: cover;
}

.delivery-receipts figcaption {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.delivery-pdf-document {
  display: grid;
  place-items: center;
  width: 110px;
  min-height: 76px;
  box-sizing: border-box;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--green);
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 700;
}

.delivery-booking-review {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.booking-review-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.booking-review-heading strong { margin-right: auto; }
.booking-review-heading [role="status"] { color: var(--muted); }
.booking-review-warning { color: #8a4218; }
.booking-review-choice { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.booking-review-choice > p, .booking-review-files { flex-basis: 100%; margin: 4px 0; }
.booking-review-files label { display: flex; align-items: start; gap: 8px; margin: 8px 0; }
.booking-review-files input { flex: 0 0 auto; width: auto; margin-top: 3px; }
.booking-review-table { max-width: 100%; overflow-x: auto; margin-top: 12px; }
.booking-review-table table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 12px; }
.booking-review-table th, .booking-review-table td { padding: 8px; border: 1px solid var(--line); text-align: left; vertical-align: top; white-space: normal; }
.booking-review-table p { margin: 4px 0 0; }
.booking-review-history { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.booking-review-history ol { padding-left: 20px; }
.booking-review-history li + li { margin-top: 12px; }

.delivery-upload-button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.delivery-empty-state {
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.delivery-empty-state p {
  margin: 5px 0 0;
}

@media (max-width: 1320px) {
  .delivery-workbench {
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  }

  .delivery-benefit-item {
    grid-template-columns: minmax(220px, 1fr) minmax(150px, 0.45fr) minmax(220px, 1fr);
  }

  .delivery-benefit-item > .btn {
    grid-column: 3;
    justify-self: end;
  }
}

@media (max-width: 980px) {
  .delivery-detail-workspace {
    grid-template-columns: 1fr;
  }

  .delivery-source-section {
    max-height: none;
  }

  .delivery-benefit-item {
    grid-template-columns: 1fr 1fr;
  }

  .delivery-benefit-copy,
  .delivery-benefit-notes {
    grid-column: 1 / -1;
  }

  .delivery-benefit-item > .btn {
    grid-column: auto;
  }
}

@media (max-width: 1120px) {
  .delivery-workbench {
    grid-template-columns: 1fr;
  }

  .delivery-case-pane {
    position: static;
    max-height: 340px;
  }

  .delivery-detail-pane {
    max-height: none;
    overflow: visible;
  }

  .delivery-source-section {
    top: 0;
  }
}

@media (max-width: 860px) {
  .delivery-page-head,
  .delivery-detail-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .delivery-filter-bar,
  .delivery-filter-bar input,
  .delivery-filter-bar select {
    width: 100%;
  }

  .delivery-summary-grid,
  .delivery-customer-meta,
  .delivery-finance-summary,
  .delivery-hotel-price-limit-list,
  .delivery-required-checklist-items,
  .delivery-settlement-metrics,
  .delivery-guide-meta,
  .delivery-guide-flight-grid {
    grid-template-columns: 1fr;
  }

  .delivery-finance-summary p {
    grid-column: auto;
  }

  .delivery-case-fields,
  .delivery-payment-fields,
  .delivery-change-fields,
  .delivery-settlement-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .delivery-status-control {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .delivery-page {
    padding: 14px;
  }

  .delivery-handoff-controls,
  .delivery-case-fields,
  .delivery-payment-fields,
  .delivery-change-fields,
  .delivery-settlement-fields,
  .delivery-visa-controls {
    grid-template-columns: 1fr;
  }

  .delivery-benefit-item {
    grid-template-columns: 1fr;
  }

  .delivery-benefit-copy,
  .delivery-benefit-notes,
  .delivery-benefit-item > .btn {
    grid-column: auto;
  }

  .delivery-visa-check-heading {
    display: grid;
  }

  .delivery-visa-check-heading em {
    max-width: none;
    text-align: left;
  }

  .delivery-field-wide,
  .delivery-field-full {
    grid-column: auto;
  }

  .delivery-status-control {
    grid-template-columns: 1fr;
  }

  .delivery-payment-row > header,
  .compact-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .delivery-day-bookings-head {
    align-items: stretch;
    flex-direction: column;
  }

  .delivery-day-bookings-head .btn {
    width: 100%;
  }

  .delivery-day-booking > summary {
    grid-template-columns: 1fr;
  }

  .delivery-day-booking-summary-meta {
    text-align: left;
  }

  .delivery-row-actions,
  .delivery-row-actions .btn,
  .delivery-upload-button {
    width: 100%;
  }

  .delivery-source-section {
    position: static;
    max-height: none;
  }

  .delivery-attachment-grid {
    grid-template-columns: 1fr;
  }

  .delivery-attachment-actions,
  .delivery-attachment-actions .btn,
  .delivery-attachment-actions .delivery-upload-button {
    width: 100%;
  }

  .delivery-source-section.is-fullscreen {
    inset: 0;
    padding: 14px;
    border: 0;
    border-radius: 0;
  }

  .delivery-source-section.is-fullscreen > .compact-heading {
    top: -14px;
    margin: -14px -14px 14px;
    padding: 14px;
  }

  .delivery-source-section.is-fullscreen .delivery-guide-meta,
  .delivery-source-section.is-fullscreen .delivery-reference-guest-list,
  .delivery-source-section.is-fullscreen .delivery-reference-flight,
  .delivery-source-section.is-fullscreen .delivery-reference-days {
    grid-template-columns: 1fr;
  }

  .delivery-source-image-dialog {
    padding: 0;
  }

  .delivery-source-image-dialog > header {
    align-items: stretch;
    flex-direction: column;
    border-radius: 0;
  }

  .delivery-source-image-dialog > header .delivery-row-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .delivery-source-image-stage {
    padding: 8px;
    border-radius: 0;
  }
}

.delivery-calendar-panel {
  margin: 14px 0;
  border: 1px solid var(--line);
  background: #f7faf7;
}

.delivery-calendar-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.delivery-calendar-head > div:first-child { display: grid; gap: 3px; }
.delivery-calendar-head span { color: var(--muted); font-size: 12px; }

.delivery-calendar-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.delivery-calendar-filters input,
.delivery-calendar-filters select { min-height: 38px; }

.delivery-calendar-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--line);
}

.delivery-calendar-day { min-width: 0; background: #fff; }
.delivery-calendar-day > header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  background: #edf3ee;
}

.delivery-calendar-task {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}

.delivery-calendar-task.is-done,
.delivery-calendar-task.is-skipped { background: #fafafa; color: var(--muted); }

.delivery-calendar-case {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.delivery-calendar-case strong,
.delivery-calendar-case span { overflow-wrap: anywhere; }
.delivery-calendar-case span,
.delivery-calendar-time { font-size: 12px; }
.delivery-calendar-time { color: #9a5b12; font-weight: 800; white-space: nowrap; }
.delivery-calendar-actions { display: flex; gap: 6px; }
.delivery-calendar-more { margin: 12px auto; }

@media (max-width: 860px) {
  .delivery-calendar-head { align-items: stretch; flex-direction: column; }
  .delivery-calendar-filters > * { flex: 1 1 150px; }
}

@media (max-width: 620px) {
  .delivery-calendar-list { grid-template-columns: 1fr; }
  .delivery-calendar-task { grid-template-columns: minmax(0, 1fr) auto; }
  .delivery-calendar-actions { grid-column: 1 / -1; }
}

@container delivery-operations (max-width: 720px) {
  .delivery-change-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .delivery-change-original,
  .delivery-change-details,
  .delivery-change-notes {
    grid-column: 1 / -1;
  }
}

@container delivery-operations (max-width: 460px) {
  .delivery-change-section-head,
  .delivery-change-row-head {
    align-items: stretch;
    flex-direction: column;
  }

  .delivery-change-section-head .delivery-row-actions,
  .delivery-change-row-head .delivery-row-actions {
    width: 100%;
    justify-content: stretch;
  }

  .delivery-change-section-head .btn,
  .delivery-change-row-head .btn {
    flex: 1 1 0;
  }

  .delivery-change-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .delivery-change-date,
  .delivery-change-type,
  .delivery-change-original,
  .delivery-change-details,
  .delivery-change-currency,
  .delivery-change-amount,
  .delivery-change-notes {
    grid-column: 1;
  }

  .delivery-change-ledger-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .delivery-change-ledger-item em {
    white-space: normal;
  }
}

/* Follow the insurance reference: seven fields per row, in DOM/copy order. */
.delivery-reference-guest-fields.delivery-insurance-fields {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.delivery-guest-copy { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 10px 10px; }
.delivery-guest-copy [role="status"] { font-size: 12px; }
@media (max-width: 700px) {
  .delivery-reference-guest-fields.delivery-insurance-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* /styles_app_delivery_changes.css */
.delivery-exception-center {
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf6;
  overflow: hidden;
}

.delivery-exception-center-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 14px;
}

.delivery-exception-center-head > div {
  display: grid;
  gap: 2px;
}

.delivery-exception-center-head strong {
  color: var(--green);
  font-size: 14px;
}

.delivery-exception-center-head span:not(.pill) {
  color: var(--muted);
  font-size: 12px;
}

.delivery-exception-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  border-top: 1px solid var(--line);
}

.delivery-exception-list > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 10px 14px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.delivery-exception-list > button:hover {
  background: #f1f6f0;
}

.delivery-exception-list > button > span:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.delivery-exception-list small {
  color: var(--muted);
}

.delivery-exception-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.delivery-exception-tags em {
  padding: 3px 6px;
  border-radius: 4px;
  background: #fff4d6;
  color: #75510b;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.delivery-exception-tags em.is-danger {
  background: #fce4e1;
  color: #9b2f25;
}

.delivery-change-orders {
  margin: 12px 0;
  padding: 14px;
  border: 1px solid #dac793;
  border-radius: 8px;
  background: #fffdf6;
}

.delivery-change-order-list {
  display: grid;
  gap: 8px;
}

.delivery-change-order {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 4px solid #aac0b5;
  border-radius: 6px;
  background: #fff;
}

.delivery-change-order.is-pending {
  border-left-color: #c28c23;
  background: #fffaf0;
}

.delivery-change-order > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.delivery-change-order span,
.delivery-change-order small {
  color: var(--muted);
  font-size: 12px;
}

.delivery-change-order strong {
  overflow-wrap: anywhere;
  color: var(--green);
}

@media (max-width: 720px) {
  .delivery-exception-center-head,
  .delivery-change-order {
    align-items: stretch;
    flex-direction: column;
  }

  .delivery-exception-tags {
    justify-content: flex-start;
  }
}

.delivery-change-impact {
  color: #9a5d12 !important;
  font-weight: 700;
}

.delivery-day-booking.needs-reconfirmation {
  border-color: #c47b22;
  background: #fffaf1;
}

.delivery-reconfirmation-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
  border-left: 4px solid #c47b22;
  background: #fff3db;
}

.delivery-reconfirmation-alert div { display: grid; gap: 3px; }
.delivery-reconfirmation-alert span { color: #69583d; font-size: 13px; }

.delivery-exception-tasks {
  border-top: 1px solid var(--line, #dce4df);
  border-bottom: 1px solid var(--line, #dce4df);
  padding: 18px 0;
}

.delivery-exception-task-list { display: grid; gap: 10px; }
.delivery-exception-task { padding: 14px; border: 1px solid #d7dfda; background: #f7faf8; }
.delivery-exception-task.is-critical { border-left: 4px solid #b64b3e; }
.delivery-exception-task.is-warning { border-left: 4px solid #bd8125; }
.delivery-exception-task header { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.delivery-exception-task header div { display: flex; align-items: center; gap: 10px; }
.delivery-exception-task header span { color: #8a641f; font-size: 12px; font-weight: 800; }
.delivery-exception-task-fields {
  display: grid;
  grid-template-columns: minmax(130px, .8fr) minmax(180px, 1.2fr) minmax(120px, .75fr) minmax(96px, auto);
  gap: 10px;
  align-items: end;
  min-width: 0;
}
.delivery-exception-task-fields label { display: grid; gap: 5px; }
.delivery-exception-task-fields .is-wide { grid-column: 1 / -2; }
.delivery-exception-task-fields .btn { width: 100%; white-space: nowrap; }

@media (max-width: 1050px) {
  .delivery-exception-task-fields { grid-template-columns: 1fr 1fr; }
  .delivery-exception-task-fields .is-wide { grid-column: 1 / -1; }
  .delivery-exception-task-fields .btn { grid-column: 1 / -1; }
  .delivery-reconfirmation-alert { align-items: flex-start; flex-direction: column; }
}

/* Narrow phones keep owner/status/date inputs readable instead of shrinking a grid column. */
.delivery-exception-task-fields label { min-width:0; }
.delivery-exception-task-fields input, .delivery-exception-task-fields select { width:100%; min-width:0; }
@media (max-width:560px) {
  .delivery-exception-task-fields { grid-template-columns:minmax(0, 1fr); }
  .delivery-exception-task header, .delivery-exception-task header div { flex-wrap:wrap; }
}


/* /styles_app_finance.css */
.finance-page {
  min-width: 0;
  min-height: calc(100vh - 96px);
  max-width: 100%;
  padding: 20px;
  overflow-x: hidden;
}

.finance-duplicate-group {
  margin-block: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow-wrap: anywhere;
}
.finance-duplicate-group > header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.finance-duplicate-group h3,
.finance-duplicate-item h4 { margin: 0; }
.finance-duplicate-group > header > span { color: var(--muted); font-size: 13px; }
.finance-duplicate-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.finance-duplicate-item { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 6px; }
.finance-duplicate-item dl { display: grid; gap: 8px; margin: 12px 0; font-size: 13px; }
.finance-duplicate-item dl > div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 8px; }
.finance-duplicate-item dt { color: var(--muted); }
.finance-duplicate-item dd { margin: 0; }
.finance-duplicate-cash { border-inline-start: 2px solid var(--green); padding-inline-start: 8px; font-size: 13px; }
#financeDuplicates[hidden],
#financeDuplicates [hidden] { display: none !important; }
#financeDuplicates { scroll-margin-block-start: calc(var(--workspace-topbar-height, 64px) + 12px); }
[data-finance-expense-id]:focus { outline: 2px solid var(--green); outline-offset: -2px; }
@media (max-width: 700px) {
  .finance-duplicate-items { grid-template-columns: minmax(0, 1fr); }
  .finance-duplicate-group { padding: 12px; }
}

.finance-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 18px;
  margin-bottom: 10px;
}

.finance-page-head h2,
.finance-detail-head h2 {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 24px;
  line-height: 1.2;
  font-weight: 900;
}

.finance-detail-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
}

.finance-detail-nav .btn {
  max-width: 100%;
  white-space: normal;
}

.finance-detail-nav,
.finance-detail-pane [data-finance-region] {
  scroll-margin-block-start: calc(var(--workspace-topbar-height, 64px) + 40px);
}

.finance-detail-pane [data-finance-region]:focus,
.finance-detail-pane [data-finance-region] h3:focus {
  outline: 2px solid var(--green);
  outline-offset: 4px;
}

.finance-filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.finance-filter-bar label {
  display: grid;
  gap: 4px;
  min-width: 132px;
}

.finance-filter-bar label > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.finance-filter-bar input[type="search"] {
  width: min(250px, 100%);
  align-self: end;
}

.finance-filter-bar .btn {
  align-self: end;
}

.finance-period-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.finance-period-actions .small {
  margin-left: 4px;
}

.finance-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 14px;
  background: var(--surface);
  overflow: hidden;
}

.finance-metrics > div {
  min-width: 0;
  padding: 13px 14px;
  border-right: 1px solid var(--line);
}

.finance-metrics > div:last-child {
  border-right: 0;
}

.finance-metrics span,
.finance-metrics small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  font-weight: 800;
}

.finance-metrics strong {
  display: block;
  margin: 5px 0 3px;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.15;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.finance-metrics .is-warning strong {
  color: #9a5b12;
}

.finance-ledger-list {
  display: grid;
  gap: 8px;
}

.finance-ledger-list article {
  display: grid;
  grid-template-columns: minmax(190px, 0.7fr) minmax(300px, 1.3fr);
  gap: 14px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7faf6;
}

.finance-ledger-list article > div:first-child {
  display: grid;
  gap: 3px;
}

.finance-ledger-list article span {
  color: var(--muted);
  font-size: 12px;
}

.finance-ledger-diff {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.finance-ledger-diff > span,
.finance-ledger-diff > strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.finance-ledger-diff b {
  color: #a77c28;
}

@media (max-width: 760px) {
  .finance-ledger-list article {
    grid-template-columns: 1fr;
  }

  .finance-ledger-diff {
    align-items: flex-start;
    flex-direction: column;
  }
}

.finance-workbench {
  display: grid;
  grid-template-columns: minmax(230px, 270px) minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
  align-items: start;
}

.finance-groups-pane {
  position: sticky;
  top: 116px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 136px);
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.finance-groups-pane > * {
  flex-shrink: 0;
}

.finance-group-filters {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding-bottom: 12px;
}

.finance-group-filters label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.finance-group-filters select {
  width: 100%;
  min-width: 0;
}

.finance-group-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.finance-group-item {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 12px 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.finance-group-item:first-child {
  border-top: 1px solid var(--line);
}

.finance-group-item:hover,
.finance-group-item:focus-visible {
  background: var(--surface-2);
}

.finance-group-item.is-active {
  background: #eef4ef;
  box-shadow: inset 3px 0 0 var(--green);
}

.finance-group-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.finance-group-item-head strong {
  min-width: 0;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.finance-profit-state {
  flex: 0 0 auto;
  padding: 3px 6px;
  border-radius: 5px;
  background: #e7f4ea;
  color: #24653b;
  font-size: 10px;
  line-height: 1.3;
  font-weight: 900;
}

.finance-profit-state.is-pending {
  background: #fff0d6;
  color: #8b550e;
}

.finance-group-meta,
.finance-group-money {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.finance-group-blogger,
.finance-detail-blogger {
  width: fit-content;
  max-width: 100%;
  padding: 3px 6px;
  border-radius: 5px;
  background: #f7edc9;
  color: #6b5010;
  font-size: 11px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.finance-group-blogger strong,
.finance-detail-blogger strong {
  color: inherit;
}

.finance-group-money {
  color: var(--ink);
  font-weight: 800;
}

.finance-detail-pane {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.finance-empty-state {
  padding: 80px 24px;
  text-align: center;
}

.finance-empty-state strong {
  display: block;
  margin-bottom: 8px;
  color: var(--green);
  font-size: 18px;
}

.finance-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.finance-detail-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.finance-detail-blogger {
  margin-top: 8px;
}

.finance-detail-status {
  flex: 0 0 auto;
  max-width: 220px;
  text-align: right;
}

.finance-detail-status strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.finance-detail-status span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.finance-profit-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.finance-profit-strip > div {
  min-width: 0;
  padding: 14px 16px;
  border-right: 1px solid var(--line);
}

.finance-profit-strip > div:last-child {
  border-right: 0;
}

.finance-profit-strip span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.finance-profit-strip strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 17px;
  overflow-wrap: anywhere;
}

.finance-profit-strip .profit strong {
  color: var(--green);
}

.finance-profit-strip .pending strong {
  color: #9a5b12;
}

.finance-section {
  min-width: 0;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.finance-section:last-child {
  border-bottom: 0;
}

.finance-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.finance-section-head h3 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 16px;
}

.finance-itinerary-section > summary {
  margin-bottom: 0;
  cursor: pointer;
  list-style: none;
}

.finance-itinerary-section > summary::-webkit-details-marker {
  display: none;
}

.finance-itinerary-section[open] > summary {
  margin-bottom: 12px;
}

.finance-itinerary-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.finance-itinerary-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  table-layout: fixed;
}

.finance-itinerary-table th,
.finance-itinerary-table td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.finance-itinerary-table th {
  background: #edf3ee;
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
}

.finance-itinerary-table th:nth-child(1) { width: 14%; }
.finance-itinerary-table th:nth-child(2) { width: 43%; }
.finance-itinerary-table th:nth-child(3) { width: 23%; }
.finance-itinerary-table th:nth-child(4) { width: 20%; }
.finance-itinerary-table tr:last-child td { border-bottom: 0; }

.finance-income-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 12px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
}

.finance-income-breakdown strong {
  margin-left: 4px;
  color: var(--ink);
}

.finance-income-form {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(150px, 0.7fr) minmax(240px, 1.6fr) auto;
  gap: 10px;
  align-items: end;
}

.finance-income-form label {
  display: grid;
  gap: 5px;
}

.finance-income-form label > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.finance-blogger-correction {
  max-width: 520px;
  margin-top: 10px;
  font-size: 13px;
}

.finance-blogger-correction summary {
  width: fit-content;
  cursor: pointer;
  color: var(--green);
  font-weight: 700;
}

.finance-blogger-form {
  display: grid;
  gap: 10px;
  padding: 12px 0;
}

.finance-blogger-form label {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.finance-blogger-form input,
.finance-blogger-form select,
.finance-blogger-form textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.finance-blogger-form button {
  justify-self: start;
}

.finance-blogger-scope,
.finance-blogger-blocked {
  margin: 0;
  line-height: 1.6;
}

.finance-blogger-history {
  margin-top: 8px;
}

.finance-blogger-history ol {
  margin: 10px 0 0;
  padding-left: 20px;
}

.finance-blogger-history li + li {
  margin-top: 12px;
}

.finance-blogger-history p {
  margin: 4px 0;
  white-space: pre-wrap;
}

.finance-expense-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.finance-expense-entry-form {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) minmax(180px, 1.5fr) minmax(140px, 1fr) minmax(90px, 0.65fr) minmax(130px, 1fr) minmax(150px, 1.1fr) minmax(180px, 1.5fr) auto;
  gap: 8px;
  align-items: end;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  background: var(--surface-2);
}

.finance-expense-entry-form label {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.finance-expense-entry-form label > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.finance-expense-entry-form input,
.finance-expense-entry-form select {
  min-width: 0;
  width: 100%;
}

.finance-expense-table {
  width: 100%;
  min-width: 940px;
  border-collapse: collapse;
  table-layout: fixed;
}

.finance-expense-table th,
.finance-expense-table td {
  padding: 10px 9px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.finance-expense-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #edf3ee;
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
}

.finance-expense-table tr:last-child td {
  border-bottom: 0;
}

.finance-expense-table tr.is-excluded {
  opacity: 0.6;
}

.finance-expense-table input {
  min-width: 110px;
  width: 100%;
}

.finance-expense-conversion {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.finance-expense-note {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.finance-warning {
  color: #9a5b12;
  font-weight: 800;
}

@media (max-width: 1500px) {
  .finance-page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .finance-filter-bar {
    width: 100%;
    justify-content: flex-start;
  }

  .finance-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .finance-metrics > div:nth-child(3) {
    border-right: 0;
  }

  .finance-metrics > div:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }

  .finance-profit-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .finance-profit-strip > div:nth-child(3) {
    border-right: 0;
  }

  .finance-profit-strip > div:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }

  .finance-income-form {
    grid-template-columns: 1fr 1fr;
  }

  .finance-income-form .finance-notes-field {
    grid-column: 1 / -1;
  }

  .finance-expense-entry-form {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .finance-expense-name,
  .finance-expense-notes {
    grid-column: span 2;
  }
}

@media (max-width: 860px) {
  .finance-page {
    padding: 12px;
  }

  .finance-filter-bar label,
  .finance-filter-bar input[type="search"] {
    width: 100%;
  }

  .finance-workbench {
    grid-template-columns: 1fr;
  }

  .finance-page .finance-groups-pane {
    position: static;
    max-height: 480px;
  }

  .finance-detail-head {
    flex-direction: column;
  }

  .finance-detail-status {
    max-width: none;
    text-align: left;
  }

  .finance-expense-entry-form {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-height: 640px) {
  .finance-page .finance-groups-pane {
    position: static;
    max-height: 480px;
  }
}

@media (max-width: 560px) {
  .finance-metrics,
  .finance-profit-strip {
    grid-template-columns: 1fr 1fr;
  }

  .finance-metrics > div,
  .finance-profit-strip > div {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .finance-metrics > div:nth-child(even),
  .finance-profit-strip > div:nth-child(even) {
    border-right: 0;
  }

  .finance-income-form {
    grid-template-columns: 1fr;
  }

  .finance-income-form .finance-notes-field {
    grid-column: auto;
  }

  .finance-expense-entry-form {
    grid-template-columns: 1fr;
  }

  .finance-expense-name,
  .finance-expense-notes {
    grid-column: auto;
  }
}
.finance-period-lock {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.finance-period-lock-state {
  display: grid;
  gap: 2px;
  padding-left: 10px;
  border-left: 3px solid var(--line-strong, #b7c5bd);
}

.finance-period-lock-state.is-locked { border-left-color: #b68124; }
.finance-period-lock-state small { color: var(--muted, #68736d); }
.finance-locked-hint { color: #8a641f; font-weight: 700; align-self: end; padding-bottom: 10px; }

.finance-adjustment-form {
  display: grid;
  grid-template-columns: minmax(130px, .65fr) minmax(170px, .8fr) minmax(260px, 2fr) auto;
  gap: 12px;
  align-items: end;
}

.finance-adjustment-form label { display: grid; gap: 6px; }
.finance-adjustment-list { display: grid; gap: 8px; margin-top: 16px; }
.finance-adjustment-list article { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 12px; border: 1px solid var(--line, #dce4df); background: #f8faf8; }
.finance-adjustment-list article p { grid-column: 1 / -1; margin: 0; color: var(--muted, #68736d); }

@media (max-width: 900px) {
  .finance-period-lock { width: 100%; margin-left: 0; justify-content: space-between; }
  .finance-adjustment-form { grid-template-columns: 1fr 1fr; }
  .finance-adjustment-reason { grid-column: 1 / -1; }
}

.finance-reconciliation-panel {
  margin: 14px 0;
  border: 1px solid var(--line);
  background: #fff;
}

.finance-reconciliation-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  cursor: pointer;
  list-style-position: inside;
}

.finance-reconciliation-panel > summary > span:first-child {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
}

.finance-reconciliation-panel summary small { color: var(--muted); }

.finance-reconciliation-tools {
  display: grid;
  grid-template-columns: minmax(180px, .7fr) minmax(240px, 1fr) auto minmax(130px, .45fr);
  gap: 10px;
  align-items: end;
  padding: 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f7faf7;
}

.finance-reconciliation-tools label { display: grid; gap: 5px; }
.finance-reconciliation-tools label > span { color: var(--muted); font-size: 11px; font-weight: 800; }
.finance-reconciliation-list { display: grid; }

.finance-reconciliation-entry {
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.finance-reconciliation-entry > header,
.finance-reconciliation-entry > footer,
.finance-match-candidate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.finance-reconciliation-entry > header > span,
.finance-match-candidate > span { display: grid; gap: 3px; min-width: 0; }
.finance-reconciliation-entry > header > span:last-child,
.finance-match-candidate > span:last-child { text-align: right; }
.finance-reconciliation-entry small,
.finance-reconciliation-entry em { color: var(--muted); font-size: 11px; font-style: normal; }
.finance-match-candidates { display: grid; gap: 7px; margin: 10px 0; }

.finance-match-candidate {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  background: #f8faf8;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.finance-match-candidate:hover { border-color: var(--green); background: #edf3ee; }
.finance-match-candidate > span { overflow-wrap: anywhere; }
.finance-match-candidate .finance-match-reasons { font-size: 12px; line-height: 1.6; }
.finance-confirmed-match { margin: 10px 0; padding: 9px 10px; border-left: 3px solid var(--green); background: #edf3ee; }
.finance-reconciliation-more { margin: 12px auto; }

@media (max-width: 980px) {
  .finance-reconciliation-tools { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .finance-reconciliation-panel > summary,
  .finance-reconciliation-panel > summary > span:first-child,
  .finance-reconciliation-entry > header,
  .finance-match-candidate { align-items: flex-start; flex-direction: column; }
  .finance-reconciliation-tools { grid-template-columns: 1fr; }
  .finance-reconciliation-entry > header > span:last-child,
  .finance-match-candidate > span:last-child { text-align: left; }
}

/* Size finance content by its actual pane, including the sales sidebar and list. */
.finance-detail-pane .finance-profit-strip,
.finance-page .finance-metrics {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  flex-shrink: 0;
}
.finance-detail-pane .finance-profit-strip > div {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.finance-detail-pane .finance-detail-head,
.finance-detail-pane .finance-section-head {
  flex-wrap: wrap;
}
.finance-detail-head > div { min-width: 0; overflow-wrap: anywhere; }
.finance-detail-pane .finance-detail-status { flex-shrink: 1; overflow-wrap: anywhere; }
.finance-detail-pane .finance-income-form,
.finance-detail-pane .finance-expense-entry-form,
.finance-detail-pane .finance-adjustment-form {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
}
.finance-detail-pane form label,
.finance-detail-pane form input,
.finance-detail-pane form select {
  min-width: 0;
  max-width: 100%;
}
.finance-detail-pane .finance-expense-name { grid-column: auto; }
.finance-detail-pane .finance-expense-notes,
.finance-detail-pane .finance-notes-field,
.finance-detail-pane .finance-adjustment-reason { grid-column: 1 / -1; }
.finance-detail-pane .finance-detail-nav { position: static; min-width: 0; }

.finance-detail-pane {
  scroll-margin-block-start: calc(var(--workspace-topbar-height, 64px) + 16px);
}

/* Cash overview has its own flow; trip filters below retain their independent layout. */
.finance-overview{margin-bottom:24px;min-width:0;padding:20px;border:1px solid #dce5de;border-radius:12px;scroll-margin-block-start:calc(var(--workspace-topbar-height,64px) + 16px)}
.finance-overview h3{margin:24px 0 12px;font-size:18px}
.finance-overview-heading,.finance-overview-controls,.finance-overview-paging{display:flex;flex-wrap:wrap;gap:12px;align-items:center}
.finance-overview-heading h2{margin:0 auto 0 0;font-size:22px}
.finance-overview-controls label{display:grid;gap:4px;min-width:160px}
.finance-overview-controls input,.finance-overview-controls select{width:100%;min-width:0}
.finance-overview-totals{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px;margin:20px 0 8px}
.finance-overview-totals>div{display:grid;gap:8px;background:#f3f7f4;border:1px solid #dce5de;padding:16px}
.finance-overview-totals strong{font-size:24px;overflow-wrap:anywhere}
.finance-overview-totals small,.finance-overview table small{display:block;color:#5d6c65}
.finance-cashflow-row{display:flex;flex-wrap:wrap;gap:12px 24px;padding:10px 0;border-bottom:1px solid #e4eae6}
.finance-cashflow-row small{flex-basis:100%}
.finance-overview details{margin:16px 0;border:1px solid #dce5de;padding:12px}
.finance-overview summary{cursor:pointer;font-weight:600}
.finance-overview-table{overflow-x:auto;max-width:100%;margin:12px 0}
.finance-overview table{width:100%;border-collapse:collapse;min-width:600px}
.finance-overview th,.finance-overview td{padding:12px;text-align:left;border-bottom:1px solid #dce5de;white-space:normal;overflow-wrap:anywhere}
.finance-overview th{background:#f3f7f4}
.finance-account-entry{padding:16px 0;border-bottom:1px solid #dce5de;overflow-wrap:anywhere}
.finance-account-entry>div{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px}
.finance-account-entry p{margin:8px 0}
.finance-account-entry small{display:block;margin-bottom:8px}
.finance-entry-issue{color:#975b22}
.finance-overview-paging{justify-content:flex-end;margin-top:16px}
.finance-account-dialog label{display:grid;gap:6px;margin:12px 0}
.finance-account-dialog input,.finance-account-dialog select,.finance-account-dialog textarea{max-width:100%;min-width:0}
@media(max-width:600px){.finance-overview{padding:12px}.finance-overview-totals{grid-template-columns:1fr}.finance-overview-controls label{min-width:0;flex:1 1 100%}.finance-overview-heading h2{flex-basis:100%}.finance-overview-paging{justify-content:space-between}}

.finance-account-dialog [hidden]{display:none}

.finance-cash-proof { display:block; max-width:100%; max-height:24rem; object-fit:contain; margin:1rem auto; }
.finance-cash-review label { display:grid; gap:.5rem; margin-block:1rem; }

.ga-dialog.finance-month-end { width:min(56rem, calc(100% - 1.5rem)); }
.finance-month-end .form-grid {
  display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,12rem),1fr)); gap:.75rem;
}
.finance-month-end .form-grid label { min-width:0; }
.month-end-account-list { display:flex; flex-wrap:wrap; gap:.5rem; }
.month-end-account-list [aria-pressed="true"] { border-color:var(--accent,#164e3b); background:#eff5f1; }
.month-end-balances {
  display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,10rem),1fr));
  gap:1rem; padding:1rem 0; margin:1rem 0 .5rem; border-block:1px solid #dce5de;
}
.month-end-balances dt { color:#5d6c65; font-size:.875rem; }
.month-end-balances dd { margin:.35rem 0 0; font-weight:700; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.finance-month-end details { margin-top:1.25rem; padding-top:1rem; border-top:1px solid #dce5de; }
.finance-month-end summary { cursor:pointer; font-weight:600; }
.finance-month-end [data-status]:empty,.finance-month-end [data-saved]:empty,.finance-month-end [data-calc]:empty { display:none; }


/* /styles_app_members.css */
.members-page,
.member-confirmation-page {
  min-width: 0;
  min-height: calc(100vh - 96px);
  max-width: 100%;
  padding: 20px;
  overflow-x: hidden;
}

.members-page-head,
.member-confirmation-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.members-page-head h2,
.member-confirmation-page-head h2,
.member-confirmation-detail-header h2,
.member-detail-header h2 {
  margin: 0;
  color: var(--green);
  font-size: 24px;
  line-height: 1.2;
  font-weight: 900;
}

.members-filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.members-filter-bar input {
  width: min(280px, 100%);
}

.members-filter-bar select {
  min-width: 150px;
}

.member-direct-dialog {
  width: min(860px, calc(100vw - 28px));
  max-height: min(88vh, 900px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 22px 60px rgba(21, 45, 37, 0.22);
  overflow: auto;
}

.member-direct-dialog::backdrop {
  background: rgba(17, 35, 29, 0.42);
}

.member-profile-fields { min-width: 0; margin: 0; padding: 0; border: 0; }
.member-profile-error { color: var(--danger, #9c3026); line-height: 1.6; }
.member-profile-dialog [hidden] { display: none; }
.member-profile-dialog .member-direct-actions { flex-wrap: wrap; justify-content: flex-end; }

.member-direct-dialog form {
  padding: 20px;
}

.member-direct-dialog-head,
.member-direct-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.member-direct-dialog-head h2 {
  margin: 0;
  color: var(--green);
  font-size: 22px;
  line-height: 1.25;
}

.member-direct-dialog-head p {
  margin: 6px 0 0;
}

.member-direct-form-grid,
.member-direct-history-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.member-direct-form-grid .field,
.member-direct-history-grid .field {
  margin: 0;
}

.member-direct-wide,
.member-direct-history-wide {
  grid-column: 1 / -1;
}

.member-direct-history {
  margin: 18px 0 0;
  padding: 0 14px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.member-direct-history legend {
  padding: 0 7px;
  color: var(--green);
  font-weight: 900;
}

.member-direct-history > p {
  margin: 7px 0 0;
}

.member-direct-history-grid {
  grid-template-columns: minmax(130px, 0.7fr) minmax(220px, 1.6fr) minmax(150px, 0.8fr);
  margin-top: 12px;
}

.member-direct-history-wide {
  grid-column: span 2;
}

.member-direct-actions {
  justify-content: flex-end;
  margin-top: 18px;
}

.member-confirmation-filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.member-confirmation-filter-bar input {
  width: min(320px, 100%);
}

.member-confirmation-metrics {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(260px, 1.3fr);
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.member-confirmation-metrics > div {
  min-width: 0;
  padding: 13px 14px;
  border-right: 1px solid var(--line);
}

.member-confirmation-metrics > div:last-child {
  border-right: 0;
}

.member-confirmation-metrics span,
.member-confirmation-metrics small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  font-weight: 800;
}

.member-confirmation-metrics strong {
  display: block;
  margin: 5px 0 3px;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.15;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.member-confirmation-metrics .is-warning strong {
  color: #9a5b12;
}

.member-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.member-metrics > div {
  min-width: 0;
  padding: 13px 14px;
  border-right: 1px solid var(--line);
}

.member-metrics > div:last-child {
  border-right: 0;
}

.member-metrics span,
.member-metrics small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  font-weight: 800;
}

.member-metrics strong {
  display: block;
  margin: 5px 0 3px;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.15;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.member-metrics .is-warning strong {
  color: #9a5b12;
}

.members-workbench {
  display: grid;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
  align-items: start;
}

.member-confirmation-workbench {
  display: grid;
  grid-template-columns: minmax(250px, 300px) minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
  align-items: start;
}

.member-confirmation-list-pane {
  position: sticky;
  top: 116px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: calc(100vh - 136px);
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.member-confirmation-list {
  min-height: 180px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.member-confirmation-list-item {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 12px 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.member-confirmation-list-item:first-child {
  border-top: 1px solid var(--line);
}

.member-confirmation-list-item:hover,
.member-confirmation-list-item:focus-visible {
  background: var(--surface-2);
}

.member-confirmation-list-item.is-active {
  background: #fff8e8;
  box-shadow: inset 3px 0 0 #b7862d;
}

.member-confirmation-detail-pane {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.member-confirmation-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.member-confirmation-detail-header .page-kicker {
  max-width: min(680px, 72vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-confirmation-detail-header .small {
  margin: 6px 0 0;
}

.member-list-pane {
  position: sticky;
  top: 116px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: calc(100vh - 136px);
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.member-list {
  min-height: 180px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.member-list-item {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 12px 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.member-list-item:first-child {
  border-top: 1px solid var(--line);
}

.member-list-item:hover,
.member-list-item:focus-visible {
  background: var(--surface-2);
}

.member-list-item.is-active {
  background: #eef4ef;
  box-shadow: inset 3px 0 0 var(--green);
}

.member-list-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.member-list-item-head strong {
  min-width: 0;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.member-status-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 900;
}

.member-status-badge.is-active {
  background: #e5f2e8;
  color: #22613a;
}

.member-status-badge.is-pending {
  background: #fff0d6;
  color: #8b550e;
}

.member-list-item-meta,
.member-list-item-spend {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.member-list-item-spend {
  color: var(--ink);
  font-weight: 800;
}

.member-detail-pane {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.member-empty-state {
  padding: 70px 24px;
  text-align: center;
}

.member-empty-state strong {
  display: block;
  margin-bottom: 8px;
  color: var(--green);
  font-size: 18px;
}

.member-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.member-detail-header .small {
  margin: 6px 0 0;
}

.member-detail-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.member-profile-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.member-profile-metrics > div {
  min-width: 0;
  padding: 14px 18px;
  border-right: 1px solid var(--line);
}

.member-profile-metrics > div:last-child {
  border-right: 0;
}

.member-profile-metrics span,
.member-contact-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.member-profile-metrics strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.member-profile-section,
.member-purchase-section {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.member-contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.member-contact-grid > div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}

.member-contact-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.member-contact-grid .member-address {
  grid-column: 1 / -1;
}

.member-notes-field {
  margin: 0;
}

.member-transaction-form {
  display: grid;
  grid-template-columns: minmax(130px, 0.7fr) minmax(140px, 0.8fr) minmax(220px, 1.7fr) minmax(150px, 0.8fr);
  gap: 10px;
  align-items: end;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.member-transaction-form .field {
  margin: 0;
}

.member-transaction-form .member-field-wide {
  grid-column: span 2;
}

.member-transaction-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.member-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.member-transaction-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.member-transaction-table th,
.member-transaction-table td {
  padding: 10px 11px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
  text-align: left;
  vertical-align: top;
}

.member-transaction-table th {
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.member-transaction-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.member-transaction-table tr.is-voided {
  opacity: 0.55;
}

.member-table-empty {
  padding: 28px !important;
  color: var(--muted) !important;
  text-align: center !important;
}

.member-confirmation-card {
  margin: 16px 0;
  padding: 16px;
  border: 1px solid #d7c28d;
  border-left: 4px solid #b7862d;
  border-radius: 8px;
  background: #fffaf0;
}

.member-confirmation-detail-pane .member-confirmation-card {
  margin: 18px 20px 20px;
}

.member-confirmation-card.is-complete {
  border-color: #b9d4bf;
  border-left-color: #2f7245;
  background: #f3f8f4;
}

.member-confirmation-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(0, 1.8fr);
  gap: 10px;
  align-items: end;
}

.member-confirmation-grid .field {
  margin: 0;
}

.member-confirmation-grid .member-field-wide {
  grid-column: 1 / -1;
}

.member-shipping-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.member-shipping-fields .member-field-wide {
  grid-column: 1 / -1;
}

.member-cardholder-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.member-traveler-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 12px;
}

.member-traveler-heading span {
  color: var(--muted);
  text-align: right;
}

.member-traveler-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.member-traveler-choice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.member-traveler-choice:has(input:checked) {
  border-color: #2f7245;
  background: #f3f8f4;
}

.member-traveler-choice input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 0;
  padding: 0;
  flex: 0 0 auto;
  margin-top: 3px;
}

.member-traveler-choice span,
.member-traveler-choice small {
  display: block;
  min-width: 0;
}

.member-traveler-choice span {
  flex: 1 1 auto;
  overflow-wrap: anywhere;
}

.member-traveler-choice small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.45;
}

.member-source-warning {
  grid-column: 1 / -1;
  padding: 12px;
  border: 1px solid #d7c28d;
  border-radius: 6px;
  color: #7c5d1b;
  background: #fffaf0;
}

.member-confirmation-trip-info {
  padding-top: 4px;
}

.member-confirmation-trip-info > strong,
.member-subheading {
  display: block;
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 12px;
}

.member-subheading:not(:first-of-type) {
  margin-top: 14px;
}

.member-confirmation-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

@media (max-width: 1120px) {
  .member-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .member-metrics > div {
    border-bottom: 1px solid var(--line);
  }

  .member-transaction-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .members-page,
  .member-confirmation-page {
    padding: 12px;
  }

  .members-page-head,
  .member-confirmation-page-head {
    align-items: stretch;
    flex-direction: column;
  }

  .members-filter-bar,
  .member-confirmation-filter-bar {
    justify-content: stretch;
  }

  .members-filter-bar input,
  .members-filter-bar select,
  .members-filter-bar .btn,
  .member-confirmation-filter-bar input,
  .member-confirmation-filter-bar .btn {
    width: 100%;
  }

  .member-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .members-workbench,
  .member-confirmation-workbench {
    grid-template-columns: minmax(0, 1fr);
  }

  .member-list-pane,
  .member-confirmation-list-pane {
    position: static;
    max-height: 380px;
  }

  .member-profile-metrics,
  .member-contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .member-confirmation-grid,
  .member-shipping-fields,
  .member-cardholder-fields,
  .member-traveler-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .member-confirmation-grid .member-field-wide,
  .member-shipping-fields .member-field-wide {
    grid-column: auto;
  }

  .member-direct-history-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .member-confirmation-metrics,
  .member-metrics,
  .member-profile-metrics,
  .member-contact-grid,
  .member-transaction-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .member-transaction-form .member-field-wide,
  .member-contact-grid .member-address {
    grid-column: auto;
  }

  .member-detail-header {
    flex-direction: column;
  }

  .member-detail-header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .member-confirmation-detail-header {
    flex-direction: column;
  }

  .member-confirmation-detail-pane .member-confirmation-card {
    margin: 12px;
  }

  .member-direct-dialog form {
    padding: 14px;
  }

  .member-direct-dialog-head,
  .member-direct-form-grid,
  .member-direct-history-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .member-direct-dialog-head {
    align-items: stretch;
    flex-direction: column;
  }

  .member-direct-wide,
  .member-direct-history-wide {
    grid-column: auto;
  }
}


/* /styles_app_boards.css */

/* /styles_app_boards_core.css */
.board-page,
.todo-page,
.handoff-page,
.stats-page,
.routing-page {
  min-height: calc(100vh - 96px);
  padding: 20px;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.board-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.board-page-head h2 {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 24px;
}

.board-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.board-actions select {
  min-width: 190px;
  background: #fffdf8;
  font-weight: 850;
}

.board-actions input {
  min-width: min(260px, 100%);
  background: #fffdf8;
}

.board-actions > *,
.case-board-controls > *,
.compact-actions > * {
  min-width: 0;
}

.board-date-filter {
  display: inline-grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.board-date-filter input {
  min-width: 150px;
}

.case-board-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.case-board-summary {
  display: grid;
  gap: 12px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid rgba(20, 61, 42, 0.12);
  border-radius: 8px;
  background: #fbf7ef;
}

.case-board-summary.compact-summary {
  margin: 10px 0 12px;
  padding: 12px;
}

.summary-counters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.summary-counters div {
  padding: 10px;
  border: 1px solid rgba(20, 61, 42, 0.1);
  border-radius: 8px;
  background: var(--surface);
}

.summary-counters span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.summary-counters strong {
  display: block;
  margin-top: 4px;
  color: var(--green);
  font-size: 22px;
  line-height: 1;
}

/* Keep frequent order actions visible and retain supporting actions in-place. */
.case-board-controls .board-more-actions { min-width: 0; max-width: 100%; }
.board-more-actions summary { cursor: pointer; padding: 9px 12px; border: 1px solid rgba(20, 61, 42, .16); border-radius: 6px; color: var(--muted); font-size: 13px; }
.board-more-actions[open] { flex-basis: 100%; }
.board-more-actions-list { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 8px; }
.board-more-actions-list .btn { white-space: normal; }
.board-more-actions summary:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
@media (max-width: 720px) {
  .case-board-controls .board-more-actions summary { text-align: center; }
  .board-more-actions-list { display: grid; grid-template-columns: minmax(0, 1fr); }
}


/* /styles_app_todo_board.css */
.todo-workbench-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.todo-workbench-card {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(20, 61, 42, 0.12);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  cursor: default;
}

.todo-workbench-card span,
.todo-workbench-card small {
  color: var(--muted);
  font-weight: 850;
}

.todo-workbench-card strong {
  color: var(--green);
  font-size: 24px;
  line-height: 1;
}

.todo-workbench-card.danger strong {
  color: #9d2f24;
}

.todo-priority-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.role-workbench-list,
.role-workbench-items {
  display: grid;
  gap: 10px;
}

.role-workbench-group {
  display: grid;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid rgba(20, 61, 42, 0.1);
}

.role-workbench-group:first-child {
  padding-top: 0;
  border-top: 0;
}

.role-workbench-heading,
.role-workbench-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.role-workbench-heading > div,
.role-workbench-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.role-workbench-heading strong,
.role-workbench-copy strong {
  color: var(--green);
}

.role-workbench-heading span,
.role-workbench-copy span,
.role-workbench-copy small {
  color: var(--muted);
}

.role-workbench-item {
  min-height: 68px;
  padding: 12px;
  border: 1px solid rgba(20, 61, 42, 0.14);
  border-left: 4px solid #9db6a7;
  border-radius: 6px;
  background: #f5f8f4;
}

.role-workbench-item.urgent {
  border-left-color: #a64032;
  background: #fff7f3;
}

.role-workbench-empty {
  margin: 0;
  padding: 10px 12px;
  background: #f5f8f4;
}

@media (max-width: 720px) {
  .role-workbench-heading,
  .role-workbench-item {
    align-items: stretch;
    flex-direction: column;
  }

  .role-workbench-item .btn {
    width: 100%;
  }
}

.trend-strip,
.todo-section-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.trend-strip {
  padding: 10px;
  border: 1px solid rgba(20, 61, 42, 0.1);
  border-radius: 8px;
  background: #fffdf8;
}

.trend-strip strong,
.todo-section-heading strong {
  color: var(--green);
  font-size: 13px;
}

.trend-strip span,
.todo-section-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.todo-section {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.todo-note-control {
  display: grid;
  gap: 5px;
  min-width: min(260px, 100%);
  flex: 1 1 260px;
}

.todo-note-control span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.todo-note-control input {
  min-width: 0;
  width: 100%;
  background: #fffdf8;
  font-weight: 750;
}

.todo-priority-strip strong {
  color: var(--green);
  font-size: 13px;
}

.lifecycle-row {
  border-top: 1px solid rgba(20, 61, 42, 0.08);
  padding-top: 10px;
}

.summary-task-row,
.priority-list,
.funnel-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.funnel-row {
  padding: 10px;
  border: 1px solid rgba(20, 61, 42, 0.1);
  border-radius: 8px;
  background: var(--surface);
}

.funnel-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(20, 61, 42, 0.12);
  border-radius: 999px;
  background: #edf8ef;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.funnel-chip strong {
  color: var(--ink);
}

.priority-list {
  display: grid;
}

.priority-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.45fr) minmax(90px, 110px) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid rgba(166, 64, 50, 0.18);
  border-radius: 8px;
  background: #fff9f4;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.priority-row.blocked {
  border-color: rgba(166, 64, 50, 0.32);
  background: #fff0ed;
}

.next-action {
  margin-top: 8px;
  color: var(--green);
  font-weight: 850;
}

.case-stat {
  min-height: 74px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.case-stat.active {
  border-color: var(--green);
  background: #edf8ef;
}

.case-stat span {
  display: block;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 900;
}

.case-stat strong {
  display: block;
  margin-top: 8px;
  color: var(--green);
  font-size: 24px;
  line-height: 1;
}

.case-board-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.52fr);
  gap: 16px;
  align-items: start;
  min-width: 0;
}

.case-board-list,
.case-version-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.list-load-more {
  display: flex;
  justify-content: center;
  padding-top: 12px;
}

.case-board-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, auto);
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbf7ef;
  min-width: 0;
}

.case-board-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.case-board-title strong {
  color: var(--green);
  font-size: 16px;
  line-height: 1.35;
}

.case-board-title .time-pill {
  background: #fff7dc;
  color: #6f5312;
}

.followup-round-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(20, 61, 42, 0.2);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 950;
  line-height: 1.2;
}

.followup-round-badge.first {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.followup-round-badge.final {
  border-color: #9d2f24;
  background: #9d2f24;
  color: #fff;
}

.case-task-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.task-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid rgba(166, 64, 50, 0.22);
  border-radius: 999px;
  background: #fff0ed;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
}

.task-chip.ok {
  border-color: rgba(47, 111, 73, 0.22);
  background: #edf8ef;
  color: var(--ok);
}

.case-board-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.case-board-controls select {
  flex: 1 1 170px;
  max-width: 260px;
  min-height: 38px;
  background: var(--surface);
  font-weight: 850;
}

.case-board-controls .btn {
  flex: 0 0 auto;
}

.todo-list-card {
  max-width: 1120px;
}

.routed-lead-card {
  max-width: 1120px;
  margin-bottom: 16px;
}

.sales-lead-board-card {
  margin-bottom: 16px;
}

.sales-lead-board-list {
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.sales-lead-board-item .case-board-controls {
  grid-template-columns: repeat(2, auto);
}

.handoff-card {
  max-width: 980px;
}

.handoff-summary {
  max-width: 980px;
}

.todo-split-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(360px, 1fr);
  gap: 16px;
  align-items: start;
  min-width: 0;
}

.routed-lead-list {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.routed-lead-editor {
  padding: 14px;
  border: 1px solid rgba(20, 61, 42, 0.12);
  border-radius: 8px;
  background: #fffdf8;
}

.routed-lead-editor h3 {
  margin: 0;
  color: var(--green);
  font-size: 17px;
}

.routed-lead-editor textarea {
  min-height: 96px;
}

.todo-item.overdue {
  border-color: rgba(166, 64, 50, 0.28);
  background: #fff7f3;
}

.todo-item.urgency-critical {
  border-color: rgba(166, 64, 50, 0.46);
  background: #fff0ed;
}

.todo-item.urgency-warning {
  border-color: rgba(194, 166, 117, 0.38);
  background: #fff9ea;
}

.urgency-pill.warning {
  background: #fff7dc;
  color: #6f5312;
}

.urgency-pill.critical {
  background: #ffe3df;
  color: var(--red);
}

.todo-item.active {
  border-color: rgba(20, 61, 42, 0.42);
  background: #edf8ef;
}

.todo-item .case-board-controls {
  grid-template-columns: minmax(190px, 1fr) repeat(3, auto);
}

.todo-stage-control {
  display: grid;
  flex: 1 1 190px;
  gap: 4px;
  min-width: 190px;
  max-width: 260px;
  margin: 0;
}

.todo-stage-control span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
}

.todo-stage-control select {
  min-height: 36px;
  padding: 7px 9px;
  font-size: 13px;
}

.todo-required-hint {
  align-self: center;
  max-width: 180px;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}

/* Original task context stays compact on both the queue and order pages. */
.workbench-return-bar { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-block:0 12px; padding:8px 12px; border:1px solid var(--line); border-radius:6px; background:var(--surface); }
.workbench-return-bar[hidden] { display:none; }
.workbench-return-bar span { min-width:0; overflow-wrap:anywhere; color:var(--muted); font-size:12px; }
.workbench-return-bar .btn { min-height:40px; }
.workbench-handling-note { min-width:0; font-size:12px; line-height:1.6; }
.workbench-handling-note summary { cursor:pointer; overflow-wrap:anywhere; }
.workbench-handling-note p { white-space:pre-wrap; overflow-wrap:anywhere; margin:4px 0 0; }
[data-delivery-exception-task]:focus { outline:2px solid var(--green); outline-offset:4px; }
[data-delivery-region] { scroll-margin-block-start:calc(var(--workspace-topbar-height, 64px) + 24px); }

.workbench-return-bar { position:sticky; top:var(--workspace-topbar-height, 64px); z-index:12; }
#financePage:has([data-workbench-return-bar]:not([hidden])) [data-finance-region],
#deliveryPage:has([data-workbench-return-bar]:not([hidden])) [data-delivery-region] { scroll-margin-block-start:calc(var(--workspace-topbar-height, 64px) + 90px); }

/* Keep the work queue above secondary statistics, including on narrow screens. */
#todoSummary .todo-workbench-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
#todoSummary .todo-workbench-card { display: flex; flex-direction: column; gap: 8px; padding: 12px; cursor: pointer; }
#todoSummary .todo-workbench-card span { font-size: 12px; font-weight: 600; }
#todoSummary .todo-workbench-card strong { font-size: 25px; }
#todoSummary .todo-summary-details { margin-top: 12px; }
#todoSummary .todo-summary-details summary { width: fit-content; cursor: pointer; color: var(--muted); font-size: 13px; padding: 6px 0; }
#todoSummary .summary-counters { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); overflow: visible; gap: 8px; margin-top: 8px; }
#todoSummary .summary-counters > div { min-width: 0; }
#todoSummary > .summary-counters { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-flow: row; grid-auto-columns: auto; }
#todoSummary .todo-priority-strip { align-items: flex-start; }
#todoSummary .priority-pill { white-space: normal; overflow-wrap: anywhere; }
#todoSummary button:focus-visible, #todoSummary summary:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
@media (max-width: 380px) {
  #todoSummary .todo-workbench-card { padding: 10px 8px; }
  #todoSummary .todo-workbench-card strong { font-size: 22px; }
}

#financePage:has([data-workbench-return-bar]:not([hidden])),
#deliveryPage:has([data-workbench-return-bar]:not([hidden])) { overflow-x:clip; }
.workbench-return-bar { order:4; }
#financePage:has([data-workbench-return-bar]:not([hidden])) #financeReconciliationPanel { scroll-margin-block-start:calc(var(--workspace-topbar-height, 64px) + 90px); }

.todo-empty-info summary { color: var(--muted); font-size: 13px; cursor: pointer; padding: 4px 0; }
.todo-empty-info summary:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

.workbench-empty-modules { border-top:1px solid var(--line); padding-block:10px; color:var(--muted); }
.workbench-empty-modules summary { cursor:pointer; font-size:13px; }
.workbench-empty-modules p { margin:6px 0 0; }

.workbench-return-bar span { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }

#financeCash{padding:20px;margin-block:20px}
#financeCash [data-summary]{display:grid;gap:10px;margin-block:16px}
#financeCash [data-summary] p{margin:0;padding:12px;background:var(--surface-soft);border-radius:8px;line-height:1.8}
#financeCash .refund-card{padding:16px;margin-top:12px;overflow-wrap:anywhere}
#financeCash .refund-card .btn{margin:6px 8px 0 0}
@media(max-width:768px){#financeCash{padding:14px}}


/* /styles_app_stats.css */
.stats-table-card,
.stats-detail-card {
  max-width: 1280px;
  width: 100%;
  margin-bottom: 16px;
}

.stats-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

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

.stats-table th,
.stats-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  text-align: center;
  white-space: nowrap;
}

.stats-table th {
  background: #f4efe5;
  color: var(--green);
  font-weight: 950;
}

.stats-table td {
  font-weight: 850;
}

.stats-total-row td {
  background: #fbf7ef;
  font-size: 15px;
}

.stats-detail-item {
  grid-template-columns: minmax(0, 1fr) auto;
}

.metric-card-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.metric-card {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(20, 61, 42, 0.1);
  border-radius: 8px;
  background: var(--surface);
}

.metric-card span,
.metric-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.metric-card strong {
  color: var(--green);
  font-size: 24px;
  line-height: 1;
}

.compact-actions {
  display: flex;
  gap: 8px;
}


/* /styles_app_routing.css */
.routing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.48fr);
  gap: 16px;
  align-items: start;
  min-width: 0;
}

.routing-form-card textarea {
  min-height: 88px;
}

.routing-form-card #routingRawInquiry,
.routing-form-card #routingHandoffSummary,
.routing-form-card #routingOther {
  min-height: 112px;
}

.routing-list {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 320px);
  overflow: auto;
  padding-right: 4px;
}

.routing-item {
  grid-template-columns: minmax(0, 1fr) auto;
}

.routing-item .case-board-controls {
  grid-template-columns: repeat(3, auto);
}

.routing-todo .case-board-controls {
  grid-template-columns: minmax(190px, 1fr) repeat(3, auto);
}

.case-version-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbf7ef;
}


/* /styles_app_templates.css */
.template-filter-card {
  background: #fbf7ef;
}

.grid.three {
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.72fr) auto;
}

.template-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.template-page-head h2 {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 24px;
}

.template-manager-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(360px, 1.18fr);
  gap: 16px;
  align-items: start;
  min-width: 0;
}

.template-manager-form {
  display: grid;
  gap: 12px;
}

.template-manager-form .full {
  grid-column: 1 / -1;
}

.template-manager-form textarea {
  min-height: 116px;
}

.template-manager-form .grid.two {
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}


/* /styles_app_admin.css */
.admin-backup-panel,
.admin-user-panel,
.admin-quality-panel,
.admin-error-panel {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid rgba(20, 61, 42, 0.14);
  border-radius: 8px;
  background: #fbf7ef;
}

.backup-list {
  margin-top: 2px;
}

.error-log-list {
  margin-top: 4px;
}

.management-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.management-grid > div {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.management-grid > .management-operations-panel {
  grid-column: 1 / -1;
}

.compact-list {
  margin-top: 0;
}

.compact-list li,
.data-quality-list li {
  display: grid;
  gap: 4px;
}

.data-quality-item.severity-critical strong {
  color: #9d2f24;
}

.data-quality-item.severity-warning strong {
  color: #8a5a20;
}

.user-list {
  margin-top: 4px;
}

.user-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.user-list-item.is-disabled {
  opacity: 0.72;
}

.user-row-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.user-row-main span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.user-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.user-role-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.user-role-fieldset legend {
  margin-bottom: 7px;
  font-weight: 700;
}

.user-role-choices {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 7px;
}

.user-role-choices.is-compact {
  max-width: 430px;
  justify-content: flex-end;
}

.user-role-choice {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid rgba(20, 61, 42, 0.18);
  border-radius: 6px;
  background: #fff;
  color: #254638;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.2;
}

.user-role-choice:has(input:checked) {
  border-color: #1f6b4e;
  background: #eaf4ee;
  color: #164c39;
}

.user-role-choice:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.65;
}

.user-role-choice input {
  width: 15px;
  height: 15px;
  margin: 0;
}

.feedback-list .user-row-actions button {
  width: auto;
  border: 1px solid rgba(166, 64, 50, 0.32);
  padding: 0 11px;
  text-align: center;
}

.storage-status {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(20, 61, 42, 0.12);
  border-radius: 8px;
  background: #fffaf1;
}

.storage-status p {
  margin: 0;
}

.backup-restore-btn {
  margin-top: 6px;
}

.template-manager-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.admin-business-options-panel {
  padding-block: 20px;
  border-top: 1px solid var(--line);
}

.option-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 12px;
}

.business-option-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.business-option-item > button:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
  text-align: left;
}

.business-option-item > button:first-child span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.business-option-item.is-disabled {
  opacity: 0.62;
}
.management-operations-panel .compact-list li {
  display: grid;
  grid-template-columns: minmax(8rem, 0.8fr) minmax(12rem, 1.8fr) auto;
  align-items: center;
  gap: 0.75rem;
}

.management-drilldown {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.management-drilldown .case-board-list {
  max-height: 28rem;
  overflow: auto;
}

.ops-slo-breached {
  border-left: 3px solid var(--danger, #a23a32);
  padding-left: 0.75rem;
}

@media (max-width: 760px) {
  .management-operations-panel .compact-list li {
    grid-template-columns: 1fr auto;
  }

  .management-operations-panel .compact-list li > span {
    grid-column: 1 / -1;
  }
}

/* Admin status paths and release identifiers must wrap within narrow workspaces. */
#adminPanel { min-width: 0; overflow-wrap: anywhere; }
#adminPanel select { min-width: 0; max-width: 100%; }
#adminPanel .admin-backup-panel,
#adminPanel .admin-user-panel,
#adminPanel .admin-quality-panel,
#adminPanel .admin-error-panel { grid-template-columns: minmax(0, 1fr); }

/* Account-only management must stay hidden despite section layout rules. */
#adminPanel .account-scope-hidden { display: none !important; }

/* Capacity facts keep wide comparison tables inside their own scroll region. */
#opsCapacity { margin-top: 1.5rem; min-width: 0; }
#opsCapacity details { margin: 1rem 0; }
#opsCapacity summary { cursor: pointer; font-weight: 600; }
#opsCapacity .capacity-table-wrap { max-width: 100%; overflow-x: auto; }
#opsCapacity table { width: 100%; min-width: 32rem; border-collapse: collapse; }
#opsCapacity th, #opsCapacity td { padding: .65rem; text-align: left; border-bottom: 1px solid var(--line, #d9e2dd); }
#opsCapacity th { background: var(--soft, #f2f6f3); }
#opsCapacity .small { overflow-wrap: anywhere; }



/* /styles_app_tables_preview.css */

.compact-heading h2 {
  font-size: 15px;
}

.trip-row-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.date-mode-control {
  display: inline-flex;
  white-space: nowrap;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.date-mode-control select {
  min-height: 34px;
  border: 1px solid var(--line);
  background: #fffdf8;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  padding: 0 28px 0 10px;
}

.trip-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.table-meta-grid {
  grid-template-columns: minmax(260px, 1.35fr) repeat(2, minmax(140px, 0.85fr));
  gap: 12px;
}

.table-meta-grid .field:first-child {
  grid-row: span 2;
}

.table-meta-grid textarea {
  min-height: 126px;
}

.table-meta-grid select {
  min-height: 46px;
  background: #fffdf8;
  font-weight: 850;
}

.vehicle-choice-group {
  display: flex;
  min-height: 46px;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.vehicle-choice {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.vehicle-choice input {
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--green);
}

.vehicle-choice:has(input:checked) {
  border-color: var(--green);
  background: #eef5ef;
}

.fixed-service-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(184, 155, 100, 0.42);
  border-radius: 8px;
  background: #fbf7ef;
  color: var(--green);
}

.fixed-service-note span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.fixed-service-note strong {
  font-size: 14px;
  line-height: 1.35;
  text-align: right;
}

.editable-table-wrap {
  overflow-x: auto;
  border: 1px solid #111;
  background: #fff;
}

.editable-trip-table {
  width: 100%;
  min-width: 1260px;
  border-collapse: collapse;
  table-layout: fixed;
}

.editable-trip-table th,
.editable-trip-table td {
  border: 1px solid #111;
  padding: 0;
  vertical-align: top;
}

.editable-trip-table th {
  background: #fff800;
  font-size: 13px;
  line-height: 1.25;
  padding: 9px;
  text-align: center;
}

.editable-trip-table th:nth-child(1) { width: 58px; }
.editable-trip-table th:nth-child(2) { width: 112px; }
.editable-trip-table th:nth-child(3) { width: 590px; }
.editable-trip-table th:nth-child(4) { width: 170px; }
.editable-trip-table th:nth-child(5) { width: 220px; }
.editable-trip-table th:nth-child(6) { width: 110px; }

.editable-trip-table textarea {
  min-height: 118px;
  border: 0;
  border-radius: 0;
  background: #fff;
  resize: vertical;
  font-size: 14px;
  line-height: 1.55;
  padding: 12px;
}

.editable-trip-table td:nth-child(3) textarea {
  min-height: 152px;
}

.editable-trip-table td:nth-child(5) textarea {
  min-height: 132px;
}

.trip-sort-cell {
  background: #fffdf5;
  text-align: center;
  vertical-align: middle !important;
}

.row-drag-handle {
  width: 34px;
  min-height: 42px;
  border: 1px solid rgba(20, 61, 42, 0.22);
  border-radius: 6px;
  background: #f4f0e8;
  color: var(--green);
  font-size: 18px;
  font-weight: 900;
  cursor: grab;
}

.row-drag-handle:active {
  cursor: grabbing;
}

.trip-row-action-cell {
  padding: 8px !important;
  background: #fffdf5;
}

.trip-row-action-cell .btn {
  width: 100%;
  margin-bottom: 7px;
}

.trip-row-action-cell .btn:last-child {
  margin-bottom: 0;
}

.editable-trip-table tr.dragging {
  opacity: 0.52;
}

.editable-trip-table tr.drag-over td {
  box-shadow: inset 0 3px 0 var(--green);
}

#tableRemarks {
  min-height: 190px;
}

.editable-trip-table textarea:focus {
  box-shadow: inset 0 0 0 2px rgba(20, 61, 42, 0.28);
}

.editable-trip-table textarea.readonly-date {
  background: #f2f7f1;
  color: var(--green);
  font-weight: 900;
  text-align: center;
}

.guide-sheet-card .section-heading {
  align-items: flex-start;
}

.guide-sheet-card .section-heading h2 {
  margin-bottom: 4px;
}

.guide-sheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.guide-table-wrap {
  background: #f7f7f7;
}

.guide-edit-table {
  min-width: 1860px;
}

.guide-edit-table th {
  font-size: 12px;
  line-height: 1.2;
}

.guide-edit-table th:nth-child(1) { width: 128px; }
.guide-edit-table th:nth-child(2) { width: 96px; }
.guide-edit-table th:nth-child(3) { width: 92px; }
.guide-edit-table th:nth-child(4) { width: 300px; }
.guide-edit-table th:nth-child(5) { width: 150px; }
.guide-edit-table th:nth-child(6) { width: 135px; }
.guide-edit-table th:nth-child(7) { width: 86px; }
.guide-edit-table th:nth-child(8) { width: 180px; }
.guide-edit-table th:nth-child(9) { width: 140px; }
.guide-edit-table th:nth-child(10) { width: 140px; }
.guide-edit-table th:nth-child(11) { width: 82px; }
.guide-edit-table th:nth-child(12) { width: 116px; }
.guide-edit-table th:nth-child(13) { width: 220px; }

.guide-edit-table textarea {
  min-height: 92px;
  font-size: 13px;
  line-height: 1.45;
  padding: 9px;
}

.guide-edit-table td:nth-child(4) textarea,
.guide-edit-table td:nth-child(13) textarea {
  min-height: 118px;
}

.guide-day-extra td {
  background: #fbfaf6;
}

.guide-shared-cell {
  display: grid;
  place-items: center;
  min-height: 92px;
  padding: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  font-weight: 900;
  text-align: center;
  background: #f1efe8;
}

.guide-row-actions-cell {
  min-width: 128px;
}

.guide-edit-table th:first-child,
.guide-edit-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #f7f7f7;
  box-shadow: 1px 0 0 var(--line);
}

.guide-edit-table th:first-child {
  z-index: 5;
  background: var(--forest);
}

.guide-edit-table .guide-day-extra td:first-child {
  background: #fbfaf6;
}

.guide-row-actions-cell .btn {
  width: 100%;
  justify-content: center;
  margin-bottom: 6px;
  white-space: nowrap;
}

.guide-hotel-info-field {
  margin-top: 14px;
}

.guide-hotel-info-field textarea {
  min-height: 120px;
}

.preview-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.preview-caption {
  margin: 4px 0 0;
}

.preview-switch .btn.active {
  background: var(--green);
  border-color: var(--green);
  color: #fffaf0;
}

.empty-preview {
  padding: 40px;
  text-align: center;
  color: var(--muted);
}

.empty-preview h3 {
  margin: 0 0 8px;
  color: var(--green);
}

.trip-table-sheet {
  width: min(100%, 960px);
  margin: 0 auto;
  background: #fff;
  color: #000;
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.trip-preview-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
}

.trip-preview-table th,
.trip-preview-table td {
  border: 1px solid #111;
  padding: 8px 10px;
  color: #000;
  font-size: 15px;
  line-height: 1.35;
  vertical-align: middle;
  white-space: pre-wrap;
}

.trip-preview-table th {
  text-align: center;
  font-weight: 800;
}

.trip-preview-table .meta-row th {
  background: #ffb612;
  width: 105px;
}

.trip-preview-table .meta-row td:nth-child(2) {
  width: 46%;
  text-align: center;
}

.trip-preview-table .meta-row td:nth-child(4) {
  width: 31%;
  text-align: center;
}

.trip-preview-table .meta-row span {
  font-weight: 700;
}

.trip-preview-table .tall th,
.trip-preview-table .tall td {
  min-height: 72px;
}

.trip-preview-table .trip-title-row th,
.trip-preview-table .trip-column-row th,
.trip-preview-table .service-row td {
  background: #fff800;
  text-align: center;
  font-weight: 900;
}

.trip-preview-table .date-cell {
  width: 105px;
  text-align: center;
}

.trip-preview-table .overview-cell {
  width: 46%;
  min-height: 88px;
}

.trip-preview-table .hotel-cell {
  width: 140px;
  text-align: center;
}

.trip-preview-table .remarks-cell {
  width: 30%;
  text-align: center;
}

.trip-preview-table .bottom-remarks th,
.trip-preview-table .bottom-remarks td {
  background: #ffa70b;
  font-weight: 800;
}

.trip-preview-table .bottom-remarks td {
  text-align: left;
}

.guide-sheet-preview {
  width: min(100%, 1180px);
  margin: 0 auto;
  overflow-x: auto;
  background: #fff;
  color: #000;
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.guide-preview-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
}

.guide-preview-table th,
.guide-preview-table td {
  border: 1px solid #111;
  padding: 8px 9px;
  color: #000;
  font-size: 13px;
  line-height: 1.28;
  text-align: center;
  vertical-align: middle;
  white-space: pre-wrap;
  word-break: break-word;
}

.guide-preview-table th {
  background: #fff800;
  font-weight: 900;
}

.guide-meta-table th {
  background: #ffb612;
  width: 120px;
}

.guide-meta-table td {
  height: 48px;
  font-weight: 700;
}

.guide-itinerary-table {
  margin-top: 0;
}

.guide-itinerary-table .guide-title-row th {
  background: #fff800;
  font-size: 15px;
}

.guide-itinerary-table tbody tr:nth-child(5n + 1) td { background: #fff8e4; }
.guide-itinerary-table tbody tr:nth-child(5n + 2) td { background: #e9f7ff; }
.guide-itinerary-table tbody tr:nth-child(5n + 3) td { background: #ffeaea; }
.guide-itinerary-table tbody tr:nth-child(5n + 4) td { background: #edf9ee; }
.guide-itinerary-table tbody tr:nth-child(5n) td { background: #edf3ff; }

.guide-itinerary-table .activity-cell {
  text-align: left;
  font-weight: 800;
}

.guide-preview-hotel-info {
  min-width: 1180px;
  border: 1px solid #111;
  border-top: 0;
}

.guide-preview-hotel-info h3 {
  margin: 0;
  padding: 10px;
  border-bottom: 1px solid #111;
  background: #ffb612;
  color: #000;
  font-size: 14px;
  text-align: center;
}

.guide-preview-hotel-info pre {
  margin: 0;
  padding: 12px;
  color: #000;
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.login {
  background:
    radial-gradient(circle at 20% 10%, rgba(182, 138, 58, 0.14), transparent 32%),
    linear-gradient(135deg, #0f2f28, #173d31 48%, #f6f7f3 48%);
}

.login-card {
  width: min(420px, 100%);
  padding: 28px;
}

.brand {
  color: var(--green);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
}

.toast {
  right: 24px;
  bottom: 24px;
  border-radius: 8px;
  background: var(--green);
}

.editor-scroll-table { max-height: min(680px, 65vh); overflow: auto; position: relative; scroll-padding-top: 64px; }
.editor-scroll-table thead th { position: sticky; top: 0; z-index: 4; }
.editor-scroll-table td:first-child, .editor-scroll-table th:first-child { position: sticky; left: 0; z-index: 2; background: #fffdf5; }
.editor-scroll-table td:nth-child(2), .editor-scroll-table th:nth-child(2) { position: sticky; left: 58px; z-index: 2; background: #fffdf5; }
.editor-scroll-table.guide-table-wrap td:nth-child(2), .editor-scroll-table.guide-table-wrap th:nth-child(2) { left: 128px; }
.editor-scroll-table thead th:first-child, .editor-scroll-table thead th:nth-child(2) { z-index: 5; }
.editor-day-nav { display: flex; align-items: center; gap: 8px; margin: 8px 0; color: var(--green); font-size: 13px; }
.editor-day-nav select { width: auto; max-width: 100%; min-height: 36px; }
.editor-undo { display:flex; align-items:center; gap:12px; flex-wrap:wrap; padding:10px; background:#fff7e8; color:#70551f; }
@media (max-width: 480px) {
  .editor-scroll-table td:first-child, .editor-scroll-table th:first-child { position: static; }
  .editor-scroll-table td:nth-child(2), .editor-scroll-table th:nth-child(2), .editor-scroll-table.guide-table-wrap td:nth-child(2), .editor-scroll-table.guide-table-wrap th:nth-child(2) { left:0; }
}

  .offline-sync-banner {
    position: fixed;
    z-index: 1200;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: min(92vw, 720px);
    padding: 10px 12px 10px 16px;
    border: 1px solid #c7a25d;
    border-radius: 6px;
    background: #fff7e5;
    color: #4b3b1f;
    box-shadow: 0 12px 34px rgba(18, 35, 28, 0.18);
  }

  .offline-sync-banner.is-attention {
    border-color: #b84437;
    background: #fff0ed;
    color: #7b2c23;
  }

.collaboration-presence {
  display: flex;
  align-items: center;
  gap: 10px;
  grid-column: 1 / -1;
  width: 100%;
  margin-bottom: 10px;
  padding: 9px 11px;
  border-left: 3px solid #b68124;
  background: #fff7e5;
  color: #573f17;
}

.collaboration-presence strong,
.collaboration-presence span {
  font-size: 12px;
  line-height: 1.4;
}

.collaboration-presence span { color: #796540; }

@media (max-width: 620px) {
  .offline-sync-banner,
  .collaboration-presence {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* /styles_responsive.css */
@media (max-width: 1240px) {
  .app-shell {
    grid-template-columns: 248px minmax(0, 1fr);
  }

  .workflow-tab {
    min-height: 58px;
  }

  .layout,
  .output-grid,
  .template-manager-grid,
  .image-grid,
  .guide-grid,
  .case-board-grid,
  .todo-split-grid,
  .routing-grid,
  .case-board-item {
    grid-template-columns: 1fr;
  }

  .case-board-controls {
    justify-content: flex-start;
  }

  .deal-editor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar,
  .composer-panel {
    position: static;
    max-height: none;
  }

  .cockpit-grid,
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .case-board-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .todo-workbench-grid,
  .management-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sales-lead-board-list,
  .routing-list,
  .routed-lead-list {
    max-height: none;
  }
}

@media (max-width: 1024px) {
  .app-shell {
    display: block;
  }

  .app-rail {
    position: static;
    height: auto;
    padding: 14px;
  }

  .workflow-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .workflow-tab {
    min-width: 220px;
  }

  .rail-footer {
    grid-template-columns: 1fr auto auto;
    align-items: center;
  }

  .topbar {
    position: static;
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 18px;
  }

  .topbar.context-compact {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .guide-source-card {
    position: sticky;
    top: 12px;
    max-height: none;
  }

  .layout,
  .layout.page-archive,
  .layout.page-admin,
  .template-page,
  .image-page,
  .guide-page,
  .board-page,
  .todo-page,
  .handoff-page,
  .stats-page,
  .routing-page {
    padding: 14px;
  }

  .grid,
  .grid.three,
  .guide-flight-grid,
  .case-board-stats,
  .case-board-grid,
  .case-board-item,
  .todo-workbench-grid,
  .todo-split-grid,
  .routing-grid,
  .routing-item,
  .management-grid,
  .cockpit-grid,
  .cards {
    grid-template-columns: 1fr;
  }

  .deal-editor-grid {
    grid-template-columns: 1fr;
  }

  .routing-list,
  .routed-lead-list,
  .sales-lead-board-list {
    max-height: none;
  }

  .timeline-row {
    grid-template-columns: 1fr;
  }

  .case-board-controls {
    justify-content: flex-start;
  }

  .board-actions,
  .userbar,
  .doc-actions,
  .compact-actions {
    justify-content: flex-start;
  }

  .board-actions input,
  .board-actions select,
  .board-date-filter,
  .board-date-filter input {
    width: 100%;
    min-width: 0;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .stats-table-card,
  .stats-detail-card {
    max-width: 100%;
  }

  .priority-row {
    grid-template-columns: 1fr;
  }

  .doc-head,
  .cockpit-head,
  .board-page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .doc-toolbar {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .case-board-stats,
  .summary-counters,
  .todo-workbench-grid,
  .management-grid {
    grid-template-columns: 1fr;
  }

  .case-board-item,
  .routing-item,
  .stats-detail-item,
  .user-list-item {
    grid-template-columns: 1fr;
  }

  .case-board-controls,
  .todo-item .case-board-controls,
  .routing-todo .case-board-controls,
  .routing-item .case-board-controls,
  .sales-lead-board-item .case-board-controls {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .case-board-controls .btn,
  .case-board-controls select,
  .compact-actions .btn {
    width: 100%;
    max-width: none;
  }

  .user-row-actions,
  .user-role-choices.is-compact {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .rail-brand {
    grid-template-columns: 38px 1fr;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    font-size: 14px;
  }

  .workflow-tab {
    min-width: 190px;
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .tab-index {
    width: 30px;
    height: 30px;
  }

  .rail-footer {
    grid-template-columns: 1fr;
  }

  .status-banner,
  .draft-banner {
    grid-template-columns: 1fr;
  }

  .image-customer-search {
    grid-template-columns: 1fr;
  }

  .template-insert-grid,
  .template-manager-form .grid.two,
  .case-board-controls {
    grid-template-columns: 1fr;
  }

  .case-board-controls .btn,
  .case-board-controls select,
  .todo-stage-control {
    flex: 1 1 100%;
    width: 100%;
    max-width: none;
  }

  .template-actions {
    justify-content: flex-start;
  }

  .template-manager-actions {
    justify-content: flex-start;
  }

  .section,
  .sales-cockpit,
  .card,
  .composer-panel {
    padding: 14px;
  }

  .tabs {
    display: flex;
    width: 100%;
  }

  .tab {
    flex: 1;
  }
}


/* /styles_notifications.css */
.notification-toolbar {
  display: flex;
  justify-content: flex-end;
}

.notification-trigger {
  position: relative;
  min-width: 72px;
}

.notification-badge {
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
}

.notification-dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 40px));
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.notification-dialog::backdrop {
  background: rgba(15, 31, 25, 0.42);
}

.notification-dialog-head,
.notification-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.notification-dialog-head h2 {
  margin: 3px 0 0;
  font-size: 20px;
}

.notification-dialog-actions {
  padding-block: 12px;
  background: var(--surface-2);
}

.notification-list {
  max-height: 500px;
  overflow-y: auto;
}

.notification-item {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.notification-item:not(.is-read) {
  border-left: 4px solid var(--gold);
  background: #fffdf7;
}

.notification-item[data-urgency="warning"] {
  border-left-color: #c67a20;
  background: #fff9ef;
}

.notification-item[data-urgency="critical"] {
  border-left-color: #a83f32;
  background: #fff4f2;
}

.notification-item-button {
  width: 100%;
  display: grid;
  gap: 6px;
  padding: 16px 20px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.notification-item-button:hover,
.notification-item-button:focus-visible {
  background: var(--surface-3);
}

.notification-item-button strong,
.notification-item-button span,
.notification-item-button small {
  overflow-wrap: anywhere;
}

.notification-item-button span {
  color: var(--muted);
  line-height: 1.5;
}

.notification-item-button small {
  color: var(--muted);
}

.notification-empty {
  margin: 0;
  padding: 32px 20px;
  color: var(--muted);
  text-align: center;
}

#loadMoreNotificationsBtn {
  margin: 12px 20px 18px;
}

@media (max-width: 720px) {
  .notification-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }
}


/* /styles_observability.css */
.admin-observability-panel {
  border-top: 1px solid var(--line, #d7ddd8);
  margin-top: 24px;
  padding-top: 22px;
}

.ops-metric-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin: 12px 0 18px;
}

.ops-metric-item {
  background: #f4f7f4;
  border: 1px solid #d8e0da;
  border-radius: 6px;
  min-height: 72px;
  padding: 10px 12px;
}

.ops-metric-item strong,
.ops-metric-item span {
  display: block;
}

.ops-metric-item strong {
  color: #174d39;
  font-size: 20px;
  margin-top: 4px;
}

.ops-diagnostic-columns {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.ops-diagnostic-columns h3 {
  font-size: 14px;
  margin: 0 0 8px;
}

.compact-diagnostic-list li,
.workflow-diagnostic-list li {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.compact-diagnostic-list span,
.workflow-diagnostic-list span {
  color: #66736b;
  font-size: 12px;
}

.inline-search-row {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.workflow-diagnostic-search {
  margin-top: 18px;
}

.workflow-diagnostic-list .diagnostic-error strong {
  color: #9a332b;
}

.workflow-diagnostic-list .diagnostic-processing strong {
  color: #7b5a10;
}

@media (max-width: 760px) {
  .ops-diagnostic-columns,
  .inline-search-row {
    grid-template-columns: 1fr;
  }
}


/* /styles_ai_usage.css */
.ai-usage-page { min-width: 0; display: grid; gap: 16px; padding: 24px; }
.ai-usage-page.hidden { display: none; }
.ai-usage-page > * { min-width: 0; }
.ai-usage-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.ai-usage-filters label { display: grid; gap: 6px; flex: 1 1 140px; min-width: 0; }
.ai-usage-filters select, .ai-usage-filters input { width: 100%; min-width: 0; min-height: 44px; }
.ai-usage-dates { display: flex; gap: 12px; flex: 2 1 280px; min-width: 0; }
.ai-usage-dates.hidden { display: none; }
.ai-usage-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border: 1px solid var(--line); background: var(--surface); border-radius: 12px; }
.ai-usage-stat { display: grid; align-content: start; gap: 10px; padding: 20px; min-width: 0; }
.ai-usage-stat + .ai-usage-stat { border-left: 1px solid var(--line); }
.ai-usage-stat span, .ai-usage-stat small { color: var(--muted); }
.ai-usage-stat strong { font-size: clamp(20px,2vw,30px); color: var(--green); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.ai-usage-page h3 { margin-top: 24px; }
.ai-usage-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; margin: 12px 0; }
.ai-usage-scroll table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ai-usage-scroll th, .ai-usage-scroll td { padding: 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ai-usage-scroll th { color: var(--green); background: var(--surface); font-size: 13px; }
.ai-usage-scroll td { font-size: 14px; }
.ai-usage-scroll:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.ai-usage-note { line-height: 1.7; color: var(--muted); }
.ai-usage-page details { margin-top: 16px; }
.ai-usage-page summary { cursor: pointer; padding: 10px 0; }
@media(max-width:1024px) {
  .ai-usage-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ai-usage-stat:nth-child(3) { border-left: 0; }
  .ai-usage-stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media(max-width:480px) {
  .ai-usage-page { padding: 16px; }
  .ai-usage-stat { padding: 16px; }
  .ai-usage-dates { flex-wrap: wrap; }
}
@media(max-width:360px) {
  .ai-usage-summary { grid-template-columns: minmax(0,1fr); }
  .ai-usage-stat + .ai-usage-stat { border-left: 0; border-top: 1px solid var(--line); }
}


/* /styles_wiki.css */
.wiki-page {
  min-width: 0;
  padding: 0 24px 32px;
}

.wiki-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0 16px;
  border-bottom: 1px solid var(--line, #d7ded9);
}

.wiki-toolbar h2 {
  margin: 3px 0 4px;
  font-size: 24px;
}

/* The later workspace stylesheet turns generic filter bars into horizontal
   scrollers on phones. Wiki search keeps a wrapping grid in its own scope. */
.wiki-page .wiki-search-controls {
  display: grid;
  grid-template-columns: minmax(128px, 190px) minmax(200px, 420px) auto;
  min-width: 0;
  max-width: 100%;
  overflow-x: visible;
  overflow-y: visible;
  gap: 8px;
  align-items: center;
}

.wiki-page .wiki-search-controls > * {
  min-width: 0;
  max-width: 100%;
}

.wiki-page .wiki-search-controls input,
.wiki-page .wiki-search-controls select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 40px;
}

.wiki-workbench {
  display: grid;
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr) minmax(170px, 220px);
  min-height: calc(100vh - 196px);
}

.wiki-sidebar,
.wiki-outline {
  min-width: 0;
  background: #f7faf8;
}

.wiki-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  max-height: calc(100vh - 128px);
  overflow-y: auto;
  border-right: 1px solid var(--line, #d7ded9);
  padding: 18px 14px 24px 0;
  scrollbar-width: thin;
}

.wiki-sidebar-head,
.wiki-outline-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.wiki-sidebar-head > strong {
  flex: 1;
  min-width: 0;
}

.wiki-page .icon-button {
  flex-shrink: 0;
}

.wiki-page .icon-button:disabled {
  opacity: .45;
  cursor: default;
}

.wiki-page :is(button, summary, input, select, a):focus-visible {
  outline: 2px solid var(--brand, #174c3b);
  outline-offset: 2px;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line, #cad5ce);
  border-radius: 6px;
  background: #fff;
  color: #174c3b;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.wiki-shortcut,
.wiki-folder.depth-0 {
  border-top: 1px solid #e2e8e4;
  padding: 7px 0;
}

.wiki-navigation summary {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 4px 4px 4px calc(5px + var(--wiki-depth, 0) * 13px);
  border-radius: 4px;
  cursor: pointer;
  color: #29483d;
  font-weight: 700;
  list-style: none;
}

.wiki-navigation summary:hover {
  background: #edf3ef;
}

.wiki-navigation summary::-webkit-details-marker {
  display: none;
}

.wiki-folder > summary::before,
.wiki-shortcut > summary::before {
  flex: 0 0 auto;
  content: "›";
  color: #74827b;
  font-size: 18px;
  line-height: 1;
  transform-origin: 50% 50%;
  transition: transform 140ms ease;
}

.wiki-folder[open] > summary::before,
.wiki-shortcut[open] > summary::before {
  transform: rotate(90deg);
}

.wiki-folder.depth-0 > summary {
  color: #103f31;
  font-size: 15px;
}

.wiki-folder.depth-1 > summary {
  font-weight: 650;
}

.wiki-folder.depth-2 > summary,
.wiki-folder.depth-3 > summary,
.wiki-folder.depth-4 > summary {
  color: #51645c;
  font-size: 13px;
  font-weight: 600;
}

.wiki-folder-label {
  min-width: 0;
  flex: 1 1 auto;
  overflow-wrap: anywhere;
}

.wiki-nav-count {
  flex: 0 0 auto;
  color: #76847d;
  font-size: 12px;
  font-weight: 500;
}

.wiki-nav-list,
.wiki-search-results {
  display: grid;
  gap: 2px;
  margin-top: 8px;
}

.wiki-nav-item {
  display: block;
  width: 100%;
  padding: 7px 8px 7px calc(10px + var(--wiki-depth, 0) * 13px);
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 0 4px 4px 0;
  background: transparent;
  color: #3d4c46;
  text-align: left;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.wiki-nav-item:hover,
.wiki-nav-item.active {
  border-left-color: #b38a36;
  background: #eef4f0;
  color: #103f31;
}

.wiki-nav-item small {
  display: block;
  margin-top: 3px;
  color: #7a8781;
  line-height: 1.35;
}

.wiki-article {
  min-width: 0;
  padding: 30px clamp(24px, 4vw, 64px) 72px;
  background: #fff;
  color: #25332e;
}

.wiki-document {
  max-width: 860px;
  margin: 0 auto;
}

/* Keep deep-linked answers visible below the system's fixed top bar. */
.wiki-body :is(h2, h3, h4, h5, h6)[id] { scroll-margin-top: 80px; }

.wiki-document-head {
  padding-bottom: 18px;
  border-bottom: 1px solid #dce4df;
}

.wiki-document-head h1 {
  margin: 5px 0 9px;
  color: #123f31;
  font-size: 32px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.wiki-document-meta,
.wiki-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  color: #74827b;
  font-size: 13px;
}

.wiki-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
  color: #718078;
  font-size: 13px;
}

.wiki-breadcrumb span:not(:last-child)::after {
  margin-left: 4px;
  color: #abb6b0;
  content: "/";
}

.wiki-breadcrumb span[aria-current="page"] {
  color: #315548;
  font-weight: 600;
}

.wiki-tag-list span {
  padding: 3px 7px;
  border-radius: 4px;
  background: #edf3ef;
  color: #315548;
}

.wiki-body {
  padding-top: 18px;
  font-size: 16px;
  line-height: 1.82;
  overflow-wrap: anywhere;
}

.wiki-body h1,
.wiki-body h2,
.wiki-body h3,
.wiki-body h4 {
  color: #123f31;
  line-height: 1.35;
  scroll-margin-top: 20px;
}

.wiki-body h1 { font-size: 26px; margin: 34px 0 12px; }
.wiki-body > h1:first-child { display: none; }
.wiki-body h2 { font-size: 22px; margin: 32px 0 10px; padding-bottom: 6px; border-bottom: 1px solid #e3e8e5; }
.wiki-body h3 { font-size: 18px; margin: 26px 0 8px; }
.wiki-body h4 { font-size: 16px; margin: 22px 0 7px; }
.wiki-body p { margin: 10px 0; }
.wiki-body ul,
.wiki-body ol { padding-left: 24px; }
.wiki-body li + li { margin-top: 5px; }
.wiki-body a { color: #126448; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.wiki-body blockquote { margin: 16px 0; padding: 10px 16px; border-left: 4px solid #b38a36; background: #f8f7f1; color: #4a554f; }
.wiki-body code { padding: 2px 5px; border-radius: 3px; background: #f0f3f1; font-size: .9em; }
.wiki-body pre { max-width: 100%; padding: 15px; overflow: auto; border-radius: 6px; background: #17251f; color: #edf5f1; }
.wiki-body pre code { padding: 0; background: transparent; color: inherit; }
.wiki-body table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; }
.wiki-body th,
.wiki-body td { min-width: 120px; padding: 8px 10px; border: 1px solid #d7dfda; text-align: left; vertical-align: top; }
.wiki-body th { background: #edf3ef; color: #174c3b; }
.wiki-body img { display: block; max-width: 100%; height: auto; margin: 18px auto; border: 1px solid #dce3df; border-radius: 6px; }

.wiki-outline {
  border-left: 1px solid var(--line, #d7ded9);
  padding: 18px 0 24px 16px;
}

.wiki-outline-sticky {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  padding-right: 8px;
}

.wiki-toc,
.wiki-backlinks > div {
  display: grid;
  gap: 3px;
}

.wiki-toc button,
.wiki-backlinks button {
  padding: 5px 6px;
  border: 0;
  background: transparent;
  color: #607169;
  text-align: left;
  cursor: pointer;
}

.wiki-toc button:hover,
.wiki-backlinks button:hover {
  color: #104b37;
  background: #edf3ef;
}

.wiki-toc .level-3 { padding-left: 16px; }
.wiki-toc .level-4 { padding-left: 28px; }
.wiki-backlinks { margin-top: 24px; padding-top: 14px; border-top: 1px solid #dce4df; }
.wiki-empty-state { display: grid; place-items: center; min-height: 42vh; color: #65766e; text-align: center; }
.wiki-search-result-summary { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

@media (max-width: 1120px) {
  .wiki-page .wiki-search-controls { width: 100%; grid-template-columns: minmax(0, 220px) minmax(0, 1fr) auto; }
  .wiki-workbench { grid-template-columns: minmax(240px, 280px) minmax(0, 1fr); }
  .wiki-outline { display: none; }
}

@media (max-width: 760px) {
  .wiki-page { padding: 0 14px 24px; }
  .wiki-page .wiki-toolbar { align-items: stretch; flex-direction: column; overflow: visible; }
  .wiki-page .wiki-search-controls { grid-template-columns: minmax(0, 1fr) auto; }
  .wiki-page .wiki-search-controls select { grid-column: 1 / -1; }
  .wiki-workbench { display: block; min-height: 0; }
  .wiki-sidebar { position: static; max-height: none; overflow: visible; border-right: 0; border-bottom: 1px solid var(--line, #d7ded9); padding: 14px 0; }
  .wiki-navigation { max-height: 42vh; overflow-y: auto; scrollbar-width: thin; }
  .wiki-article { padding: 24px 4px 48px; }
  .wiki-document-head h1 { font-size: 26px; }
  .wiki-body { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .wiki-folder > summary::before,
  .wiki-shortcut > summary::before { transition: none; }
}
/* Task shortcuts, source status and hotel filters use the existing reader width. */
.wiki-evidence { padding: 14px; border: 1px solid var(--line, #d9e2dd); border-left: 4px solid #b18b42; border-radius: 10px; margin: 14px 0; background: #faf9f5; }
.wiki-evidence[data-wiki-state="current"] { border-left-color: #306f58; }
.wiki-evidence[data-wiki-state="history"] { border-left-color: #8a8a8a; }
.wiki-evidence p { margin: 6px 0; }
.wiki-evidence-dates { display:flex; flex-wrap:wrap; gap:8px 18px; font-size:12px; }
.wiki-quick-nav, .wiki-feedback { border:1px solid #d9e2dd; padding:12px; border-radius:10px; margin:12px 0; }
.wiki-quick-nav summary, .wiki-feedback summary { cursor:pointer; font-weight:600; }
.wiki-quick-nav button { margin:8px 6px 0 0; max-width:100%; white-space:normal; text-align:left; }
.wiki-hotel-filters { display:flex; flex-wrap:wrap; gap:10px; align-items:end; }
.wiki-hotel-filters label { display:grid; gap:4px; flex:1 1 140px; }
.wiki-hotel-filters select { width:100%; min-width:0; }
.wiki-hotel-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr)); gap:12px; }
.wiki-hotel-card { padding:14px; border:1px solid #d9e2dd; border-radius:10px; min-width:0; }
.wiki-hotel-card[hidden] { display:none; }
.wiki-hotel-card h3 { font-size:16px; margin:0 0 8px; }
.wiki-hotel-card button { margin:4px; }
.wiki-feedback form, .wiki-feedback label { display:grid; gap:8px; }
.wiki-feedback textarea { width:100%; box-sizing:border-box; }
.wiki-feedback-item { border-top:1px solid #d9e2dd; margin-top:12px; padding-top:12px; overflow-wrap:anywhere; }
/* Workspace-wide pane caps must not clip the mobile Wiki directory while its
   children paint over the following article. Only the navigation scrolls. */
@media (max-width: 820px) {
  .wiki-page .wiki-sidebar { position:static; max-height:none; overflow:visible; }
  .wiki-page .wiki-navigation { max-height:32vh; overflow-y:auto; }
}


/* /styles_workspace_2026.css */
/* KKM 业务工作台：统一壳层、紧凑信息密度和响应式导航。 */
:root {
  --workspace-rail-width: 240px;
  --workspace-rail-collapsed: 72px;
  --workspace-topbar-height: 64px;
  --workspace-content-max: 1680px;
  --workspace-mobile-nav-height: 64px;
  --bg: #f4f6f4;
  --surface: #ffffff;
  --surface-2: #f8faf8;
  --surface-3: #edf2ee;
  --ink: #17211d;
  --muted: #68736d;
  --line: #dce3dd;
  --line-strong: #c6d1c9;
  --green: #104b3b;
  --green-2: #0d342b;
  --gold: #a87927;
  --amber: #88601b;
  --red: #a64032;
  --shadow: 0 16px 40px rgba(18, 45, 36, 0.08);
  --shadow-soft: 0 4px 16px rgba(21, 38, 30, 0.06);
}

body {
  background: var(--bg);
  letter-spacing: 0;
}

body.mobile-nav-open {
  overflow: hidden;
}

.app-shell {
  grid-template-columns: var(--workspace-rail-width) minmax(0, 1fr);
  transition: grid-template-columns 180ms ease;
}

.app-view.rail-collapsed .app-shell {
  grid-template-columns: var(--workspace-rail-collapsed) minmax(0, 1fr);
}

.app-rail {
  gap: 12px;
  padding: 16px 12px 12px;
  background: var(--green-2);
}

.rail-brand {
  grid-template-columns: 38px minmax(0, 1fr) 30px;
  gap: 9px;
  min-height: 40px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  font-size: 14px;
}

.rail-brand-copy {
  min-width: 0;
}

.rail-title,
.rail-subtitle,
.tab-copy,
.nav-group-label,
.rail-footer .pill,
.rail-footer .btn {
  transition: opacity 120ms ease;
}

.icon-btn {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.icon-btn:hover,
.icon-btn:focus-visible {
  border-color: var(--green);
  color: var(--green);
}

.rail-toggle {
  width: 30px;
  height: 30px;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #f7fbf5;
}

.rail-toggle:hover,
.rail-toggle:focus-visible {
  border-color: rgba(255, 255, 255, 0.42);
  color: #ffffff;
}

.workflow-nav {
  display: block;
  padding: 4px 0 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.nav-group {
  display: grid;
  gap: 3px;
  margin-top: 16px;
}

.nav-group:first-child {
  margin-top: 2px;
}

.nav-group-label {
  padding: 0 10px 5px;
  color: rgba(247, 251, 245, 0.46);
  font-size: 10px;
  line-height: 1.2;
  font-weight: 800;
}

.workflow-tab {
  min-height: 48px;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
  padding: 7px 8px;
  border-radius: 6px;
}

.workflow-tab.active {
  box-shadow: none;
}

.tab-index {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 12px;
}

.tab-copy strong {
  font-size: 13px;
}

.tab-copy small {
  font-size: 10px;
}

.rail-footer {
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 6px;
  align-items: center;
  padding-top: 10px;
}

.rail-footer .pill {
  min-width: 0;
  justify-content: flex-start;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-footer .btn {
  padding-inline: 9px;
}

.app-view.rail-collapsed .app-rail {
  padding-inline: 10px;
}

.app-view.rail-collapsed .rail-brand {
  grid-template-columns: 1fr;
  justify-items: center;
}

.app-view.rail-collapsed .rail-brand-copy,
.app-view.rail-collapsed .nav-group-label,
.app-view.rail-collapsed .tab-copy,
.app-view.rail-collapsed .rail-footer .pill,
.app-view.rail-collapsed .rail-footer .rail-refresh {
  display: none;
}

.app-view.rail-collapsed .rail-toggle {
  position: absolute;
  top: 58px;
}

.app-view.rail-collapsed .nav-group {
  margin-top: 10px;
}

.app-view.rail-collapsed .workflow-nav {
  padding-top: 38px;
}

.app-view.rail-collapsed .workflow-tab {
  min-height: 42px;
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 6px;
}

.app-view.rail-collapsed .rail-footer {
  grid-template-columns: 1fr;
}

.app-view.rail-collapsed .rail-footer #logoutBtn {
  width: 42px;
  position: relative;
  justify-self: center;
  padding: 0;
  overflow: hidden;
  color: transparent;
}

.app-view.rail-collapsed .rail-footer #logoutBtn::after {
  content: "出";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--red);
}

.app-main {
  display: block;
  min-width: 0;
}

.topbar {
  min-height: var(--workspace-topbar-height);
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.topbar-context {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.topbar h1 {
  flex: 0 0 auto;
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

.page-kicker {
  display: none;
}

.topbar-context > .small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
}

.topbar-actions {
  display: flex;
  align-items: center;
}

.notification-trigger {
  min-width: 72px;
}

.global-alert-stack {
  display: grid;
  gap: 8px;
  padding: 0 20px;
}

.global-alert-stack > :not(.hidden) {
  margin-top: 10px;
}

.status-banner:not(.warning) {
  display: none;
}

.status-banner,
.draft-banner {
  min-height: 42px;
  padding: 7px 10px;
  box-shadow: none;
}

.layout,
.layout.page-archive,
.layout.page-admin,
.template-page,
.image-page,
.guide-page,
.board-page,
.todo-page,
.handoff-page,
.stats-page,
.routing-page,
.delivery-page,
.finance-page,
.members-page,
.member-confirmation-page,
.wiki-page {
  width: min(100%, var(--workspace-content-max));
  margin-inline: auto;
  padding: 16px 20px 24px;
}

.layout {
  min-height: calc(100vh - var(--workspace-topbar-height));
  gap: 16px;
}

.sidebar {
  top: calc(var(--workspace-topbar-height) + 16px);
  max-height: calc(100vh - var(--workspace-topbar-height) - 32px);
}

.mobile-primary-nav,
.mobile-nav-backdrop,
.mobile-nav-drawer {
  display: none;
}

/* 页面统一：顶栏承担标题，页面内部只保留筛选、指标和工作区。 */
.board-page-head,
.delivery-page-head,
.finance-page-head,
.members-page-head,
.member-confirmation-page-head,
.wiki-toolbar,
.guide-page-head {
  min-width: 0;
  margin: 0 0 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.todo-page > .board-page-head > div:first-child,
.routing-page > .board-page-head > div:first-child,
.board-page > .board-page-head > div:first-child,
.stats-page > .board-page-head > div:first-child,
.delivery-page-head > div:first-child,
.members-page-head > div:first-child,
.member-confirmation-page-head > div:first-child,
.guide-page-head > div:first-child,
.template-page-head {
  display: none;
}

.board-page-head,
.delivery-page-head,
.members-page-head,
.member-confirmation-page-head,
.guide-page-head {
  justify-content: flex-end;
  align-items: center;
}

.finance-page-head {
  justify-content: flex-end;
}

.wiki-toolbar {
  align-items: center;
  padding-block: 9px;
}

.wiki-toolbar > div:first-child .page-kicker,
.wiki-toolbar > div:first-child h2 {
  display: none;
}

.wiki-toolbar > div:first-child {
  min-width: 180px;
}

.wiki-toolbar #wikiReleaseSummary {
  margin: 0;
}

.board-actions,
.delivery-filter-bar,
.finance-filter-bar,
.members-filter-bar,
.member-confirmation-filter-bar,
.wiki-search-controls,
.guide-head-actions {
  width: 100%;
  justify-content: flex-end;
}

.board-actions input,
.board-actions select,
.board-date-filter input,
.delivery-filter-bar input,
.delivery-filter-bar select,
.finance-filter-bar input,
.finance-filter-bar select,
.members-filter-bar input,
.members-filter-bar select,
.member-confirmation-filter-bar input,
.wiki-search-controls input,
.wiki-search-controls select {
  min-height: 36px;
  height: 36px;
  padding-block: 6px;
  background: var(--surface);
}

.board-actions select,
.delivery-filter-bar select,
.finance-filter-bar select,
.members-filter-bar select,
.wiki-search-controls select {
  width: auto;
}

.board-page > .board-page-head {
  display: block;
}

.board-page > .board-page-head .board-actions {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 7px;
}

.board-page #caseBoardSearchInput { grid-column: span 4; width: 100%; }
.board-page .board-date-filter { grid-column: span 3; }
.board-page #caseBoardSearchBtn { grid-column: span 2; }
.board-page .board-actions > select { grid-column: span 2; width: 100%; min-width: 0; }
.board-page #refreshCaseBoardBtn { grid-column: span 2; }

.board-date-filter {
  display: flex;
  align-items: center;
  gap: 6px;
}

.board-date-filter span,
.finance-filter-bar label > span {
  white-space: nowrap;
}

.case-board-summary {
  gap: 8px;
  margin: 0 0 10px;
  padding: 9px 10px;
  border-color: var(--line);
  background: var(--surface);
}

.case-board-grid.single-column {
  grid-template-columns: minmax(0, 1fr);
}

.summary-counters {
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  overflow: hidden;
}

.summary-counters div {
  padding: 8px 10px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
}

.summary-counters div:last-child {
  border-right: 0;
}

.summary-counters strong {
  margin-top: 2px;
  font-size: 18px;
}

.table-editor-card,
.section,
.sales-cockpit,
.card,
.doc,
.image-doc,
.composer-panel {
  box-shadow: none;
}

.table-editor-card {
  margin-bottom: 12px;
  padding: 13px;
}

.section-heading {
  margin-bottom: 9px;
}

.section-heading h2,
.section-heading h3 {
  margin: 0;
}

.composer-panel textarea {
  min-height: 84px;
}

#pricingProcess,
#guideHotelInfo,
#guideComplimentaryBenefits {
  min-height: 112px;
}

#tableRemarks,
#guideGuestPasteInput {
  min-height: 132px;
}

.editable-table-wrap,
.stats-table-wrap,
.guide-source-table-wrap {
  max-width: 100%;
  overflow: auto;
  scrollbar-gutter: stable;
  overscroll-behavior-inline: contain;
}

.editable-trip-table thead th,
.stats-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

/* 第一屏先展示主工作区，次要日历、异常和对账信息放到后面。 */
.delivery-page,
.finance-page {
  display: flex;
  flex-direction: column;
}

.delivery-page-head,
.finance-page-head { order: 1; }
.delivery-summary-grid,
.finance-period-actions { order: 2; }
.finance-metrics { order: 3; }
.delivery-workbench,
.finance-workbench { order: 4; }
.delivery-exception-center,
.finance-reconciliation-panel { order: 5; }
.delivery-calendar-panel { order: 6; }

.delivery-summary-grid,
.finance-metrics,
.member-metrics,
.member-confirmation-metrics {
  margin-bottom: 10px;
}

.delivery-summary-grid > div,
.finance-metrics > div,
.member-metrics > div,
.member-confirmation-metrics > div {
  padding: 9px 11px;
}

.delivery-summary-grid strong,
.finance-metrics strong,
.member-metrics strong,
.member-confirmation-metrics strong {
  margin-block: 3px 1px;
  font-size: 18px;
}

.delivery-workbench,
.finance-workbench,
.members-workbench,
.member-confirmation-workbench {
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 10px;
}

.delivery-case-pane,
.finance-groups-pane,
.member-list-pane,
.member-confirmation-list-pane {
  top: calc(var(--workspace-topbar-height) + 12px);
  max-height: calc(100vh - var(--workspace-topbar-height) - 24px);
  padding: 9px;
  box-shadow: none;
}

.delivery-detail-pane,
.finance-detail-pane,
.member-detail-pane,
.member-confirmation-detail-pane {
  min-width: 0;
}

.delivery-exception-center,
.delivery-calendar-panel,
.finance-reconciliation-panel {
  margin-top: 12px;
}

.finance-period-actions {
  margin: 0 0 8px;
}

.finance-period-actions .small {
  margin-left: auto;
}

.image-grid {
  grid-template-columns: minmax(560px, 1.48fr) minmax(360px, 0.52fr);
  gap: 12px;
}

.guide-grid {
  grid-template-columns: minmax(640px, 1.55fr) minmax(360px, 0.45fr);
  gap: 12px;
}

.composer-panel {
  padding: 14px;
}

.composer-panel > h3,
.composer-panel > .composer-note {
  display: none;
}

.editor-mode-actions {
  margin: 0 0 8px;
}

.guide-source-card {
  top: calc(var(--workspace-topbar-height) + 10px);
  box-shadow: 0 4px 14px rgba(18, 45, 36, 0.08);
}

.image-doc {
  position: sticky;
  top: calc(var(--workspace-topbar-height) + 12px);
  max-height: calc(100vh - var(--workspace-topbar-height) - 24px);
  overflow: auto;
}

.doc-head {
  padding: 10px 12px;
}

.doc-head h2 {
  font-size: 15px;
}

.preview-caption {
  display: none;
}

.wiki-workbench {
  min-height: calc(100vh - 142px);
}

.wiki-sidebar,
.wiki-outline {
  top: calc(var(--workspace-topbar-height) + 10px);
  max-height: calc(100vh - var(--workspace-topbar-height) - 24px);
}

@media (min-width: 1200px) {
  .finance-metrics {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .finance-metrics > div {
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }

  .finance-metrics > div:last-child {
    border-right: 0;
  }
}

@media (max-width: 1180px) and (min-width: 1101px) {
  :root {
    --workspace-rail-width: 216px;
  }

  .app-rail {
    padding-inline: 10px;
  }
}

/* 浏览器分屏仍使用桌面工作台，只把导航压成图标栏。 */
@media (max-width: 1100px) and (min-width: 721px) {
  :root {
    --workspace-rail-width: 76px;
  }

  .app-shell,
  .app-view.rail-collapsed .app-shell {
    display: grid;
    grid-template-columns: var(--workspace-rail-width) minmax(0, 1fr);
  }

  .app-rail {
    position: sticky;
    top: 0;
    width: var(--workspace-rail-width);
    min-width: 0;
    height: 100vh;
    overflow: hidden;
    padding-inline: 8px;
  }

  .rail-brand {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .rail-brand-copy,
  .nav-group-label,
  .tab-copy,
  .rail-footer .pill,
  .rail-footer .rail-refresh,
  .rail-toggle {
    display: none;
  }

  .nav-group {
    margin-top: 10px;
  }

  .workflow-nav {
    display: block;
    overflow-x: hidden;
    overflow-y: auto;
    padding-top: 2px;
  }

  .workflow-tab {
    min-width: 0;
    min-height: 44px;
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 7px 6px;
  }

  .rail-footer {
    grid-template-columns: 1fr;
  }

  .rail-footer #logoutBtn {
    width: 42px;
    position: relative;
    justify-self: center;
    padding: 0;
    overflow: hidden;
    color: transparent;
  }

  .rail-footer #logoutBtn::after {
    content: "出";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--red);
  }

  #boardPage .board-actions > select,
  #boardPage #refreshCaseBoardBtn {
    grid-column: span 3;
    min-width: 140px;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    min-height: var(--workspace-topbar-height);
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 10px 14px;
  }

  .layout,
  .layout.page-archive,
  .layout.page-admin,
  .template-page,
  .image-page,
  .guide-page,
  .board-page,
  .todo-page,
  .handoff-page,
  .stats-page,
  .routing-page,
  .delivery-page,
  .finance-page,
  .members-page,
  .member-confirmation-page,
  .wiki-page {
    padding: 14px 14px 24px;
  }

  .image-grid,
  .guide-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
    gap: 10px;
  }
}

/* 只有真正的手机宽度才启用底部导航。 */
@media (max-width: 720px) {
  .app-shell,
  .app-view.rail-collapsed .app-shell {
    display: block;
  }

  .app-rail {
    display: none;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    min-height: 56px;
    padding: 8px 14px;
  }

  .topbar-context {
    display: block;
  }

  .topbar h1 {
    font-size: 17px;
  }

  .topbar-context > .small {
    display: none;
  }

  .global-alert-stack {
    padding-inline: 12px;
  }

  .board-page-head,
  .delivery-page-head,
  .finance-page-head,
  .members-page-head,
  .member-confirmation-page-head,
  .wiki-toolbar,
  .guide-page-head {
    padding: 7px 8px;
    overflow: hidden;
  }

  .board-actions,
  .delivery-filter-bar,
  .finance-filter-bar,
  .members-filter-bar,
  .member-confirmation-filter-bar,
  .wiki-search-controls,
  .guide-head-actions {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 6px;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .board-page > .board-page-head .board-actions {
    display: flex;
  }

  .board-page #caseBoardSearchInput,
  .board-page .board-date-filter,
  .board-page #caseBoardSearchBtn,
  .board-page .board-actions > select,
  .board-page #refreshCaseBoardBtn {
    grid-column: auto;
  }

  .board-actions > *,
  .delivery-filter-bar > *,
  .finance-filter-bar > *,
  .members-filter-bar > *,
  .member-confirmation-filter-bar > *,
  .wiki-search-controls > *,
  .guide-head-actions > * {
    flex: 0 0 auto;
  }

  .board-actions input,
  .delivery-filter-bar input,
  .finance-filter-bar input[type="search"],
  .members-filter-bar input,
  .member-confirmation-filter-bar input,
  .wiki-search-controls input {
    width: 220px;
    min-width: 220px;
  }

  .board-actions select,
  .delivery-filter-bar select,
  .finance-filter-bar select,
  .members-filter-bar select,
  .wiki-search-controls select {
    width: auto;
    min-width: 140px;
  }

  .board-date-filter input,
  .finance-filter-bar label {
    width: auto;
    min-width: 128px;
  }

  .image-grid,
  .guide-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .image-doc {
    position: static;
    max-height: none;
  }

  .guide-source-card {
    top: 66px;
  }

  .layout,
  .layout.page-archive,
  .layout.page-admin,
  .template-page,
  .image-page,
  .guide-page,
  .board-page,
  .todo-page,
  .handoff-page,
  .stats-page,
  .routing-page,
  .delivery-page,
  .finance-page,
  .members-page,
  .member-confirmation-page,
  .wiki-page {
    width: 100%;
    padding: 12px 12px calc(var(--workspace-mobile-nav-height) + 20px);
  }

  .mobile-primary-nav {
    position: fixed;
    z-index: 60;
    right: 0;
    bottom: 0;
    left: 0;
    height: var(--workspace-mobile-nav-height);
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(68px, 1fr);
    padding: 5px max(8px, env(safe-area-inset-right)) max(5px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -8px 22px rgba(18, 45, 36, 0.08);
    backdrop-filter: blur(12px);
  }

  .mobile-primary-items {
    min-width: 0;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
  }

  .mobile-nav-item {
    min-width: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    padding: 4px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    cursor: pointer;
  }

  .mobile-nav-item span {
    width: 24px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 5px;
    color: inherit;
    font-size: 12px;
    font-weight: 900;
  }

  .mobile-nav-item strong {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
    line-height: 1.2;
  }

  .mobile-nav-item:focus-visible,
  .mobile-drawer-item:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: -2px;
  }

  .mobile-nav-item.active {
    color: var(--green);
  }

  .mobile-nav-item.active span {
    background: var(--surface-3);
  }

  .mobile-nav-backdrop:not(.hidden) {
    position: fixed;
    z-index: 80;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-top: 48px;
    background: rgba(11, 26, 21, 0.38);
  }

  .mobile-nav-drawer {
    width: min(100%, 560px);
    max-height: min(82vh, 720px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    background: var(--surface);
    box-shadow: 0 -20px 60px rgba(11, 26, 21, 0.2);
  }

  .mobile-nav-head {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
  }

  .mobile-nav-head > div {
    display: grid;
    gap: 2px;
  }

  .mobile-nav-head strong {
    font-size: 16px;
  }

  .mobile-nav-head small {
    color: var(--muted);
    font-size: 11px;
  }

  .mobile-nav-list {
    min-height: 0;
    overflow-y: auto;
    padding: 8px 12px max(18px, env(safe-area-inset-bottom));
  }

  .mobile-drawer-group {
    display: grid;
    gap: 4px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
  }

  .mobile-drawer-group:last-child {
    border-bottom: 0;
  }

  .mobile-drawer-group h2 {
    margin: 0;
    padding: 0 8px 4px;
    color: var(--muted);
    font-size: 11px;
  }

  .mobile-drawer-item {
    min-height: 48px;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 7px 8px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--ink);
    text-align: left;
  }

  .mobile-drawer-item.active {
    background: var(--surface-3);
    color: var(--green);
  }

  .mobile-drawer-index {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    background: var(--surface-3);
    font-size: 12px;
    font-weight: 900;
  }

  .mobile-drawer-item > span:last-child {
    min-width: 0;
    display: grid;
    gap: 2px;
  }

  .mobile-drawer-item strong,
  .mobile-drawer-item small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-drawer-item strong {
    font-size: 13px;
  }

  .mobile-drawer-item small {
    color: var(--muted);
    font-size: 10px;
  }
}

@media (max-width: 820px) {
  .image-grid,
  .guide-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .image-doc {
    position: static;
    max-height: none;
  }

  .delivery-workbench,
  .finance-workbench,
  .members-workbench,
  .member-confirmation-workbench,
  .wiki-workbench {
    grid-template-columns: minmax(0, 1fr);
  }

  .delivery-case-pane,
  .finance-groups-pane,
  .member-list-pane,
  .member-confirmation-list-pane,
  .wiki-sidebar,
  .wiki-outline {
    position: static;
    max-height: 340px;
  }

  .delivery-summary-grid,
  .finance-metrics,
  .member-metrics,
  .member-confirmation-metrics {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(140px, 1fr);
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .delivery-summary-grid > div,
  .finance-metrics > div,
  .member-metrics > div,
  .member-confirmation-metrics > div {
    border-right: 1px solid var(--line);
  }

  .summary-counters {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(118px, 1fr);
    overflow-x: auto;
  }

  .finance-period-actions {
    max-width: 100%;
    overflow-x: auto;
  }

  .finance-period-actions > * {
    flex: 0 0 auto;
  }

  .finance-period-actions .small {
    margin-left: 0;
  }
}

@media (max-width: 560px) {
  .routing-page .board-page-head {
    overflow: visible;
  }

  .routing-page .board-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
  }

  .routing-page #routingSearchInput,
  .routing-page #routingStatusFilter {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
  }

  .routing-page .board-date-filter {
    min-width: 0;
  }

  .routing-page .board-date-filter input {
    width: 100%;
    min-width: 0;
  }

  .routing-page #refreshRoutingBtn {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .topbar {
    padding-inline: 12px;
  }

  .notification-trigger {
    min-width: 62px;
  }

  .status-banner,
  .draft-banner {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-shell,
  .rail-title,
  .rail-subtitle,
  .tab-copy,
  .nav-group-label,
  .rail-footer .pill,
  .rail-footer .btn {
    transition: none;
  }
}


/* /styles_app_operations.css */
.global-search *, .workspace-saved-views * { box-sizing: border-box; letter-spacing: 0; }
.operations-empty-state { padding: 28px 16px; color: #6b776f; font-size: 14px; line-height: 1.6; text-align: center; }
.global-search { position: relative; width: 260px; max-width: 100%; flex: 0 1 260px; }
.global-search input { width: 100%; min-width: 0; height: 36px; padding: 6px 10px; font-size: 13px; }
.global-search-results { position: absolute; right: 0; top: calc(100% + 6px); width: 400px; max-width: calc(100vw - 48px); max-height: 60vh; overflow-y: auto; background: #fff; border: 1px solid #ced9d1; border-radius: 6px; box-shadow: 0 8px 20px #182d201c; z-index: 120; }
.workspace-search-result { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 4px 10px; width: 100%; padding: 12px; border: 0; border-bottom: 1px solid #e2e8e4; background: #fff; text-align: left; border-radius: 0; cursor: pointer; }
.workspace-search-result:hover, .workspace-search-result:focus { background: #eaf2ed; }
.workspace-search-result span { grid-row: span 2; color: #837034; font-size: 12px; }
.workspace-search-result strong { font-size: 14px; overflow-wrap: anywhere; }
.workspace-search-result small { color: #657269; font-size: 12px; overflow-wrap: anywhere; }
.operations-supplier-link > div { display: flex; flex-wrap: wrap; gap: 6px; }
.operations-supplier-link input[data-supplier-query] { flex: 1 1 120px; min-width: 0; width: auto; }
.operations-supplier-link [data-supplier-choices] { max-height: 180px; overflow-y: auto; }
.operations-supplier-link [data-supplier-choices] button { white-space: normal; text-align: left; }
@media (max-width: 1100px) { .global-search { flex-basis: 200px; width: 200px; } }
@media (max-width: 720px) { .global-search-results { right: 0; width: min(320px, calc(100vw - 32px)); } }
@media (max-width: 720px) {
  .topbar, .topbar.context-compact { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .topbar-context { width: 100%; }
  .topbar h1 { white-space: nowrap; }
  .topbar-actions { width: 100%; min-width: 0; gap: 10px; }
  .topbar-actions .global-search { flex: 1 1 0; width: auto; min-width: 0; }
  .topbar-actions .notification-trigger { flex: 0 0 auto; }
}

/* A saved view is one wrapping toolbar group; it must not shrink under its controls. */
.workspace-saved-views { display: flex; flex-wrap: wrap; flex: 0 0 auto; grid-column: 1 / -1; width: min(280px, 100%); gap: 6px; max-width: 100%; }
.workspace-saved-views select { height: 36px; font-size: 12px; flex: 1 1 130px; width: 150px; min-width: 0; max-width: 100%; }
.workspace-view-tools { flex: 0 0 auto; min-width: 0; }
.workspace-view-tools[open] { flex-basis: 100%; }
.workspace-view-tools summary { cursor: pointer; padding: 8px; font-size: 12px; color: var(--muted); border-radius: 6px; }
.workspace-view-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0; }
.workspace-view-actions .btn { font-size: 12px; white-space: normal; }
.workspace-view-tools summary:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

.members-filter-bar > .btn { align-self: flex-start; }


/* /styles_group_sales.css */
.group-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:16px 0}.group-toolbar input{max-width:260px}.group-table-wrap{overflow:auto;max-height:65vh}.group-table{width:100%;border-collapse:collapse;min-width:900px}.group-table th,.group-table td{text-align:left;padding:14px 12px;border-bottom:1px solid #dce6e1;vertical-align:top;max-width:300px;overflow-wrap:anywhere}.group-table th{position:sticky;top:0;background:#eef4ef;color:#284c40;z-index:1}.group-table small{display:block;margin-top:5px;color:#65766c}.group-dialog{width:min(1100px,94vw);max-height:90vh;border:1px solid #cbd9d1;border-radius:16px;padding:24px;overflow:auto}.group-dialog::backdrop{background:#152d2566}.group-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.group-fields input,.group-fields textarea{width:100%;box-sizing:border-box}.group-sheets{display:flex;gap:14px;flex-wrap:wrap;max-height:160px;overflow:auto}.group-source{white-space:pre-wrap;overflow-wrap:anywhere;max-height:300px;overflow:auto}.group-notice{color:#65766c;font-size:14px;line-height:1.6}#groupSalesPage{padding:24px;background:#fff;border-radius:16px}#groupSalesPage[aria-busy=true]{opacity:.75;pointer-events:none}@media(max-width:750px){.group-fields{grid-template-columns:1fr}.group-dialog{padding:16px}}

.group-toolbar label:has(input[type=checkbox]),.group-sheets label{display:flex;align-items:center;gap:8px}.group-toolbar input[type=checkbox],.group-sheets input[type=checkbox]{width:18px;height:18px;min-height:0;margin:0;padding:0;appearance:auto;flex:none}

.group-source-table{width:100%;border-collapse:collapse}.group-source-table th,.group-source-table td{padding:8px;text-align:left;border-bottom:1px solid #dce6e1;white-space:pre-wrap;overflow-wrap:anywhere}.group-source-table th{width:130px}.group-dialog .group-toolbar:last-child{position:sticky;bottom:-24px;background:white;padding:12px 0;margin-bottom:0}@media(max-width:750px){.group-dialog .group-toolbar:last-child{bottom:-16px}}
.group-toolbar>label{display:grid;gap:6px}.group-table input[type=checkbox]{width:18px;height:18px;min-height:0;margin-right:8px;appearance:auto}.group-table td:last-child .btn{margin:0 6px 6px 0}
@media(max-width:750px){#groupSalesPage{padding:16px 12px}.group-table-wrap{max-height:none;overflow:visible}.group-table{min-width:0}.group-table thead{display:none}.group-table tbody,.group-table tr,.group-table td{display:block;max-width:none}.group-table tr{border:1px solid var(--line);border-radius:8px;margin-bottom:16px;padding:8px}.group-table td{border:0;padding:8px}.group-table td::before{content:attr(data-label);display:block;font-size:12px;color:var(--muted);margin-bottom:4px}.group-toolbar>label,.group-toolbar>input{max-width:100%;min-width:0}.group-dialog input,.group-dialog select{min-width:0;max-width:100%}}

.group-headcounts{border:1px solid var(--line);border-radius:8px;padding:16px;margin:20px 0}.group-headcounts>p{margin:0}.group-headcount-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:12px 0}.group-headcount-card{display:grid;gap:8px;padding:16px;text-align:left;color:var(--ink);background:var(--surface,#fff);border:1px solid var(--line);border-radius:8px;min-width:0;cursor:pointer}.group-headcount-card[aria-pressed=true]{background:#eef4ef;border-color:var(--accent)}.group-headcount-card:focus-visible{outline:3px solid var(--accent);outline-offset:3px}.group-headcount-card strong{font-size:30px;line-height:1.2;font-variant-numeric:tabular-nums}.group-headcount-card small{font-size:14px;font-weight:400}.group-headcount-action{font-size:13px;color:var(--muted)}.group-current-headcount{font-size:19px;font-weight:700;color:var(--ink);margin:16px 0}.group-headcounts .btn{margin-left:8px}@media (min-width:601px) and (max-width:1000px){.group-headcount-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.group-headcounts{padding:12px}.group-headcount-cards{grid-template-columns:1fr;gap:8px}.group-headcount-card{grid-template-columns:1fr auto;align-items:center;padding:12px}.group-headcount-card strong{font-size:26px;grid-column:2;grid-row:1/3}.group-headcount-action{grid-column:1;grid-row:2}.group-toolbar>label:has(#groupScheduleFilter),.group-toolbar>label:has(#groupDate){width:100%}.group-toolbar select,.group-toolbar input[type=month]{width:100%;max-width:100%;box-sizing:border-box}.group-current-headcount{font-size:17px}}

.group-fields select{width:100%;min-width:0}.group-fields>.field:has(textarea){grid-column:1/-1}

#groupPrev[hidden], #groupNext[hidden], .group-expenses-dialog [hidden] { display: none!important; }

.group-drafts {border:1px solid var(--line);padding:12px;margin:12px 0;border-radius:10px;}
.group-drafts[hidden]{display:none;}
.group-drafts summary{cursor:pointer;font-weight:700;}
.group-draft-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:8px 0;}
.group-draft-row span{flex:1;min-width:140px;overflow-wrap:anywhere;}
.group-payment-state{white-space:normal;min-width:135px;}
.group-payment-state.matched{color:var(--accent);}
#groupHeadcountEdit [hidden]{display:none}

.group-month-breakdown { margin-top: 12px; border-top: 1px solid var(--line); }
.group-month-breakdown summary { padding: 12px 0 2px; color: var(--ink); font-weight: 650; cursor: pointer; }
.group-month-counts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(175px, 100%), 1fr)); gap: 8px; margin-top: 10px; }
.group-month-count { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; align-items: baseline; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface, white); color: var(--ink); cursor: pointer; text-align: left; }
.group-month-count strong { font-variant-numeric: tabular-nums; }
.group-month-count small { grid-column: 1 / -1; color: var(--muted); }
.group-month-count[aria-pressed=true] { border-color: var(--accent); background: #eef4ef; }
.group-month-count:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Keep every record in the DOM for find-in-page, focus and screen readers.
   Containment is on block cell contents: table rows cannot skip layout reliably. */
@supports(content-visibility:auto) and selector(:has(*)){
  .group-table:has(.group-long-list){table-layout:fixed}
  .group-table:has(.group-long-list) th:nth-child(1){width:13%}
  .group-table:has(.group-long-list) th:nth-child(2){width:14%}
  .group-table:has(.group-long-list) th:nth-child(3){width:18%}
  .group-table:has(.group-long-list) th:nth-child(4){width:12%}
  .group-table:has(.group-long-list) th:nth-child(5){width:15%}
  .group-table:has(.group-long-list) th:nth-child(6){width:28%}
  .group-long-list .group-cell-content{content-visibility:auto;contain-intrinsic-block-size:auto 130px}
  .group-long-list .group-cell-content:focus-within{content-visibility:visible}
}
@media print{.group-long-list .group-cell-content{content-visibility:visible!important}}


/* /styles_group_arrangements.css */
#groupArrangementsPage{padding:24px;background:var(--surface,#fff);border:1px solid var(--line);border-radius:12px;min-width:0}.ga-toolbar{display:flex;flex-wrap:wrap;gap:12px;align-items:end;margin-bottom:20px}.ga-toolbar label{display:grid;gap:6px}.ga-summary{padding:16px 0;border-block:1px solid var(--line);margin-bottom:24px;font-weight:650}.ga-bookings{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}.ga-layout{display:grid;grid-template-columns:minmax(230px,280px) minmax(0,1fr);gap:24px}.ga-pool{background:var(--paper,#f6f6f1);border:1px dashed var(--line);padding:16px;border-radius:8px;align-self:start;min-height:160px}.ga-group{border:1px solid var(--line);border-radius:10px;margin-bottom:24px;padding:20px;min-width:0}.ga-group>header{display:flex;justify-content:space-between;gap:12px;align-items:start;border-bottom:1px solid var(--line);padding-bottom:12px}.ga-group h3{margin:4px 0;font-size:21px}.ga-status{font-size:13px;background:#edf3ef;padding:4px 10px;border-radius:20px;white-space:nowrap}.ga-group-actions,.ga-person-actions{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.ga-rooms{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.ga-room{background:#f6f7f3;border:1px solid var(--line);border-radius:8px;padding:12px;min-height:120px}.ga-room-heading{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.ga-room-heading h4{margin:0;flex:1}.ga-person{padding:12px;border:1px solid #cfdad4;background:#fff;border-radius:8px;margin:10px 0;overflow-wrap:anywhere}.ga-person[draggable=true]{cursor:grab}.ga-person-line{display:flex;justify-content:space-between;gap:10px}.ga-person p{font-size:13px;margin:6px 0;color:var(--muted)}.ga-person small{color:var(--muted)}.ga-person-actions{margin:10px 0 0}.ga-drop.is-over{outline:3px solid var(--accent);outline-offset:2px}.ga-unroomed{padding:10px;border:1px dashed var(--line);margin:14px 0;border-radius:8px}.ga-unroomed:has(.ga-person){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.ga-unroomed h4{grid-column:1/-1;margin:4px 0}.ga-issues{background:#fff6de;padding:12px;border-radius:8px;margin-top:14px}.ga-issues summary{cursor:pointer}.ga-flag{display:block;color:#845b15;background:#fff6de;font-size:13px;padding:6px 8px;margin-top:8px}.ga-ready{color:var(--accent);font-size:14px}.ga-notes{white-space:pre-wrap;overflow-wrap:anywhere}.ga-dialog{width:min(1120px,94vw);max-height:92vh;border:1px solid var(--line);border-radius:12px;padding:24px;overflow:auto}.ga-dialog::backdrop{background:#152d2570}.ga-dialog-heading{flex-wrap:wrap;position:sticky;top:-24px;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 0;background:#fff;z-index:2}.ga-dialog-heading h2{margin:0;font-size:22px}.ga-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.ga-fields label,.ga-booking-label{display:grid;gap:6px;min-width:0}.ga-fields input,.ga-fields select,.ga-fields textarea,.ga-dialog select,.ga-dialog input,.ga-dialog textarea{width:100%;min-width:0;max-width:100%;box-sizing:border-box}.ga-person-form{border:1px solid var(--line);padding:16px;margin:20px 0;border-radius:8px}.ga-person-form legend{font-weight:700;padding:0 8px}.ga-booking-label{margin-bottom:16px}.ga-dialog-footer{position:sticky;bottom:-24px;background:#fff;padding:14px 0;display:flex;gap:12px;flex-wrap:wrap}.ga-error{color:#9b2929;white-space:pre-wrap;overflow-wrap:anywhere}.ga-table-scroll{overflow:auto;max-height:60vh}.ga-table{border-collapse:collapse;min-width:2000px;font-size:14px}.ga-table th,.ga-table td{padding:12px;text-align:left;border:1px solid var(--line);white-space:pre-wrap;min-width:100px}.ga-table th{position:sticky;top:0;background:#edf3ef}.ga-table td{font-variant-numeric:tabular-nums}.ga-owner{display:flex;gap:10px;align-items:center}.ga-owner input{width:18px;height:18px;min-height:0}.ga-suggestions{display:grid;gap:12px;margin:16px 0}.ga-suggestion{padding:12px;background:#f4f6f2;border:1px solid var(--line);border-radius:8px}.ga-empty{padding:20px;color:var(--muted)}#gaRelay{min-height:230px}.ga-plan-options{display:flex;gap:12px;flex-wrap:wrap}.ga-plan-options label{display:flex;align-items:center;gap:6px}.ga-plan-options input{width:18px;min-height:0}.ga-section-title{font-size:18px;margin:0 0 12px}@media(max-width:1050px){.ga-layout{grid-template-columns:1fr}.ga-pool-people{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}}@media(max-width:650px){#groupArrangementsPage{padding:14px}.ga-rooms,.ga-fields,.ga-pool-people,.ga-unroomed:has(.ga-person){grid-template-columns:1fr}.ga-group{padding:12px}.ga-toolbar>*{max-width:100%}.ga-dialog{padding:16px}.ga-dialog-heading{top:-16px}.ga-dialog-footer{bottom:-16px}.ga-dialog-heading h2{font-size:19px}.ga-group>header{flex-wrap:wrap}.ga-toolbar label{width:100%}.ga-person-form{padding:10px}}

.ga-layout:has(>.ga-pool[hidden]){grid-template-columns:1fr}

#groupArrangementsPage [hidden],.ga-dialog [hidden]{display:none!important}

.ga-intake-booking{padding:16px;margin:12px 0 20px;background:#f1f5f1;border:1px solid var(--line);border-radius:8px}.ga-intake-booking .ga-booking-label{margin-bottom:8px;font-weight:650}.ga-intake-booking .small{margin:0;font-weight:400}.ga-intake-booking select{margin-top:4px}

.gi-data{display:grid;grid-template-columns:minmax(80px,1fr) minmax(0,3fr);gap:8px;font-size:14px}.gi-data dd{margin:0;overflow-wrap:anywhere}.gi-data dt{color:var(--muted)}#giLinks .ga-person{display:flex;gap:16px;justify-content:space-between;align-items:center;flex-wrap:wrap}

@supports(content-visibility:auto){#gaPoolPeople>.ga-person{content-visibility:auto;contain-intrinsic-block-size:auto 230px}}
@media print{#gaPoolPeople>.ga-person{content-visibility:visible}}

/* Match the supplied XLS group manifest; isolate the wide table inside its scroller. */
.ga-manifest{table-layout:fixed;width:max-content;min-width:0;font-family:SimSun,"Songti SC",serif;font-size:13.33px;color:#000;background:#fff}
.ga-manifest th,.ga-manifest td{box-sizing:border-box;text-align:center;vertical-align:middle;min-width:0;padding:3px 4px;border:1px solid #000;font-weight:400;overflow-wrap:anywhere;white-space:pre-wrap}
.ga-manifest th{position:static;background:#fff;height:43px}
.ga-manifest .ga-manifest-title{height:34px}
.ga-manifest .ga-manifest-extra{border:0}
.ga-manifest thead tr:first-child th:last-child{border:0}

/* Shared-day bookings include actual dates and must wrap on a phone. */
.ga-bookings .btn{max-width:100%;min-width:0;white-space:normal;overflow-wrap:anywhere;text-align:left;justify-content:flex-start;padding-block:8px}

.group-expenses-dialog{width:min(1100px,96vw);max-height:92vh;overflow:auto}.group-expenses-dialog [data-payment-field="service_day_index"]{min-width:100px}.group-expenses-dialog [data-message]{color:#874221;white-space:pre-wrap}


/* /styles_group_followups.css */
#groupFollowupsPage{max-width:1300px;margin:auto;padding:28px;width:100%;box-sizing:border-box} .gf-toolbar,.gf-filters{display:flex;flex-wrap:wrap;gap:14px;align-items:end;margin-bottom:20px}.gf-toolbar{justify-content:space-between}.gf-toolbar h2{margin:0 0 8px}.gf-filters label{display:grid;gap:7px;min-width:140px;flex:1;font-size:14px;font-weight:700}.gf-filters label:last-child{flex:2}.gf-filters input,.gf-filters select{width:100%;min-width:0} .gf-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:18px 0}.gf-card{background:var(--surface,#fff);border:1px solid #d5dfd9;border-radius:16px;padding:24px;min-width:0;overflow-wrap:anywhere}.gf-card.is-due{border-left:4px solid #b88436}.gf-card-top,.gf-card-bottom{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap}.gf-card-top time{font-size:15px;color:#53645e}.gf-state{font-weight:700;font-size:13px;color:#195647;background:#eef4ef;border-radius:20px;padding:6px 10px}.is-due .gf-state{background:#fff3da;color:#825715}.gf-card h3{font-size:22px;margin:20px 0 10px}.gf-account{font-size:15px}.gf-note{white-space:pre-wrap;color:#56635e;line-height:1.65;min-height:28px}.gf-card-bottom{border-top:1px solid #edf0ed;padding-top:18px;margin-top:20px}.gf-card-bottom>div{display:flex;gap:8px;flex-wrap:wrap}.gf-empty{grid-column:1/-1;text-align:center;padding:48px 20px;border:1px dashed #c9d5ce;border-radius:16px}.gf-pagination{display:flex;justify-content:flex-end;gap:10px}.group-followup-dialog{width:min(740px,calc(100vw - 24px));max-height:90vh;overflow:auto;box-sizing:border-box;border:1px solid #c9d5ce;border-radius:18px;padding:26px;color:#213d32}.group-followup-dialog::backdrop{background:#10291fb3}.group-followup-dialog header{display:flex;justify-content:space-between;align-items:start;gap:12px;margin-bottom:20px}.group-followup-dialog header small{color:#9b783f;letter-spacing:2px}.group-followup-dialog h2{font-size:24px;margin:8px 0}.gf-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.group-followup-dialog label{display:grid;gap:8px;font-weight:700;margin-bottom:12px}.group-followup-dialog input,.group-followup-dialog select,.group-followup-dialog textarea{width:100%;min-width:0;box-sizing:border-box}.gf-wide{grid-column:1/-1}.group-followup-dialog footer{display:flex;justify-content:flex-end;margin:20px 0}.group-followup-dialog details{padding-top:18px;border-top:1px solid #dce4df}.group-followup-dialog li{margin:18px 0;overflow-wrap:anywhere}.group-followup-dialog li p{white-space:pre-wrap}.gf-error{color:#a33224;white-space:pre-wrap}@media(max-width:768px){#groupFollowupsPage{padding:18px 14px}.gf-grid{grid-template-columns:1fr}.gf-card{padding:18px}.gf-fields{grid-template-columns:1fr}.group-followup-dialog{padding:18px}.gf-toolbar>div,.gf-toolbar>button{max-width:100%}.gf-filters label{min-width:120px}.gf-card-top time{font-size:14px}}


/* /styles_sales_reception.css */
.sales-reception-dialog{width:min(1060px,calc(100vw - 32px));max-width:calc(100vw - 16px);max-height:calc(100dvh - 32px);padding:24px;box-sizing:border-box;overflow:auto;border:1px solid var(--line,#c9d5ce);border-radius:12px;background:var(--surface,#fff);color:var(--ink,#213d32)}
.sales-reception-dialog::backdrop{background:#10291fb3}
.sales-reception-dialog [hidden]{display:none!important}
.sr-heading{position:sticky;top:-24px;z-index:2;display:flex;align-items:start;justify-content:space-between;gap:16px;border-bottom:1px solid var(--line,#d7dfda);padding:20px 24px;margin:-24px -24px 20px;background:var(--surface,#fff)}
.sr-heading h2{font-size:24px;margin:4px 0 8px}.sr-heading p{margin:0}.sr-heading>div{min-width:0;overflow-wrap:anywhere}
.sr-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:28px}.sr-columns>section{min-width:0}.sr-columns h3{font-size:18px;margin:0 0 12px}.sr-columns h4{font-size:15px;margin:20px 0 8px}
.sales-reception-dialog fieldset{border:0;margin:0;padding:0;min-width:0}.sales-reception-dialog label{display:grid;gap:8px;font-weight:600;font-size:14px;margin:16px 0}.sales-reception-dialog textarea,.sales-reception-dialog select{box-sizing:border-box;width:100%;max-width:100%;min-width:0;font:inherit;color:inherit}.sales-reception-dialog textarea{resize:vertical;line-height:1.6;min-height:64px;padding:10px 12px;border:1px solid var(--line,#c9d5ce);border-radius:6px}.sales-reception-dialog select{padding:10px 12px}.sales-reception-dialog textarea::placeholder{font-weight:400;color:var(--muted,#596960)}
.sr-actions{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}.sr-assistant{border-left:1px solid var(--line,#d7dfda);padding-left:28px}.sales-reception-dialog .sr-consent{display:flex;align-items:flex-start;font-size:13px;font-weight:400;line-height:1.6}.sr-consent input{width:18px;height:18px;flex-shrink:0;margin-top:2px}
.sales-reception-dialog p,.sales-reception-dialog li,.sales-reception-dialog dd{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65}.sales-reception-dialog ul{padding-left:20px}.sr-error{color:var(--danger,#a33224);min-height:1.5em}.sr-history{margin-top:20px;border-top:1px solid var(--line,#d7dfda);padding-top:16px}.sr-history summary{cursor:pointer;font-weight:600;padding:8px 0}.sr-history dd{margin:4px 0 12px}.sr-history dt{font-size:13px;font-weight:600}.sr-diff{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px;padding:12px 0;border-top:1px solid var(--line,#d7dfda)}.sr-diff>strong,.sr-diff>label,.sr-diff>small{grid-column:1/-1}.sr-diff p{margin:4px 0}.sr-diff label{margin:4px 0}.sales-reception-dialog :focus-visible{outline:2px solid var(--ink,#213d32);outline-offset:3px}.sr-advice{font-weight:600}
@media(max-width:768px){.sr-columns{grid-template-columns:1fr;gap:24px}.sr-assistant{border-left:0;border-top:1px solid var(--line,#d7dfda);padding:24px 0 0}.sales-reception-dialog{padding:16px;width:calc(100vw - 24px);max-height:calc(100dvh - 24px)}.sr-heading{top:-16px;margin:-16px -16px 20px;padding:16px}.sr-heading h2{font-size:21px}.sr-actions .btn{white-space:normal;max-width:100%}}
@media(max-width:380px){.sr-heading{gap:8px}.sr-heading>.btn{padding:8px 12px}.sr-actions{flex-direction:column}.sr-actions .btn{width:100%}}
/* Structured reception groups remain compact until the salesperson opens them. */
.sr-need-group,.sr-step,.sr-extra{border-top:1px solid var(--line,#d7dfda);padding:14px 0}.sr-need-group>summary{display:flex;gap:12px;align-items:baseline;justify-content:space-between;cursor:pointer;list-style:disclosure-closed}.sr-need-group>summary strong{font-size:14px}.sr-need-group>summary span{font-size:12px;text-align:right;flex-shrink:0}.sr-need-group[open]>summary{margin-bottom:12px}.sr-need-group>[data-sr-group-summary]{font-size:12px;color:var(--muted,#596960);margin:8px 0;display:none}.sr-need-group[open]>[data-sr-group-summary]{display:block}.sr-control{margin:14px 0}.sales-reception-dialog .sr-control>label{display:block;margin:0 0 7px}.sr-control label small,.sr-multi legend small{font-size:11px;font-weight:400;display:inline-block}.sales-reception-dialog .sr-control input{box-sizing:border-box;width:100%;min-height:42px;padding:9px 12px;border:1px solid var(--line,#c9d5ce);border-radius:6px;font:inherit}.sales-reception-dialog .sr-multi{margin:16px 0;padding:0;border:0}.sr-multi legend{font-size:14px;font-weight:600;margin-bottom:8px}.sr-multi>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.sales-reception-dialog .sr-multi label{display:flex;align-items:flex-start;font-weight:400;margin:0;padding:8px;border:1px solid var(--line,#d7dfda);border-radius:5px;gap:8px;font-size:13px}.sr-multi input{width:16px;height:16px;flex-shrink:0;margin:2px 0}.sr-multi small{font-size:12px}.sr-step h4{margin-top:6px}.sr-extra>summary,.sr-secondary>summary{font-size:14px;cursor:pointer;font-weight:600}.sr-secondary{margin:16px 0}.sr-guide,.sr-appointment{font-size:12px;line-height:1.65}.sr-appointment{padding:10px;background:var(--canvas,#f3f6f3);border-radius:6px;margin:12px 0}.sr-group-fields .sr-control:first-child{padding-bottom:12px;border-bottom:1px dashed var(--line,#d7dfda)}
@media(max-width:380px){.sr-multi>div{grid-template-columns:1fr}.sr-need-group>summary{gap:8px}.sr-need-group>summary strong{max-width:65%}.sr-need-group>summary span{font-size:11px}}
.sr-loss-fields .sr-control{display:block}.sr-loss-fields .sr-control>label{display:block;margin:12px 0 6px}.sr-loss-fields .sr-control>select,.sr-loss-fields .sr-control>textarea{width:100%;box-sizing:border-box;min-width:0}.sr-loss-fields .sr-multi{border:0;padding:0;min-width:0}.sr-loss-fields .sr-multi label{display:flex;align-items:flex-start;gap:8px;font-size:13px;font-weight:400}.sr-loss-fields .sr-multi input{width:16px;height:16px;flex-shrink:0;margin:2px 0}.sr-loss-fields .sr-control small{font-size:11px;font-weight:400}.sr-loss-fields .sr-control textarea{min-height:80px}
.sr-heading-actions{display:flex;gap:8px;flex-shrink:0}.sr-need-group>summary{display:grid;grid-template-columns:12px minmax(0,1fr) auto}.sr-need-group>summary::before{content:'▸';font-size:13px}.sr-need-group[open]>summary::before{content:'▾'}.sr-eligibility{padding:10px 12px;border:1px solid var(--line,#d7dfda);border-radius:6px;font-size:13px;font-weight:600}
@media(max-width:480px){.sr-heading-actions{display:grid;gap:6px}.sr-heading-actions .btn{padding:7px 12px;font-size:13px}.sr-need-group>summary strong{max-width:none}.sr-need-group>summary{gap:6px}}
[data-sr-loss-classification][hidden]{display:none!important}
.sales-reception-gate-dialog{width:min(640px,calc(100vw - 24px));max-width:calc(100vw - 16px);max-height:calc(100dvh - 24px);overflow:auto;box-sizing:border-box;padding:24px;border:1px solid var(--line,#c9d5ce);border-radius:12px;background:var(--surface,#fff);color:var(--ink,#213d32)}.sales-reception-gate-dialog::backdrop{background:#10291fb3}.sr-gate-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.sr-gate-heading h2{font-size:21px;margin:0}.sr-gate-heading .btn{flex-shrink:0}.sales-reception-gate-dialog p{line-height:1.65;overflow-wrap:anywhere}.sr-gate-missing{padding-left:22px}.sr-gate-missing li{padding:8px 0}.sr-gate-missing p{margin:4px 0 0;font-size:14px}.sales-reception-gate-dialog :focus-visible{outline:2px solid var(--ink,#213d32);outline-offset:3px}@media(max-width:480px){.sales-reception-gate-dialog{padding:16px}.sr-gate-heading h2{font-size:19px}.sr-gate-heading{gap:10px}.sr-gate-heading .btn{padding:8px 10px}}


/* /styles_sales_reception_evidence.css */
.sr-evidence-upload{padding:12px 0}.sr-evidence-upload:focus-visible{outline:2px solid var(--ink,#213d32);outline-offset:3px}.sr-evidence-file{display:flex;gap:12px;align-items:flex-start;min-width:0}.sr-evidence-file img{width:88px;height:88px;object-fit:contain;border:1px solid var(--line,#d7dfda);border-radius:6px;background:#fff;flex-shrink:0}.sr-evidence-file>div{min-width:0;overflow-wrap:anywhere}.sr-evidence-file small{display:block;margin:6px 0}.sr-evidence-pending,.sr-evidence-item,.sr-evidence-edit{border:1px solid var(--line,#d7dfda);border-radius:8px;padding:12px;margin:12px 0;overflow-wrap:anywhere}.sales-reception-dialog .sr-evidence-pending label,.sales-reception-dialog .sr-evidence-edit label{font-size:13px}.sr-evidence-item p{font-size:14px;margin:8px 0}.sr-evidence-item small{font-size:12px;line-height:1.6}.sr-evidence-item .sr-actions{margin-bottom:0}.sr-evidence-preview{max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);width:min(1100px,calc(100vw - 24px));box-sizing:border-box;padding:16px;border:1px solid var(--line,#d7dfda);border-radius:10px;background:var(--surface,#fff)}.sr-evidence-preview::backdrop{background:#10291fb3}.sr-evidence-preview>button{position:sticky;top:0;display:block;margin:0 0 12px auto}.sr-evidence-preview img{display:block;max-width:100%;height:auto;margin:auto}.sales-reception-dialog input[data-sre-files]{max-width:100%;font-size:13px}.sales-reception-dialog [data-sre-status]{font-size:13px;min-height:1.65em}@media(max-width:480px){.sr-evidence-file{gap:8px}.sr-evidence-file img{width:60px;height:76px}.sr-evidence-file strong{font-size:13px}.sr-evidence-pending,.sr-evidence-item,.sr-evidence-edit{padding:10px}}


/* /styles_delivery_regions.css */
/* Delivery hierarchy: work first, supporting detail below. */
.delivery-region { min-width:0; scroll-margin-top:80px; }
.delivery-region:empty { display:none; }
.delivery-focus { display:flex; align-items:center; justify-content:space-between; gap:var(--space-4); padding:var(--space-5); margin:var(--space-4) 0; border-left:4px solid var(--gold); background:var(--surface-2); }
.delivery-focus h3 { margin:var(--space-2) 0; font-size:20px; color:var(--green); }
.delivery-focus p { margin:0; color:var(--muted); line-height:1.6; }
.delivery-section-nav { display:flex; flex-wrap:wrap; gap:var(--space-2); margin-bottom:var(--space-4); padding:var(--space-2) 0; border-bottom:1px solid var(--line); }
.delivery-fold { margin-bottom:var(--space-4); scroll-margin-top:80px; min-width:0; }
.delivery-fold > summary { padding:var(--space-4); font-size:15px; font-weight:700; color:var(--green); cursor:pointer; }
.delivery-fold > div { padding:0 var(--space-4) var(--space-4); }
.delivery-fold .delivery-required-checklist,.delivery-fold .delivery-benefits-section { margin:0; border:0; box-shadow:none; padding:0; }
[data-delivery-region="source"] .delivery-source-section { max-height:none; }
[data-delivery-region="source"] .delivery-row-actions { flex-wrap:wrap; }
[data-delivery-region="costs"] { margin-top:var(--space-5); }
[data-delivery-region="header"] { position:relative; }
@media(min-width:1024px) { [data-delivery-region="navigation"] { position:sticky; top:0; z-index:3; background:var(--surface); } }
@media(max-width:767px) { .delivery-focus { padding:var(--space-4); align-items:flex-start; flex-direction:column; } .delivery-focus h3 { font-size:18px; } .delivery-section-nav .btn { flex:1 1 40%; } .delivery-detail-header { flex-wrap:wrap; } .delivery-fold > div { padding:0 var(--space-2) var(--space-2); } }

.group-fixed-expense { padding:var(--space-4); margin:var(--space-3) 0; }
.group-fixed-expense h3 { margin:0 0 var(--space-3); }
.group-fixed-expense h3 small { font-size:12px; font-weight:400; color:var(--muted); }
.group-fixed-expense-fields { display:grid; grid-template-columns:minmax(100px,1fr) minmax(100px,2fr); gap:var(--space-3); }
.group-fixed-expense-note, .group-expense-date { grid-column:1 / -1; }
.group-fixed-expense .field { min-width:0; }
.group-fixed-expense .field :is(input,select,textarea) { width:100%; box-sizing:border-box; }
.group-end-actions { padding:var(--space-3); border:1px solid var(--line); margin-bottom:var(--space-3); }
@media(min-width:768px) {
  .group-fixed-expense { display:grid; grid-template-columns:minmax(100px,1fr) 100px minmax(83px,1fr) minmax(138px,1fr) minmax(90px,1fr) auto; align-items:end; gap:var(--space-3); }
  .group-expenses-dialog [data-payments] .group-fixed-expense { grid-template-columns:minmax(100px,1fr) 100px minmax(95px,1fr) minmax(138px,1fr) minmax(118px,1.4fr) auto; }
  .group-fixed-expense h3 { margin:0; align-self:center; font-size:16px; }
  .group-fixed-expense h3 small { display:block; margin-top:4px; }
  .group-fixed-expense-fields { display:contents; }
  .group-fixed-expense-note, .group-expense-date { grid-column:auto; }
  .group-fixed-expense .field { margin:0; }
  .group-fixed-expense textarea { min-height:38px; height:38px; }
  .group-fixed-expense > .small { grid-column:1 / -1; margin:0; font-size:11px; }
}

/* Internal fixed privilege editor; customer image layout remains unchanged. */
.sales-benefits-editor { display:grid; gap:16px; min-width:0; }
.benefit-class-line { display:flex; gap:14px; align-items:center; flex-wrap:wrap; }
.benefit-class-line label { display:flex; gap:12px; align-items:center; }
.benefit-class-line label>span { white-space:nowrap; }
.benefit-class-line select { min-width:110px; }
.benefit-auto { display:flex; gap:12px; align-items:baseline; margin:8px 0; line-height:1.7; }
.benefit-auto>span { color:#356753; background:#e9f3ed; border-radius:6px; padding:2px 7px; font-size:12px; white-space:nowrap; }
.benefit-fixed-option { display:flex; gap:12px; align-items:center; padding:8px 0; }
.benefit-fixed-option input,.benefit-mode-choices input { width:18px; height:18px; accent-color:#164d3c; flex:none; }
.benefit-hotel-field { border:1px solid #cad8d1; padding:16px; border-radius:10px; min-width:0; }
.benefit-hotel-field legend { font-weight:700; padding:0 6px; }
.benefit-mode-choices { display:flex; flex-wrap:wrap; gap:18px; margin-bottom:12px; }
.benefit-mode-choices label { display:flex; gap:8px; align-items:center; }
.sales-benefits-editor textarea { width:100%; min-height:92px; margin:8px 0 0; box-sizing:border-box; }
.sales-benefits-editor textarea:disabled { background:#f1f4f1; }
.sales-benefits-editor [data-benefits-legacy-text] { white-space:pre-wrap; }
.sales-benefits-editor ol { padding-left:22px; line-height:1.8; }
@media(max-width:600px) { .benefit-hotel-field {padding:10px;} .benefit-auto {display:block;} .benefit-auto>span {margin-right:8px;} }

.group-extra-expenses { margin-top:var(--space-5); border-top:1px solid var(--line); padding-top:var(--space-4); }
.group-expense-actions { display:flex; flex-wrap:wrap; gap:var(--space-2); }
.group-extra-expense > .field { min-width:0; }


/* /styles_moments.css */
#momentsPage { box-sizing:border-box; width:100%; max-width: 1220px; margin: 0 auto; padding:24px 28px; }
.moments-toolbar, .moments-actions, .moments-card-top, .moments-records-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.moments-toolbar h2 { font-size:28px; margin:6px 0 12px; letter-spacing:-.7px; }
.moments-eyebrow { font-size:12px; letter-spacing:2px; color:#746443; margin:0; }
.moments-actions { justify-content:flex-start; gap:10px; }
.moments-filters { display:flex; flex-wrap:wrap; gap:8px; margin:20px 0 12px; }
.moments-filters .btn { min-height:44px; }
.moments-filters [aria-pressed="true"] { color:#fffdf9; background:#193b2e; border-color:#193b2e; }
.moments-actions label { display:grid; gap:6px; font-size:12px; }
.moments-rule { padding:16px 20px; background:#eee9df; border-radius:12px; line-height:1.8; }
.moments-group { margin:25px 0; }
.moments-group h3, .moments-upload h3 { margin:0 0 14px; font-size:16px; }
.moments-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:14px; }
.moments-card { background:#fffdf9; border:1px solid #ddd6c9; border-radius:16px; padding:22px; }
.moments-card-top span { font-size:12px; color:#926225; }
.moments-card.is-complete { background:#f1f7f0; border-color:#c3d7c0; }
.moments-card.is-complete .moments-card-top span { color:#3b6545; }
.moments-number { font-size:42px; line-height:1.2; font-weight:600; margin:22px 0 16px; }
.moments-number small { font-size:16px; font-weight:400; color:#746d62; }
.moments-card progress { display:block; width:100%; height:7px; accent-color:#75633f; }
.moments-card.is-complete progress { accent-color:#47724f; }
.moments-card .moments-gap { font-size:13px; margin:12px 0 0; color:#6b6254; }
.moments-card .moments-card-upload { width:100%; margin-top:16px; min-height:44px; }
#momentsUploadDialog { box-sizing:border-box; width:min(640px,calc(100vw - 28px)); max-height:calc(100dvh - 32px); overflow:auto; padding:0; border:1px solid #ddd6c9; border-radius:16px; background:#fffdf9; }
.moments-upload { padding:24px; }
.moments-upload h3 { overflow-wrap:anywhere; }
.moments-form-error { color:#9c302c; font-size:13px; }
.moments-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin:20px 0; }
.moments-fields input, .moments-fields select { width:100%; min-width:0; }
.moments-preview { max-height:160px; max-width:100%; object-fit:contain; margin-bottom:18px; border-radius:8px; }
.moments-records { display:grid; gap:12px; padding-bottom:30px; }
.moments-record { display:flex; gap:18px; padding:16px; border:1px solid #e0d9ce; border-radius:12px; background:#fffdf9; }
.moments-thumbnail { width:100px; height:120px; flex-shrink:0; padding:0; overflow:hidden; border:0; border-radius:8px; background:#e9e5dc; cursor:zoom-in; }
.moments-thumbnail img { width:100%; height:100%; object-fit:cover; object-position:top; }
.moments-record-copy { min-width:0; overflow-wrap:anywhere; }
.moments-record-copy p { font-size:12px; color:#716b61; margin:7px 0; }
.moments-record.is-void { opacity:.65; }
.moments-empty { padding:35px; text-align:center; border:1px dashed #cfc5b6; border-radius:12px; color:#756d60; }
.moments-image-dialog { max-width:min(900px,95vw); max-height:90vh; overflow:auto; }
.moments-image-dialog img { display:block; max-width:100%; height:auto; margin-top:12px; }
#momentsReviewDialog { width:min(450px,90vw); }
#momentsReviewReason { min-height:90px; }
@media(max-width:640px) { #momentsPage { padding:18px 14px; } .moments-fields { grid-template-columns:1fr; } .moments-toolbar h2 { font-size:24px; } .moments-upload { padding:16px; } .moments-thumbnail { width:75px; height:100px; } }

.moments-praise-progress { display:flex; justify-content:flex-start; gap:6px; flex-wrap:wrap; font-size:14px; margin:16px 0 8px; }
.moments-praise { border-left:3px solid #af7e32; background:#f7f0e4; padding:12px 14px; margin:14px 0; font-size:14px; }
.moments-praise.is-approved { border-color:#366847; background:#edf4ed; }
.moments-praise p { font-size:13px; line-height:1.6; }
.moments-kind { font-weight:600; }



/* /styles_guide_translation.css */
.guide-translation-dialog {width:min(980px,94vw); max-height:88vh; overflow:auto; border:1px solid #ded9ce; border-radius:16px; padding:24px; color:#26362f; background:#faf9f5;}
.guide-translation-dialog::backdrop {background:rgba(20,30,25,.48);}
.guide-translation-dialog .section-heading {display:flex; justify-content:space-between; gap:16px; align-items:center;}
#guideTranslationDialog>.section-heading {position:sticky;top:-24px;z-index:3;background:#faf9f5;height:68px;box-sizing:border-box;padding:12px 0;margin:0;}
#guideTranslationDialog>.section-heading h2 {margin:0;}
#closeGuideTranslationBtn {flex-shrink:0;min-height:44px;}
.translation-day-choice {display:flex; gap:12px; align-items:center; padding:14px 0; border-bottom:1px solid #e1ded5;}
.translation-day-choice span {flex:1; min-width:0;} .translation-day-choice small {display:block; max-height:3em; overflow:hidden;}
.translation-day-choice select {max-width:40%; padding:8px;}
.translation-preview-day {padding:16px 0; border-bottom:1px solid #ddd9cf;}
.translation-comparison {display:grid; grid-template-columns:1fr 1fr; gap:20px;}
.translation-comparison > div {min-width:0;}
.translation-comparison pre {white-space:pre-wrap; overflow-wrap:anywhere; font:inherit; line-height:1.6; margin:8px 0 14px;}
.translation-field {display:flex; align-items:flex-start; gap:8px; margin:14px 0;}
.translation-field input,.translation-ack input {margin-top:4px; accent-color:#315b49;}
.translation-warnings {color:#805516; background:#fff4da; padding:12px 16px 12px 32px; border-radius:8px;}
.translation-ack {display:block; margin:14px 0;}
.guide-translation-status {display:block; margin-top:6px; color:#805516; font-size:11px; white-space:normal;}
@media(max-width:640px) {.translation-comparison{grid-template-columns:1fr;} .translation-day-choice{flex-wrap:wrap;} .translation-day-choice select{max-width:100%; width:100%;} .guide-translation-dialog{padding:16px;}}
.guide-translation-dialog input[type="checkbox"] {width:18px; min-width:18px; height:18px; min-height:18px; flex:0 0 18px; padding:0; margin:3px 0 0;}
.guide-translation-dialog .translation-field > span {flex:1; min-width:0; font-size:14px; font-weight:400;}
.guide-translation-dialog .translation-field small {display:block; color:#667168; line-height:1.5;}
.guide-translation-dialog .translation-ack {display:flex; align-items:flex-start; gap:8px; font-weight:400;}
.guide-translation-dialog .translation-preview-day h3 {margin:12px 0;}
.translation-toolbar {position:sticky;top:44px;background:#faf9f5;padding:12px 0;z-index:2;border-bottom:1px solid #ded9ce;}
.translation-toolbar-heading,.translation-toolbar-actions {display:flex;flex-wrap:wrap;gap:8px;align-items:center;}
.translation-toolbar-heading {justify-content:space-between;margin-bottom:8px;}
.translation-toolbar-heading>span {flex:1;min-width:0;}
.translation-summary {margin:8px 0 0;line-height:1.5;}
.translation-issue-link {border:0;background:none;color:#245342;text-decoration:underline;font:inherit;cursor:pointer;padding:2px 0;}
.translation-preview-day {scroll-margin-top:210px;}
@media(max-width:640px){#guideTranslationDialog>.section-heading{top:-16px;}.translation-toolbar{top:52px;}.translation-preview-day{scroll-margin-top:270px;}}
.translation-comparison textarea {width:100%;min-height:100px;resize:vertical;box-sizing:border-box;font:inherit;line-height:1.5;}
.guide-translation-dialog select {max-width:100%;box-sizing:border-box;}
.guide-translation-dialog label {overflow-wrap:anywhere;}
.guide-translation-dialog form label {display:block;margin:12px 0;}
.guide-translation-dialog form .translation-ack {display:flex;}
.translation-table-scroll {overflow:auto;}
.translation-preview-day .btn {margin:8px 4px 4px 0;}
.glossary-toolbar{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin:20px 0 12px;}
.glossary-toolbar label{display:grid;gap:6px;min-width:0;}
.glossary-toolbar label:first-child{flex:1;min-width:180px;}
.glossary-toolbar input,.glossary-toolbar select,.glossary-form-grid input,.glossary-form-grid textarea,.glossary-form-grid select{width:100%;box-sizing:border-box;min-width:0;}
.glossary-form-grid{display:grid;grid-template-columns:1fr 2fr;gap:0 16px;}
.glossary-wide{grid-column:1/-1;}
[data-glossary-form]{padding:18px;border:1px solid #d6ded7;border-radius:12px;background:#fff;margin-bottom:20px;}
.glossary-form-actions,.glossary-entry-actions{display:flex;gap:8px;align-items:center;}
.glossary-entry{display:flex;justify-content:space-between;gap:20px;padding:18px 0;border-bottom:1px solid #ddd9cf;}
.glossary-entry>div:first-child{min-width:0;flex:1;overflow-wrap:anywhere;}
.glossary-entry h3{display:inline;font-size:16px;margin-left:8px;}
.glossary-category{display:inline-block;border-radius:20px;background:#e8eee8;color:#315b49;padding:3px 8px;font-size:12px;}
.glossary-entry p{margin:7px 0;}.glossary-english{font-weight:600;}.glossary-update{color:#65726a;}.glossary-entry-actions{flex-shrink:0;align-self:flex-start;}
.glossary-empty{padding:28px 0;text-align:center;color:#65726a;}
@media(max-width:640px){.glossary-form-grid{grid-template-columns:1fr;}.glossary-entry{flex-direction:column;gap:5px;}.glossary-toolbar>button{width:100%;}.glossary-toolbar label:first-child{flex-basis:100%;}.glossary-entry-actions .btn{min-width:70px;}.translation-glossary-dialog{width:94vw;box-sizing:border-box;}}


/* /styles_hotel_contracts.css */
.hotel-contract-panel { padding: 16px 18px; margin: 12px 0; border: 1px solid #d7bf89; border-radius: 10px; background: #fffbf2; color: #493b24; }
.hotel-contract-summary-row { padding: 10px 0; border-bottom: 1px solid #eadfc8; }
.hotel-contract-summary-row > span { display: block; margin-bottom: 4px; color: #615848; }
.hotel-contract-item { padding: 7px 12px; border-left: 3px solid #b08843; background: #fffbf2; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.hotel-contract-item[data-contract-status="unlisted"] { border-color: #a6a6a6; background: #f6f6f6; }
.hotel-contract-item[data-contract-status="possible"], .hotel-contract-item[data-contract-status="ambiguous"] { border-color: #b76821; }
.hotel-contract-note { margin: 10px 0 0; font-size: 12px; line-height: 1.6; color: #665e50; }
@media print { .hotel-contract-panel, .hotel-contract-item { display: none !important; } }


/* /styles_weekly_reports.css */
.weekly-reports-page { min-width: 0; padding: 0 24px 32px; }
.weekly-reports-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 0 16px; border-bottom: 1px solid var(--line); }
.weekly-reports-toolbar h2 { margin: 0 0 8px; font-size: 22px; }
.weekly-reports-toolbar p { margin: 0; }
.weekly-reports-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 20px 0 8px; }
.weekly-reports-filters label, .weekly-reports-dialog label, .weekly-reports-history label { display: grid; gap: 6px; font-size: 13px; }
.weekly-reports-filters input { width: 160px; min-width: 0; }
.weekly-reports-filters .weekly-reports-search { flex: 1; max-width: 480px; min-width: 160px; }
.weekly-reports-search input { width: 100%; }
.weekly-reports-layout { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 28px; align-items: start; }
.weekly-reports-sidebar { min-width: 0; }
.weekly-report-list-item { display: grid; width: 100%; gap: 8px; padding: 16px 12px; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; border-radius: 0; color: inherit; cursor: pointer; }
.weekly-report-list-item strong { font-size: 15px; line-height: 1.6; }
.weekly-report-list-item > span:last-child { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; line-height: 1.7; color: var(--muted, #58685f); }
.weekly-report-list-item.is-active { border-left-color: var(--brand, #174c3b); background: var(--surface, #f3f7f4); }
.weekly-report-list-item:hover { background: var(--surface, #f3f7f4); }
.weekly-reports-pagination, .weekly-reports-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.weekly-reports-pagination { justify-content: space-between; padding: 16px 0; }
.weekly-reports-article { min-width: 0; padding: 24px; background: var(--paper, #fff); border: 1px solid var(--line); border-radius: 8px; overflow-wrap: anywhere; }
.weekly-report-head { padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.weekly-report-head h2 { margin: 8px 0 12px; font-size: 26px; line-height: 1.45; }
.weekly-report-head p { line-height: 1.7; }
.weekly-reports-empty { padding: 24px 12px; color: var(--muted, #58685f); line-height: 1.8; }
.weekly-reports-history { margin-top: 16px; }
.weekly-reports-history:empty { display: none; }
.weekly-reports-history select { width: 100%; max-width: 360px; }
.weekly-report-contents { margin: 20px 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: 6px; }
.weekly-report-contents summary { cursor: pointer; font-weight: 600; }
.weekly-report-contents nav { display: grid; gap: 4px; margin-top: 12px; }
.weekly-report-contents button { background: none; border: 0; padding: 6px 0; text-align: left; color: var(--brand, #174c3b); cursor: pointer; line-height: 1.6; }
.weekly-report-body { max-width: 900px; margin: 0 auto; font-size: 15px; line-height: 1.85; }
.weekly-report-body :is(h3, h4, h5, h6) { scroll-margin-top: 80px; margin: 28px 0 12px; line-height: 1.5; color: var(--ink, #1f342a); }
.weekly-report-body h3 { font-size: 21px; }
.weekly-report-body h4 { font-size: 18px; }
.weekly-report-body p { margin: 12px 0; }
.weekly-report-body li + li { margin-top: 6px; }
.weekly-report-case-ref { color: var(--brand, #174c3b); text-decoration: underline; text-underline-offset: 3px; }
.weekly-report-case-ref:focus-visible { outline: 2px solid var(--brand, #174c3b); outline-offset: 3px; }
.weekly-report-body ul, .weekly-report-body ol { padding-left: 24px; }
.weekly-report-body blockquote { margin: 16px 0; border-left: 3px solid var(--brand, #174c3b); padding: 4px 16px; background: var(--surface, #f3f7f4); }
.weekly-report-body blockquote[id] { scroll-margin-top: 96px; }
.weekly-report-body blockquote[id]:focus { outline: 2px solid var(--brand, #174c3b); outline-offset: 3px; }
.weekly-overview-label { border-left: 3px solid var(--brand, #174c3b); padding-left: 12px; }
.weekly-analysis-coverage { margin: 16px 0; padding: 12px 16px; background: var(--surface, #f3f7f4); border: 1px solid var(--line); border-radius: 6px; }
.weekly-report-body .weekly-analysis-coverage > h5 { margin-top: 0; }
.weekly-priority-plan > p:has(> strong) { padding-top: 12px; border-top: 1px solid var(--line); }
.weekly-case-details > summary { font-weight: 500; }
.weekly-report-body code { padding: 2px 4px; background: var(--surface, #f3f7f4); border-radius: 3px; font-size: .9em; }
.weekly-report-body pre { overflow-x: auto; max-width: 100%; background: var(--surface, #f3f7f4); padding: 16px; border: 1px solid var(--line); border-radius: 6px; }
.weekly-report-body pre code { padding: 0; white-space: pre; }
.weekly-report-table { overflow-x: auto; margin: 20px 0; }
.weekly-report-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.weekly-report-table :is(th, td) { min-width: 100px; padding: 10px 12px; border: 1px solid var(--line); vertical-align: top; text-align: left; }
.weekly-report-table th { background: var(--surface, #f3f7f4); }
.weekly-report-omitted { color: var(--muted, #58685f); font-size: 13px; }
.weekly-customer-tools { display: grid; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.weekly-customer-tools label { display: grid; gap: 8px; font-size: 13px; }
.weekly-customer-tools input { width: 100%; min-width: 0; box-sizing: border-box; }
.weekly-customer-tools p { margin: 0; }
.weekly-customer-analysis { border-bottom: 1px solid var(--line); padding: 16px 0; }
.weekly-customer-analysis[hidden] { display: none; }
.weekly-customer-analysis > summary { cursor: pointer; font-weight: 600; line-height: 1.75; overflow-wrap: anywhere; }
.weekly-customer-analysis[open] > summary { margin-bottom: 16px; color: var(--brand, #174c3b); }
.weekly-customer-analysis > div { padding: 0 0 8px 16px; border-left: 2px solid var(--line); }
.weekly-reports-page :is(button, input, select, summary, textarea, [tabindex]):focus-visible { outline: 2px solid var(--brand, #174c3b); outline-offset: 3px; }
.weekly-reports-dialog { width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 24px; }
.weekly-reports-dialog::backdrop { background: rgb(20 36 28 / 40%); }
.weekly-reports-dialog form { display: grid; gap: 16px; }
.weekly-reports-dialog h2, .weekly-reports-dialog p { margin: 0; }
.weekly-reports-dialog textarea { width: 100%; box-sizing: border-box; }
#weeklyReportsManageError { color: #963c32; }
.weekly-create-panel { margin: 20px 0; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper, #fff); }
.weekly-create-panel > summary { cursor: pointer; font-weight: 700; }
.weekly-create-week { display: grid; gap: 8px; margin: 20px 0 16px; }
.weekly-create-week label { max-width: 320px; }
.weekly-create-week p { margin: 0; }
.weekly-create-status { padding: 20px; border: 1px solid var(--line); border-left: 4px solid var(--brand, #174c3b); border-radius: 6px; background: var(--surface, #f3f7f4); overflow-wrap: anywhere; }
.weekly-create-status h3 { margin: 0; font-size: 20px; line-height: 1.5; }
.weekly-create-status p { margin: 8px 0 0; line-height: 1.7; }
.weekly-create-status p:empty, .weekly-create-facts:empty { display: none; }
.weekly-create-status .weekly-reports-actions { margin-top: 16px; }
.weekly-create-status[data-tone="attention"] { border-left-color: var(--warning, #865818); }
.weekly-create-steps { list-style: none; padding: 0; margin: 20px 0 16px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.weekly-create-step { padding-top: 10px; border-top: 3px solid var(--line); min-width: 0; }
.weekly-create-step strong, .weekly-create-step small { display: block; }
.weekly-create-step strong { font-size: 14px; line-height: 1.6; }
.weekly-create-step small { font-size: 12px; line-height: 1.6; color: var(--muted, #58685f); margin-top: 2px; }
.weekly-create-step.is-done, .weekly-create-step.is-current { border-color: var(--brand, #174c3b); }
.weekly-create-step.is-current strong { color: var(--brand, #174c3b); }
.weekly-create-step.is-attention { border-color: var(--warning, #865818); }
.weekly-create-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 20px; margin: 16px 0 0; font-size: 13px; }
.weekly-create-facts div { min-width: 0; }
.weekly-create-facts dt { color: var(--muted, #58685f); margin-bottom: 4px; }
.weekly-create-facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.weekly-create-details { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.weekly-create-details > summary { cursor: pointer; font-size: 13px; font-weight: 600; line-height: 1.7; }
.weekly-create-details p { line-height: 1.8; }
.weekly-create-rules { margin-top: 24px; }
.weekly-create-consent { margin: 0; padding: 12px 16px; border-left: 2px solid var(--line); font-size: 13px; line-height: 1.8; color: var(--muted, #58685f); }
.weekly-create-form, .weekly-create-retry { display: grid; gap: 16px; margin-top: 20px; }
.weekly-create-fields { display: grid; grid-template-columns: minmax(0, 2fr) minmax(160px, 1fr); gap: 16px; }
.weekly-create-panel label { display: grid; gap: 6px; font-size: 13px; }
.weekly-create-panel input:not([type="checkbox"]) { width: 100%; min-width: 0; }
.weekly-create-panel fieldset { min-width: 0; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 6px; }
.weekly-create-panel legend { padding: 0 8px; font-size: 14px; }
.weekly-create-sellers { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.weekly-create-seller { display: grid; gap: 8px; }
.weekly-create-panel .weekly-create-choice { display: flex; gap: 10px; align-items: start; line-height: 1.7; }
.weekly-create-panel input[type="checkbox"] { width: 18px; height: 18px; flex: 0 0 18px; margin: 3px 0 0; }
.weekly-create-panel input[readonly] { background: var(--surface, #f3f7f4); color: var(--muted, #58685f); }
.weekly-create-seller small { color: var(--muted, #58685f); line-height: 1.7; }
.weekly-create-job { border: 1px solid var(--line); border-radius: 6px; margin-top: 16px; padding: 16px; }
.weekly-create-job h3 { margin: 0; font-size: 15px; }
.weekly-create-job > p { line-height: 1.7; margin: 8px 0; }
.weekly-create-budget { max-width: 280px; }
.weekly-create-job progress { width: 100%; margin-bottom: 12px; }
.weekly-create-jobs { margin-top: 20px; }
.weekly-create-history > summary { cursor: pointer; font-weight: 600; padding: 8px 0; }
.weekly-create-history-list { max-height: 320px; overflow-y: auto; overscroll-behavior: contain; }
.weekly-create-job-link { width: 100%; display: flex; gap: 12px; justify-content: space-between; text-align: left; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; cursor: pointer; }
.weekly-create-job-link span { font-size: 12px; color: var(--muted, #58685f); }
.weekly-create-job-link .weekly-create-job-summary { display: grid; gap: 4px; min-width: 0; }
.weekly-create-job-link strong { color: var(--ink, #172c23); font-size: 14px; }
.weekly-create-job-link .weekly-create-job-state { color: var(--brand, #174c3b); font-weight: 600; white-space: nowrap; }
#weeklyCreateError, #weeklyCreateJobError { color: #963c32; overflow-wrap: anywhere; }
@media (max-width: 600px) { .weekly-create-fields, .weekly-create-sellers { grid-template-columns: minmax(0, 1fr); } .weekly-create-panel { padding: 12px; } .weekly-create-panel fieldset { padding: 12px; } .weekly-create-job-link { display: grid; gap: 6px; } .weekly-create-status { padding: 16px 12px; } .weekly-create-status h3 { font-size: 18px; } .weekly-create-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .weekly-create-facts { grid-template-columns: minmax(0, 1fr); } .weekly-create-consent { padding: 12px; } }
@media (max-width: 900px) { .weekly-reports-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; } #weeklyReportsList { max-height: 340px; overflow-y: auto; } .weekly-reports-article { padding: 20px; } }
@media (max-width: 600px) { .weekly-reports-page { padding: 0 12px 24px; } .weekly-reports-toolbar { align-items: start; } .weekly-reports-toolbar h2 { font-size: 19px; } .weekly-reports-filters { display: grid; grid-template-columns: minmax(0, 1fr) auto; } .weekly-reports-filters label:first-child { grid-column: 1 / -1; } .weekly-reports-filters input { width: 100%; } .weekly-reports-filters .weekly-reports-search { min-width: 0; } .weekly-reports-article { padding: 16px; } .weekly-report-head h2 { font-size: 22px; } .weekly-reports-dialog { padding: 16px; } }

.weekly-fold { margin: 16px 0; border: 1px solid var(--line); border-radius: 8px; overflow: clip; }
.weekly-fold > summary { padding: 18px 20px; cursor: pointer; font-weight: 650; line-height: 1.6; scroll-margin-top: 80px; }
.weekly-section > summary { background: var(--surface, #f3f7f4); font-size: 19px; }
.weekly-fold-content { padding: 0 20px 16px; min-width: 0; }
.weekly-person > summary { font-size: 17px; }
.weekly-case > summary { font-size: 15px; }
.weekly-case.is-focus { border-left: 4px solid #9a6b2e; }
.weekly-case.is-focus > summary { background: #faf6ed; }
.weekly-fold[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 12px; }
@media (max-width: 600px) { .weekly-fold > summary { padding: 14px 12px; } .weekly-fold-content { padding: 0 12px 12px; } .weekly-section > summary { font-size: 17px; } }

/* Reading navigation shares the existing sidebar, leaving the report full width. */
#weeklyReportsPage .weekly-reports-layout { grid-template-columns: 224px minmax(0, 1fr); gap: 24px; margin-top: 20px; }
.weekly-reading-sidebar { position: sticky; top: 80px; max-height: calc(100dvh - 104px); overflow-y: auto; overscroll-behavior: contain; }
.weekly-reading-sidebar .weekly-report-contents { margin: 0 0 16px; background: var(--paper, #fff); }
.weekly-report-contents button { border-radius: 4px; padding: 8px; }
.weekly-report-contents button[aria-current="location"] { background: var(--surface, #f3f7f4); font-weight: 700; }
.weekly-report-contents button.is-subsection { padding-left: 24px; font-size: 13px; }
.weekly-report-picker { border-top: 1px solid var(--line); padding-top: 16px; }
.weekly-report-picker > summary { cursor: pointer; font-size: 14px; font-weight: 600; padding: 4px 0; }
.weekly-report-picker .weekly-reports-filters { display: grid; grid-template-columns: minmax(0, 1fr); margin-top: 16px; }
.weekly-report-picker .weekly-reports-filters :is(input, .weekly-reports-search) { width: 100%; min-width: 0; }
.weekly-report-picker .weekly-reports-pagination { gap: 4px; }
#weeklyReportsPage .weekly-report-head h2 { font-size: 24px; }
@media (max-width: 900px) {
  #weeklyReportsPage .weekly-reports-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .weekly-reading-sidebar { position: static; max-height: none; overflow: visible; }
  .weekly-reading-sidebar .weekly-report-contents { margin-bottom: 12px; }
  .weekly-report-picker .weekly-reports-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

#weeklyReportsArticle { scroll-margin-top: 80px; }

/* Scores and next steps stay visible; only supporting cases are folded. */
.weekly-person-review { padding: 20px 0; border-bottom: 1px solid var(--line); }
.weekly-person-review:last-child { border-bottom: 0; padding-bottom: 0; }
.weekly-report-body .weekly-person-review > h4 { margin: 0 0 16px; font-size: 20px; color: var(--brand, #174c3b); }
.weekly-score-basis { border-left: 3px solid var(--brand, #174c3b); background: var(--surface, #f3f7f4); padding: 12px 16px; }
.weekly-score-basis > p:first-child { margin-top: 0; }
.weekly-score-basis > p:last-child { margin-bottom: 0; }
.weekly-review-label { font-weight: 700; color: var(--ink, #1f342a); }
.weekly-coaching-summary { margin: 16px 0; padding: 16px; border: 1px solid var(--line); border-radius: 8px; }
.weekly-report-body .weekly-coaching-summary > h5 { margin: 0 0 12px; font-size: 16px; }
.weekly-coaching-summary > p:last-child { margin-bottom: 0; }
.weekly-coaching-item { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.weekly-coaching-item:first-of-type { margin-top: 0; }
.weekly-coaching-status { flex-shrink: 0; padding: 2px 8px; border-radius: 4px; font-size: 13px; font-weight: 700; color: var(--ink, #1f342a); background: var(--surface, #f3f7f4); }
.weekly-coaching-status.is-improved { color: #195839; background: #e8f3eb; }
.weekly-coaching-status.is-repeated { color: #8a3b24; background: #fff0e6; }

/* Distribution tables keep row names visible while scrolling the categories. */
:is(.weekly-lead-quality-table, .weekly-chat-quality-table, .weekly-lead-chat-cross-table) { max-width: 100%; isolation: isolate; }
:is(.weekly-lead-quality-table, .weekly-chat-quality-table, .weekly-lead-chat-cross-table) table { font-variant-numeric: tabular-nums; }
:is(.weekly-lead-quality-table, .weekly-chat-quality-table, .weekly-lead-chat-cross-table) td { white-space: nowrap; }
:is(.weekly-lead-quality-table, .weekly-chat-quality-table, .weekly-lead-chat-cross-table) :is(th, td):first-child { position: sticky; left: 0; z-index: 1; border-right: 2px solid var(--line); background: var(--paper, #fff); min-width: 88px; max-width: 160px; white-space: normal; overflow-wrap: anywhere; }
:is(.weekly-lead-quality-table, .weekly-chat-quality-table, .weekly-lead-chat-cross-table) th:first-child { background: var(--surface, #f3f7f4); }
.weekly-lead-quality-table th { min-width: 112px; }
.weekly-chat-quality-table th { min-width: 96px; }

/* Reference tables are secondary to conclusions and individual score reasons. */
.weekly-reference { border: 0; border-top: 1px solid var(--line); border-radius: 0; margin: 12px 0; }
.weekly-reference > summary { padding: 12px 0; font-size: 14px; color: var(--muted, #58685f); }
.weekly-reference > .weekly-fold-content { padding: 0 0 12px; }
.weekly-reference[open] > summary { border-bottom: 0; margin-bottom: 0; }
@media print { .weekly-reference > .weekly-fold-content { display: block; } }


/* /styles_delivery_weekly.css */
#dwRoot {margin-top:1.25rem;} #dwRoot p {overflow-wrap:anywhere;white-space:pre-wrap;} #dwRoot form>label {display:grid;gap:.5rem;margin:1rem 0;} #dwRoot form>label.dw-check {display:flex;align-items:center;} .dw-filters {display:flex;flex-wrap:wrap;gap:1rem;align-items:end;} .dw-filters label {display:grid;gap:.5rem;flex:1;min-width:10rem;} .dw-candidates {display:grid;gap:.75rem;max-height:28rem;overflow:auto;margin:1rem 0;} .dw-candidate {display:flex;align-items:start;gap:.75rem;padding:1rem;border:1px solid var(--line,#d9ded9);border-radius:.5rem;} .dw-candidate input,.dw-check input {width:auto;flex-shrink:0;margin-top:.25rem;} .dw-candidate span {display:grid;gap:.25rem;min-width:0;overflow-wrap:anywhere;} .dw-group {margin-top:2rem;border-top:2px solid var(--accent,#174d3b);padding-top:1.25rem;} .dw-group h3 {font-size:1.4rem;} .dw-overview,.dw-finding {margin:1rem 0;padding:1rem;background:var(--surface,#faf9f5);border:1px solid var(--line,#d9ded9);border-radius:.5rem;} .dw-finding h4 {margin:.5rem 0;} .dw-finding blockquote {margin:1rem 0;padding-left:1rem;border-left:3px solid #b9c8be;} #dwRoot [hidden],#weeklySalesPanel[hidden] {display:none!important;} @media(max-width:600px){.dw-filters {display:grid;grid-template-columns:1fr;} #dwRoot .weekly-reports-article {padding:1rem;} .dw-candidate{padding:.75rem;}}

[data-weekly-mode][hidden],#dwRoot[hidden] {display:none!important;}


.release-notice { position: sticky; top: 0; z-index: 1100; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; color: var(--ink); background: var(--surface-3); border-bottom: 1px solid var(--line-strong); }
.release-notice[hidden] { display: none; }
.release-notice p { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.release-notice button { flex-shrink: 0; }
@media (max-width: 600px) { .release-notice { align-items: flex-start; flex-direction: column; gap: 8px; padding: 12px; } }

/* Handoff comparisons preserve manual newlines and work on narrow screens. */
.delivery-change-order { flex-wrap: wrap; }
.delivery-change-comparison { flex-basis: 100%; width: 100%; min-width: 0; }
.change-diff-row { display: grid; grid-template-columns: minmax(110px,1fr) minmax(0,2fr) minmax(0,2fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line, #d9dedb); }
.change-diff-row p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 4px 0; }
@media (max-width: 600px) { .change-diff-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr); } .change-diff-row > strong { grid-column: 1/-1; } }

.cancellation-closeout { padding: 20px; border: 1px solid #d8c493; border-radius: 12px; margin-bottom: 20px; background: #fffdf7; }
.cancellation-item { padding: 14px 0; border-bottom: 1px solid #e4ddcc; }
.cancellation-item .pill { margin-left: 12px; }
.cancellation-item form { display: grid; gap: 10px; max-width: 760px; }
.cancellation-item textarea { min-height: 80px; width: 100%; }


/* /styles_daily_notices.css */
.daily-notice-dialog{width:min(1240px,96vw);max-width:96vw;max-height:94dvh;padding:0;border:1px solid #d8d8ce;border-radius:16px;background:#f8f7f3;color:#193c33;box-shadow:0 20px 90px #0003}
.daily-notice-dialog::backdrop{background:#09231dc0}
.daily-notice-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 24px;position:sticky;top:0;z-index:2;background:#f8f7f3;border-bottom:1px solid #ddd9ce}
.daily-notice-dialog h2{margin:0;font-size:23px}.notice-body{padding:24px}.notice-toolbar{display:flex;align-items:end;flex-wrap:wrap;gap:12px}.notice-toolbar label{min-width:160px}.notice-status{min-height:28px;margin:18px 0;font-size:15px}.notice-workspace{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);gap:32px;margin-top:24px}.notice-workspace aside{background:#e9e7df;padding:20px;border-radius:8px;align-self:start}.notice-workspace img{width:100%;height:auto;display:block;box-shadow:0 4px 24px #0001}.daily-notice-dialog label{display:block;font-size:14px;font-weight:600;margin-bottom:16px}.daily-notice-dialog input:not([type=checkbox]),.daily-notice-dialog select,.daily-notice-dialog textarea{display:block;width:100%;font:inherit;color:#183e32;background:#fff;border:1px solid #bfcac4;border-radius:8px;padding:12px;margin-top:7px;box-sizing:border-box;line-height:1.6}.daily-notice-dialog textarea{resize:vertical;font-size:16px}.daily-notice-dialog input[type=checkbox]{width:18px;height:18px;vertical-align:middle}.daily-notice-dialog .small{font-size:13px;line-height:1.65;color:#606c65}.daily-notice-dialog details{font-size:14px;padding:12px 16px;background:#efede5;border-radius:8px;line-height:1.7}.notice-check{background:#fff1d4;padding:14px;color:#745010;border-radius:8px}.notice-source{white-space:pre-wrap}.notice-config-grid{display:grid;grid-template-columns:minmax(220px,.7fr) minmax(0,1.3fr);gap:24px}.notice-config-grid>[data-list]{max-height:65vh;overflow:auto}.notice-rule{display:flex;flex-direction:column;align-items:start;text-align:left;gap:8px;width:100%;padding:16px 12px;border:0;border-bottom:1px solid #dadbd3;background:transparent;color:#183e32;cursor:pointer}.notice-rule span{font-size:13px;color:#607367}.notice-rule:hover,.notice-rule:focus-visible{background:#e5ebe5}.notice-toolbar>input{max-width:260px}.notice-toolbar>select{max-width:180px}.daily-notice-dialog :focus-visible{outline:3px solid #ad8a4c;outline-offset:3px}
@media(max-width:760px){.notice-workspace,.notice-config-grid{grid-template-columns:1fr}.notice-config-grid>[data-list]{max-height:240px}.notice-body{padding:16px}.daily-notice-dialog>header{padding:14px 16px}.notice-workspace aside{padding:12px}.notice-toolbar .btn{flex:1;min-height:44px}.daily-notice-dialog{width:96vw}.notice-toolbar label{flex:1}.daily-notice-dialog h2{font-size:20px}}

.notice-config [data-hotel-restaurants][hidden] { display: none; }


.followup-schedule-dialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; border: 1px solid var(--line, #d1d9d4); border-radius: 12px; padding: 24px; color: var(--ink, #183c30); background: var(--paper, #fff); }
.followup-schedule-dialog::backdrop { background: #102c2466; }
.followup-schedule-dialog form { display: grid; gap: 16px; }
.followup-schedule-dialog label { display: grid; gap: 8px; }
.followup-schedule-dialog input:not([type=checkbox]), .followup-schedule-dialog textarea { width: 100%; min-width: 0; box-sizing: border-box; }
.followup-schedule-dialog .followup-completed { display: flex; align-items: center; }
.followup-schedule-dialog .followup-completed input { width: auto; }
#scheduledFollowups summary { cursor: pointer; font-weight: 700; }

.payroll-policy-dialog{width:min(760px,calc(100% - 24px));max-height:90vh;border:1px solid #c8d2cd;border-radius:14px;padding:24px;color:#213c32;background:#faf9f5;box-sizing:border-box}.payroll-policy-dialog::backdrop{background:#14251ec0}.payroll-policy-dialog form>label{display:grid;gap:6px;margin:16px 0}.payroll-policy-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:16px 0}.payroll-policy-grid label{display:grid;gap:6px}.payroll-policy-dialog input,.payroll-policy-dialog select,.payroll-policy-dialog textarea{max-width:100%;box-sizing:border-box}.payroll-policy-role{display:inline-flex;align-items:center;gap:6px;margin:8px}.payroll-policy-dialog dl{display:grid;grid-template-columns:1fr 1fr}.payroll-policy-dialog summary{cursor:pointer;padding:10px 0}.payroll-policy-dialog [data-status]{min-height:1.5em}@media(max-width:520px){.payroll-policy-grid{grid-template-columns:1fr}.payroll-policy-dialog{padding:16px}}

.member-tag-filters{margin-bottom:16px}.member-tag-filters summary{cursor:pointer;font-weight:600}.member-tag-filters fieldset{margin:12px 0;border:1px solid #d7ded8;border-radius:8px}.member-tag-filter-group{margin:12px 0}.member-tag-filter-group>div{display:flex;flex-wrap:wrap;gap:10px 16px;margin-top:8px}.member-tag-filter-group label{display:inline-flex;align-items:center;gap:6px;font-size:14px}.member-tag-filter-group input{width:18px;height:18px}.member-repeat-reference{background:#f4f6f1;border:1px solid #ced8d0}.member-repeat-reference li{margin:12px 0}.member-repeat-reference li span{display:block;font-size:13px;color:#59685f;overflow-wrap:anywhere}

.payroll-policy-dialog>header{position:sticky;top:-24px;margin:-24px -24px 18px;padding:20px 24px;background:#faf9f5;border-bottom:1px solid #d7ded8;z-index:2}.payroll-policy-dialog [hidden]{display:none!important}.payroll-policy-dialog [data-events] article{border-top:1px solid #d7ded8;padding:10px 0}.payroll-policy-dialog [data-events]{overflow-wrap:anywhere}@media(max-width:520px){.payroll-policy-dialog>header{top:-16px;margin:-16px -16px 16px;padding:16px}.payroll-policy-dialog h2{font-size:19px}}

.member-repeat-reference>.customer-tag-summary{padding:16px 0;margin:0;background:transparent;border:0}.member-repeat-reference>h2{margin-bottom:12px}

.group-price-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:16px 0}.group-price-totals label,.group-adjustment label{display:grid;gap:6px;min-width:0}.group-price-totals input{font-weight:700;background:#f1f5f2}.group-adjustment{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr) auto;align-items:end;gap:12px;padding:12px 0;border-top:1px solid var(--line,#d7dfda)}.group-adjustment input{min-width:0;width:100%}.group-pricing [data-price-error]{color:#9c3028}@media(max-width:600px){.group-price-totals{grid-template-columns:1fr}.group-adjustment{grid-template-columns:1fr}.group-adjustment button{justify-self:start}}


/* /styles_member_bookings.css */
.mb-list {display:grid;gap:12px;margin:16px 0;}
.mb-row {display:flex;justify-content:space-between;gap:16px;width:100%;padding:16px;background:var(--panel,#fff);color:inherit;border:1px solid var(--line,#d7dfd9);border-radius:10px;text-align:left;cursor:pointer;font:inherit;}
.mb-row small {display:block;margin-top:6px;color:var(--muted,#627169);font-size:.85em;}
.mb-dialog {width:min(860px,calc(100vw - 24px));max-height:90vh;overflow:auto;box-sizing:border-box;border:1px solid var(--line,#d7dfd9);border-radius:14px;padding:24px;background:var(--panel,#fff);color:var(--ink,#1d3028);}
.mb-dialog::backdrop {background:rgba(10,30,22,.45);}
.mb-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;}
:is(.mb-dialog,.member-booking-order) .field {margin:10px 0;display:grid;gap:6px;min-width:0;}
:is(.mb-dialog,.member-booking-order) textarea {min-height:100px;width:100%;box-sizing:border-box;}
:is(.mb-dialog,.member-booking-order) input {max-width:100%;box-sizing:border-box;}
:is(.mb-dialog,.member-booking-order) input[type=checkbox] {width:18px;height:18px;flex:none;margin:0 8px 0 0;vertical-align:middle;}
:is(.mb-dialog,.member-booking-order) fieldset>label:has(input[type=checkbox]) {display:flex;align-items:center;gap:4px;}
:is(.mb-dialog,.member-booking-order) fieldset {border:1px solid var(--line,#d7dfd9);margin:16px 0;padding:16px;}
:is(.mb-dialog,.member-booking-order) fieldset>label {display:block;margin:10px 0;}
.mb-prose {white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65;margin:20px 0;}
:is(.mb-dialog,.member-booking-order) [role=status] {white-space:pre-wrap;overflow-wrap:anywhere;}
@media(max-width:600px){.mb-grid{grid-template-columns:1fr;gap:4px}.mb-dialog{padding:16px}.mb-row{display:grid;gap:10px}}

.mb-workflow{margin:1rem 0;padding:1rem;border:1px solid var(--line,#cad5ce);border-radius:12px;background:var(--surface,#f5f7f3)}
.mb-workflow ol{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.75rem;padding:0;list-style:none}
.mb-workflow li{display:grid;gap:.4rem;color:var(--muted,#52655b)}
.mb-workflow li[aria-current]{color:var(--primary,#124d3c)}
@media(max-width:600px){.mb-workflow ol{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Finance confirmation follows the existing compact checkbox treatment. */
[data-member-profit] label:has([data-profit-complete]){display:flex;align-items:flex-start;gap:8px;line-height:1.5;margin:16px 0}
[data-member-profit] [data-profit-complete]{width:18px;height:18px;min-height:18px;flex:0 0 18px;margin:2px 0 0}
[data-member-profit] select{max-width:100%;width:100%}

.mb-hotel-workspace{width:min(1160px,calc(100vw - 24px));padding:0}
.mb-workflow-hotel ol{grid-template-columns:repeat(5,minmax(0,1fr))}
.mb-contract-notice{margin:20px 0;padding:16px;border:1px solid var(--line);border-radius:8px;background:var(--surface,#f5f7f3);line-height:1.65}
.mb-contract-notice h3{font-size:16px;margin:0 0 8px}.mb-contract-notice p{margin:8px 0}
.mb-dialog> .section-heading>h2{min-width:0;overflow-wrap:anywhere}.mb-dialog> .section-heading>button{flex-shrink:0}
.mb-dialog input,.mb-dialog select,.mb-dialog textarea{min-width:0;max-width:100%}.mb-dialog fieldset{min-width:0}
@media(max-width:600px){.mb-hotel-workspace{padding:0;width:calc(100vw - 16px)}.mb-workflow-hotel ol{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* The existing sales order page changes its fields for member orders. */
#memberBookingOrder{display:none;min-width:0}
.member-order-mode #memberBookingOrder{display:block}
.member-order-mode .guide-grid{grid-template-columns:minmax(0,1fr)}
.member-order-mode .guide-grid>.image-doc,
.member-order-mode .composer-panel>:not(.guide-page-head):not(#memberBookingOrder):not(#salesCollections):not(.delivery-handoff-card),
.member-order-mode .guide-head-actions,
.member-order-mode .delivery-benefits-entry,
.member-order-mode #handoffChecklist,
.member-order-mode #salesTripReview,
.member-order-mode #salesHotelContracts,
.member-order-mode #cancelItineraryBtn,
.member-order-mode [data-save-amount]{display:none!important}
.member-order-mode[data-member-stage="draft"] #salesCollections,
.member-order-mode[data-member-stage="draft"] .delivery-handoff-card{display:none!important}
.member-order-mode[data-hotel-simple="true"] .delivery-handoff-card{display:none!important}
.member-order-mode[data-hotel-simple="true"][data-hotel-prepared="true"] #salesCollections{display:block!important}
.mb-hotel-sales{padding:20px;border:1px solid var(--line);border-radius:12px;background:var(--surface,#f5f7f3);margin:20px 0}
.mb-hotel-summary{margin:16px 0;min-width:0;overflow-wrap:anywhere;line-height:1.6}
.mb-hotel-summary h3{margin:0 0 8px;font-size:18px}.mb-hotel-summary p{margin:4px 0}
.mb-hotel-proposal-details{margin:20px 0;padding:16px;border:1px solid var(--line);border-radius:10px}
.mb-hotel-proposal-details>summary{font-weight:600;cursor:pointer;line-height:1.7}
.mb-hotel-proposal-details>.hp-source{border:0;padding:0;margin:16px 0 0}
.mb-hotel-sales-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.mb-hotel-sales-actions .btn{white-space:normal;min-height:48px}
.mb-hotel-sales>.small,.mb-hotel-contract>.small{line-height:1.7}
.mb-hotel-contract{border-top:1px solid var(--line);margin-top:20px;padding-top:20px;min-width:0;overflow-wrap:anywhere}
.mb-hotel-contract[hidden]{display:none!important}
.mb-hotel-contract h3{margin-top:0}
.mb-hotel-order-details{margin:20px 0;padding:16px;border:1px solid var(--line);border-radius:10px}
.mb-hotel-order-details>summary{font-weight:600;cursor:pointer;line-height:1.7}
.mb-hotel-requote{margin-top:20px;padding-top:16px;border-top:1px solid var(--line)}
@media(max-width:600px){.mb-hotel-sales{padding:16px}.mb-hotel-sales-actions{grid-template-columns:1fr;gap:8px}}
.member-order-mode .composer-panel{min-width:0}
.member-booking-order .mb-grid{min-width:0}
.member-booking-order input,.member-booking-order select,.member-booking-order textarea{min-width:0;max-width:100%}

.destination-picker{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;grid-column:1/-1;min-width:0}.destination-picker [hidden]{display:none!important}@media(max-width:560px){.destination-picker{grid-template-columns:1fr}}

.hotel-order-workspace .workflow-tab[data-page="image"],.hotel-order-workspace .workflow-tab[data-page="templates"]{display:none!important}

.member-order-mode>[data-editor-save-status]{display:none}

.member-order-mode .guide-page-head{display:none}

.member-booking-order fieldset{min-width:0}.member-booking-order :is(input[type=checkbox],input[type=radio]){width:18px!important;min-width:18px;min-height:18px;height:18px!important;flex:0 0 18px}


/* Member consumption statistics reuse the existing read-only records. */
.member-statistics:empty{display:none}
.member-statistics{margin:16px 0;padding:16px;min-width:0;overflow-wrap:anywhere}
.member-statistics summary{cursor:pointer;font-weight:600}
.member-statistics .toolbar-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:12px 0}
.member-statistics input[type=month]{max-width:100%}
.member-statistics .case-board-item{margin:8px 0;min-width:0;flex-wrap:wrap}
.member-statistics .case-board-main{min-width:0;flex:1 1 220px}
.member-statistics [data-stats-body]{margin-top:12px}
@media(max-width:600px){.member-statistics{padding:12px}.member-statistics .case-board-item{display:block}.member-statistics .case-board-item>.btn{margin-top:8px}}

/* Version and ownership decisions stay readable on phones and desktops. */
.kkm-pool-edit-dialog,.kkm-edit-review{border:1px solid var(--border,#c6d8d0);border-radius:16px;padding:24px;width:min(780px,calc(100vw - 32px));max-height:85vh;overflow:auto;color:var(--text,#173f34);background:var(--surface,#fff)}
.kkm-pool-edit-dialog::backdrop,.kkm-edit-review::backdrop{background:rgba(10,35,28,.38)}
.kkm-edit-review h2,.kkm-pool-edit-dialog h2{margin-top:0;font-size:1.35rem}
.kkm-edit-comparison{overflow-x:auto;margin:16px 0}.kkm-edit-comparison table{width:100%;border-collapse:collapse;table-layout:fixed}.kkm-edit-comparison th,.kkm-edit-comparison td{padding:12px;border-bottom:1px solid #dbe5e0;text-align:left;vertical-align:top;white-space:pre-wrap;overflow-wrap:anywhere}.kkm-edit-comparison thead{background:#eef5f1}.kkm-edit-review .button-row{position:sticky;bottom:-24px;background:#fff;padding:16px 0;gap:12px;display:flex;flex-wrap:wrap}.payroll-preflight details>summary{cursor:pointer;padding:8px 0}.payroll-preflight li{margin:12px 0;overflow-wrap:anywhere}
@media(max-width:600px){.kkm-pool-edit-dialog,.kkm-edit-review{padding:16px}.kkm-edit-comparison td,.kkm-edit-comparison th{padding:8px;font-size:13px}.kkm-edit-review .button-row{bottom:-16px}.kkm-edit-review .button-row .btn{flex:1}.case-board-controls>.btn{flex:1 1 42%;white-space:normal}}

/* Shared itinerary and hotel library */
.tl-toolbar,.tl-tabs,.tl-search{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.tl-toolbar{justify-content:space-between;margin-bottom:20px}.tl-tabs [aria-pressed=true]{background:var(--green,#124b3c);color:#fff}.tl-search input{min-width:0;max-width:100%}.tl-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr));gap:18px;margin-bottom:20px}.tl-card{border:1px solid #dce4de;border-radius:12px;overflow:hidden;min-width:0}.tl-card img,.tl-placeholder{width:100%;height:190px;object-fit:cover}.tl-placeholder{display:grid;place-items:center;background:#eef2ed;color:#5d6b62}.tl-card-body{padding:18px}.tl-card h3{margin:8px 0;overflow-wrap:anywhere}.tl-dialog{max-width:min(860px,94vw);max-height:90vh;overflow:auto;border:1px solid #cad6cd;border-radius:12px;padding:24px}.tl-dialog::backdrop{background:#0b261d77}.tl-dialog section{border-top:1px solid #dce4de;padding:16px 0}.tl-detail-photo{width:100%;height:auto}.tl-dialog p{white-space:pre-line;overflow-wrap:anywhere}

.tl-upload{margin:16px 0;padding:16px;border:1px dashed var(--line,#ccd6d2);border-radius:10px}.tl-dialog label{display:block;margin:12px 0}.tl-dialog input:not([type=file]){display:block;width:100%;box-sizing:border-box}.tl-dialog [data-tl-existing] section{margin:24px 0;border-top:1px solid #d9dfdb;padding-top:20px}.tl-dialog [data-tl-save-status]{white-space:pre-wrap}
