/* ==========================================================================
   S16 Rates (Mockup 10) - per-person + crew rate card. DataRipple tokens from
   chrome.css; on-brand red/blue, no green. Review-only. No Date().
   ========================================================================== */

/* ---- inline snapshot ------------------------------------------------- */
.rt-snap { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px; padding: 2px 2px 15px; margin-bottom: 16px; border-bottom: 1px solid var(--border-subtle); }
.rt-snap .eb { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--brand); display: inline-flex; align-items: center; gap: 7px; }
.rt-snap .eb .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px var(--brand-subtle); }
.rt-snap .s { font-size: 13px; color: var(--fg-3); display: inline-flex; align-items: baseline; gap: 6px; }
.rt-snap .s b { font-size: 17px; font-weight: 700; color: var(--fg-1); font-variant-numeric: tabular-nums; }
.rt-snap .s.under b { color: var(--brand); }
.rt-snap .sep { color: var(--border-default); }

/* ---- rate table ------------------------------------------------------ */
.rt-table { width: 100%; border-collapse: collapse; }
.rt-table thead th { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--fg-3); text-align: left; padding: 9px 14px; border-bottom: 2px solid var(--border-default); white-space: nowrap; }
.rt-table th.n, .rt-table td.n { text-align: right; }
.rt-table tbody td { padding: 11px 14px; border-bottom: 1px solid var(--border-subtle); vertical-align: middle; font-size: 13.5px; color: var(--fg-1); }

