/* ============================================================
   NORCOM+ · Central do Cliente · Design System v2
   Fonte: Syne (display) + DM Sans (corpo)
   Tema: Dark premium com acento azul elétrico
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@600;700;800&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --bg:          #060b18;
  --bg1:         #0c1428;
  --bg2:         #111d35;
  --bg3:         #16274a;
  --surface:     rgba(14,22,42,0.82);
  --border:      rgba(100,160,255,0.10);
  --border2:     rgba(100,160,255,0.18);

  --blue:        #3b82f6;
  --blue-glow:   rgba(59,130,246,0.22);
  --blue-light:  #60a5fa;
  --blue-dim:    rgba(59,130,246,0.12);

  --cyan:        #22d3ee;
  --cyan-dim:    rgba(34,211,238,0.10);

  --text:        #e2ecff;
  --text2:       #8ba3cc;
  --text3:       #506080;

  --ok:          #10b981;
  --ok-dim:      rgba(16,185,129,0.12);
  --warn:        #f59e0b;
  --warn-dim:    rgba(245,158,11,0.12);
  --danger:      #ef4444;
  --danger-dim:  rgba(239,68,68,0.12);
  --muted-dim:   rgba(255,255,255,0.06);

  --radius-sm:   10px;
  --radius:      16px;
  --radius-lg:   22px;
  --radius-xl:   28px;

  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  --nav-h:       68px;
  --header-h:    56px;
  --sat:         env(safe-area-inset-top,    0px);
  --sab:         env(safe-area-inset-bottom, 0px);

  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Background mesh ─────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 10% 20%, rgba(59,130,246,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 80%, rgba(34,211,238,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 100% 100% at 50% -10%, rgba(59,130,246,0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ── Utility ─────────────────────────────────────────────── */
.is-hidden { display: none !important; }

/* ── Header ──────────────────────────────────────────────── */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: calc(var(--header-h) + var(--sat));
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: var(--sat) 18px 0;
  background: rgba(6,11,24,0.92);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.header__logo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}

.header__logo span {
  color: var(--blue-light);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border2);
  background: var(--bg2);
  color: var(--text2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  position: relative;
  flex-shrink: 0;
}

.icon-btn:hover { background: var(--bg3); color: var(--text); border-color: var(--border2); transform: scale(1.05); }
.icon-btn:active { transform: scale(0.95); }

.icon-btn svg { width: 18px; height: 18px; stroke-width: 1.8; }

.notif-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--blue);
  border: 2px solid var(--bg);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59,130,246,0.6); }
  50%       { box-shadow: 0 0 0 5px rgba(59,130,246,0); }
}

/* ── Profile bar ─────────────────────────────────────────── */
.profile-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  margin-top: calc(var(--header-h) + var(--sat) + 8px);
  animation: fade-up 0.4s var(--ease-out) both;
}

.profile-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-dim), var(--cyan-dim));
  border: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--blue-light);
  flex-shrink: 0;
}

.profile-info { flex: 1; min-width: 0; }
.profile-name  { font-weight: 600; font-size: 15px; color: var(--text); }
.profile-cpf   { font-size: 12px; color: var(--text3); margin-top: 1px; }

/* ── Bottom Nav ──────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: calc(var(--nav-h) + var(--sab));
  display: flex;
  align-items: flex-start;          /* content sits at top of nav, sab adds space below */
  justify-content: space-around;
  background: rgba(6,11,24,0.92);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-top: 1px solid var(--border);
  z-index: 100;
  padding: 0 8px var(--sab);
}

.nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 0;
  color: var(--text3);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  transition: color 0.2s var(--ease-out);
  position: relative;
}

.nav__item svg { width: 22px; height: 22px; stroke-width: 1.7; transition: transform 0.2s var(--ease-spring); }

.nav__item.is-active {
  color: var(--blue-light);
}

.nav__item.is-active svg {
  transform: translateY(-2px);
}

