/* ==========================================================================
   Portal Admin — Silva Telecom  ·  laranja (primária) + azul (secundária)
   ========================================================================== */
:root {
    --orange: #ff6a2b; --orange-2: #ff8a3d; --orange-dark: #e8531c;
    --blue: #1f6feb; --blue-2: #3f8cff;
    --grad: linear-gradient(135deg, #ff8a3d 0%, #ff5a1f 100%);
    --grad-orange: linear-gradient(150deg, #ff9048 0%, #f4590f 58%, #d8470a 100%);
    --ink: #191826; --muted: #6b7192; --line: #e7e9f2; --bg: #f3f4fa; --card: #fff;
    --ok: #16a34a; --ok-bg: #e8f7ee; --warn: #d97706; --warn-bg: #fdf1de; --danger: #e0393b; --danger-bg: #fdeaea;
    --r: 14px; --shadow: 0 10px 30px rgba(28,26,66,.10); --shadow-sm: 0 3px 12px rgba(28,26,66,.07);
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; border: none; background: none; color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.row { display: flex; gap: 12px; }
.grow { flex: 1; }
.right { margin-left: auto; }

/* ---- botões ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 11px; font-size: 15px; font-weight: 700; color: #fff; background: var(--grad); box-shadow: 0 8px 18px rgba(255,90,31,.28); transition: transform .08s; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .6; box-shadow: none; }
.btn--blue { background: var(--blue); box-shadow: 0 8px 18px rgba(31,111,235,.28); }
.btn--ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); box-shadow: none; }
.btn--danger { background: #fff; color: var(--danger); border: 1.5px solid #f3c9c9; box-shadow: none; }
.btn--sm { padding: 8px 13px; font-size: 13px; border-radius: 9px; box-shadow: none; }

/* ---- login ---- */
.login { min-height: 100%; display: grid; place-items: center; background: var(--grad-orange); padding: 24px; }
.login__box { width: 100%; max-width: 380px; background: #fff; border-radius: 20px; padding: 30px 26px; box-shadow: var(--shadow); }
.login__box img { height: 40px; margin: 0 auto 18px; filter: none; }
.login__box img.dark { display: none; }
.login__box h1 { font-size: 20px; text-align: center; margin-bottom: 4px; }
.login__box p.sub { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 20px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #3a3b52; }
.field input, .field select, .field textarea { width: 100%; padding: 12px 13px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 15px; background: #fff; color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(255,106,43,.12); }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.field.check { display: flex; align-items: center; gap: 10px; }
.field.check input { width: 20px; height: 20px; accent-color: var(--orange); }
.field.check label { margin: 0; }

/* ---- shell ---- */
.app { display: none; min-height: 100%; flex-direction: column; }
.app.active { display: flex; }
.topbar { background: var(--grad-orange); color: #fff; padding: 16px 20px; display: flex; align-items: center; gap: 14px; box-shadow: 0 6px 18px rgba(216,71,10,.25); }
.topbar img { height: 30px; }
.topbar .title { font-weight: 800; font-size: 16px; }
.topbar .title span { display: block; font-size: 11px; font-weight: 500; opacity: .85; }
.tabs { display: flex; gap: 6px; background: #fff; padding: 8px 16px 0; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; overflow-x: auto; }
.tabs button { padding: 12px 16px; font-size: 14px; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs button.active { color: var(--orange); border-bottom-color: var(--orange); }
main { flex: 1; padding: 20px 16px 60px; max-width: 820px; width: 100%; margin: 0 auto; }
.page { display: none; } .page.active { display: block; }

.page-head { display: flex; align-items: center; margin-bottom: 16px; }
.page-head h2 { font-size: 20px; }
.page-head p { color: var(--muted); font-size: 13px; }

/* ---- lista de itens ---- */
.item { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow-sm); margin-bottom: 12px; display: flex; align-items: center; gap: 14px; }
.item .ico { width: 44px; height: 44px; border-radius: 12px; flex: 0 0 auto; display: grid; place-items: center; font-size: 20px; }
.item .ico.promo { background: #fff0e7; } .item .ico.aviso { background: #eaf1ff; } .item .ico.plan { background: #e8f7ee; }
.item .info { flex: 1; min-width: 0; }
.item .info b { font-size: 15px; display: block; }
.item .info span { font-size: 13px; color: var(--muted); }
.item .actions { display: flex; gap: 8px; flex-shrink: 0; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge--on { color: var(--ok); background: var(--ok-bg); }
.badge--off { color: var(--muted); background: #eef0f6; }
.badge--star { color: var(--orange); background: #fff0e7; }

/* ---- card de configurações ---- */
.settings-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow-sm); margin-bottom: 16px; }
.settings-card h3 { font-size: 15px; margin-bottom: 4px; }
.settings-card > p { font-size: 13px; color: var(--muted); margin-bottom: 16px; }

/* ---- modal ---- */
.backdrop { position: fixed; inset: 0; background: rgba(15,14,38,.5); z-index: 40; opacity: 0; pointer-events: none; transition: .2s; }
.backdrop.show { opacity: 1; pointer-events: auto; }
.modal { position: fixed; z-index: 41; left: 50%; top: 50%; transform: translate(-50%, -46%); width: calc(100% - 32px); max-width: 460px; max-height: 88vh; overflow-y: auto; background: #fff; border-radius: 18px; padding: 22px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .2s; }
.modal.show { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
.modal h3 { font-size: 18px; margin-bottom: 16px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: #14113a; color: #fff; padding: 12px 18px; border-radius: 11px; font-size: 14px; font-weight: 600; z-index: 60; opacity: 0; pointer-events: none; transition: .25s; max-width: 90%; text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: #b3261e; }
.spinner { width: 16px; height: 16px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; color: var(--muted); padding: 30px; }
