/* ============================================================
   CNX Telecom — Central do Assinante
   Dark Blue Theme | Accent: Cyan | Brand: #FF4414
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,700;12..96,800&family=JetBrains+Mono:wght@400;500;600&display=swap');

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

:root {
  /* Brand */
  --cnx: #FF5A1F;
  --cnx-hot: #FF9A6E;             /* laranja claro p/ gradiente */
  --cnx-hover: #E64A12;
  --cnx-dim: #FFEEE5;
  --cnx-border: #F5D8C8;
  --luz: #FF9A6E;

  /* Backgrounds (bege quente claro) */
  --bg: #EDE8E0;
  --surface-1: #F6F4EF;
  --surface-2: #FFFFFF;
  --surface-3: #EEEAE2;

  /* Borders */
  --border: #EDE7DD;
  --border-hover: #E0D8CC;

  /* Text (cinzas quentes escuros) */
  --text: #221F1B;
  --text-secondary: #6C6459;
  --text-muted: #A29A8E;

  /* Accent = laranja (primário interativo) */
  --accent: #FF5A1F;
  --accent-dim: #FFEEE5;
  --accent-text: #E14C11;
  --accent-border: #F5D8C8;

  /* Semantic */
  --success: #17A06E;
  --success-bg: #E1F3EC;
  --success-text: #12855F;
  --success-border: #CDEBDD;
  --warning: #E0A020;
  --warning-bg: #FBF0DA;
  --warning-text: #B57E12;
  --warning-border: #F0E0BE;
  --danger: #D64545;
  --danger-bg: #FBE7E7;
  --danger-text: #B03A3A;
  --danger-border: #F3C9C9;

  /* Layout */
  --sidebar-w: 220px;
  --radius: 12px;
  --radius-sm: 7px;
  --radius-xs: 4px;

  /* Shadows (suaves e quentes) */
  --shadow: 0 1px 3px rgba(60,50,35,0.06);
  --shadow-md: 0 10px 24px -12px rgba(60,50,35,0.16);
  --shadow-lg: 0 40px 80px -40px rgba(60,50,35,0.30);

  /* Fonts */
  --display: 'Bricolage Grotesque', 'Plus Jakarta Sans', sans-serif;
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', monospace;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Títulos com a fonte display do site */
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -0.02em; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--accent); color: white; }
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 2px; }

.page { display: none; }
.page.active { display: flex; }
.hidden { display: none !important; }

/* ============ SPINNER ============ */
.spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid rgba(0,0,0,0.08); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .6s linear infinite;
}
.spinner-lg {
  width: 28px; height: 28px;
  border: 2px solid var(--surface-3); border-top-color: var(--accent);
}
@keyframes spin { to { transform: rotate(360deg); } }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.loading-box { text-align: center; padding: 40px 16px; color: var(--text-secondary); }
.loading-box p { margin-top: 10px; font-size: 12px; }

/* ============ LOGIN ============ */
#login-page { display: none; }
#login-page.active { display: flex; }

.login-container {
  min-height: 100vh; width: 100%; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 55% at 50% -10%, rgba(255,68,20,0.16), transparent 60%),
    radial-gradient(ellipse 70% 50% at 88% 112%, rgba(95,227,255,0.07), transparent 60%),
    radial-gradient(ellipse 60% 45% at 8% 105%, rgba(255,122,0,0.08), transparent 60%);
}

.login-card {
  position: relative;
  background: linear-gradient(170deg, rgba(255,247,242,0.04), rgba(255,247,242,0.01)), var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 20px; padding: 40px 36px;
  width: 100%; max-width: 400px;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(255,68,20,0.10);
  animation: slideUp .4s var(--ease);
}
/* fio neon no topo do card */
.login-card::before {
  content: ''; position: absolute; top: 0; left: 24px; right: 24px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--cnx), var(--cnx-hot), transparent);
  box-shadow: 0 0 12px var(--cnx);
}

.login-header { text-align: center; margin-bottom: 28px; }

.logo-icon {
  width: 56px; height: 56px; margin: 0 auto 14px;
  background: transparent;
  border: none;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
}

.login-header h1 { font-size: 20px; font-weight: 600; color: var(--text); letter-spacing: -0.3px; }
.login-header p { color: var(--cnx); font-size: 10px; margin-top: 6px; text-transform: uppercase; letter-spacing: 2.5px; font-weight: 700; font-family: var(--mono); }

/* Input with icon */
.input-icon-wrap { position: relative; }
.input-icon-wrap .input-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none;
  transition: color .2s var(--ease);
}
.input-group .input-icon-wrap input { padding-left: 42px; }
.input-icon-wrap:has(input:focus) .input-icon { color: var(--accent); }

.input-group { margin-bottom: 16px; }
.input-group label {
  display: block; font-size: 10px; font-weight: 600;
  color: var(--text-muted); margin-bottom: 5px;
  text-transform: uppercase; letter-spacing: 0.1em;
}
.input-group input, .input-group select {
  width: 100%; padding: 9px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px; font-family: var(--font);
  color: var(--text);
  transition: all .2s var(--ease);
  outline: none;
}
.input-group input::placeholder { color: var(--text-muted); }
.input-group input:focus, .input-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
  background: var(--surface-3);
}

/* ============ BUTTONS ============ */
.btn-primary {
  width: 100%; padding: 11px 20px;
  background: linear-gradient(120deg, var(--cnx), var(--cnx-hot)); color: #fff;
  border: none; border-radius: 999px;
  font-size: 13px; font-weight: 700; font-family: var(--font); letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255,68,20,0.35);
  transition: all .18s var(--ease);
}
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 8px 28px rgba(255,68,20,0.5); }
.btn-primary:active { transform: translateY(0) scale(0.99); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm { width: auto; padding: 5px 12px; font-size: 11px; }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  background: var(--accent-dim); color: var(--accent-text);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 600; font-family: var(--font);
  cursor: pointer; transition: all .15s var(--ease);
}
.btn-secondary:hover { background: rgba(255,68,20,0.22); border-color: var(--accent-border); }

.btn-warning {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  background: var(--warning); color: #1a1a1f;
  border: none; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 600; font-family: var(--font);
  cursor: pointer; transition: all .15s var(--ease);
}
.btn-warning:hover { background: #d97706; }
.btn-warning:disabled { opacity: .5; cursor: not-allowed; }

.error-msg {
  margin-top: 12px; padding: 8px 12px;
  background: var(--danger-bg); border: 1px solid var(--danger-border);
  border-radius: var(--radius-sm); color: var(--danger-text); font-size: 12px; text-align: center;
}
.success-msg {
  padding: 8px 12px;
  background: var(--success-bg); border: 1px solid var(--success-border);
  border-radius: var(--radius-sm); color: var(--success-text); font-size: 12px;
}

/* ============ APP LAYOUT ============ */
#app-page { min-height: 100vh; flex-direction: row; }

/* Sidebar */
.sidebar {
  position: fixed; top: 0; left: 0; width: var(--sidebar-w); height: 100vh;
  background: var(--surface-1);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  z-index: 100; transition: transform .3s var(--ease);
}

.sidebar-header {
  display: flex; align-items: center;
  padding: 18px 16px 16px;
  border-bottom: 1px solid var(--border);
}
.sidebar-fulllogo { width: 100%; max-width: 172px; height: auto; display: block; }
.sidebar-logo {
  width: 28px; height: 28px; border-radius: var(--radius-sm);
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* Sidebar Profile */
.sidebar-profile {
  display: flex; align-items: center; gap: 9px;
  padding: 10px; margin: 4px 10px 0;
  background: var(--surface-2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer; text-decoration: none;
  transition: background .15s var(--ease);
}
.sidebar-profile:hover { background: var(--surface-3); }
.profile-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--cnx);
  color: white; font-weight: 600; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; text-transform: uppercase;
}
.profile-info { display: flex; flex-direction: column; min-width: 0; }
.profile-name {
  font-size: 12px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.profile-label { font-size: 10px; color: var(--accent-text); text-transform: uppercase; letter-spacing: .08em; }

.sidebar-nav { flex: 1; padding: 8px 8px; display: flex; flex-direction: column; gap: 1px; overflow-y: auto; }

/* Nav Section Labels */
.nav-section-label {
  font-size: 9px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.15em;
  padding: 12px 12px 4px; display: block;
}

.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  border-radius: 10px;
  color: #514A40; text-decoration: none;
  font-size: 13.5px; font-weight: 600;
  transition: all .15s var(--ease);
  border: none; background: none; cursor: pointer; width: 100%; text-align: left; font-family: var(--font);
  position: relative;
}
.nav-item svg { width: 16px; height: 16px; opacity: 0.75; flex-shrink: 0; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active {
  background: linear-gradient(90deg, var(--accent-dim), transparent);
  color: var(--accent-text);
}
.nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 4px; bottom: 4px;
  width: 3px; border-radius: 3px;
  background: linear-gradient(var(--cnx), var(--cnx-hot));
  box-shadow: 0 0 10px var(--cnx);
}
.nav-item.active svg { opacity: 1; }

.nav-badge {
  margin-left: auto; background: var(--cnx-dim); color: var(--cnx);
  font-size: 9px; font-weight: 600;
  padding: 2px 6px; border-radius: 20px; min-width: 18px; text-align: center;
  border: 1px solid var(--cnx-border);
}

.sidebar-footer { padding: 8px; border-top: 1px solid var(--border); }
.logout-item { color: var(--text-muted); }
.logout-item:hover { color: var(--danger-text); background: var(--danger-bg); }

/* Mobile Header */
.mobile-header {
  display: none; position: sticky; top: 0; z-index: 50;
  background: var(--surface-1);
  border-bottom: 1px solid var(--border);
  padding: 10px 14px; justify-content: center; align-items: center;
  padding-top: calc(10px + env(safe-area-inset-top, 0));
}
.mobile-logo { height: 30px; width: auto; display: block; }
.mobile-header .menu-toggle[hidden], .mobile-header .mobile-user[hidden] { display: none; }
.menu-toggle { background: none; border: none; color: var(--text); cursor: pointer; padding: 4px; }

/* ===== BOTTOM TAB BAR (só no mobile) ===== */
.tabbar { display: none; }
/* A tab bar vive no <body> (fora do #app-page), então precisa sumir na tela de
   login — senão aparece antes de logar. */
#login-page.active ~ .tabbar { display: none !important; }
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; cursor: pointer; padding: 8px 4px;
  color: var(--text-muted); font-family: var(--font); font-size: 10px; font-weight: 600;
  transition: color .15s;
}
.tab-item svg { width: 22px; height: 22px; }
.tab-item.active { color: var(--cnx); }
.mobile-title { font-size: 14px; font-weight: 600; flex: 1; }
.mobile-user { font-size: 11px; color: var(--text-muted); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sidebar-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); z-index: 99; }

