/* ============================================================
   Area clienti – stili specifici, sopra al foglio di stile del sito
   (assets/css/style.css nella root). Palette: viola profondo + oro.
   ============================================================ */
:root {
  --plum: #2a1b5e; --plum-dark: #1d1340; --gold: #e8a317; --gold-light: #f6d365;
  --bg: #faf8ff; --card: #ffffff; --text: #1f1b2e; --muted: #5b566d; --line: #e4e0f1;
  --ok: #1f9d55; --warn: #b45309; --err: #d93b3b; --accent: #1a73e8;
}
body.app-body { font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); display: flex; flex-direction: column; min-height: 100vh; }
main.app-main { flex: 1; padding: 32px 0 48px; }
.app-narrow { max-width: 980px; }
.app-wide { max-width: 1240px; }
.app-main h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 18px; }
.app-main h2 { font-size: 1.2rem; }
p.lead { color: var(--muted); margin-top: -8px; }

/* pulsanti dell'app (coerenti con quelli del sito) */
.app-main .btn { border-radius: 999px; padding: .7em 1.3em; font-weight: 600; text-decoration: none; border: 0; cursor: pointer; font-size: 1rem; display: inline-flex; align-items: center; justify-content: center; gap: .5em; background: var(--plum); color: #fff; }
.app-main .btn:hover { background: var(--plum-dark); color: #fff; }
.app-main .btn.gold { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: var(--plum-dark); box-shadow: 0 6px 18px rgba(232,163,23,.35); }
.app-main .btn.small { padding: .5em 1em; font-size: .9rem; }
.app-main .btn.block { display: flex; width: 100%; }
.app-main .btn.danger { background: var(--err); }
.app-main .btn[disabled] { opacity: .5; cursor: not-allowed; }
.app-main form .btn { margin-top: 20px; }

.app-main .card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 26px; box-shadow: 0 10px 30px rgba(42,27,94,.08); }
.app-main .card + .card { margin-top: 18px; }
.app-main .card h2 { margin: 0 0 14px; }
.narrow { max-width: 480px; margin: 0 auto; }

.app-main label { display: block; font-size: .85rem; font-weight: 600; margin: 14px 0 6px; }
.app-main input[type=text], .app-main input[type=email], .app-main input[type=password], .app-main input[type=tel], .app-main input[type=number], .app-main textarea, .app-main select {
  width: 100%; font-size: 1rem; padding: 12px; border: 1px solid #cfc9e3; border-radius: 10px; background: #fff; color: inherit; font: inherit;
}
.app-main input:focus { outline: 2px solid #5a3fb3; border-color: transparent; }
.help { font-size: .8rem; color: var(--muted); margin-top: 4px; }

.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: .95rem; }
.flash.ok { background: #e3f6ea; color: #157a40; }
.flash.err { background: #fde6e6; color: #a32b2b; }
.flash.warn { background: #fff0db; color: #9a5a00; }
.flash.info { background: #e8eefb; color: #1558b8; }

/* saldo in primo piano */
.balance { background: linear-gradient(135deg, var(--plum-dark) 0%, #3b2a7a 100%); color: #fff; border-radius: 16px; padding: 28px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; box-shadow: 0 10px 30px rgba(42,27,94,.18); }
.balance .lbl { font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.balance .val { font-family: "Playfair Display", Georgia, serif; font-size: 2.8rem; font-weight: 700; line-height: 1.1; color: var(--gold-light); }
.balance .val small { font-size: 1rem; font-family: Inter, sans-serif; font-weight: 500; color: #fff; opacity: .85; margin-left: 6px; }
.balance .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.balance.low .val { color: #ffb4b4; }
.balance.compact { padding: 16px 22px; margin-bottom: 18px; }
.balance.compact .val { font-size: 1.8rem; }
.balance .btn.call-green { background: var(--ok); color: #fff; }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.app-main .grid > .card, .app-main .call-layout > .card { margin-top: 0; }

/* offerte */
.opts { display: grid; gap: 10px; }
.opt { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border: 2px solid var(--line); border-radius: 12px; background: #f7f5fd; cursor: pointer; }
.opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.opt:has(input:checked) { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232,163,23,.2); background: #fff; }
.opt .min { font-weight: 700; font-size: 1.05rem; } .opt .min small { display: block; font-weight: 400; font-size: .8rem; color: var(--muted); }
.opt .eur { font-weight: 800; font-size: 1.25rem; white-space: nowrap; color: var(--plum); }

table.list { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.list th, table.list td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.app-main .tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: #eee; color: #444; text-transform: none; letter-spacing: 0; }
.app-main .tag.paid, .app-main .tag.ok, .app-main .tag.completed { background: #e3f6ea; color: #157a40; }
.app-main .tag.pending, .app-main .tag.started, .app-main .tag.answered { background: #fff0db; color: #9a5a00; }
.app-main .tag.failed, .app-main .tag.error, .app-main .tag.revoking, .app-main .tag.revoked { background: #fde6e6; color: #a32b2b; }
.right { text-align: right; }
.muted { color: var(--muted); }
.center { text-align: center; }
.note { font-size: .8rem; color: var(--muted); text-align: center; margin-top: 14px; }

/* telefono */
.phone { text-align: center; }
.phone .status { font-size: 1.05rem; margin: 10px 0; min-height: 1.5em; }
.phone .timer { font-family: "Playfair Display", Georgia, serif; font-size: 2.6rem; font-weight: 700; color: var(--plum); font-variant-numeric: tabular-nums; }
.phone .remaining { color: var(--muted); font-size: .9rem; }
.phone .remaining.low { color: var(--err); font-weight: 700; }
.phone .btns { display: flex; justify-content: center; gap: 12px; margin-top: 18px; }
.phone .btn.call { background: var(--ok); font-size: 1.1rem; padding: .9em 2em; }
.phone .btn.hang { background: var(--err); font-size: 1.1rem; padding: .9em 2em; }
.phone .volume { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 18px; }
.phone .volume label { margin: 0; font-size: .9rem; }
.phone .volume input[type=range] { width: min(220px, 60%); accent-color: var(--plum); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #bbb; margin-right: 6px; vertical-align: middle; }
.dot.on { background: var(--ok); } .dot.err { background: var(--err); } .dot.busy { background: var(--warn); }

/* tastierino DTMF */
.keypad { margin-top: 22px; }
.keypad .typed { font-size: 1.3rem; letter-spacing: .15em; min-height: 1.6em; font-variant-numeric: tabular-nums; color: var(--plum); margin: 6px 0 10px; }
.keypad .keys { display: grid; grid-template-columns: repeat(3, 72px); gap: 10px; justify-content: center; }
.keypad .key { width: 72px; height: 56px; font-size: 1.4rem; font-weight: 600; border: 1px solid var(--line); border-radius: 12px; background: #f7f5fd; color: var(--text); cursor: pointer; }
.keypad .key:active { background: var(--gold-light); }

/* lista cartomanti nella pagina di chiamata */
.call-layout { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 860px) { .call-layout { grid-template-columns: 1fr; } }
.call-layout .feed-box { margin: 0; }
.call-layout .op-list { grid-template-columns: 1fr; padding: 10px 14px 14px; max-height: 520px; overflow: auto; }
.call-layout .op { cursor: default; }
.call-layout .op.dialable { cursor: pointer; }
.call-layout .op.dialable:hover { border-color: var(--gold); background: #fff8e6; }
.call-layout .op-code { font-weight: 700; color: var(--plum); font-size: 1rem; }
.call-layout .feed-hint { padding: 10px 14px; font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); }

.app-footer { margin-top: 0; }

/* ---- come chiamare (numero del servizio) ---- */
.how-call { margin-bottom: 22px; }
.how-call-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.how-call .lbl { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted, #6f6473); margin-bottom: 4px; }
.how-call .svc-number { display: inline-block; font-family: "Playfair Display", Georgia, serif; font-size: 1.7rem; font-weight: 700; color: var(--plum-dark, #2a1b5e); text-decoration: none; margin-bottom: 6px; }
.how-call a.svc-number:hover { color: var(--gold, #b8902c); }

/* offerta evidenziata ("Il più richiesto") */
.opt-hl { border-color: rgba(232,163,23,.6); }
.opt-badge { position: absolute; top: -11px; left: 14px; background: var(--gold); color: #1d1340; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; }
.opts { margin-top: 8px; }
