
:root{
  --bg:#0b1220;
  --panel:#0f1a2e;
  --panel2:#0d1730;
  --card:#101f3a;
  --text:#e7eefc;
  --muted:#9bb0d3;
  --line:rgba(231,238,252,0.12);
  --accent:#4fd1c5;
  --danger:#ff6b6b;
  --warn:#f7b731;
  --ok:#2ecc71;
  --shadow: 0 10px 35px rgba(0,0,0,0.35);
  --radius:18px;
  --radius2:12px;
  --focus: 0 0 0 3px rgba(79,209,197,0.22);
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Apple Color Emoji","Segoe UI Emoji";
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--sans);
  background: radial-gradient(1200px 700px at 20% 0%, rgba(79,209,197,0.14), transparent 55%),
              radial-gradient(900px 700px at 90% 10%, rgba(117,108,255,0.16), transparent 55%),
              var(--bg);
  color:var(--text);
}
a{color:inherit}
button, input, select, textarea{font:inherit}
.app-header{
  position:sticky; top:0; z-index:20;
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 16px;
  border-bottom:1px solid var(--line);
  background: rgba(11,18,32,0.75);
  backdrop-filter: blur(12px);
}
.brand{display:flex; gap:12px; align-items:center; min-width:260px}
.brand-mark{width:36px; height:36px; display:flex; align-items:center; justify-content:center; color:var(--accent)}
.brand-title{font-weight:800; letter-spacing:0.2px}
.brand-subtitle{font-size:12px; color:var(--muted); margin-top:2px}
.muted{color:var(--muted); font-weight:600}
.header-actions{display:flex; gap:12px; align-items:center; flex-wrap:wrap; justify-content:flex-end}
.segmented{
  background: rgba(255,255,255,0.06);
  border:1px solid var(--line);
  border-radius:999px;
  padding:4px;
  display:flex;
  gap:4px;
}
.seg-btn{
  border:0;
  background:transparent;
  color:var(--muted);
  padding:8px 10px;
  border-radius:999px;
  cursor:pointer;
}
.seg-btn[aria-selected="true"]{
  background: rgba(79,209,197,0.18);
  color: var(--text);
}
.toggle{display:flex; align-items:center; gap:8px}
.toggle-label{font-size:13px; color:var(--muted); font-weight:700}
.switch{position:relative; display:inline-block; width:44px; height:24px}
.switch input{opacity:0; width:0; height:0}
.slider{
  position:absolute; cursor:pointer; inset:0;
  background: rgba(255,255,255,0.08);
  border:1px solid var(--line);
  transition:.2s;
  border-radius:999px;
}
.slider:before{
  position:absolute; content:"";
  height:18px; width:18px; left:3px; top:2px;
  background: rgba(231,238,252,0.85);
  transition:.2s;
  border-radius:999px;
}
.switch input:checked + .slider{
  background: rgba(79,209,197,0.24);
}
.switch input:checked + .slider:before{
  transform: translateX(19px);
  background: rgba(79,209,197,0.95);
}
.app-shell{display:flex; min-height: calc(100vh - 64px)}
.sidebar{
  width: 270px;
  border-right:1px solid var(--line);
  padding:14px;
  background: rgba(15,26,46,0.40);
}
.content{flex:1; padding:16px; max-width: 1100px; width:100%; margin:0 auto}
@media (max-width: 920px){
  .sidebar{display:none}
  .content{padding:12px}
  .brand{min-width:auto}
}
.nav-section{margin-bottom:14px}
.nav-title{
  font-size:11px; letter-spacing:0.12em; text-transform:uppercase;
  color: rgba(155,176,211,0.8);
  margin:10px 8px;
}
.nav-item{
  width:100%;
  display:flex; align-items:center; justify-content:space-between;
  gap:10px;
  border:1px solid transparent;
  background: transparent;
  color: var(--text);
  padding:10px 10px;
  border-radius: 12px;
  cursor:pointer;
  text-align:left;
}
.nav-item:hover{background: rgba(255,255,255,0.05)}
.nav-item.active{
  border-color: rgba(79,209,197,0.35);
  background: rgba(79,209,197,0.10);
}
.badge{
  font-size:12px;
  padding:2px 8px;
  border-radius:999px;
  border:1px solid var(--line);
  color: var(--muted);
}
.h1{font-size:22px; font-weight:900; margin:4px 0 14px}
.row{display:flex; gap:12px; align-items:stretch; flex-wrap:wrap}
.card{
  background: rgba(16,31,58,0.62);
  border:1px solid var(--line);
  border-radius: var(--radius);
  padding:14px;
  box-shadow: var(--shadow);
}
.card.soft{box-shadow:none}
.card-title{font-weight:900; margin-bottom:10px}
.kpi{display:flex; flex-direction:column; gap:6px}
.kpi .val{font-size:26px; font-weight:900}
.kpi .lbl{font-size:12px; color:var(--muted)}
.grid-3{display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:12px}
.grid-2{display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:12px}
@media (max-width: 920px){
  .grid-3{grid-template-columns:1fr}
  .grid-2{grid-template-columns:1fr}
}
.btn{
  border:1px solid var(--line);
  background: rgba(79,209,197,0.18);
  color: var(--text);
  font-weight:900;
  padding:10px 12px;
  border-radius: 12px;
  cursor:pointer;
}
.btn:hover{filter:brightness(1.05)}
.btn:focus{outline:none; box-shadow: var(--focus)}
.btn-ghost{
  background: rgba(255,255,255,0.04);
  color: var(--text);
}
.btn-danger{
  background: rgba(255,107,107,0.18);
}
.btn-small{padding:8px 10px; font-weight:800; font-size:13px}
.pill{
  display:inline-block;
  max-width:100%;
  white-space:normal;
  overflow-wrap:anywhere;

  align-items:center;
  gap:8px;
  border:1px solid var(--line);
  background: rgba(255,255,255,0.04);
  padding:8px 10px;
  border-radius: 999px;
  color: var(--muted);
  font-weight:800;
  font-size:13px;
}
.form{
  display:grid; gap:10px;
}
.field{display:grid; gap:6px}
label{font-size:12px; color:var(--muted); font-weight:800}
input, select, textarea{
  width:100%;
  padding:10px 10px;
  border-radius: 12px;
  border:1px solid var(--line);
  background: rgba(10,16,28,0.55);
  color: var(--text);
}
textarea{min-height:86px; resize:vertical}
.help{font-size:12px; color: rgba(155,176,211,0.9)}
.hr{height:1px; background: var(--line); margin:12px 0}
.table{
  width:100%;
  border-collapse: collapse;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius: 14px;
}
.table th, .table td{
  padding:10px 10px;
  border-bottom:1px solid var(--line);
  text-align:left;
  vertical-align:top;
  font-size:13px;
}
.table th{font-size:12px; color:var(--muted); text-transform:uppercase; letter-spacing:0.08em}
.table tr:last-child td{border-bottom:none}
.status{
  font-weight:900;
  font-size:12px;
  padding:4px 10px;
  border-radius: 999px;
  display:inline-flex;
  border:1px solid var(--line);
}
.status.draft{background: rgba(155,176,211,0.12); color: rgba(231,238,252,0.9)}
.status.sent{background: rgba(247,183,49,0.12); color: rgba(247,183,49,0.95)}
.status.viewed{background: rgba(117,108,255,0.12); color: rgba(170,165,255,0.95)}
.status.accepted{background: rgba(46,204,113,0.12); color: rgba(46,204,113,0.95)}
.toast{
  position: fixed;
  right: 16px;
  bottom: 16px;
  max-width: 360px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(16,31,58,0.88);
  box-shadow: var(--shadow);
  display:none;
}
.toast.show{display:block}
.toast .t-title{font-weight:900}
.toast .t-msg{font-size:13px; color:var(--muted); margin-top:4px}
.guided{
  position: fixed;
  left: 16px;
  bottom: 16px;
  max-width: 420px;
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid rgba(79,209,197,0.35);
  background: rgba(16,31,58,0.92);
  box-shadow: var(--shadow);
}
.guided.hidden{display:none}
.guided .g-top{display:flex; align-items:center; justify-content:space-between; gap:8px}
.guided .g-step{font-weight:900}
.guided .g-msg{font-size:13px; color:var(--muted); margin-top:6px; line-height:1.35}
.guided .g-actions{display:flex; gap:8px; margin-top:10px; flex-wrap:wrap}
.pulse{
  outline: 2px solid rgba(79,209,197,0.7);
  box-shadow: 0 0 0 6px rgba(79,209,197,0.14);
  animation: pulse 1.25s infinite;
}
@keyframes pulse{
  0%{box-shadow: 0 0 0 0 rgba(79,209,197,0.22)}
  70%{box-shadow: 0 0 0 10px rgba(79,209,197,0.0)}
  100%{box-shadow: 0 0 0 0 rgba(79,209,197,0.0)}
}
.right{
  display:flex; gap:10px; align-items:center; justify-content:flex-end; flex-wrap:wrap;
}
.split{
  display:flex; gap:12px; align-items:stretch;
}
.split > .grow{flex:1}
@media (max-width: 920px){
  .split{flex-direction:column}
}
.code{
  font-family: var(--mono);
  font-size: 12px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.25);
  color: rgba(231,238,252,0.92);
  overflow:auto;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.small{font-size:12px; color: var(--muted)}


