/* v2.21.0 — Customer-account dashboard styles. Scoped to .account-*
   so it cannot leak into the rest of the storefront. Variables come
   from store.css (--bg, --bg2, --text, --text2, --text3, --border,
   --accent) so dark/light/mixed themes all work without extra rules. */

.account-shell { padding: 32px 24px 80px; max-width: 1080px; }

.account-verify-banner {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
[data-theme="dark"] .account-verify-banner,
[data-theme="mixed"] .account-verify-banner {
  background: rgba(252, 211, 77, 0.15);
  color: #fde68a;
  border-color: rgba(252, 211, 77, 0.35);
}

.account-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  align-items: start;
}
@media (max-width: 760px) {
  .account-layout { grid-template-columns: 1fr; }
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.account-sidebar {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  position: sticky;
  top: 24px;
}
.account-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.account-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  text-transform: uppercase;
  flex-shrink: 0;
}
.account-user-name { font-weight: 600; font-size: 14px; color: var(--text); word-break: break-word; }
.account-user-email { font-size: 11px; color: var(--text3); word-break: break-all; margin-top: 2px; }

.account-nav { display: flex; flex-direction: column; gap: 2px; }
.account-nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--text2);
  text-decoration: none;
  font-size: 13.5px;
  transition: background .12s, color .12s;
}
.account-nav-link:hover { background: rgba(127,127,127,.08); color: var(--text); }
.account-nav-link.is-active { background: var(--accent); color: #fff; }
.account-nav-link.is-active:hover { background: var(--accent); color: #fff; }
.account-nav-icon { font-size: 15px; width: 18px; text-align: center; }
.account-nav-logout {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--text3);
}

/* ── Content panes ───────────────────────────────────────────────────────── */
.account-content { min-width: 0; }
.account-tab-title    { font-size: 24px; font-weight: 700; margin: 0 0 6px; color: var(--text); }
.account-tab-subtitle { font-size: 17px; font-weight: 600; margin: 28px 0 10px; color: var(--text); }
.account-tab-lead     { color: var(--text2); font-size: 14px; line-height: 1.55; margin: 0 0 22px; }

.account-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 14px;
}
.account-card h2 { font-size: 15px; font-weight: 600; margin: 0 0 12px; color: var(--text); }

.account-muted        { color: var(--text3); font-size: 12px; }
.account-muted-help   { color: var(--text3); font-size: 11.5px; margin: -6px 0 12px; }
.account-muted-inline { color: var(--text3); font-size: 11px; font-weight: 400; margin-left: 6px; }
.account-mono         { font-family: 'JetBrains Mono', 'Menlo', monospace; font-size: 12.5px; }
.account-empty {
  text-align: center;
  padding: 48px 18px;
  background: var(--bg2);
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--text3);
}
.account-empty p { margin: 0 0 14px; font-size: 14px; }

/* Stats grid (Overview) */
.account-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}
@media (max-width: 540px) { .account-stat-grid { grid-template-columns: 1fr; } }
.account-stat {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
}
.account-stat-n { font-size: 28px; font-weight: 700; color: var(--accent); }
.account-stat-label { font-size: 12px; color: var(--text3); text-transform: uppercase; letter-spacing: .04em; margin-top: 4px; }

.account-order-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr auto;
  gap: 14px;
  align-items: center;
}
@media (max-width: 640px) {
  .account-order-row { grid-template-columns: 1fr; }
}
.account-order-total { font-weight: 700; color: var(--text); }

/* Downloads list */
.account-downloads { display: flex; flex-direction: column; gap: 12px; }
.account-download {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
}
@media (max-width: 560px) {
  .account-download { grid-template-columns: 56px 1fr; }
  .account-download-actions { grid-column: 1 / -1; }
}
.account-download-cover {
  width: 64px; height: 48px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
}
.account-download-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.account-download-name { font-weight: 600; color: var(--text); font-size: 14px; }
.account-download-name a { color: var(--text); text-decoration: none; }
.account-download-name a:hover { color: var(--accent); }

/* Orders table */
.account-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.account-table th, .account-table td {
  padding: 12px 14px;
  text-align: left;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.account-table th {
  background: rgba(127,127,127,.04);
  color: var(--text3);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.account-table tr:last-child td { border-bottom: none; }

/* Licenses */
.account-license { padding: 16px; }
.account-license-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.account-license-key { color: var(--accent); word-break: break-all; margin-top: 2px; }
.account-license-sites { list-style: none; margin: 12px 0 0; padding: 0; }
.account-license-sites li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--border);
  font-size: 13px;
  flex-wrap: wrap;
}