.nav__item.is-active::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 28px; height: 2px;
  border-radius: 0 0 4px 4px;
  background: var(--blue);
  box-shadow: 0 0 12px var(--blue);
}

/* ── Main scroll area ────────────────────────────────────── */
.main {
  padding-top: calc(var(--header-h) + var(--sat) + 4px);
  padding-bottom: calc(var(--nav-h) + var(--sab) + 16px);
  min-height: 100dvh;
  position: relative;
  z-index: 1;
}

/* ── Page / Section padding ──────────────────────────────── */
.page {
  padding: 8px 16px 16px;
  animation: fade-up 0.35s var(--ease-out) both;
}

.section-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 10px;
  padding-left: 2px;
}

/* ── Card ────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  position: relative;
}

.card + .card,
.card + .section-label { margin-top: 12px; }

/* ── Featured bill card ───────────────────────────────────── */
.featured-card {
  background: linear-gradient(135deg, rgba(14,22,42,0.95) 0%, rgba(20,32,60,0.90) 100%);
  border: 1px solid var(--border2);
  border-radius: var(--radius-xl);
  padding: 22px;
  position: relative;
  overflow: hidden;
}

.featured-card::before {
  content: '';
  position: absolute;
  top: -40%; right: -20%;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59,130,246,0.10) 0%, transparent 70%);
  pointer-events: none;
}

.featured-card.is-overdue {
  border-color: rgba(239,68,68,0.25);
}

.featured-card.is-overdue::before {
  background: radial-gradient(circle, rgba(239,68,68,0.08) 0%, transparent 70%);
}

.featured-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 6px;
}

.featured-value {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 10px;
}

.featured-due {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 16px;
}

.featured-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg1);
  font-size: 11px;
  color: var(--text2);
}

.meta-pill svg { width: 12px; height: 12px; opacity: 0.7; }

/* ── Spark chart ─────────────────────────────────────────── */
.spark-wrap {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 80px;
  padding-bottom: 0;
}

.barWrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.bar {
  width: 100%;
  max-width: 36px;
  border-radius: 6px 6px 3px 3px;
  background: var(--bg3);
  transition: height 0.6s var(--ease-out);
}

.bar--paid { background: linear-gradient(180deg, var(--ok), rgba(16,185,129,0.6)); }
.bar--open { background: linear-gradient(180deg, var(--blue), rgba(59,130,246,0.5)); }
.bar--late { background: linear-gradient(180deg, var(--danger), rgba(239,68,68,0.5)); }

.barLabel {
  font-size: 10px;
  color: var(--text3);
  white-space: nowrap;
}

.spark-sub {
  font-size: 12px;
  color: var(--text3);
  margin-top: 8px;
}

/* ── Tags / Badges ────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  border: 1px solid transparent;
}

.tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

.tag--ok     { background: var(--ok-dim);     color: var(--ok);     border-color: rgba(16,185,129,0.2); }
.tag--ok::before { background: var(--ok); }
.tag--warn   { background: var(--warn-dim);   color: var(--warn);   border-color: rgba(245,158,11,0.2); }
.tag--warn::before { background: var(--warn); }
.tag--danger { background: var(--danger-dim); color: var(--danger); border-color: rgba(239,68,68,0.2); }
.tag--danger::before { background: var(--danger); }
.tag--muted  { background: var(--muted-dim);  color: var(--text3);  border-color: var(--border); }
.tag--muted::before { background: var(--text3); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  white-space: nowrap;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: white;
  opacity: 0;
  transition: opacity 0.15s;
}

.btn:active::after { opacity: 0.06; }

.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn--primary {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 4px 20px rgba(59,130,246,0.30), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn--primary:hover { box-shadow: 0 6px 28px rgba(59,130,246,0.45); transform: translateY(-1px); }
.btn--primary:active { transform: translateY(0); }

.btn--secondary {
  background: var(--bg2);
  color: var(--text2);
  border-color: var(--border2);
}
.btn--secondary:hover { background: var(--bg3); color: var(--text); }

.btn--danger {
  background: var(--danger-dim);
  color: var(--danger);
  border-color: rgba(239,68,68,0.2);
}
.btn--danger:hover { background: rgba(239,68,68,0.2); }

.btn--sm { padding: 8px 14px; font-size: 13px; width: auto; }

.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }

/* ── Pay button special ───────────────────────────────────── */
#btnPay {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #fff;
  border: none;
  box-shadow: 0 4px 24px rgba(14,165,233,0.35);
}
#btnPay:hover:not(:disabled) {
  box-shadow: 0 6px 32px rgba(14,165,233,0.50);
  transform: translateY(-1px);
}