/* --- V2 additions --- */
.content{max-width: 1280px;}
.card{padding:18px;}
.h1{font-size:24px;}
.table th, .table td{padding:12px 12px;}
/* Stepper */
.stepper{
  display:flex; gap:10px; align-items:center; flex-wrap:wrap;
  padding:12px 14px;
  border:1px solid rgba(231,238,252,0.14);
  background: rgba(255,255,255,0.04);
  border-radius: 16px;
}
.step{
  display:flex; align-items:center; gap:10px;
  padding:8px 10px;
  border-radius: 999px;
  border:1px solid transparent;
  color: rgba(155,176,211,0.92);
  font-weight:900;
  font-size:13px;
}
.step .dot{
  width:22px; height:22px; border-radius:999px;
  display:inline-flex; align-items:center; justify-content:center;
  border:1px solid rgba(231,238,252,0.18);
  background: rgba(255,255,255,0.03);
  color: rgba(231,238,252,0.85);
  font-size:12px;
}
.step.active{
  color: rgba(231,238,252,0.96);
  border-color: rgba(79,209,197,0.35);
  background: rgba(79,209,197,0.10);
}
.step.active .dot{
  border-color: rgba(79,209,197,0.45);
  background: rgba(79,209,197,0.18);
  color: rgba(79,209,197,0.98);
}
.banner{
  border:1px solid rgba(79,209,197,0.25);
  background: rgba(79,209,197,0.10);
  padding:12px 14px;
  border-radius: 16px;
}
.banner .title{font-weight:900;}
.banner .msg{font-size:13px; color: rgba(231,238,252,0.92); margin-top:4px; line-height:1.35;}

