/* Account, checkout, order, and payment views.
   The public pages already supply the shell, the panels, and the ledger; this
   file adds the few controls those pages need and nothing else. */

.auth-form { display: grid; gap: 14px; margin-top: 10px; }
.auth-form .actions { margin-top: 4px; align-items: center; }
.auth-form .field { max-width: 420px; }

.banner { border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; background: #f7f9fd; font-size: .92rem; }
.banner[role="status"] { background: var(--accent-soft); border-color: #c6d0e4; }
.banner.error { color: var(--danger); background: var(--danger-soft); border-color: #e8b9c7; font-weight: 600; }
.banner.success { color: var(--green); background: var(--green-soft); border-color: #b8d9c9; }
.banner.warning { color: var(--amber); background: var(--amber-soft); border-color: #e6cf9a; }
.banner.neutral { color: var(--ink); background: #f2f5fc; border-color: #c6d0e4; }
.banner-body { display: grid; gap: 4px; }
.banner-title { font-weight: 700; }
[data-session-banner] { margin-bottom: 16px; }
.header-status { display: inline-flex; align-items: center; padding: .42rem .7rem; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); color: var(--amber); font-size: .85rem; font-weight: 600; white-space: nowrap; }

.auth-dialog { width: min(480px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); color: var(--ink); box-shadow: 0 24px 60px rgba(15, 23, 42, .28); }
.auth-dialog::backdrop { background: rgba(15, 23, 42, .46); }
.auth-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 0; }
.auth-dialog-head h2 { font-size: 1.12rem; margin: 0; }
.auth-dialog-body { display: grid; gap: 12px; padding: 12px 20px 20px; }
.auth-dialog-body p { margin: 0; }
.auth-dialog-body .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.dialog-close { border: 0; background: transparent; color: var(--muted); font-size: 1.35rem; line-height: 1; padding: 2px 6px; border-radius: 6px; cursor: pointer; }
.dialog-close:hover, .dialog-close:focus-visible { background: var(--accent-soft); color: var(--ink); }

.status-tag { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: .18rem .6rem; font-size: .78rem; font-weight: 650; white-space: nowrap; }
.status-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-tag[data-tone="success"] { color: var(--green); background: var(--green-soft); border-color: #b8d9c9; }
.status-tag[data-tone="warning"] { color: var(--amber); background: var(--amber-soft); border-color: #e6cf9a; }
.status-tag[data-tone="error"] { color: var(--danger); background: var(--danger-soft); border-color: #e8b9c7; }
.status-tag[data-tone="muted"] { color: var(--muted); background: #f1f4f9; }

.order-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.order-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, auto) auto; align-items: center; gap: 10px 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.order-row:first-child { border-top: 0; }
.order-row .order-name p { margin: 2px 0 0; }
.order-created { display: grid; gap: 2px; font-variant-numeric: tabular-nums; }
.order-created span { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.order-row .button { min-height: 40px; padding: .42rem .8rem; }

.consent-check { display: grid; grid-template-columns: 1.15rem minmax(0, 1fr); gap: .55rem; align-items: start; margin: 14px 0; font-size: .94rem; }
.consent-check input { width: 1.15rem; height: 1.15rem; margin: .12rem 0 0; accent-color: var(--accent); }
.quote-changes { border: 1px solid #e6cf9a; background: var(--amber-soft); color: #503910; border-radius: 10px; padding: 12px 14px; margin: 12px 0; }
.quote-changes ul { margin: .5rem 0 0; padding-left: 1.1rem; display: grid; gap: 4px; }
.consent-saved { color: var(--green); font-size: .9rem; margin: 10px 0 0; }
.local-code { border: 1px dashed var(--control); border-radius: 10px; padding: 10px 12px; background: #f7f9fd; font-size: .94rem; }
.purchase-agreement { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 16px; }
.purchase-agreement h3 { font-size: 1.08rem; margin-bottom: .5rem; }

.account-menu { position: relative; }
.account-menu > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; padding: .42rem .7rem; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); font-weight: 620; font-size: .9rem; }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-menu > summary::after { content: "▾"; font-size: .7rem; color: var(--muted); }
.account-menu-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 190px; display: grid; padding: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 28px rgba(27, 36, 54, .16); }
.account-menu-panel a, .account-menu-panel button { display: block; width: 100%; text-align: left; padding: .5rem .6rem; border-radius: 7px; color: var(--ink); text-decoration: none; font-size: .92rem; }
.account-menu-panel a:hover, .account-menu-panel button:hover, .account-menu-panel a:focus-visible, .account-menu-panel button:focus-visible { background: var(--accent-soft); }
.home-head .account-menu > summary { border-color: #c9d4e6; }

@media (max-width: 760px) {
  .order-row { grid-template-columns: minmax(0, 1fr) auto; }
  .order-created { grid-column: 1 / -1; grid-template-columns: auto 1fr; }
  .order-row .button { grid-column: 1 / -1; justify-self: start; }
  .account-menu-panel { right: auto; left: 0; }
}
.refund-panel > summary { cursor: pointer; font-weight: 650; color: var(--navy); }
.refund-panel > summary::marker { color: var(--accent); }
.refund-body { display: grid; gap: 12px; margin-top: 12px; }
.refund-verdict { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #f7f9fd; }
.refund-verdict strong { display: block; font-size: 1rem; }
.refund-verdict p { margin: .35rem 0 0; font-size: .93rem; color: var(--ink); }
.refund-verdict[data-kind="eligible"] { border-color: #b8d9c9; background: var(--green-soft); }
.refund-verdict[data-kind="manual"] { border-color: #e6cf9a; background: var(--amber-soft); }
.refund-verdict[data-kind="blocked"] { border-color: #e8b9c7; background: var(--danger-soft); }
.refund-verdict[data-kind="full"], .refund-verdict[data-kind="progress"] { border-color: #c6d0e4; background: var(--accent-soft); }
.refund-notice { border-left: 3px solid var(--accent); padding: .35rem .7rem; background: #f2f5fc; font-size: .9rem; }
.refund-help { display: grid; gap: 12px; margin-top: 10px; }
.refund-help textarea { width: 100%; resize: vertical; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; }
.refund-help .field { max-width: 520px; }
.refund-issue { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
.refund-issue > summary { cursor: pointer; font-weight: 620; color: var(--accent); }
.provider-tools { border-style: dashed; background: #fbfcfe; }
.provider-tools h2 { font-size: 1.02rem; }
.provider-tools code { font-size: .85em; background: #eef2f8; padding: .1rem .3rem; border-radius: 4px; }