/* ── List items ───────────────────────────────────────────── */
.item {
  background: var(--bg1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: border-color 0.2s;
}

.item:hover { border-color: var(--border2); }

.item + .item { margin-top: 8px; }

.item__top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }

.item__title { font-weight: 600; font-size: 14px; color: var(--text); }
.item__meta  { font-size: 12px; color: var(--text2); margin-top: 4px; line-height: 1.5; }
.item__value { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--text); white-space: nowrap; }
.item__right { text-align: right; flex-shrink: 0; }

.item__actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }

.linkBtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  background: var(--blue-dim);
  border: 1px solid rgba(59,130,246,0.2);
  color: var(--blue-light);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s var(--ease-out);
}
.linkBtn:hover { background: rgba(59,130,246,0.22); transform: translateY(-1px); }
.linkBtn svg { width: 14px; height: 14px; }

/* ── Announcement banner ─────────────────────────────────── */
.ann-banner {
  margin: 0 16px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(245,158,11,0.10), rgba(245,158,11,0.06));
  border: 1px solid rgba(245,158,11,0.22);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: fade-up 0.3s var(--ease-out) both;
}

.ann-banner.ann--danger {
  background: linear-gradient(135deg, rgba(239,68,68,0.10), rgba(239,68,68,0.06));
  border-color: rgba(239,68,68,0.22);
}

.ann-banner.ann--info {
  background: linear-gradient(135deg, rgba(59,130,246,0.10), rgba(59,130,246,0.06));
  border-color: rgba(59,130,246,0.22);
}

.ann-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--warn-dim);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}

.ann-body { flex: 1; min-width: 0; }
.ann-title { font-weight: 700; font-size: 14px; color: var(--text); }
.ann-msg   { font-size: 13px; color: var(--text2); margin-top: 2px; }

.ann-close {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--muted-dim);
  border: none;
  color: var(--text3);
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}
.ann-close:hover { background: var(--bg3); color: var(--text); }

/* ── Quick actions grid ───────────────────────────────────── */
.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.quick-item {
  background: var(--bg1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  font-family: var(--font-body);
  color: var(--text);
  text-align: left;
  text-decoration: none;
}

.quick-item:hover { background: var(--bg2); border-color: var(--border2); transform: translateY(-2px); }
.quick-item:active { transform: translateY(0); }

.quick-item__icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}

.quick-item__icon--blue  { background: var(--blue-dim); }
.quick-item__icon--cyan  { background: var(--cyan-dim); }
.quick-item__icon--ok    { background: var(--ok-dim); }
.quick-item__icon--warn  { background: var(--warn-dim); }

.quick-item__label { font-size: 13px; font-weight: 600; color: var(--text); }
.quick-item__desc  { font-size: 11px; color: var(--text3); margin-top: -4px; }

/* ── Login view ───────────────────────────────────────────── */
#view-login {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  /* respect top safe area on login too (no fixed header here) */
  padding: calc(var(--sat) + 32px) 24px calc(var(--sab) + 32px);
  position: relative;
  z-index: 1;
}