/* Topbar */
.topbar {
  padding: 12px 20px;
  margin: -18px -20px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-1);
  display: flex; align-items: center; justify-content: space-between;
}
.topbar-left { display: flex; align-items: center; gap: 8px; }
.topbar-welcome { display: flex; flex-direction: column; }
.topbar-title { font-size: 14px; font-weight: 600; color: var(--text); }
.topbar-sub { font-size: 11px; color: var(--text-muted); }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.status-pill {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 10px; background: var(--success-bg);
  border: 1px solid var(--success-border);
  border-radius: 20px; font-size: 11px; color: var(--success-text);
}
.status-pill.offline { background: var(--danger-bg); border-color: var(--danger-border); color: var(--danger-text); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); animation: pulse 2s infinite; }
.status-pill.offline .status-dot { background: var(--danger); }

/* Icon buttons (topbar) */
.icon-btn {
  width: 28px; height: 28px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .15s var(--ease);
}
.icon-btn:hover { background: var(--surface-3); }
.icon-btn svg { width: 13px; height: 13px; fill: var(--text-secondary); }

/* Search box (table header) */
.search-box {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 10px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.search-box svg { width: 11px; height: 11px; fill: var(--text-muted); flex-shrink: 0; }
.search-box input {
  background: none; border: none; outline: none;
  font-family: var(--font); font-size: 11px;
  color: var(--text); width: 120px;
}
.search-box input::placeholder { color: var(--text-muted); }

/* Main Content */
.main-content {
  margin-left: var(--sidebar-w);
  padding: 18px 20px;
  min-height: 100vh;
  flex: 1;
  width: calc(100% - var(--sidebar-w));
  overflow-x: hidden;
}

.content-page { display: none; width: 100%; }
.content-page.active { display: flex; flex-direction: column; gap: 14px; animation: fadeIn .25s var(--ease); }

.page-header { margin-bottom: 4px; }
.page-header h1 { font-size: 15px; font-weight: 600; color: var(--text); }
.page-header p { color: var(--text-secondary); font-size: 11px; margin-top: 2px; }

#dash-content { display: flex; flex-direction: column; gap: 14px; }

/* ============ DASHBOARD ============ */

/* Section Header */
.sec-hdr { display: flex; align-items: center; justify-content: space-between; }
.sec-title { font-size: 15px; font-weight: 600; color: var(--text); }
.sec-sub { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

/* Metric Grid */
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; width: 100%; }
.mcard {
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  transition: border-color .2s;
}
.mcard:hover { border-color: var(--border-hover); }
.mcard-label { font-size: 10px; font-weight: 600; color: var(--text-secondary); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px; }
.mcard-val { font-size: 22px; font-weight: 600; font-family: var(--mono); line-height: 1; }
.mcard-val.green { color: var(--success-text); }
.mcard-val.yellow { color: var(--warning-text); }
.mcard-val.red { color: var(--danger-text); }
.mcard-val.accent { color: var(--accent-text); }
.mcard-delta { font-size: 10px; margin-top: 5px; color: var(--text-muted); }
.mcard-delta.up { color: var(--success-text); }
.mcard-delta.down { color: var(--danger-text); }

/* Table Card */
.tcard { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; width: 100%; }
.tcard-hdr { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.tcard-title { font-size: 12px; font-weight: 600; color: var(--text); }
table { width: 100%; border-collapse: collapse; }
thead tr { border-bottom: 1px solid var(--border); }
th { padding: 8px 16px; font-size: 10px; font-weight: 600; color: var(--text-muted); letter-spacing: .1em; text-transform: uppercase; text-align: left; }
tbody tr { border-bottom: 1px solid var(--border); transition: background .1s; cursor: pointer; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }
td { padding: 10px 16px; font-size: 12px; color: var(--text-secondary); }
td:first-child { color: var(--text); font-weight: 500; }

/* Tags */
.tag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 20px; font-size: 10px; font-weight: 600; letter-spacing: .05em; }
.tag.green { background: var(--success-bg); color: var(--success-text); border: 1px solid var(--success-border); }
.tag.yellow { background: var(--warning-bg); color: var(--warning-text); border: 1px solid var(--warning-border); }
.tag.red { background: var(--danger-bg); color: var(--danger-text); border: 1px solid var(--danger-border); }
.tag.accent { background: var(--accent-dim); color: var(--accent-text); border: 1px solid var(--accent-border); }

/* Bottom Row */
.bottom-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }

/* Fatura Card (bottom) */
.fcard { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.fcard-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.fcard-title { font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.fcard-icon { width: 24px; height: 24px; border-radius: var(--radius-sm); background: var(--cnx-dim); border: 1px solid var(--cnx-border); display: flex; align-items: center; justify-content: center; }
.fcard-icon svg { width: 12px; height: 12px; fill: var(--cnx); }
.fcard-body { display: flex; align-items: center; gap: 20px; }
.ff { flex: 1; }
.ff-label { font-size: 9px; font-weight: 600; color: var(--text-muted); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 4px; }
.ff-val { font-size: 18px; font-weight: 600; font-family: var(--mono); }
.ff-date { font-size: 15px; font-weight: 600; font-family: var(--mono); }
.divv { width: 1px; height: 32px; background: var(--border); }
.btn-pay {
  padding: 8px 16px; background: var(--cnx); color: white; border: none;
  border-radius: var(--radius-sm); font-family: var(--font); font-size: 12px;
  font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 6px;
  transition: background .15s;
}
.btn-pay:hover { background: var(--cnx-hover); }
.btn-pay svg { width: 12px; height: 12px; fill: white; }

/* Connection Card (bottom) */
.ccard { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.ccard-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.ccard-title { font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.net-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); }
.net-row:last-child { border-bottom: none; }
.net-label { font-size: 11px; color: var(--text-secondary); }
.net-val { font-size: 11px; font-family: var(--mono); color: var(--text); font-weight: 600; }
.net-val.green { color: var(--success-text); }
.net-val.accent { color: var(--accent-text); }
.net-bar-wrap { width: 80px; height: 4px; background: var(--surface-3); border-radius: 2px; overflow: hidden; }
.net-bar { height: 100%; border-radius: 2px; background: var(--accent); }

/* ============ TABS ============ */
.tabs {
  display: flex; gap: 2px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 3px;
  margin-bottom: 14px;
}
.tab {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 7px 10px;
  background: transparent; border: none;
  border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 500; font-family: var(--font);
  color: var(--text-secondary); cursor: pointer;
  transition: all .15s var(--ease);
}
.tab:hover { color: var(--text); background: var(--surface-2); }
.tab.active {
  background: var(--accent);
  color: white;
  font-weight: 600;
}
.tab.active svg { stroke: white; }

.badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 10px; font-size: 10px; font-weight: 600;
}
.badge-red { background: var(--danger-bg); color: var(--danger-text); }
.badge-blue { background: var(--accent-dim); color: var(--accent-text); }
.tab.active .badge-red, .tab.active .badge-blue { background: rgba(255,255,255,0.2); color: white; }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ============ FATURAS ============ */
.faturas-list, .cards-list { display: flex; flex-direction: column; gap: 10px; }

.fatura-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
  border-left: 2px solid var(--text-muted);
  transition: border-color .2s var(--ease);
}
.fatura-card:hover { border-color: var(--border-hover); }
.fatura-card.vencida { border-left-color: var(--danger); }
.fatura-card.aberta { border-left-color: var(--warning); }
.fatura-card.paga { border-left-color: var(--success); }

