:root {
  --brand: #1e3a8a;
  --brand-2: #2563eb;
  --bg: #f1f5f9;
  --card-radius: 14px;
  --bs-body-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bs-primary: #2563eb;
  --bs-primary-rgb: 37, 99, 235;
}
body { background: var(--bg); font-size: 14.5px; color: #1e293b; padding-bottom: env(safe-area-inset-bottom); }
.btn-primary { --bs-btn-bg: var(--brand-2); --bs-btn-border-color: var(--brand-2); --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand); }

/* ---------- Navbar ---------- */
.app-nav { background: linear-gradient(90deg, var(--brand), var(--brand-2)); box-shadow: 0 2px 10px rgba(30,58,138,.25); }
.app-nav .navbar-brand { color: #fff; font-weight: 700; display: flex; align-items: center; gap: .5rem; }
.brand-icon { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.18); display: grid; place-items: center; }
.app-nav .nav-link { color: rgba(255,255,255,.8); border-radius: 8px; padding: .5rem .85rem !important; }
.app-nav .nav-link:hover, .app-nav .nav-link.active { color: #fff; background: rgba(255,255,255,.15); }
.btn-icon { color: #fff; border: 0; font-size: 1.25rem; padding: .3rem .5rem; }
.btn-icon:hover { color: #fff; background: rgba(255,255,255,.15); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #fff; color: var(--brand); font-weight: 700; font-size: .95rem; display: inline-grid; place-items: center; }

/* ---------- Cards ---------- */
.card { border: 0; border-radius: var(--card-radius); box-shadow: 0 1px 3px rgba(15,23,42,.06), 0 4px 14px rgba(15,23,42,.04); }
.card-header { background: #fff; border-bottom: 1px solid #e2e8f0; font-weight: 600; padding: .9rem 1.1rem; border-radius: var(--card-radius) var(--card-radius) 0 0 !important; }
.card-header i { color: var(--brand-2); }
.page-title { font-weight: 700; font-size: 1.35rem; margin: 0; }
.form-label { font-weight: 500; color: #475569; font-size: .85rem; margin-bottom: .3rem; }
.form-control, .form-select { border-radius: 9px; border-color: #cbd5e1; padding-top: .55rem; padding-bottom: .55rem; padding-left: .75rem; }
.form-control { padding-right: .75rem; }
.form-select { padding-right: 2.25rem; }
.form-control-sm, .form-select-sm { padding-top: .3rem; padding-bottom: .3rem; }
.form-control:focus, .form-select:focus { border-color: var(--brand-2); box-shadow: 0 0 0 .2rem rgba(37,99,235,.15); }
.form-control[readonly] { background: #f8fafc; }

/* ---------- Stats ---------- */
.stat-card { display: flex; flex-direction: row; align-items: center; gap: .8rem; padding: 1rem; text-decoration: none; color: inherit; transition: transform .15s; }
.stat-card:hover { transform: translateY(-2px); color: inherit; }
.stat-card.active { outline: 2px solid var(--brand-2); }
.stat-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; flex-shrink: 0; }
.stat-num { font-size: 1.4rem; font-weight: 700; line-height: 1.1; }
.stat-label { font-size: .8rem; color: #64748b; }

.status-badge { font-weight: 600; padding: .38em .65em; border-radius: 20px; }
.status-select { font-weight: 600; }

/* ---------- Lead list (mobile cards) ---------- */
.lead-card { padding: 1rem; margin-bottom: .75rem; }
.lead-card .lead-no { font-size: .78rem; color: var(--brand-2); font-weight: 600; }
.lead-card .lead-name { font-weight: 600; font-size: 1rem; }
.lead-card .lead-meta { font-size: .82rem; color: #64748b; }
.lead-card .lead-amount { font-weight: 700; font-size: 1.05rem; }
.lead-actions .btn { flex: 1; }
.table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: #64748b; background: #f8fafc; }
.reminder-chip { font-size: .75rem; background: #fef2f2; color: #b91c1c; border-radius: 20px; padding: .15rem .55rem; display: inline-block; }
.reminder-chip.future { background: #eff6ff; color: #1d4ed8; }

/* ---------- Items table ---------- */
#itemsTable th { background: #f8fafc; white-space: nowrap; font-size: .78rem; text-transform: uppercase; color: #64748b; }
#itemsTable td { vertical-align: middle; }
#itemsTable .sr { width: 50px; text-align: center; font-weight: 600; }
#itemsTable .qty { width: 100px; } #itemsTable .price { width: 140px; }
#itemsTable .total { width: 150px; } #itemsTable .act { width: 56px; text-align: center; }

@media (max-width: 767.98px) {
  #itemsTable thead { display: none; }
  #itemsTable, #itemsTable tbody, #itemsTable tr, #itemsTable td { display: block; width: 100% !important; }
  #itemsTable tr { border: 1px solid #e2e8f0; border-radius: 12px; padding: .75rem; margin: .75rem; width: auto !important; background: #fff; position: relative; }
  #itemsTable td { border: 0; padding: .3rem 0; text-align: left !important; }
  #itemsTable td::before { content: attr(data-label); display: block; font-size: .75rem; font-weight: 500; color: #64748b; margin-bottom: .2rem; }
  #itemsTable td.sr { position: absolute; top: .6rem; left: .75rem; width: auto !important; padding: 0; }
  #itemsTable td.sr::before { content: 'Item #'; display: inline; }
  #itemsTable td.act { position: absolute; top: .4rem; right: .5rem; width: auto !important; padding: 0; }
  #itemsTable td.act::before { display: none; }
  #itemsTable td:nth-child(2) { margin-top: 1.4rem; }
  #itemsTable td.qty, #itemsTable td.price { display: inline-block; width: 48% !important; }
  #itemsTable td.qty { margin-right: 3%; }
  #itemsTable .form-control-sm { font-size: 16px; padding: .5rem .65rem; }  /* prevents iOS zoom */
  .form-control, .form-select { font-size: 16px; }
  .sticky-save { position: sticky; bottom: 0; background: #fff; margin: 0 -.75rem; padding: .75rem; box-shadow: 0 -4px 12px rgba(0,0,0,.08); z-index: 10; }
  .sticky-save .btn { flex: 1; }
}

.totals-box td { padding: .55rem 1rem; border-color: #f1f5f9; }
.totals-box .grand td { font-size: 1.1rem; font-weight: 700; background: var(--brand); color: #fff; border: 0; }

/* ---------- Floating add button (mobile) ---------- */
.fab { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); width: 58px; height: 58px; border-radius: 50%;
       background: var(--brand-2); color: #fff; display: grid; place-items: center; font-size: 1.6rem; box-shadow: 0 6px 18px rgba(37,99,235,.45); z-index: 1000; }
.fab:hover { color: #fff; background: var(--brand); }

/* ---------- Reminders ---------- */
.reminder-menu { width: 340px; max-width: 92vw; padding: 0; max-height: 70vh; overflow: auto; border-radius: 12px; }
.reminder-item { padding: .75rem 1rem; border-bottom: 1px solid #f1f5f9; }
.reminder-item:hover { background: #f8fafc; }
.reminder-toast { border: 0; box-shadow: 0 8px 24px rgba(0,0,0,.15); border-left: 4px solid #dc3545; }

/* ---------- Login ---------- */
.login-page { min-height: 100vh; background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 60%, #3b82f6 100%); display: flex; align-items: center; justify-content: center; padding: 1.25rem; }
.login-wrap { width: 100%; max-width: 410px; }
.login-brand { text-align: center; color: #fff; margin-bottom: 1.5rem; }
.login-brand h1 { font-weight: 700; font-size: 1.7rem; margin: .6rem 0 .1rem; }
.login-brand p { opacity: .8; margin: 0; }
.login-logo { width: 64px; height: 64px; border-radius: 18px; background: rgba(255,255,255,.18); display: inline-grid; place-items: center; font-size: 1.9rem; backdrop-filter: blur(4px); }
.login-card { background: #fff; border-radius: 18px; padding: 2rem 1.6rem; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.login-card h2 { font-weight: 700; font-size: 1.35rem; margin-bottom: .2rem; }
.login-card .form-control { font-size: 16px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); color: #64748b; z-index: 5; }

/* ---------- Quotation document (screen + print) ---------- */
.print-sheet { background: #fff; max-width: 920px; margin: auto; padding: 32px; }
@media (max-width: 575.98px) { .print-sheet { padding: 16px; } }
.quote-doc { --qc: #1e3a8a; color: #1e293b; font-size: 13px; }
.q-head { --qc: #1e3a8a; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-bottom: .9rem; border-bottom: 3px solid var(--qc); }
.q-brand { display: flex; gap: .9rem; align-items: flex-start; flex: 1 1 320px; min-width: 0; }
.q-logo { flex-shrink: 0; } .q-logo img { max-height: 72px; max-width: 160px; object-fit: contain; }
.q-name { font-size: 1.35rem; font-weight: 800; color: var(--qc); line-height: 1.2; }
.q-tag { font-size: .82rem; font-style: italic; color: #475569; margin-bottom: .2rem; }
.q-addr { font-size: .78rem; color: #334155; line-height: 1.45; }
.q-title-box { text-align: right; flex: 0 0 auto; margin-left: auto; }
.q-title { display: inline-block; background: var(--qc); color: #fff; font-weight: 700; letter-spacing: .12em; padding: .35rem 1rem; border-radius: 6px; font-size: 1rem; margin-bottom: .45rem; }
.q-meta { margin-left: auto; font-size: .82rem; } .q-meta td { padding: .1rem 0 .1rem .8rem; } .q-meta td:first-child { color: #64748b; } .q-meta td:last-child { font-weight: 700; }
.q-to { margin: 1rem 0; padding: .75rem .9rem; border: 1px solid #e2e8f0; border-left: 4px solid var(--qc); border-radius: 6px; background: #f8fafc; line-height: 1.5; }
.q-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--qc); margin-bottom: .3rem; }
.q-items thead th { background: var(--qc) !important; color: #fff; font-size: .75rem; text-transform: uppercase; border-color: var(--qc); }
.q-items td { font-size: .82rem; } .q-desc { color: #475569; font-size: .78rem; margin-top: .15rem; }
.q-box { border: 1px solid #e2e8f0; border-radius: 6px; padding: .6rem .8rem; }
.q-kv td { padding: .12rem 0; font-size: .8rem; } .q-kv td:first-child { width: 120px; color: #64748b; }
.q-totals td { font-size: .82rem; padding: .3rem .6rem; border-color: #e2e8f0; }
.q-grand td { background: var(--qc) !important; color: #fff; font-weight: 700; font-size: .95rem; }
.q-words { font-size: .78rem; margin-top: .45rem; padding: .45rem .6rem; background: #f8fafc; border-radius: 6px; font-weight: 600; }
.q-words span { color: #64748b; font-weight: 400; }
.q-terms { font-size: .76rem; padding-left: 1.1rem; margin: 0; color: #334155; } .q-terms li { margin-bottom: .1rem; }
.q-sign { text-align: right; font-size: .85rem; } .q-sign-space { height: 60px; border-bottom: 1px dashed #cbd5e1; margin: 0 0 .3rem auto; width: 200px; }
.q-footer { text-align: center; font-size: .72rem; color: #64748b; border-top: 1px solid #e2e8f0; margin-top: 1rem; padding-top: .5rem; }
.logo-box { width: 110px; height: 70px; border: 1px dashed #cbd5e1; border-radius: 10px; display: grid; place-items: center; background: #f8fafc; overflow: hidden; }
.logo-box img { max-width: 100%; max-height: 100%; object-fit: contain; }

@media print {
  @page { size: A4; margin: 12mm; }
  .no-print { display: none !important; }
  body { background: #fff; font-size: 12px; }
  main { padding: 0 !important; max-width: none !important; }
  .print-sheet { padding: 0; box-shadow: none !important; border: 0 !important; max-width: none; }
  .q-items tr, .q-bottom, .q-end { break-inside: avoid; }
  /* A4 is narrower than Bootstrap's md breakpoint – keep the two-column layout on paper */
  .quote-doc .row { flex-wrap: nowrap; }
  .quote-doc .col-md-7 { flex: 0 0 auto; width: 58.333%; order: 0 !important; }
  .quote-doc .col-md-5 { flex: 0 0 auto; width: 41.667%; order: 1 !important; }
  .table-responsive { overflow: visible !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Filters / pagination ---------- */
.filter-chip { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; border-radius: 20px; padding: .25rem .4rem .25rem .75rem; font-size: .82rem; display: inline-flex; align-items: center; gap: .35rem; }
.filter-chip a { color: #1e40af; }
.filter-chip a:hover { color: #dc2626; }
.pagination .page-link { border-radius: 8px !important; margin: 0 2px; border: 0; color: #334155; }
.pagination .page-item.active .page-link { background: var(--brand-2); color: #fff; }
.pager-bar { padding-bottom: 70px; }
@media (min-width: 768px) { .pager-bar { padding-bottom: 0; } }
#colMenu .dropdown-item { cursor: pointer; font-size: .9rem; }
.card-header .btn i { color: inherit; }

/* ---------- Lead status dashboard ---------- */
.status-badge { white-space: nowrap; }
.dash-grid { display: grid; gap: .85rem; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }
.dash-card { --c: #2563eb; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: .1rem;
  padding: 1rem 1rem .9rem; border-radius: 16px; text-decoration: none; color: #0f172a; background: #fff;
  border: 1px solid #e2e8f0; box-shadow: 0 1px 3px rgba(15,23,42,.06), 0 6px 16px rgba(15,23,42,.04);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.dash-card::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--c); }
.dash-card::after { content: ''; position: absolute; right: -28px; top: -28px; width: 96px; height: 96px; border-radius: 50%;
  background: var(--c); opacity: .07; }
.dash-card:hover { transform: translateY(-3px); color: #0f172a; box-shadow: 0 10px 24px rgba(15,23,42,.12); border-color: var(--c); }
.dash-card.active { border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 7%, white); }
.dash-card.empty { opacity: .62; }
.dash-card.empty:hover, .dash-card.empty.active { opacity: 1; }
.dash-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem; color: #fff;
  background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 70%, black)); box-shadow: 0 4px 10px color-mix(in srgb, var(--c) 35%, transparent); }
.dash-pct { font-size: .72rem; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 12%, white); padding: .15rem .5rem; border-radius: 20px; }
.dash-num { font-size: 1.85rem; font-weight: 700; line-height: 1.1; margin-top: .6rem; }
.dash-label { font-weight: 600; color: var(--c); font-size: .9rem; }
.dash-val { font-size: .82rem; color: #475569; font-weight: 600; margin-top: .15rem; }
.dash-val span { font-weight: 400; color: #94a3b8; }
.dash-bar { height: 5px; border-radius: 5px; background: #f1f5f9; margin-top: .55rem; overflow: hidden; }
.dash-bar span { display: block; height: 100%; border-radius: 5px; background: var(--c); }
/* "All leads" hero card */
.dash-all { --c: #1e3a8a; color: #fff; border: 0; background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 70%, #3b82f6 100%); }
.dash-all::before { display: none; }
.dash-all::after { background: #fff; opacity: .1; width: 130px; height: 130px; }
.dash-all:hover { color: #fff; border: 0; }
.dash-all.active { border: 0; background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 70%, #3b82f6 100%); box-shadow: 0 10px 26px rgba(37,99,235,.45); }
.dash-all .dash-icon { background: rgba(255,255,255,.2); box-shadow: none; }
.dash-all .dash-label { color: #fff; }
.dash-all .dash-val { color: #dbeafe; } .dash-all .dash-val span { color: #bfdbfe; }
.dash-all .dash-sub { font-size: .76rem; color: #bbf7d0; margin-top: .3rem; }
.dash-chip { font-size: .7rem; background: rgba(255,255,255,.2); padding: .15rem .55rem; border-radius: 20px; }
@media (max-width: 575.98px) {
  .dash-grid { grid-template-columns: repeat(2, 1fr); gap: .6rem; }
  .dash-all { grid-column: span 2; }
  .dash-card { padding: .8rem .85rem .75rem; border-radius: 14px; }
  .dash-icon { width: 34px; height: 34px; font-size: 1rem; border-radius: 10px; }
  .dash-num { font-size: 1.5rem; margin-top: .4rem; }
}

/* ---------- Masters page ---------- */
.master-nav { display: flex; flex-direction: column; gap: .4rem; }
.master-nav-item { display: flex; align-items: center; gap: .65rem; padding: .7rem .85rem; background: #fff; border-radius: 12px;
  color: #334155; text-decoration: none; font-weight: 600; border: 1px solid #e2e8f0; }
.master-nav-item:hover { border-color: var(--brand-2); color: var(--brand-2); }
.master-nav-item.active { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.mn-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: #eff6ff; color: var(--brand-2); }
.master-nav-item.active .mn-icon { background: rgba(255,255,255,.2); color: #fff; }
.mn-cnt { font-size: .75rem; background: #f1f5f9; color: #475569; border-radius: 20px; padding: .05rem .55rem; }
.master-nav-item.active .mn-cnt { background: rgba(255,255,255,.25); color: #fff; }
@media (max-width: 991.98px) {
  .master-nav { flex-direction: row; overflow-x: auto; padding-bottom: .25rem; }
  .master-nav-item { flex-shrink: 0; padding: .5rem .75rem; }
  .mn-icon { width: 26px; height: 26px; }
}
.opt-row.inactive { background: #f8fafc; }
.opt-row.inactive .opt-status, .opt-row.inactive .fw-semibold { opacity: .55; }
.opt-row.flash { animation: flash 1.2s ease; }
@keyframes flash { from { background: #fef9c3; } to { background: transparent; } }
.order-btn { color: #64748b; font-size: .95rem; } .order-btn:disabled { opacity: .25; }
.opt-status { --c: #64748b; display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; padding: .3rem .75rem; border-radius: 20px;
  color: var(--c); background: color-mix(in srgb, var(--c) 12%, white); border: 1px solid color-mix(in srgb, var(--c) 30%, white); }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px #cbd5e1; padding: 0; }
.swatch.active { box-shadow: 0 0 0 2px #0f172a; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: .35rem; max-height: 170px; overflow-y: auto; }
.icon-opt { display: grid; place-items: center; height: 40px; border: 1px solid #e2e8f0; border-radius: 9px; cursor: pointer; font-size: 1.1rem; color: #334155; }
.icon-opt input { display: none; }
.icon-opt:has(input:checked) { background: var(--brand-2); color: #fff; border-color: var(--brand-2); }

/* ---------- Item search dropdown ---------- */
.item-ac .form-control { min-width: 150px; }
.item-ac .ac-toggle { border-color: #cbd5e1; color: #64748b; }
.ac-menu { position: absolute; z-index: 1080; background: #fff; border: 1px solid #cbd5e1; border-radius: 12px; overflow-y: auto;
  max-height: 300px; box-shadow: 0 12px 32px rgba(15,23,42,.2); -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.ac-head { position: sticky; top: 0; background: #f8fafc; color: #64748b; font-size: .72rem; padding: .35rem .75rem; border-bottom: 1px solid #e2e8f0; }
.ac-item { padding: .55rem .75rem; cursor: pointer; border-bottom: 1px solid #f1f5f9; font-size: .88rem; }
.ac-item:last-child { border-bottom: 0; }
.ac-item:hover, .ac-item.active { background: #eff6ff; }
.ac-item.active { box-shadow: inset 3px 0 0 var(--brand-2); }
.ac-item mark { background: #fef08a; padding: 0; border-radius: 2px; }
.ac-price { color: var(--brand); font-weight: 600; }
.ac-desc { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ac-empty { padding: .85rem; font-size: .85rem; color: #64748b; }
#itemsTable textarea { resize: vertical; min-height: 31px; }
@media (max-width: 767.98px) { .item-ac .input-group-text { padding: .5rem .6rem; } }

/* ---------- Register totals ---------- */
.reg-foot td { background: #eff6ff; font-weight: 700; border-top: 2px solid #bfdbfe; color: #1e3a8a; font-size: .88rem; }
.reg-foot tr.foot-page td { background: #f8fafc; color: #475569; font-weight: 600; border-top: 1px solid #e2e8f0; }
.reg-foot .foot-label { white-space: nowrap; }
.sum-bar { display: flex; flex-wrap: wrap; gap: .5rem; background: #fff; border-radius: 14px; padding: .75rem;
  box-shadow: 0 1px 3px rgba(15,23,42,.06), 0 4px 14px rgba(15,23,42,.04); }
.sum-item { flex: 1 1 120px; padding: .45rem .75rem; border-radius: 10px; background: #f8fafc; }
.sum-item span { display: block; font-size: .72rem; color: #64748b; text-transform: uppercase; letter-spacing: .03em; }
.sum-item b { font-size: 1rem; white-space: nowrap; }
.sum-grand { flex: 2 1 220px; background: linear-gradient(135deg, #1e3a8a, #2563eb); color: #fff; }
.sum-grand span { color: #bfdbfe; } .sum-grand b { font-size: 1.25rem; }
@media (max-width: 575.98px) { .sum-item { flex: 1 1 45%; } .sum-grand { flex-basis: 100%; } }

/* ---------- Users ---------- */
.user-card.inactive { opacity: .65; }
.user-avatar { width: 48px; height: 48px; flex-shrink: 0; border-radius: 14px; display: grid; place-items: center; font-weight: 700; font-size: 1.2rem;
  background: #e2e8f0; color: #334155; }
.user-avatar.admin { background: linear-gradient(135deg, #1e3a8a, #2563eb); color: #fff; }
.min-w-0 { min-width: 0; }

/* ---------- Activity log ---------- */
.log-chip { --c: #64748b; display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem; border-radius: 20px; font-size: .8rem;
  text-decoration: none; color: var(--c); background: #fff; border: 1px solid color-mix(in srgb, var(--c) 30%, white); font-weight: 600; }
.log-chip b { background: color-mix(in srgb, var(--c) 12%, white); border-radius: 12px; padding: 0 .45rem; }
.log-chip.active, .log-chip:hover { background: var(--c); color: #fff; } .log-chip.active b, .log-chip:hover b { background: rgba(255,255,255,.25); }
.log-day { position: sticky; top: 64px; z-index: 2; background: #f8fafc; padding: .45rem 1rem; font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; color: #475569; border-bottom: 1px solid #e2e8f0; }
.log-row { display: flex; gap: .85rem; padding: .8rem 1rem; border-bottom: 1px solid #f1f5f9; align-items: flex-start; }
.log-row:hover { background: #fafcff; }
.log-icon { --c: #64748b; width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--c) 12%, white); color: var(--c); font-size: 1rem; }
.log-badge { --c: #64748b; font-size: .72rem; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 12%, white);
  padding: .15rem .5rem; border-radius: 6px; }
.log-summary { font-size: .9rem; margin-top: .2rem; word-break: break-word; }
.log-meta { text-align: right; font-size: .78rem; white-space: nowrap; flex-shrink: 0; }
.log-changes { margin-top: .35rem; } .log-changes summary { font-size: .78rem; color: var(--brand-2); cursor: pointer; }
.log-changes table { font-size: .78rem; margin-top: .3rem; } .log-changes th { font-size: .7rem; }
.log-old { color: #b91c1c; text-decoration: line-through; text-decoration-color: rgba(185,28,28,.35); }
.log-new { color: #15803d; }
@media (max-width: 575.98px) {
  .log-row { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: .75rem; row-gap: .15rem; }
  .log-icon { grid-column: 1; grid-row: 1 / span 2; }
  .log-meta { grid-column: 2; grid-row: 1; text-align: left; display: flex; flex-wrap: wrap; gap: 0 .75rem; }
  .log-row > .flex-grow-1 { grid-column: 2; grid-row: 2; }
  .log-day { top: 56px; }
}
/* quotation history timeline */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { --c: #64748b; position: relative; padding: .5rem 0 .6rem 2.4rem; border-left: 2px solid #e2e8f0; margin-left: .85rem; }
.timeline li:last-child { border-left-color: transparent; }
.tl-dot { position: absolute; left: -.95rem; top: .45rem; width: 1.8rem; height: 1.8rem; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--c) 14%, white); color: var(--c); font-size: .85rem; border: 2px solid #fff; }
.tl-changes { font-size: .8rem; background: #f8fafc; border-radius: 8px; padding: .4rem .6rem; margin-top: .3rem; }
