:root {
  --paper: #fafaf7;
  --paper-alt: #f3f2ec;
  --white: #fff;
  --ink: #12181f;
  --muted: #5c6672;
  --blue: #2b54e8;
  --blue-dark: #1e3fbf;
  --line: #e4e2da;
  --line-strong: #c9c7bc;
  --green: #0c8a4d;
  --red: #b42318;
  --amber: #8a5a00;
  --head: "Bricolage Grotesque", "Arial Black", sans-serif;
  --body: "Instrument Sans", Arial, sans-serif;
  --mono: "Spline Sans Mono", monospace;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body { margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--body); }
a { color: var(--blue); text-underline-offset: 3px; }
button, input, textarea { font: inherit; }
:focus-visible { outline: 3px solid rgba(43, 84, 232, .28); outline-offset: 2px; }
.portal-container { width: min(1140px, calc(100% - 40px)); margin: 0 auto; }
.portal-header { border-bottom: 1px solid var(--line); background: rgba(250, 250, 247, .94); }
.portal-nav { min-height: 74px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.portal-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 800 21px var(--head); }
.portal-brand img { width: 38px; height: 38px; object-fit: contain; }
.portal-brand b { color: var(--blue); }
.portal-account { display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: 14px; }
.portal-account a { color: var(--ink); font-weight: 600; }
.portal-main { min-height: calc(100vh - 135px); }
.portal-footer { padding: 20px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.eyebrow { margin-bottom: 12px; color: var(--blue); font: 600 12px var(--mono); letter-spacing: .14em; }
h1, h2, h3 { margin-top: 0; font-family: var(--head); line-height: 1.1; }
h1 { margin-bottom: 14px; font-size: clamp(38px, 5vw, 58px); letter-spacing: -.035em; }
h2 { margin-bottom: 5px; font-size: 24px; }
p { color: var(--muted); }
.button { display: inline-flex; min-height: 50px; align-items: center; justify-content: center; padding: 12px 22px; border: 0; border-radius: 9px; font-family: var(--head); font-weight: 700; text-decoration: none; cursor: pointer; transition: .15s ease; }
.button-primary { background: var(--blue); color: white; box-shadow: 0 7px 18px rgba(43, 84, 232, .15); }
.button-primary:hover { background: var(--blue-dark); transform: translateY(-1px); }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.button-full { width: 100%; }
.notice { margin: 18px 0; padding: 13px 15px; border: 1px solid; border-radius: 9px; font-size: 14px; }
.notice-error { color: var(--red); border-color: #f1b9b4; background: #fff2f0; }
.notice-warning { color: var(--amber); border-color: #ead49b; background: #fff8df; }
.notice-success { color: #087443; border-color: #9fd7bc; background: #effaf4; }
.notice-info { color: #2146c0; border-color: #b8c5f8; background: #f1f4ff; }
.login-page { background: radial-gradient(circle at 15% 15%, #eef1fd 0, transparent 32%), var(--paper); }
.login-wrap { display: grid; min-height: calc(100vh - 135px); place-items: center; padding: 64px 0; }
.login-card { width: min(100%, 510px); padding: clamp(28px, 5vw, 52px); border: 1px solid var(--line); border-radius: 18px; background: var(--white); box-shadow: 0 24px 60px rgba(18, 24, 31, .09); }
.login-card h1 { font-size: clamp(35px, 6vw, 48px); }
.login-card > p { margin: 0 0 28px; }
.login-help { margin: 20px 0 0 !important; text-align: center; font-size: 13px; }
.portal-form { display: flex; flex-direction: column; gap: 10px; }
.portal-form label, .portal-form legend { color: var(--ink); font-weight: 600; }
.portal-form input[type="text"], .portal-form input[type="password"], .portal-form input[type="url"], .portal-form textarea { width: 100%; margin-bottom: 10px; padding: 13px 14px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--white); color: var(--ink); }
.portal-form textarea { resize: vertical; min-height: 160px; }
.portal-form input:focus, .portal-form textarea:focus { border-color: var(--blue); outline: 3px solid rgba(43, 84, 232, .12); }
.dashboard { padding: 58px 0 80px; }
.dashboard-intro { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 36px; }
.dashboard-intro > div:first-child { max-width: 720px; }
.dashboard-intro h1 { margin-bottom: 8px; }
.dashboard-intro p { margin: 0; font-size: 18px; }
.price-card { min-width: 200px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.price-card span, .price-card small { display: block; color: var(--muted); }
.price-card span { font: 600 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.price-card strong { display: block; margin: 2px 0; font: 800 34px var(--head); }
.price-card small { font-size: 12px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, .7fr); gap: 24px; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: 14px; background: var(--white); box-shadow: 0 12px 35px rgba(18, 24, 31, .045); }
.request-panel { padding: clamp(24px, 4vw, 38px); }
.history-panel { overflow: hidden; }
.panel-heading { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 30px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.panel-heading.compact { margin: 0; padding: 24px; }
.panel-heading p { margin: 0; font-size: 14px; }
.step-number { display: grid; flex: 0 0 34px; height: 34px; place-items: center; border-radius: 50%; background: var(--ink); color: white; font: 600 11px var(--mono); }
fieldset { min-width: 0; margin: 0 0 15px; padding: 0; border: 0; }
legend { margin-bottom: 10px; }
.type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.type-option { position: relative; cursor: pointer; }
.type-option input { position: absolute; opacity: 0; }
.type-option span { display: flex; min-height: 116px; flex-direction: column; padding: 15px; border: 1px solid var(--line-strong); border-radius: 9px; transition: .15s ease; }
.type-option b { margin-bottom: 5px; font-family: var(--head); }
.type-option small { color: var(--muted); font-weight: 400; line-height: 1.35; }
.type-option input:checked + span { border-color: var(--blue); background: #f2f4ff; box-shadow: inset 0 0 0 1px var(--blue); }
.type-option input:focus-visible + span { outline: 3px solid rgba(43, 84, 232, .25); }
.optional { color: var(--muted); font-size: 12px; font-weight: 400; }
.form-note { margin-top: -6px; color: var(--muted); font-size: 12px; }
.checkout-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.checkout-row span { display: block; color: var(--muted); font-size: 12px; }
.checkout-row strong { font: 700 19px var(--head); }
.empty-state { padding: 38px 24px; text-align: center; }
.empty-state p { margin: 4px 0 0; font-size: 14px; }
.request-list { max-height: 700px; overflow: auto; }
.request-item { padding: 20px 24px; border-top: 1px solid var(--line); }
.request-item:first-child { border-top: 0; }
.request-item-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.request-item time { color: var(--muted); font-size: 11px; }
.request-item h3 { margin: 12px 0 4px; font-size: 17px; }
.request-item > a { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.request-item .resume-link { margin-top: 12px; font-size: 13px; font-weight: 600; }
.status { display: inline-block; padding: 4px 7px; border-radius: 4px; background: var(--paper-alt); color: var(--muted); font: 600 9px var(--mono); letter-spacing: .04em; text-transform: uppercase; }
.status-submitted { background: #e9f8f0; color: var(--green); }
.status-paid { background: #fff8df; color: var(--amber); }
.result-wrap { display: grid; min-height: calc(100vh - 135px); place-items: center; padding: 60px 0; }
.result-card { width: min(100%, 620px); padding: clamp(35px, 7vw, 68px); border: 1px solid var(--line); border-radius: 18px; background: var(--white); text-align: center; box-shadow: 0 24px 60px rgba(18, 24, 31, .08); }
.result-card h1 { font-size: clamp(38px, 6vw, 52px); }
.result-card > p { margin: 0 auto 28px; max-width: 460px; font-size: 18px; }
.result-icon { display: grid; width: 62px; height: 62px; margin: 0 auto 22px; place-items: center; border-radius: 50%; background: #e9f8f0; color: var(--green); font: 800 31px var(--head); }
.result-pending .result-icon { background: #fff8df; color: var(--amber); }

@media (max-width: 850px) {
  .dashboard-intro { align-items: stretch; flex-direction: column; }
  .price-card { width: 100%; }
  .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .portal-container { width: min(100% - 24px, 1140px); }
  .portal-account span { display: none; }
  .dashboard { padding-top: 36px; }
  .type-grid { grid-template-columns: 1fr; }
  .type-option span { min-height: 0; }
  .checkout-row { align-items: stretch; flex-direction: column; }
  .checkout-row .button { width: 100%; }
}
