/* Customer account pages (/account/*) — 2026-11-25 */
.acc-wrap { max-width: 480px; margin: 0 auto; }
.acc-wrap .form-card { max-width: none; }
.acc-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; font-size: .9rem; }
.acc-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; padding: .9rem 1rem; border-radius: var(--radius-sm); margin: 0 0 1rem; font-size: .9rem; }
.acc-wrap .alert { margin: 0 0 1rem; }
.otp-input { font-size: 1.6rem !important; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; }
.acc-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem; margin-bottom: 1rem; }
.acc-head h2 { margin: 0; color: var(--primary); }
.acc-nav { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1.25rem; }
.acc-nav a { padding: .45rem .85rem; border-radius: 999px; border: 1px solid var(--border); text-decoration: none; color: var(--primary); font-size: .875rem; font-weight: 600; background: #fff; }
.acc-nav a:hover { border-color: var(--accent); color: var(--accent); }
.acc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.acc-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.acc-card h3 { margin: 0 0 .5rem; font-size: 1.05rem; color: var(--primary); }
.acc-section { margin-top: 2rem; scroll-margin-top: calc(var(--header-h) + 1rem); }
.acc-section > h3 { color: var(--primary); margin: 0 0 .75rem; }
.acc-points-big { font-size: 2.2rem; font-weight: 800; color: var(--accent-hover); line-height: 1.1; }
.acc-qr { display: grid; place-items: center; background: #fff; padding: .75rem; border-radius: 10px; border: 1px solid var(--border); width: 212px; height: 212px; margin: .5rem auto; }
.acc-qr svg { width: 188px; height: 188px; }
.acc-token { font-family: ui-monospace, monospace; font-size: .72rem; color: var(--muted); word-break: break-all; text-align: center; }
.acc-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.acc-table th, .acc-table td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.acc-table th { font-size: .8rem; color: var(--muted); font-weight: 600; }
.acc-table .num { text-align: right; white-space: nowrap; }
.acc-plus { color: var(--status-green); font-weight: 700; }
.acc-minus { color: var(--status-red); font-weight: 700; }
.acc-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .6rem; }
.acc-tools a { display: block; padding: .8rem 1rem; border: 1px solid var(--border); border-radius: 10px; text-decoration: none; color: var(--primary); font-weight: 600; background: #fff; }
.acc-tools a:hover { border-color: var(--accent); color: var(--accent); }
.acc-empty { color: var(--muted); font-size: .9rem; }
.acc-app + .acc-app { margin-top: 1rem; }
/* invoice */
.inv-sheet { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; max-width: 720px; margin: 0 auto; box-shadow: var(--shadow); color: #111827; }
.inv-top { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-bottom: 2px solid var(--primary); padding-bottom: .75rem; margin-bottom: 1rem; }
.inv-top h2 { margin: 0; color: var(--primary); }
/* The invoice is always a white paper sheet: keep its text dark in dark mode too (admin + customer, screen + print). v20261126 */
.inv-sheet { --primary: #0b2a4a; --text: #0f172a; --muted: #475569; --border: #cbd5e1; --a-card-2: #f1f5f9; color-scheme: light; color: #0f172a; }
html .inv-sheet h2, html .inv-sheet strong, html .inv-sheet td, html .inv-sheet .inv-total, html .inv-sheet [style*="color:var(--primary)"] { color: #0f172a !important; }
html .inv-sheet .inv-top h2, html .inv-sheet [style*="color:var(--primary)"] { color: #0b2a4a !important; }
html .inv-sheet th, html .inv-sheet td::before, html .inv-sheet .form-hint { color: #475569 !important; background: transparent !important; }
html .inv-sheet table, html .inv-sheet tr, html .inv-sheet th, html .inv-sheet td { border-color: #cbd5e1 !important; }
html .inv-sheet .inv-top { border-bottom-color: #0b2a4a; }
.inv-items { white-space: pre-line; border-left: 3px solid var(--accent); padding: .25rem 0 .25rem .75rem; margin: 1rem 0; }
.inv-total { font-size: 1.25rem; font-weight: 800; text-align: right; border-top: 1px solid var(--border); padding-top: .75rem; }
.inv-actions { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin: 1rem 0; }
@media (max-width: 600px) {
  .acc-table thead { display: none; }
  .acc-table tr { display: block; border-bottom: 1px solid var(--border); padding: .4rem 0; }
  .acc-table td { display: flex; justify-content: space-between; gap: 1rem; border: 0; padding: .25rem 0; }
  .acc-table td::before { content: attr(data-label); color: var(--muted); font-size: .8rem; font-weight: 600; }
  .acc-table .num { text-align: right; }
}
html[data-theme="dark"] .acc-card, html[data-theme="dark"] .acc-nav a, html[data-theme="dark"] .acc-tools a { background: var(--d-card); }
html[data-theme="dark"] .acc-success { background: rgba(220,252,231,.14); color: #bbf7d0; }
@media print {
  .site-header, .site-footer, .page-hero, .inv-actions, .skip-link, .acc-nav { display: none !important; }
  .inv-sheet { box-shadow: none; border: 0; max-width: none; padding: 0; }
  body { background: #fff; }
}
@media print { .staff-top, .admin-top, .no-print, .site-footer { display: none !important; } .staff-main { padding: 0 !important; } }
.acc-points-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.25rem; margin: 0 0 1rem; border-radius: var(--radius); background: linear-gradient(135deg, var(--primary), var(--accent-hover)); color: #fff; text-decoration: none; font-weight: 600; box-shadow: var(--shadow); }
.acc-points-top strong { font-size: 2rem; line-height: 1; }
.acc-points-top:hover { color: #fff; filter: brightness(1.05); }
[hidden] { display: none !important; }

/* My Applications: service + status + Tracking ID row (2026-11-25) */
.acc-app-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .6rem; }
.acc-app-service { margin: 0; font-size: 1.05rem; }
.acc-tid { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .6rem .75rem; margin-bottom: .6rem;
  border: 1px dashed var(--teal, #0d9488); border-radius: 10px; background: rgba(13, 148, 136, .06); }
.acc-tid-label { font-size: .85rem; color: var(--text-muted, #64748b); flex-basis: 100%; }
.acc-tid-value { font-size: 1.1rem; font-weight: 700; letter-spacing: .02em; background: none; padding: 0; color: inherit; user-select: all; }
.acc-tid-status { display: inline; margin: 0; }
.acc-tid-status .btn-link { background: none; border: 0; color: var(--teal, #0d9488); text-decoration: underline; cursor: pointer; padding: .25rem .2rem; font: inherit; font-size: .9rem; }
.acc-copy.copied { border-color: var(--teal, #0d9488); }

/* Home page option on account pages (2026-11-25) */
.acc-hero-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; }
.acc-hero-row h1 { margin-bottom: 0; }
.acc-home-btn { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; }
.acc-nav a.acc-nav-home { background: var(--accent, #0d9488); border-color: var(--accent, #0d9488); color: #fff; }
.acc-nav a.acc-nav-home:hover { color: #fff; filter: brightness(1.05); }
html[data-theme="dark"] .acc-nav a.acc-nav-home { background: var(--accent, #0d9488); }
@media print { .acc-home-btn { display: none !important; } }

/* My Account / profile section (2026-11-25) */
.acc-card-title { margin: 0 0 .75rem; font-size: 1rem; }
.acc-details { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1rem; margin: 0 0 .9rem; }
.acc-details dt { color: var(--text-muted, #64748b); font-size: .875rem; }
.acc-details dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.acc-points-inline { font-size: 1.15rem; color: var(--accent, #0d9488); }
.acc-profile-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.acc-profile-actions form { margin: 0; }
@media (max-width: 560px) {
  .acc-details { grid-template-columns: 1fr; gap: .1rem; }
  .acc-details dd { margin-bottom: .55rem; }
}

/* Application tap-to-expand details (2026-11-25) */
.acc-app-meta { display: flex; flex-wrap: wrap; gap: .2rem 1.25rem; margin: 0 0 .5rem; font-size: .9rem; color: var(--text-muted, #64748b); }
.acc-app-meta strong { color: var(--text, inherit); }
.acc-app-details { border-top: 1px solid var(--border, #e2e8f0); padding-top: .5rem; }
.acc-app-details > summary { cursor: pointer; font-weight: 600; color: var(--accent, #0d9488); padding: .45rem 0; min-height: 44px; display: flex; align-items: center; gap: .4rem; list-style: none; }
.acc-app-details > summary::-webkit-details-marker { display: none; }
.acc-app-details > summary::before { content: '▸'; transition: transform .15s; display: inline-block; }
.acc-app-details[open] > summary::before { transform: rotate(90deg); }
.acc-app-details .acc-details { margin-top: .4rem; }
.acc-timeline-title { margin: .6rem 0 .4rem; font-size: .95rem; }
@media print { .acc-app-details > summary { display: none; } .acc-app-details:not([open]) > *:not(summary) { display: block; } }

/* Invoice payment status: PAID / UNPAID badges + filter (2026-11-25) */
.pay-badge { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 800; letter-spacing: .04em; border: 1.5px solid; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.pay-paid { background: #dcfce7; color: #166534; border-color: #22c55e; }
.pay-unpaid { background: #fef3c7; color: #92400e; border-color: #f59e0b; }
.pay-big { font-size: 1.05rem; padding: .3rem .9rem; border-width: 2px; margin: .35rem 0 .15rem; }
.pay-filter { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 .75rem; }
.pay-chip { display: inline-flex; align-items: center; gap: .45rem; min-height: 40px; padding: .35rem .9rem; border-radius: 999px; border: 1.5px solid var(--border, #cbd5e1); background: #fff; color: var(--primary, #0f172a); font-weight: 700; font-size: .9rem; text-decoration: none; }
.pay-chip .pay-count { min-width: 1.6rem; padding: .05rem .45rem; border-radius: 999px; background: #e2e8f0; text-align: center; font-size: .8rem; }
.pay-chip-paid .pay-count { background: #dcfce7; color: #166534; }
.pay-chip-unpaid .pay-count { background: #fef3c7; color: #92400e; }
.pay-chip.is-active { border-color: var(--primary, #0f172a); box-shadow: 0 0 0 2px rgba(15, 23, 42, .12); }
.pay-chip-paid.is-active { border-color: #22c55e; background: #f0fdf4; }
.pay-chip-unpaid.is-active { border-color: #f59e0b; background: #fffbeb; }
html[data-theme="dark"] .pay-chip { background: transparent; color: #e2e8f0; }
/* DDES-17/18: soft copy download button + feedback stars (customer account) v20261126d */
.acc-softcopy { margin: .6rem 0 .2rem; }
.acc-softcopy .btn { font-weight: 700; }
.fb-card { max-width: 640px; }
.fb-stars { border: 0; padding: 0; margin: 0 0 .9rem; min-width: 0; }
.fb-stars legend { font-weight: 600; margin-bottom: .35rem; padding: 0; }
.fb-star-row { display: inline-flex; flex-direction: row-reverse; gap: .15rem; }
.fb-stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fb-stars label { font-size: 2rem; line-height: 1; color: #cbd5e1; cursor: pointer; padding: 0 .1rem; transition: color .15s, transform .15s; }
.fb-star-row label:hover, .fb-star-row label:hover ~ label, .fb-star-row input:checked ~ label { color: #f59e0b; }
.fb-stars input:focus-visible + label { outline: 2px solid var(--accent, #0d9488); outline-offset: 2px; border-radius: 4px; }
.fb-stars label:active { transform: scale(.9); }
.fb-thanks { font-size: 1.02rem; }
@media (prefers-reduced-motion: reduce) { .fb-stars label { transition: none; } }

.fb-card textarea{width:100%;max-width:100%;box-sizing:border-box}

/* DDES-21 Refer a Friend card (points only) */
.ref-card{border:2px solid #f59e0b;background:linear-gradient(135deg,#fffbeb 0%,#ffffff 70%)}
.ref-title{margin:0 0 .5rem;font-size:1.1rem;line-height:1.35;color:#92400e}
.ref-code-row{margin:.25rem 0 .5rem;display:flex;flex-wrap:wrap;gap:.4rem;align-items:center}
.ref-code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:1.15rem;letter-spacing:.08em;background:#fff;border:1px dashed #d97706;border-radius:8px;padding:.15rem .55rem;color:#111827}
.ref-link{width:100%;max-width:100%;box-sizing:border-box;font-size:.9rem;background:#fff;color:#111827}
.ref-actions{display:flex;flex-wrap:wrap;gap:.5rem;margin:.6rem 0 .4rem}
.ref-actions .btn{min-height:42px;display:inline-flex;align-items:center;justify-content:center}
.ref-wa{background:#16a34a;border:1px solid #16a34a;color:#fff !important;text-decoration:none}
.ref-wa:hover,.ref-wa:focus-visible{background:#15803d;border-color:#15803d}
.ref-stats{list-style:none;margin:.5rem 0 0;padding:0;display:flex;flex-wrap:wrap;gap:.45rem;font-size:.92rem;color:#374151}
.ref-stats li{display:inline-flex;align-items:center;gap:.4rem;background:#fff;border:1px solid #fde68a;border-radius:999px;padding:.25rem .7rem}
.ref-stats strong{color:#92400e}
html[data-theme="dark"] .ref-card{background:#1f2937;border-color:#d97706}
html[data-theme="dark"] .ref-title{color:#fbbf24}
html[data-theme="dark"] .ref-stats{color:#e5e7eb}
html[data-theme="dark"] .ref-stats li{background:#111827;border-color:#92400e}
html[data-theme="dark"] .ref-stats strong{color:#fbbf24}
@media (max-width:520px){.ref-actions .btn{flex:1 1 100%}}
