/* RUMBO 360 Manager — brand-consistent admin shell (reuses tokens.css). */
*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{font-family:Manrope,system-ui,-apple-system,sans-serif;background:var(--sand,#F5EFE3);color:var(--ink,#0C3B47);-webkit-font-smoothing:antialiased;}
a{color:inherit;text-decoration:none;}
h1,h2,h3{letter-spacing:-.01em;}

/* App shell: sidebar + main */
.mgr{display:grid;grid-template-columns:244px 1fr;min-height:100vh;}
/* Pinned to the viewport height so the brand header and the collapse toggle always stay put; .nav (below) is
   the only part that scrolls once the role-gated link list grows taller than the screen. */
.side{background:var(--ink-deep,#0E2A33);color:#fff;display:flex;flex-direction:column;padding:16px 12px;position:sticky;top:0;height:100vh;overflow:hidden;}
.side .brand{display:flex;align-items:center;gap:10px;font-weight:800;font-size:17px;padding:8px 8px 18px;flex:none;}
.side .brand img{width:30px;height:30px;border-radius:50%;}
.side .brand small{display:block;font-size:11px;font-weight:600;color:#9fc0c7;letter-spacing:.04em;text-transform:uppercase;}
/* flex:1 1 auto + min-height:0 is what lets a flex child scroll instead of forcing its flex-column parent
   (.side) to grow past the viewport — min-height:0 overrides flexbox's default min-height:auto sizing. */
.nav{display:flex;flex-direction:column;gap:3px;flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.25) transparent;}
.nav::-webkit-scrollbar{width:6px;}
.nav::-webkit-scrollbar-thumb{background:rgba(255,255,255,.25);border-radius:999px;}
.nav::-webkit-scrollbar-track{background:transparent;}
.nav .grp{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#7fa3ab;padding:14px 12px 6px;}
.nav a{display:flex;align-items:center;gap:11px;padding:10px 12px;border-radius:10px;color:#cfe0e4;font-size:14px;font-weight:600;transition:background .12s,color .12s;}
.nav a i{font-size:18px;}
.nav a:hover{background:rgba(255,255,255,.08);color:#fff;}
.nav a.active{background:var(--teal,#0F4C5C);color:#fff;}
.nav a.disabled{opacity:.5;cursor:default;}
.nav a .soon{margin-left:auto;font-size:10px;font-weight:700;background:rgba(255,255,255,.14);padding:2px 7px;border-radius:999px;}

/* Blazor Server's built-in circuit-error banner (MainLayout.razor). Hidden by default — the framework's boot
   script sets an inline display:block only when an unhandled circuit error actually occurs; without this rule
   the div has no default state and renders visible on every page load. */
#blazor-error-ui{display:none;position:fixed;left:0;right:0;bottom:0;z-index:9999;padding:14px 20px;background:#B42318;color:#fff;font-size:14px;font-weight:600;box-shadow:0 -4px 16px rgba(0,0,0,.2);}
#blazor-error-ui .reload{color:#fff;text-decoration:underline;font-weight:700;margin-left:12px;}
#blazor-error-ui .dismiss{cursor:pointer;float:right;margin-left:16px;opacity:.85;}
#blazor-error-ui .dismiss:hover{opacity:1;}

.main{display:flex;flex-direction:column;min-width:0;}
.topbar{height:62px;background:#fff;border-bottom:1px solid var(--line-2,#E2E8E7);display:flex;align-items:center;justify-content:space-between;padding:0 24px;position:sticky;top:0;z-index:5;}
/* Grouped so the hamburger always sits right next to the title, regardless of viewport width — with 3 flat
   flex children (button/h1/userbox) .topbar's space-between would push h1 away from the button on wide
   screens now that the hamburger is shown at every breakpoint (previously mobile-only, hence not an issue). */
.topbar-title{display:flex;align-items:center;gap:12px;min-width:0;}
.topbar h1{font-size:18px;margin:0;}
.userbox{display:flex;align-items:center;gap:14px;font-size:14px;}
.userbox .who{display:flex;flex-direction:column;line-height:1.2;text-align:right;}
.userbox .who b{font-weight:700;}
.userbox .who span{font-size:12px;color:var(--muted,#5b6b6e);}

.btn.sm{padding:6px 10px;font-size:12px;}

/* Notification bell (MainLayout topbar) */
.bellwrap{position:relative;}
.bellbtn{position:relative;background:transparent;border:1px solid var(--line-2,#E2E8E7);border-radius:10px;width:38px;height:38px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;font-size:18px;color:var(--ink,#0C3B47);}
.bellbtn:hover{background:rgba(31,42,46,.06);}
.bell-badge{position:absolute;top:-4px;right:-4px;background:#C0392B;color:#fff;font-size:10px;font-weight:700;line-height:1;padding:3px 5px;border-radius:999px;min-width:16px;text-align:center;}
.bell-scrim{position:fixed;inset:0;z-index:20;background:transparent;}
.bell-panel{position:absolute;top:46px;left:50%;transform:translateX(-60%);width:340px;max-height:420px;display:flex;flex-direction:column;z-index:21;box-shadow:0 12px 32px rgba(21,51,61,.18);}
.bell-head{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border-bottom:1px solid var(--line-2,#E2E8E7);}
.bell-empty{padding:20px 14px;text-align:center;}
.bell-list{overflow-y:auto;}
.bell-item{display:flex;flex-direction:column;align-items:flex-start;gap:2px;width:100%;text-align:left;padding:10px 14px;border:none;border-bottom:1px solid var(--line-2,#E2E8E7);background:#fff;cursor:pointer;font-family:inherit;}
.bell-item:hover{background:var(--sand,#F5EFE3);}
.bell-item:last-child{border-bottom:none;}
.bell-item-title{font-weight:700;font-size:13px;color:var(--ink,#0C3B47);}
.bell-item-body{font-size:12px;color:var(--muted,#5b6b6e);}
.bell-item-time{font-size:11px;color:var(--muted,#5b6b6e);margin-top:2px;}
@media (max-width:640px){
  /* Reset the desktop centering transform (translateX(-60%), relative to left:50%) — otherwise it still
     applies on top of the fixed left/right positioning below and drags the panel off-screen to the left. */
  .bell-panel{position:fixed;top:62px;left:12px;right:12px;width:auto;transform:none;}
  /* "Sign out"'s label wraps to a second line at this width (not enough room next to the staff name +
     bell), which the topbar's fixed height then clips — icon-only keeps the control fully visible and
     tappable, mirroring how .who's secondary "Staff" line is already dropped at the 820px breakpoint. */
  .logoutf .btn span{display:none;}
}
.content{padding:24px;}

.btn{background:var(--teal-d,#0A3641);color:#fff;border:none;border-radius:10px;padding:10px 16px;font-weight:700;cursor:pointer;font-family:inherit;font-size:14px;display:inline-flex;align-items:center;gap:8px;}
.btn:hover{background:#085a6f;}
.btn.ghost{background:transparent;color:var(--ink,#0C3B47);border:1px solid var(--line-2,#E2E8E7);}
/* A translucent dark overlay (not an opaque sand fill) so the hover darkens whatever's actually behind
   it — white, sand, or a tinted card (e.g. the pink "overdue" reminder background) — instead of stamping
   an opaque sand rectangle that clashes against a differently-colored container. */
.btn.ghost:hover{background:rgba(31,42,46,.06);}

/* Dashboard cards */
.kpis{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px;}
.kpi{background:#fff;border:1px solid var(--line-2,#E2E8E7);border-radius:14px;padding:18px;}
.kpi .k{font-size:13px;color:var(--muted,#5b6b6e);display:flex;align-items:center;gap:8px;}
.kpi .v{font-size:26px;font-weight:800;margin-top:8px;}
.kpi .soon{display:inline-block;margin-top:8px;font-size:11px;font-weight:700;color:var(--teal-d,#0A3641);background:var(--teal-50,#E4EDEF);padding:3px 9px;border-radius:999px;}

/* Login */
.auth{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#0E2A33,#0A3641);padding:20px;}
/* width must fit inside .auth's own 20px×2 padding, or the card overflows its grid track — when a
   centered grid item can't fit, browsers fall back to "safe" start-alignment instead of true centering,
   which is what made this look shoved to the left rather than centered on narrow screens. */
.authcard{background:#fff;border-radius:16px;padding:34px;width:min(390px,calc(100vw - 40px));box-shadow:0 24px 64px rgba(0,0,0,.32);}
.authcard .brand{display:flex;align-items:center;gap:10px;font-weight:800;font-size:20px;}
.authcard .brand img{width:34px;height:34px;border-radius:50%;}
.authcard h1{font-size:20px;margin:18px 0 4px;}
.authcard .sub{color:var(--muted,#5b6b6e);font-size:14px;margin-bottom:18px;}
.field{margin-bottom:14px;}
.field label{display:block;font-size:13px;font-weight:600;margin-bottom:6px;}

/* Form controls — one shared, modern base for every text input/select/textarea across the app
   (login card, Leads/LeadDetail, Settings, Quote/Reservation/Invoice editors, table line-item
   cells, etc.). Consolidated here instead of duplicated per page so radius/border/focus stay
   consistent; `.cell` (compact table line-item inputs) shares the same treatment at a smaller size. */
.field input,.field textarea,.field select,.cell{
  width:100%;font-family:inherit;font-size:14.5px;color:var(--ink,#0C3B47);
  background:#fff;border:1px solid var(--line-2,#DCE4E3);border-radius:10px;
  padding:11px 13px;transition:border-color .12s ease,box-shadow .12s ease;
}
.field textarea{resize:vertical;}
.field input[type=checkbox]{width:17px;flex:0 0 auto;padding:0;accent-color:var(--teal,#0F4C5C);cursor:pointer;}
.cell{font-size:13.5px;padding:7px 9px;border-radius:8px;}
.field input::placeholder,.field textarea::placeholder,.cell::placeholder{color:var(--faint,#8A969A);opacity:1;}
.field input:hover,.field textarea:hover,.field select:hover,.cell:hover{border-color:#C7D2D1;}
.field input:focus,.field textarea:focus,.field select:focus,.cell:focus{
  outline:none;border-color:var(--teal,#0F4C5C);box-shadow:0 0 0 3px var(--teal-50,#E4EDEF);
}
.field input:disabled,.field textarea:disabled,.field select:disabled,.cell:disabled{
  background:var(--sand,#F5EFE3);color:var(--muted,#5b6b6e);border-color:var(--line-2,#E2E8E7);
  opacity:1;cursor:not-allowed;
}
/* Custom <select> chevron — removes the native OS arrow and draws a Phosphor-style caret-down via
   inline SVG so it renders consistently across browsers without depending on the icon font/CDN.
   Applies both to full-size .field selects and to the compact .cell selects used inside table
   line-item rows (Products/CircuitDetail/HotelDetail/QuoteEditor/etc.). */
.field select,select.cell{
  appearance:none;-webkit-appearance:none;-moz-appearance:none;cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath fill='%235b6b6e' d='M213.66 101.66l-80 80a8 8 0 01-11.32 0l-80-80A8 8 0 0153.66 90.34L128 164.69l74.34-74.35a8 8 0 0111.32 11.32z'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
}
.field select{padding-right:38px;background-position:right 12px center;background-size:16px;}
select.cell{padding-right:26px;background-position:right 8px center;background-size:13px;}
.field select:disabled,select.cell:disabled{
  cursor:not-allowed;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath fill='%238A969A' d='M213.66 101.66l-80 80a8 8 0 01-11.32 0l-80-80A8 8 0 0153.66 90.34L128 164.69l74.34-74.35a8 8 0 0111.32 11.32z'/%3E%3C/svg%3E");
}
.authcard .btn{width:100%;justify-content:center;margin-top:6px;}
.autherr{background:#FDECEC;color:#B42318;border:1px solid #F3C0BD;border-radius:10px;padding:10px 12px;font-size:13.5px;margin-bottom:16px;display:flex;align-items:center;gap:8px;}
.logoutf{display:inline;margin:0;}

/* Page header + data panels/tables */
.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:20px;}
.page-head h1{margin:0 0 4px;font-size:24px;}
.page-head .sub{margin:0;color:var(--muted,#5b6b6e);font-size:14px;}
.muted{color:var(--muted,#5b6b6e);}
.panel{background:#fff;border:1px solid var(--line-2,#E2E8E7);border-radius:14px;overflow:hidden;}
.tbl{width:100%;border-collapse:collapse;font-size:14px;}
.tbl thead th{text-align:left;font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--muted,#5b6b6e);padding:12px 16px;border-bottom:1px solid var(--line-2,#E2E8E7);background:var(--sand,#F5EFE3);}
.tbl tbody td{padding:13px 16px;border-bottom:1px solid var(--line-2,#EEF2F1);}
/* Data cells stay on one line so reference codes/numbers never wrap into a broken stack (e.g. QUO-2607-00001
   splitting over 3 lines) and columns don't compress on narrow screens — the .panel scrolls horizontally
   instead (see the max-width:820px rule). Cells holding long free text opt back into wrapping with .wrap. */
.tbl tbody td,.tbl thead th{white-space:nowrap;}
.tbl td.wrap,.tbl th.wrap{white-space:normal;min-width:180px;}
/* The quote/invoice line editors are full-width forms, not scrolling lists — let their cells wrap normally. */
.tbl.lines tbody td,.tbl.lines thead th{white-space:normal;}
.tbl tbody tr:last-child td{border-bottom:none;}
.tbl tbody tr:hover{background:var(--teal-50,#E4EDEF);}
/* Long text (a long owner name, an unmapped Source string, etc.) truncates with an ellipsis instead of
   wrapping or stretching the pill — a badge/pill's rounded shape only reads correctly on a single line. */
.badge{display:inline-block;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle;font-size:12px;font-weight:700;padding:3px 9px;border-radius:999px;background:var(--line-2,#E2E8E7);color:var(--ink,#0C3B47);}
.badge.warn{background:#FBE7C6;color:#92600a;margin-left:8px;font-size:11px;}
.badge.ok{background:#E6F4EA;color:#1E7A36;}
.badge.off{background:var(--line-2,#E2E8E7);color:var(--muted,#5b6b6e);}
.lk{color:var(--teal-d,#0A3641);font-weight:700;text-decoration:none;}
.lk:hover{text-decoration:underline;}
.badge-staff{background:#0C3B47;color:#fff;}
.badge-agency{background:var(--teal-50,#E4EDEF);color:var(--teal-d,#0A3641);}
.badge-finalclient{background:#FBEFD9;color:#9a6a16;}
.empty{padding:22px 16px;color:var(--muted,#5b6b6e);font-size:14px;}
.sec-title{font-size:18px;margin:28px 0 12px;letter-spacing:-.01em;}
/* Simple horizontal bars (search analytics) */
.barrow{display:flex;align-items:center;gap:12px;padding:5px 0;}
.barlbl{flex:0 0 90px;font-size:13px;color:var(--muted,#5b6b6e);}
.bartrack{flex:1;height:14px;background:var(--sand,#F5EFE3);border-radius:999px;overflow:hidden;}
.barfill{height:100%;background:var(--teal,#0F4C5C);border-radius:999px;min-width:2px;transition:width .3s ease;}
.barval{flex:0 0 56px;text-align:right;font-size:13px;font-weight:700;color:var(--ink,#0C3B47);}

/* Leads board (kanban) */
.board{display:flex;gap:14px;overflow-x:auto;padding-bottom:10px;align-items:flex-start;}
.col{flex:0 0 250px;background:#fff;border:1px solid var(--line-2,#E2E8E7);border-radius:12px;padding:10px;}
.col-h{display:flex;align-items:center;justify-content:space-between;font-weight:700;font-size:12px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted,#5b6b6e);padding:4px 6px 10px;}
.col-h .cnt{background:var(--sand,#F5EFE3);color:var(--ink,#0C3B47);border-radius:999px;padding:1px 8px;font-size:12px;}
/* White, not the page's sand tone — a tinted card washed out the badges/gray meta text sitting on it
   (low contrast). White + a subtle lift reads as a distinct card against the equally-white column. */
.lead{background:#fff;border:1px solid var(--line-2,#E2E8E7);border-radius:10px;padding:10px;margin-bottom:8px;box-shadow:var(--shadow-pill,0 1px 4px rgba(0,0,0,.05));}
.lead-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px;}
.lead-date{font-size:11px;color:var(--ink,#0C3B47);}
.lead-name{font-weight:700;font-size:14px;color:var(--ink,#0C3B47);}
.lead-sub{font-size:12px;color:var(--muted,#5b6b6e);display:flex;align-items:center;gap:5px;margin-top:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.lead-sub i{font-size:13px;flex:0 0 auto;}
/* Compact owner-assign select on the lead card (not inside a .field wrapper) — same modern chevron
   and teal focus treatment as .field select, sized down to fit the card row. */
.mini-select{
  flex:1;font-family:inherit;font-size:12px;color:var(--ink,#0C3B47);background:#fff;
  border:1px solid var(--line-2,#E2E8E7);border-radius:6px;padding:3px 26px 3px 6px;cursor:pointer;
  appearance:none;-webkit-appearance:none;-moz-appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath fill='%235b6b6e' d='M213.66 101.66l-80 80a8 8 0 01-11.32 0l-80-80A8 8 0 0153.66 90.34L128 164.69l74.34-74.35a8 8 0 0111.32 11.32z'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 6px center;background-size:13px;
  transition:border-color .12s ease,box-shadow .12s ease;
}
.mini-select:hover{border-color:#C7D2D1;}
.mini-select:focus{outline:none;border-color:var(--teal,#0F4C5C);box-shadow:0 0 0 3px var(--teal-50,#E4EDEF);}
.lead-msg{font-size:12.5px;color:var(--ink,#0C3B47);margin-top:7px;background:var(--sand,#F5EFE3);border:1px solid var(--line-2,#E2E8E7);border-radius:8px;padding:7px 9px;max-height:66px;overflow:hidden;}
.lead-actions{display:flex;justify-content:flex-end;gap:6px;margin-top:8px;}
.mv{width:28px;height:28px;border-radius:8px;border:1px solid var(--line-2,#E2E8E7);background:#fff;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;color:var(--teal-d,#0A3641);}
.mv:hover:not(:disabled){background:var(--teal-50,#E4EDEF);}
.mv:disabled{opacity:.35;cursor:default;}

/* Paged list footer: total/range on the left, Prev/Next + "Page X of Y" on the right (reuses .mv buttons). */
.pager{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 4px;font-size:13px;}
.pager-nav{display:flex;align-items:center;gap:10px;}
.badge-b2c{background:#FBEFD9;color:#9a6a16;}
.badge-b2b{background:var(--teal-50,#E4EDEF);color:var(--teal-d,#0A3641);}
.badge-type{background:#EEF1F0;color:var(--muted,#5b6b6e);font-size:11px;}
.col-empty{color:#9aacb0;font-size:13px;text-align:center;padding:8px 0;}

/* Sales: quotes list + editor */
.tbl th.num,.tbl td.num{text-align:right;}
.tbl th.sortable{cursor:pointer;user-select:none;}
.tbl th.sortable:hover{color:var(--ink,#0C3B47);}
.rowlink{cursor:pointer;}
.rlink{color:var(--teal-d,#0A3641);text-decoration:none;}
.rlink:hover{text-decoration:underline;}
.rowlink:hover{background:var(--teal-50,#E4EDEF);}
.vtag{display:inline-block;font-size:11px;font-weight:700;color:var(--teal-d,#0A3641);background:var(--teal-50,#E4EDEF);padding:1px 7px;border-radius:999px;margin-left:6px;vertical-align:middle;}
.backlink{display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:600;color:var(--teal-d,#0A3641);margin-bottom:6px;}
.head-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:flex-start;}
.btn.danger{color:#B42318;border-color:#F3C0BD;}
.btn.danger:hover{background:#FDECEC;}

/* Icon-only action buttons (page headers): square, no label, distinct accent colours + native
   title tooltips. Base is .btn.ghost (white + neutral border); accent modifiers recolour the
   icon/border and tint the hover. Disabled-until-saved links get .is-disabled. */
.btn.icon{width:42px;height:42px;padding:0;justify-content:center;gap:0;}
.btn.icon i{font-size:19px;}
.btn.icon.is-disabled{opacity:.42;pointer-events:none;}
.btn.acc-pdf{color:#B42318;border-color:#F3C0BD;}
.btn.acc-pdf:hover{background:#FDECEC;}
.btn.acc-issue{color:#5B48D4;border-color:#CFC7F5;}
.btn.acc-issue:hover{background:#EEEBFB;}
.btn.acc-warn{color:#8A6100;border-color:#EBD9A6;}
.btn.acc-warn:hover{background:#FBF3DE;}
.btn.acc-ok{color:#1E7A36;border-color:#BFE3C8;}
.btn.acc-ok:hover{background:#E6F4EA;}

/* Status badges (quotes/bookings) */
.st-draft{background:#EEF2F1;color:#5b6b6e;}
.st-sent{background:#E4EDEF;color:#0A3641;}
.st-accepted,.st-confirmed{background:#E6F4EA;color:#1E7A36;}
.st-rejected,.st-cancelled{background:#FDECEC;color:#B42318;}
.st-expired{background:#FBEFD9;color:#9a6a16;}
.st-converted,.st-completed{background:#0C3B47;color:#fff;}
.st-pending{background:#FBEFD9;color:#9a6a16;}

/* Quote editor layout */
.qgrid{display:grid;grid-template-columns:320px 1fr;gap:18px;align-items:start;}
/* Grid items default to min-width:auto, so a wide inner table (the quote/invoice lines) would force the
   column — and the whole page — wider than the viewport instead of letting the panel's overflow-x:auto
   scroll it. min-width:0 lets the column shrink so the inner scroll takes over. */
.qgrid>*{min-width:0;}
.panel.pad{padding:18px;}
.frow{display:flex;gap:12px;}
/* min-width:0 overrides flexbox's default min-width:auto — without it a child with wide intrinsic
   content (a native <input type="date">'s calendar-icon/text can't shrink below its content width)
   refuses to shrink to fit the flex row and overflows the panel instead of wrapping/clipping inside it. */
.frow .field{flex:1;min-width:0;}
.tbl.lines td,.tbl.lines th{padding:9px 12px;}
.cell.sm{width:84px;text-align:right;}
/* Selects never need the .sm right-alignment (that's for numbers/dates), and the custom chevron
   needs a little more breathing room than the old native arrow, so give them a touch more width —
   130px clears the longest real option text (IngestionStatus.PendingReview) plus the chevron. */
select.cell.sm{width:130px;text-align:left;}
.cell.wide{min-width:160px;}
.tbl.lines td.num .cell{display:inline-block;}
.totals{margin-top:14px;background:#fff;border:1px solid var(--line-2,#E2E8E7);border-radius:14px;padding:8px 18px;}
.trow{display:flex;justify-content:space-between;align-items:center;padding:9px 0;border-bottom:1px solid var(--line-2,#EEF2F1);font-size:14px;}
.trow:last-child{border-bottom:none;}
.trow span{color:var(--muted,#5b6b6e);}
.trow.grand{font-size:17px;}
.trow.grand b{color:var(--teal-d,#0A3641);}

/* Supplier-text quote builder: one card per proposed line, laid out with room to breathe. */
.sqline{border:1px solid var(--line-2,#E2E8E7);border-radius:12px;padding:16px 18px;margin-bottom:14px;background:#FAFCFB;}
.sqline-top{display:flex;align-items:center;gap:10px;margin-bottom:14px;}
.sqline-top .badge-type{margin-left:2px;}
.sqline .field{margin-bottom:14px;}
.sqline .field:last-child{margin-bottom:0;}
.sq2{display:grid;grid-template-columns:1fr 1fr;gap:16px;}
.sq2 .field{margin-bottom:0;}
@media(max-width:640px){.sq2{grid-template-columns:1fr;gap:14px;}}
/* Linked-client banner on the supplier-text quote customer card. */
.cust-linked{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;background:#E6F4EA;border:1px solid #BFE3C8;color:#1E7A36;border-radius:10px;padding:10px 14px;font-size:13.5px;margin:12px 0 0;}
.cust-linked .lnk{background:none;border:none;color:var(--teal-d,#0A3641);text-decoration:underline;cursor:pointer;font:inherit;padding:0;}

/* Travel file workspace */
.kpi .sub-amt{font-size:12px;font-weight:700;margin-top:6px;}
.kpi .sub-amt.due{color:#B42318;}
.kpi .sub-amt.ok{color:#1E7A36;}
.cf-pending{background:#EEF2F1;color:#5b6b6e;}
.cf-requested{background:#FBEFD9;color:#9a6a16;}
.cf-confirmed{background:#E6F4EA;color:#1E7A36;}
.cf-declined{background:#FDECEC;color:#B42318;}
.payadd{display:flex;gap:8px;flex-wrap:wrap;align-items:center;padding:12px 16px;border-top:1px solid var(--line-2,#EEF2F1);}
/* width:auto overrides the base .cell rule's width:100% — without it, flex-basis:auto still resolves to
   that 100%, so a plain .cell/.cell.wide inside .payadd stretches to fill the row and stacks instead of
   sitting compact and inline (the bug behind Contacts.razor's "Add group" bar rendering as full-width
   stacked inputs instead of Markets.razor's compact single-row layout). */
.payadd .cell{flex:0 0 auto;width:auto;}
.payadd .cell.sm{width:120px;}
.payadd .cell.wide{width:260px;}

/* Standalone action bar: for a Save/Add/etc. button (or a row of only buttons) that sits alone at the
   bottom of a section, with no input fields sharing its line — e.g. "Add rate"/"Add line" table footers,
   a form's trailing Save button, or a Cancel+Confirm pair. Not for .payadd (button + inline inputs), which
   keeps its natural left-to-right reading order. */
.actionbar{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;}
.amt-due{color:#B42318;}
.amt-ok{color:#1E7A36;}

/* Segmented switcher (products) + centered cells */
.seg{display:inline-flex;gap:4px;background:#fff;border:1px solid var(--line-2,#E2E8E7);border-radius:12px;padding:4px;margin-bottom:16px;}
.seg-btn{border:none;background:transparent;color:var(--ink,#0C3B47);font-family:inherit;font-size:14px;font-weight:700;padding:8px 16px;border-radius:9px;cursor:pointer;display:inline-flex;align-items:center;gap:8px;}
.seg-btn:hover{background:rgba(31,42,46,.06);}
.seg-btn.on{background:var(--teal,#0F4C5C);color:#fff;}
.seg-btn .cnt{font-size:12px;font-weight:700;background:rgba(0,0,0,.08);padding:1px 8px;border-radius:999px;}
.seg-btn.on .cnt{background:rgba(255,255,255,.22);}
/* Compact variant: sits inline next to a .cell search input (e.g. Customers' filter bar) — the default .seg
   is sized/margined for a standalone filter row and reads too tall/offset next to a compact .cell input. */
.seg.sm{padding:3px;margin-bottom:0;}
.seg.sm .seg-btn{padding:6px 14px;font-size:13.5px;}
.tbl th.ctr,.tbl td.ctr{text-align:center;}
.tbl td.ctr input[type=checkbox]{width:17px;height:17px;accent-color:var(--teal,#0F4C5C);cursor:pointer;}

/* Customer picker */
.picklist{display:flex;flex-direction:column;gap:6px;margin-top:6px;}
.pickrow{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;text-align:left;background:var(--sand,#F5EFE3);border:1px solid var(--line-2,#E2E8E7);border-radius:10px;padding:10px 12px;font-family:inherit;font-size:14px;color:var(--ink,#0C3B47);cursor:pointer;}
.pickrow:hover{background:var(--teal-50,#E4EDEF);border-color:var(--teal,#0F4C5C);}
.pickrow i{color:var(--teal-d,#0A3641);}
a.lead-name{display:block;cursor:pointer;}
a.lead-name:hover{color:var(--teal-d,#0A3641);text-decoration:underline;}

/* Communication thread */
.thread{display:flex;flex-direction:column;}
.tmsg{padding:14px 16px;border-bottom:1px solid var(--line-2,#EEF2F1);}
.tmsg:last-child{border-bottom:none;}
.tmeta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:12px;margin-bottom:6px;}
.tsub{font-weight:700;font-size:14px;margin-bottom:3px;}
.tbody{font-size:13.5px;color:var(--ink,#0C3B47);white-space:pre-wrap;}
.terr{margin-top:6px;font-size:12.5px;color:#B42318;background:#FDECEC;border-radius:8px;padding:6px 9px;}

/* Single hamburger toggle, shown at every breakpoint next to the topbar title: opens/closes the mobile
   off-canvas drawer OR collapses/expands the desktop icon rail (data-nav-menu, see App.razor) — whichever
   applies to the current viewport. Replaces the old separate mobile-only hamburger + desktop-only bottom
   "Collapse" button with one control. */
.navtoggle{display:inline-flex;align-items:center;background:transparent;border:none;cursor:pointer;color:var(--ink,#0C3B47);font-size:22px;line-height:1;padding:8px;border-radius:8px;}
.navtoggle:hover{background:rgba(31,42,46,.06);}
html.nav-collapsed .navtoggle{color:var(--teal-d,#0A3641);}
.navscrim{display:none;}

/* Product image gallery (HotelDetail/ServiceDetail/CircuitDetail). */
.img-gallery{margin:0 0 8px;}
/* flex-wrap so the label and tools stack cleanly (tools right below the label, not flung to the far
   edge with a dead gap) on narrower panels instead of the tools clipping/crowding the label. */
.img-gallery-head{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px 20px;margin-bottom:8px;}
.img-gallery-head h3{margin:0;font-size:15px;font-weight:600;color:var(--ink,#0C3B47);}
/* The Type picker + Upload button read as one coherent toolbar (inline, vertically centered) instead of
   two stacked block-level <label>s pinned to the corner — was the "stuck to one edge" look. */
.img-gallery-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.img-type-pick{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:600;white-space:nowrap;}
.img-type-pick .cell{width:auto;min-width:120px;}
.img-upload-btn{cursor:pointer;}
.img-strip{display:flex;flex-wrap:wrap;gap:12px;}
/* Each room's gallery gets its own bordered card with breathing room, instead of running straight into
   the next room separated only by a gap — reads as a set of distinct panels, not one crowded block. */
.room-gallery{background:#fff;border:1px solid var(--line-2,#E2E8E7);border-radius:12px;padding:16px;}
.img-card{position:relative;width:170px;margin:0;border:1px solid var(--line-2,#E2E8E7);border-radius:12px;overflow:hidden;background:#fff;}
.img-card.is-primary{border-color:var(--teal-d,#0A3641);box-shadow:0 0 0 1px var(--teal-d,#0A3641);}
.img-card img{display:block;width:170px;height:120px;object-fit:cover;background:var(--sand,#F5EFE3);}
.img-badge{position:absolute;top:6px;left:6px;display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:999px;background:var(--teal-d,#0A3641);color:#fff;font-size:11px;font-weight:600;}
.img-badge i{font-size:12px;}
.img-actions{display:flex;gap:6px;padding:8px;justify-content:center;border-top:1px solid var(--line-2,#EEF2F1);}

@media(min-width:821px){
  .mgr{transition:grid-template-columns .18s ease;}
  html.nav-collapsed .mgr{grid-template-columns:68px 1fr;}
  html.nav-collapsed .side{padding:16px 8px;}
  html.nav-collapsed .side .brand{justify-content:center;padding:8px 0 18px;}
  html.nav-collapsed .side .brand span{display:none;}
  html.nav-collapsed .nav a{justify-content:center;padding:10px 0;}
  html.nav-collapsed .nav a .nl{display:none;}
}

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

@media(max-width:820px){
  .mgr{grid-template-columns:1fr;}
  .topbar{padding:0 14px;}
  .topbar h1{font-size:16px;}
  .content{padding:16px;}
  /* Sidebar becomes an off-canvas drawer */
  .side{position:fixed;top:0;left:0;bottom:0;width:248px;max-width:84vw;z-index:60;transform:translateX(-100%);transition:transform .22s ease;box-shadow:0 12px 40px rgba(0,0,0,.32);}
  body.nav-open .side{transform:translateX(0);}
  .navscrim{display:block;position:fixed;inset:0;background:rgba(8,20,24,.5);opacity:0;visibility:hidden;transition:opacity .2s ease;z-index:55;}
  body.nav-open .navscrim{opacity:1;visibility:visible;}
  body.nav-open{overflow:hidden;}
  /* Wide data tables scroll horizontally instead of being clipped */
  .panel{overflow-x:auto;}
  .userbox .who span{display:none;}
  .kpis{grid-template-columns:1fr;}
  /* .frow defaults to flex-wrap:nowrap (its non-modal usages rely on an inline flex-wrap:wrap or explicit
     .field min-widths to stay usable at narrow widths). The bulk-action bar's .frow (Task B9) has neither —
     once its confirm state adds a warning badge + Cancel/Confirm buttons, the row overflows horizontally
     and the Confirm button becomes unreachable instead of wrapping onto its own line. */
  .bulkbar .frow{flex-wrap:wrap;}
}

/* Modal: brand-consistent overlay + centered card (reuses .field/.frow/.btn for the body). */
.modal-scrim{position:fixed;inset:0;background:rgba(8,20,24,.5);display:flex;align-items:flex-start;justify-content:center;padding:48px 16px;z-index:80;overflow-y:auto;}
.modal{background:#fff;border:1px solid var(--line-2,#E2E8E7);border-radius:16px;width:100%;max-width:520px;box-shadow:0 18px 50px rgba(8,20,24,.28);}
.modal-h{display:flex;align-items:center;justify-content:space-between;padding:18px 20px;border-bottom:1px solid var(--line-2,#E2E8E7);}
.modal-h h2{margin:0;font-size:18px;}
.modal-h .x{background:none;border:none;cursor:pointer;font-size:22px;line-height:1;color:var(--ink,#0C3B47);padding:2px 6px;}
.modal-b{padding:18px 20px;}
.modal-f{display:flex;justify-content:flex-end;gap:10px;padding:14px 20px;border-top:1px solid var(--line-2,#E2E8E7);}
/* Mobile: let the modal sit near the top and use tighter padding so it feels native on a phone. */
@media(max-width:560px){
  .modal-scrim{padding:16px 10px;align-items:flex-start;}
  .modal{border-radius:14px;}
  .modal-h,.modal-b,.modal-f{padding-left:16px;padding-right:16px;}
  .modal-h h2{font-size:16px;}
}

/* ---------- Geo editorial editor (Countries / Destinations, per-language B2C content) ---------- */
.geoed{display:flex;flex-direction:column;gap:4px;max-width:820px;}
.geoed-tabs{display:flex;gap:6px;margin-bottom:8px;}
.geoed-tabs .btn{padding:6px 14px;font-size:13px;}
.geoed-l{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--muted,#5a6b6f);margin:10px 0 4px;}
.geoed-l span{text-transform:none;letter-spacing:0;font-weight:500;opacity:.75;margin-left:6px;}
.geoed textarea.cell{width:100%;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;}
.geoed-actions{display:flex;align-items:center;gap:12px;margin-top:14px;}
.geoed-ok{display:inline-flex;align-items:center;gap:6px;color:#0A7C42;font-weight:700;font-size:13.5px;}