.fatura-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.fatura-valor { font-size: 18px; font-weight: 600; font-family: var(--mono); color: var(--text); }

.fatura-status {
  padding: 2px 8px; border-radius: 20px;
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
}
.status-vencida { background: var(--danger-bg); color: var(--danger-text); border: 1px solid var(--danger-border); }
.status-aberta { background: var(--warning-bg); color: var(--warning-text); border: 1px solid var(--warning-border); }
.status-paga { background: var(--success-bg); color: var(--success-text); border: 1px solid var(--success-border); }

.fatura-detalhes { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 12px; font-size: 12px; color: var(--text-secondary); }
.fatura-detalhes span { display: flex; align-items: center; gap: 4px; }

.fatura-acoes { display: flex; gap: 6px; flex-wrap: wrap; }

.btn-pix, .btn-boleto, .btn-cartao, .btn-comprovante {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: var(--radius-sm);
  font-size: 11px; font-weight: 600; font-family: var(--font);
  cursor: pointer; border: none;
  transition: all .15s var(--ease);
}
.btn-pix {
  background: var(--success-bg); color: var(--success-text);
  border: 1px solid var(--success-border);
}
.btn-pix:hover { background: rgba(158,238,133,0.2); }

.btn-boleto {
  background: var(--surface-2); color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-boleto:hover { background: var(--surface-3); color: var(--text); }

.btn-cartao {
  background: var(--accent-dim); color: var(--accent-text);
  border: 1px solid var(--accent-border);
}
.btn-cartao:hover { background: rgba(18,176,218,0.25); }

.btn-comprovante {
  background: var(--surface-2); color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-comprovante:hover { background: var(--surface-3); color: var(--text); }

/* ============ CARTAO MODAL ============ */
.modal-card h3 { display: flex; align-items: center; gap: 8px; }
.card-fatura-info {
  background: var(--cnx-dim);
  border: 1px solid var(--cnx-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px; margin: 14px 0;
}
.card-info-row { display: flex; justify-content: space-between; align-items: center; }
.card-info-row.sub { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.card-info-valor { font-size: 18px; font-weight: 600; font-family: var(--mono); color: var(--cnx); }

.card-form { display: flex; flex-direction: column; gap: 10px; }
.card-form .input-group { display: flex; flex-direction: column; gap: 4px; margin-bottom: 0; }
.card-form .input-group label { font-size: 11px; font-weight: 600; color: var(--text-secondary); text-transform: none; letter-spacing: 0; }
.card-form .input-group input, .card-form .input-group select {
  padding: 8px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px; font-family: var(--font); color: var(--text);
  outline: none; transition: all .2s var(--ease);
}
.card-form .input-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%238b91a8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.card-form .input-group input::placeholder { color: var(--text-muted); }
.card-form .input-group input:focus, .card-form .input-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
  background: var(--surface-3);
}
.card-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.card-recurrence-check {
  display: flex; align-items: center; gap: 8px; margin-top: 12px;
  cursor: pointer; font-size: 12px; color: var(--text-secondary);
}
.card-recurrence-check:hover { color: var(--text); }
.card-recurrence-check input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--accent);
  cursor: pointer; flex-shrink: 0;
}

.btn-card-pay {
  width: 100%; margin-top: 12px; padding: 10px; font-size: 14px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}

.success-box { text-align: center; padding: 20px 16px; }
.success-box svg { margin: 0 auto 12px; }
.success-box h4 { font-size: 16px; color: var(--success-text); margin-bottom: 6px; font-weight: 600; }
.success-box p { color: var(--text-secondary); margin-bottom: 12px; font-size: 12px; }

/* ============ INFO CARDS ============ */
.info-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.card-warning {
  border-color: var(--warning-border);
  background: var(--warning-bg);
}
.card-warning h3 { color: var(--warning-text); font-size: 13px; }
.card-warning p { color: var(--text-secondary); font-size: 12px; }

/* Contract Card */
.contract-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
  border-left: 2px solid var(--success);
  transition: border-color .2s var(--ease);
}
.contract-card:hover { border-color: var(--border-hover); }
.contract-card.inactive { border-left-color: var(--text-muted); }
.contract-card.canceled { border-left-color: var(--danger); }

.contract-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.contract-header h4 { font-size: 13px; font-weight: 600; color: var(--text); }
.contract-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.contract-detail label { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); display: block; font-weight: 600; }
.contract-detail span { font-size: 13px; font-weight: 600; color: var(--text); }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger-text) !important; }

/* Connection Card */
.conn-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
  border-left: 2px solid var(--success);
  transition: border-color .2s var(--ease);
}
.conn-card:hover { border-color: var(--border-hover); }
.conn-card.offline { border-left-color: var(--danger); }
.conn-card.disabled { border-left-color: var(--text-muted); }

.conn-status {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: 20px;
  font-size: 10px; font-weight: 600;
}
.conn-online { background: var(--success-bg); color: var(--success-text); border: 1px solid var(--success-border); }
.conn-offline { background: var(--danger-bg); color: var(--danger-text); border: 1px solid var(--danger-border); }

.conn-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; }
.dot-online { background: var(--success); box-shadow: 0 0 6px var(--success); animation: pulse 2s infinite; }
.dot-offline { background: var(--danger); box-shadow: 0 0 6px var(--danger); }

/* Speed Bars */
.speed-bars { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.speed-bar-item { display: flex; flex-direction: column; gap: 4px; }
.speed-bar-header { display: flex; justify-content: space-between; align-items: center; }
.speed-bar-label { font-size: 11px; color: var(--text-secondary); }
.speed-bar-value { font-size: 12px; font-weight: 600; font-family: var(--mono); color: var(--text); }
.speed-bar-track {
  height: 4px; background: var(--surface-3); border-radius: 2px; overflow: hidden;
}
.speed-bar-fill {
  height: 100%; border-radius: 2px;
  transition: width .8s var(--ease);
}
.speed-dl { background: var(--accent); }
.speed-ul { background: var(--success); }

.conn-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 10px; }
.conn-detail label { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); display: block; font-weight: 600; }
.conn-detail span { font-size: 12px; font-weight: 600; color: var(--text); font-family: var(--mono); }

/* Ticket Card */
.ticket-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
  border-left: 2px solid var(--text-muted);
  transition: border-color .2s var(--ease);
}
.ticket-card:hover { border-color: var(--border-hover); }
.ticket-card.aberto { border-left-color: var(--warning); }
.ticket-card.fechado { border-left-color: var(--success); }
.ticket-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.ticket-title { font-size: 13px; font-weight: 600; color: var(--text); }
.ticket-id { font-size: 11px; color: var(--text-muted); }
.ticket-body { font-size: 12px; color: var(--text-secondary); line-height: 1.5; margin-top: 6px; }

.ticket-status {
  padding: 2px 8px; border-radius: 20px;
  font-size: 10px; font-weight: 600; text-transform: uppercase;
}
.ts-aberto { background: var(--warning-bg); color: var(--warning-text); border: 1px solid var(--warning-border); }
.ts-fechado { background: var(--success-bg); color: var(--success-text); border: 1px solid var(--success-border); }
.ts-pendente { background: var(--accent-dim); color: var(--accent-text); border: 1px solid var(--accent-border); }

/* ============ DADOS ============ */
.dados-sections { display: flex; flex-direction: column; gap: 12px; }