.rt-sec td { background: #2F3C4E; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 8px 14px !important; border: none !important; }
.rt-sec .tg { font-weight: 600; font-size: 10px; letter-spacing: .04em; margin-left: 8px; padding: 2px 7px; border-radius: 999px; background: rgba(255,255,255,0.16); }
.rt-sec .nt { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 11.5px; color: #c7d2e0; margin-left: 10px; }

.rt-row { cursor: pointer; }
.rt-row:hover td { background: var(--surface-hover, #f6f8fb); }
.rt-who .nm { font-weight: 600; color: var(--fg-1); }
.rt-who .ro { font-size: 11.5px; color: var(--fg-3); margin-top: 1px; }
.cls { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.cls.c99 { background: var(--info-soft); color: var(--info); }
.cls.cw2 { background: var(--surface-secondary); color: var(--fg-2); border: 1px solid var(--border-default); }
.rt-table td.n { font-variant-numeric: tabular-nums; white-space: nowrap; }
.rt-table td.bd { color: var(--fg-3); }
.rt-table td.bd .muted { color: var(--border-default); }
.rt-table td.cost { font-weight: 600; }
.rt-table td.bill { font-weight: 700; color: var(--info); }
.rt-margin { display: flex; flex-direction: column; line-height: 1.25; }
.rt-margin .p { font-weight: 700; color: var(--fg-1); font-variant-numeric: tabular-nums; }
.rt-margin .m { font-size: 11.5px; color: var(--fg-3); }
.rt-margin.under .p { color: var(--brand); }
.rt-margin.under .m { color: var(--brand); }
.rt-margin .flag { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--brand); background: var(--brand-subtle); padding: 1px 5px; border-radius: 4px; margin-left: 3px; }
.rt-table td.eff { color: var(--fg-2); font-size: 12.5px; white-space: nowrap; }
.rt-table td.eff .hist { display: inline-block; font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--fg-3); background: var(--surface-secondary); border: 1px solid var(--border-default); padding: 1px 5px; border-radius: 4px; margin-left: 6px; }
.rt-table td.chev { text-align: center; color: var(--fg-3); width: 30px; }
.rt-table td.chev span { font-size: 17px; }

/* ---- expand panel ---------------------------------------------------- */
.rt-detail td { padding: 0 !important; background: var(--surface-secondary); border-bottom: 1px solid var(--border-default) !important; }
.rt-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; padding: 18px 22px 20px; }
.rt-col { min-width: 0; }
.rt-build { border: 1px solid var(--border-default); border-radius: var(--r-md); background: #fff; overflow: hidden; }
.rt-build .bl { display: flex; align-items: center; justify-content: space-between; padding: 8px 13px; font-size: 13px; color: var(--fg-2); border-bottom: 1px solid var(--border-subtle); }
.rt-build .bl b { font-variant-numeric: tabular-nums; color: var(--fg-1); font-weight: 600; }
.rt-build .bl.add span { color: var(--fg-3); padding-left: 12px; }
.rt-build .bl.add b { color: var(--fg-2); font-weight: 500; }
.rt-build .bl.tot { background: var(--surface-secondary); border-bottom: none; font-weight: 700; }
.rt-build .bl.tot span { color: var(--fg-1); font-weight: 700; }
.rt-build .bl.tot b { font-size: 15px; }
.rt-build .bl.note-1099 { display: block; font-size: 11.5px; color: var(--fg-3); font-style: italic; }

.rt-price { border: 1px solid var(--border-default); border-radius: var(--r-md); background: #fff; overflow: hidden; }
.rt-price .pr { display: flex; align-items: center; justify-content: space-between; padding: 8px 13px; font-size: 13px; color: var(--fg-2); border-bottom: 1px solid var(--border-subtle); }
.rt-price .pr b { font-variant-numeric: tabular-nums; color: var(--fg-1); font-weight: 600; }
.rt-price .pr.arrow b.mk { color: var(--info); }
.rt-price .pr b.bl2 { color: var(--info); font-weight: 700; font-size: 15px; }
.rt-price .pr.prof { background: var(--info-soft); border-bottom: none; }
.rt-price .pr.prof b { color: var(--info); font-weight: 700; }
.rt-price .pr.prof.under { background: var(--brand-subtle); }
.rt-price .pr.prof.under b { color: var(--brand); }

.rt-ot, .rt-hist { margin-top: 12px; }
.rt-ot .k, .rt-hist .k { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 6px; }
.rt-ot .otrow { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; color: var(--fg-3); }
.rt-ot .otrow b { color: var(--fg-1); font-weight: 600; font-variant-numeric: tabular-nums; margin-right: 12px; }
.rt-hist .hrow { font-size: 12.5px; color: var(--fg-2); display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.rt-hist .hrow em { color: var(--fg-3); font-style: normal; }
.rt-hist .dotp { width: 7px; height: 7px; border-radius: 50%; background: var(--border-default); flex-shrink: 0; }
.rt-hist .dotc { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px var(--brand-subtle); flex-shrink: 0; }

.rt-acts { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.rt-acts .eff-note { font-size: 12px; color: var(--fg-3); }

/* ---- edit / new-rate modal ------------------------------------------ */
.ed-back { position: fixed; inset: 0; background: rgba(11,18,32,0.5); display: none; align-items: center; justify-content: center; z-index: 200; padding: 32px; }
.ed-back.show { display: flex; }
.ed { background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 700px; max-height: 92vh; overflow: hidden; display: flex; flex-direction: column; }
.ed-head { display: flex; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--border-default); flex-shrink: 0; }
.ed-head h3 { margin: 0; font-size: 16px; font-weight: 700; color: var(--fg-1); }
.ed-head .x { margin-left: auto; font-size: 22px; color: var(--fg-3); cursor: pointer; background: none; border: none; line-height: 1; }
.ed-body { padding: 18px 22px; overflow-y: auto; min-height: 0; }
.ed-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 18px; }
.ed-f { display: flex; flex-direction: column; gap: 5px; }
.ed-f.full { grid-column: 1 / -1; }
.ed-f label { font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--fg-3); }
.ed-f input, .ed-f select { font-family: inherit; font-size: 13.5px; color: var(--fg-1); background: #fff; border: 1px solid var(--border-default); border-radius: var(--r-md); padding: 8px 11px; outline: none; }
.ed-f input:focus, .ed-f select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-subtle); }
.ed-sub { grid-column: 1 / -1; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--fg-3); border-top: 1px solid var(--border-subtle); padding-top: 14px; margin-top: 2px; }
.ed-burden { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
#ed1099Note { grid-column: 1 / -1; font-size: 12px; color: var(--fg-3); font-style: italic; background: var(--info-soft); border-radius: var(--r-md); padding: 9px 12px; }
.ed-prev { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--border-default); border-radius: var(--r-md); overflow: hidden; margin-top: 4px; }
.ed-prev .pv { padding: 10px 13px; border-left: 1px solid var(--border-subtle); }
.ed-prev .pv:first-child { border-left: none; }
.ed-prev .pv span { display: block; font-size: 11px; color: var(--fg-3); }
.ed-prev .pv b { font-size: 15px; color: var(--fg-1); font-variant-numeric: tabular-nums; }
.ed-prev .pv.prof { grid-column: 1 / -1; background: var(--info-soft); display: flex; align-items: baseline; justify-content: space-between; }
.ed-prev .pv.prof b { color: var(--info); }
.ed-prev .pv.prof.under { background: var(--brand-subtle); }
.ed-prev .pv.prof.under b { color: var(--brand); }
.ed-prev .flag { font-size: 9.5px; font-weight: 700; text-transform: uppercase; color: var(--brand); background: #fff; padding: 1px 5px; border-radius: 4px; margin-left: 6px; }
.ed-foot { display: flex; align-items: center; gap: 12px; padding: 14px 22px; border-top: 1px solid var(--border-default); flex-shrink: 0; }
.ed-foot .note { font-size: 11.5px; color: var(--fg-3); }
.ed-foot .grow { flex: 1; }

/* ---- toast ----------------------------------------------------------- */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(12px); background: var(--shell, #1B2433); color: #fff; font-size: 13px; font-weight: 500; padding: 11px 18px; border-radius: var(--r-md); box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease; z-index: 300; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 820px) { .rt-panel { grid-template-columns: 1fr; } }