/* Amber reminder banner (mobile UX nudges) */
.banner-amber{
  border:1px solid rgba(255,193,7,0.35);
  background: rgba(255,193,7,0.10);
}
.banner-amber .msg{ color: rgba(255,243,205,0.92); }

/* Admin pricebook: reduce wrapping on phones */
@media (max-width: 920px){
  .admin-pricebook table.table th:nth-child(1),
  .admin-pricebook table.table td:nth-child(1),
  .admin-pricebook table.table th:nth-child(3),
  .admin-pricebook table.table td:nth-child(3),
  .admin-pricebook table.table th:nth-child(4),
  .admin-pricebook table.table td:nth-child(4){
    display:none;
  }
  .admin-pricebook table.table td:nth-child(2){
    min-width: 260px;
  }
}

/* Modal */
.modal-backdrop{
  position:fixed; inset:0;
  background: rgba(0,0,0,0.55);
  display:none;
  z-index: 50;
}
.modal-backdrop.show{display:block;}
.modal{
  position:fixed;
  left:50%;
  top:50%;
  transform: translate(-50%, -50%);
  width:min(680px, calc(100vw - 24px));
  background: rgba(16,31,58,0.98);
  border:1px solid rgba(231,238,252,0.14);
  border-radius: 18px;
  box-shadow: 0 20px 55px rgba(0,0,0,0.55);
  padding: 16px;
}
.modal .m-head{display:flex; justify-content:space-between; align-items:center; gap:10px;}
.modal .m-title{font-weight:900; font-size:16px;}
.modal .m-actions{display:flex; gap:8px; justify-content:flex-end; margin-top:12px; flex-wrap:wrap;}


