/* TenderWatch 1.5 — locally served UI. No CDN, web fonts or third-party scripts. */
:root {
  --radius: 18px;
  --focus-ring: 0 0 0 4px #3265ed24;
  --panel-shadow: 0 12px 35px -27px #13284780;
}
body { font-size: 14px; line-height: 1.6; }
button, input, select, textarea, a { -webkit-tap-highlight-color: transparent; }
button, .button { min-height: 40px; transition: background .15s, border-color .15s; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
input:focus, select:focus, textarea:focus { box-shadow: var(--focus-ring); }
[hidden] { display: none !important; }
.skip-link { position: fixed; left: 12px; top: -100px; z-index: 200; background: var(--surface); padding: 12px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.sidebar { width: 246px; padding: 28px 16px; background: #111d32; border-right: 1px solid #ffffff08; }
.sidebar nav a { padding: 12px 16px; margin: 5px 0; letter-spacing: .05px; }
.sidebar nav a.selected { background: #254673; box-shadow: inset 3px 0 #6eaeff; }
.sidebar-bottom { border-top: 1px solid #ffffff15; padding-top: 20px; margin-top: 35px; }
.release-chip { display: inline-block; margin-right: 6px; padding: 1px 7px; background: #344a68; border-radius: 6px; color: #d8e7fa; }
.brand { padding-bottom: 12px; }
.brand small { font-size: 11px; letter-spacing: 0; }
.workspace { margin-left: 246px; }
.workspace.anonymous { margin-left: 0; }
.topbar { position: sticky; top: 0; z-index: 9; height: 78px; padding: 0 30px; box-shadow: 0 3px 24px -20px #12223b65; }
.topbar-title { min-width: 0; flex: 1; }
.top-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 48vw; }
.main { max-width: 1740px; padding: 26px 30px 55px; }
.panel { box-shadow: var(--panel-shadow); border-color: var(--line); }
.panel > .section-heading:first-child { margin-top: 0; }
.page-heading h1 { font-size: clamp(25px, 2vw, 34px); font-weight: 760; }
.detail-title { max-width: 980px; overflow-wrap: anywhere; }
.page-heading .button { flex-shrink: 0; }
.section-heading { flex-wrap: wrap; }
.section-heading h2 { font-weight: 730; }
.section-heading .eyebrow { display: block; margin-bottom: 4px; }
.count-bubble { font-variant-numeric: tabular-nums; }
.page-tools, .list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 0 0 20px; flex-wrap: wrap; }
.inline-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.inline-actions form { margin: 0; display: inline-flex; }
.inline-actions .button, .inline-actions button { font-size: 12px; }
.list-toolbar { margin-top: 24px; }
.list-toolbar p { margin: 0; }
.view-switch { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.view-switch button { font-size: 12px; }
.view-switch button[aria-pressed="true"] { background: var(--accent); color: white; border-color: var(--accent); }
kbd { padding: 0 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; font-family: inherit; }
#lot-filters { border-top: 3px solid var(--accent); padding: 23px; }
#lot-filters label { font-size: 12px; font-weight: 550; }
.filter-actions { border-top: 1px solid var(--line); padding-top: 15px; margin-top: 20px; }
.filter-chips .pill { border-radius: 20px; background: var(--surface); }
.purchase-list { padding: 0; }
.purchase-list th { position: sticky; top: 78px; background: var(--surface-soft); font-size: 11px; font-weight: 700; letter-spacing: .2px; color: var(--muted); }
.purchase-row td { vertical-align: top; padding: 22px 18px; }
.purchase-row:hover { background: var(--surface-soft); }
.purchase-title { color: var(--text); font-size: 16px; font-weight: 720; line-height: 1.55; }
.purchase-row .badge { margin-top: 9px; }
.item-names { border-left: 2px solid #407efb50; padding-left: 10px; margin: 12px 0; font-size: 12px; }
.item-names > b { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; }
.item-names > div { margin-top: 4px; }
.purchase-price { font-variant-numeric: tabular-nums; font-size: 17px; letter-spacing: -.4px; }
.purchase-deadline { min-width: 165px; }
.purchase-deadline .countdown { margin: 8px 0; border-radius: 6px; background: var(--green-bg); padding: 6px 8px; }
.lot-card .lot-title { display: block; max-height: none; -webkit-line-clamp: unset; overflow: visible; }
.lot-card .customer { display: block; -webkit-line-clamp: unset; overflow: visible; }
.lot-card { box-shadow: var(--panel-shadow); }
.lot-overview { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin: 22px 0; }
.overview-stat { background: var(--surface); border: 1px solid var(--line); border-radius: 15px; padding: 20px; min-height: 122px; box-shadow: var(--panel-shadow); }
.overview-stat > span { color: var(--muted); font-size: 12px; }
.overview-stat > strong { display: block; font-size: 32px; line-height: 1.2; letter-spacing: -1px; margin: 9px 0 5px; font-variant-numeric: tabular-nums; }
.overview-stat strong small { font-size: 18px; color: var(--muted); }
.overview-stat > small { color: var(--muted); }
.overview-stat .stat-region, .overview-stat .stat-state { font-size: 19px; line-height: 1.35; letter-spacing: -.3px; }
.detail-tabs { display: flex; gap: 4px; flex-wrap: wrap; padding: 7px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); margin-bottom: 23px; }
.detail-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 8px; font-size: 12px; color: var(--text); font-weight: 600; }
.detail-tabs a:hover { color: var(--accent); background: var(--surface-soft); text-decoration: none; }
.detail-tabs span { padding: 0 5px; background: var(--surface-soft); border-radius: 4px; color: var(--muted); }
.detail-content section[id] { scroll-margin-top: 100px; }
.detail-grid { grid-template-columns: minmax(0,1fr) 295px; gap: 22px; align-items: start; }
.detail-side { position: sticky; top: 95px; }
.detail-side .panel { padding: 20px; }
.deadline-panel { border-top: 3px solid var(--accent); background: var(--surface); }
.deadline-date { font-size: 21px; font-variant-numeric: tabular-nums; }
.big-countdown { color: var(--green); border-radius: 10px; padding: 12px; background: var(--green-bg); font-size: 15px; }
.details { grid-template-columns: 180px minmax(0,1fr); row-gap: 15px; }
.details dt { font-size: 12px; }
.details dd { overflow-wrap: anywhere; font-size: 13px; }
.product-tools { display: flex; align-items: end; gap: 13px; flex-wrap: wrap; padding: 13px 0 19px; }
.product-search { flex: 1; min-width: 220px; font-size: 11px; color: var(--muted); }
.product-search input { margin-top: 5px; width: 100%; }
.item-table { min-width: 580px; }
.item-table th { white-space: nowrap; font-size: 11px; color: var(--muted); background: var(--surface-soft); }
.item-table th:first-child { width: 48%; }
.item-table td { padding: 17px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.item-table td:first-child { line-height: 1.55; }
.item-table td b { font-size: 14px; }
.item-table tbody tr:last-child td { border-bottom: 0; }
.product-spec { margin-top: 8px; }
.product-spec summary, .text-disclosure summary { font-size: 12px; color: var(--accent); font-weight: 600; cursor: pointer; }
.product-spec p { white-space: pre-wrap; }
.documents-panel { overflow: hidden; }
.document-metrics { display: flex; flex-wrap: wrap; gap: 10px; margin: 15px 0; }
.document-metrics span { background: var(--surface-soft); border: 1px solid var(--line); border-radius: 7px; padding: 7px 11px; font-size: 11px; }
.document-metrics b { color: var(--text); font-size: 14px; margin-right: 3px; }
.document-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; gap: 15px; margin: 12px 0; }
.document-icon { width: 43px; height: 48px; flex-shrink: 0; border-radius: 10px; font-size: 27px; display: grid; place-items: center; color: var(--accent); background: var(--surface-soft); }
.document-body { min-width: 0; flex: 1; }
.document-heading { display: flex; align-items: start; gap: 9px; justify-content: space-between; flex-wrap: wrap; }
.document-heading h3 { margin: 0; overflow-wrap: anywhere; line-height: 1.5; flex: 1; min-width: 160px; }
.document-heading .badge { flex-shrink: 0; margin-top: 3px; }
.document-card .text-disclosure { margin-top: 14px; }
.document-error { font-size: 12px; color: var(--orange); margin: 10px 0; }
.document-text { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 400px; overflow: auto; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 8px; padding: 15px; font-family: inherit; font-size: 12px; }
.empty-inline { display: flex; gap: 16px; align-items: center; padding: 20px; background: var(--surface-soft); border: 1px dashed var(--line); border-radius: 12px; margin: 15px 0 0; }
.empty-inline p { color: var(--muted); font-size: 12px; }
.empty-icon { font-size: 33px; color: var(--muted); }
.network-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.network-grid > .panel { margin: 0; }
.copy-row { display: flex; align-items: center; justify-content: space-between; background: var(--surface-soft); border: 1px solid var(--line); padding: 10px; border-radius: 10px; gap: 10px; margin: 15px 0; }
.copy-row code { overflow-wrap: anywhere; font-size: 13px; }
.copy-row button { flex-shrink: 0; font-size: 11px; }
.guide-steps { padding-left: 20px; }
.guide-steps li { padding: 5px 0 5px 4px; }
.connection-banner { padding: 10px 30px; background: var(--orange-bg); color: var(--orange); border-bottom: 1px solid var(--line); font-size: 12px; }
.toast { position: fixed; right: 24px; bottom: 26px; background: var(--sidebar); color: #fff; border: 1px solid #ffffff25; box-shadow: 0 10px 35px #0003; border-radius: 12px; padding: 15px 20px; max-width: min(480px,90vw); z-index: 100; font-size: 13px; }
.back-top { position: fixed; right: 20px; bottom: 18px; border-radius: 50%; width: 38px; height: 38px; min-height: 38px; background: var(--surface); box-shadow: var(--panel-shadow); z-index: 8; opacity: .85; }
.toast:not([hidden]) ~ .back-top { visibility: hidden; }
.menu-button, .sidebar-shade { display: none; }
[data-busy="true"] { opacity: .65; pointer-events: none; }
#refresh-state { font-size: 10px; }
body[data-theme="dark"] .document-icon { background: #26416b60; }
body[data-theme="dark"] .sidebar { background: #0a1324; }
body[data-theme="dark"] .topbar { box-shadow: none; }
body[data-theme="dark"] .purchase-row:hover { background: #203149; }
body[data-theme="dark"] .copy-row code { color: var(--text); }
@media (min-width: 1550px) {
  .main { padding-right: 40px; padding-left: 40px; }
  .detail-grid { grid-template-columns: minmax(0,1fr) 315px; }
}
@media (max-width: 1250px) {
  .sidebar { width: 220px; }
  .workspace { margin-left: 220px; }
  .main { padding-left: 22px; padding-right: 22px; }
  .detail-grid { grid-template-columns: minmax(0,1fr); }
  .detail-side { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .detail-side .panel { margin: 0; }
  .lot-overview { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .overview-stat { min-height: 112px; }
  .topbar { padding: 0 22px; }
}
@media (max-width: 980px) {
  .menu-button { display: inline-flex; flex-shrink: 0; }
  .sidebar { display: flex; width: 258px; transform: translateX(-100%); transition: transform .2s ease; z-index: 51; }
  .workspace { margin-left: 0; }
  .sidebar-shade { position: fixed; inset: 0; z-index: 50; background: #08132988; border: 0; border-radius: 0; width: 100%; height: 100%; }
  body[data-menu="open"] .sidebar { transform: translateX(0); }
  body[data-menu="open"] .sidebar-shade { display: block; }
  .top-title { max-width: 48vw; font-size: 15px; }
  .topbar { gap: 12px; }
  .clock { display: none; }
}
@media (max-width: 640px) {
  .main { padding: 20px 14px 60px; }
  .topbar { height: 64px; padding: 0 12px; }
  .topbar-title .eyebrow { font-size: 8px; }
  .top-title { font-size: 13px; max-width: 35vw; }
  .top-actions { gap: 6px; }
  .username, .top-actions .avatar { display: none; }
  .top-actions button { font-size: 12px; padding: 8px; }
  .page-heading { display: block; }
  .page-heading > .button, .page-heading > a { margin-top: 14px; }
  .panel { padding: 17px; border-radius: 13px; }
  #lot-filters { padding: 16px; }
  .lot-overview { gap: 9px; }
  .overview-stat { padding: 15px; }
  .overview-stat > strong { font-size: 28px; }
  .overview-stat .stat-region, .overview-stat .stat-state { font-size: 15px; }
  .overview-stat > small { font-size: 10px; }
  .detail-grid { display: block; }
  .detail-side { display: block; }
  .detail-side .panel { margin-bottom: 16px; }
  .detail-tabs { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; }
  .detail-tabs a { padding: 8px 11px; }
  .details { grid-template-columns: minmax(0,1fr); gap: 4px; }
  .details dd { margin: 0 0 10px; }
  .document-card { padding: 13px; gap: 10px; }
  .document-icon { display: none; }
  .document-heading h3 { min-width: 125px; }
  .document-card .inline-actions { gap: 4px; }
  .document-card .button, .document-card button { padding: 9px; }
  .network-grid { grid-template-columns: minmax(0,1fr); }
  .copy-row { flex-wrap: wrap; }
  .list-toolbar { gap: 9px; }
  .view-switch { width: 100%; }
  .page-tools { align-items: flex-start; }
  .purchase-list { padding: 0; }
  .purchase-list table { min-width: 750px; }
  .detail-content section[id] { scroll-margin-top: 80px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
@media print {
  .sidebar, .topbar, .footer, .page-tools, .detail-tabs, button, .inline-actions, .back-top, .filter-actions { display: none !important; }
  .workspace { margin: 0; }
  .main { padding: 0; }
  .detail-grid { display: block; }
  .panel { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  .detail-side { position: static; }
  body { background: white; color: black; }
}
.clipboard-temp { position: fixed; left: -10000px; top: 0; width: 1px; height: 1px; opacity: 0; }
/* Override the legacy mobile top-navigation and preserve stacked result cards. */
@media (max-width: 980px) {
  .sidebar { position: fixed; inset: 0 auto 0 0; overflow-y: auto; }
  .sidebar nav { display: block; overflow: visible; margin-top: 0; }
  .sidebar nav a { white-space: normal; padding: 12px 16px; font-size: 13px; }
  .sidebar .nav-label, .sidebar-bottom { display: block; }
}
@media (max-width: 780px) {
  .purchase-list table { min-width: 0; }
}

/* v1.7 source-accurate deposit / asynchronous download states */
.deposit-badge{display:inline-block;padding:.55rem .8rem;border-radius:10px;background:var(--bg,#f4f7ff);border:1px solid var(--border,#e2e8f0);overflow-wrap:anywhere}.deposit-none{background:#eaf8ee;color:#155b32}.deposit-conflict{background:#fff1e5;color:#9b3c00}.download-status{padding:.6rem 0;font-size:.85rem;max-width:52rem;overflow-wrap:anywhere}.download-status[role=alert]{color:#b43d18}[data-original-download][aria-busy=true]{opacity:.65;cursor:wait}.document-body{min-width:0}

/* v1.8: distinct starting/actual/next quotes, stable table widths. */
.auction-price-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px}
.auction-price-cell{padding:16px;border:1px solid var(--border,#dde5f1);border-radius:12px;min-width:0;background:var(--card,#f8faff)}
.auction-price-cell small,.auction-price-cell strong,.auction-card-prices small,.auction-card-prices b,.auction-item-price{display:block;overflow-wrap:anywhere}
.auction-price-cell strong{margin-top:8px;font-size:1.08rem}.auction-current{border-left:4px solid #26816a}.auction-next{border-left:4px solid #ba7a20}
.auction-item-price{font-size:.78rem;margin-top:7px;font-weight:400}.auction-card-prices{display:grid;gap:8px;padding:10px 0;font-size:.85rem}
@media(max-width:520px){.auction-price-grid{grid-template-columns:1fr}}

/* v1.8.2: literal per-product description, isolated from adjacent columns. */
.item-table {width:100%;table-layout:fixed;min-width:920px}
.item-table th:first-child,.item-table td:first-child{width:25%;overflow-wrap:anywhere}
.item-table th:nth-child(2),.item-table .product-detail-text{width:34%;overflow-wrap:anywhere;white-space:normal}
.item-table th:nth-child(3),.item-table th:nth-child(4){width:8%}
.item-table th:nth-child(5),.item-table th:nth-child(6){width:12.5%}
.product-description p{white-space:pre-wrap;overflow-wrap:anywhere;max-height:22rem;overflow:auto;line-height:1.6;margin:.55rem 0}
.product-description summary{cursor:pointer;font-weight:600}
@media(max-width:600px){.item-table{min-width:860px}.product-description p{max-height:20rem}}
