/* Tridevo Licitaciones · identidad: granate #562C2C, crema #FFFCF7, melocotón #FFBC7D */
:root {
  --bg: #f7f2ec;
  --surface: #ffffff;
  --surface-2: #fbf8f4;
  --border: #ece3da;
  --border-strong: #d9ccc0;
  --text: #2b1a1a;
  --text-2: #5c4843;
  --muted: #8a7670;
  --primary: #562c2c;
  --primary-hover: #432020;
  --primary-soft: #f4e9e4;
  --accent: #ffbc7d;
  --accent-soft: #fff1e3;
  --cream: #fffcf7;
  --green: #1d6b37;
  --green-soft: #e4f3e8;
  --amber: #8a5200;
  --amber-soft: #fdf0dc;
  --red: #a1261d;
  --red-soft: #fbe5e3;
  --blue: #1f5a85;
  --blue-soft: #e3eff8;
  --slate-soft: #efeae5;
  --violet: #5b3a8c;
  --violet-soft: #eee8f7;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(60, 30, 20, .05), 0 1px 1px rgba(60, 30, 20, .03);
  --shadow-lg: 0 20px 50px -20px rgba(60, 30, 20, .25);
  --font: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0; letter-spacing: -.01em; }
h1 { font-size: 24px; font-weight: 750; }
h2 { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
h3 { font-size: 14px; font-weight: 700; margin: 18px 0 8px; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- barra superior ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 28px;
  padding: 0 28px; height: 64px; background: rgba(255, 252, 247, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-logo { height: 26px; width: auto; display: block; }
.brand-sub { color: var(--muted); font-weight: 600; font-size: 13px; padding-left: 10px; border-left: 1px solid var(--border-strong); }
.mainnav { display: flex; gap: 2px; overflow-x: auto; flex: 1; }
.mainnav a { color: var(--text-2); padding: 7px 13px; border-radius: 8px; white-space: nowrap; font-weight: 550; }
.mainnav a:hover { background: var(--primary-soft); color: var(--primary); text-decoration: none; }
.mainnav a.active { background: var(--primary); color: #fff; }
.usermenu { display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.usermenu form { margin: 0; }
.usermenu .linklike { color: var(--muted); }
.avatar {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: var(--primary); font-weight: 800;
}
.avatar:hover { text-decoration: none; box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- layout ---------- */
.container { max-width: 1260px; margin: 0 auto; padding: 28px; }
.container.wide { max-width: 1600px; }
.container.narrow { max-width: 460px; padding-top: 10vh; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; }
.page-head p { margin: 4px 0 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; margin-bottom: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.narrow-card { max-width: 520px; }
.back { display: inline-block; margin-bottom: 12px; color: var(--muted); font-weight: 550; }

/* ---------- botones y formularios ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 16px;
  border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface); color: var(--text);
  font: inherit; font-weight: 650; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { background: var(--surface-2); border-color: var(--primary); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-hover); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--primary-soft); }
.btn.small { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.lg { height: 46px; font-size: 15px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .6; cursor: default; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); cursor: pointer; font-weight: 550; }
.linklike:hover { text-decoration: underline; }
.linklike.danger { color: var(--red); }
form.inline { display: inline; margin: 0; }

label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 13px; color: var(--text-2); }
label small, .form-grid small { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=date], select, textarea {
  width: 100%; min-height: 38px; padding: 8px 11px; border: 1px solid var(--border-strong); border-radius: 9px;
  background: var(--surface); color: var(--text); font: inherit; font-weight: 400; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255, 188, 125, .45); }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; color: var(--text); }
label.check input { width: auto; min-height: 0; accent-color: var(--primary); }
.stack { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.stack:last-child { margin-bottom: 0; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 14px; }
.form-grid.three { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.checks { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 4px 0 16px; }
.settings-form section > label + label { margin-top: 12px; }
.settings-form section > label { margin-bottom: 12px; }
.sticky-actions { position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(transparent, var(--bg) 35%); text-align: right; }

.flash { padding: 11px 14px; border-radius: 10px; margin-bottom: 14px; border: 1px solid; font-weight: 500; }
.flash-success { background: var(--green-soft); border-color: #bfe2c9; color: #14532d; }
.flash-error { background: var(--red-soft); border-color: #f2c1bb; color: #7f1d1d; }
.flash-info { background: var(--accent-soft); border-color: #fbd8b5; color: #6b3a12; }

/* ---------- pantallas de acceso ---------- */
body.auth { background: var(--cream); }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-brand {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
  padding: 48px 56px; color: #fff; background: var(--primary);
  background-image:
    radial-gradient(circle at 100% 0%, rgba(255, 188, 125, .35) 0, rgba(255, 188, 125, 0) 42%),
    radial-gradient(circle at 0% 100%, rgba(0, 0, 0, .28) 0, rgba(0, 0, 0, 0) 50%);
}
.auth-brand::after {
  content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%;
  border: 60px solid rgba(255, 188, 125, .12);
}
.auth-logo { height: 40px; width: auto; filter: brightness(0) invert(1); position: relative; z-index: 1; align-self: flex-start; }
.auth-pitch { position: relative; z-index: 1; max-width: 520px; }
.eyebrow { margin: 0 0 14px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.auth-pitch h1 { font-size: clamp(28px, 3.2vw, 42px); line-height: 1.12; font-weight: 800; letter-spacing: -.02em; margin-bottom: 34px; }
.auth-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.auth-steps li { display: flex; gap: 16px; align-items: flex-start; color: #f3e2d8; font-size: 14.5px; }
.auth-steps span {
  flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  background: rgba(255, 188, 125, .16); color: var(--accent); font-weight: 800; font-size: 13px;
}
.auth-steps strong { display: block; color: #fff; font-size: 15px; margin-bottom: 1px; }
.auth-foot { position: relative; z-index: 1; margin: 0; font-size: 12.5px; color: #d7b9ac; }
.auth-main { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card-logo { display: none; height: 32px; margin-bottom: 28px; }
.auth-title { font-size: 28px; font-weight: 800; margin-bottom: 6px; letter-spacing: -.02em; }
.auth-sub { margin: 0 0 26px; color: var(--muted); font-size: 15px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form input { min-height: 46px; font-size: 15px; border-radius: 10px; background: #fff; }
.auth-note { margin: 18px 0 0; text-align: center; color: var(--muted); font-size: 13px; }
.auth-note.left { text-align: left; margin: -8px 0 0; }
.otp { text-align: center; font-size: 26px !important; letter-spacing: .5em; font-variant-numeric: tabular-nums; font-weight: 700; padding-left: .5em !important; }
.step { display: flex; align-items: center; gap: 10px; margin-top: 6px; color: var(--text); }
.step-n { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 12px; font-weight: 800; }
.qr-box { display: flex; gap: 16px; align-items: center; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.qr { flex: none; line-height: 0; }
.qr svg { width: 150px; height: 150px; }
.qr-secret small { display: block; color: var(--muted); margin-bottom: 6px; }
.qr-secret code { display: block; word-break: break-all; font-size: 14px; font-weight: 700; color: var(--primary); letter-spacing: .04em; }

/* ---------- etiquetas ---------- */
.badge, .chip {
  display: inline-flex; align-items: center; height: 23px; padding: 0 9px; border-radius: 12px; font-size: 12px;
  font-weight: 650; white-space: nowrap; background: var(--slate-soft); color: var(--text-2);
}
.chip { font-weight: 500; background: var(--surface-2); border: 1px solid var(--border); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.stage-nueva { background: var(--accent-soft); color: #8a4a12; }
.stage-en_estudio { background: var(--violet-soft); color: var(--violet); }
.stage-preparando { background: var(--amber-soft); color: var(--amber); }
.stage-presentada { background: var(--blue-soft); color: var(--blue); }
.stage-ganada { background: var(--green-soft); color: var(--green); }
.stage-perdida, .stage-descartada, .stage-anulada { background: var(--slate-soft); color: var(--muted); }
.bidder-chip { background: var(--primary-soft); color: var(--primary); }
.feed-adj, .feed-res { background: var(--blue-soft); color: var(--blue); }
.feed-anul { background: var(--red-soft); color: var(--red); }
.feed-ev { background: var(--amber-soft); color: var(--amber); }
.run-ok { background: var(--green-soft); color: var(--green); }
.run-aviso { background: var(--amber-soft); color: var(--amber); }
.run-error { background: var(--red-soft); color: var(--red); }

.score {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  font-weight: 800; font-size: 14px; color: #fff; background: #9c8a84; font-variant-numeric: tabular-nums;
}
.score-high { background: var(--green); }
.score-mid { background: #c77a1a; }
.score-low { background: #8a7670; }
.score-none { background: var(--slate-soft); color: var(--muted); font-weight: 700; }
.score-none.ai-error { background: var(--red-soft); color: var(--red); }
.score-none.ai-pendiente, .score-none.ai-evaluando { background: var(--accent-soft); color: #8a4a12; }

.deadline { font-size: 13px; white-space: nowrap; }
.deadline-urgent { color: var(--red); font-weight: 700; }
.deadline-soon { color: var(--amber); font-weight: 600; }
.deadline-closed, .deadline-none { color: var(--muted); }

.star { background: none; border: 0; font-size: 21px; line-height: 1; color: #cdbfb6; cursor: pointer; padding: 4px; }
.star.on, .star:hover { color: #e8913a; }

/* ---------- listado ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 9px 14px; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-weight: 600; }
.tabs a:hover { color: var(--primary); text-decoration: none; }
.tabs a.active { color: var(--primary); border-color: var(--primary); }
.count { display: inline-block; min-width: 22px; padding: 0 7px; border-radius: 10px; background: var(--slate-soft); color: var(--muted); font-size: 12px; text-align: center; font-weight: 650; }
.tabs a.active .count { background: var(--primary); color: #fff; }

.filters { padding: 14px 16px; }
.filter-main { display: flex; gap: 8px; }
.filter-main input[type=search] { flex: 1; }
.filter-main select { width: auto; min-width: 200px; }
.filters details { margin-top: 10px; }
.filters summary { cursor: pointer; color: var(--primary); font-weight: 650; width: max-content; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 12px; }
.stage-checks { grid-column: 1 / -1; border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.stage-checks legend { font-weight: 600; font-size: 13px; color: var(--text-2); margin-bottom: 6px; padding: 0; }
.filter-actions { display: flex; gap: 8px; margin-top: 14px; }

.table-card { padding: 0; overflow: hidden; }
.table-card > h2 { padding: 18px 22px 0; }
table { width: 100%; border-collapse: collapse; }
.tenders th, .plain th { text-align: left; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 11px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.tenders td, .plain td { padding: 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.tenders tr:last-child td, .plain tr:last-child td { border-bottom: 0; }
.tenders tbody tr:hover { background: #fdfaf6; }
.tenders .title { color: var(--text); font-weight: 700; font-size: 14.5px; line-height: 1.35; }
.tenders .title:hover { color: var(--primary); }
.tenders .meta, .meta { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.tenders .chips { margin-top: 7px; }
.tenders .summary { margin: 7px 0 0; color: var(--text-2); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.col-score { width: 60px; }
.col-star { width: 44px; text-align: center; }
.col-title { min-width: 320px; }
.card:not(.table-card) .plain th { background: transparent; padding-left: 0; }
.card:not(.table-card) .plain td { padding-left: 0; }
.table-scroll { overflow-x: auto; }

.pagination { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 8px 0 24px; color: var(--muted); }
.empty { text-align: center; padding: 44px 20px; }
.empty h3 { margin-bottom: 6px; }

/* ---------- ficha ---------- */
.detail-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.detail-title h1 { margin: 10px 0 4px; font-size: 23px; }
.detail-title p { margin: 0; }
.detail-actions { display: flex; align-items: center; gap: 8px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px 22px; }
.facts span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.facts strong { display: block; font-weight: 700; margin-top: 2px; }
.facts small { display: block; color: var(--muted); font-size: 12px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 16px; align-items: start; }
.detail-side { position: sticky; top: 80px; }

.notice { padding: 11px 14px; border-radius: 10px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.notice.info { background: var(--accent-soft); color: #6b3a12; }
.notice.warn { background: var(--amber-soft); color: #6b3f00; display: block; }
.notice.error { background: var(--red-soft); color: #7f1d1d; display: block; }
.spinner { width: 16px; height: 16px; border: 2px solid var(--accent); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.ev-top { display: flex; gap: 18px; align-items: flex-start; padding-bottom: 18px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.ev-score { flex: none; width: 88px; height: 88px; border-radius: 50%; display: grid; place-content: center; text-align: center; color: #fff; background: #8a7670; box-shadow: 0 0 0 6px var(--slate-soft); }
.ev-score strong { font-size: 30px; line-height: 1; }
.ev-score span { font-size: 12px; opacity: .85; }
.ev-score.score-high { background: var(--green); box-shadow: 0 0 0 6px var(--green-soft); }
.ev-score.score-mid { background: #c77a1a; box-shadow: 0 0 0 6px var(--amber-soft); }
.ev-summary { margin: 9px 0 6px; font-size: 15px; line-height: 1.6; }
.ev-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 4px 26px; }
.ev-section { margin-bottom: 16px; }
.ev-section h4 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 7px; }
.ev-section p { margin: 0; }
.ev-section ul { margin: 0; padding-left: 18px; }
.ev-section li { margin-bottom: 4px; }
.ev-alert { background: var(--red-soft); border-radius: 10px; padding: 13px 16px; }
.ev-alert h4 { color: var(--red); }
.ev-good li::marker { color: var(--green); }
.ev-risk li::marker { color: var(--red); }
.bidders { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.bidder { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: var(--surface-2); }
.bidder.recommended { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.bidder-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 6px; }
.bidder p { margin: 0; font-size: 13.5px; color: var(--text-2); }
.history { margin-top: 12px; }
.history summary { cursor: pointer; color: var(--primary); font-weight: 600; }
.history ul { padding-left: 18px; }

.dl { display: grid; grid-template-columns: 180px 1fr; gap: 6px 16px; margin: 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; }

.docs { list-style: none; margin: 0 0 14px; padding: 0; }
.docs li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.docs li > div { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.doc-error { opacity: .85; }
.upload { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px; background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 10px; }
.upload input[type=file] { flex: 1; min-width: 200px; }
.upload select { width: auto; }

.timeline { list-style: none; margin: 16px 0 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 18px; border-left: 2px solid var(--border); margin-left: 4px; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.timeline li:last-child { border-left-color: transparent; }
.timeline .act-nota::before { background: var(--primary); }
.timeline .act-etapa::before, .timeline .act-oferta::before { background: var(--violet); }
.timeline .act-plataforma::before { background: var(--accent); }
.timeline .act-evaluacion::before { background: var(--green); }
.act-nota .act-text { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.act-text { margin-bottom: 2px; }

/* ---------- seguimiento ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { margin: 0; padding: 15px 17px; }
.stat span { display: block; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.stat strong { display: block; font-size: 22px; margin-top: 2px; font-variant-numeric: tabular-nums; color: var(--primary); }
.stat small { color: var(--muted); }
.board { display: grid; grid-template-columns: repeat(5, minmax(250px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.column { background: #efe7df; border-radius: var(--radius); padding: 12px; min-height: 200px; }
.column h2 { font-size: 14px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.board-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; margin-bottom: 8px; box-shadow: var(--shadow); }
.board-card-top { display: flex; gap: 10px; align-items: flex-start; }
.board-card-top .score { width: 30px; height: 30px; font-size: 12px; flex: none; }
.board-card-top a { color: var(--text); font-weight: 700; line-height: 1.35; font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.board-card-facts { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; margin: 6px 0 4px; color: var(--text-2); }
.empty-col { text-align: center; padding: 20px 0; }

/* ---------- ajustes, usuarios, ejecuciones ---------- */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { padding: 4px 0 4px 26px; position: relative; }
.checklist li::before { position: absolute; left: 0; font-weight: 800; }
.checklist li.ok::before { content: "✓"; color: var(--green); }
.checklist li.ko::before { content: "✕"; color: var(--red); }
.bidder-forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.bidder-form { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin: 0; display: flex; flex-direction: column; gap: 12px; background: var(--surface-2); }
.bidder-form legend { padding: 0 6px; font-weight: 750; color: var(--primary); }
.bidder-form .form-grid { margin: 0; }
.cost-table td small { display: block; color: var(--muted); font-weight: 400; }
.cost-table td.current { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); border-radius: 8px; }
.cost-table td, .cost-table th { padding-right: 12px !important; padding-left: 12px !important; }
.users-table tr.inactive td { color: var(--muted); }
.users-table .actions { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.invite-box { border-color: var(--accent); background: var(--accent-soft); }
.invite-box input { margin-top: 6px; background: #fff; }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.run-messages { color: var(--amber); margin-top: 4px; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-side { position: static; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-card-logo { display: block; }
}
@media (max-width: 760px) {
  .container { padding: 16px; }
  .topbar { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 8px 16px; }
  .mainnav { order: 3; flex-basis: 100%; }
  .page-head, .detail-head { flex-direction: column; align-items: stretch; }
  .filter-main { flex-wrap: wrap; }
  .filter-main select { flex: 1; }
  .tenders thead { display: none; }
  .tenders tr { display: grid; grid-template-columns: 50px 1fr 38px; padding: 10px 0; border-bottom: 1px solid var(--border); }
  .tenders td { border: 0; padding: 4px 10px; }
  .tenders td.col-title { grid-column: 2 / 3; grid-row: 1; min-width: 0; }
  .tenders td.col-score { grid-row: 1; }
  .tenders td.col-star { grid-column: 3; grid-row: 1; }
  .tenders td.num, .tenders td:nth-child(4), .tenders td:nth-child(5) { grid-column: 2 / 4; text-align: left; }
  .dl { grid-template-columns: 1fr; }
  .dl dd { margin-bottom: 8px; }
  .qr-box { flex-direction: column; align-items: flex-start; }
}