/* --- V5 additions --- */
.content{max-width: 1280px;}
.card{padding:18px;}
.h1{font-size:24px;}
/* Prevent tables/buttons overflowing cards */
.table-wrap{
  width:100%;
  overflow-x:auto;
  border-radius: 14px;
}
.table{min-width: 760px;}
.table td:last-child{white-space:nowrap;}
@media (max-width: 920px){
  .table{min-width: 720px;}
}


/* --- V6 additions --- */
/* Better table behaviour inside cards */
.table-wrap{width:100%; overflow-x:auto; border-radius:14px;}
.table{width:100%;}
.table-jobs{table-layout: fixed;}
.table-jobs th:last-child, .table-jobs td:last-child{width:96px; text-align:right; white-space:nowrap;}
.table-jobs th:nth-child(1), .table-jobs td:nth-child(1){width:40%;}
.table-jobs th:nth-child(2), .table-jobs td:nth-child(2){width:18%;}
.table-jobs th:nth-child(3), .table-jobs td:nth-child(3){width:26%;}
/* Allow content to wrap */
.table td{word-wrap:break-word; overflow-wrap:anywhere;}

/* Loader dots for processing screen */
.loader{display:inline-flex; gap:6px; align-items:center; vertical-align:middle;}
.dotdot{width:8px; height:8px; border-radius:999px; background: rgba(79,209,197,0.85); animation: bounce 1s infinite ease-in-out;}
.dotdot:nth-child(2){animation-delay:.12s; opacity:.8}
.dotdot:nth-child(3){animation-delay:.24s; opacity:.6}
@keyframes bounce{0%,80%,100%{transform:translateY(0)}40%{transform:translateY(-6px)}}


/* --- V7 additions --- */
.table-wrap{
  width:100%;
  overflow-x:auto;
  border-radius: 14px;
}
.table{min-width: 760px;}
.table td:last-child{white-space:nowrap;}
.proc-status{
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(155,176,211,0.95);
}


/* --- V9 additions --- */
/* Tables should not force overflow inside split cards */
.table{
  width:100%;
  table-layout: fixed;
  min-width: 0 !important;
}
.table th, .table td{
  overflow-wrap: anywhere;
}
.table td:last-child, .table th:last-child{
  white-space: nowrap;
  overflow-wrap: normal;
}


/* --- V10 additions --- */
#lineTable{ width:100%; table-layout: fixed; }
#lineTable th:nth-child(1){width:28%;}
#lineTable th:nth-child(2){width:26%;}
#lineTable th:nth-child(3){width:8%;}
#lineTable th:nth-child(4){width:8%;}
#lineTable th:nth-child(5){width:10%;}
#lineTable th:nth-child(6){width:14%;}
#lineTable th:nth-child(7){width:6%;}
#lineTable td:last-child, #lineTable th:last-child{ text-align:center; }
#lineTable input{ min-width:0; }
#lineTable [data-del]{ min-width:36px; width:36px; padding:8px 0; }
.bottom-cta .btn{ white-space:nowrap; }


/* --- V13 additions --- */
.status, .badge{white-space:nowrap;}

.table-wrap{width:100%; overflow-x:auto; border-radius:14px;}

/* Big obvious record button */
#btnRec.btn-record{
  font-size: 16px;
  padding: 16px 20px;
  border-radius: 16px;
  border-color: rgba(255,107,107,0.45);
  background: rgba(255,107,107,0.22);
}
#btnRec.btn-record:hover{filter:brightness(1.08);}
#btnRec.btn-record.recording{
  background: rgba(255,107,107,0.34);
  border-color: rgba(255,107,107,0.65);
  animation: recBlink 0.9s infinite;
}
@keyframes recBlink{
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,107,107,0.0); }
  50% { box-shadow: 0 0 0 8px rgba(255,107,107,0.14); }
}

/* Builder line items: allow scroll when cramped so delete button never falls off */
#lineTableWrap{width:100%; overflow-x:auto; border-radius:14px;}
#lineTable{min-width: 980px; table-layout: fixed;}
#lineTable th:nth-child(7), #lineTable td:nth-child(7){width:52px; text-align:center;}
#lineTable [data-del]{min-width:40px; width:40px; padding:8px 0;}
#lineTable input{min-width:0;}