.dados-section-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color .2s var(--ease);
}
.dados-section-card:hover { border-color: var(--border-hover); }

.dados-section-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.dados-section-header svg { color: var(--accent); flex-shrink: 0; width: 16px; height: 16px; }
.dados-section-header h3 { font-size: 12px; font-weight: 600; color: var(--text); }

.dados-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px;
}
.dado-item label {
  font-size: 9px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-muted); display: block; margin-bottom: 2px; font-weight: 600;
}
.dado-item span { font-size: 13px; font-weight: 500; color: var(--text); }
.dado-item.full { grid-column: 1 / -1; }
.dados-hint {
  margin-top: 14px;
  font-size: 11px; color: var(--text-muted);
  padding: 10px 14px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

/* ============ PRODUTOS TABLE ============ */
.produtos-table { display: flex; flex-direction: column; }
.produtos-header {
  display: grid; grid-template-columns: 1fr 60px 100px;
  padding: 10px 16px; border-bottom: 1px solid var(--border);
  font-size: 10px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .1em;
}
.produtos-row {
  display: grid; grid-template-columns: 1fr 60px 100px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  font-size: 12px; color: var(--text-secondary); align-items: center;
}
.produtos-row:last-child { border-bottom: none; }
.produtos-row:hover { background: var(--surface-2); }
/* ===== MEUS SERVIÇOS (sv-*) ===== */
.sv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.sv-card {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 18px; padding: 18px 20px;
}
.sv-fig {
  width: 64px; height: 64px; flex-shrink: 0; border-radius: 14px; overflow: hidden;
  background: var(--surface-3); display: grid; place-items: center;
}
.sv-fig img { width: 100%; height: 100%; object-fit: cover; }
.sv-txt { flex: 1; min-width: 140px; display: flex; flex-direction: column; gap: 2px; }
.sv-txt strong { font-size: 16px; font-weight: 700; color: var(--text); }
.sv-sub { font-size: 13px; font-weight: 600; color: var(--accent-text); }
.sv-det { font-size: 12px; color: var(--text-muted); }
.sv-btn {
  flex-shrink: 0; cursor: pointer; font-family: var(--font); font-size: 13px; font-weight: 700;
  padding: 10px 16px; border-radius: 10px; border: 1px solid var(--cnx);
  background: var(--cnx); color: #fff; transition: background .15s;
}
.sv-btn:hover { background: var(--cnx-hover); border-color: var(--cnx-hover); }
.sv-btn:disabled { opacity: .6; cursor: default; }
.sv-msg { width: 100%; font-size: 12px; margin-top: 4px; }

/* ===== CONEXÃO (cx-*) ===== */
.cx-block { display: flex; flex-direction: column; gap: 16px; margin-bottom: 16px; }

.cx-card {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 18px; padding: 18px 20px;
}
.cx-ico {
  width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center;
  background: var(--success-bg); color: var(--success-text); border: 1px solid var(--success-border);
}
.cx-ico.off { background: var(--surface-3); color: var(--text-muted); border-color: var(--border); }
.cx-id { flex: 1; min-width: 200px; }
.cx-id-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 3px; }
.cx-id-top strong { font-size: 15px; font-weight: 700; color: var(--text); word-break: break-all; }
.cx-id p { font-size: 12px; color: var(--text-secondary); margin: 0; }
.cx-status {
  display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0;
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  background: var(--success-bg); color: var(--success-text);
}
.cx-status.bad { background: var(--danger-bg); color: var(--danger-text); }
.cx-status .d { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.cx-btn {
  display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; cursor: pointer;
  font-family: var(--font); font-size: 13px; font-weight: 600;
  padding: 9px 15px; border-radius: 10px;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border-hover);
  transition: background .15s, border-color .15s;
}
.cx-btn:hover { background: var(--surface-1); border-color: var(--text-muted); }
.cx-btn:disabled { opacity: .6; cursor: default; }
.cx-btn.sm { font-size: 12px; padding: 6px 11px; }
.cx-btn.wa { background: var(--success-text); color: #fff; border-color: var(--success-text); text-decoration: none; }
.cx-btn.wa:hover { background: var(--success); border-color: var(--success); }

.cx-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cx-stat {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 18px; padding: 18px 20px;
}
.cx-stat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.cx-stat-lab { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 700; color: var(--text); }
.cx-stat-lab .i { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; }
.cx-stat-lab .i.dl { background: var(--success-bg); color: var(--success-text); }
.cx-stat-lab .i.ul { background: var(--cnx-dim); color: var(--cnx); }
.cx-stat-mes { font-size: 12px; color: var(--text-muted); }
.cx-stat-val { font-family: var(--display); font-size: 38px; font-weight: 700; color: var(--text); line-height: 1.05; letter-spacing: -.02em; }
.cx-stat-val small { font-size: 16px; font-weight: 600; color: var(--text-muted); margin-left: 5px; }
.cx-stat-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--text-secondary);
}
.cx-stat-foot strong { font-size: 13px; font-weight: 700; color: var(--text); }

.cx-tech { background: var(--surface-2); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; }
.cx-tech-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; }
.cx-tech-hd .t { font-size: 15px; font-weight: 700; color: var(--text); }
.cx-tech-grid { display: grid; grid-template-columns: 1fr 1fr; }
.cx-tech-cell {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 20px; border-top: 1px solid var(--border); min-width: 0;
}
.cx-tech-cell:nth-child(odd) { border-right: 1px solid var(--border); }
.cx-tech-cell label { font-size: 12px; color: var(--text-secondary); flex-shrink: 0; }
.cx-tech-cell span { font-size: 13px; font-weight: 600; color: var(--text); text-align: right; word-break: break-all; }
.cx-tech-cell span.mono { font-family: var(--mono); font-size: 12px; letter-spacing: -.02em; }

.cx-help {
  display: flex; align-items: center; gap: 13px; flex-wrap: wrap;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 18px; padding: 16px 20px;
}
.cx-help-ico {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center;
  background: var(--surface-3); color: var(--text-secondary);
}
.cx-help-txt { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.cx-help-txt strong { font-size: 14px; font-weight: 700; color: var(--text); }
.cx-help-txt span { font-size: 12px; color: var(--text-secondary); }

@media (max-width: 780px) {
  .cx-stats { grid-template-columns: 1fr; }
  .cx-tech-grid { grid-template-columns: 1fr; }
  .cx-tech-cell:nth-child(odd) { border-right: none; }
  .cx-stat-val { font-size: 32px; }
}

/* ===== CONTRATOS (ct-*) ===== */
.ct-card {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 20px; overflow: hidden; margin-bottom: 16px;
}
.ct-top { display: flex; align-items: center; gap: 14px; padding: 20px 22px; flex-wrap: wrap; }
.ct-ico {
  width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--cnx-dim); color: var(--cnx); border: 1px solid var(--cnx-border);
}
.ct-id { flex: 1; min-width: 180px; }
.ct-id h4 { font-size: 17px; font-weight: 700; color: var(--text); margin: 0 0 3px; }
.ct-id p { font-size: 12px; color: var(--text-secondary); margin: 0; }
.ct-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.ct-pill {
  font-size: 11px; font-weight: 700; padding: 5px 11px; border-radius: 999px; white-space: nowrap;
  background: var(--surface-3); color: var(--text-secondary);
}
.ct-pill.ok { background: var(--success-bg); color: var(--success-text); }
.ct-pill.bad { background: var(--danger-bg); color: var(--danger-text); }
.ct-pill.sm { font-size: 10px; padding: 4px 9px; }

.ct-meta { display: flex; border-top: 1px solid var(--border); }
.ct-meta-item { flex: 1; padding: 16px 22px; }
.ct-meta-item + .ct-meta-item { border-left: 1px solid var(--border); }
.ct-meta-item label {
  display: block; font-size: 10px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .1em; margin-bottom: 5px;
}
.ct-meta-item span { font-size: 15px; font-weight: 700; color: var(--text); }
.ct-meta-item span.ok { color: var(--success-text); }

.ct-prods-wrap { padding: 18px 22px 22px; border-top: 1px solid var(--border); background: var(--surface-1); }
.ct-prods-lab {
  display: block; font-size: 10px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .1em; margin-bottom: 12px;
}
.ct-prods { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.ct-prod {
  display: flex; align-items: center; gap: 14px; min-width: 0;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 16px; padding: 16px 18px;
}
.ct-prod-fig { position: relative; width: 56px; height: 56px; flex-shrink: 0; }
.ct-prod-ico {
  position: absolute; inset: 0; border-radius: 14px; display: grid; place-items: center;
  background: var(--surface-3); color: var(--text-secondary);
}
.ct-prod-ico svg { width: 24px; height: 24px; }
.ct-prod-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border-radius: 14px; object-fit: cover; background: var(--surface-2);
}
.ct-prod-nome {
  flex: 1; min-width: 0; font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.3;
}

