/* ═══════════════════════════════════════════════
   GESTOR PRO365 — DESIGN SYSTEM
   Cores: #1E3A8A #22C55E #0F172A #FFFFFF #FACC15 #EF4444
═══════════════════════════════════════════════ */

:root {
  --primary:    #1E3A8A;
  --primary-light: #2563EB;
  --primary-dark:  #1e3070;
  --success:    #22C55E;
  --success-dark:  #16A34A;
  --dark:       #0F172A;
  --white:      #FFFFFF;
  --warning:    #FACC15;
  --warning-dark: #EAB308;
  --danger:     #EF4444;
  --danger-dark:  #DC2626;

  --bg:         #F1F5F9;
  --bg-card:    #FFFFFF;
  --border:     #E2E8F0;
  --text:       #1E293B;
  --text-muted: #64748B;
  --text-light: #94A3B8;

  --sidebar-w:  260px;
  --topbar-h:   64px;
  --radius:     12px;
  --radius-sm:  8px;
  --shadow:     0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.12);
  --transition: .2s ease;
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }
img { max-width: 100%; }

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ═══════════════════════════════════════════════
   LAYOUT
═══════════════════════════════════════════════ */

.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--dark);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform var(--transition);
  overflow-y: auto;
}

.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── SIDEBAR BRAND ─── */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-size: 18px;
  flex-shrink: 0;
}
.brand-name {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  color: var(--white);
  letter-spacing: -.3px;
}
.brand-slogan {
  display: block;
  font-size: .72rem;
  color: rgba(255,255,255,.45);
  line-height: 1.2;
}

/* ─── SIDEBAR NAV ─── */
.sidebar-nav {
  flex: 1;
  padding: 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.6);
  font-size: .9rem;
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
}
.nav-item:hover {
  background: rgba(255,255,255,.07);
  color: var(--white);
}
.nav-item.active {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(30,58,138,.4);
}
.nav-item i { width: 18px; text-align: center; font-size: .95rem; }

