:root {
  --paper: #f1efec;
  --surface: rgba(249, 247, 243, .82);
  --surface-strong: #f8f6f2;
  --ink: #4d4b47;
  --muted: #85817b;
  --line: rgba(77, 73, 67, .13);
  --line-strong: rgba(77, 73, 67, .24);
  --dark: #575550;
  --success: #3f7960;
  --danger: #a1473f;
  --shadow: 0 30px 80px rgba(71, 66, 59, .10);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 4%, rgba(255, 255, 255, .95), transparent 34%),
    linear-gradient(155deg, #f4f2ee 0%, #ece9e4 100%);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
.hidden { display: none !important; }

.account-container { width: min(1240px, calc(100% - 48px)); margin: 0 auto; }
.account-header {
  position: sticky;
  z-index: 20;
  top: 0;
  height: 82px;
  border-bottom: 1px solid rgba(77, 73, 67, .07);
  background: rgba(242, 240, 236, .87);
  backdrop-filter: blur(22px);
}
.account-header-inner { height: 100%; display: flex; align-items: center; gap: 42px; }
.account-brand { display: flex; width: 48px; align-items: center; }
.account-brand img { display: block; width: 100%; height: auto; }
.account-header nav { display: flex; align-items: center; gap: 28px; color: #77736d; font-size: 14px; }
.account-header nav a:hover { color: #3f3d39; }
.icon-button {
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, .42);
}

.account-main { padding: clamp(52px, 8vw, 116px) 0 90px; }
.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, .72fr);
  gap: clamp(42px, 8vw, 110px);
  align-items: center;
  min-height: calc(100vh - 250px);
}
.auth-copy { max-width: 690px; }
.eyebrow {
  display: block;
  margin-bottom: 20px;
  color: #8f8a83;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .28em;
  text-transform: uppercase;
}
.auth-copy h1, .dashboard-head h1 {
  margin: 0;
  color: #4a4844;
  font-size: clamp(42px, 5.8vw, 82px);
  font-weight: 320;
  letter-spacing: -.055em;
  line-height: .98;
}
.auth-copy > p, .dashboard-head p {
  max-width: 590px;
  margin: 28px 0 0;
  color: #77736d;
  font-size: 16px;
  line-height: 1.7;
}
.auth-benefits { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 34px; }
.auth-benefits span {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .32);
  color: #77736d;
  font-size: 12px;
}

.auth-card, .profile-card, .orders-card {
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: 32px;
  background: var(--surface);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(77, 73, 67, .07);
  backdrop-filter: blur(20px);
}
.auth-card { padding: 28px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; padding: 6px; border-radius: 999px; background: #ebe8e3; }
.auth-tabs button {
  min-height: 43px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #85817b;
  font-size: 13px;
}
.auth-tabs button.active { background: #fbfaf8; color: #45433f; box-shadow: 0 8px 22px rgba(70, 65, 59, .08); }
.auth-form { display: none; gap: 18px; margin-top: 28px; }
.auth-form.active { display: grid; }
label { display: grid; gap: 8px; color: #77736d; font-size: 12px; }
input {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  outline: none;
  background: rgba(255, 255, 255, .58);
  color: #4b4945;
}
input:focus { border-color: var(--line-strong); background: rgba(255, 255, 255, .88); }
.auth-form small { color: var(--muted); }
.primary, .button.primary, .auth-form button, .profile-card button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid var(--dark);
  border-radius: 999px;
  background: var(--dark);
  color: #fff;
  font-weight: 650;
}
.status { min-height: 20px; margin: 16px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.status.ok { color: var(--success); }
.status.error { color: var(--danger); }
.claim-context { margin-bottom: 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, .45); font-size: 13px; line-height: 1.55; }
.claim-context strong { display: block; color: #4a4844; }

.dashboard { display: grid; gap: 42px; }
.dashboard-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.dashboard-head h1 { font-size: clamp(38px, 5vw, 70px); }
.dashboard-actions { display: flex; gap: 10px; }
.dashboard-actions button, .section-head button, .claim-order-form button, #closeOrderModal {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .54);
}
.dashboard-grid { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 22px; align-items: start; }
.profile-card, .orders-card { padding: 24px; }
.profile-card h2, .orders-card h2 { margin: 0; font-size: 24px; font-weight: 450; letter-spacing: -.03em; }
.profile-card form { display: grid; gap: 16px; margin-top: 22px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.section-head p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.claim-order-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, .7fr) auto;
  gap: 14px;
  align-items: end;
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, .34);
}
.claim-order-form strong, .claim-order-form small { display: block; }
.claim-order-form small { margin-top: 5px; color: var(--muted); line-height: 1.4; }
.orders-list { display: grid; gap: 10px; margin-top: 20px; }
.order-row {
  display: grid;
  grid-template-columns: 1.35fr 1fr .55fr;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, .38);
  cursor: pointer;
}
.order-row:hover { background: rgba(255, 255, 255, .68); }
.order-row h3, .order-row p { margin: 0; }
.order-row h3 { margin-top: 9px; font-size: 16px; }
.order-row p { margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; color: #77736d; font-size: 10px; }
.order-total { text-align: right; }
.empty { padding: 34px; border: 1px dashed var(--line-strong); border-radius: 20px; color: var(--muted); text-align: center; }
.empty b { display: block; color: var(--ink); }
.empty p { margin: 8px 0 18px; }

.modal { position: fixed; z-index: 100; inset: 0; display: none; place-items: center; padding: 24px; background: rgba(69, 66, 61, .34); backdrop-filter: blur(14px); }
.modal.open { display: grid; }
.modal-box { width: min(900px, 100%); max-height: calc(100vh - 48px); overflow: auto; padding: 26px; border: 1px solid rgba(255,255,255,.86); border-radius: 30px; background: #f4f2ee; box-shadow: 0 40px 120px rgba(55, 51, 46, .25); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.modal-head h2 { margin: 0; font-size: 28px; font-weight: 450; }
.order-detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 24px; }
.detail-card, .detail-section { padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.48); }
.detail-card small, .detail-card b { display: block; }
.detail-card small { color: var(--muted); }
.detail-card b { margin-top: 7px; }
.detail-section { margin-top: 12px; }
.detail-section h3 { margin: 0 0 12px; }
.detail-section p { line-height: 1.6; }
.detail-list > div, .file-link { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }

@media (max-width: 900px) {
  .account-container { width: min(100% - 28px, 720px); }
  .account-header nav { display: none; }
  .auth-layout { grid-template-columns: 1fr; min-height: auto; }
  .auth-copy h1 { font-size: clamp(42px, 12vw, 66px); }
  .dashboard-head { align-items: flex-start; flex-direction: column; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .claim-order-form { grid-template-columns: 1fr; }
  .order-row { grid-template-columns: 1fr; }
  .order-total { text-align: left; }
}

@media (max-width: 560px) {
  .account-header { height: 68px; }
  .account-main { padding: 40px 0 60px; }
  .auth-card, .profile-card, .orders-card { padding: 18px; border-radius: 24px; }
  .auth-benefits { display: grid; }
  .dashboard-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .order-detail-grid { grid-template-columns: 1fr; }
  .modal { padding: 10px; }
  .modal-box { max-height: calc(100vh - 20px); padding: 18px; border-radius: 24px; }
}