.login-emblem {
  width: 84px; height: 84px;
  border-radius: 26px;
  background: linear-gradient(145deg, #0c1f48, #0f2a5e);
  border: 1.5px solid rgba(59,130,246,0.35);
  box-shadow:
    0 0 0 8px rgba(59,130,246,0.07),
    0 20px 60px rgba(0,0,0,0.5),
    0 0 40px rgba(59,130,246,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  animation: emblem-in 0.7s var(--ease-spring) both;
}

.login-emblem svg {
  width: 48px; height: 48px;
}

@keyframes emblem-in {
  from { opacity: 0; transform: scale(0.7) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.login-logo {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 6px;
  color: var(--text);
  animation: fade-up 0.5s var(--ease-out) 0.1s both;
}

.login-logo span { color: var(--blue-light); }

.login-tagline {
  font-size: 14px;
  color: var(--text3);
  margin-bottom: 36px;
  text-align: center;
  animation: fade-up 0.5s var(--ease-out) 0.18s both;
}

.login-box {
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 32px 80px rgba(0,0,0,0.4), 0 0 0 1px rgba(59,130,246,0.06);
  animation: fade-up 0.5s var(--ease-out) 0.26s both;
}

.login-box label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 8px;
}

.login-error {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--danger-dim);
  border: 1px solid rgba(239,68,68,0.2);
  color: var(--danger);
  font-size: 13px;
}

.login-footer {
  margin-top: 20px;
  font-size: 12px;
  color: var(--text3);
  text-align: center;
  animation: fade-up 0.5s var(--ease-out) 0.36s both;
}

/* ── Inputs ───────────────────────────────────────────────── */
.input {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border2);
  background: rgba(6,11,24,0.60);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}

.input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

.input::placeholder { color: var(--text3); }

textarea.input { min-height: 90px; resize: vertical; }
select.input { cursor: pointer; }

/* ── Support form ─────────────────────────────────────────── */
.support-section { display: flex; flex-direction: column; gap: 10px; }

.whatsapp-btn {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
  border: none;
  box-shadow: 0 4px 20px rgba(34,197,94,0.25);
}
.whatsapp-btn:hover { box-shadow: 0 6px 28px rgba(34,197,94,0.4); transform: translateY(-1px); }

/* ── Speed tab ─────────────────────────────────────────────── */
.speed-hero {
  text-align: center;
  padding: 32px 16px;
}

.speed-icon {
  width: 72px; height: 72px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--blue-dim), var(--cyan-dim));
  border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  margin: 0 auto 16px;
  box-shadow: 0 8px 32px rgba(59,130,246,0.15);
}

.speed-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
}

.speed-desc { color: var(--text2); font-size: 14px; margin-bottom: 24px; }

/* ── Notification panel ───────────────────────────────────── */
.notif-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.notif-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.notif-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(340px, 100vw);
  background: var(--bg1);
  border-left: 1px solid var(--border);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease-out);
  overflow: hidden;
}

.notif-panel.is-open { transform: translateX(0); }

.notif-header {
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notif-header h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
}

.notif-list { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }

.notifItem {
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--bg2);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text2);
  line-height: 1.5;
}

.notifItem strong { display: block; color: var(--text); font-weight: 600; margin-bottom: 3px; font-size: 14px; }

.notifAction {
  padding: 14px;
  border-radius: var(--radius);
  background: var(--bg2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.notifAction:hover { background: var(--bg3); border-color: var(--border2); }

.notifAction__icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--blue-dim);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.notifAction__body { flex: 1; }
.notifAction__title { font-weight: 600; font-size: 13px; }
.notifAction__desc  { font-size: 12px; color: var(--text3); margin-top: 2px; }

.pushStateBadge {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--bg3);
  color: var(--text3);
  border: 1px solid var(--border);
}
.pushStateBadge.on { background: var(--ok-dim); color: var(--ok); border-color: rgba(16,185,129,0.2); }

