.billing-card { width:100%; text-align:left; cursor:pointer; }
.billing-card:focus-visible { outline:3px solid var(--gold); outline-offset:3px; }
.billing-card-chevron { display:none; }
@media(max-width:420px) {
  .billing-card.profile-setup-card { grid-template-columns:auto minmax(0,1fr) auto; }
  .billing-card-chevron { display:block; color:#855d00; font-size:1.6rem; line-height:1; }
}
body:has(.billing-dialog[open]) { overflow:hidden; }
.billing-dialog { width:min(620px,calc(100vw - 24px)); max-height:calc(100dvh - 24px); border:0; border-radius:22px; padding:0; color:var(--navy); background:var(--navy); overflow-x:hidden; box-shadow:0 20px 80px #00143660; }
.billing-dialog::backdrop { background:#001436bf; }
.billing-dialog-header { position:sticky; top:0; z-index:2; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:20px 24px; background:var(--navy); color:white; }
.billing-dialog-header h2 { margin:0; color:white; font-size:1.35rem; }
.billing-close { background:#ffffff18; color:white; border:1px solid #ffffff50; border-radius:50%; width:38px; height:38px; flex-shrink:0; cursor:pointer; font-size:24px; }
.billing-body { padding:24px; background:var(--white); border-radius:0 0 22px 22px; }
.billing-summary { grid-area:summary; }
.billing-document { grid-area:document; min-width:0; }
.billing-status-badge { display:inline-block; padding:6px 11px; border-radius:999px; font-size:.74rem; font-weight:800; background:#fff3cf; color:#855d00; }
.billing-meta { display:flex; align-items:baseline; gap:10px; margin:0; }
.billing-meta #bill-recipient { min-width:0; overflow-wrap:anywhere; }
.billing-updated { color:var(--muted); font-size:.78rem; white-space:nowrap; }
.billing-explanation { line-height:1.6; color:var(--ink); font-size:.9rem; }
.billing-guest-note { white-space:pre-wrap; overflow-wrap:anywhere; color:var(--ink); line-height:1.5; }
.billing-guest-note:not(:empty) { padding:14px 16px; border-left:3px solid var(--gold); background:var(--gold-soft); border-radius:0 12px 12px 0; }
.billing-pages-nav { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; margin:0 0 12px; min-height:28px; }
.billing-pages-nav span { font-size:.8rem; font-weight:700; }
.billing-pages-nav .secondary-button, .billing-actions .secondary-button { min-height:40px; }
.billing-image-frame { margin:0; background:#eef1f5; border:1px solid var(--border); border-radius:14px; padding:12px; text-align:center; overflow:auto; max-height:calc(100dvh - 220px); }
.billing-image-frame img { display:block; width:auto; max-width:100%; max-height:calc(100dvh - 246px); height:auto; margin:auto; border-radius:6px; }
.billing-image-frame.is-zoomed img { width:auto; max-width:none; max-height:none; margin:0; }
.billing-actions { grid-area:actions; display:flex; gap:10px; flex-wrap:wrap; margin:12px 0; }
.billing-actions a { text-decoration:none; display:inline-flex; align-items:center; justify-content:center; }
.billing-footnote { grid-area:footnote; font-size:.75rem; line-height:1.55; color:var(--muted); }
.billing-load-error { color:var(--danger); padding:12px; }
.billing-prototype-note { margin:0 0 22px; padding:12px 14px; border-radius:10px; color:#795400; background:var(--gold-soft); font-size:.78rem; line-height:1.5; }
.billing-admin-card { max-width:1120px; }
.billing-desk-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.staff-readiness { margin:20px 0; padding:16px; border:1px solid var(--border); border-radius:14px; background:var(--soft); }
.staff-readiness > summary { cursor:pointer; font-weight:800; min-height:28px; }
.staff-workflow { padding-left:22px; color:var(--ink); font-size:.8rem; line-height:1.6; }
.staff-workflow li { margin:14px 0; }
.staff-service-checks { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:8px; }
.staff-service-checks p { display:flex; flex-direction:column; gap:5px; margin:0; padding:12px; border-radius:10px; background:var(--white); font-size:.78rem; }
.staff-service-checks span, .staff-room-routes span { color:var(--muted); }
.staff-room-routes p { display:flex; flex-wrap:wrap; gap:6px 14px; font-size:.76rem; overflow-wrap:anywhere; }
.billing-step-heading { font-size:1.15rem; margin:30px 0 16px; }
.billing-recipient-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.billing-recipient-grid label { font-size:.82rem; font-weight:700; }
.billing-recipient-grid select { margin-top:7px; }
.billing-help { color:var(--muted); font-size:.8rem; line-height:1.5; margin:10px 0 18px; overflow-wrap:anywhere; }
.billing-upload-box { display:grid; gap:10px; padding:24px; border:2px dashed #d7b465; border-radius:16px; background:#fffaf0; }
.billing-upload-box span { color:var(--muted); font-size:.8rem; }
.billing-upload-box input { max-width:100%; font-size:.85rem; }
.billing-upload-box input::file-selector-button { border:0; border-radius:999px; padding:9px 14px; margin-right:10px; background:var(--navy); color:white; cursor:pointer; }
.billing-batch { padding:16px; border:1px solid var(--border); border-radius:14px; background:var(--soft); }
.billing-batch > summary { cursor:pointer; color:var(--navy); font-weight:800; }
.billing-batch form { margin-top:14px; }
.billing-batch form .secondary-button { margin-top:10px; }
.billing-batch input[type="file"] { display:block; max-width:100%; margin:10px 0; font-size:.85rem; }
.billing-import-summary { margin:18px 0; padding:12px 16px; border:1px solid var(--border); border-radius:12px; background:var(--white); }
.billing-import-summary p { font-size:.85rem; line-height:1.5; overflow-wrap:anywhere; }
.billing-source-settings { margin-top:16px; font-size:.85rem; }
.billing-source-settings summary { cursor:pointer; margin-bottom:12px; }
.billing-source-settings input { margin:8px 0; }
#billing-source-status.is-error { color:var(--danger); }
#billing-statement-items p { padding:12px 0; margin:0; border-bottom:1px solid var(--border); font-size:.85rem; line-height:1.6; overflow-wrap:anywhere; }
.billing-batch-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); align-items:start; gap:12px; margin:10px 0; padding:12px; border:1px solid var(--border); border-radius:10px; background:white; }
.billing-batch-row summary { cursor:pointer; font-weight:700; overflow-wrap:anywhere; }
.billing-batch-row img { display:block; max-width:100%; max-height:65dvh; margin-top:10px; }
.billing-batch-row label,.billing-batch-row p { font-size:.8rem; overflow-wrap:anywhere; }
.billing-batch-row p { margin:0 0 8px; }
.billing-batch-row select { margin-top:5px; }
.billing-version-row { display:flex; align-items:center; gap:8px; margin:8px 0; }
.billing-version { display:block; flex:1; min-width:0; text-align:left; background:var(--soft); color:var(--navy); border:1px solid var(--border); padding:12px 14px; border-radius:10px; cursor:pointer; font-size:.85rem; text-transform:capitalize; }
.billing-version-delete { flex:none; color:var(--danger); }
.billing-voyage-review { margin-bottom:16px; }
.billing-voyage-review .billing-help { margin-bottom:10px; }
body[data-voyage-review="true"] #billing-drafts,
body[data-voyage-review="true"] #billing-admin-preview { display:none; }
.billing-review-card { margin:22px 0; padding:22px; border:1px solid #cbd5e2; border-radius:16px; background:var(--white); scroll-margin-top:18px; }
.billing-review-card-header { display:flex; flex-wrap:wrap; align-items:flex-start; justify-content:space-between; gap:12px; padding-bottom:16px; margin-bottom:18px; border-bottom:2px solid var(--gold-soft); }
.billing-review-card-header h3 { margin:0; font-size:1.1rem; overflow-wrap:anywhere; }
.billing-review-card-header .billing-help { margin:6px 0 0; }
.billing-review-card .billing-status-badge { flex-shrink:0; }
.billing-review-card .billing-status-badge.is-reviewed { color:#21633a; background:#e7f5eb; }
.billing-review-card .billing-admin-pages { display:block; }
.billing-review-card .billing-admin-pages figure { max-width:none; margin-bottom:16px; }
.billing-review-card .billing-review-grid { grid-template-columns:minmax(0,.7fr) minmax(0,1.3fr); }
.billing-card-total-check { display:block!important; color:var(--success); line-height:1.5; }
.billing-card-total-check.is-error { color:var(--danger); }
.billing-card-message { margin:14px 0 0; font-size:.85rem; line-height:1.5; color:var(--ink); }
@media(max-width:900px) { .billing-review-card .billing-review-grid { grid-template-columns:1fr; } }
@media(max-width:560px) { .billing-review-card { padding:14px; } }
.billing-review-row { display:flex; flex-wrap:wrap; align-items:center; gap:8px 16px; margin:8px 0; padding:12px; border:1px solid var(--border); border-radius:10px; background:var(--white); }
.billing-review-copy { flex:1 1 220px; min-width:0; overflow-wrap:anywhere; font-size:.85rem; }
.billing-review-copy small { display:block; margin-top:5px; color:var(--muted); }
.billing-review-choice { display:inline-flex; align-items:center; gap:6px; font-size:.8rem; }
.billing-review-choice input { accent-color:var(--gold); }
.billing-recipient-confirmation { white-space:pre-line; padding:18px; background:var(--soft-blue); border-radius:14px; margin:18px 0; font-weight:700; line-height:1.7; }
.billing-admin-pages { display:flex; gap:16px; flex-wrap:wrap; }
.billing-admin-pages figure { margin:0; flex:1 1 220px; max-width:360px; padding:10px; border-radius:12px; border:1px solid var(--border); background:var(--soft); }
.billing-admin-pages img { display:block; width:100%; height:auto; }
.billing-admin-pages figcaption { font-size:.8rem; margin-top:8px; color:var(--muted); }
.billing-confirm { display:flex; align-items:flex-start; gap:12px; padding:18px; margin:18px 0 0; line-height:1.5; border:1px solid var(--border); border-radius:12px; font-size:.88rem; }
.billing-confirm input { margin-top:4px; accent-color:var(--gold); }
.billing-status { position:sticky; bottom:12px; z-index:3; margin:20px 0 0; border-radius:12px; color:var(--success); background:var(--success-bg); font-size:.9rem; line-height:1.5; }
.billing-status:not(:empty) { padding:14px; border:1px solid #a7d4b1; }
.billing-status.is-error { color:var(--danger); background:#fff0ef; border-color:#efb4b2; }
.billing-home-link { display:inline-block; margin-top:24px; color:var(--navy); font-weight:700; }
.billing-review-grid { display:grid; grid-template-columns:minmax(0,.7fr) minmax(0,1.3fr); gap:24px; align-items:start; }
.billing-review-grid:has(.billing-editor.hidden) { display:block; }
.billing-editor h3 { margin:0 0 12px; }
.billing-ocr-warnings { border-left:3px solid var(--gold); padding:4px 12px; background:var(--gold-soft); font-size:.8rem; line-height:1.5; margin:14px 0; }
.billing-edit-row { display:grid; grid-template-columns:minmax(0,1fr) 60px 125px; gap:10px; padding:16px; border:1px solid var(--border); border-radius:12px; margin:12px 0; background:var(--soft); }
.billing-edit-row label { font-size:.73rem; font-weight:700; min-width:0; }
.billing-edit-row label:nth-child(4) { grid-column:1/3; }
.billing-edit-row input { background:white; font-weight:500; margin-top:5px; }
.billing-edit-row button { align-self:end; font-size:.7rem; }
.billing-edit-row .billing-item-discount { grid-column:1/-1; display:flex; align-items:center; gap:8px; color:#855d00; line-height:1.5; }
.billing-item-discount input { margin:0; width:16px; height:16px; accent-color:var(--gold); flex-shrink:0; }
.billing-editor-totals { margin:20px 0; padding:18px; background:var(--soft-blue); border-radius:12px; }
.billing-editor-totals label { display:block; margin:12px 0; font-size:.8rem; font-weight:700; }
.billing-editor-totals p { display:flex; justify-content:space-between; gap:12px; font-size:.85rem; }
#billing-total-check { color:var(--success); font-size:.8rem; line-height:1.5; }
#billing-total-check.is-error { color:var(--danger); }
.bill-statement { margin:20px 0; padding:18px; border:1px solid var(--border); border-radius:14px; background:#fffdf7; }
.billing-body:has(.bill-statement:not(.hidden)) .billing-explanation { display:none; }
.bill-currency { color:#916600; font-size:.76rem; font-weight:500; margin-bottom:16px; }
.bill-statement-head,.bill-statement-row { display:flex; justify-content:space-between; gap:16px; padding:12px 0; border-bottom:1px solid var(--border); font-size:.8rem; }
.bill-statement-head { padding-top:0; color:var(--muted); font-size:.7rem; }
.bill-statement-row > strong { white-space:nowrap; }
.bill-statement-row small { display:block; color:var(--muted); font-size:.7rem; margin-top:5px; overflow-wrap:anywhere; }
.bill-statement-row > div { min-width:0; overflow-wrap:anywhere; }
.bill-discounted { display:inline-block; padding:3px 8px; margin-top:6px; border-radius:999px; background:#fff0c4; color:#855d00; font-size:.65rem; font-weight:700; }
.bill-statement-totals p { display:flex; justify-content:space-between; gap:10px; font-size:.78rem; }
.bill-grand-total { border-top:1px solid #dbcda3; padding-top:14px; color:var(--navy); font-weight:800; }
.bill-grand-total strong { color:#926500; }
.bill-original-label { color:var(--muted); margin-top:0; font-size:.8rem; font-weight:700; }
@media(max-width:900px) { .billing-review-grid { grid-template-columns:1fr; } .billing-admin-pages figure { max-width:280px; } }
@media(max-width:680px) {
  .billing-body { display:block; }
  .billing-document { margin-top:18px; }
  .billing-image-frame { max-height:none; }
  .billing-image-frame img { width:100%; max-height:none; }
  .billing-image-frame.is-zoomed { max-height:65dvh; }
  .billing-edit-row { grid-template-columns:minmax(0,1fr) 60px; }
  .billing-edit-row label:nth-child(3),.billing-edit-row label:nth-child(4) { grid-column:1/-1; }
  .bill-statement { padding:14px; }
}
@media(max-width:560px) {
  .billing-dialog-header,.billing-body { padding:18px; }
  .billing-image-frame { padding:6px; }
  .billing-recipient-grid { grid-template-columns:1fr; }
  .billing-batch-row { grid-template-columns:1fr; }
  .billing-upload-box { padding:16px; }
}
