:root {
  --ink: #17251f;
  --muted: #718078;
  --line: #e4ebe6;
  --green: #177a5c;
  --green-dark: #0d5d45;
  --mint: #e9f5ee;
  --paper: #fff;
  --shadow: 0 12px 34px rgba(24, 59, 43, .065);
}

body {
  background:
    radial-gradient(ellipse at 86% -10%, rgba(198, 231, 210, .38), transparent 32rem),
    #f5f8f6;
  color: var(--ink);
}

a { text-underline-offset: 3px; }
.site-header {
  min-height: 70px;
  border-bottom-color: rgba(219, 230, 222, .9);
  background: rgba(255, 255, 255, .94);
}
.brand { gap: 11px; font-size: 14px; letter-spacing: -.2px; }
.brand-mark {
  width: 39px;
  height: 36px;
  border-radius: 13px;
  background: linear-gradient(145deg, #208765, #0d5d45);
  box-shadow: 0 5px 12px rgba(23, 122, 92, .18);
}
.nav-links { gap: 7px; }
.nav-links a {
  padding: 10px 12px;
  border-radius: 10px;
  color: #56645d;
  font-size: 12px;
  transition: background .15s, color .15s;
}
.nav-links a:hover { background: #f0f6f2; color: var(--green-dark); }
.nav-links .nav-strong {
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--green);
  color: white;
}
.nav-links .nav-strong:hover { background: var(--green-dark); color: white; }
.user-menu { gap: 12px; font-size: 11px; }
.user-menu>span {
  max-width: 110px;
  overflow: hidden;
  padding: 7px 10px;
  border-radius: 999px;
  background: #f0f5f2;
  color: #46574e;
  text-overflow: ellipsis;
}
.user-menu>a,.link-button { color: #64736b; font-size: 11px; }
.page-shell { margin-top: 31px; margin-bottom: 62px; }
.site-footer { color: #89958e; font-size: 11px; }

.page-heading { margin-bottom: 21px; }
.page-heading h1,.auth-card h1 {
  margin: 4px 0 8px;
  font-size: clamp(25px, 3vw, 34px);
  letter-spacing: -.8px;
}
.page-heading p { max-width: 700px; }
.eyebrow { letter-spacing: 1.35px; }
.muted { font-size: 12px; }

.panel,.stat-card,.game-card,.order-card,.auth-card {
  border-color: var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.panel { padding: 23px; margin-bottom: 17px; }
.panel h2 { margin-bottom: 15px; font-size: 17px; letter-spacing: -.2px; }
.panel-heading { margin-bottom: 13px; }
.panel-heading h2 { margin: 0; }
.panel-heading>.eyebrow { margin-bottom: 5px; }
.stat-grid { gap: 13px; margin-bottom: 17px; }
.stat-card {
  min-height: 128px;
  padding: 19px 20px;
  border-radius: 17px;
  transition: transform .16s, border-color .16s, box-shadow .16s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(24, 59, 43, .1); }
.stat-card>span:first-child { color: #74837b; font-size: 11px; }
.stat-card strong { color: #1c3328; font-size: 27px; letter-spacing: -.8px; }
.stat-card>a,.stat-card>span:last-child { color: var(--green); font-size: 11px; }
.content-grid { gap: 16px; margin-bottom: 17px; }
.list-row { gap: 14px; padding: 13px 0; border-top-color: #edf1ee; }
.list-row strong { font-size: 13px; }
.list-link { border-radius: 9px; }
.list-link:hover { padding-right: 8px; padding-left: 8px; background: #f7faf8; }
.empty-state { padding: 27px 16px; border: 1px dashed #d6e3da; border-radius: 13px; background: #fbfdfb; color: #78867e; }

.button {
  min-height: 41px;
  padding: 0 15px;
  border-radius: 11px;
  font-size: 12px;
  box-shadow: none;
}
.button-primary { box-shadow: 0 5px 12px rgba(23, 122, 92, .12); }
.button:focus-visible,a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {
  outline: 3px solid rgba(37, 145, 101, .25);
  outline-offset: 2px;
}
.form-stack { gap: 15px; }
.field { gap: 7px; }
.field label { font-size: 12px; }
.field input,.field select,.field textarea,.review-note,.field>input:not([type=checkbox]) {
  min-height: 44px;
  padding: 11px 12px;
  border-color: #d9e3dc;
  border-radius: 10px;
  font-size: 13px;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 94px; }
.field input::placeholder,.field textarea::placeholder { color: #a0aaa4; }
.field small,.helptext { font-size: 11px; }
.notice { padding: 13px 15px; border-radius: 13px; font-size: 12px; }
.status-pill { padding: 5px 9px; font-size: 10px; }
.flash { border: 1px solid #d7eadf; border-radius: 12px; box-shadow: 0 7px 20px rgba(24, 59, 43, .04); }

.card-grid { gap: 14px; }
.game-card,.order-card { padding: 18px; border-radius: 16px; }
.game-card h2 { font-size: 18px; }
.game-card p { font-size: 12px; }
.order-row {
  gap: 25px;
  padding: 20px 22px;
  border-color: var(--line);
  border-radius: 17px;
  box-shadow: var(--shadow);
  transition: border-color .15s, transform .15s;
}
.order-row:hover { transform: translateY(-1px); border-color: #bfd9ca; }
.order-main h2 { margin: 9px 0 12px; font-size: 17px; }
.order-main p { font-size: 12px; }
.order-price strong { font-size: 23px; letter-spacing: -.5px; }
.detail-panel { padding: 28px; }
.detail-panel h1 { font-size: 28px; letter-spacing: -.5px; }
.detail-pair { border-color: #e9efeb; }
.result-row { border-color: #e9efeb; }
.payment-method-row { padding: 16px 0; border-color: #e9efeb; }
.ledger-amount { display: flex; flex-direction: column; gap: 4px; }
.auth-wrap { min-height: calc(100vh - 235px); }
.auth-card { width: min(460px,100%); padding: 34px; }
.auth-card>.muted { margin-bottom: 18px; }
.auth-card .field input[type=checkbox] { width: 17px; min-height: 17px; accent-color: var(--green); }
.auth-card .field:has(input[type=checkbox]) { flex-direction: row; align-items: flex-start; gap: 9px; }
.auth-card .field:has(input[type=checkbox]) label { order: 2; line-height: 1.6; }
.auth-card .field:has(input[type=checkbox]) input { order: 1; margin-top: 2px; }
.auth-switch { margin-top: 19px; font-size: 12px; }
.workflow-hero { box-shadow: 0 18px 42px rgba(20, 66, 53, .12); }
.order-cert-hint { margin: 12px 0 0; }
.verification-page { width: min(790px,100%); margin: 0 auto; }
.verification-page .back-link { display: inline-flex; margin: 0 0 14px; }
.verification-hero { min-height: 205px; }
.verification-form-card { max-width: 620px; margin: 0 auto; padding: 27px; }
.verification-status-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px;
  border: 1px solid #dce9e1;
  border-radius: 17px;
  background: #fff;
  box-shadow: var(--shadow);
}
.verification-status-card>div { flex: 1; }
.verification-status-card h2 { margin: 0 0 5px; font-size: 16px; }
.verification-status-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.verification-status-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  flex: none;
  border-radius: 14px;
  background: #fff4df;
  color: #996f27;
  font-size: 20px;
  font-weight: 800;
}
.game-cert-badge.is-pending { background: #fff4df; color: #8b6721; }
.game-cover-card.is-selected { border-color: #64ad89; box-shadow: 0 0 0 3px rgba(33, 139, 93, .12), var(--shadow); }
.dashboard-heading { align-items: end; }
.dashboard-heading h1 { font-size: 32px; }
.worker-stats .stat-card { min-height: 122px; }
.dashboard-panels>.panel { min-width: 0; margin: 0; }
.dashboard-orders { margin-top: 17px; }
.dashboard-orders .card-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.dashboard-orders .order-card { min-height: 138px; }
.wallet-history-panel .panel-heading { margin-bottom: 7px; }
.wallet-section-hint { margin: 0 0 8px; }
.wallet-row-amount { flex: 0 0 auto; white-space: nowrap; font-size: 14px; }
.wallet-withdrawal-title { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.wallet-withdrawal-title .status-paid { background: #e2f4e9; color: #21714f; }
.wallet-withdrawal-title .status-rejected { background: #fdecec; color: #a23838; }
.wallet-income-row {
  display: grid;
  grid-template-columns: 30px minmax(0,1fr) max-content;
  grid-template-areas: "mark info amount";
  align-items: center;
  gap: 13px;
  padding: 14px 0;
  border-top: 1px solid #edf1ee;
}
.wallet-income-mark {
  grid-area: mark;
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 50%;
  background: #e7f4ee;
  color: #167c62;
  font-size: 14px;
  font-weight: 800;
}
.wallet-income-info,.wallet-withdrawal-info { display: flex; min-width: 0; flex-direction: column; gap: 5px; }
.wallet-income-info { grid-area: info; }
.wallet-income-info .wallet-file-name { overflow-wrap: anywhere; color: #283831; font-size: 13px; line-height: 1.5; }
.wallet-income-info .muted,.wallet-withdrawal-info .muted { font-size: 11px; }
.wallet-income-amount,.wallet-withdrawal-amount { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; white-space: nowrap; }
.wallet-income-amount { grid-area: amount; }
.wallet-income-amount span,.wallet-withdrawal-amount span { color: #7c8982; font-size: 10px; }
.wallet-income-amount strong { color: #167c62; font-size: 15px; }
.wallet-withdrawal-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) 130px;
  align-items: center;
  gap: 18px;
  margin-top: 10px;
  padding: 16px 17px;
  border: 1px solid #e8eeea;
  border-radius: 13px;
  background: #fbfdfb;
}
.wallet-withdrawal-title strong { color: #283831; }
.wallet-withdrawal-amount { padding-left: 14px; border-left: 1px solid #e7ece8; }
.wallet-withdrawal-amount strong { color: #26382f; font-size: 17px; }

@media (max-width: 1000px) {
  .site-header { gap: 15px; }
  .nav-links { gap: 3px; }
  .nav-links a { padding-inline: 9px; }
  .dashboard-orders .card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .site-header { min-height: 0; gap: 8px; padding: 12px 15px 10px; }
  .brand { width: auto; min-height: 38px; }
  .brand-mark { width: 35px; height: 33px; }
  .user-menu { top: 14px; right: 14px; gap: 8px; }
  .user-menu>span { max-width: 75px; padding: 6px 8px; }
  .user-menu>a { display: none; }
  .nav-links { gap: 4px; padding: 8px 0 2px; }
  .nav-links a { padding: 8px 10px; font-size: 11px; }
  .page-shell { width: calc(100% - 28px); margin: 21px auto 42px; }
  .page-heading { gap: 12px; margin-bottom: 17px; }
  .page-heading h1,.dashboard-heading h1 { font-size: 26px; }
  .panel { padding: 18px; border-radius: 15px; }
  .stat-grid { gap: 9px; }
  .stat-card { min-height: 112px; padding: 14px; border-radius: 14px; }
  .stat-card strong { font-size: 21px; }
  .content-grid { gap: 12px; }
  .order-row { flex-direction: column; gap: 13px; padding: 16px; }
  .order-price { width: 100%; flex-direction: row; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid #edf1ee; }
  .order-price span { margin: 0 auto 0 0; }
  .order-price strong { font-size: 19px; }
  .detail-panel { padding: 20px; }
  .detail-panel h1 { font-size: 24px; }
  .dashboard-orders .card-grid { grid-template-columns: 1fr; }
  .dashboard-orders .order-card { min-height: 0; }
  .auth-card { padding: 25px 21px; }
  .verification-form-card { padding: 19px; }
  .verification-status-card { align-items: flex-start; flex-wrap: wrap; padding: 17px; }
  .verification-status-card>div { min-width: calc(100% - 58px); }
  .verification-status-card>.button { width: 100%; }
  .wallet-income-row {
    grid-template-columns: 28px minmax(0,1fr);
    grid-template-areas: "mark info" "mark amount";
    align-items: start;
    gap: 8px 11px;
  }
  .wallet-income-amount { flex-direction: row; align-items: center; justify-content: space-between; }
  .wallet-withdrawal-row { grid-template-columns: minmax(0,1fr); gap: 12px; padding: 14px; }
  .wallet-withdrawal-amount { flex-direction: row; align-items: center; justify-content: space-between; padding: 10px 0 0; border-left: 0; border-top: 1px solid #e7ece8; }
}
