:root {
  --navy: #142338; --navy-2: #1e3249; --cyan: #17b8dc; --cyan-dark: #08718b; --cyan-pale: #e7f7fb;
  --bg: #f2f5f7; --surface: #fff; --ink: #172b43; --muted: #6b7a8b; --faint: #97a3b0; --border: #e1e7ec;
  --green: #1f7a5e; --green-pale: #e8f5ef; --amber: #94620f; --amber-pale: #fff4e0; --red: #a64848; --red-pale: #fbecec;
  --radius: 12px; --side: 232px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'Nunito Sans', system-ui, sans-serif; color: var(--ink); background: var(--bg); font-size: 14px; line-height: 1.5; }
body.locked { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
button:disabled { opacity: .5; cursor: default; }
svg.icon { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- layout ---------- */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--side); background: var(--navy); color: #a9b9cd; padding: 28px 16px 20px; display: flex; flex-direction: column; z-index: 20; }
.brand { display: block; padding: 0 6px 30px; }
.brand img { width: 190px; height: 40px; object-fit: contain; object-position: left; }
nav { display: flex; flex-direction: column; gap: 4px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 8px; font-weight: 700; font-size: 14px; transition: background .15s, color .15s; }
.nav-link:hover { background: #ffffff0c; color: #fff; }
.nav-link.active { background: #26405a; color: #fff; box-shadow: inset 3px 0 var(--cyan); }
.nav-link.active .icon { color: #5fd6ef; }
.nav-count { font-size: 12px; background: #ffffff14; border-radius: 6px; padding: 0 7px; margin-left: auto; color: #c3d3e2; }
.sidebar-bottom { margin-top: auto; display: grid; gap: 10px; }
.side-status { display: flex; align-items: center; gap: 9px; border: 1px solid #ffffff17; border-radius: 10px; padding: 11px 12px; font-size: 13px; color: #dbe5ef; line-height: 1.35; }
.side-guide { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 700; color: #b9c8d8; padding: 6px 12px; }
.side-guide:hover { color: #fff; }
.side-guide .icon { width: 16px; height: 16px; }
.mobile-actions { display: flex; gap: 8px; }
.side-logout { background: none; border: 0; color: #8fa1b5; font-size: 13px; padding: 6px 12px; text-align: left; }
.side-logout:hover { color: #fff; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--faint); }
.dot.ok { background: #4fbf96; }
.dot.info { background: var(--cyan); animation: pulse 1.4s ease-in-out infinite; }
.dot.warn { background: #e0a43c; }
.dot.idle { background: #8fa1b5; }
@keyframes pulse { 50% { opacity: .35; } }
.workspace { margin-left: var(--side); min-height: 100vh; }
main { padding: 32px 36px 48px; max-width: 1560px; margin: 0 auto; }
.mobile-top, .bottom-nav { display: none; }

/* ---------- page head ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
h1 { font-size: 30px; letter-spacing: -.6px; line-height: 1.15; margin: 0; font-weight: 800; }
.subtitle { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.head-actions { display: flex; gap: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--border); background: var(--surface); padding: 9px 14px; border-radius: 8px; font-size: 14px; font-weight: 700; min-height: 40px; transition: background .15s, border-color .15s; white-space: nowrap; }
.btn:hover:not(:disabled) { border-color: #a9bac9; background: #f8fafb; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover:not(:disabled) { background: #284661; }
.btn.small { min-height: 34px; padding: 6px 11px; font-size: 13px; }
.btn.wide { width: 100%; }
.icon-button { display: inline-flex; justify-content: center; align-items: center; width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.icon-button:hover { background: var(--cyan-pale); }
.text-link { color: var(--cyan-dark); font-weight: 700; font-size: 13px; background: none; border: 0; padding: 0; margin-left: auto; }
.text-link:hover { text-decoration: underline; }

/* ---------- notices ---------- */
#notices:empty { display: none; }
#notices { display: grid; gap: 8px; margin-bottom: 16px; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 10px; font-size: 14px; background: var(--cyan-pale); color: #145d70; }
.notice.warn { background: var(--amber-pale); color: #7a5108; }
.notice .icon { margin-top: 1px; }

/* ---------- tenders ---------- */
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.list-panel { overflow: hidden; }
.filter-line { display: grid; grid-template-columns: minmax(0, 1fr) 200px 170px; gap: 10px; padding: 16px 18px 12px; }
.search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 8px; padding: 0 12px; background: #fbfcfd; color: var(--faint); }
.search input { border: 0; outline: 0; background: transparent; width: 100%; padding: 10px 0; color: var(--ink); font-size: 14px; }
.search:focus-within { border-color: var(--cyan); }
.select { border: 1px solid var(--border); border-radius: 8px; padding: 9px 10px; background: #fbfcfd; font-size: 14px; min-width: 0; }
.tabs { display: flex; gap: 4px; padding: 0 12px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { border: 0; background: none; padding: 12px 8px 11px; font-size: 14px; font-weight: 700; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.tab small { font-size: 12px; font-weight: 700; background: #eef2f5; color: var(--muted); border-radius: 6px; padding: 0 6px; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); border-bottom-color: var(--cyan); }
.tab.active.fit small { background: var(--green-pale); color: var(--green); }
.tab.active.answers small { background: var(--amber-pale); color: var(--amber); }

.tender { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.tender:last-child { border-bottom: 0; }
.tender:hover { background: #fafcfd; }
.tender.is-excluded .tender-title { color: var(--muted); }
.tender-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.customer-name { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tender-id { margin-left: auto; font-size: 12px; color: var(--faint); white-space: nowrap; }
.badge-new { font-size: 11px; font-weight: 800; color: #fff; background: var(--cyan-dark); border-radius: 5px; padding: 1px 6px; text-transform: uppercase; letter-spacing: .3px; }
.badge-archive { font-size: 11px; font-weight: 800; color: var(--muted); background: #eef2f5; border-radius: 5px; padding: 1px 6px; text-transform: uppercase; letter-spacing: .3px; }
.archive-note { display: flex; gap: 8px; align-items: center; margin: 12px 24px 0; padding: 8px 12px; border-radius: 8px; background: #eef2f5; color: var(--muted); font-size: 13px; }
.bookmark { border: 0; background: none; padding: 4px; color: #b6c2cd; display: inline-flex; margin: -4px -4px -4px 0; }
.bookmark:hover { color: var(--cyan-dark); }
.bookmark.saved { color: var(--cyan-dark); }
.bookmark.saved .icon { fill: currentColor; }
.tender-title { display: block; border: 0; background: none; padding: 0; margin: 6px 0 8px; text-align: left; font-size: 16px; font-weight: 800; line-height: 1.35; letter-spacing: -.1px; overflow-wrap: anywhere; }
.tender-title:hover { color: var(--cyan-dark); }
.tender-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); }
.tender-meta span { display: inline-flex; align-items: center; gap: 5px; }
.tender-meta .icon { width: 15px; height: 15px; color: var(--faint); }
.tender-meta .soon { color: var(--red); font-weight: 700; }
.tender-meta .dim { color: var(--faint); }
.tender-summary { margin: 8px 0 0; font-size: 14px; color: #3d4f63; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tender-bottom { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 5px; border-radius: 6px; padding: 3px 9px; font-size: 13px; font-weight: 700; background: #eef2f5; color: var(--muted); white-space: nowrap; }
.chip .icon { width: 14px; height: 14px; }
.chip.good { background: var(--green-pale); color: var(--green); }
.chip.warn { background: var(--amber-pale); color: var(--amber); }
.chip.bad { background: var(--red-pale); color: var(--red); }
.chip.info { background: var(--cyan-pale); color: var(--cyan-dark); }
.chip.pulse .icon { animation: pulse 1.4s ease-in-out infinite; }
.chip.work { background: #eef0fb; color: #3c4a9a; }
.chip.priority { margin-left: auto; background: none; border: 1px solid var(--border); color: var(--muted); font-variant-numeric: tabular-nums; }
.empty { padding: 44px 20px; text-align: center; color: var(--muted); display: grid; justify-items: center; gap: 10px; }
.empty .icon { width: 28px; height: 28px; color: var(--faint); }
.empty p { margin: 0; font-size: 15px; }

/* ---------- right column ---------- */
.right-column { display: grid; gap: 14px; position: sticky; top: 20px; }
.engine-panel, .side-card { padding: 16px; }
.panel-title { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 12px; }
.panel-title .icon { color: var(--cyan-dark); }
.engine-state { display: flex; align-items: center; gap: 9px; font-size: 14px; padding: 10px 12px; background: #f6f9fb; border-radius: 8px; margin-bottom: 12px; border: 0; width: 100%; text-align: left; cursor: default; }
.engine-state .more { display: none; margin-left: auto; color: var(--cyan-dark); font-weight: 700; font-size: 13px; white-space: nowrap; }
.engine-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 14px; }
.engine-grid button { border: 1px solid var(--border); background: none; border-radius: 8px; padding: 8px 10px; text-align: left; display: grid; }
.engine-grid button:hover { border-color: #a9bac9; }
.engine-grid b { font-size: 20px; line-height: 1.2; }
.engine-grid span { font-size: 12px; color: var(--muted); }
.meter { margin-bottom: 12px; }
.meter-head { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.meter-head b { color: var(--ink); font-variant-numeric: tabular-nums; }
.meter small { font-size: 12px; color: var(--faint); }
.bar { height: 6px; background: #edf1f4; border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--cyan); border-radius: 4px; }
.bar.low i { background: #e0a43c; }
.query-row { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 6px 0; border-top: 1px solid var(--border); }
.query-row b { color: var(--muted); font-weight: 700; white-space: nowrap; }

/* ---------- drawer ---------- */
.overlay { position: fixed; inset: 0; background: #0d182680; z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 100%); background: var(--surface); z-index: 50; display: flex; flex-direction: column; box-shadow: -10px 0 40px #0d18262e; }
.drawer-toolbar { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--faint); padding: 14px 24px 0; background: var(--surface); }
.drawer-head { padding: 4px 24px 14px; border-bottom: 1px solid var(--border); }
.drawer-head h2 { font-size: 21px; line-height: 1.3; margin: 4px 0 10px; letter-spacing: -.2px; overflow-wrap: anywhere; }
.drawer-head .customer-name { white-space: normal; }
.drawer-row { display: flex; gap: 8px; margin-top: 12px; align-items: center; flex-wrap: wrap; }
.work-select { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 8px; padding: 0 4px 0 10px; min-height: 34px; color: var(--muted); }
.work-select select { border: 0; background: none; font-size: 13px; font-weight: 700; color: var(--ink); padding: 6px 2px; }
.drawer-tabs { display: flex; gap: 18px; padding: 0 24px; border-bottom: 1px solid var(--border); }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 24px 28px; overscroll-behavior: contain; }
.drawer-actions { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 24px; border-top: 1px solid var(--border); background: #fbfcfd; }

.verdict { border-radius: 10px; padding: 14px 16px; background: #f4f7f9; border: 1px solid #e3e9ee; }
.verdict.good { background: var(--green-pale); border-color: #c4e3d4; }
.verdict.warn { background: var(--amber-pale); border-color: #f1d9ad; }
.verdict.bad { background: var(--red-pale); border-color: #efcaca; }
.verdict-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.verdict b { font-size: 17px; }
.verdict-top span { font-size: 13px; color: var(--muted); }
.verdict p { margin: 6px 0 0; font-size: 15px; line-height: 1.55; }
.verdict small { display: block; margin-top: 10px; font-size: 12px; color: var(--muted); }
.next-step { display: flex; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #0000000f; font-size: 14px; font-weight: 700; }
.next-step .icon { margin-top: 2px; }
ul.plain { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
.section-label { font-size: 12px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); margin: 22px 0 8px; }
.item { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 14px; }
.item p { margin: 0; }
.item.bad .icon { color: var(--red); }
.item.warn .icon { color: #c88a1e; }
.item .icon { margin-top: 2px; }
.questions { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }
.terms { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.term { border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; }
.term small { font-size: 12px; color: var(--muted); font-weight: 700; }
.term p { margin: 2px 0 0; font-size: 14px; }
.term.unknown p { color: var(--faint); }
details.quote { margin-top: 4px; }
details.quote summary { font-size: 12px; color: var(--cyan-dark); cursor: pointer; font-weight: 700; list-style: none; }
details.quote summary::-webkit-details-marker { display: none; }
details.quote summary::before { content: '› '; }
details.quote[open] summary::before { content: '⌄ '; }
blockquote { margin: 6px 0 0; padding: 8px 10px; background: #f6f9fb; border-left: 3px solid var(--cyan); font-size: 13px; color: #3d4f63; border-radius: 0 6px 6px 0; overflow-wrap: anywhere; }
blockquote cite { display: block; font-style: normal; font-size: 12px; color: var(--faint); margin-top: 4px; }
details.block { margin-top: 18px; border: 1px solid var(--border); border-radius: 10px; }
details.block summary { padding: 11px 14px; font-weight: 700; font-size: 14px; cursor: pointer; }
details.block[open] summary { border-bottom: 1px solid var(--border); }
table.items { width: 100%; border-collapse: collapse; font-size: 13px; }
table.items td { padding: 7px 14px; border-top: 1px solid var(--border); vertical-align: top; }
table.items tr:first-child td { border-top: 0; }
table.items td:last-child { color: var(--muted); text-align: right; white-space: nowrap; }
.priority-breakdown > div { display: flex; justify-content: space-between; gap: 18px; padding: 8px 14px; border-top: 1px solid var(--border); font-size: 13px; }
.priority-breakdown > div:first-child { border-top: 0; }
.priority-breakdown b { white-space: nowrap; color: var(--cyan-dark); }
.description { padding: 12px 14px; font-size: 13px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 420px; overflow-y: auto; }
.doc-summary { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.doc-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--border); min-width: 0; }
.doc-row > div { min-width: 0; overflow-wrap: anywhere; }
.doc-row b { display: block; font-size: 14px; font-weight: 700; }
.doc-row small { font-size: 12px; color: var(--muted); }
.doc-row.unread small { color: var(--amber); }
.doc-icon { flex-shrink: 0; font-size: 10px; font-weight: 800; color: var(--cyan-dark); background: var(--cyan-pale); border-radius: 5px; padding: 4px 5px; min-width: 38px; text-align: center; }
.doc-row.unread .doc-icon { color: var(--faint); background: #eef2f5; }
.progress-head { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; color: var(--muted); }
.progress-head b { color: var(--ink); }
.checklist { display: grid; gap: 2px; }
.check-row { padding: 8px 0; border-top: 1px solid var(--border); }
.check-row details.quote { margin-left: 28px; }
.checklist label { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.checklist input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--green); flex-shrink: 0; }
.form-field { display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 12px; }
.form-field input, .form-field textarea { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 15px; font-weight: 400; color: var(--ink); background: #fbfcfd; width: 100%; }
.form-field textarea { min-height: 170px; resize: vertical; line-height: 1.55; }
.form-field input:focus, .form-field textarea:focus { outline: 2px solid var(--cyan); border-color: transparent; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.profile-section .form-field textarea { min-height: 84px; }

/* ---------- other pages ---------- */
.app-list { display: grid; gap: 10px; }
.application-card { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 16px 20px; }
.application-card > div { flex: 1; min-width: 0; }
.application-card h3 { margin: 4px 0 10px; font-size: 16px; }
.scenario-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.scenario-card { padding: 18px; display: grid; gap: 12px; align-content: start; }
.scenario-card.off { opacity: .6; }
.scenario-card h2 { margin: 0; font-size: 17px; }
.scenario-top { display: flex; justify-content: space-between; align-items: center; }
.scenario-symbol { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; background: var(--cyan-pale); color: var(--cyan-dark); }
.keywords { display: flex; flex-wrap: wrap; gap: 5px; }
.keywords span { font-size: 12px; background: #f1f4f6; border-radius: 5px; padding: 2px 7px; color: var(--muted); }
.scenario-query { display: flex; align-items: baseline; gap: 8px; border-top: 1px solid var(--border); padding-top: 10px; font-size: 14px; }
.scenario-query small { color: var(--muted); }
.switch { width: 42px; height: 24px; border-radius: 12px; border: 0; background: #ccd6de; position: relative; transition: background .15s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch.on { background: var(--green); }
.switch.on::after { transform: translateX(18px); }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.profile-section { padding: 20px; }
.profile-section h2 { margin: 0 0 12px; font-size: 16px; }
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.product { border: 1px solid var(--border); border-radius: 8px; padding: 10px; }
.product b { display: block; font-size: 16px; color: var(--cyan-dark); }
.product small { font-size: 12px; color: var(--muted); }

dialog { border: 0; border-radius: 14px; padding: 22px; width: min(460px, calc(100% - 32px)); box-shadow: 0 20px 60px #0d18264d; }
dialog::backdrop { background: #0d182680; }
.modal-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal-top h2 { margin: 0; font-size: 19px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.hint { margin: -4px 0 0; font-size: 13px; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--navy); color: #fff; padding: 11px 16px; border-radius: 10px; font-size: 14px; opacity: 0; pointer-events: none; transition: .2s; z-index: 70; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- tablet and phone ---------- */
@media (max-width: 1180px) {
  .content-grid { grid-template-columns: 1fr; }
  .right-column { position: static; grid-template-columns: 1fr 1fr; order: -1; }
}
@media (max-width: 860px) {
  .sidebar { display: none; }
  .workspace { margin-left: 0; padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .mobile-top { display: flex; justify-content: space-between; align-items: center; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 30; }
  .mobile-top .icon-button { background: transparent; border-color: #ffffff2a; color: #cfdbe7; }
  .mobile-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; letter-spacing: .4px; }
  .mobile-brand img { width: 26px; height: 26px; }
  .bottom-nav { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--border); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
  .bottom-nav .nav-link { flex-direction: column; gap: 2px; padding: 6px 2px; font-size: 11px; color: var(--muted); border-radius: 8px; position: relative; }
  .bottom-nav .nav-link.active { background: none; box-shadow: none; color: var(--ink); }
  .bottom-nav .nav-link.active .icon { color: var(--cyan-dark); }
  .bottom-nav .nav-count { position: absolute; top: 2px; left: calc(50% + 8px); margin: 0; font-size: 10px; background: var(--cyan-dark); color: #fff; padding: 0 5px; }
  main { padding: 18px 16px 28px; }
  h1 { font-size: 26px; }
  .page-head { align-items: flex-start; }
  .head-actions .btn span { display: none; }
  .head-actions .btn { padding: 9px 11px; }
  .right-column { grid-template-columns: 1fr; }
  #queries { display: none; }
  .engine-panel { padding: 0; }
  .engine-panel .panel-title, .engine-grid { display: none; }
  .engine-state { margin: 0; background: none; padding: 13px 14px; cursor: pointer; }
  .engine-state .more { display: inline; }
  .engine-more { display: none; padding: 0 14px 14px; }
  .engine-panel.open .engine-more { display: block; }
  .filter-line { grid-template-columns: 1fr 1fr; padding: 12px 12px 10px; }
  .filter-line .search { grid-column: 1 / -1; }
  .tabs { padding: 0 6px; }
  .tender { padding: 14px 14px; }
  .tender-title { font-size: 15px; }
  .chip.priority { margin-left: 0; }
  .drawer { width: 100%; overflow-y: auto; overscroll-behavior: contain; }
  .drawer-toolbar { position: sticky; top: 0; z-index: 3; padding: calc(8px + env(safe-area-inset-top)) 16px 8px; }
  .drawer-head { padding: 0 16px 12px; }
  .archive-note { margin: 10px 16px 0; }
  .drawer-head h2 { font-size: 18px; }
  .drawer-tabs { padding: 0 16px; position: sticky; top: calc(54px + env(safe-area-inset-top)); z-index: 2; background: var(--surface); }
  .drawer-body { flex: 1 0 auto; overflow: visible; padding: 14px 16px 24px; }
  .drawer-actions { position: sticky; bottom: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
  .drawer-actions .btn { flex: 1; }
  .terms, .form-grid, .profile-grid { grid-template-columns: 1fr; }
  .application-card { flex-direction: column; align-items: stretch; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
