/* Styles for account.html and admin.html (extends styles.css). */
.app-page { display: flex; flex-direction: column; min-height: 100svh; padding: calc(var(--header-h) + 40px) 0 0; background: radial-gradient(circle at 80% 0%, rgba(124, 58, 237, .18), transparent 50%), var(--bg); }
.app-page .site-header { background: rgba(7, 6, 12, .82); border-color: var(--border); backdrop-filter: blur(14px); }
.app-page .header-inner { justify-content: space-between; }
.app-main { flex: 1; padding-bottom: 72px; }
.app-footer { padding: 0 0 24px; background: transparent; border-top: 0; }
.app-footer .footer-bottom { margin-top: 0; }
.access-denied { max-width: 560px; margin: 40px auto; text-align: center; }
.access-denied .app-title { font-size: clamp(1.5rem, 3.5vw, 2rem); }
.link-btn { background: none; border: 0; padding: 8px 4px; color: var(--primary-soft); font: inherit; font-weight: 600; cursor: pointer; }
.link-btn:hover { color: #c4b5fd; text-decoration: underline; }
/* Legal pages */
.draft-banner { position: sticky; top: var(--header-h); z-index: 40; margin: 0 0 28px; padding: 12px 16px; border-radius: 12px; text-align: center; font-weight: 700; letter-spacing: .04em; background: #3b2a05; color: #fde68a; border: 2px dashed var(--warn); }
.legal { max-width: 800px; }
.legal .panel { margin-bottom: 20px; }
.legal h2 { font-size: 1.35rem; margin-top: 8px; }
.legal h3 { font-family: var(--font-body); font-weight: 700; font-size: 1.05rem; margin: 18px 0 6px; }
.legal p, .legal li { color: var(--text-muted); }
.legal ul { padding-left: 1.2em; margin: 0 0 1em; }
.legal li { margin-bottom: 6px; }
.legal strong { color: var(--text); }
.legal .todo { padding: 1px 6px; border-radius: 6px; background: rgba(251, 191, 36, .14); color: var(--warn); font-weight: 600; }
.legal-meta { color: var(--text-dim); font-size: .92rem; }
.app-title { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.app-grid { display: grid; grid-template-columns: 420px 1fr; gap: 24px; align-items: start; }
.tabs { display: flex; gap: 6px; padding: 4px; border-radius: 14px; background: var(--bg); border: 1px solid var(--border); margin-bottom: 22px; }
.tab { flex: 1; min-height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--text-muted); font-weight: 600; cursor: pointer; transition: background-color var(--dur), color var(--dur); }
.tab[aria-selected="true"] { background: var(--primary); color: #fff; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table th { color: var(--text-dim); font-weight: 600; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; background: var(--surface-2); }
.table td.wrap { white-space: normal; min-width: 180px; }
.table tr:last-child td { border-bottom: 0; }
.status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--surface-3); color: var(--text-muted); }
.status-awaiting_payment { background: rgba(251, 191, 36, .14); color: var(--warn); }
.status-payment_confirmed, .status-grinding { background: var(--primary-faint); color: var(--primary-soft); }
.status-delivered { background: rgba(94, 224, 138, .14); color: var(--cash); }
.status-cancelled, .status-refunded { background: rgba(248, 113, 113, .12); color: var(--danger); }
.select { min-height: 40px; padding: 6px 10px; border-radius: 10px; background: var(--bg); color: var(--text); border: 1px solid var(--border-strong); font: inherit; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.stat { padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.stat strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.8rem; }
.stat span { color: var(--text-muted); font-size: .9rem; }
.empty-state { text-align: center; padding: 36px 16px; color: var(--text-muted); }
.inline-form { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 12px; align-items: end; margin-top: 18px; }
.inline-form .field { margin: 0; }
.order-ref { background: none; border: 1px dashed var(--border); border-radius: 6px; padding: 2px 8px; color: var(--primary-soft); font: inherit; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .85rem; cursor: pointer; }
.status-review-pending { background: rgba(251, 191, 36, .14); color: var(--warn); }
.status-review-approved { background: rgba(94, 224, 138, .14); color: var(--cash); }
.status-review-rejected { background: var(--surface-3); color: var(--text-muted); }
.review-form { margin-top: 20px; }
.review-form .select { width: 100%; }
.tab-count { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: var(--warn); color: #111; font-size: .75rem; font-weight: 700; line-height: 20px; }
.order-ref:hover, .order-ref:focus-visible { border-color: var(--primary-soft); }

@media (max-width: 960px) {
  .app-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .inline-form { grid-template-columns: 1fr; }
}
