/* ── Account area: app-like UI, slightly different from marketing pages ── */
body { background: #f5f1ea; }

/* Logged-out login form — shown in place of .acct-layout */
.acct-login-wrap {
  min-height: calc(100vh - 64px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 24px;
}
.acct-login-error {
  background: #FEE2E2; border-left: 3px solid #C0392B; color: #7f1d1d;
  padding: 12px 16px; font-size: 13px; margin-bottom: 20px;
}
.acct-login-remember {
  display: flex; align-items: center; gap: 8px; margin: -4px 0 20px;
}
.acct-login-remember input { width: auto; }
.acct-login-remember label {
  margin: 0; text-transform: none; font-weight: 400; letter-spacing: normal;
  font-size: 13px; color: var(--ink-mid);
}
.acct-login-lost { text-align: center; margin-top: 20px; font-size: 13px; }
.acct-login-lost a { color: var(--ink); }
.acct-login-lost a:hover { color: var(--accent); }
.acct-auth-switch { text-align: center; margin-top: 12px; font-size: 13px; color: var(--ink-mid); }

/* Single receipt view (View Receipt link / WC /view-order/{id}/ endpoint) */
.acct-receipt-wrap { max-width: 760px; margin: 0 auto; padding: 40px 24px 64px; }
.acct-receipt-back {
  display: inline-block; margin-bottom: 24px; font-size: 13px;
  color: var(--ink-mid); text-decoration: none;
}
.acct-receipt-back:hover { color: var(--accent); }
.acct-receipt-head { margin-bottom: 32px; }
.acct-receipt-head h1 { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 4px; }
.acct-receipt-billing { border-top: 1px solid rgba(17,17,17,0.1); padding-top: 8px; }
.acct-auth-switch a { color: var(--accent); font-weight: 600; text-decoration: none; }
.acct-auth-switch a:hover { text-decoration: underline; }

.acct-layout { display: grid; grid-template-columns: 260px 1fr; min-height: calc(100vh - 64px); }
.acct-sidebar {
  background: var(--ink); color: rgba(245,241,234,0.7);
  padding: 32px 0; border-right: 2px solid var(--rule);
  position: sticky; top: 64px; height: calc(100vh - 64px);
  overflow-y: auto;
}
.acct-sidebar__user {
  padding: 0 24px 24px; margin-bottom: 16px;
  border-bottom: 1px solid rgba(245,241,234,0.1);
}
.acct-sidebar__avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display:flex; align-items:center; justify-content:center;
  font-weight: 700; font-size: 18px; margin-bottom: 12px;
}
.acct-sidebar__name { font-size: 14px; color: #f5f1ea; font-weight: 600; }
.acct-sidebar__email { font-size: 12px; color: rgba(245,241,234,0.5); margin-top: 2px; }

.acct-nav { list-style: none; }
.acct-nav__item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 24px; color: rgba(245,241,234,0.65);
  font-size: 14px; cursor: pointer;
  text-decoration: none; transition: all 0.15s;
  border-left: 3px solid transparent;
}
.acct-nav__item:hover { color: #f5f1ea; background: rgba(245,241,234,0.04); }
.acct-nav__item.active { color: #f5f1ea; background: rgba(245,241,234,0.06); border-left-color: var(--accent); font-weight: 600; }
.acct-nav__icon { width: 16px; height: 16px; opacity: 0.6; font-family: var(--font-mono); display:flex; align-items:center; justify-content:center; }
.acct-nav__group-label {
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(245,241,234,0.35); padding: 16px 24px 8px; margin-top: 8px;
}

.acct-sidebar__footer {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 20px 24px; border-top: 1px solid rgba(245,241,234,0.1);
  font-size: 11px; color: rgba(245,241,234,0.4);
}
.acct-sidebar__footer a { color: rgba(245,241,234,0.6); text-decoration: none; }
.acct-sidebar__footer a:hover { color: #f5f1ea; }

.acct-main { padding: 0; }
.acct-section { padding: 40px 48px; border-bottom: 2px solid var(--rule); display: none; }
.acct-section.active { display: block; }
.acct-section h1 { font-size: 36px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; }
.acct-section h1 + p { font-size: 15px; color: var(--ink-mid); margin-bottom: 32px; }

/* Welcome banner */
.welcome-banner {
  background: var(--accent); color: #fff;
  padding: 16px 48px;
  display: flex; justify-content: space-between; align-items: center;
}
.welcome-banner strong { font-weight: 700; }
.welcome-banner button {
  background: transparent; border: 1px solid rgba(255,255,255,0.4);
  color: #fff; padding: 6px 14px; cursor: pointer; font-size: 12px;
  font-family: var(--font-sans); letter-spacing: 0.04em; text-transform: uppercase;
}

/* Licence card */
.licence-card {
  border: 2px solid var(--ink); padding: 32px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--bg) 0%, var(--cream-mid) 100%);
}
.licence-card__head {
  display:flex; justify-content:space-between; align-items:flex-start;
  margin-bottom: 24px;
}
.licence-card__title { font-size: 22px; font-weight: 700; }
.licence-card__sub { font-size: 13px; color: var(--ink-mid); margin-top: 4px; }
.licence-card__status {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 6px 12px;
  background: rgba(45,138,78,0.15); color: #2d8a4e; border: 1px solid rgba(45,138,78,0.3);
}
.licence-key {
  font-family: var(--font-mono); font-size: 14px;
  background: var(--ink); color: #f5f1ea;
  padding: 16px 20px; letter-spacing: 0.04em;
  display:flex; justify-content:space-between; align-items:center; gap: 12px;
}
.licence-key__copy {
  background: var(--accent); color: #fff; border: none; cursor: pointer;
  padding: 8px 14px; font-family: var(--font-sans); font-size: 11px;
  font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.licence-card__meta {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  margin-top: 24px; padding-top: 24px; border-top: 1px solid rgba(17,17,17,0.1);
  font-size: 13px;
}
.licence-card__meta-key { font-size: 11px; color: var(--ink-low); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 4px; }
.licence-card__meta-val { font-weight: 600; }

/* Download card */
.download-card {
  border: 2px solid rgba(17,17,17,0.15); padding: 24px;
  display: flex; align-items: center; gap: 24px;
  margin-bottom: 16px;
  transition: border-color 0.15s;
}
.download-card:hover { border-color: var(--ink); }
.download-card--latest { border: 2px solid var(--accent); background: var(--accent-bg); }
.download-card__icon {
  width: 56px; height: 56px;
  background: var(--ink); color: #f5f1ea;
  display:flex; align-items:center; justify-content:center;
  font-size: 24px; flex-shrink: 0;
}
.download-card--latest .download-card__icon { background: var(--accent); }
.download-card__body { flex: 1; }
.download-card__version { font-size: 18px; font-weight: 700; }
.download-card__date { font-size: 12px; color: var(--ink-low); margin-top: 2px; font-family: var(--font-mono); letter-spacing: 0.04em; }
.download-card__notes { font-size: 13px; color: var(--ink-mid); margin-top: 8px; line-height: 1.5; }
.download-card__btn {
  background: var(--ink); color: #fff; border: none; cursor: pointer;
  padding: 14px 24px; font-family: var(--font-sans); font-size: 12px;
  font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none; flex-shrink: 0;
}
.download-card--latest .download-card__btn { background: var(--accent); }
.download-card__btn:hover { background: #333; }
.download-card__size { font-size: 11px; color: var(--ink-low); font-family: var(--font-mono); margin-top: 6px; display: block; text-align: center; }

/* Bug report / feature form */
.feedback-form {
  max-width: 720px;
  background: var(--bg); border: 2px solid rgba(17,17,17,0.12);
  padding: 32px;
}
.feedback-form .field input,
.feedback-form .field select,
.feedback-form .field textarea {
  width: 100%; padding: 14px 16px;
  border: 2px solid rgba(17,17,17,0.15); background: #fff;
  font-family: var(--font-sans); font-size: 15px; color: var(--ink);
  resize: vertical;
}
.feedback-form .field textarea { min-height: 140px; }
.feedback-form .field select { height: 50px; appearance: none; -webkit-appearance: none; cursor: pointer; }
.feedback-form .field label {
  display:block; font-size: 12px; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-low);
  margin-bottom: 6px;
}
.feedback-form .field { margin-bottom: 20px; }
.feedback-form .field-help { font-size: 12px; color: var(--ink-low); margin-top: 6px; line-height: 1.4; }
.feedback-form button[type="submit"] {
  background: var(--accent); color: #fff; border: none; cursor: pointer;
  padding: 16px 32px; font-family: var(--font-sans); font-size: 13px;
  font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  margin-top: 8px;
}

.privacy-note {
  margin-top: 24px; padding: 16px;
  background: var(--cream-mid); border-left: 3px solid var(--accent);
  font-size: 13px; color: var(--ink-mid); line-height: 1.6;
}
.privacy-note strong { color: var(--ink); }

/* Severity radio chips */
.severity-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.severity-chips label {
  padding: 8px 14px; border: 1.5px solid rgba(17,17,17,0.15);
  cursor: pointer; font-size: 13px; font-weight: 500;
  background: #fff;
}
.severity-chips input { display: none; }
.severity-chips input:checked + span {
  background: var(--ink); color: #fff;
  margin: -8px -14px; padding: 8px 14px; display: block;
}
.severity-chips label:has(input:checked) { border-color: var(--ink); padding: 0; overflow: hidden; }

/* Stat tiles */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
.stat-tile {
  border: 1px solid rgba(17,17,17,0.12); padding: 20px; background: var(--bg);
}
.stat-tile__label { font-size: 11px; color: var(--ink-low); letter-spacing: 0.08em; text-transform: uppercase; }
.stat-tile__value { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin-top: 8px; }
.stat-tile__sub { font-size: 12px; color: var(--ink-mid); margin-top: 4px; }

/* Receipts / orders table */
.acct-receipts-table {
  width: 100%; border-collapse: collapse; font-size: 14px;
}
.acct-receipts-table th {
  text-align: left; font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-low);
  padding: 0 16px 12px; border-bottom: 2px solid var(--rule);
}
.acct-receipts-table td {
  padding: 16px; border-bottom: 1px solid rgba(17,17,17,0.08);
  vertical-align: middle;
}
.acct-receipts-table tr:last-child td { border-bottom: none; }
.acct-receipts-table tr:hover td { background: rgba(17,17,17,0.02); }
.acct-receipts-table .order-status {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 4px 10px;
  background: rgba(45,138,78,0.12); color: #2d8a4e;
  border: 1px solid rgba(45,138,78,0.25); white-space: nowrap;
}
.acct-receipts-table a { color: var(--ink); font-weight: 600; text-decoration: none; }
.acct-receipts-table a:hover { color: var(--accent); }

/* Form submission success banner */
.acct-success {
  background: rgba(45,138,78,0.1); border: 1px solid rgba(45,138,78,0.3);
  color: #2d8a4e; padding: 16px 20px;
  font-size: 14px; font-weight: 500;
  margin-bottom: 24px;
  display: flex; align-items: center; gap: 10px;
}
.acct-success::before {
  content: "✓"; font-weight: 700; font-size: 16px;
}

/* Notification preference checkboxes */
.acct-checkbox {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 0; border-bottom: 1px solid rgba(17,17,17,0.08);
}
.acct-checkbox:last-child { border-bottom: none; }
.acct-checkbox input[type="checkbox"] {
  width: 18px; height: 18px; margin-top: 2px;
  accent-color: var(--accent); flex-shrink: 0; cursor: pointer;
}
.acct-checkbox__body { flex: 1; }
.acct-checkbox__label {
  font-size: 14px; font-weight: 600; color: var(--ink);
  display: block; margin-bottom: 2px; cursor: pointer;
}
.acct-checkbox__desc { font-size: 13px; color: var(--ink-mid); line-height: 1.4; }

/* Responsive */
@media (max-width: 900px) {
  .acct-layout { grid-template-columns: 1fr; }
  .acct-sidebar {
    position: static; height: auto;
    border-right: none; border-bottom: 2px solid var(--rule);
  }
  .acct-sidebar__footer { position: static; margin-top: 16px; }
  .acct-section { padding: 32px 24px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .welcome-banner { padding: 16px 24px; flex-direction: column; align-items: flex-start; gap: 12px; }
  .licence-card__meta { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .download-card { flex-direction: column; align-items: flex-start; }
  .acct-receipts-table th:nth-child(3),
  .acct-receipts-table td:nth-child(3) { display: none; }
}
