:root {
  --ink: #10201d;
  --deep: #0d1716;
  --deep-2: #182622;
  --paper: #f4f2ea;
  --white: #fffef9;
  --lime: #d8ff4f;
  --lime-dark: #bddd39;
  --muted: #6c7773;
  --line: #dcded5;
  --danger: #ba493b;
  --sand: #f2ead0;
  --radius: 22px;
  --shadow: 0 22px 65px rgba(13, 23, 22, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.access-gate { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at top left, #263b35 0, var(--deep) 42%, #07100e 100%); }
.access-card { width: min(100%, 460px); padding: 34px; border: 1px solid rgba(255,255,255,.12); border-radius: 26px; background: var(--white); box-shadow: 0 30px 90px rgba(0,0,0,.35); }
.access-brand { width: fit-content; margin-bottom: 34px; color: var(--deep); }
.access-brand em { color: #6f8719; }
.access-card h1 { max-width: 380px; font-size: clamp(30px, 7vw, 46px); }
.access-card > p:not(.eyebrow):not(.access-error) { margin: 16px 0 24px; color: var(--muted); font-size: 13px; }
.access-card label + label { margin-top: 14px; }
.access-card .primary { margin-top: 18px; }
.access-card > small { display: block; margin-top: 15px; color: var(--muted); text-align: center; font-size: 10px; }
.access-error { margin: 12px 0 0 !important; color: var(--danger) !important; font-size: 11px !important; font-weight: 800; }
.account-logout { margin: 8px 0 0 auto; padding: 0; border: 0; border-bottom: 1px solid #a7afab; background: transparent; color: #59645f; font-size: 9px; }

.loading-screen { position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; place-items: center; gap: 12px; background: var(--deep); color: white; transition: opacity .25s; }
.loading-screen.done { opacity: 0; pointer-events: none; }
.loader-mark { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; background: var(--lime); color: var(--deep); font-weight: 900; animation: pulse 1.2s infinite; }
.loading-screen p { margin: 0; color: #a8b4b0; font-size: 13px; }
@keyframes pulse { 50% { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(216, 255, 79, .16); } }

.sidebar { position: fixed; inset: 0 auto 0 0; width: 246px; padding: 28px 22px; background: var(--deep); color: white; display: flex; flex-direction: column; z-index: 20; }
.brand { color: white; display: flex; align-items: center; gap: 12px; text-decoration: none; line-height: 1; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: var(--lime); color: var(--deep); font-size: 23px; font-weight: 900; }
.brand b { display: block; font-size: 16px; letter-spacing: -.04em; }
.brand em { display: block; margin-top: 3px; color: var(--lime); font-size: 12px; font-style: normal; font-weight: 800; }
.side-nav { display: grid; gap: 8px; margin-top: 68px; }
.nav-item { border: 0; background: transparent; color: #aeb9b5; text-align: left; padding: 12px 10px; border-radius: 12px; transition: .2s; }
.nav-item span { margin-right: 8px; color: #687470; font-size: 10px; }
.nav-item:hover, .nav-item.active { background: #1a2926; color: white; }
.side-card { margin-top: auto; padding: 17px; border: 1px solid #31423e; border-radius: 18px; }
.side-card p { margin: 9px 0; font-size: 12px; line-height: 1.5; }
.side-card small { color: #87948f; font-size: 10px; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 5px rgba(216, 255, 79, .1); }

main { margin-left: 246px; min-width: 0; }
.topbar { min-height: 188px; padding: 44px clamp(26px, 5vw, 70px) 30px; display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; }
.eyebrow { margin: 0 0 9px; color: #74817d; text-transform: uppercase; letter-spacing: .14em; font-size: 10px; font-weight: 900; }
h1, h2 { margin: 0; letter-spacing: -.045em; line-height: 1.05; }
h1 { max-width: 780px; font-size: clamp(32px, 4.1vw, 57px); }
h2 { font-size: clamp(25px, 2.5vw, 38px); }
h3 { margin: 0; font-size: 17px; }
p { line-height: 1.55; }
.account-box { min-width: 180px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 254, 249, .7); text-align: right; }
.account-box span, .account-box small { display: block; }
.account-box span { font-size: 12px; font-weight: 800; }
.account-box small { margin-top: 3px; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }

.role-bar { padding: 0 clamp(26px, 5vw, 70px) 22px; display: flex; align-items: center; gap: 13px; }
.role-bar > span { color: var(--muted); font-size: 11px; font-weight: 800; }
.role-switch { display: flex; gap: 4px; padding: 4px; border-radius: 13px; background: #e5e5dd; }
.role-btn { border: 0; padding: 10px 15px; border-radius: 9px; background: transparent; color: #59645f; font-size: 11px; font-weight: 850; }
.role-btn.active { background: var(--deep); color: white; box-shadow: 0 6px 16px rgba(13, 23, 22, .17); }

.truth-strip { padding: 26px clamp(26px, 5vw, 70px); display: flex; align-items: center; justify-content: space-between; gap: 42px; background: var(--deep); color: white; }
.truth-strip > div:first-child { max-width: 540px; }
.truth-strip p { margin: 6px 0 0; color: #c3ceca; font-size: 13px; }
.kicker { color: var(--lime); text-transform: uppercase; letter-spacing: .14em; font-size: 9px; font-weight: 900; }
.truth-numbers { display: flex; align-items: center; gap: 17px; }
.truth-numbers div { min-width: 115px; }
.truth-numbers small, .truth-numbers strong { display: block; }
.truth-numbers small { color: #899691; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.truth-numbers strong { margin-top: 4px; font-size: 18px; }
.truth-numbers i { color: #61706b; font-style: normal; }
.truth-numbers .accent-number strong { color: var(--lime); font-size: 23px; }

#workspace, .rules-section, .reviews-section { padding: 50px clamp(26px, 5vw, 70px); }
.section-heading { margin-bottom: 24px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.status-chip { display: inline-flex; align-items: center; width: fit-content; padding: 8px 12px; border-radius: 999px; font-size: 10px; font-weight: 850; white-space: nowrap; }
.status-chip.lime { background: var(--lime); color: var(--ink); }
.status-chip.sand { background: var(--sand); color: #705a12; }
.status-chip.dark { background: var(--deep); color: white; }
.status-chip.ok { background: #d9efe4; color: #15553b; }
.status-chip.bad { background: #f5d9d4; color: #7d2c22; }

.workspace-grid, .driver-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(350px, .95fr); gap: 20px; align-items: start; }
.panel { padding: 25px; border: 1px solid rgba(16, 32, 29, .08); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); }
.panel-title { display: flex; align-items: center; gap: 13px; margin-bottom: 22px; }
.panel-title > div { flex: 1; }
.panel-title p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.panel-title .status-chip { margin-left: auto; }
.step-index { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 12px; background: var(--deep); color: var(--lime); font-weight: 900; }
.flow-panel { margin-top: 20px; }

.form-grid { display: grid; gap: 15px; }
label { display: grid; gap: 7px; color: #65716d; font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: .055em; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px; outline: none; background: #fbfaf5; color: var(--ink); font-size: 13px; text-transform: none; letter-spacing: normal; transition: .2s; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #91ad27; box-shadow: 0 0 0 3px rgba(216, 255, 79, .25); }
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.three-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.input-unit { position: relative; display: block; }
.input-unit input { padding-right: 42px; }
.input-unit > b { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-unit.large input { font-size: 22px; font-weight: 850; }
.check-line { min-height: 52px; padding: 12px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; background: #faf9f4; color: var(--ink); text-transform: none; letter-spacing: normal; }
.check-line input { width: 17px; height: 17px; accent-color: #789218; }
.primary, .secondary, .outline-button { border-radius: 12px; padding: 13px 15px; border: 0; font-size: 11px; font-weight: 850; transition: .18s; }
.primary { background: var(--lime); color: var(--ink); }
.primary:hover { background: var(--lime-dark); transform: translateY(-1px); }
.secondary { background: var(--deep); color: white; }
.secondary:hover { background: #263430; }
.outline-button { border: 1px solid #b9c0b7; background: transparent; color: var(--ink); }
.outline-button:hover { border-color: var(--ink); }
button:disabled { opacity: .48; cursor: not-allowed; transform: none !important; }
.wide { width: 100%; }
.form-note { margin: -3px 0 0; color: var(--muted); text-align: center; font-size: 10px; }
.text-button { padding: 4px 0; border: 0; border-bottom: 1px solid currentColor; background: transparent; color: #586560; font-size: 10px; font-weight: 800; }

.bid-list { display: grid; gap: 12px; }
.bid-card { padding: 15px; border: 1px solid var(--line); border-radius: 17px; transition: .2s; }
.bid-card:hover { border-color: #abb77b; transform: translateY(-1px); }
.bid-card.selected { border-color: #89a829; box-shadow: 0 0 0 3px rgba(216, 255, 79, .25); }
.bid-head { display: flex; align-items: center; gap: 10px; }
.avatar { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border-radius: 13px; background: #e3e6dc; font-size: 12px; font-weight: 900; }
.driver-name { min-width: 0; flex: 1; }
.driver-name b, .driver-name span { display: block; }
.driver-name b { font-size: 12px; }
.driver-name span { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.bid-price { text-align: right; }
.bid-price strong, .bid-price small { display: block; }
.bid-price strong { font-size: 17px; }
.bid-price small { color: var(--muted); font-size: 9px; }
.bid-comment { margin: 12px 0; padding: 10px 12px; border-radius: 10px; background: #f3f3ec; color: #4e5b57; font-size: 10px; }
.bid-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bid-footer small { color: var(--muted); font-size: 9px; }
.bid-footer button { border: 0; border-bottom: 1px solid var(--ink); background: transparent; font-size: 10px; font-weight: 850; }
.empty-state { min-height: 130px; display: grid; place-items: center; padding: 24px; border: 1px dashed #c8cdc3; border-radius: 16px; background: #faf9f4; color: var(--muted); text-align: center; font-size: 11px; }

.payment-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 18px; }
.money-flow { padding: 21px; display: grid; grid-template-columns: 1fr auto 1.2fr auto 1fr; align-items: center; gap: 12px; border-radius: 18px; background: var(--deep); color: white; }
.money-flow small, .money-flow strong, .money-flow span { display: block; }
.money-flow small { color: #8e9b96; font-size: 8px; text-transform: uppercase; letter-spacing: .08em; }
.money-flow strong { margin: 6px 0 3px; color: var(--lime); font-size: 16px; }
.money-flow span { color: #a7b2ae; font-size: 9px; }
.money-flow i { color: #64736e; font-style: normal; }
.money-flow .vault { padding: 14px; border: 1px solid #344640; border-radius: 14px; text-align: center; }
.payment-action { padding: 18px; display: grid; align-content: center; gap: 10px; border-radius: 18px; background: #eff0e8; }
.payment-action p { margin: 0; color: #4e5a56; font-size: 10px; }
.payment-action small { color: var(--muted); text-align: center; font-size: 9px; }

.progress-line { margin: 20px 0 28px; display: grid; grid-template-columns: repeat(5, 1fr); }
.progress-step { position: relative; color: #9ba49f; text-align: center; font-size: 9px; font-weight: 750; }
.progress-step::before { content: ''; position: relative; z-index: 2; width: 16px; height: 16px; display: block; margin: 0 auto 7px; border: 4px solid var(--white); border-radius: 50%; background: #d9ddd7; box-shadow: 0 0 0 1px #c9cec8; }
.progress-step::after { content: ''; position: absolute; top: 8px; left: -50%; width: 100%; height: 2px; background: #d9ddd7; }
.progress-step:first-child::after { display: none; }
.progress-step.done { color: var(--ink); }
.progress-step.done::before { background: var(--lime); box-shadow: 0 0 0 1px #9db72d; }
.progress-step.done::after { background: #a7c82e; }
.delivery-proof { padding: 18px 21px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-radius: 17px; background: var(--deep); color: white; }
.delivery-proof small { color: #a5b1ad; font-size: 8px; text-transform: uppercase; letter-spacing: .1em; }
.delivery-proof strong { display: block; color: var(--lime); font-size: 28px; letter-spacing: .15em; }
.delivery-proof p { margin: 2px 0 0; color: #a5b1ad; font-size: 9px; }

.job-topline { display: flex; justify-content: space-between; align-items: center; }
.job-topline small { color: var(--muted); font-size: 9px; }
.job-card h3 { margin: 21px 0 15px; font-size: 20px; letter-spacing: -.025em; }
.job-facts { margin: 0 0 20px; display: grid; gap: 9px; }
.job-facts div { padding-bottom: 9px; display: grid; grid-template-columns: 120px 1fr; gap: 10px; border-bottom: 1px solid #ecece5; }
.job-facts dt { color: var(--muted); font-size: 9px; }
.job-facts dd { margin: 0; font-size: 10px; font-weight: 750; }
.bid-form { display: grid; gap: 14px; }
.money-breakdown { padding: 14px; display: grid; gap: 9px; border-radius: 15px; background: #f0f1e9; }
.money-breakdown div { display: flex; justify-content: space-between; color: #69746f; font-size: 10px; }
.money-breakdown .money-total { padding-top: 9px; border-top: 1px solid #ced3c9; color: var(--ink); font-size: 13px; }
.money-total b { color: #587000; font-size: 17px; }

.metric-grid { margin-bottom: 20px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }
.metric-card { padding: 20px; border-radius: 18px; background: var(--deep); color: white; }
.metric-card small, .metric-card strong, .metric-card span { display: block; }
.metric-card small { color: #8f9c97; text-transform: uppercase; letter-spacing: .09em; font-size: 8px; }
.metric-card strong { margin: 7px 0 3px; color: var(--lime); font-size: 27px; }
.metric-card span { color: #9ba6a2; font-size: 9px; }
.admin-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 20px; align-items: start; }
.detail-box { min-height: 75px; padding: 14px; border-radius: 14px; background: #f3f3ec; color: #4e5b57; font-size: 10px; line-height: 1.7; }
.button-row { margin-top: 13px; display: flex; gap: 8px; }
.button-row > * { flex: 1; }
.evidence-list { margin: 5px 0 15px; display: grid; }
.evidence-list div { padding: 10px 0; display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid #e4e5dd; font-size: 10px; }
.evidence-list span { color: var(--muted); }
.decision-note { padding: 11px 13px; border-left: 3px solid var(--lime-dark); background: #f3f3ec; color: #53605b; font-size: 10px; }

.rules-section { background: #e9e8df; }
.rule-grid, .review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.rule-grid article, .review-card { padding: 22px; border: 1px solid rgba(16, 32, 29, .08); border-radius: 19px; background: var(--white); }
.rule-grid article > span { color: #849d21; font-size: 10px; font-weight: 900; }
.rule-grid h3 { margin-top: 25px; }
.rule-grid p { margin-bottom: 0; color: var(--muted); font-size: 11px; }
.review-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.review-meta b { font-size: 12px; }
.verified-badge { color: #5e7415; font-size: 9px; font-weight: 800; }
.stars { margin: 15px 0 8px; color: #738b17; letter-spacing: .08em; }
.review-card p { margin: 0 0 14px; font-size: 11px; }
.review-card small { color: var(--muted); font-size: 9px; }

footer { padding: 28px clamp(26px, 5vw, 70px); display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid #d9d9d0; }
footer b, footer span, footer small { display: block; }
footer b { font-size: 13px; }
footer span { margin-top: 3px; color: var(--muted); font-size: 9px; }
footer small { max-width: 760px; margin-top: 8px; color: #79837f; font-size: 8px; line-height: 1.55; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 90; max-width: 360px; padding: 13px 16px; border-radius: 13px; background: var(--deep); color: white; box-shadow: 0 18px 45px rgba(13, 23, 22, .25); font-size: 11px; opacity: 0; transform: translateY(15px); pointer-events: none; transition: .25s; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: #782f27; }

@media (max-width: 1100px) {
  .truth-strip { align-items: flex-start; flex-direction: column; }
  .workspace-grid, .driver-grid, .admin-grid, .payment-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .sidebar { position: static; width: auto; padding: 17px 19px; flex-direction: row; align-items: center; justify-content: space-between; }
  .side-nav, .side-card { display: none; }
  main { margin-left: 0; }
  .topbar { min-height: auto; padding: 32px 19px 22px; align-items: flex-start; flex-direction: column; }
  .account-box { width: 100%; text-align: left; }
  .role-bar { padding: 0 19px 18px; align-items: flex-start; flex-direction: column; }
  .role-switch { width: 100%; overflow-x: auto; }
  .role-btn { flex: 1; }
  .truth-strip, #workspace, .rules-section, .reviews-section { padding: 34px 19px; }
  .truth-numbers { width: 100%; gap: 8px; justify-content: space-between; }
  .truth-numbers div { min-width: 0; }
  .truth-numbers strong, .truth-numbers .accent-number strong { font-size: 15px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .two-cols, .three-cols, .rule-grid, .review-grid { grid-template-columns: 1fr; }
  .money-flow { grid-template-columns: 1fr; text-align: center; }
  .money-flow i { transform: rotate(90deg); }
  .progress-step span { display: none; }
  .delivery-proof { align-items: stretch; flex-direction: column; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .button-row { flex-direction: column; }
  footer { padding: 25px 19px; align-items: flex-start; flex-direction: column; }
}