@media (max-width: 640px) {
  .ct-meta { flex-direction: column; }
  .ct-meta-item + .ct-meta-item { border-left: none; border-top: 1px solid var(--border); }
  .ct-prods { grid-template-columns: 1fr; }
}

.produto-nome { font-weight: 500; color: var(--text); display: flex; align-items: center; gap: 10px; min-width: 0; }
.produto-nome > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.produto-thumb {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 8px;
  object-fit: cover; background: var(--surface-2); border: 1px solid var(--border);
}

/* ============ NOTAS FISCAIS ============ */
.nf-table { display: flex; flex-direction: column; }
.nf-header {
  display: grid; grid-template-columns: 80px 60px 1fr 90px 110px 80px;
  padding: 10px 16px; border-bottom: 1px solid var(--border);
  font-size: 10px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .1em;
}
.nf-row {
  display: grid; grid-template-columns: 80px 60px 1fr 90px 110px 80px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  font-size: 12px; color: var(--text-secondary); align-items: center;
}
.nf-row:last-child { border-bottom: none; }
.nf-row:hover { background: var(--surface-2); }

/* ============ EMPTY STATE ============ */
.empty-state { text-align: center; padding: 40px 16px; color: var(--text-muted); }
.empty-state svg { margin-bottom: 10px; opacity: .4; }
.empty-state p { font-size: 13px; }

/* ============ MODAL ============ */
.modal {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(6px);
}
.modal-content {
  position: relative;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  width: 100%; max-width: 440px;
  box-shadow: var(--shadow-lg);
  max-height: 90vh; overflow-y: auto;
  animation: slideUp .25s var(--ease);
}
.modal-close {
  position: absolute; top: 10px; right: 14px;
  background: none; border: none; font-size: 24px;
  color: var(--text-muted); cursor: pointer;
  transition: color .15s var(--ease);
}
.modal-close:hover { color: var(--text); }
.modal-content h3 { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 16px; display: flex; align-items: center; gap: 7px; }

.pix-qrcode { text-align: center; margin-bottom: 16px; }
.pix-qrcode img {
  max-width: 200px; border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: white; padding: 6px;
}

.field-label { font-size: 11px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }

.copy-box { display: flex; gap: 6px; margin-bottom: 12px; }
.copy-box input {
  flex: 1; padding: 8px 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 11px; font-family: var(--mono);
  color: var(--text-secondary); outline: none;
}
.btn-copy {
  padding: 8px 14px;
  background: var(--accent); color: white;
  border: none; border-radius: var(--radius-sm);
  font-size: 11px; font-weight: 600; cursor: pointer;
  white-space: nowrap; font-family: var(--font);
  transition: all .15s var(--ease);
}
.btn-copy:hover { background: var(--cnx-hover); }

.hint-text {
  font-size: 11px; color: var(--text-secondary);
  padding: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  line-height: 1.5;
}
.boleto-actions { margin: 12px 0; }

.error-box { text-align: center; padding: 16px; color: var(--text-secondary); }
.error-box svg { color: var(--warning); margin-bottom: 10px; }
.error-box p { font-size: 12px; margin-bottom: 6px; }

/* ============ TABLE SCROLL ============ */
.tcard { overflow: hidden; }
.tcard .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ============ RESPONSIVE ============ */

/* Tablet */
@media (max-width: 1024px) {
  /* ===== APP SHELL: a página trava na altura da tela e NÃO rola como um site.
     O header laranja fica no topo, a tab bar embaixo, e só o miolo (.main-content)
     rola por dentro quando a tela tem muito conteúdo. Telas leves cabem 100%. ===== */
  html, body { height: 100dvh; overflow: hidden; }
  .login-container { min-height: 100dvh; }

  /* Sidebar off-screen em tablet */
  #app-page { flex-direction: column; }
  #app-page.active { height: 100dvh; min-height: 0; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  /* header não precisa mais ser sticky (a página não rola) */
  .mobile-header { position: static; }

  /* Header swap */
  .topbar { display: none !important; }
  .mobile-header { display: flex; }

  /* Bottom tab bar visível no mobile; o hambúrguer do topo some (o menu completo
     abre pelo "Mais"). safe-area pro notch dos iPhones. */
  .menu-toggle { display: none; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    background: var(--surface-2); border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom, 0);
    box-shadow: 0 -4px 16px -8px rgba(60,50,35,.2);
  }

  /* .main-content é a ÚNICA área que rola (por dentro), entre header e tab bar */
  .main-content { margin-left: 0; width: 100%; padding: 16px 20px calc(80px + env(safe-area-inset-bottom, 0)); flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }

  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .mcard-val { font-size: 18px; }
  th, td { padding: 8px 12px; font-size: 11px; }

  /* Bottom row */
  .bottom-row { grid-template-columns: 1fr; gap: 10px; }
}

/* Mobile */
@media (max-width: 768px) {
  /* Content padding menor no mobile */
  .main-content { padding: 16px 16px calc(80px + env(safe-area-inset-bottom, 0)); }

  /* Cards */
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .mcard { padding: 12px; }
  .mcard-val { font-size: 16px; }
  .mcard-label { font-size: 9px; margin-bottom: 6px; }
  .mcard-delta { font-size: 9px; }

  /* Bottom row stack */
  .bottom-row { grid-template-columns: 1fr; gap: 8px; }
  .fcard-body { flex-wrap: wrap; gap: 10px; }
  .fcard { padding: 14px; }
  .ccard { padding: 14px; }
  .ff-val { font-size: 16px; }
  .ff-date { font-size: 14px; }
  .btn-pay { font-size: 11px; padding: 7px 12px; }

  /* Table scroll horizontal */
  table { font-size: 11px; min-width: 520px; }
  th, td { padding: 6px 10px; white-space: nowrap; }

  /* Section header */
  .sec-title { font-size: 14px; }
  .sec-sub { font-size: 10px; }
  .tcard-hdr { flex-wrap: wrap; gap: 8px; }
  .tcard-title { font-size: 11px; }
  .search-box { width: 100%; }
  .search-box input { width: 100%; flex: 1; }

  /* Sidebar profile */
  .sidebar-profile { margin: 0 6px; }

  /* Tabs */
  .tabs { overflow-x: auto; flex-wrap: nowrap; }
  .tab { white-space: nowrap; font-size: 11px; padding: 6px 10px; }

  /* Faturas */
  .fatura-card { padding: 14px; }
  .fatura-acoes { flex-direction: column; }
  .fatura-valor { font-size: 16px; }

  /* Modal */
  .modal-content { padding: 20px 16px; max-width: 100%; }
  .copy-box { flex-direction: column; }

  /* Dados */
  .dados-grid { grid-template-columns: 1fr; }

  /* Login */
  .login-card { padding: 28px 20px; }

  /* Misc */
  .produtos-row, .produtos-header { font-size: 11px; }
  .page-header h1 { font-size: 14px; }
  .page-header p { font-size: 10px; }
}

/* Small mobile */
@media (max-width: 480px) {
  .metric-grid { grid-template-columns: 1fr; gap: 6px; }
  .main-content { padding: 12px 12px calc(78px + env(safe-area-inset-bottom, 0)); }
  .fcard-body { gap: 8px; }
  .divv { display: none; }
  .ff { min-width: 0; }
  .net-bar-wrap { width: 60px; }
}

/* ============ COMPROVANTE DE PAGAMENTO ============ */
.receipt {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 420px;
  margin: 0 auto;
}
.receipt-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}
.receipt-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--success-text);
  margin: 0;
}
.receipt-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  margin: 2px 0 0;
}
.receipt-divider {
  height: 1px;
  background: var(--border);
  margin: 14px 0;
  border: none;
}
.receipt-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.receipt-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.receipt-label {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}
.receipt-value {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  text-align: right;
  word-break: break-all;
}
.receipt-amount {
  font-size: 16px;
  font-weight: 700;
  color: var(--success-text);
}
.receipt-note {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin: 0 0 14px;
}
.receipt-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s;
}
.btn-outline:hover { background: var(--surface-3); }

/* ============================================================
   TRATAMENTO VISUAL — Área interna (preto quente + laranja neon)
   Casa a Central com a landing page do site.
   ============================================================ */