/* Forms inside cards */
.account-form label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text2);
  margin: 10px 0 4px;
}
.account-form input.form-control { margin-bottom: 4px; }
.account-form button { margin-top: 14px; }

/* Inline link-style button (used in confirm rows + verify banner) */
.link-btn {
  background: transparent;
  border: none;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  padding: 0;
}
.link-btn-danger { color: #dc2626; }

/* v2.21.1 — "Continue with Google" button (login.php + register.php).
   Matches Google's brand guidelines: white surface, neutral border,
   #1f1f1f text. Stays readable on dark themes too thanks to the
   fixed color values — Google requires its button to look
   consistent everywhere. */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 18px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #ffffff;
  color: #1f2937;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: box-shadow .15s, border-color .15s;
  font-family: inherit;
  margin-bottom: 14px;
}
.btn-google:hover {
  border-color: #9ca3af;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  text-decoration: none;
  color: #1f2937;
}
.btn-google svg { flex-shrink: 0; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0 14px;
  color: var(--text3);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ════════════════════════════════════════════════════════════════════════
 * v2.21.10 — MIXED MODE FIX
 * In mixed mode the page body is LIGHT but the dashboard surfaces are
 * DARK (sidebar, cards, stat tiles, tables…). Without this block the
 * inherited --text variable is dark navy = unreadable on the dark
 * surfaces. Same recipe used by cart-summary-box / about-card: re-
 * declare every CSS var as its DARK-mode value inside the surface, so
 * any child that uses var(--text|text2|text3|border) flips correctly.
 * ════════════════════════════════════════════════════════════════════════ */
[data-theme="mixed"] .account-sidebar,
[data-theme="mixed"] .account-card,
[data-theme="mixed"] .account-stat,
[data-theme="mixed"] .account-table,
[data-theme="mixed"] .account-empty,
[data-theme="mixed"] .account-download,
[data-theme="mixed"] .account-license,
[data-theme="mixed"] .auth-form-card {
  --bg:          #0a0e1a;
  --bg2:         #101728;
  --bg3:         #1a2238;
  --bg-elevated: #101728;
  --card:        #101728;
  --text:        #e8edf7;
  --text1:       #e8edf7;
  --text2:       #94a3b8;
  --text3:       #64748b;
  --border:      rgba(255, 255, 255, 0.08);
  --border2:     rgba(255, 255, 255, 0.18);
  --accent:      #f97316;
  color: #e8edf7;
}

/* Page-level titles + leads SIT on the light body (outside any card),
   so they should stay dark. No override needed there — keeping the
   default var(--text) is correct in mixed mode. */

/* Inputs inside dark account/auth cards need explicit light text +
   translucent background, same as cart inputs do. The browser's
   default <input> background is white which would be fine against
   light cards but jarring against the dark mixed-mode card. */
[data-theme="mixed"] .account-card .form-control,
[data-theme="mixed"] .auth-form-card .form-control {
  background: rgba(255, 255, 255, .06);
  color: #e8edf7;
  border-color: rgba(255, 255, 255, .15);
}
[data-theme="mixed"] .account-card .form-control::placeholder,
[data-theme="mixed"] .auth-form-card .form-control::placeholder {
  color: #94a3b8;
  opacity: 1;
}
/* Disabled inputs (readonly email on /checkout when logged in) get a
   slightly different treatment so they read as "locked" but visible. */
[data-theme="mixed"] .account-card .form-control[disabled],
[data-theme="mixed"] .auth-form-card .form-control[disabled],
[data-theme="mixed"] .account-card .form-control[readonly],
[data-theme="mixed"] .auth-form-card .form-control[readonly] {
  background: rgba(255, 255, 255, .03);
  color: #94a3b8;
  cursor: not-allowed;
}
/* Help text inside cards (account-muted-help, account-muted-inline)
   re-uses var(--text3) which is already redeclared above. No extra
   rule needed — left here as a note. */

/* The "Continue with Google" button is always white-on-dark per
   Google brand guidelines — no mixed-mode override needed (already
   uses fixed colors). */

/* The verify banner (yellow) and the orange "checkout waiting" banner
   on /login + /register sit on the LIGHT body (outside any card),
   so the dark text from default var(--text) is fine on the
   translucent backgrounds. No override needed. */

/* Account-tab-title and account-tab-lead live in the .account-content
   right pane, NOT inside .account-card. The right pane sits on the
   light body, so the default dark var(--text) IS the right colour.
   This is intentional — the dashboard is "light page, dark cards"
   like the cart page. */