/* Suggested line items table should never escape card */
.ai-suggest .table{width:100%; table-layout:fixed; min-width:0 !important;}
.ai-suggest .table th, .ai-suggest .table td{overflow-wrap:anywhere;}
.ai-suggest .table td:last-child, .ai-suggest .table th:last-child{white-space:nowrap; overflow-wrap:normal;}


/* --- V16 lineitems fix --- */
/* Keep the delete (X) column visible on all viewports */
#lineTableWrap{width:100%; overflow-x:auto; border-radius:14px;}
#lineTable{
  width:100%;
  min-width: 1040px;          /* forces scroll instead of clipping */
  table-layout: fixed;
}
#lineTable th, #lineTable td{overflow:hidden;}
#lineTable th:nth-child(1){width:28%;}
#lineTable th:nth-child(2){width:26%;}
#lineTable th:nth-child(3){width:8%;}
#lineTable th:nth-child(4){width:8%;}
#lineTable th:nth-child(5){width:10%;}
#lineTable th:nth-child(6){width:14%;}
#lineTable th:nth-child(7){width:6%;}
#lineTable th:last-child, #lineTable td:last-child{
  width:56px;
  text-align:center;
  white-space:nowrap;
}
#lineTable input{
  width:100%;
  min-width:0;
}
#lineTable [data-del]{
  width:40px;
  min-width:40px;
  padding:8px 0;
}


/* --- V17 builder overflow fix --- */
/* Key flexbox rule: allow children to shrink so scroll containers work */
.split > *{min-width:0;}
.grid-2 > *{min-width:0;}
.grid-3 > *{min-width:0;}

/* Ensure table wrappers can actually scroll within flex layouts */
.table-wrap, #lineTableWrap{
  min-width:0;
  overflow-x:auto;
  -webkit-overflow-scrolling: touch;
}

/* Force delete column width even if inline widths exist */
#lineTable th:last-child, #lineTable td:last-child{
  width:56px !important;
  max-width:56px !important;
}
#lineTable th:last-child{padding-left:8px; padding-right:8px;}


/* ===========================
   v22‑m2 mobile responsiveness
   =========================== */

.nav-toggle{display:none}

.bottom-cta{
  margin-top:12px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:14px;
  background: rgba(255,255,255,0.04);
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
}
.bottom-cta .hint{font-size:12px; color: var(--muted);}


.totals-card{width:320px; align-self:flex-start; max-width:100%;}
@media (max-width: 920px){ .totals-card{width:100%; align-self:stretch;} }
.totals-box{width:320px; max-width:100%;}
@media (max-width: 920px){
  .app-header{flex-wrap:wrap; gap:10px}
  .brand{flex:1 1 100%; min-width:0}
  .brand-text{min-width:0}
  .brand-subtitle{display:none}

  .header-actions{width:100%; justify-content:space-between}
  .segmented{flex:1 1 auto; max-width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch}
  .segmented::-webkit-scrollbar{height:0}
  .seg-btn{white-space:nowrap; padding:8px 8px; font-size:13px}

  .nav-toggle{display:inline-flex; align-items:center; justify-content:center; width:36px; height:36px; padding:8px 0;}

  /* bring back sidebar as off‑canvas on mobile */
  .sidebar{
    display:block;
    position:fixed;
    top:0;
    left:0;
    height:100vh;
    width:min(300px, 82vw);
    max-width:82vw;
    transform: translateX(-110%);
    transition: transform .18s ease;
    z-index:30;
    background: rgba(15,26,46,0.96);
    backdrop-filter: blur(12px);
    overflow-y:auto;
  }
  .sidebar.open{transform: translateX(0);}
  .sidebar-backdrop{
    position:fixed;
    inset:0;
    background: rgba(0,0,0,0.45);
    z-index:25;
    display:none;
  }
  .sidebar-backdrop.show{display:block;}
  body.sidebar-open{overflow:hidden;}

  /* fixed bottom CTA */
  .content{padding-bottom:86px}
  .bottom-cta{
    position:fixed;
    left:0; right:0; bottom:0;
    z-index:40;
    margin:0;
    border-radius:0;
    border-left:0; border-right:0;
    border-bottom:0;
    border-top:1px solid var(--line);
    padding:10px 12px;
    background: rgba(11,18,32,0.96);
    backdrop-filter: blur(12px);
  }
  .bottom-cta .hint{display:none}

  /* totals panels */
  .totals-box{width:100%;}
}