/* ── Toast ───────────────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: calc(var(--nav-h) + var(--sab) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: rgba(20,32,60,0.95);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  z-index: 300;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  backdrop-filter: blur(12px);
  white-space: nowrap;
  transition: opacity 0.3s, transform 0.3s;
}
#toast.is-hidden { opacity: 0; transform: translateX(-50%) translateY(12px); pointer-events: none; }

/* ── Loading overlay ─────────────────────────────────────── */
#loading {
  position: fixed;
  inset: 0;
  background: rgba(6,11,24,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 400;
  backdrop-filter: blur(6px);
}

.loader {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 3px solid rgba(59,130,246,0.15);
  border-top-color: var(--blue);
  animation: spin 0.75s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── PWA Update toast ────────────────────────────────────── */
#pwaUpdateToast {
  position: fixed;
  bottom: calc(var(--nav-h) + 12px);
  left: 12px; right: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--bg2);
  border: 1px solid var(--border2);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 300;
  animation: fade-up 0.35s var(--ease-out) both;
}

.pwaToast__text { flex: 1; }
.pwaToast__title { font-weight: 700; font-size: 14px; }
.pwaToast__desc { font-size: 12px; color: var(--text2); margin-top: 2px; }
.pwaToast__btn { padding: 8px 16px; border-radius: var(--radius-sm); background: var(--blue); border: none; color: white; font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; }

/* ── Animations ──────────────────────────────────────────── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-stagger > * {
  animation: fade-up 0.4s var(--ease-out) both;
}

.animate-stagger > *:nth-child(1) { animation-delay: 0ms; }
.animate-stagger > *:nth-child(2) { animation-delay: 60ms; }
.animate-stagger > *:nth-child(3) { animation-delay: 120ms; }
.animate-stagger > *:nth-child(4) { animation-delay: 180ms; }
.animate-stagger > *:nth-child(5) { animation-delay: 240ms; }

/* ── Plan/contract card ───────────────────────────────────── */
.contract-card {
  background: linear-gradient(135deg, var(--bg1), var(--bg2));
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.contract-card + .contract-card { margin-top: 8px; }

.contract-id {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
}

.contract-meta { font-size: 12px; color: var(--text2); margin-top: 3px; }

/* ── Divider ─────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 14px 0;
}

/* ── Header row inside card ───────────────────────────────── */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
}

/* ── Skeleton loading ─────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg,
    var(--bg2) 25%,
    var(--bg3) 50%,
    var(--bg2) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

.skel-card {
  background: var(--bg1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.skel-card + .skel-card { margin-top: 8px; }

.skel-line { height: 13px; border-radius: 6px; margin-bottom: 8px; }
.skel-line:last-child { margin-bottom: 0; }
.skel-w-80 { width: 80%; }
.skel-w-50 { width: 50%; }
.skel-w-30 { width: 30%; }

/* ── PWA install banner ───────────────────────────────────── */
#pwaInstallBanner {
  position: fixed;
  bottom: calc(var(--nav-h) + var(--sab) + 12px);
  left: 12px; right: 12px;
  background: linear-gradient(135deg, rgba(14,22,42,0.97), rgba(16,27,55,0.97));
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 250;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(59,130,246,0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: slide-up 0.45s var(--ease-spring) both;
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pwa-banner__icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: linear-gradient(145deg, #0c1f48, #0f2a5e);
  border: 1px solid rgba(59,130,246,0.3);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(59,130,246,0.2);
}

.pwa-banner__icon svg { width: 28px; height: 28px; }

.pwa-banner__body { flex: 1; min-width: 0; }
.pwa-banner__title { font-weight: 700; font-size: 14px; color: var(--text); }
.pwa-banner__desc  { font-size: 12px; color: var(--text3); margin-top: 2px; }

.pwa-banner__actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

.pwa-install-btn {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: var(--blue);
  border: none;
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(59,130,246,0.35);
  transition: all 0.2s var(--ease-out);
}
.pwa-install-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(59,130,246,0.5); }

