:root {
  --ink: #102a2b;
  --muted: #667778;
  --paper: #f3f1eb;
  --card: #fffefa;
  --line: #d9ddd7;
  --teal: #0b5d5e;
  --teal-dark: #073f40;
  --orange: #e8792e;
  --success: #1f7a51;
  --warning: #9a6614;
  --danger: #b33a36;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 90% 0, #dde8df 0, transparent 34rem), var(--paper); }
a { color: inherit; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.topbar { background: var(--teal-dark); color: #fff; border-bottom: 4px solid var(--orange); }
.topbar__inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand__mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: var(--orange); font-size: 23px; font-weight: 900; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 18px; letter-spacing: .01em; }
.brand small { color: #c9d9d6; margin-top: 2px; }
.nav { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px 20px; }
.nav a, .nav__button { color: #e7f0ee; font: inherit; font-weight: 650; text-decoration: none; background: none; border: 0; padding: 7px 0; cursor: pointer; }
.nav a:hover, .nav__button:hover { color: #fff; text-decoration: underline; text-underline-offset: 5px; }
.nav form { margin: 0; }
.page { padding: 42px 0 70px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-size: clamp(32px, 5vw, 54px); line-height: 1.03; letter-spacing: -.04em; }
h2 { margin-bottom: 0; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.025em; }
h3 { margin: 0 0 14px; font-size: 19px; }
.eyebrow { margin-bottom: 9px; color: var(--orange); font-size: 12px; font-weight: 900; letter-spacing: .14em; }
.lead { max-width: 720px; margin-bottom: 0; color: var(--muted); font-size: 17px; line-height: 1.55; }
.hero { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 34px 0 28px; }
.hero--compact { padding-top: 12px; }
.balance { min-width: 170px; padding: 20px 24px; border-radius: 18px; background: var(--teal); color: #fff; box-shadow: 0 16px 36px rgb(7 63 64 / 18%); }
.balance span, .balance small { display: block; color: #d7e9e6; }
.balance strong { display: inline-block; margin: 3px 7px 0 0; font-size: 46px; line-height: 1; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0 0 24px; }
.stats article { padding: 18px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.stats span, .stats strong { display: block; }
.stats span { margin-bottom: 6px; color: var(--muted); font-size: 13px; }
.stats strong { font-size: 22px; }
.panel, .auth-card { margin: 24px 0; padding: clamp(20px, 4vw, 34px); background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 10px 28px rgb(16 42 43 / 7%); }
.panel { scroll-margin-top: 18px; }
.panel__heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.cost, .reward { padding: 8px 11px; border-radius: 999px; font-size: 13px; font-weight: 800; white-space: nowrap; }
.cost { color: var(--teal); background: #e4f0ed; }
.reward { color: var(--success); background: #e4f3e9; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.field > span, .file-field > span { font-size: 14px; font-weight: 750; }
.field small, .muted, .empty { color: var(--muted); line-height: 1.45; }
input, textarea { width: 100%; border: 1px solid #bdc8c5; border-radius: 10px; background: #fff; color: var(--ink); font: inherit; padding: 12px 13px; outline: none; }
input:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgb(11 93 94 / 12%); }
textarea { resize: vertical; line-height: 1.5; }
.form-actions { display: flex; align-items: center; gap: 18px; padding-top: 3px; }
.form-actions p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.primary, .secondary { appearance: none; border: 0; border-radius: 10px; cursor: pointer; font: inherit; font-weight: 800; text-align: center; }
.primary { padding: 13px 18px; color: #fff; background: var(--teal); box-shadow: 0 7px 16px rgb(11 93 94 / 18%); }
.primary:hover { background: var(--teal-dark); }
.primary:disabled { opacity: .66; cursor: wait; }
.primary--link { display: inline-block; text-decoration: none; }
.secondary { padding: 10px 14px; color: var(--teal); background: #e4f0ed; }
.upload-form { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 16px; }
.file-field { display: grid; gap: 8px; }
.file-field input { padding: 10px; background: #f8faf7; }
.notice { margin: 0 0 18px; padding: 14px 16px; border-radius: 11px; border: 1px solid; line-height: 1.45; }
.notice--success { color: #145f3e; border-color: #a9d3b8; background: #e8f6ed; }
.notice--warning { color: #7a500e; border-color: #e2ca99; background: #fff7df; }
.notice--error { color: #8f2d2a; border-color: #e0aaa8; background: #fff0ef; }
.auth-card { width: min(520px, 100%); margin: 44px auto; }
.auth-card .lead { margin-bottom: 25px; }
.stack { display: grid; gap: 17px; }
.permissions { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.permissions legend { padding: 0 6px; font-size: 14px; font-weight: 800; }
.permissions label { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 650; }
.permissions input { width: 18px; height: 18px; margin: 0; accent-color: var(--teal); }
.permissions--stack { display: grid; gap: 9px; padding: 0; border: 0; }
.user-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.user-card { display: grid; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: #fafbf7; }
.user-card__heading, .user-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.user-card__heading strong, .user-card__heading span { display: block; }
.user-card__heading strong { font-size: 20px; }
.user-card__heading span, .user-card__footer span { color: var(--muted); font-size: 13px; }
.user-points { text-align: right; }
.user-points b { display: block; font-size: 24px; }
.user-points small { color: var(--muted); }
.history-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { padding: 9px; color: var(--muted); font-size: 11px; text-align: left; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--line); }
td { padding: 11px 9px; vertical-align: top; border-bottom: 1px solid #e8ebe6; }
td small { display: block; margin-top: 3px; color: var(--muted); }
.badge { display: inline-block; padding: 5px 8px; border-radius: 999px; color: var(--warning); background: #fff2d4; font-size: 12px; font-weight: 800; white-space: nowrap; }
.badge--completed, .badge--awarded { color: var(--success); background: #e4f3e9; }
.badge--rejected { color: var(--danger); background: #fae5e4; }

.document-signing-option { display:flex; align-items:center; gap:12px; padding:14px 16px; margin:8px 0 16px; border:1px solid #cbd5e1; border-radius:8px; background:#f8fafc; cursor:pointer; }
.document-signing-option input[type=checkbox] { width:20px; height:20px; min-height:20px; flex:0 0 20px; margin:0; padding:0; accent-color:#315c89; }
.document-signing-option span { font-weight:600; line-height:1.5; }
.document-signing-option small { display:block; color:#64748b; font-weight:400; font-size:13px; }
.document-signing-option:focus-within { outline:2px solid #477bc7; outline-offset:2px; }

@media (max-width: 800px) {
  .topbar__inner, .hero, .panel__heading, .form-actions { align-items: stretch; flex-direction: column; }
  .topbar__inner { padding: 15px 0; }
  .nav { justify-content: flex-start; }
  .balance { width: 100%; }
  .stats, .history-grid, .user-list, .form-grid { grid-template-columns: 1fr; }
  .field--wide { grid-column: auto; }
  .upload-form { grid-template-columns: 1fr; }
  .cost, .reward { align-self: flex-start; }
}

@media (max-width: 480px) {
  .container { width: min(100% - 20px, 1180px); }
  .page { padding-top: 24px; }
  .panel, .auth-card { border-radius: 14px; }
  .nav { gap: 4px 13px; }
}