/* ─── SIDEBAR FOOTER ─── */
.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.user-avatar {
  width: 34px; height: 34px;
  background: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-size: .85rem;
  flex-shrink: 0;
}
.user-name {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-plan {
  display: block;
  font-size: .7rem;
  margin-top: 1px;
}
.btn-logout {
  color: rgba(255,255,255,.4);
  padding: 6px;
  border-radius: 6px;
  transition: all var(--transition);
  flex-shrink: 0;
}
.btn-logout:hover { color: var(--danger); background: rgba(239,68,68,.1); }

/* ─── SIDEBAR OVERLAY (mobile) ─── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 99;
}

/* ─── TOPBAR ─── */
.topbar {
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.btn-menu {
  display: none;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
}
.btn-menu:hover { background: var(--bg); }
.topbar-title {
  flex: 1;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar-title i { color: var(--primary); }
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-date {
  font-size: .82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ─── PAGE CONTENT ─── */
.page-content {
  flex: 1;
  padding: 24px;
  max-width: 1400px;
  width: 100%;
}

/* ═══════════════════════════════════════════════
   FLASH MESSAGES
═══════════════════════════════════════════════ */
.flash-container {
  padding: 0 24px;
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 500;
  animation: slideDown .3s ease;
}
.alert-close {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  opacity: .6;
  padding: 2px 4px;
}
.alert-close:hover { opacity: 1; }
.alert-success { background: #DCFCE7; color: #166534; border: 1px solid #BBF7D0; }
.alert-danger  { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }
.alert-warning { background: #FEF9C3; color: #854D0E; border: 1px solid #FEF08A; }
.alert-info    { background: #DBEAFE; color: #1E40AF; border: 1px solid #BFDBFE; }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════
   CARDS
═══════════════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 20px;
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-header h3 {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-header h3 i { color: var(--primary); }
.card-body { padding: 20px; }

/* ═══════════════════════════════════════════════
   STAT CARDS
═══════════════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.stats-grid-3 { grid-template-columns: repeat(3, 1fr); }

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.stat-blue::before  { background: var(--primary); }
.stat-green::before { background: var(--success); }
.stat-yellow::before { background: var(--warning); }
.stat-red::before   { background: var(--danger); }

.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.stat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}
.stat-blue  .stat-icon { background: #EFF6FF; color: var(--primary); }
.stat-green .stat-icon { background: #DCFCE7; color: var(--success-dark); }
.stat-yellow .stat-icon { background: #FEF9C3; color: var(--warning-dark); }
.stat-red   .stat-icon { background: #FEE2E2; color: var(--danger); }

.stat-info { display: flex; flex-direction: column; gap: 2px; }
.stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.stat-label { font-size: .8rem; color: var(--text-muted); font-weight: 500; }
.stat-desc  { font-size: .75rem; color: var(--text-light); }
.stat-footer { font-size: .78rem; }
.stat-footer a { color: var(--primary); font-weight: 500; display: flex; align-items: center; gap: 4px; }
.stat-footer a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 20px; /* Aumentado para melhor toque mobile */
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .875rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
  min-height: 44px; /* Recomendação Apple/Google para toque */
}

@media (max-width: 600px) {
  .btn {
    width: 100%; /* Botões ocupam largura total no mobile */
    justify-content: center;
    padding: 14px 20px;
    font-size: 1rem;
  }
}
.btn:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }

.btn-primary   { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); }

.btn-success   { background: var(--success); color: var(--white); }
.btn-success:hover { background: var(--success-dark); }

.btn-warning   { background: var(--warning); color: var(--dark); }
.btn-warning:hover { background: var(--warning-dark); }

.btn-danger    { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: var(--danger-dark); }

.btn-secondary { background: #E2E8F0; color: var(--text); }
.btn-secondary:hover { background: #CBD5E1; }

.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { background: var(--bg); color: var(--text); }

.btn-whatsapp  { background: #25D366; color: var(--white); }
.btn-whatsapp:hover { background: #1DA851; }
.btn-whatsapp.disabled { opacity: .4; pointer-events: none; }

.btn-full { width: 100%; justify-content: center; }
.btn-sm   { padding: 6px 12px; font-size: .8rem; }
.btn-xs   { padding: 5px 9px; font-size: .78rem; border-radius: 6px; }

/* ═══════════════════════════════════════════════
   FORMS
═══════════════════════════════════════════════ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.form-group label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
}
.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,58,138,.1);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-group select { cursor: pointer; }
.form-group-lg { flex: 2; }

.form-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.form-row .form-group { min-width: 180px; }

.form-hint { font-size: .75rem; color: var(--text-muted); }
.form-hint code {
  background: #F1F5F9;
  padding: 1px 5px;
  border-radius: 4px;
  font-family: monospace;
  font-size: .8rem;
  color: var(--primary);
}

.required { color: var(--danger); }
.optional-tag {
  font-size: .7rem;
  background: #F1F5F9;
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 500;
}

.input-icon {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon > i:first-child {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  font-size: .85rem;
  pointer-events: none;
  z-index: 1;
}
.input-icon input { padding-left: 36px; }
.btn-toggle-pass {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}
.btn-toggle-pass:hover { color: var(--text); }

.form-control {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text);
  width: 100%;
  transition: border-color var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,58,138,.1);
}

/* ═══════════════════════════════════════════════
   TABLE
═══════════════════════════════════════════════ */
.table-responsive { overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.table th {
  padding: 12px 16px;
  text-align: left;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  background: #F8FAFC;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td {
  padding: 14px 16px;
  border-bottom: 1px solid #F1F5F9;
  vertical-align: middle;
}
.table tbody tr:hover { background: #FAFBFC; }
.table tbody tr:last-child td { border-bottom: none; }
.table-sm th, .table-sm td { padding: 8px 12px; }
.text-center { text-align: center; }

.row-vencido { background: #FFF5F5 !important; }
.row-hoje    { background: #FFFBEB !important; }
.row-active  { background: #EFF6FF !important; font-weight: 600; }

/* ═══════════════════════════════════════════════
   BADGES & STATUS
═══════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
  white-space: nowrap;
}
.badge-info    { background: #DBEAFE; color: #1E40AF; }
.badge-success { background: #DCFCE7; color: #166534; }
.badge-warning { background: #FEF9C3; color: #854D0E; }
.badge-danger  { background: #FEE2E2; color: #991B1B; }
.badge-outline { background: #F1F5F9; color: var(--text-muted); border: 1px solid var(--border); }

.badge-plan-starter { background: #F1F5F9; color: var(--text-muted); }
.badge-plan-bronze  { background: #FEF3C7; color: #92400E; }
.badge-plan-prata   { background: #E2E8F0; color: #475569; }
.badge-plan-ouro    { background: #FEF9C3; color: #78350F; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
}
.status-badge i { font-size: .55rem; }
.status-ativo   { background: #DCFCE7; color: #166534; }
.status-vencendo { background: #FEF9C3; color: #854D0E; }
.status-vencido { background: #FEE2E2; color: #991B1B; }

/* ═══════════════════════════════════════════════
   PAGE HEADER
═══════════════════════════════════════════════ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}
.page-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.page-header-right { display: flex; gap: 10px; }

/* ═══════════════════════════════════════════════
   DASHBOARD
═══════════════════════════════════════════════ */
.dashboard-grid { display: flex; flex-direction: column; gap: 0; }
.dashboard-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 16px;
}

/* Plan usage */
.plan-usage { margin-bottom: 16px; }
.usage-text {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 8px;
}
.usage-current { font-size: 1.5rem; font-weight: 700; color: var(--text); }
.usage-sep     { color: var(--text-muted); font-size: 1rem; }
.usage-limit   { font-size: .9rem; color: var(--text-muted); }
.usage-hint    { font-size: .75rem; color: var(--text-muted); }

.progress-bar {
  height: 8px;
  background: #F1F5F9;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 4px;
}
.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width .5s ease;
}
.progress-fill.success { background: var(--success); }
.progress-fill.warning { background: var(--warning); }
.progress-fill.danger  { background: var(--danger); }

.plan-details { display: flex; flex-direction: column; gap: 8px; }
.plan-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .83rem;
  padding: 6px 0;
  border-bottom: 1px solid #F1F5F9;
}
.plan-detail-row span { color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.plan-detail-row i { color: var(--primary); }

/* Client list (dashboard) */
.client-list { display: flex; flex-direction: column; gap: 8px; }
.client-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.client-list-item:hover { background: #F8FAFC; }
.client-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: .9rem;
  flex-shrink: 0;
}
.client-info { flex: 1; min-width: 0; }
.client-name { display: block; font-size: .85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.client-plan { display: block; font-size: .75rem; color: var(--text-muted); }
.client-actions-mini { display: flex; align-items: center; gap: 6px; }

/* Quick actions */
.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  background: #F8FAFC;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: .78rem;
  font-weight: 600;
  text-align: center;
  transition: all var(--transition);
  border: 1.5px solid var(--border);
}
.quick-action-btn:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30,58,138,.2);
}
.quick-action-btn i { font-size: 1.3rem; }

/* ═══════════════════════════════════════════════
   CLIENTS TABLE
═══════════════════════════════════════════════ */
.client-cell { display: flex; align-items: center; gap: 10px; }
.client-avatar-sm {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: .8rem;
  flex-shrink: 0;
}
.client-name-main { font-weight: 600; font-size: .875rem; }
.client-phone { font-size: .75rem; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.venc-cell { display: flex; flex-direction: column; gap: 2px; }
.venc-cell small { font-size: .72rem; }

.action-btns { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; }

/* Filter card */
.filter-card { padding: 0; }
.filter-form {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  flex-wrap: wrap;
}
.filter-group { flex: 1; min-width: 200px; }
.filter-group .input-icon input { background: #F8FAFC; }
.filter-group select {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #F8FAFC;
  color: var(--text);
  width: 100%;
  cursor: pointer;
}

/* ═══════════════════════════════════════════════
   TABS
═══════════════════════════════════════════════ */
.tabs-container { margin-bottom: 20px; }
.tabs {
  display: flex;
  gap: 4px;
  background: var(--white);
  padding: 6px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}
.tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition);
  white-space: nowrap;
}
.tab:hover { background: #F1F5F9; color: var(--text); }
.tab.active { background: var(--primary); color: var(--white); }
.tab-danger.active { background: var(--danger); }
.tab-summary {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: .85rem;
  color: var(--text-muted);
  background: #F8FAFC;
}

/* ═══════════════════════════════════════════════
   FORM PAGE
═══════════════════════════════════════════════ */
.form-page { max-width: 900px; }
.form-page-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.form-page-header h2 { font-size: 1.1rem; font-weight: 700; }
.form-section { margin-bottom: 0; }
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 0;
}

/* ═══════════════════════════════════════════════
   COBRAR
═══════════════════════════════════════════════ */
.cobrar-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  max-width: 1100px;
}
.client-detail-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.client-avatar-lg {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.client-detail-info h3 { font-size: 1rem; font-weight: 700; }
.client-detail-info p { font-size: .85rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.detail-item { display: flex; flex-direction: column; gap: 2px; }
.detail-label { font-size: .72rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.detail-value { font-size: .9rem; font-weight: 600; }

.mensagem-preview {
  background: #F8FAFC;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-size: .9rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 16px;
  white-space: pre-wrap;
}
.cobrar-actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.cobrar-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .75rem;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════
   FINANCEIRO
═══════════════════════════════════════════════ */
.finance-chart {
  display: flex;
  height: 40px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 16px;
}
.finance-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 700;
  color: var(--white);
  transition: width .5s ease;
}
.finance-bar-green { background: var(--success); }
.finance-bar-blue  { background: var(--primary); }
.finance-bar-red   { background: var(--danger); }

.finance-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.legend-item { display: flex; align-items: center; gap: 8px; font-size: .83rem; }
.legend-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.legend-dot.green { background: var(--success); }
.legend-dot.blue  { background: var(--primary); }
.legend-dot.red   { background: var(--danger); }

/* ═══════════════════════════════════════════════
   CONFIGURAÇÕES
═══════════════════════════════════════════════ */
.config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.plan-info-card {
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 16px;
  border: 2px solid var(--border);
}
.plan-info-card.plan-ouro { border-color: var(--warning); background: #FFFBEB; }
.plan-info-card.plan-prata { border-color: #CBD5E1; background: #F8FAFC; }
.plan-info-card.plan-bronze { border-color: #FCD34D; background: #FFFBEB; }
.plan-info-card.plan-starter { border-color: var(--border); }

.plan-info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.plan-name { font-size: 1.1rem; font-weight: 700; }
.plan-info-details { display: flex; flex-direction: column; gap: 6px; }
.plan-info-item { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--text-muted); }
.plan-info-item i { color: var(--primary); width: 16px; }

.account-info { display: flex; align-items: center; gap: 16px; }
.account-avatar {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.account-details h3 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.account-details p { font-size: .83rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }

/* Plan mini cards (registro) */
.auth-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }
.plan-card-mini {
  background: rgba(255,255,255,.08);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border: 1px solid rgba(255,255,255,.12);
}
.plan-card-mini strong { color: var(--white); font-size: .9rem; }
.plan-card-mini span { color: rgba(255,255,255,.6); font-size: .75rem; }
.plan-price { color: var(--warning) !important; font-weight: 700 !important; }

/* ═══════════════════════════════════════════════
   MODALS
═══════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 200;
  display: none; /* só aparece quando o JavaScript abre o modal (style.display = 'flex') */
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn .2s ease;
}
.modal {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 480px;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  animation: slideUp .25s ease;
}
.modal > .modal-header { position: sticky; top: 0; background: var(--white); z-index: 2; }
.modal-sm { max-width: 380px; }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: .95rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.modal-header button { background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 4px; font-size: 1rem; }
.modal-header button:hover { color: var(--danger); }
.modal-body { padding: 20px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding-top: 16px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ═══════════════════════════════════════════════
   EMPTY STATE
═══════════════════════════════════════════════ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  color: var(--text-muted);
  gap: 8px;
  text-align: center;
}
.empty-state i { font-size: 2rem; opacity: .4; }
.empty-state p { font-size: .85rem; }
.empty-state.large { padding: 56px 20px; }
.empty-state.large i { font-size: 3rem; }
.empty-state.large h3 { font-size: 1rem; font-weight: 700; color: var(--text); }

/* ═══════════════════════════════════════════════
   AUTH
═══════════════════════════════════════════════ */
.auth-body {
  background: var(--dark);
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}
.auth-wrapper {
  display: flex;
  width: 100%;
  min-height: 100vh;
}
.auth-left {
  flex: 1;
  background: linear-gradient(160deg, var(--dark) 0%, #1a2744 100%);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 32px;
}
.auth-brand { text-align: center; }
.auth-brand-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  color: var(--white);
  margin: 0 auto 16px;
}
.auth-brand h1 { color: var(--white); font-size: 1.6rem; font-weight: 800; margin-bottom: 8px; }
.auth-brand p { color: rgba(255,255,255,.55); font-size: .9rem; line-height: 1.6; }

.auth-features { display: flex; flex-direction: column; gap: 12px; }
.auth-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,.7);
  font-size: .88rem;
}
.auth-feature i { color: var(--success); width: 20px; text-align: center; }

.auth-right {
  width: 480px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
}
.auth-card { width: 100%; max-width: 400px; }
.auth-card-header { margin-bottom: 24px; }
.auth-card-header h2 { font-size: 1.4rem; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.auth-card-header p { color: var(--text-muted); font-size: .88rem; }

.auth-form { display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; }
.auth-footer { text-align: center; font-size: .85rem; color: var(--text-muted); margin-bottom: 12px; }
.auth-footer a { color: var(--primary); font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }

.auth-demo {
  text-align: center;
  padding: 10px 14px;
  background: #F8FAFC;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════
   UTILITIES
═══════════════════════════════════════════════ */
.text-primary { color: var(--primary); }
.text-success { color: var(--success-dark); }
.text-warning { color: var(--warning-dark); }
.text-danger  { color: var(--danger); }
.text-muted   { color: var(--text-muted); }
.text-info    { color: #0EA5E9; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.text-center { text-align: center; }

/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */
@media (max-width: 1200px) {
  .dashboard-row { grid-template-columns: 1fr 1fr; }
  .cobrar-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .config-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay.open { display: block; }
  .main-content { margin-left: 0; }
  .btn-menu { display: flex; }

  .stats-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-row { grid-template-columns: 1fr; }
  .cobrar-grid { grid-template-columns: 1fr; }
  .auth-left { display: none; }
  .auth-right { width: 100%; }
  .form-row { flex-direction: column; }
  .page-content { padding: 16px; }
  .tabs { gap: 2px; }
  .tab { padding: 8px 12px; font-size: .8rem; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stats-grid-3 { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .quick-actions { grid-template-columns: 1fr 1fr; }
}

/* ═══════════════════════════════════════════════
   ACESSO E SENHAS (PRODUÇÃO)
═══════════════════════════════════════════════ */
.access-info {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.4;
}

.access-user {
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

.access-pass {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: monospace;
  background: #f8fafc;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.btn-icon {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  padding: 4px;
  font-size: 0.9rem;
  transition: transform 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  color: var(--primary-light);
  transform: scale(1.1);
}

.access-pass span {
  min-width: 80px;
  display: inline-block;
}


/* ── Etiquetas (tags) ── */
.tag-chip { display: inline-block; padding: 3px 10px; margin: 4px 4px 0 0; border-radius: 999px;
  background: #e7f1fb; color: #1E3A8A; font-size: .75rem; font-weight: 600; border: none; cursor: pointer;
  text-decoration: none; }
.tag-chip.ativo { background: #1E3A8A; color: #fff; }
.tag-sugestoes { margin-top: 6px; }
.tags-cliente { margin-top: 4px; }
.tags-cliente .tag-chip { cursor: default; font-size: .7rem; padding: 2px 8px; }

/* ── Fila de mensagens ── */
.fila-item { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid #eef1f5; }
.fila-item:last-child { border-bottom: none; }
.fila-item .fila-texto { font-size: .85rem; color: #475569; white-space: pre-wrap; margin-top: 4px; }
.fila-item.enviado { opacity: .45; }
.fila-progresso { font-weight: 700; color: #1E3A8A; }

/* ── Caixa (entradas e saídas) ── */
.caixa-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.caixa-card { background: #fff; border-radius: 12px; padding: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.caixa-card small { color: #64748b; display: block; }
.caixa-card strong { font-size: 1.15rem; }
.valor-entrada { color: #16a34a; }
.valor-saida { color: #dc2626; }
@media (max-width: 768px) { .caixa-grid { grid-template-columns: repeat(2, 1fr); } }

/* ── Cadastros ── */
.cadastro-lista .cadastro-item { display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid #eef1f5; gap: 10px; }
.cadastro-lista .cadastro-item:last-child { border-bottom: none; }
.form-inline-grid { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 8px; align-items: end; }
.form-caixa { grid-template-columns: 1fr 2fr 1fr 1fr 1fr auto; }
@media (max-width: 768px) { .form-inline-grid, .form-caixa { grid-template-columns: 1fr; } }

/* ── Conquistas ── */
.conquista-total { font-size: 2rem; font-weight: 800; color: #0F172A; margin: 4px 0 10px; }
.conquista-barra { height: 10px; background: #e2e8f0; border-radius: 999px; overflow: hidden; margin: 10px 0 4px; }
.conquista-barra div { height: 100%; background: linear-gradient(90deg, #22C55E, #FACC15); border-radius: 999px; }
.medalhas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.medalha-card { background: #fff; border-radius: 14px; padding: 16px 10px; text-align: center; display: flex;
  flex-direction: column; align-items: center; gap: 3px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.medalha-svg { width: 84px; height: 98px; margin-bottom: 6px; }
.medalha-svg .fita { fill: #cbd5e1; } .medalha-svg .aro { fill: #94a3b8; }
.medalha-svg .miolo { fill: #e2e8f0; } .medalha-svg .estrela { fill: #f8fafc; }
.medalha-card:not(.desbloqueada) { opacity: .6; }
.medalha-card:not(.desbloqueada) .medalha-svg { filter: grayscale(1); }
.medalha-card.desbloqueada .fita { fill: #1E3A8A; }
.medalha-card.desbloqueada .estrela { fill: #fff; }
/* bronze: 3 primeiras, prata: 3 seguintes, ouro: o resto */
.medalha-card.desbloqueada.tier-bronze .aro { fill: #b45309; } .medalha-card.desbloqueada.tier-bronze .miolo { fill: #d97706; }
.medalha-card.desbloqueada.tier-prata .aro { fill: #64748b; } .medalha-card.desbloqueada.tier-prata .miolo { fill: #94a3b8; }
.medalha-card.desbloqueada.tier-ouro .aro { fill: #ca8a04; } .medalha-card.desbloqueada.tier-ouro .miolo { fill: #FACC15; }
.medalha-nome { font-size: 1rem; color: #0F172A; }
.medalha-valor { color: #64748b; }
.medalha-frase { color: #15803d; font-weight: 600; }

/* cobrança: plano x app pago */
.cobrar-tipo { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.cobrar-escolha { display: flex; flex-direction: column; gap: 10px; }
.cobrar-escolha .btn { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; }
.cobrar-escolha small { opacity: .85; font-weight: 400; }
.badge-purple { background: #ede9fe; color: #6d28d9; }

.fila-sem-zap { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.fila-sem-zap input { width: 170px; padding: 8px 10px; border: 1px solid var(--border, #d1d5db); border-radius: 8px; }
.fila-item > div:first-child { min-width: 0; flex: 1; }
.fila-texto { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .fila-item { flex-wrap: wrap; }
  .fila-sem-zap { width: 100%; flex-wrap: nowrap; }
  .fila-sem-zap input { flex: 1; width: auto; min-width: 0; }
}
@media (max-width: 600px) { .fila-sem-zap .btn { flex: 0 0 auto; width: auto !important; } .fila-sem-zap input { flex: 1 1 auto; } }

.fila-acoes { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.fila-salvar { font-size: .8rem; color: #475569; display: flex; gap: 6px; align-items: center; }
.fila-dica { font-size: .85rem; color: #475569; background: #f1f5f9; border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
@media (max-width: 600px) { .fila-acoes { width: 100%; align-items: stretch; } .fila-salvar { justify-content: flex-start; } }

/* ═══════════════════════════════════════════════
   TEMA PRO (v23) — visual refinado
═══════════════════════════════════════════════ */
:root {
  --primary: #1E40AF; --primary-light: #3B82F6; --primary-dark: #1E3A8A;
  --bg: #F4F6FB; --border: #E6EAF2; --text: #0F172A; --text-muted: #64748B;
  --radius: 16px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 6px 24px rgba(15,23,42,.05);
  --shadow-lg: 0 12px 32px rgba(15,23,42,.10);
}
body { font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; letter-spacing: -.005em; }
h1, h2, h3 { letter-spacing: -.02em; }

/* Sidebar */
.sidebar { background: linear-gradient(180deg, #0B1224 0%, #111A33 100%); border-right: 1px solid rgba(255,255,255,.04); }
.sidebar-brand { padding: 22px 20px; }
.brand-icon { background: linear-gradient(135deg, #3B82F6, #22C55E); box-shadow: 0 6px 16px rgba(59,130,246,.35); border-radius: 12px; }
.nav-item { color: rgba(226,232,240,.62); padding: 11px 14px; border-radius: 12px; position: relative; }
.nav-item:hover { background: rgba(148,163,184,.10); color: #fff; }
.nav-item.active { background: linear-gradient(90deg, rgba(59,130,246,.22), rgba(59,130,246,.06)); color: #fff; box-shadow: none; }
.nav-item.active::before { content: ''; position: absolute; left: -12px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: #3B82F6; }
.nav-item.active i { color: #60A5FA; }
.user-avatar { background: linear-gradient(135deg, #3B82F6, #1E40AF); font-weight: 700; }

/* Topbar */
.topbar { background: rgba(255,255,255,.85); backdrop-filter: saturate(180%) blur(10px); -webkit-backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--border); }
.topbar-title { font-weight: 700; font-size: 1.05rem; }
.topbar-novo { display: inline-flex; align-items: center; gap: 6px; background: var(--primary); color: #fff; padding: 9px 14px; border-radius: 10px; font-weight: 600; font-size: .85rem; box-shadow: 0 4px 12px rgba(30,64,175,.25); }
.topbar-novo:hover { background: var(--primary-dark); }
.topbar-avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(135deg, #3B82F6, #1E40AF); }

/* Cards, tabelas, botões */
.card { border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); }
.card-header { padding: 16px 20px; border-bottom: 1px solid #EEF1F6; }
.card-header h3 { font-weight: 700; font-size: .98rem; }
.btn { border-radius: 10px; font-weight: 600; }
.btn-primary { background: var(--primary); box-shadow: 0 4px 12px rgba(30,64,175,.18); }
.btn-success { box-shadow: 0 4px 12px rgba(34,197,94,.18); }
.btn-outline { border-radius: 10px; }
.table thead th { background: #F8FAFD; color: #64748B; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.table tbody tr { transition: background .15s ease; }
.table tbody tr:hover { background: #F8FAFF; }
.form-group input, .form-group select, .form-group textarea, .form-control { border-radius: 10px; border-color: #DCE2EC; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--primary-light); box-shadow: 0 0 0 4px rgba(59,130,246,.14); outline: none; }
.page-header h1 { font-weight: 800; letter-spacing: -.03em; }
.stat-card { border-radius: var(--radius); }
.stat-card::before { display: none; }
.alert { border-radius: 12px; }
.badge, .status-badge { border-radius: 999px; }

/* Início */
.dash { display: flex; flex-direction: column; gap: 18px; }
.dash .card { margin-bottom: 0; }
.hero { position: relative; overflow: hidden; border-radius: 22px; padding: 26px; color: #fff;
  background: radial-gradient(circle at 85% 15%, rgba(34,197,94,.35), transparent 40%), linear-gradient(135deg, #0F1F4D 0%, #1E40AF 55%, #2563EB 100%);
  display: grid; grid-template-columns: 1fr 280px; gap: 22px; align-items: center; box-shadow: 0 16px 40px rgba(30,64,175,.25); }
.hero::after { content: ''; position: absolute; width: 260px; height: 260px; border-radius: 50%; right: -80px; bottom: -120px; background: rgba(255,255,255,.06); }
.hero-data { font-size: .82rem; opacity: .8; font-weight: 500; text-transform: none; }
.hero h1 { font-size: 1.85rem; font-weight: 800; margin: 4px 0 14px; color: #fff; }
.hero-frase { display: flex; gap: 10px; align-items: flex-start; background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.14); border-radius: 14px; padding: 12px 14px; max-width: 620px; }
.hero-frase i { opacity: .7; margin-top: 3px; }
.hero-frase p { margin: 0; font-size: .95rem; line-height: 1.5; }
.hero-acoes { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: .9rem; color: #fff; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); }
.hero-btn:hover { background: rgba(255,255,255,.22); }
.hero-btn-claro { background: #fff; color: #1E40AF; border-color: #fff; }
.hero-btn-claro:hover { background: #EEF2FF; }
.hero-meta { position: relative; z-index: 1; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); border-radius: 18px; padding: 16px; color: #fff; display: flex; flex-direction: column; gap: 6px; }
.hero-meta-titulo { font-size: .78rem; opacity: .85; font-weight: 600; }
.hero-meta-titulo i { color: #FACC15; }
.hero-meta strong { font-size: 1.25rem; }
.hero-meta-barra { height: 8px; background: rgba(255,255,255,.18); border-radius: 99px; overflow: hidden; }
.hero-meta-barra div { height: 100%; background: linear-gradient(90deg, #FACC15, #22C55E); border-radius: 99px; }
.hero-meta small { opacity: .85; font-size: .78rem; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; transition: transform .15s ease, box-shadow .15s ease; }
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.kpi-icone { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 6px; font-size: 1rem; }
.kpi-azul { background: #EFF4FF; color: #1E40AF; } .kpi-amarelo { background: #FEF6DB; color: #B45309; }
.kpi-vermelho { background: #FDECEC; color: #DC2626; } .kpi-verde { background: #E7F7EE; color: #15803D; }
.kpi-valor { font-size: 1.55rem; font-weight: 800; color: var(--text); line-height: 1.15; letter-spacing: -.03em; }
.kpi-rotulo { font-size: .8rem; color: var(--text-muted); font-weight: 500; }

.aviso-faixa { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: #FFF4F2; border: 1px solid #FBD5CF; color: #9A3412; font-size: .9rem; }
.aviso-faixa > i:first-child { color: #EA580C; }
.aviso-faixa span { flex: 1; }

.dash-colunas { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; align-items: start; }
.dash-colunas > div { display: flex; flex-direction: column; gap: 18px; }
.link-ver { color: var(--primary); font-weight: 600; font-size: .85rem; display: inline-flex; gap: 6px; align-items: center; }
.lista-venc { display: flex; flex-direction: column; }
.venc-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid #EEF1F6; }
.venc-item:last-child { border-bottom: none; }
.venc-avatar { width: 38px; height: 38px; border-radius: 12px; background: #EFF4FF; color: #1E40AF; display: grid; place-items: center; font-weight: 700; flex-shrink: 0; }
.venc-info { flex: 1; min-width: 0; }
.venc-info strong { display: block; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.venc-info small { color: var(--text-muted); font-size: .78rem; }
.tag-tipo { display: inline-block; font-size: .66rem; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: #EEF2F7; color: #475569; text-transform: uppercase; letter-spacing: .03em; }
.tag-app { background: #EDE9FE; color: #6D28D9; }
.venc-quando { font-size: .8rem; font-weight: 600; color: #475569; white-space: nowrap; }
.venc-quando.hoje { color: #B45309; }
.venc-zap { width: 36px; height: 36px; border-radius: 10px; background: #E7F7EE; color: #16A34A; display: grid; place-items: center; flex-shrink: 0; }
.vazio-bonito { text-align: center; padding: 18px 8px; color: var(--text-muted); }
.vazio-bonito i { font-size: 2rem; color: #22C55E; margin-bottom: 8px; display: block; }
.atalhos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.atalhos a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px; border-radius: 14px; background: #F6F8FC; border: 1px solid #EDF0F6; font-weight: 600; font-size: .82rem; color: var(--text); transition: all .15s ease; }
.atalhos a i { font-size: 1.15rem; color: var(--primary); }
.atalhos a:hover { background: #EFF4FF; border-color: #DBE6FF; }
.plano-uso { font-size: .95rem; margin-bottom: 8px; color: var(--text-muted); }
.plano-uso strong { font-size: 1.4rem; color: var(--text); }
.plano-linha { display: flex; justify-content: space-between; padding: 12px 0; font-size: .88rem; color: var(--text-muted); }
.plano-linha strong { color: var(--text); }

/* Menu inferior (celular) */
.bottom-nav { display: none; }
@media (max-width: 768px) {
  .topbar { padding: 0 14px; }
  .topbar .btn-menu { display: none; }
  .topbar-novo span { display: none; }
  .topbar-novo { padding: 9px 11px; }
  .page-content { padding: 14px 14px 96px; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    background: rgba(255,255,255,.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--border);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgba(15,23,42,.06); }
  .bottom-nav a, .bottom-nav button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; color: #94A3B8; font-size: .66rem; font-weight: 600; background: none; border: none; cursor: pointer; }
  .bottom-nav i { font-size: 1.15rem; }
  .bottom-nav .ativo { color: var(--primary); }
  .bottom-nav .bottom-novo { width: 52px; height: 52px; margin: -22px auto 0; border-radius: 18px; background: linear-gradient(135deg, #3B82F6, #1E40AF); color: #fff; justify-content: center; box-shadow: 0 8px 20px rgba(30,64,175,.35); }
  .bottom-nav .bottom-novo i { font-size: 1.3rem; }
  .whatsapp-support-float { bottom: 88px !important; width: 46px !important; height: 46px !important; font-size: 22px !important; }

  .hero { grid-template-columns: 1fr; padding: 22px 18px; border-radius: 20px; }
  .hero h1 { font-size: 1.5rem; }
  .hero-acoes { display: grid; grid-template-columns: 1fr 1fr; }
  .hero-btn { justify-content: center; white-space: nowrap; padding: 11px 10px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 14px; border-radius: 16px; }
  .kpi-valor { font-size: 1.3rem; }
  .dash-colunas { grid-template-columns: 1fr; }
}
.sidebar .user-plan { display: inline-block; width: fit-content; padding: 1px 8px; border-radius: 99px; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: rgba(250,204,21,.16) !important; color: #FDE68A !important; }

/* Marca no topo (celular) */
.topbar-marca { display: none; align-items: center; gap: 8px; font-weight: 800; font-size: 1rem; color: var(--text); letter-spacing: -.02em; }
.topbar-marca .brand-icon { width: 32px; height: 32px; border-radius: 10px; font-size: 14px; }

/* Login / cadastro */
.auth-body { background: var(--bg); }
.auth-left { background: radial-gradient(circle at 80% 10%, rgba(34,197,94,.30), transparent 45%), linear-gradient(160deg, #0B1224 0%, #1E40AF 100%); }
.auth-card { background: #fff; border: 1px solid var(--border); border-radius: 22px; padding: 30px 26px; box-shadow: var(--shadow-lg); }
.auth-mobile-brand { display: none; }

/* Filtros */
.filter-form { gap: 10px; }
.form-group-icon { position: relative; flex: 2; min-width: 220px; display: flex; align-items: center; }
.form-group-icon i { position: absolute; left: 14px; color: #94A3B8; }
.form-group-icon input { width: 100%; padding: 12px 14px 12px 40px; border: 1px solid #DCE2EC; border-radius: 10px; background: #fff; }
.filter-form select { padding: 12px 14px; border: 1px solid #DCE2EC; border-radius: 10px; background: #fff; min-width: 150px; }

@media (max-width: 768px) {
  .topbar-marca { display: inline-flex; flex: 1; }
  .topbar .topbar-title { display: none; }
  .page-header h1 { font-size: 1.45rem; }
  .page-header h1 i { display: none; }
  .filter-form { flex-direction: column; align-items: stretch; }
  .filter-form .form-group, .form-group-icon { min-width: 0; width: 100%; }
  .filter-form select { width: 100%; }

  .auth-wrapper { min-height: 100vh; }
  .auth-right { padding: 20px 16px; background: radial-gradient(circle at 50% -10%, rgba(59,130,246,.18), transparent 55%), var(--bg); }
  .auth-mobile-brand { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; margin-bottom: 22px; }
  .auth-mobile-brand .auth-brand-icon { margin: 0; width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; color: #fff; font-size: 22px; background: linear-gradient(135deg, #3B82F6, #22C55E); box-shadow: 0 10px 24px rgba(59,130,246,.35); }
  .auth-mobile-brand strong { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; }
  .auth-mobile-brand span { font-size: .85rem; color: var(--text-muted); }
  .auth-card { padding: 24px 20px; }

  /* Clientes em cartões */
  .tabela-cards thead { display: none; }
  .tabela-cards, .tabela-cards tbody { display: block; }
  .table-card .table-responsive { overflow: visible; }
  .tabela-cards tbody tr { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; padding: 16px; border-bottom: 8px solid var(--bg); }
  .tabela-cards tbody tr:last-child { border-bottom: none; }
  .tabela-cards td { display: block; padding: 0 !important; border: none !important; min-width: 0; }
  .tabela-cards td:nth-child(1) { grid-column: 1 / -1; font-size: 1rem; }
  .tabela-cards td:nth-child(2) { grid-column: 1; }
  .tabela-cards td:nth-child(4) { grid-column: 2; justify-self: end; align-self: start; }
  .tabela-cards td:nth-child(3) { grid-column: 1 / -1; }
  .tabela-cards td:nth-child(5) { grid-column: 1 / -1; }
  .tabela-cards td:nth-child(3) .venc-cell { flex-direction: row; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
  .tabela-cards td:nth-child(5) .action-btns { justify-content: flex-start; gap: 8px; padding-top: 10px; border-top: 1px solid #EEF1F6; }
  .tabela-cards td:nth-child(5) .action-btns .btn, .tabela-cards td:nth-child(5) .action-btns form { width: auto; }
  .tabela-cards td:nth-child(5) .btn { min-height: 40px; padding: 8px 12px; font-size: .85rem; }
}
@media (max-width: 768px) {
  .tabela-cards td:nth-child(3) { display: flex; gap: 10px; }
  .tabela-cards td:nth-child(3) .venc-cell { flex: 1; flex-direction: column; gap: 0; margin: 0 !important; background: #F6F8FC; border-radius: 12px; padding: 8px 12px; }
}
@media (max-width: 768px) {
  .tabela-cards tbody tr { grid-template-columns: 1fr auto; }
  .tabela-cards td:nth-child(1) { grid-column: 1; grid-row: 1; }
  .tabela-cards td:nth-child(4) { grid-column: 2; grid-row: 1; justify-self: end; }
  .tabela-cards td:nth-child(2) { grid-column: 1 / -1; }
  .tabela-cards td:nth-child(2) > * { display: inline-flex; vertical-align: middle; margin-right: 6px; }
}
@media (max-width: 768px) {
  .topbar-marca { display: none; }
  .topbar-marca.mostrar { display: inline-flex; }
  .topbar .topbar-title { display: flex; font-size: 1rem; }
  .topbar .topbar-title.esconder-celular { display: none; }
  .filters-bar .btn-group { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 8px; padding-bottom: 4px; scrollbar-width: none; }
  .filters-bar .btn-group .btn { width: auto; flex: 0 0 auto; min-height: 38px; padding: 8px 14px; font-size: .85rem; border-radius: 999px; }
}

/* Logo */
img.logo-img { background: none !important; box-shadow: 0 6px 16px rgba(37,99,235,.30) !important; padding: 0; object-fit: contain; display: block; }
.brand-icon.logo-img { width: 40px; height: 40px; border-radius: 12px; }
.topbar-marca .brand-icon.logo-img { width: 32px; height: 32px; border-radius: 9px; }
.auth-brand-icon.logo-img { width: 72px; height: 72px; border-radius: 20px; margin: 0 auto 16px; }
.marca-365 { color: #22C55E; }
.sidebar .marca-365 { color: #4ADE80; }

/* Login: esqueci a senha + suporte */
.label-linha { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.link-esqueci { font-size: .8rem; font-weight: 600; color: var(--primary); }
.btn-suporte-zap { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; padding: 12px; border-radius: 12px;
  background: #E7F7EE; color: #15803D !important; font-weight: 600; font-size: .9rem; text-decoration: none; border: 1px solid #C9EED7; }
.btn-suporte-zap:hover { background: #D9F3E4; }
@media (max-width: 768px) { .auth-mobile-brand .auth-brand-icon.logo-img { width: 58px; height: 58px; border-radius: 16px; margin: 0; } }
.auth-mobile-brand strong .marca-365 { font-size: inherit; color: #22C55E; }
.auth-brand h1 .marca-365 { color: #4ADE80; }
.info-extra { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; color: #475569; background: #F1F5F9; border-radius: 8px; padding: 2px 8px; margin: 2px 4px 2px 0; }
.info-extra i { color: #64748B; font-size: .72rem; }

/* Admin: assinantes */
.nav-secao { margin: 14px 14px 4px; font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(148,163,184,.6); }
.assinantes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.assinante { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.assinante-topo { display: flex; align-items: center; gap: 10px; }
.assinante-nome { flex: 1; min-width: 0; }
.assinante-nome strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.assinante-nome small { color: var(--text-muted); }
.tag-novo { align-self: flex-start; font-size: .7rem; font-weight: 700; color: #1E40AF; background: #EFF4FF; padding: 2px 10px; border-radius: 99px; margin-top: -4px; }
.assinante-login { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: #F6F8FC; border-radius: 12px; padding: 10px 12px; }
.assinante-login small, .assinante-dados small { display: block; font-size: .7rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.assinante-login strong { font-size: .9rem; word-break: break-all; }
.assinante-login .btn { width: auto; min-height: 34px; }
.assinante-dados { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.assinante-dados strong { display: block; font-size: .9rem; }
.assinante-dados span { display: block; font-size: .76rem; color: var(--text-muted); }
.assinante-dados span.text-warning { color: #B45309; } .assinante-dados span.text-danger { color: #DC2626; }
.assinante-acoes { display: flex; gap: 8px; border-top: 1px solid #EEF1F6; padding-top: 12px; align-items: center; }
.assinante-acoes .btn { flex: 1; width: auto; justify-content: center; }
.sem-zap { flex: 1; font-size: .8rem; color: var(--text-muted); }
@media (max-width: 768px) { .assinantes-grid { grid-template-columns: 1fr; } }

/* Login: novo por aqui */
.novo-aqui { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 14px; border-radius: 14px; background: linear-gradient(135deg, #EFF4FF, #F5F3FF); border: 1px solid #DBE4FF; color: var(--text); }
.novo-aqui:hover { border-color: #B9CBFF; }
.novo-aqui-icone { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #1E40AF; color: #fff; flex-shrink: 0; }
.novo-aqui strong { display: block; font-size: .95rem; }
.novo-aqui small { color: var(--text-muted); font-size: .8rem; line-height: 1.35; display: block; }
.novo-aqui > i:last-child { margin-left: auto; color: #1E40AF; }
.nav-sair { margin-top: 8px; color: rgba(252,165,165,.85) !important; }
.nav-sair:hover { background: rgba(239,68,68,.12) !important; color: #FCA5A5 !important; }

/* Relatórios */
.campo-mes { padding: 11px 14px; border: 1px solid #DCE2EC; border-radius: 10px; background: #fff; font-family: inherit; }
.relatorio { display: flex; flex-direction: column; gap: 16px; }
.relatorio .card { margin-bottom: 0; }
.rel-cabecalho { display: none; align-items: center; gap: 12px; }
.rel-cabecalho img { width: 44px; height: 44px; border-radius: 12px; }
.rel-cabecalho strong { display: block; font-size: 1.2rem; }
.rel-cabecalho small { color: var(--text-muted); }
.rel-duas { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rel-barra { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; align-items: center; padding: 6px 0; font-size: .88rem; }
.rel-barra span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #475569; }
.rel-barra div { height: 8px; background: #EEF2F7; border-radius: 99px; overflow: hidden; }
.rel-barra i { display: block; height: 100%; background: linear-gradient(90deg, #3B82F6, #22C55E); border-radius: 99px; }
.rel-sub { margin: 14px 0 4px; font-size: .85rem; color: var(--text-muted); }
@media (max-width: 768px) { .rel-duas { grid-template-columns: 1fr; } .filter-form .campo-mes { width: 100%; } }
@media print {
  .sidebar, .topbar, .bottom-nav, .whatsapp-support-float, .nao-imprimir, .flash-container { display: none !important; }
  .main-content { margin: 0 !important; }
  .page-content { padding: 0 !important; }
  body { background: #fff; }
  .rel-cabecalho { display: flex; margin-bottom: 8px; }
  .card, .kpi { box-shadow: none !important; break-inside: avoid; }
  .kpis { grid-template-columns: repeat(4, 1fr) !important; }
  .rel-duas { grid-template-columns: 1fr 1fr !important; }
  .tabela-cards thead { display: table-header-group !important; }
}
.tags-assinante { display: flex; gap: 6px; flex-wrap: wrap; margin-top: -4px; }
.tags-assinante .tag-novo { margin-top: 0; }
.tag-prioridade { background: #FEF6DB !important; color: #B45309 !important; }

/* Modal compacto (cadastro de assinante) */
.modal-compacto .modal-body { padding: 14px 18px; display: grid; gap: 12px; }
.modal-compacto .modal-body > * { margin: 0 !important; }
.modal-compacto .form-group label { font-size: .82rem; margin-bottom: 4px; }
.modal-compacto input, .modal-compacto select { padding: 10px 12px; font-size: .95rem; min-height: 0; }
.modal-compacto .dica { font-size: .78rem; color: var(--text-muted); margin-top: 3px; display: block; }
.modal-compacto .duas-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal-compacto .modal-footer { position: sticky; bottom: 0; background: var(--white); padding: 12px 18px; border-top: 1px solid var(--border); z-index: 2; }
.modal-compacto .modal-footer .btn { flex: 1; justify-content: center; }
@media (max-width: 600px) {
  #modalNovoAssinante, #modalUtil { align-items: flex-end; padding: 0; }
  .modal-compacto { max-width: 100%; border-radius: 18px 18px 0 0; max-height: 92dvh; }
}

/* Botão de assinar: verde, destacado em todo o sistema */
.btn-assinar, a.btn-assinar, button.btn-assinar {
  background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%) !important;
  color: #fff !important; border: none !important; font-weight: 700;
  box-shadow: 0 8px 20px rgba(22,163,74,.32);
}
.btn-assinar:hover { filter: brightness(1.05); transform: translateY(-1px); color: #fff !important; }
.btn-assinar i { color: #fff; }

/* Ajuda e assistente */
.assistente { padding: 16px; margin-bottom: 16px; }
.assistente-topo { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.assistente-topo strong { display: block; }
.assistente-topo small { color: var(--text-muted); font-size: .82rem; }
.assistente-icone { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #2563EB, #22C55E); flex-shrink: 0; }
.conversa { display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow-y: auto; padding: 4px 2px 8px; }
.balao { max-width: 88%; padding: 10px 13px; border-radius: 14px; font-size: .9rem; line-height: 1.5; white-space: pre-wrap; }
.balao-bot { background: #F1F4FA; align-self: flex-start; border-bottom-left-radius: 4px; }
.balao-eu { background: #1E40AF; color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.balao.pensando { color: var(--text-muted); font-style: italic; }
.link-topico { display: flex; align-items: center; gap: 6px; margin-top: 8px; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 7px 10px; font: 600 .82rem Inter, sans-serif; color: var(--primary); cursor: pointer; white-space: normal; text-align: left; }
.sugestoes { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.sugestoes button { border: 1px solid var(--border); background: #fff; border-radius: 99px; padding: 6px 12px; font: 500 .8rem Inter, sans-serif; color: var(--text-muted); cursor: pointer; }
.pergunta-form { display: flex; gap: 8px; }
.pergunta-form input { flex: 1; min-width: 0; }
.busca-ajuda { margin-bottom: 12px; }
.ajuda-lista { display: flex; flex-direction: column; gap: 8px; }
.ajuda-item { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 0 14px; scroll-margin-top: 80px; }
.ajuda-item summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 13px 0; font-weight: 600; cursor: pointer; }
.ajuda-item summary::-webkit-details-marker { display: none; }
.ajuda-item .seta { margin-left: auto; color: var(--text-muted); font-size: .8rem; transition: transform .2s; }
.ajuda-item[open] .seta { transform: rotate(180deg); }
.ajuda-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: #EFF4FF; color: #1E40AF; flex-shrink: 0; }
.ajuda-item ol { margin: 0 0 12px 20px; display: flex; flex-direction: column; gap: 6px; font-size: .9rem; color: var(--text); }
.ajuda-item .btn { margin-bottom: 14px; }
.pergunta-form .btn { flex: 0 0 52px !important; width: 52px !important; padding: 0; justify-content: center; }
.pergunta-form input { flex: 1 1 auto !important; width: auto !important; }
.pergunta-form input { border: 1.5px solid var(--border); border-radius: 12px; padding: 12px 14px; font: 400 .95rem Inter, sans-serif; background: #fff; outline: none; }
.pergunta-form input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }

/* Botão e janela "Página do cliente" */
.btn-pagina { background: #EEF2FF; color: #3730A3; border: 1px solid #C7D2FE; font-weight: 600; white-space: nowrap; }
.btn-pagina:hover { background: #E0E7FF; color: #312E81; }
.pagina-explica { font-size: .9rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 12px; }
.pagina-link { background: #F1F4FA; border-radius: 10px; padding: 10px 12px; font-size: .8rem; word-break: break-all; color: var(--text); margin-bottom: 14px; }
.pagina-acoes { display: flex; flex-direction: column; gap: 8px; }
.pagina-acoes .btn { justify-content: center; }
@media (max-width: 768px) {
  .tabela-cards td:nth-child(5) .action-btns .btn-pagina { order: 10; flex: 1 1 100%; width: 100%; justify-content: center; padding: 10px; }
}

/* Utilidades */
.util-secao { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; margin: 18px 0 12px; }
.util-secao i { color: var(--primary); }
.util-secao span { background: #EEF2FF; color: #3730A3; font-size: .75rem; padding: 2px 9px; border-radius: 99px; }
.util-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.util-card { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 8px; text-align: center; box-shadow: var(--shadow); }
.util-foto { aspect-ratio: 16/10; border-radius: 12px; background: #F1F4FA; display: grid; place-items: center; overflow: hidden; }
.util-foto img { width: 100%; height: 100%; object-fit: contain; }
.util-foto i { font-size: 2.2rem; color: #94A3B8; }
.util-card strong { font-size: .98rem; }
.util-card small { color: var(--text-muted); font-size: .8rem; line-height: 1.4; }
.util-card .btn { margin-top: auto; justify-content: center; }
.util-sem-link { margin-top: auto; color: var(--text-muted); font-size: .8rem; padding: 8px; }
@media (max-width: 600px) { .util-grade { grid-template-columns: 1fr 1fr; gap: 10px; } .util-card { padding: 10px; } .util-card .btn { font-size: .78rem; padding: 8px 6px; } }
.util-linha { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.util-linha:last-child { border-bottom: none; }
.util-linha form { margin: 0; }
.util-oculto { opacity: .55; }
.util-mini { width: 52px; height: 52px; border-radius: 12px; background: #F1F4FA; display: grid; place-items: center; overflow: hidden; flex-shrink: 0; color: #94A3B8; }
.util-mini img { width: 100%; height: 100%; object-fit: contain; }
.util-info { flex: 1; min-width: 0; }
.util-info strong { display: block; }
.util-info small { color: var(--text-muted); font-size: .78rem; word-break: break-all; }
.util-foto-campo { display: flex; align-items: center; gap: 10px; }
.util-foto-campo img { width: 56px; height: 56px; object-fit: contain; border-radius: 10px; background: #F1F4FA; }
.util-foto-campo input { min-width: 0; font-size: .85rem; }
.util-remover { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--text-muted); margin-top: 6px; font-weight: 500; }
#modalUtil [hidden], .util-foto-campo img[hidden] { display: none !important; }
.util-remover input { width: auto !important; flex: 0 0 auto !important; margin: 0; }
.util-linha .btn { flex: 0 0 auto !important; width: 38px !important; height: 38px; padding: 0 !important; justify-content: center; }
.util-linha form { flex: 0 0 auto; width: auto !important; }
.util-info small { word-break: normal; overflow-wrap: anywhere; display: block; }

/* Vencimentos em cartões no celular */
@media (max-width: 768px) {
  .tabela-venc thead { display: none; }
  .tabela-venc, .tabela-venc tbody { display: block; width: 100%; }
  .table-card .table-responsive:has(.tabela-venc) { overflow: visible; }
  .tabela-venc tbody tr { display: grid; grid-template-columns: 1fr auto; gap: 10px 12px; padding: 16px; border-bottom: 8px solid var(--bg); }
  .tabela-venc tbody tr:last-child { border-bottom: none; }
  .tabela-venc td { display: block; padding: 0 !important; border: none !important; min-width: 0; }
  .tabela-venc td:nth-child(1) { grid-column: 1; grid-row: 1; }
  .tabela-venc td:nth-child(5) { grid-column: 2; grid-row: 1; justify-self: end; align-self: start; }
  .tabela-venc td:nth-child(2) { grid-column: 1; grid-row: 2; align-self: center; }
  .tabela-venc td:nth-child(3) { grid-column: 2; grid-row: 2; justify-self: end; align-self: center; font-size: 1.05rem; }
  .tabela-venc td:nth-child(4) { grid-column: 1 / -1; grid-row: 3; }
  .tabela-venc td:nth-child(4) .venc-cell { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 12px; background: #F6F8FC; border-radius: 12px; padding: 10px 12px; }
  .tabela-venc td:nth-child(4) .venc-cell br { display: none; }
  .tabela-venc td:nth-child(4) .venc-cell .badge { margin: 0 !important; }
  .tabela-venc td:nth-child(6) { grid-column: 1 / -1; grid-row: 4; }
  .tabela-venc td:nth-child(6) .action-btns { justify-content: flex-start; gap: 8px; padding-top: 10px; border-top: 1px solid #EEF1F6; }
  .tabela-venc td:nth-child(6) .action-btns { flex-wrap: nowrap; }
  .tabela-venc td:nth-child(6) .action-btns > * { flex: 1 1 0; width: auto !important; margin: 0 !important; }
  .tabela-venc td:nth-child(6) .action-btns form .btn { width: 100% !important; }
  .tabela-venc td:nth-child(6) .btn { min-height: 42px; padding: 8px 10px; font-size: .9rem; justify-content: center; }
  .tabs-venc { display: grid; grid-template-columns: 1fr 1fr; }
  .tabs-venc .tab { justify-content: center; padding: 10px 8px; }
}

/* Filtro Todos / Planos / Apps pagos em Vencimentos */
.filtro-tipo-venc { display: flex; gap: 8px; margin: -6px 0 16px; overflow-x: auto; }
.filtro-tipo-venc a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 12px; border-radius: 999px; background: var(--white); border: 1px solid var(--border); color: var(--text-muted); font-weight: 600; font-size: .85rem; white-space: nowrap; }
.filtro-tipo-venc a span { background: #EEF1F6; color: var(--text); border-radius: 999px; padding: 1px 8px; font-size: .75rem; }
.filtro-tipo-venc a.ativo { background: var(--primary, #1E40AF); border-color: transparent; color: #fff; }
.filtro-tipo-venc a.ativo.app { background: #7C3AED; }
.filtro-tipo-venc a.ativo span { background: rgba(255,255,255,.25); color: #fff; }
@media (max-width: 420px) { .filtro-tipo-venc { gap: 6px; } .filtro-tipo-venc a { padding: 9px 8px; font-size: .8rem; gap: 5px; } .filtro-tipo-venc a i { display: none; } }

/* Renovações */
.ren-abas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 6px; box-shadow: var(--shadow); }
.ren-abas a { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 6px; border-radius: var(--radius-sm); font-weight: 600; font-size: .85rem; color: var(--text-muted); text-align: center; line-height: 1.2; }
.ren-abas a.ativo { background: #1E40AF; color: #fff; }
.ren-num { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #EEF1F6; color: var(--text); font-size: .72rem; flex: none; }
.ren-abas a.ativo .ren-num { background: rgba(255,255,255,.25); color: #fff; }
.ren-bolha { background: #2563EB; color: #fff; border-radius: 999px; padding: 1px 7px; font-size: .72rem; }
.ren-bolha.laranja { background: #F59E0B; }
.ren-abas a.ativo .ren-bolha { background: #fff; color: #1E40AF; }
.ren-explica { color: var(--text-muted); font-size: .88rem; margin: 14px 2px; }
.ren-card { background: var(--white); border: 1px solid var(--border); border-left: 5px solid #2563EB; border-radius: var(--radius); padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.ren-card.conferir { border-left-color: #F59E0B; }
.ren-card.renovada { border-left-color: #22C55E; opacity: .9; }
.ren-topo { display: flex; align-items: center; gap: 12px; }
.ren-nome { flex: 1; min-width: 0; }
.ren-nome strong { display: block; font-size: 1rem; }
.ren-nome small { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 3px; }
.ren-serv { color: var(--text-muted); font-size: .78rem; }
.ren-valor { font-weight: 800; font-size: 1.05rem; }
.ren-info { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; margin-top: 12px; font-size: .8rem; }
.ren-origem { font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #EEF1F6; }
.ren-origem.mercado_pago { background: #E0F2FE; color: #0369A1; }
.ren-origem.pix { background: #DCFCE7; color: #15803D; }
.ren-origem.direto { background: #F3E8FF; color: #7E22CE; }
.ren-quando { color: var(--text-muted); align-self: center; }
.ren-acesso { background: #F6F8FC; border-radius: 12px; padding: 10px 12px; margin-top: 12px; display: grid; gap: 8px; }
.ren-campo { display: flex; align-items: center; gap: 8px; }
.ren-campo small { width: 110px; color: var(--text-muted); flex: none; }
.ren-campo code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: .95rem; font-weight: 700; color: var(--text); background: none; }
.ren-campo strong { flex: 1; }
.ren-botoes { display: flex; gap: 8px; margin-top: 12px; }
.ren-botoes > *, .ren-botoes form .btn { flex: 1; width: 100%; justify-content: center; min-height: 44px; }
.ren-remover { text-align: center; margin-top: 8px; }
.ren-remover button { background: none; border: none; color: var(--text-muted); font-size: .78rem; text-decoration: underline; cursor: pointer; }
.ren-dica { font-size: .82rem; color: var(--text-muted); margin-top: 8px; }
.ren-dica a { color: #1E40AF; font-weight: 600; }
.nav-bolha { margin-left: auto; background: #F59E0B; color: #fff; border-radius: 999px; padding: 1px 8px; font-size: .72rem; font-weight: 700; }
@media (max-width: 420px) { .ren-abas a { flex-direction: column; font-size: .76rem; gap: 4px; } .ren-campo small { width: 80px; } }
.menu-ponto { position: absolute; top: 4px; left: 50%; margin-left: 8px; width: 10px; height: 10px; border-radius: 50%; background: #F59E0B; border: 2px solid #fff; }
.aviso-renov { display: flex; align-items: center; gap: 12px; background: #FFFBEB; border: 1px solid #FCD34D; border-radius: var(--radius); padding: 12px 14px; margin-bottom: 16px; color: #92400E; font-weight: 600; font-size: .9rem; }
.aviso-renov i { font-size: 1.2rem; }
.aviso-renov span { flex: 1; }
.aviso-renov .btn { flex: none; }
.ren-campo .btn { flex: none !important; width: auto !important; min-height: 34px; }
.aviso-renov .btn { width: auto !important; padding: 6px 16px; }
.aviso-renov span { min-width: 0; }

/* App e avisos */
.appc-card { display: flex; gap: 14px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.appc-num { flex: none; width: 34px; height: 34px; border-radius: 50%; background: #1E40AF; color: #fff; display: grid; place-items: center; font-weight: 800; }
.appc-corpo { flex: 1; min-width: 0; }
.appc-corpo h3 { margin: 4px 0 8px; font-size: 1.05rem; }
.appc-corpo p, .appc-corpo li { font-size: .9rem; line-height: 1.5; }
.appc-corpo ol { padding-left: 20px; margin: 6px 0 0; }
.appc-lista { list-style: none; padding: 0; margin: 6px 0 12px; display: grid; gap: 6px; }
.appc-btn { width: 100%; justify-content: center; min-height: 46px; margin: 6px 0; }
.appc-ok { color: #15803D; font-weight: 700; }
.appc-msg { font-size: .85rem; font-weight: 600; margin-top: 6px; }
.appc-msg.ok { color: #15803D; } .appc-msg.erro { color: #B91C1C; }
.aviso-app { display: flex; align-items: center; gap: 12px; background: #EFF6FF; border: 1px solid #BFDBFE; border-radius: var(--radius); padding: 12px 14px; margin-bottom: 16px; color: #1E3A8A; font-weight: 600; font-size: .9rem; }
.aviso-app i.fa-mobile-screen-button { font-size: 1.3rem; }
.aviso-app span { flex: 1; min-width: 0; }
.aviso-app .btn { width: auto !important; flex: none; padding: 6px 14px; }
.aviso-app .fechar { background: none; border: none; color: #64748B; font-size: 1rem; cursor: pointer; padding: 4px; }
.appc-card [hidden], .aviso-app[hidden] { display: none !important; }
.assinante-acoes form { flex: none; } .assinante-acoes form .btn { width: auto; }

/* Publicidade */
.pub-campos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pub-campos .form-group { margin: 0; }
.pub-formato { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 14px; background: #F1F5F9; padding: 5px; border-radius: 12px; }
.pub-formato button { border: none; background: none; padding: 10px; border-radius: 9px; font-weight: 700; color: var(--text-muted); cursor: pointer; font-size: .85rem; }
.pub-formato button.ativo { background: #fff; color: #1E40AF; box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.pub-salvo { font-size: .78rem; color: #15803D; font-weight: 600; min-height: 1em; margin: 6px 0 0; }
.pub-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 16px; }
.pub-item { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow); }
.pub-canvas { width: 100%; height: auto; display: block; border-radius: 12px; background: #E2E8F0; }
.pub-botoes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.pub-botoes .btn { width: 100%; justify-content: center; min-height: 44px; }
@media (max-width: 768px) { .pub-campos { grid-template-columns: 1fr; gap: 8px; } .pub-grade { grid-template-columns: 1fr; } }
.pub-mini { color: #fff; }
.pub-tema-azul { background: linear-gradient(135deg,#0B1E5B,#1D4ED8) !important; } .pub-tema-verde { background: linear-gradient(135deg,#052E16,#16A34A) !important; }
.pub-tema-roxo { background: linear-gradient(135deg,#2E1065,#7C3AED) !important; } .pub-tema-laranja { background: linear-gradient(135deg,#7C2D12,#EA580C) !important; }
.pub-tema-vermelho { background: linear-gradient(135deg,#450A0A,#DC2626) !important; } .pub-tema-preto { background: linear-gradient(135deg,#050505,#27272A) !important; }
#modalBanner [hidden] { display: none !important; }
.pub-precos { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; }
.pub-precos span { font-size: .8rem; font-weight: 700; color: var(--text-muted); width: 100%; }
.pub-precos button { border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 7px 12px; font-weight: 700; font-size: .82rem; color: var(--text); cursor: pointer; }
.pub-precos button.ativo { background: #16A34A; border-color: #16A34A; color: #fff; }
.pub-meu { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: .78rem; color: var(--text-muted); font-weight: 600; }
.pub-meu span { flex: 1; }
.pub-meu .btn { width: auto; }
.pub-meu form { margin: 0; }
.pub-abas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.pub-abas button { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 2px solid var(--border); background: #fff; border-radius: 14px; padding: 12px 6px; font-weight: 800; font-size: .82rem; color: var(--text-muted); cursor: pointer; }
.pub-abas button i { font-size: 1.25rem; }
.pub-abas button.ativo { border-color: #1E40AF; background: #EFF6FF; color: #1E40AF; box-shadow: 0 2px 8px rgba(30,64,175,.15); }
.pub-dados [data-so][hidden], .pub-item[hidden] { display: none !important; }

/* Sininho de notificações no topo */
.topbar-sino { position: relative; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--primary); background: #EEF2FF; font-size: 1.05rem; }
.topbar-sino.tem { color: #B45309; background: #FEF3C7; animation: sinoBalanca 1.2s ease-in-out 2; }
.topbar-sino .sino-num { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: #EF4444; color: #fff; font-size: .68rem; font-weight: 800; display: grid; place-items: center; border: 2px solid #fff; }
@keyframes sinoBalanca { 0%,100% { transform: rotate(0); } 20% { transform: rotate(14deg); } 40% { transform: rotate(-12deg); } 60% { transform: rotate(8deg); } 80% { transform: rotate(-4deg); } }

/* Cadastros: novo valor do crédito */
.cadastro-lista .cadastro-item { flex-wrap: wrap; }
.cadastro-lista .cadastro-item > div:first-child { flex: 1 1 0; min-width: 0; }
.novo-preco { margin-top: 6px; font-size: .82rem; flex-basis: 100%; }
.novo-preco summary { cursor: pointer; color: var(--primary, #1E40AF); font-weight: 600; list-style: none; }
.novo-preco summary::-webkit-details-marker { display: none; }
.novo-preco-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 8px 0 4px; }
.novo-preco-form label { display: flex; flex-direction: column; gap: 3px; font-size: .78rem; flex: 1 1 120px; margin: 0; }
.novo-preco-form input { width: 100%; padding: 9px 12px; border: 1px solid #DCE2EC; border-radius: 10px; font-size: .9rem; }
.novo-preco-form .btn { width: auto; }
.precos-hist { margin-top: 6px; display: flex; flex-direction: column; gap: 2px; }
.precos-hist > div { display: flex; align-items: center; gap: 6px; }
