:root {
  --green-900: #07175f;
  --green-800: #0b278c;
  --green-700: #df0712;
  --green-100: #fff2a8;
  --green-50: #fffbed;
  --ink: #10184a;
  --muted: #697086;
  --line: #e5e2cf;
  --paper: #fff;
  --canvas: #fffdf3;
  --amber: #a66608;
  --amber-bg: #fff5dc;
  --red: #c70510;
  --red-bg: #fff0ef;
  --shadow: 0 8px 30px rgba(10, 29, 109, .09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 246px 1fr; }
.sidebar { background: linear-gradient(180deg, #06134f 0%, #0b278c 100%); color: #fff; padding: 20px 18px 26px; display: flex; flex-direction: column; position: sticky; height: 100vh; top: 0; border-top: 6px solid #ffdc00; }
.brand { display: flex; align-items: center; justify-content: center; color: inherit; text-decoration: none; padding: 0 6px 24px; }
.brand-logo { display: block; width: 100%; max-width: 184px; height: auto; border-radius: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }
.brand-mark { width: 39px; height: 39px; border-radius: 11px; display: grid; place-items: center; background: #bce8d6; color: var(--green-900); font-weight: 850; font-size: 22px; }
.brand strong, .brand small { display: block; }
.brand strong { letter-spacing: -.02em; font-size: 18px; }
.brand small { opacity: .65; margin-top: 1px; font-size: 12px; }
.sidebar nav { display: grid; gap: 6px; }
.sidebar nav a { color: rgba(255,255,255,.72); text-decoration: none; padding: 12px 13px; border-radius: 10px; display: flex; gap: 11px; align-items: center; font-size: 14px; font-weight: 650; }
.sidebar nav a:hover { background: rgba(255,255,255,.11); color: #fff; }
.sidebar nav a.active { background: #df0712; color: #fff; box-shadow: 0 6px 16px rgba(104, 0, 9, .28); }
.sidebar nav a span { font-size: 19px; width: 20px; text-align: center; }
.sidebar-bottom { margin-top: auto; border-top: 1px solid rgba(255,255,255,.13); padding-top: 12px; }
.sidebar-note { padding: 2px 10px 10px; color: rgba(255,255,255,.6); font-size: 11px; display: flex; gap: 8px; align-items: center; }
.sidebar-logout { width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; color: rgba(255,255,255,.72); background: transparent; text-align: left; font-size: 12px; font-weight: 700; cursor: pointer; }
.sidebar-logout:hover { color: #fff; background: rgba(255,255,255,.1); }
.status-dot { width: 8px; height: 8px; background: #ffdc00; border-radius: 50%; box-shadow: 0 0 0 3px rgba(255,220,0,.15); }
main { min-width: 0; }
.topbar { min-height: 93px; padding: 22px clamp(22px, 4vw, 54px); background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); box-shadow: inset 0 -3px #ffdc00; display: flex; align-items: center; gap: 16px; position: sticky; top: 0; z-index: 10; backdrop-filter: blur(8px); }
.topbar h1 { font-size: 23px; margin: 2px 0 0; letter-spacing: -.025em; }
.eyebrow { color: var(--green-700); font-weight: 750; text-transform: uppercase; letter-spacing: .1em; font-size: 10px; margin: 0; }
.topbar .button { margin-left: auto; }
.topbar-actions { margin-left: auto; display: flex; gap: 8px; }
.topbar-actions .button { margin-left: 0; }
.menu-button { display: none; background: none; border: 0; font-size: 24px; }
.content { padding: 32px clamp(22px, 4vw, 54px) 60px; max-width: 1500px; margin: 0 auto; }
.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 25px; }
.hero h2 { margin: 0 0 7px; font-size: clamp(25px, 3vw, 36px); letter-spacing: -.04em; }
.hero p { margin: 0; color: var(--muted); max-width: 680px; line-height: 1.55; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 26px; }
.metric { background: var(--paper); border: 1px solid var(--line); border-top: 3px solid #ffdc00; border-radius: 14px; padding: 17px 19px 19px; box-shadow: 0 2px 10px rgba(10,29,109,.035); }
.metric small { color: var(--muted); font-weight: 650; display: block; margin-bottom: 8px; }
.metric strong { font-size: 28px; letter-spacing: -.035em; }
.metric em { font-style: normal; color: var(--green-700); font-size: 12px; margin-left: 6px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; margin-bottom: 22px; }
.panel-header { padding: 19px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.panel-header h2, .panel-header h3 { margin: 0; font-size: 16px; letter-spacing: -.015em; }
.panel-header p { color: var(--muted); margin: 4px 0 0; font-size: 12px; }
.panel-body { padding: 22px; }
.panel-tools { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex: 1; }
.panel-tools .searchbar { width: min(420px, 100%); }
.pagination { min-height: 62px; padding: 12px 16px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--muted); font-size: 11px; }
.pagination-buttons { display: flex; align-items: center; gap: 10px; }
.pagination-buttons strong { min-width: 92px; text-align: center; color: var(--ink); font-size: 11px; }
.pagination .button:disabled { opacity: .42; cursor: default; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .055em; text-align: left; padding: 12px 15px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 14px 15px; border-bottom: 1px solid #edf1ef; font-size: 13px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafcfb; }
.product-name { font-weight: 680; min-width: 240px; }
.subtle { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.button { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 9px; padding: 10px 15px; font-weight: 700; font-size: 13px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.button:hover { border-color: #b9ccc4; background: #fbfdfc; }
.button.primary { background: var(--green-800); color: #fff; border-color: var(--green-800); }
.button.primary:hover { background: var(--green-900); }
.button.compact { padding: 9px 13px; }
.button.ghost { border-color: transparent; color: var(--green-800); background: transparent; }
.button.danger { color: var(--red); }
.button-row { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.badge { display: inline-flex; align-items: center; border-radius: 99px; padding: 5px 9px; font-size: 10px; font-weight: 780; white-space: nowrap; background: #eef2f0; color: #52605a; }
.badge.open, .badge.submitted { background: #eef1ff; color: var(--green-800); }
.badge.winner { background: #e7f4ef; color: #116b49; }
.badge.pending, .badge.tie { background: var(--amber-bg); color: var(--amber); }
.badge.closed, .badge.expired { background: var(--red-bg); color: var(--red); }
.badge.store-badge { color: var(--green-800); background: #fff3a8; }
.empty { padding: 54px 24px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font-size: 17px; margin-bottom: 7px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12px; font-weight: 750; }
.field small { color: var(--muted); }
.store-field { border: 0; padding: 0; margin: 2px 0 0; }
.store-field legend { padding: 0; margin-bottom: 8px; font-size: 12px; font-weight: 750; }
.store-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.store-option { position: relative; display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; background: #fff; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.store-option:hover { background: var(--green-50); border-color: #c8c8b8; }
.store-option:has(input:checked) { border-color: var(--green-800); background: #f2f5ff; box-shadow: 0 0 0 2px rgba(11,39,140,.09); }
.store-option input { width: 18px; min-height: 18px; padding: 0; accent-color: var(--green-800); }
.store-option span, .store-option strong, .store-option small { display: block; }
.store-option strong { font-size: 13px; }
.store-option small { margin-top: 3px; font-size: 10px; font-weight: 500; }
.store-line { display: block; margin: 5px 0 2px; color: var(--green-800); font-size: 11px; font-weight: 750; }
.review-store { margin-bottom: 12px; padding: 12px 15px; border-radius: 10px; color: #fff; background: linear-gradient(125deg, var(--green-900), var(--green-800)); border-left: 5px solid #ffdc00; }
.review-store small, .review-store strong { display: block; }
.review-store small { color: #ffea71; font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.review-store strong { margin-top: 4px; font-size: 15px; }
input, select, textarea { width: 100%; border: 1px solid #cfdad5; background: #fff; color: var(--ink); border-radius: 9px; min-height: 42px; padding: 9px 11px; outline: none; }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--green-800); box-shadow: 0 0 0 3px rgba(11,39,140,.12); }
.searchbar { position: relative; flex: 1; max-width: 420px; }
.searchbar input { padding-left: 36px; }
.searchbar::before { content: '⌕'; position: absolute; left: 12px; top: 8px; color: var(--muted); font-size: 19px; }
.picker-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 20px; }
.picker-list { border: 1px solid var(--line); border-radius: 11px; max-height: 420px; overflow: auto; }
.picker-results { min-width: 0; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.picker-results .picker-list { border: 0; border-radius: 0; }
.picker-item { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border-bottom: 1px solid #edf1ef; cursor: pointer; }
.picker-item:last-child { border-bottom: 0; }
.picker-item:hover { background: var(--green-50); }
.picker-item input { width: 17px; min-height: 17px; accent-color: var(--green-800); }
.picker-item span { font-size: 13px; font-weight: 620; }
.selection-box { background: var(--green-50); border: 1px solid #d5e8e0; border-radius: 11px; padding: 15px; }
.selection-box h3 { font-size: 13px; margin: 0 0 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; font-size: 11px; }
.steps { display: flex; gap: 8px; margin-bottom: 18px; }
.step { flex: 1; padding: 10px 12px; background: #e9eeec; color: var(--muted); border-radius: 8px; font-size: 11px; font-weight: 750; }
.step.active { background: var(--green-800); color: #fff; }
.quote-card { display: grid; grid-template-columns: 1fr auto; gap: 10px 20px; padding: 17px 20px; border-bottom: 1px solid var(--line); cursor: pointer; }
.quote-card:last-child { border-bottom: 0; }
.quote-card:hover { background: var(--green-50); }
.quote-card h3 { margin: 0; font-size: 15px; }
.quote-progress { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--muted); }
.progress { height: 6px; background: #e8eeeb; border-radius: 99px; flex: 1; overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, #0b278c, #df0712); border-radius: inherit; }
.summary-strip { display: flex; gap: 22px; flex-wrap: wrap; padding: 15px 20px; background: var(--green-50); border-bottom: 1px solid var(--line); }
.summary-strip div { font-size: 11px; color: var(--muted); }
.summary-strip strong { color: var(--ink); display: block; font-size: 15px; margin-top: 2px; }
.quote-total { min-width: 230px; padding: 15px 20px; color: #fff; background: linear-gradient(125deg, var(--green-900), var(--green-800)); border-radius: 14px; border-top: 4px solid #ffdc00; box-shadow: 0 8px 22px rgba(10,29,109,.16); }
.quote-total small, .quote-total span { display: block; }
.quote-total small { color: #ffea71; font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.quote-total strong { display: block; margin: 4px 0 2px; font-size: 27px; letter-spacing: -.035em; }
.quote-total span { color: rgba(255,255,255,.72); font-size: 11px; }
.price-cell { text-align: right; white-space: nowrap; }
.price-cell.lowest { background: #eaf7ef; color: #116b49; font-weight: 800; }
.quantity-input { width: 76px; min-height: 35px; padding: 6px 8px; }
.winner-select { min-width: 185px; min-height: 35px; padding: 6px 8px; font-size: 12px; }
.locked-value { min-width: 145px; }
.locked-value strong, .locked-value span { display: block; }
.locked-value strong { color: var(--green-800); font-size: 12px; }
.locked-value span { color: var(--muted); font-size: 11px; margin-top: 3px; }
.locked-quantity { display: inline-flex; align-items: center; min-height: 32px; padding: 6px 10px; border-radius: 8px; background: #f5f6f9; color: var(--ink); font-weight: 750; white-space: nowrap; }
.invitation-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.invitation { border: 1px solid var(--line); border-radius: 12px; padding: 15px; }
.invitation h3 { margin: 0 0 4px; font-size: 14px; }
.invitation p { color: var(--muted); font-size: 11px; margin: 0 0 13px; }
.history-panel > summary { cursor: pointer; list-style: none; border-bottom: 0; }
.history-panel > summary::-webkit-details-marker { display: none; }
.history-panel[open] > summary { border-bottom: 1px solid var(--line); }
.history-toggle { color: var(--green-800); font-size: 22px; transition: transform .18s ease; }
.history-panel[open] .history-toggle { transform: rotate(180deg); }
.history-panel:not([open]) { box-shadow: 0 3px 14px rgba(10,29,109,.05); }
.orders-featured { border-top: 4px solid #ffdc00; }
.orders-featured > .panel-header { background: linear-gradient(90deg, #fffbed, #fff); }
.order-card { border: 1px solid var(--line); border-radius: 12px; padding: 17px; margin-bottom: 12px; }
.order-card h3 { margin: 0 0 3px; }
.order-total { font-size: 19px; color: var(--green-800); font-weight: 800; }
.order-link-box { margin-top: 14px; padding: 14px; border-radius: 10px; background: var(--green-50); border: 1px solid #d5e8e0; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pending-order-link { color: var(--muted); font-size: 12px; justify-content: flex-start; }
.notice { margin: 18px clamp(22px, 4vw, 54px) 0; padding: 12px 15px; border-radius: 9px; background: var(--green-100); color: var(--green-900); font-size: 13px; font-weight: 650; }
.notice.error { background: var(--red-bg); color: var(--red); }
.hidden { display: none !important; }
dialog { border: 0; border-radius: 15px; width: min(560px, calc(100vw - 30px)); padding: 0; box-shadow: 0 25px 80px rgba(0,0,0,.23); }
dialog::backdrop { background: rgba(8,25,19,.55); backdrop-filter: blur(2px); }
.dialog-head { padding: 20px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.dialog-head h2 { margin: 0; font-size: 18px; }
.dialog-body { padding: 22px; }
.dialog-hint { margin: -2px 0 2px; padding: 11px 13px; border-radius: 9px; color: var(--green-900); background: var(--green-50); border-left: 4px solid #ffdc00; font-size: 12px; line-height: 1.45; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.icon-button { background: transparent; border: 0; font-size: 22px; cursor: pointer; color: var(--muted); }
.supplier-page { background: linear-gradient(180deg, #fff9cf 0, #f7f8fc 260px); }
.supplier-header { min-height: 104px; background: linear-gradient(90deg, #06134f, #0b278c); display: flex; align-items: center; padding: 10px max(20px, calc((100vw - 880px) / 2)); color: #fff; border-bottom: 5px solid #ffdc00; }
.supplier-header .brand { padding: 0; justify-content: flex-start; }
.supplier-header .brand-logo { width: 82px; border-radius: 10px; box-shadow: 0 4px 14px rgba(0,0,0,.24); }
.brand-public-name { display: grid; gap: 3px; margin-left: 14px; }
.brand-public-name strong { font-size: 17px; letter-spacing: -.015em; }
.brand-public-name small { color: #ffdf19; font-size: 11px; }
.supplier-main { max-width: 880px; margin: 30px auto; padding: 0 18px 60px; }
.supplier-hero { background: linear-gradient(125deg, #07175f 0%, #0b278c 72%, #df0712 140%); color: #fff; border-radius: 16px 16px 0 0; padding: 28px; border-top: 5px solid #df0712; }
.supplier-hero h1 { margin: 0 0 8px; font-size: 26px; }
.supplier-hero p { margin: 0; color: rgba(255,255,255,.75); }
.public-store { display: inline-flex; margin: 4px 0 13px; padding: 7px 10px; border-radius: 8px; color: #07175f; background: #ffdc00; font-size: 12px; font-weight: 850; }
.deadline { display: inline-block; margin-top: 16px; background: rgba(255,255,255,.13); padding: 8px 10px; border-radius: 8px; font-size: 12px; }
.supplier-form { background: #fff; border-radius: 0 0 16px 16px; box-shadow: var(--shadow); overflow: hidden; }
.supplier-form table input { text-align: right; min-width: 115px; }
.supplier-actions { padding: 20px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; }
.loading { text-align: center; padding: 80px; color: var(--muted); }
.success-box, .error-box { background: #fff; border-radius: 16px; padding: 48px 28px; box-shadow: var(--shadow); text-align: center; }
.success-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; background: #e7f4ef; color: #116b49; font-size: 28px; margin: 0 auto 15px; }
.order-label { text-transform: uppercase; letter-spacing: .09em; font-size: 10px; font-weight: 800; margin-bottom: 8px !important; }
.order-intro { padding: 22px 24px; display: flex; justify-content: space-between; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); }
.order-intro p { color: var(--muted); font-size: 12px; margin: 4px 0 0; }
.order-public-table th:nth-last-child(-n+2), .order-public-table td:nth-last-child(-n+2) { text-align: right; }
.order-public-table tfoot td { background: var(--green-50); border-top: 2px solid var(--green-800); font-weight: 800; font-size: 16px; }
.order-public-table tfoot td:last-child { color: var(--green-800); font-size: 20px; }
.order-footer { padding: 20px 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.order-footer p { color: var(--muted); font-size: 12px; margin: 0; max-width: 560px; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 20% 10%, #fff5a9 0, transparent 30%), linear-gradient(135deg, #06134f 0%, #0b278c 58%, #df0712 145%); }
.login-shell { width: min(920px, 100%); min-height: 560px; display: grid; grid-template-columns: minmax(300px, .85fr) minmax(380px, 1.15fr); overflow: hidden; border-radius: 22px; background: #fff; box-shadow: 0 28px 90px rgba(0,0,0,.28); }
.login-brand { padding: 44px 35px; display: flex; flex-direction: column; justify-content: center; color: #fff; background: linear-gradient(155deg, #06134f, #0b278c); border-top: 7px solid #ffdc00; }
.login-brand img { width: min(245px, 100%); margin: 0 auto 28px; border-radius: 16px; box-shadow: 0 12px 32px rgba(0,0,0,.25); }
.login-brand strong, .login-brand span { display: block; text-align: center; }
.login-brand strong { font-size: 20px; }
.login-brand span { margin-top: 6px; color: rgba(255,255,255,.66); font-size: 12px; }
.login-card { padding: 54px clamp(30px, 6vw, 66px); display: flex; flex-direction: column; justify-content: center; }
.login-heading h1 { margin: 6px 0 9px; font-size: 30px; letter-spacing: -.035em; }
.login-heading p { margin: 0; color: var(--muted); line-height: 1.55; font-size: 13px; }
.login-form { display: grid; gap: 17px; margin-top: 28px; }
.login-submit { width: 100%; min-height: 46px; margin-top: 2px; }
.login-form .notice { margin: 0; }
.login-notice { margin: 18px 0 -10px; background: #e7f4ef; color: #116b49; }
@media print {
  .supplier-header, [data-print] { display: none !important; }
  .supplier-page, .supplier-main { background: #fff; margin: 0; padding: 0; max-width: none; }
  .supplier-form { box-shadow: none; }
  .supplier-hero { border-radius: 0; }
}
@media (max-width: 950px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .picker-layout { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; z-index: 30; width: 246px; transform: translateX(-105%); transition: transform .2s ease; }
  .sidebar.open { transform: translateX(0); }
  .menu-button { display: block; }
  .topbar { padding: 16px 18px; min-height: 80px; }
  .content { padding: 23px 16px 50px; }
  .topbar .button { display: none; }
  .topbar-actions { margin-left: auto; }
  .hero { align-items: flex-start; flex-direction: column; }
  .quote-total { width: 100%; min-width: 0; }
  .metrics { grid-template-columns: 1fr 1fr; gap: 9px; }
  .metric { padding: 15px; }
  .metric strong { font-size: 23px; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .store-options { grid-template-columns: 1fr; }
  .panel-header { align-items: flex-start; flex-direction: column; }
  .panel-header .searchbar { width: 100%; max-width: none; }
  .panel-tools { width: 100%; align-items: stretch; flex-direction: column; }
  .panel-tools .searchbar { width: 100%; max-width: none; }
  .pagination { align-items: stretch; flex-direction: column; }
  .pagination-buttons { justify-content: space-between; }
  .order-intro, .order-footer { align-items: flex-start; flex-direction: column; }
  .login-page { padding: 0; place-items: stretch; }
  .login-shell { min-height: 100vh; grid-template-columns: 1fr; border-radius: 0; }
  .login-brand { min-height: 210px; padding: 24px; }
  .login-brand img { width: 135px; margin-bottom: 14px; }
  .login-brand span { display: none; }
  .login-card { padding: 34px 24px 48px; }
}