.pwa-dismiss-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text3);
  font-size: 14px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.pwa-dismiss-btn:hover { color: var(--text); background: var(--bg3); }

/* ── Pull-to-refresh indicator ────────────────────────────── */
#pullIndicator {
  position: fixed;
  top: calc(var(--header-h) + var(--sat));
  left: 50%;
  transform: translateX(-50%) translateY(-60px);
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg2);
  border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  z-index: 90;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  transition: transform 0.2s var(--ease-out), opacity 0.2s;
  opacity: 0;
  pointer-events: none;
}

#pullIndicator.is-visible {
  opacity: 1;
}

#pullIndicator.is-refreshing {
  transform: translateX(-50%) translateY(12px);
  opacity: 1;
}

#pullIndicator svg {
  width: 18px; height: 18px;
  color: var(--blue-light);
  transition: transform 0.3s;
}

#pullIndicator.is-refreshing svg {
  animation: spin 0.7s linear infinite;
}

/* ── CPF input formatted display ─────────────────────────── */
.cpf-display {
  font-size: 22px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text);
  text-align: center;
  padding: 16px;
  border-radius: var(--radius);
  border: 2px solid var(--border2);
  background: rgba(6,11,24,0.6);
  margin-bottom: 6px;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: text;
}

.cpf-display:focus-within,
.cpf-display.is-active {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(59,130,246,0.12);
}

.cpf-display .cpf-placeholder {
  color: var(--text3);
  font-size: 16px;
  letter-spacing: 1px;
  font-family: var(--font-body);
  font-weight: 400;
}

.cpf-hint {
  text-align: center;
  font-size: 12px;
  color: var(--text3);
  margin-bottom: 14px;
}

/* ── Bill item — status left-border accent ────────────────── */
.item.item--overdue { border-left: 3px solid var(--danger); }
.item.item--open    { border-left: 3px solid var(--blue); }
.item.item--paid    { border-left: 3px solid var(--ok); }
.item.item--obs     { border-left: 3px solid var(--warn); }

/* ── Featured card shimmer on load ───────────────────────── */
.featured-card.is-loading .featured-value,
.featured-card.is-loading .featured-due,
.featured-card.is-loading .featured-title {
  color: transparent;
  background: linear-gradient(90deg, var(--bg2) 25%, var(--bg3) 50%, var(--bg2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 6px;
  user-select: none;
}

/* ── Info row (support + contracts) ─────────────────────── */
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.info-label {
  font-size: 12px;
  color: var(--text3);
  flex-shrink: 0;
  padding-top: 1px;
}

.info-value {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  text-align: right;
  word-break: break-word;
}

/* ── Stat mini (inside contracts card) ───────────────────── */
.stat-mini {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  text-align: center;
}

.stat-mini__label {
  font-size: 11px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 4px;
}

.stat-mini__val {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}

/* ── Tip row (speed tab tips) ────────────────────────────── */
.tip-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.tip-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.tip-title { font-weight: 600; font-size: 14px; }
.tip-desc  { font-size: 13px; color: var(--text2); margin-top: 2px; }

/* ── Responsive tweaks ────────────────────────────────────── */
@media (min-width: 480px) {
  .quick-grid { grid-template-columns: repeat(4, 1fr); }
  .page { padding: 12px 20px 20px; }
}

@media (min-width: 768px) {
  .main { max-width: 600px; margin: 0 auto; }
  .header { justify-content: center; }
  .header .header__logo { position: absolute; left: 50%; transform: translateX(-50%); }
  .header .header__actions { margin-left: auto; }
  .bottom-nav { max-width: 600px; left: 50%; transform: translateX(-50%); border-radius: var(--radius-lg) var(--radius-lg) 0 0; border: 1px solid var(--border); border-bottom: none; }
}
