@font-face { font-family: "Source Sans 3"; src: url("/fonts/SourceSans3-latin.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Sans Pro"; src: url("/fonts/SourceSansPro-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans Pro"; src: url("/fonts/SourceSansPro-It.ttf") format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Sans Pro"; src: url("/fonts/SourceSansPro-Semibold.ttf") format("truetype"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans Pro"; src: url("/fonts/SourceSansPro-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans Pro"; src: url("/fonts/SourceSansPro-Light.ttf") format("truetype"); font-weight: 300; font-style: normal; font-display: swap; }

:root {
  --navy: #0B1E4A;
  --navy-mid: #1F3864;
  --navy-deep: #081534;
  --blue: #1A75FF;
  --blue-hover: #0d62e0;
  --section: #2C5494;
  --bg: #F3F5F9;
  --card: #fff;
  --text: #1c2330;
  --muted: #5c6575;
  --border: #D5DBE4;
  --border-light: #E6EAF0;
  --light: #E8ECF4;
  --green: #1B7A4A;
  --green-bg: #E5F6EC;
  --red: #C0392B;
  --red-bg: #FDECEA;
  --amber: #B86A00;
  --amber-bg: #FFF4DF;
  --teal: #0E6E7A;
  --teal-bg: #E3F4F6;
  --gray: #5E6672;
  --gray-bg: #EEF0F3;
  --violet: #5B4B9A;
  --violet-bg: #EEEAFA;
  --shadow: 0 1px 3px rgba(11,30,74,.08), 0 1px 2px rgba(11,30,74,.05);
  --shadow-md: 0 8px 24px rgba(11,30,74,.10);
  --sidebar: 250px;
  --radius: 10px;
  --font: "Source Sans 3", "Source Sans Pro", "Liberation Sans", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
  min-height: 100vh;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ===== LOGIN ===== */
.login-body {
  min-height: 100vh;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  position: relative;
}
.login-body::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 28px;
  height: 4px;
  background: var(--blue);
}
.login-card {
  background: #fff;
  width: 100%;
  max-width: 420px;
  border-radius: 14px;
  padding: 36px 36px 32px;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
  position: relative;
  z-index: 1;
}
.login-card .logo { display: block; height: 56px; width: auto; margin: 0 auto 18px; }
.login-card h1 { margin: 0 0 4px; text-align: center; font-size: 22px; color: var(--navy); }
.login-card .sub { text-align: center; color: var(--muted); margin: 0 0 24px; font-size: 14px; }
.login-card label { display: block; font-weight: 600; margin: 0 0 6px; font-size: 14px; }
.login-card input[type=text],
.login-card input[type=password] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font: inherit;
  margin-bottom: 16px;
}
.login-card button {
  width: 100%;
  padding: 11px 16px;
  background: var(--navy);
  color: #fff;
  border: 0;
  border-radius: 7px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.login-card button:hover { background: var(--navy-mid); }
.login-hint { margin-top: 18px; font-size: 12px; color: var(--muted); text-align: center; }
/* v102: Sign in with Microsoft (Directory SSO) above the password form */
.login-ms { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; box-sizing: border-box; padding: 11px 16px; background: #fff; color: #1c2330; border: 1px solid #c9d0db; border-radius: 7px; font-weight: 700; text-decoration: none; }
.login-ms:hover { background: #f3f5f9; }
.login-hint.login-hint-tight { margin-top: 8px; }
.login-or { display: flex; align-items: center; gap: 10px; margin: 16px 0; color: var(--muted); font-size: 12px; }
.login-or::before, .login-or::after { content: ""; flex: 1; border-top: 1px solid #e1e5ec; }

/* ===== APP SHELL ===== */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar);
  background: var(--navy);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
  z-index: 20;
}
.sidebar .brand {
  flex: 0 0 auto;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar .brand img {
  height: 52px;
  width: auto;
  max-width: 100%;
  background: #fff;
  border-radius: 7px;
  padding: 4px 7px;
  display: block;
}
.sidebar .brand .tag {
  font-size: 11px;
  color: #9aabc8;
  margin-top: 8px;
  letter-spacing: 0.02em;
}
.sidebar nav { padding: 12px 10px; flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #d5deee;
  text-decoration: none;
  padding: 9px 12px;
  border-radius: 7px;
  font-weight: 600;
  font-size: 14.5px;
  margin-bottom: 2px;
}
.sidebar nav a:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.sidebar nav a.active { background: var(--blue); color: #fff; }
.sidebar .side-foot {
  flex: 0 0 auto;
  padding: 14px 18px 18px;
  font-size: 12px;
  color: #8a9bb8;
  border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar .side-foot form { margin: 0; }
.sidebar .side-foot button.link {
  background: none; border: 0; color: #c5d0e4; cursor: pointer;
  font: inherit; padding: 0; font-weight: 600;
}
.sidebar .side-foot button.link:hover { color: #fff; }

.main {
  margin-left: var(--sidebar);
  flex: 1;
  min-width: 0;
  padding: 24px 28px 48px;
}
.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.topbar h1 { margin: 0; font-size: 26px; color: var(--navy); letter-spacing: -0.02em; }
.topbar .lead { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.topbar .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.preview-banner {
  background: var(--amber-bg);
  color: #6b4500;
  border: 1px solid #f0d48a;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  margin-bottom: 16px;
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 7px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-mid); color: #fff; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: #16653d; color: #fff; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: #a33025; color: #fff; }
.btn-amber { background: var(--amber); color: #fff; }
.btn-ghost {
  background: #fff;
  color: var(--navy);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--light); color: var(--navy); }
.btn-sm { padding: 5px 10px; font-size: 13px; font-weight: 600; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-link { background: none; border: 0; color: var(--blue); font: inherit; cursor: pointer; padding: 0; font-weight: 600; }

/* cards / summary */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.card-stat {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 14px 14px;
  border-left: 4px solid var(--border);
  cursor: pointer;
  transition: transform .08s ease, box-shadow .08s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.card-stat:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); text-decoration: none; color: inherit; }
.card-stat.active { outline: 2px solid var(--blue); }
.card-stat .k { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.card-stat .n { font-size: 26px; font-weight: 700; color: var(--navy); line-height: 1.15; margin: 2px 0; }
.card-stat .v { font-size: 13px; font-weight: 600; color: var(--text); }
.card-stat .v small { display: block; font-weight: 400; color: var(--muted); font-size: 11.5px; }
.card-stat.status-Draft { border-left-color: var(--gray); }
.card-stat.status-Sent { border-left-color: var(--blue); }
.card-stat.status-Viewed { border-left-color: var(--teal); }
.card-stat.status-Accepted { border-left-color: var(--green); }
.card-stat.status-Declined { border-left-color: var(--red); }
.card-stat.status-Queried { border-left-color: var(--amber); }
.card-stat.status-all { border-left-color: var(--navy); }

.panel {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin-bottom: 18px;
}
.panel h2 { margin: 0 0 12px; font-size: 16px; color: var(--navy); }
.panel h2 .hint { font-weight: 400; color: var(--muted); font-size: 13px; margin-left: 8px; }

/* tables */
.table-wrap { overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
table.data th {
  text-align: left;
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  background: #fafbfe;
}
table.data td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
table.data tr:hover td { background: #f7f9fc; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data .qnum { font-weight: 700; color: var(--navy); font-size: 15px; white-space: nowrap; }
table.data a.qnum { text-decoration: none; }
table.data a.qnum:hover { text-decoration: underline; }
table.data .muted { color: var(--muted); font-size: 12.5px; }
table.data .right { text-align: right; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .02em;
  background: var(--gray-bg);
  color: var(--gray);
  white-space: nowrap;
}
.badge-Draft { background: var(--gray-bg); color: var(--gray); }
.badge-Sent { background: #e5efff; color: #1554c0; }
.badge-Viewed { background: var(--teal-bg); color: var(--teal); }
.badge-Accepted { background: var(--green-bg); color: var(--green); }
.badge-Declined { background: var(--red-bg); color: var(--red); }
.badge-Queried { background: var(--amber-bg); color: var(--amber); }
.badge-demo { background: var(--violet-bg); color: var(--violet); margin-left: 6px; }
.badge-preview { background: var(--amber-bg); color: var(--amber); }
.badge-sent { background: var(--green-bg); color: var(--green); }
.badge-failed { background: var(--red-bg); color: var(--red); }
.badge-queued { background: #e5efff; color: #1554c0; }

/* forms */
label, .label { display: block; font-weight: 600; font-size: 13px; margin: 0 0 4px; color: var(--navy-mid); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=time], input[type=tel], input[type=url], input[type=search], input.price-input, select, textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font: inherit;
  font-size: 14.5px;
  background: #fff;
  color: var(--text);
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26,117,255,.15);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px 14px;
}
.form-row { margin-bottom: 12px; }
.form-row.span-2 { grid-column: span 2; }
.help { font-size: 12px; color: var(--muted); margin-top: 4px; }
.checkbox { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.checkbox input { width: auto; }

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: end;
  margin-bottom: 14px;
}
.filters .form-row { margin: 0; flex: 1; min-width: 180px; }
.filters input, .filters select { min-width: 0; }

.flash {
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 14px;
}
.flash-success { background: var(--green-bg); color: var(--green); }
.flash-error { background: var(--red-bg); color: var(--red); }
.flash-info { background: #e5efff; color: #1554c0; }

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

/* ===== EDITOR ===== */
.editor-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 18px;
  align-items: start;
}
@media (max-width: 1100px) {
  .editor-layout { grid-template-columns: 1fr; }
}
.sticky-side { position: sticky; top: 16px; }
.totals-box {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 14px;
}
.totals-box .line { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; }
.totals-box .grand {
  display: flex; justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,.2);
  margin-top: 8px; padding-top: 10px;
  font-size: 18px; font-weight: 700;
}
.totals-box .qno { font-size: 12px; color: #9aabc8; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 6px; }

.section-block {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 12px;
  background: #fff;
  overflow: hidden;
}
.section-head {
  background: #DDE3EE;
  padding: 8px 10px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.section-head input { font-weight: 700; background: transparent; border-color: transparent; }
.section-head input:focus { background: #fff; border-color: var(--blue); }
.section-head .sec-actions { display: flex; gap: 4px; margin-left: auto; }
.item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px 90px 100px 100px 36px;
  gap: 6px;
  padding: 8px 10px;
  border-top: 1px solid var(--border-light);
  align-items: start;
}
.item-row .desc-fields { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.section-head input { flex: 1; min-width: 0; }
.item-row .amt-display {
  padding: 8px 6px 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.section-foot {
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fafbfe;
  border-top: 1px solid var(--border-light);
  font-size: 13px;
}
.section-foot .sec-total { font-weight: 700; }
@media (max-width: 900px) {
  .item-row { grid-template-columns: 1fr 1fr; }
  .item-row .desc-fields { grid-column: 1 / -1; }
}

.list-editor .le-item {
  display: flex; gap: 8px; margin-bottom: 6px; align-items: flex-start;
}
.list-editor textarea { min-height: 54px; }
.drop-zone {
  border: 1.5px dashed var(--border);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  color: var(--muted);
  background: #fafbfe;
  cursor: pointer;
}
.drop-zone:hover, .drop-zone.drag { border-color: var(--blue); background: #eef4ff; }
.att-list { list-style: none; margin: 10px 0 0; padding: 0; }
.att-list li {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 13.5px;
}
.att-list li .grow { flex: 1; min-width: 0; }
.att-list .fname { font-weight: 600; word-break: break-all; }
.att-list .fmeta { font-size: 12px; color: var(--muted); }

.activity { list-style: none; margin: 0; padding: 0; }
.activity li { padding: 8px 0; border-bottom: 1px solid var(--border-light); font-size: 13.5px; }
.activity .when { color: var(--muted); font-size: 12px; }

.save-bar {
  position: sticky;
  bottom: 0;
  background: rgba(243,245,249,.95);
  backdrop-filter: blur(6px);
  padding: 10px 0 4px;
  margin: 12px 0 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  z-index: 5;
  border-top: 1px solid var(--border-light);
}
.save-status { font-size: 13px; color: var(--muted); margin-left: auto; }

/* ===== PORTAL ===== */
.portal-body { background: var(--bg); margin: 0; }
.portal-top {
  background: var(--navy);
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.portal-top img {
  height: 44px; width: auto;
  background: #fff; border-radius: 7px; padding: 4px 8px;
}
.portal-wrap { max-width: 980px; margin: 0 auto; padding: 24px 16px 64px; }
.portal-hero {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}
.portal-hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: var(--blue);
}
.portal-hero h1 { margin: 0 0 6px; font-size: 26px; font-weight: 600; }
.portal-hero .sub { color: #c5d0e4; margin: 0 0 14px; }
.portal-hero .meta { font-size: 14px; line-height: 1.6; }
.portal-hero .total { font-size: 26px; font-weight: 700; margin-top: 10px; }
.portal-hero .total span { font-size: 13px; font-weight: 400; color: #c5d0e4; display: block; }

.portal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.doc-preview .items { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.doc-preview .items th {
  background: var(--navy-mid); color: #fff; text-align: left;
  padding: 7px 10px; font-weight: 600;
}
.doc-preview .items th.r, .doc-preview .items td.r { text-align: right; }
.doc-preview .items th.c, .doc-preview .items td.c { text-align: center; }
.doc-preview .items td { border-bottom: 1px solid var(--border); padding: 7px 10px; vertical-align: top; }
.doc-preview .items .grp td { background: #DDE3EE; font-weight: 700; }
.doc-preview .items .heading { font-weight: 700; }
.doc-preview .items .detail { font-size: 12.5px; color: #444; }
.doc-preview .items .sub td { font-style: italic; font-weight: 600; }
.doc-preview .items .tot td { background: var(--navy-mid); color: #fff; font-weight: 700; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .two-col { grid-template-columns: 1fr; } }
.terms-box { background: #E6EAF2; border-radius: 0 0 8px 8px; padding: 14px 18px; }
.terms-box-h { background: var(--navy-mid); color: #fff; font-weight: 700; font-size: 12px; letter-spacing: .04em; padding: 8px 14px; border-radius: 8px 8px 0 0; }
.terms-box ul { margin: 0; padding: 0 0 0 18px; }
.terms-box li { margin: 0 0 8px; }

.sig-pad {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  touch-action: none;
  width: 100%;
  height: 140px;
  cursor: crosshair;
}
.responded {
  padding: 16px 18px;
  border-radius: 8px;
  margin-bottom: 16px;
}
.responded.Accepted { background: var(--green-bg); }
.responded.Declined { background: var(--red-bg); }
.responded.Queried { background: var(--amber-bg); }

/* modal */
.modal-back {
  position: fixed; inset: 0;
  background: rgba(11,30,74,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 50; padding: 16px;
}
.modal {
  background: #fff;
  border-radius: 12px;
  padding: 22px 24px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  box-shadow: var(--shadow-md);
}
.modal h2 { margin: 0 0 12px; color: var(--navy); }
.hidden { display: none !important; }
.sr-only { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0; }

.drawing-preview { max-width: 100%; max-height: 280px; border: 1px solid var(--border); border-radius: 6px; margin-top: 8px; }

code, .mono { font-family: "Geist Mono", "Liberation Mono", ui-monospace, monospace; font-size: 12.5px; }
.link-box { background: #f4f6fa; border-radius: 7px; padding: 8px 10px; word-break: break-all; font-size: 13px; }

.outbox-frame { border: 1px solid var(--border); border-radius: 8px; background: #fff; min-height: 400px; width: 100%; }

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 800px) { .settings-grid { grid-template-columns: 1fr; } }

.danger { color: var(--red); }

/* Multi-user, approvals, import, footer */
.nav-badge {
  display: inline-block;
  min-width: 18px;
  padding: 0 6px;
  margin-left: 6px;
  border-radius: 99px;
  background: #e85d04;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  vertical-align: middle;
}
.sidebar nav a.active .nav-badge { background: #fff; color: var(--blue); }

.badge-Awaiting-approval { background: var(--violet-bg); color: var(--violet); }
.badge-Changes-requested { background: var(--amber-bg); color: var(--amber); }
.card-stat.status-Awaiting-approval { border-left-color: var(--violet); }
.card-stat.status-Changes-requested { border-left-color: var(--amber); }

.approval-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--violet-bg);
  border: 1px solid #d5caf0;
  border-left: 4px solid var(--violet);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 0 0 16px 0;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}
.approval-banner:hover { text-decoration: none; box-shadow: var(--shadow); color: inherit; }
.approval-banner strong { font-size: 22px; color: var(--violet); margin-right: 4px; }

.return-box, .info-box {
  background: var(--amber-bg);
  border: 1px solid #f0d9a0;
  border-left: 4px solid var(--amber);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 0 0 16px 0;
}
.return-box h2 { margin: 0 0 6px 0; font-size: 16px; }
.info-box { background: var(--violet-bg); border-color: #d5caf0; border-left-color: var(--violet); }

.return-form { margin-bottom: 16px; }
.nowrap { white-space: nowrap; }

.designed-by {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  padding: 28px 16px 12px;
  margin: 24px 0 0 0;
  letter-spacing: .01em;
}
.designed-by strong { color: var(--navy); font-weight: 700; }
.login-body .designed-by { color: #5c6575; }
.login-body .designed-by strong { color: var(--navy); }
.portal-body .designed-by { color: #8a94a6; padding-bottom: 28px; }
.portal-body .designed-by strong { color: var(--navy); }

.email-preview-frame {
  background: #f0f2f6;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  overflow: auto;
  max-height: 640px;
}
pre.email-text {
  white-space: pre-wrap;
  font-size: 13px;
  background: var(--light);
  padding: 12px;
  border-radius: 6px;
}

.inline-form {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 0 12px 8px 0;
}
.inline-form input { width: auto; min-width: 140px; padding: 6px 8px; }
.user-actions-row td { background: #fafbfe; border-top: none; padding-top: 0; padding-bottom: 12px; }
.add-user-form { margin-top: 8px; }

.mapping-form select, #import-preview select { min-width: 160px; }
.row-flagged { background: #FFF8EC; }
.row-blank { background: #f4f5f7; color: var(--muted); }
.flag { font-size: 12px; margin: 0 0 2px 0; }
.flag-existing { color: var(--amber); }
.flag-infile { color: var(--violet); }
.flag-blank { color: var(--muted); }
.import-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin: 18px 0 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

/* Phone-friendly login and invite pages */
@media (max-width: 480px) {
  .login-body {
    padding: 24px 16px 56px;
    padding-top: max(24px, env(safe-area-inset-top, 0px));
    align-items: flex-start;
  }
  .login-card { padding: 28px 20px 24px; }
  .login-card input[type=text],
  .login-card input[type=password],
  .login-card input[type=email] {
    font-size: 16px;
    min-height: 48px;
    padding: 12px;
  }
  .login-card button {
    min-height: 48px;
    font-size: 16px;
  }
}

.invite-link-box, .link-box {
  font-family: inherit;
  font-size: 13px;
  word-break: break-all;
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 8px 0;
}
.team-status-Invited { }
.copy-invite-btn { margin-top: 6px; }
.role-readonly {
  background: var(--light);
  font-weight: 600;
  color: var(--navy);
}

/* ===== TENDERS ===== */
.badge-Responses-in { background: var(--teal-bg); color: var(--teal); }
.badge-Awarded { background: var(--green-bg); color: var(--green); }
.badge-Closed { background: var(--gray-bg); color: var(--gray); }
.badge-pending { background: var(--gray-bg); color: var(--gray); }
.badge-viewed { background: #e5efff; color: #1554c0; }
.badge-submitted { background: var(--green-bg); color: var(--green); }
.badge-declined { background: var(--red-bg); color: var(--red); }
.badge-queried { background: var(--amber-bg); color: var(--amber); }

.invite-wording {
  background: #f4f6fa;
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 0 0 18px;
  line-height: 1.55;
}
.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px 16px;
  margin: 0 0 18px;
  font-size: 14px;
}
.meta-grid .muted { display: block; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; font-weight: 700; margin-bottom: 2px; }
.site-visit-card {
  background: var(--amber-bg);
  border-left: 4px solid var(--amber);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 0 0 18px;
}
.site-visit-card .k,
.drawings-link-banner .k {
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--amber);
  margin-bottom: 4px;
}
.drawings-link-banner {
  background: #E5EFFF;
  border-left: 4px solid var(--section);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 0 0 18px;
  word-break: break-all;
}
.drawings-link-banner .k { color: var(--section); }
.tender-item-list { margin: 12px 0 0; padding-left: 20px; }
.tender-item-list li { margin-bottom: 8px; }
.tender-item-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr auto;
  gap: 8px;
  margin-bottom: 8px;
  align-items: start;
}
@media (max-width: 800px) {
  .tender-item-row { grid-template-columns: 1fr; }
}
.trade-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.trade-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  background: #fff;
  cursor: pointer;
}
.trade-pill:has(input:checked) {
  background: #e5efff;
  border-color: var(--blue);
  color: var(--navy);
}
.subbie-picker {
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}
.subbie-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  margin: 0;
}
.subbie-row span { display: flex; flex-direction: column; min-width: 0; }
.subbie-row:hover { background: #f7f8fb; }
.compare-wrap { overflow-x: auto; }
.compare-table td, .compare-table th { vertical-align: top; }
.compare-table tr.is-lowest { background: var(--green-bg); }
.compare-table tr.is-awarded { box-shadow: inset 3px 0 0 var(--green); }
.lowest-tag { font-size: 11px; font-weight: 700; color: var(--green); text-transform: uppercase; letter-spacing: .04em; }
.attend-yes { color: var(--green); font-weight: 600; }
.compare-notes { font-size: 13px; max-width: 280px; }
.compare-notes > div { margin-bottom: 6px; }
.chk-inline { display: flex; align-items: center; gap: 6px; font-size: 13px; margin: 6px 0; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px 16px;
}
.upload-progress { margin-top: 10px; font-size: 13px; color: var(--muted); }
.upload-bar {
  height: 8px;
  background: var(--light);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 6px;
}
.upload-bar span {
  display: block;
  height: 100%;
  background: var(--blue);
  border-radius: 999px;
}
.form-row .help, .help { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

input.price-input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.portal-body .save-bar {
  position: static;
  background: transparent;
  backdrop-filter: none;
  border-top: 0;
  padding: 16px 0 0;
  margin: 16px 0 0;
}

.drop-zone { position: relative; }
.drop-zone input[type=file] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.plan-trade {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 0 0 14px;
  background: #fff;
}
.plan-trade.is-off { opacity: .65; }
.plan-trade-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.badge-conf-high { background: var(--green-bg); color: var(--green); }
.badge-conf-medium { background: var(--amber-bg); color: var(--amber); }
.badge-conf-low { background: var(--gray-bg); color: var(--gray); }
.badge-plan-ready { background: #e5efff; color: #1554c0; }
.badge-plan-created { background: var(--green-bg); color: var(--green); }
.badge-plan-analysing { background: var(--amber-bg); color: var(--amber); }
.badge-plan-failed { background: var(--red-bg); color: var(--red); }
.badge-plan-draft { background: var(--gray-bg); color: var(--gray); }

@media (max-width: 640px) {
  .doc-preview .table-wrap { overflow: visible; }
  .doc-preview .items thead { display: none; }
  .doc-preview .items,
  .doc-preview .items tbody { display: block; width: 100%; }
  .doc-preview .items tr {
    display: block;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin: 0 0 10px;
    padding: 10px 12px;
  }
  .doc-preview .items td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    border: 0;
    padding: 3px 0;
  }
  .doc-preview .items td[data-label]::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
    text-align: left;
    margin-right: auto;
  }
  .doc-preview .items td:not([data-label]) { display: block; text-align: left; }
  .doc-preview .items td.skip-mobile { display: none; }
  .doc-preview .items tr.grp {
    background: #DDE3EE;
    border: 0;
    padding: 8px 12px;
    margin: 16px 0 8px;
  }
  .doc-preview .items tr.tot { background: var(--navy-mid); color: #fff; }
  .doc-preview .items tr.tot td[data-label]::before { color: #c5d0e4; }
}

/* "Core AI" brand label (the AI that reads drawings). Brand blue; plain inside filled buttons. */
.core-ai { color: var(--blue); font-weight: 600; }
.btn .core-ai, .sidebar nav a.active .core-ai { color: inherit; }

/* Plan from drawings: step-by-step status (15 Nov 2026) */
.stage-box { margin-top: 4px; }
.stage-text { font-size: 15px; font-weight: 600; color: var(--navy); margin-bottom: 8px; line-height: 1.4; word-break: break-word; }
.stage-meta { font-size: 12.5px; color: var(--muted); }
.stage-meta.stale { color: var(--red); }
.stage-error { margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: var(--red-bg); color: var(--red); font-weight: 600; font-size: 14px; }
.activity-log { margin-top: 12px; font-size: 13px; }
.activity-log summary { cursor: pointer; color: var(--blue); font-weight: 600; }
.activity-log ol { list-style: none; margin: 8px 0 0; padding: 8px 10px; max-height: 260px; overflow: auto; background: var(--light); border-radius: 8px; }
.activity-log li { display: flex; gap: 10px; padding: 3px 0; border-bottom: 1px dashed rgba(0,0,0,.06); }
.activity-log li:last-child { border-bottom: 0; }
.activity-log time { flex: 0 0 auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.activity-log .ev-warn span { color: #8a5a00; }
.activity-log .ev-error span { color: var(--red); font-weight: 600; }
.activity-log-done { margin: 0 0 14px; }
.upload-file-list { list-style: none; margin: 8px 0 0; padding: 0; font-size: 13px; }
.upload-file-list li { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; color: var(--muted); }
.upload-file-list li.done { color: var(--green); }
.upload-file-list li.current { color: var(--navy); font-weight: 600; }

/* Core AI job details + compact "Drawings read" list (15 Nov 2026) */
.ai-tag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 16px; color: #1A75FF; background: #EAF2FF; border: 1px solid #BBD4FF; vertical-align: middle; }
input.ai-filled, textarea.ai-filled { border-color: #1A75FF; box-shadow: 0 0 0 2px rgba(26,117,255,.12); }
.ai-help { margin: -4px 0 12px; }
.ai-sugg { margin-top: 6px; padding: 6px 8px; font-size: 13px; background: #F4F8FF; border: 1px dashed #BBD4FF; border-radius: 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ai-sugg .ai-tag { margin-left: 0; }
.ai-sugg q { font-weight: 600; }
.btn-xs { padding: 2px 10px; font-size: 12px; min-height: 0; line-height: 18px; }
.ai-dismiss { font-size: 12px; color: #667085; display: inline-flex; gap: 4px; align-items: center; margin: 0; font-weight: 400; }
.files-read-list { list-style: none; margin: 0; padding: 0; }
.files-read-list li { display: flex; gap: 8px; align-items: baseline; padding: 5px 0; border-bottom: 1px solid #EEF0F4; font-size: 14px; }
.files-read-list li:last-child { border-bottom: 0; }
.files-read-list .fr-tick { color: #12B76A; font-weight: 700; width: 16px; }
.files-read-list li.bad .fr-tick { color: #D92D20; }
.files-read-list .fr-name { flex: 1; word-break: break-word; }
.files-read-list .fr-meta { color: #667085; font-size: 13px; white-space: nowrap; }
.activity-toggle { margin-top: 10px; }
.activity-toggle > summary { font-size: 13px; color: #1A75FF; cursor: pointer; }

/* Supplier price reference (owner only, 15 Nov 2026) */
.ai-tag-sup { margin-left: 0; color: #0b4fc4; background: #e3eeff; border-color: #bbd4ff; border-radius: 3px; }
.materials-ref { margin: 4px 0 12px; border: 1px solid #d9e4f5; border-radius: 6px; padding: 8px 10px; background: #f7faff; }
.materials-ref summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.materials-ref-table { width: 100%; margin-top: 8px; font-size: 13px; }
.materials-ref-table th, .materials-ref-table td { text-align: left; vertical-align: top; padding: 4px 6px; }
.materials-ref-table .num { text-align: right; white-space: nowrap; }
.materials-ref-table .muted { font-size: 12px; }

/* Owner-only Danger zone on Settings (15 Nov 2026) */
.danger-zone { border-color: #f0c2bd; }
.danger-zone h2 { color: var(--red); }
.reset-form { max-width: 420px; }
.reset-result { background: var(--green-bg); color: var(--green); border-radius: 8px; padding: 12px 14px; margin: 0 0 16px; }
.reset-result h3 { margin: 0 0 8px; font-size: 16px; }
.reset-result ul { margin: 8px 0 0; padding-left: 18px; }
.reset-path { display: block; word-break: break-all; font-size: 12px; }

/* ---------- Subcontractor company grouping (16 Nov 2026) ---------- */
.co-count { margin: 4px 0 10px; }
.co-toggle { border: 0; background: none; cursor: pointer; font-size: 13px; width: 20px; padding: 0; color: var(--muted); }
.co-toggle-spacer { display: inline-block; width: 20px; }
.co-name { text-decoration: none; color: inherit; }
.co-name:hover { text-decoration: underline; }
tr.co-staff > td { background: #f7f9fc; padding: 6px 12px 10px 34px; }
table.staff-mini { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.staff-mini td { padding: 4px 10px 4px 0; border: 0; }
.badge-primary { background: #e5efff; color: #1554c0; margin-left: 4px; }
.contact-notes { margin-top: 2px; font-size: 12.5px; }
.contact-actions { white-space: nowrap; }
.inline-form { display: inline; }
tr.contact-edit-row > td { padding-top: 0; border-top: 0; }
details.contact-edit summary { cursor: pointer; color: var(--muted); font-size: 12.5px; }
details.contact-edit form { margin: 8px 0 4px; }
.check-inline { display: flex; align-items: center; gap: 8px; margin: 6px 0 4px; font-weight: 500; }
.company-picker { max-height: 420px; }
.company-pick { border-bottom: 1px solid var(--border-light); }
.company-pick .company-head { border-bottom: 0; padding-bottom: 4px; }
.company-pick.is-picked { background: #f5f9ff; }
.company-contacts { padding: 0 12px 8px 34px; }
.contact-pick { display: flex; gap: 10px; align-items: flex-start; padding: 4px 0; margin: 0; cursor: pointer; font-size: 13.5px; }
.contact-pick > span { display: flex; flex-direction: column; min-width: 0; }
.contact-pick .cp-name { display: block; }
.save-bar-static { position: static; background: transparent; backdrop-filter: none; }

/* Bid status (18 Nov 2026): Builtcore's own head-tender bid */
.badge-bid-pursuing { background: #e5efff; color: #1554c0; }
.badge-bid-submitted { background: var(--amber-bg); color: var(--amber); }
.badge-bid-won { background: var(--green-bg); color: var(--green); }
.badge-bid-lost { background: var(--gray-bg); color: var(--gray); }

/* v101 r2: consistent Back control (header, 44px target for phones / PWA) */
.bc-back-bar { display:flex; align-items:center; gap:10px; margin:0 0 16px; }
a.bc-back, button.bc-back {
  display:inline-flex; align-items:center; gap:6px;
  min-height:44px; padding:0 12px; margin:0;
  border:1px solid var(--line, #d5dbe7); border-radius:8px;
  background:#fff; color:var(--navy, #0B1E4A);
  font: inherit; font-weight:600; font-size:14px;
  text-decoration:none; cursor:pointer;
}
a.bc-back:hover, button.bc-back:hover { background:#f3f6fb; text-decoration:none; color:var(--navy, #0B1E4A); }
a.bc-back:focus-visible, button.bc-back:focus-visible { outline:2px solid #1A75FF; outline-offset:2px; }
.bc-back-icon { width:1.1em; height:1.1em; display:block; flex:none; }
.m-header .bc-back { background:transparent; border-color:rgba(255,255,255,.35); color:#fff; min-height:40px; }
.m-header .bc-back:hover { background:rgba(255,255,255,.12); color:#fff; }


/* Suite final 22 Nov 2026: one primary button and one empty-state card across the apps. */
.btn-primary { background: #1A75FF; color: #fff; font-weight: 700; border-radius: 8px; }
.btn-primary:hover { background: #0d62e0; color: #fff; }
.empty { background: #fff; border: 1px dashed #CBD5E1; border-radius: 16px; padding: 24px; text-align: center; color: #475569; font-size: 14px; }
td.empty { border: 0; border-radius: 0; } /* inside a table the table is the card */

/* Audit-2 fixes 22 Nov 2026 */
.not-found-page { margin: 0; background: var(--bg); }
.nf-bar { display: flex; align-items: center; gap: 12px; background: var(--navy); padding: 10px 16px; }
.nf-bar img { background: #fff; border-radius: 6px; padding: 3px; display: block; }
.nf-app { color: #fff; font-weight: 700; font-size: 17px; }
.nf-main { max-width: 560px; margin: 48px auto; padding: 0 16px; }
.nf-main h1 { margin: 0 0 6px; font-size: 22px; color: var(--navy); }
.nf-foot { text-align: center; color: var(--muted); font-size: 12px; margin: 32px 0; }
.panel:has(> .empty:only-child) { background: none; border: 0; box-shadow: none; padding: 0; }
.sidebar .brand .brand-app { display: none; }


/* Draft grouping 22 Nov 2026: one register row per head project, drop-down for trades. */
.tender-group-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  flex: none; width: 32px; height: 32px; padding: 0;
  border: 1px solid var(--border); border-radius: 8px;
  background: #fff; color: var(--navy); cursor: pointer;
}
.tender-group-toggle:hover, .tender-group-toggle:focus-visible {
  border-color: #1A75FF; color: #1A75FF; outline: none;
  box-shadow: 0 0 0 3px rgba(26, 117, 255, .18);
}
.tender-chevron {
  display: block; width: 0; height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 6px solid currentColor;
  transition: transform .15s ease;
}
.tender-group-toggle[aria-expanded="true"] .tender-chevron,
.m-tender-group-toggle[aria-expanded="true"] .tender-chevron {
  transform: rotate(90deg);
}
.tender-group-range { font-size: 12.5px; white-space: nowrap; }
.tender-group-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tender-group-name { font-weight: 700; color: var(--navy); }
.badge-count { background: #e5efff; color: #1554c0; }
.badge-Mixed { background: var(--amber-bg); color: var(--amber); }
tr.tender-group-row { cursor: pointer; }
tr.tender-group-row td { background: #f4f7fb; font-weight: 500; }
tr.tender-group-row:hover td { background: #eef3fa; }
tr.tender-group-item td:first-child { padding-left: 16px; }
tr.tender-group-item td { background: #fff; }
tr.tender-group-item.is-hidden { display: none; }
@media (max-width: 900px) {
  .tender-group-toggle { width: 44px; height: 44px; }
  .tender-group-title { gap: 6px; }
  tr.tender-group-item td:first-child { padding-left: 18px; }
}

/* 23 Nov 2026: Delete draft tender (register group) + confirm dialog */
.draft-group-delete-form { display: inline-block; margin: 6px 0 0; }
.draft-group-delete-btn { white-space: nowrap; }
.tender-group-row .draft-group-delete-form { display: block; }
dialog.bc-confirm { border: 0; border-radius: 14px; padding: 0; width: min(440px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(17,32,79,.35); }
dialog.bc-confirm::backdrop { background: rgba(17,32,79,.45); }
.bc-confirm-inner { padding: 20px 20px 16px; }
.bc-confirm-inner h2 { margin: 0 0 6px; font-size: 19px; color: var(--red); }
.bc-confirm-name { margin: 0 0 10px; font-weight: 700; font-size: 16px; }
.bc-confirm-list { margin: 0 0 10px; padding-left: 18px; line-height: 1.45; }
.bc-confirm-list li { margin: 4px 0; }
.bc-confirm-sent { color: #8a5a00; font-weight: 600; }
.bc-confirm-warn { margin: 0 0 14px; color: var(--red); font-weight: 600; }
.bc-confirm-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.bc-confirm-actions .btn { min-height: 44px; min-width: 120px; justify-content: center; }
.bc-confirm-field { display: block; margin: 0 0 14px; }
.bc-confirm-field input { width: 100%; font-size: 16px; padding: 10px 12px; margin-top: 6px; box-sizing: border-box; }
@media (max-width: 640px) {
  .bc-confirm-actions .btn { flex: 1 1 0; }
  .draft-group-delete-btn { min-height: 40px; }
}


/* 26 Nov 2026: bulk send invitations on a grouped draft tender */
.draft-group-send-btn { white-space: nowrap; margin: 6px 8px 0 0; }
.tender-group-row .draft-group-send-btn { display: inline-flex; }
.tender-group-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.m-tender-group-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 12px 10px; }
.bulk-send-panel { max-width: 860px; }
.bulk-send-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.bulk-send-select { display: flex; gap: 8px; flex-wrap: wrap; }
.bulk-send-trades { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.bulk-send-trade { border: 1px solid var(--border, #d5dbe7); border-radius: 10px; background: #fff; padding: 12px 14px; }
.bulk-send-trade.is-blocked { border-color: #e8c48a; background: #fffaf2; }
.bulk-send-trade.is-sent { background: #f5f7fa; }
.bulk-send-trade-top { display: flex; gap: 12px; align-items: flex-start; }
.bulk-send-check { display: flex; align-items: center; justify-content: center; width: 28px; min-height: 28px; flex: none; margin-top: 2px; }
.bulk-send-check input { width: 20px; height: 20px; accent-color: #1A75FF; }
.bulk-send-trade-meta { flex: 1; min-width: 0; }
.bulk-send-trade-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 15px; }
.bulk-send-flag { margin: 6px 0 0; font-size: 13.5px; }
.bulk-send-flag.is-warn { color: #8a5a00; font-weight: 600; }
.bulk-send-flag.is-note { color: #5b6475; }
.badge-flag { background: #fff4df; color: #8a5a00; }
.bulk-send-companies { list-style: none; margin: 8px 0 0; padding: 0; }
.bulk-send-companies li { margin: 2px 0; font-size: 14px; }
.bulk-send-preview h2 { margin: 0 0 8px; font-size: 18px; color: var(--navy, #0B1E4A); }
.bulk-send-email { margin-top: 10px; border: 1px solid var(--border, #d5dbe7); border-radius: 10px; overflow: auto; background: #f0f2f6; max-height: 520px; }
.bulk-send-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.bulk-send-actions .btn { min-height: 44px; }
#bulk-send-dialog h2 { color: var(--navy, #0B1E4A); }
@media (max-width: 640px) {
  .bulk-send-actions .btn { flex: 1 1 0; }
  .bulk-send-check input { width: 22px; height: 22px; }
}
