:root {
  --ink: #102f32;
  --ink-2: #19484a;
  --paper: #f5efe5;
  --surface: #fffdf8;
  --surface-2: #edf4ef;
  --accent: #ed6438;
  --accent-soft: #fff0e8;
  --gold: #eeb74d;
  --line: #d9d0c3;
  --muted: #62716d;
  --danger: #a84125;
  --success: #1f6a4a;
  --shadow: 0 24px 70px rgba(16, 47, 50, .11);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(rgba(16, 47, 50, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 47, 50, .045) 1px, transparent 1px),
    radial-gradient(circle at 92% 2%, rgba(237, 100, 56, .13), transparent 27rem),
    radial-gradient(circle at 2% 85%, rgba(238, 183, 77, .12), transparent 24rem),
    var(--paper);
  background-size: 36px 36px, 36px 36px, auto, auto, auto;
  font: 15px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; }

button, input, textarea { font: inherit; }

.account-topbar {
  min-height: 76px;
  padding: 0 clamp(18px, 6vw, 86px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #fff;
  background: rgba(16, 47, 50, .98);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.account-brand {
  text-decoration: none;
  font-size: 20px;
  font-weight: 950;
  letter-spacing: -.035em;
}

.account-brand span { color: var(--accent); }

.account-toplinks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.account-toplinks a,
.account-toplinks button {
  min-height: 39px;
  padding: 9px 13px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px;
  color: #fff;
  background: rgba(255,255,255,.06);
  text-decoration: none;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.account-toplinks a:hover,
.account-toplinks a:focus-visible,
.account-toplinks button:hover,
.account-toplinks button:focus-visible {
  color: var(--ink);
  background: #fff;
  outline: none;
}

.account-shell {
  width: min(1240px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(34px, 5vw, 66px) 0 76px;
}

.account-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, .7fr);
  gap: 28px;
  align-items: end;
  padding: clamp(28px, 5vw, 58px);
  border-radius: 28px;
  color: #fff;
  background: linear-gradient(135deg, var(--ink), #205c58);
  box-shadow: var(--shadow);
}

.account-hero::before,
.account-hero::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%;
  pointer-events: none;
}

.account-hero::before { width: 280px; height: 280px; right: -90px; top: -145px; }
.account-hero::after { width: 180px; height: 180px; right: 70px; top: -95px; }

.eyebrow {
  margin: 0 0 12px;
  color: #ffd39e;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.account-hero h1 {
  max-width: 780px;
  margin: 0;
  font: clamp(38px, 6vw, 68px)/.98 Georgia, "Times New Roman", serif;
  letter-spacing: -.048em;
}

.account-hero h1 em { color: #ff8055; font-weight: 400; }
.hero-copy { max-width: 680px; margin: 18px 0 0; color: #d8e8e3; font-size: 16px; }

.identity-card {
  position: relative;
  z-index: 1;
  padding: 20px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 20px;
  background: rgba(255,255,255,.09);
  backdrop-filter: blur(9px);
}

.identity-card small { display: block; color: #bcd2cd; font-weight: 800; }
.identity-card strong { display: block; margin-top: 7px; font-size: 20px; overflow-wrap: anywhere; }

.status-pill {
  display: inline-flex;
  margin-top: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #173d34;
  background: #d9f2e4;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.status-pill.pending { color: #6f5510; background: #fff0bd; }
.status-pill.rejected { color: #873821; background: #f8d8cd; }

.account-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-top: 24px;
}

.account-nav {
  position: sticky;
  top: 20px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,253,248,.92);
  box-shadow: 0 14px 40px rgba(16,47,50,.07);
}

.account-nav strong {
  display: block;
  padding: 8px 10px 11px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.account-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  min-height: 43px;
  padding: 9px 10px;
  border-radius: 11px;
  text-decoration: none;
  font-weight: 780;
}

.account-nav a::after { content: "→"; color: var(--accent); }
.account-nav a:hover, .account-nav a:focus-visible { background: var(--accent-soft); outline: none; }

.account-content { min-width: 0; display: grid; gap: 22px; }

.account-section {
  scroll-margin-top: 20px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,253,248,.96);
  box-shadow: 0 16px 42px rgba(16,47,50,.06);
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.section-number {
  display: inline-block;
  color: var(--accent);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.account-section h2 {
  margin: 5px 0 5px;
  font: clamp(26px, 4vw, 38px)/1.05 Georgia, "Times New Roman", serif;
  letter-spacing: -.03em;
}

.section-copy { margin: 0; color: var(--muted); }

.form-grid,
.detail-grid,
.metric-grid,
.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field { display: grid; gap: 7px; }
.field.wide,
.detail.wide { grid-column: 1 / -1; }
.field span { color: var(--ink-2); font-size: 12px; font-weight: 850; }

input, textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid #d4cabb;
  border-radius: 12px;
  padding: 12px 13px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

textarea { min-height: 106px; resize: vertical; }
input:focus, textarea:focus { border-color: var(--ink-2); box-shadow: 0 0 0 4px rgba(25,72,74,.1); }
input[readonly], textarea[readonly] { color: #5e6b67; background: #f2eee7; cursor: not-allowed; }

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 3px;
}

.primary-button,
.secondary-button {
  min-height: 46px;
  border-radius: 11px;
  padding: 11px 17px;
  font-weight: 900;
  cursor: pointer;
}

.primary-button { border: 0; color: #fff; background: var(--accent); }
.secondary-button { border: 1px solid var(--line); color: var(--ink); background: transparent; }
.primary-button:disabled, .secondary-button:disabled { opacity: .58; cursor: wait; }

.message {
  min-height: 22px;
  margin: 0;
  color: var(--success);
  font-size: 13px;
  font-weight: 750;
}

.message.error { color: var(--danger); }

.detail,
.metric {
  min-width: 0;
  padding: 16px;
  border: 1px solid #e7ddd0;
  border-radius: 15px;
  background: #faf7f0;
}

.detail small,
.metric span { display: block; color: var(--muted); font-size: 11px; font-weight: 850; letter-spacing: .035em; }
.detail strong { display: block; margin-top: 5px; overflow-wrap: anywhere; }
.metric b { display: block; margin: 7px 0 2px; color: var(--accent); font: 30px Georgia, serif; overflow-wrap: anywhere; }
.metric small { color: var(--muted); }

.security-note {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-top: 16px;
  padding: 16px;
  border-radius: 15px;
  color: #245344;
  background: var(--surface-2);
}

.security-note b { flex: 0 0 auto; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; color: #fff; background: var(--success); }

.quick-link {
  min-height: 112px;
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 14px;
  background: #fff;
  text-decoration: none;
}

.quick-link b { display: block; margin-bottom: 5px; }
.quick-link span { color: var(--muted); font-size: 13px; }
.quick-link:hover, .quick-link:focus-visible { transform: translateY(-2px); box-shadow: 0 13px 28px rgba(16,47,50,.09); outline: none; }

.loading-card {
  margin: 0 0 16px;
  padding: 13px 16px;
  border-radius: 12px;
  color: #5c501f;
  background: #fff1c6;
}

.loading-card.error { color: var(--danger); background: #f9e2d9; }
[hidden] { display: none !important; }

@media (max-width: 860px) {
  .account-hero { grid-template-columns: 1fr; align-items: start; }
  .account-layout { grid-template-columns: 1fr; }
  .account-nav {
    position: static;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: thin;
  }
  .account-nav strong { display: none; }
  .account-nav a { flex: 0 0 auto; white-space: nowrap; }
}

@media (max-width: 580px) {
  .account-topbar { flex-direction: column; align-items: stretch; padding-block: 15px; }
  .account-toplinks { justify-content: flex-start; gap: 6px; }
  .account-toplinks a, .account-toplinks button { min-height: 36px; padding: 8px 10px; }
  .account-shell { width: min(100% - 24px, 1240px); padding-top: 18px; }
  .account-hero { padding: 24px 20px; border-radius: 20px; }
  .account-hero h1 { font-size: 38px; }
  .account-section { padding: 21px 17px; border-radius: 17px; }
  .section-head { display: block; }
  .form-grid, .detail-grid, .metric-grid, .quick-grid { grid-template-columns: 1fr; }
  .field.wide, .detail.wide, .form-actions { grid-column: auto; }
  .form-actions .primary-button { width: 100%; }
}

@media (prefers-reduced-motion: no-preference) {
  .account-section { animation: account-rise .42s both; }
  .account-section:nth-child(2) { animation-delay: .04s; }
  .account-section:nth-child(3) { animation-delay: .08s; }
  .account-section:nth-child(4) { animation-delay: .12s; }
  .quick-link { transition: transform .18s, box-shadow .18s; }
  @keyframes account-rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