/* Títulos das seções/cards com a fonte display do site */
.topbar-title, .sec-title, .tcard-title, .fcard-title, .ccard-title,
.page-header h1, .contract-header h4, .ticket-title, .dados-section-header h3,
.modal-content h3, .conn-card h4 {
  font-family: var(--display); letter-spacing: -0.02em;
}
.topbar-title { font-size: 16px; }

/* Topbar limpo, integrado ao fundo claro */
.topbar { background: transparent; border-bottom: none; margin-bottom: 4px; }
.status-dot { box-shadow: 0 0 8px var(--success); }

/* Cards: brilho quente sutil (sheen) igual aos cards do site */
.mcard, .tcard, .fcard, .ccard, .fatura-card, .contract-card, .conn-card,
.ticket-card, .dados-section-card, .info-card {
  background: linear-gradient(168deg, rgba(255,247,242,0.05), rgba(255,247,242,0.012)), var(--surface-1);
  transition: border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
/* Elevação no hover dos cards "clicáveis" */
.mcard:hover, .fcard:hover, .ccard:hover, .fatura-card:hover, .contract-card:hover,
.conn-card:hover, .ticket-card:hover, .dados-section-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-border);
}
/* faixa lateral de status ganha um brilho sutil */
.fatura-card, .contract-card, .conn-card, .ticket-card { box-shadow: var(--shadow); }

/* Números de métrica com leve glow */
.mcard-val.accent { text-shadow: 0 0 22px rgba(255,90,34,0.40); }
.mcard-val.red    { text-shadow: 0 0 22px rgba(234,56,41,0.28); }

/* Barras (rede/velocidade) em gradiente neon */
.net-bar, .speed-dl { background: linear-gradient(90deg, var(--cnx), var(--cnx-hot)); box-shadow: 0 0 8px rgba(255,68,20,.4); }
.speed-ul { box-shadow: 0 0 8px rgba(95,227,255,.35); }

/* Ícone de card com glow interno */
.fcard-icon { box-shadow: inset 0 0 14px rgba(255,68,20,.20); }

/* Botão pagar em gradiente + brilho (como os CTAs do site) */
.btn-pay {
  background: linear-gradient(120deg, var(--cnx), var(--cnx-hot));
  border-radius: 999px;
  box-shadow: 0 3px 14px rgba(255,68,20,.32);
  transition: all .18s var(--ease);
}
.btn-pay:hover {
  background: linear-gradient(120deg, var(--cnx), var(--cnx-hot));
  filter: brightness(1.06); transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255,68,20,.48);
}

/* Abas: item ativo com gradiente e brilho */
.tab.active {
  background: linear-gradient(120deg, var(--cnx), var(--cnx-hot));
  box-shadow: 0 2px 12px rgba(255,68,20,.30);
}

/* Corrige hover ciano remanescente do botão de cartão */
.btn-cartao:hover { background: rgba(255,68,20,0.22); }