@media (max-width: 520px){
  /* top action button groups stack nicely */
  .right{width:100%; display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-start}
  .right .btn{flex:1 1 auto}
}

/* Card views used on phones (tables -> cards) */
.card-list{display:grid; gap:10px}
.item-card{
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px 12px;
  background: rgba(255,255,255,0.03);
}
.item-card .top{display:flex; justify-content:space-between; gap:10px; align-items:flex-start}
.item-card .name{font-weight:900}
.item-card .meta{font-size:12px; color:var(--muted); margin-top:2px; line-height:1.4}
.item-card .price{font-weight:900; white-space:nowrap}


/* --- v22-m3 mobile fixes --- */

/* Prevent currency strings from breaking into vertical stacks */
.money, .gbp, .amt{ white-space: nowrap; }
#lineTable th:nth-child(6), #lineTable td:nth-child(6){
  white-space: nowrap;
  overflow-wrap: normal !important;
  word-break: normal !important;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Totals card values should never wrap */
.totals-card .row span:last-child{
  white-space: nowrap;
  overflow-wrap: normal !important;
  word-break: normal !important;
  font-variant-numeric: tabular-nums;
}

/* Phone/tablet: simplify line items table (keep Item, Qty, Total, Delete) */
@media (max-width: 920px){
  /* Hide columns: Description (2), Unit (4), Sell (5) */
  #lineTable th:nth-child(2), #lineTable td:nth-child(2),
  #lineTable th:nth-child(4), #lineTable td:nth-child(4),
  #lineTable th:nth-child(5), #lineTable td:nth-child(5){
    display:none !important;
  }

  /* Rebalance remaining columns */
  #lineTable{ table-layout: fixed; }

  /* Never allow currency totals to wrap/break */
  #lineTable th:nth-child(6), #lineTable td:nth-child(6){
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }
  #lineTable th:nth-child(1), #lineTable td:nth-child(1){ width:58% !important; }
  #lineTable th:nth-child(3), #lineTable td:nth-child(3){ width:16% !important; }
  #lineTable th:nth-child(6), #lineTable td:nth-child(6){ width:26% !important; }

  /* Inputs */
  #lineTable td:nth-child(1) input{ width:100%; }
  #lineTable td:nth-child(3) input{ width:100%; text-align:right; }

  /* Make the table a bit denser */
  #lineTable th, #lineTable td{ padding:8px 8px; }
}

/* Disable guided demo overlay on narrower screens (it blocks CTAs) */
@media (max-width: 920px){
  .guided{ display:none !important; }
  #btnStartDemo{ display:none !important; }
}


/* Flash highlight for recently accepted quote */
.accepted-flash{ outline:2px solid rgba(255,193,7,0.55); outline-offset:2px; }


/* --- V22-m7 additions --- */
.money-box{
  width:100%;
  padding:10px 10px;
  border-radius:12px;
  border:1px solid var(--line);
  background: rgba(10,16,28,0.30);
  color: var(--text);
  font-weight:900;
  white-space:nowrap;
}
.nowrap{white-space:nowrap;}
.lineitem-cards .item-card{ padding:14px; }
.lineitem-cards .item-card .row{ gap:10px; }
.lineitem-cards .item-card [data-del]{ min-width:36px; width:36px; padding:8px 0; align-self:flex-end; }

.labour-row{ flex-wrap:wrap; }
.labour-row .field{ min-width:0; }
.labour-row select{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

@media (max-width: 520px){
  .labour-row{ flex-wrap:nowrap; }
  .labour-row .field:first-child{ flex:1; min-width:0; }
  .labour-row .field:last-child{ flex:0 0 110px; width:110px; }
}

/* Prevent old fixed-width lineTable rules from crushing condensed mobile table */
@media (max-width: 920px){
  #lineTable{ table-layout:auto; }
  #lineTable th{ width:auto !important; }
}