/* Impressao do comprovante */
@media print {
  /* Esconder tudo */
  body > * { display: none !important; }

  /* Mostrar apenas o comprovante */
  body::before, body::after { display: none !important; }
  #modal-cartao {
    display: block !important;
    position: static !important;
    visibility: visible !important;
    background: #fff !important;
  }
  #modal-cartao .modal-overlay { display: none !important; }
  #modal-cartao .modal-content {
    display: block !important;
    position: static !important;
    background: #fff !important;
    box-shadow: none !important;
    border: none !important;
    max-width: 100% !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  #modal-cartao .modal-close { display: none !important; }
  #modal-cartao h3 { display: none !important; }
  #card-fatura-info { display: none !important; }
  #card-form-section { display: none !important; }
  #card-loading { display: none !important; }

  #card-success {
    display: block !important;
    visibility: visible !important;
  }
  #receipt {
    display: block !important;
    visibility: visible !important;
    width: 400px;
    margin: 20px auto;
    background: #fff !important;
    color: #000 !important;
    border: 1px solid #ccc !important;
    padding: 24px;
    border-radius: 8px;
    overflow: visible !important;
  }
  .receipt-header svg stroke { stroke: #16a34a !important; }
  .receipt-title { color: #16a34a !important; }
  .receipt-amount { color: #16a34a !important; }
  .receipt-label { color: #666 !important; }
  .receipt-value { color: #000 !important; }
  .receipt-note { color: #666 !important; }
  .receipt-subtitle { color: #888 !important; }
  .receipt-divider { background: #ddd !important; }
  .receipt-actions { display: none !important; }
}

/* ===== DASHBOARD — layout claro (redesign) ===== */
.db-body{display:flex;flex-direction:column;gap:18px}
.db-banner{position:relative;overflow:hidden;background:linear-gradient(110deg,#221F1B 60%,#43301F);border-radius:20px;padding:20px 26px;color:#fff;display:flex;align-items:center;justify-content:space-between;gap:24px;flex-wrap:wrap}
.db-banner .ring{position:absolute;right:180px;top:-70px;width:220px;height:220px;border-radius:50%;border:36px solid rgba(255,90,31,.18);pointer-events:none}
.db-banner .lbl{display:inline-block;background:var(--cnx);color:#fff;font-size:11px;font-weight:800;letter-spacing:.08em;padding:4px 10px;border-radius:999px;text-transform:uppercase}
.db-banner h2{font-size:21px;font-weight:800;margin-top:8px;color:#fff;font-family:var(--display)}
.db-banner .desc{font-size:13px;color:#B9B2A6;font-weight:500;margin-top:3px}
.db-btn{background:var(--cnx);color:#fff;border:none;padding:12px 22px;border-radius:12px;font-size:14px;font-weight:800;cursor:pointer;font-family:inherit;box-shadow:0 12px 24px -10px rgba(255,90,31,.7);white-space:nowrap;text-decoration:none;display:inline-block}
.db-btn:hover{filter:brightness(1.05);color:#fff}
/* ===== CARROSSEL DE BANNERS (horizontal, com peek) ===== */
/* overflow hidden + slides de 88% centralizados = os vizinhos espiam DENTRO da
   própria caixa (os ~12% que sobram), sem risco de scroll horizontal na página. */
.db-carousel{overflow:hidden;width:100%}
.db-track{display:flex;gap:10px;align-items:center;transition:transform .45s cubic-bezier(.4,0,.2,1);will-change:transform}
.db-slide{flex:0 0 100%;min-width:0;display:block;text-decoration:none}
.db-carousel.multi .db-slide{flex-basis:88%}   /* 88% do slide + peek dos 2 lados */
/* Imagem inteira: largura total, altura natural — nunca espremida numa faixa */
.db-slide picture{display:block;width:100%}
.db-slide-img{display:block;width:100%;height:auto;border-radius:20px}
.db-slide .db-banner{margin:0}                 /* card de texto ocupa o slide todo */

.db-dots-row{display:flex;justify-content:center;gap:6px;margin-top:12px}
.db-dots-row span{width:7px;height:7px;border-radius:50%;background:var(--border-hover);cursor:pointer;transition:.2s}
.db-dots-row span.a{width:20px;border-radius:999px;background:var(--cnx)}

.db-dots span{cursor:pointer}
.db-dots{display:flex;gap:6px;margin-top:12px}
.db-dots span{width:6px;height:6px;border-radius:50%;background:rgba(255,255,255,.3)}
.db-dots span.a{width:16px;border-radius:999px;background:var(--cnx)}
.db-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.db-oc{background:var(--surface-2);border:1px solid var(--border);border-radius:18px;padding:18px}
.db-oc .top{display:flex;justify-content:space-between;align-items:flex-start}
.db-oc .k{font-size:11.5px;font-weight:700;letter-spacing:.09em;color:var(--text-muted)}
.db-oc .ico{width:30px;height:30px;border-radius:9px;display:flex;align-items:center;justify-content:center;flex:none}
.db-oc .v{font-size:26px;font-weight:800;margin-top:10px;letter-spacing:-.02em;font-family:var(--display);color:var(--text)}
.db-oc .v.sm{font-size:21px;margin-top:12px}
.db-oc .s{font-size:12.5px;font-weight:600;margin-top:2px;color:var(--text-secondary)}
.db-grid2{display:grid;grid-template-columns:1.5fr 1fr;gap:16px;align-items:stretch}
.db-panel{background:var(--surface-2);border:1px solid var(--border);border-radius:20px;padding:20px 22px;display:flex;flex-direction:column;gap:16px;min-height:300px}
.db-panel .ph{display:flex;align-items:center;justify-content:space-between}
.db-panel .ph .t{font-size:15px;font-weight:700}
.db-speeds{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.db-speeds .lab{display:flex;justify-content:space-between;gap:8px;white-space:nowrap;font-size:12px;font-weight:600;color:var(--text-secondary);margin-bottom:6px}
.db-speeds .lab b{color:var(--text);font-weight:800}
.db-bar{height:7px;background:#F0EBE1;border-radius:999px;overflow:hidden}
.db-bar>div{height:100%;border-radius:999px;transition:width .5s var(--ease)}
.db-spk{flex:1;min-height:120px;display:flex;flex-direction:column;background:var(--surface-1);border-radius:14px;padding:12px 14px}
.db-spk .top{display:flex;justify-content:space-between;font-size:12px;font-weight:600;color:var(--text-secondary);margin-bottom:6px}
.db-meta{display:flex;justify-content:space-between;align-items:center;margin-top:auto;gap:12px;flex-wrap:wrap}
.db-meta .k{font-size:12px;color:var(--text-secondary);font-weight:600}
.db-actions{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;gap:12px}
.db-act{background:var(--surface-2);border:1px solid var(--border);border-radius:18px;padding:16px;display:flex;flex-direction:column;justify-content:space-between;gap:14px;color:var(--text);cursor:pointer;text-decoration:none;transition:.15s var(--ease)}
.db-act:hover{border-color:var(--border-hover);transform:translateY(-1px);color:var(--text)}
.db-act .ico{width:34px;height:34px;border-radius:10px;display:flex;align-items:center;justify-content:center;flex:none}
.db-act .t{font-size:13.5px;font-weight:700;line-height:1.3}
.db-act.wa{background:var(--success);color:#fff;border:none}
.db-act.wa:hover{color:#fff;filter:brightness(1.04)}
.db-act.wa .ico{background:rgba(255,255,255,.18)}
.db-ad{background:var(--surface-2);border:1px solid var(--border);border-radius:18px;padding:22px 20px 14px;display:flex;align-items:center;gap:16px;position:relative;flex-wrap:wrap}
.db-ad .badge{position:absolute;top:6px;left:20px;font-size:9.5px;font-weight:700;letter-spacing:.12em;color:var(--text-muted)}
.db-ad .logo{width:44px;height:44px;flex:none;border-radius:12px;background:#221F1B;color:#fff;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:13px}
.db-btn-dark{background:#221F1B;color:#fff;border:none;padding:10px 18px;border-radius:11px;font-size:13px;font-weight:700;cursor:pointer;font-family:inherit;white-space:nowrap;text-decoration:none}
.db-alert{background:var(--danger-bg);border:1px solid var(--danger-border);border-radius:18px;padding:16px 20px;display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.db-alert .ico{width:38px;height:38px;flex:none;border-radius:11px;background:#fff;color:var(--danger);display:flex;align-items:center;justify-content:center}
.db-tag-green{background:var(--success-bg);color:var(--success-text);font-size:12px;font-weight:700;padding:4px 11px;border-radius:999px}
.db-tag-red{background:var(--danger-bg);color:var(--danger-text);font-size:12px;font-weight:700;padding:4px 11px;border-radius:999px}
.db-body a{color:var(--cnx);text-decoration:none}
.db-body a:hover{text-decoration:underline}
.db-body a.db-btn,.db-body a.db-act,.db-body a.db-btn:hover,.db-body a.db-act:hover{text-decoration:none}
.db-body a.db-btn{color:#fff}
.db-body a.db-act{color:var(--text)}
.db-body a.db-act.wa{color:#fff}
@media(max-width:1100px){.db-cards{grid-template-columns:1fr 1fr}.db-grid2{grid-template-columns:1fr}}
/* Mobile: as grids do Painel paravam de colapsar aqui e a página vazava pra
   direita (cards cortados no canto do celular). A pior era a .db-speeds:
   3 colunas fixas + white-space:nowrap, que não cabem em tela de 360px e
   empurram o layout inteiro. */
@media(max-width:900px){
  .db-speeds{grid-template-columns:1fr;gap:14px}
  .db-speeds .lab{white-space:normal}
}
/* No celular os cards de resumo e de ação ficam 2 por linha (não 1), pra
   encurtar a rolagem. Eles cabem — o vazamento que gerou o corte era só do
   .db-speeds acima, não destes. Padding e fontes reduzem um tico pra não
   apertar em telas de ~360px. */
@media(max-width:560px){
  .db-cards{grid-template-columns:1fr 1fr;gap:12px}
  .db-actions{grid-template-columns:1fr 1fr;grid-template-rows:auto;gap:12px}
  .db-oc{padding:14px}
  .db-oc .v{font-size:22px}
  .db-oc .v.sm{font-size:18px}
  .db-act{padding:14px}
  .db-banner h2{font-size:18px}
}

/* ===== WIFI / EQUIPAMENTO (redesign claro) ===== */
.wf-card{background:var(--surface-2);border:1px solid var(--border);border-radius:18px;padding:20px 22px}
.wf-equip{display:flex;align-items:center;gap:22px;flex-wrap:wrap}
.wf-equip .ic{width:52px;height:52px;flex:none;border-radius:14px;background:var(--cnx-dim);color:var(--cnx-text);display:flex;align-items:center;justify-content:center}
.wf-equip .col{display:flex;flex-direction:column;gap:3px}
.wf-k{font-size:11px;font-weight:700;letter-spacing:.09em;color:var(--text-muted);text-transform:uppercase}
.wf-v{font-size:15px;font-weight:700;color:var(--text)}
.wf-v.mono{font-family:var(--mono);font-size:13px}
.wf-equip .spacer{flex:1;min-width:12px}
.wf-reboot{display:flex;flex-direction:column;align-items:flex-end;gap:5px}
.wf-btn-out{display:inline-flex;align-items:center;gap:8px;background:var(--surface-2);color:var(--cnx-text);border:1px solid var(--cnx-border);padding:10px 18px;border-radius:11px;font-size:13.5px;font-weight:700;cursor:pointer;font-family:inherit;transition:.15s var(--ease)}
.wf-btn-out:hover{background:var(--cnx-dim)}
.wf-btn-out:disabled{opacity:.5;cursor:not-allowed}
.wf-hint{font-size:11.5px;color:var(--text-muted)}
.wf-bands{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.wf-band-hd{display:flex;align-items:center;gap:10px}
.wf-band-hd .wic{color:var(--cnx);display:flex}
.wf-band-hd .name{font-size:15px;font-weight:800;font-family:var(--display)}
.wf-badge{font-size:11px;font-weight:700;padding:3px 10px;border-radius:999px;background:var(--surface-3);color:var(--text-secondary)}
.wf-badge.fast{background:var(--cnx-dim);color:var(--cnx-text);letter-spacing:.03em;text-transform:uppercase;font-size:10px}
.wf-badge.chan{margin-left:auto}
.wf-ssidbox{margin-top:14px;background:var(--surface-1);border:1px solid var(--border);border-radius:12px;padding:12px 14px;display:flex;align-items:center;justify-content:space-between;gap:10px}
.wf-ssidbox .lab{font-size:10.5px;font-weight:700;letter-spacing:.08em;color:var(--text-muted);text-transform:uppercase}
.wf-ssidbox .ssid{font-size:15px;font-weight:700;margin-top:2px;word-break:break-word}
.wf-pill-green{background:var(--success-bg);color:var(--success-text);font-size:11px;font-weight:700;padding:3px 10px;border-radius:999px;white-space:nowrap}
.wf-band-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}
.wf-btn-soft{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:var(--surface-1);color:var(--text);border:1px solid var(--border);padding:10px 14px;border-radius:11px;font-size:13px;font-weight:700;cursor:pointer;font-family:inherit;transition:.15s var(--ease)}
.wf-btn-soft:hover{border-color:var(--border-hover);background:var(--surface-3)}
.wf-dev-hd{display:flex;align-items:center;gap:10px;margin-bottom:4px}
.wf-dev-hd .t{font-size:16px;font-weight:800;font-family:var(--display)}
.wf-dev-count{font-size:12px;font-weight:800;color:var(--cnx-text);background:var(--cnx-dim);border-radius:999px;padding:1px 9px}
.wf-table{width:100%}
.wf-thead,.wf-trow{display:grid;grid-template-columns:2fr 1.3fr 1.6fr 96px;gap:12px;align-items:center;padding:11px 6px}
.wf-thead{font-size:11px;font-weight:700;letter-spacing:.06em;color:var(--text-muted);text-transform:uppercase;border-bottom:1px solid var(--border)}
.wf-trow{border-bottom:1px solid var(--border)}
.wf-trow:last-child{border-bottom:none}
.wf-dev{display:flex;align-items:center;gap:10px;font-weight:600;min-width:0}
.wf-dev .di{width:30px;height:30px;flex:none;border-radius:8px;background:var(--surface-3);color:var(--text-secondary);display:flex;align-items:center;justify-content:center}
.wf-dev .nm{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wf-mono{font-family:var(--mono);font-size:12.5px;color:var(--text-secondary)}
.wf-if{justify-self:end;font-size:11px;font-weight:700;padding:3px 10px;border-radius:999px;white-space:nowrap}
.wf-if.eth{background:var(--surface-3);color:var(--text-secondary)}
.wf-if.wifi{background:var(--success-bg);color:var(--success-text)}
@media(max-width:900px){.wf-bands{grid-template-columns:1fr}}
@media(max-width:640px){.wf-thead .c-mac,.wf-trow .c-mac{display:none}.wf-thead,.wf-trow{grid-template-columns:1.6fr 1fr 84px}}

/* editor inline de nome/senha WiFi */
.wf-btn-soft.on{border-color:#221F1B;box-shadow:inset 0 0 0 1px #221F1B;color:var(--text)}
.wf-edit{margin-top:12px}
.wf-edit-hd{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}
.wf-edit-hd label{font-size:12px;font-weight:700;color:var(--text-secondary)}
.wf-edit-cancel{font-size:12px;font-weight:600;color:var(--text-muted);cursor:pointer}
.wf-edit-cancel:hover{color:var(--cnx-text);text-decoration:none}
.wf-edit-row{display:flex;gap:10px}
.wf-input{flex:1;min-width:0;padding:10px 12px;background:var(--surface-2);border:1px solid var(--border);border-radius:10px;font-size:14px;font-family:var(--font);color:var(--text);outline:none;transition:.15s var(--ease)}
.wf-input:focus{border-color:var(--cnx);box-shadow:0 0 0 2px var(--cnx-dim)}
.wf-save{flex:none;background:var(--cnx);color:#fff;border:none;padding:10px 22px;border-radius:10px;font-size:14px;font-weight:700;cursor:pointer;font-family:inherit;transition:.15s var(--ease)}
.wf-save:hover{background:var(--cnx-hover)}
.wf-save:disabled{opacity:.6;cursor:not-allowed}

/* ===== FINANCEIRO (redesign claro) ===== */
.fin-total{background:var(--surface-2);border:1px solid var(--border);border-radius:18px;padding:20px 24px;display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap}
.fin-total .k{font-size:11.5px;font-weight:700;letter-spacing:.09em;color:var(--text-muted);text-transform:uppercase}
.fin-total .v{font-size:30px;font-weight:800;font-family:var(--display);color:var(--danger-text);letter-spacing:-.02em;margin-top:6px}
.fin-total .v.zero{color:var(--success-text)}
.fin-total .s{font-size:12.5px;color:var(--text-secondary);font-weight:600;margin-top:2px}
.fin-payall{display:inline-flex;align-items:center;gap:8px;background:var(--success);color:#fff;border:none;padding:13px 22px;border-radius:12px;font-size:14px;font-weight:800;cursor:pointer;font-family:inherit;box-shadow:0 12px 24px -12px rgba(23,160,110,.7);white-space:nowrap}
.fin-payall:hover{filter:brightness(1.05)}
/* tabs pill */
.tabs{display:flex;gap:6px;background:var(--surface-2);border:1px solid var(--border);border-radius:14px;padding:5px}
.tab{flex:1;display:flex;align-items:center;justify-content:center;gap:8px;padding:11px 14px;border-radius:10px;background:transparent;border:none;cursor:pointer;font-family:inherit;font-size:14px;font-weight:700;color:var(--text-secondary);transition:.15s var(--ease)}
.tab:hover{color:var(--text)}
.tab.active{background:var(--cnx);color:#fff;box-shadow:0 8px 18px -8px rgba(255,90,31,.6)}
.tab .badge{min-width:20px;height:20px;padding:0 6px;border-radius:999px;font-size:11.5px;font-weight:800;display:inline-flex;align-items:center;justify-content:center;background:var(--surface-3);color:var(--text-secondary)}
.tab .badge.badge-red{background:var(--danger-bg);color:var(--danger-text)}
.tab .badge.badge-blue{background:var(--cnx-dim);color:var(--cnx-text)}
.tab.active .badge,.tab.active .badge.badge-red,.tab.active .badge.badge-blue{background:rgba(255,255,255,.25);color:#fff}
/* fatura card */
.faturas-list{display:flex;flex-direction:column;gap:14px;margin-top:14px}
.fin-card{background:var(--surface-2);border:1px solid var(--border);border-radius:18px;padding:20px 22px;display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap}
.fin-card .info{min-width:200px}
.fin-card .toprow{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:8px}
.fin-pill{font-size:12px;font-weight:700;padding:4px 11px;border-radius:999px}
.fin-pill.soon{background:var(--warning-bg);color:var(--warning-text)}
.fin-pill.late{background:var(--danger-bg);color:var(--danger-text)}
.fin-pill.ok{background:var(--surface-3);color:var(--text-secondary)}
.fin-pill.paid{background:var(--success-bg);color:var(--success-text)}
.fin-fat{font-size:12.5px;font-weight:600;color:var(--text-muted);font-family:var(--mono)}
.fin-card .valor{font-size:28px;font-weight:800;font-family:var(--display);letter-spacing:-.02em}
.fin-actions{display:flex;flex-direction:column;align-items:stretch;gap:8px;min-width:230px}
.fin-btn-pix{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:var(--cnx);color:#fff;border:none;padding:13px 18px;border-radius:12px;font-size:14px;font-weight:800;cursor:pointer;font-family:inherit;box-shadow:0 10px 20px -10px rgba(255,90,31,.7)}
.fin-btn-pix:hover{filter:brightness(1.05)}
.fin-btn-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.fin-btn-soft{display:inline-flex;align-items:center;justify-content:center;gap:6px;background:var(--surface-1);color:var(--text);border:1px solid var(--border);padding:10px 14px;border-radius:11px;font-size:13px;font-weight:700;cursor:pointer;font-family:inherit}
.fin-btn-soft:hover{border-color:var(--border-hover);background:var(--surface-3)}
.fin-link{text-align:center;font-size:12.5px;font-weight:600;color:var(--text-muted);cursor:pointer;background:none;border:none;font-family:inherit}
.fin-link:hover{color:var(--cnx-text)}
.fin-auto{background:var(--surface-2);border:1px solid var(--border);border-radius:18px;padding:18px 22px;display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.fin-auto .ic{width:44px;height:44px;flex:none;border-radius:12px;background:var(--surface-3);color:var(--text-secondary);display:flex;align-items:center;justify-content:center}
.fin-auto .t{font-size:14.5px;font-weight:800}
.fin-auto .d{font-size:12.5px;color:var(--text-secondary);font-weight:500;margin-top:1px}
.fin-btn-dark{margin-left:auto;background:#221F1B;color:#fff;border:none;padding:11px 22px;border-radius:11px;font-size:13.5px;font-weight:700;cursor:pointer;font-family:inherit;white-space:nowrap;text-decoration:none;display:inline-block}
.fin-btn-dark:hover{filter:brightness(1.15);color:#fff}
@media(max-width:640px){.fin-actions{min-width:100%}.fin-card .valor{font-size:24px}}

/* aviso de bloqueio + desbloqueio em confiança (Painel) */
.db-block{background:linear-gradient(120deg,#B0342F,#8f2a26);border-radius:18px;padding:16px 22px;display:flex;align-items:center;gap:16px;flex-wrap:wrap;color:#fff;box-shadow:0 14px 30px -16px rgba(176,52,47,.6)}
.db-block .ic{width:42px;height:42px;flex:none;border-radius:12px;background:rgba(255,255,255,.18);display:flex;align-items:center;justify-content:center}
.db-block .t{font-size:15px;font-weight:800}
.db-block .d{font-size:12.5px;opacity:.92;font-weight:500;margin-top:2px}
.db-block-btn{margin-left:auto;background:#fff;color:#B0342F;border:none;padding:12px 22px;border-radius:11px;font-size:13.5px;font-weight:800;cursor:pointer;font-family:inherit;white-space:nowrap}
.db-block-btn:hover{filter:brightness(.96)}
.db-block-btn:disabled{opacity:.7;cursor:not-allowed}
