@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #050B14;
  --surface: #0B1422;
  --surface-2: #111C2B;
  --border: #1c2a3d;
  --border-soft: #142032;
  --text: #f4f6f9;
  --text-muted: #8593a8;
  --accent: #FFC400;
  --accent-soft: #FFD54D;
  --accent-dark: #3d2a00;
  --danger: #FF4D5F;
  --success: #22C55E;
  --info: #3B82F6;
  --analytics: #8B5CF6;
  --radius: 18px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 500px at 15% -10%, rgba(255,196,0,0.05), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ============ LOGIN ============ */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.login-wrap::before {
  content: '';
  position: absolute;
  width: 640px; height: 640px;
  border: 1px solid rgba(255,196,0,0.08);
  border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.login-wrap::after {
  content: '';
  position: absolute;
  width: 420px; height: 420px;
  border: 1px solid rgba(255,196,0,0.12);
  border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: pulse-ring 3.5s ease-out infinite;
}
@keyframes pulse-ring {
  0%   { width: 60px; height: 60px; opacity: 0.9; }
  100% { width: 640px; height: 640px; opacity: 0; }
}

.login-card {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.75rem 2.5rem;
  width: 340px;
  position: relative;
  z-index: 1;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.login-logo { display: block; width: 100%; max-width: 200px; margin: 0 auto 1.75rem; filter: invert(1) brightness(1.6); }
.login-sub { text-align: center; font-size: 12px; color: var(--text-muted); margin: -1.25rem 0 1.75rem; letter-spacing: 0.5px; }

.login-card input {
  width: 100%;
  background: #0f0f11;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.login-card input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,196,0,0.15);
}
.login-card button {
  width: 100%;
  background: linear-gradient(180deg, var(--accent-soft), var(--accent));
  color: #1a1200;
  border: none;
  font-weight: 600;
  font-size: 14px;
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: filter .15s ease, transform .15s ease, box-shadow .15s ease;
  font-family: inherit;
}
.login-card button:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,196,0,0.25); }
.login-card button:active { transform: translateY(0); }
.login-error {
  color: var(--danger);
  font-size: 13px;
  margin-bottom: 10px;
  text-align: center;
  background: rgba(255,92,92,0.08);
  border: 1px solid rgba(255,92,92,0.2);
  padding: 8px;
  border-radius: 8px;
}

/* ============ LAYOUT ============ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.75rem;
  backdrop-filter: blur(6px);
}
.brand-logo { height: 30px; filter: invert(1) brightness(1.6); }
.user-badge {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(180deg, var(--accent-soft), var(--accent));
  color: #1a1200;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.topbar-right { display: flex; align-items: center; gap: 16px; }
.logout-link {
  font-size: 13px; color: var(--text-muted);
  transition: color .15s ease;
  display: flex; align-items: center; gap: 5px;
}
.logout-link:hover { color: var(--accent); }

.topbar { position: sticky; top: 0; z-index: 20; }

.navbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.2rem;
  position: fixed;
  top: 84px;
  left: 20px;
  bottom: 66px;
  width: 200px;
  padding: 10px;
  border-radius: 20px;
  font-size: 13px;
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.05), 0 0 60px rgba(139,92,246,0.06);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 15;
}
.navbar a {
  padding: 10px 14px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 13px;
  transition: color .15s ease, background .15s ease, transform .15s ease;
  font-weight: 500;
  white-space: nowrap;
}
.navbar a i { font-size: 16px; width: 18px; text-align: center; flex-shrink: 0; }
.navbar a:hover { color: var(--text); background: rgba(255,255,255,0.05); transform: translateX(2px); }
.navbar a.active {
  color: #1a1200;
  background: linear-gradient(180deg, var(--accent-soft), var(--accent));
  box-shadow: 0 4px 14px rgba(255,196,0,0.3);
}
.navbar a.active i { color: #1a1200; }

.content { padding: 0 1.75rem 1.75rem; padding-left: calc(200px + 40px + 1.75rem); max-width: 1440px; margin: 0 auto; }

/* ============ CARDS ============ */
.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.card:hover { border-color: var(--border); box-shadow: 0 8px 24px rgba(0,0,0,0.25); }
.grid { display: grid; gap: 14px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.metric-label { font-size: 12px; color: var(--text-muted); margin: 0 0 8px; font-weight: 500; }
.metric-value { font-size: 26px; font-weight: 700; margin: 0; letter-spacing: -0.5px; }
.metric-value.accent { color: var(--accent); }
.metric-value.danger { color: var(--danger); }
.metric-value.success { color: var(--success); }
.metric-value.info { color: var(--info); }
.metric-value.purple { color: var(--analytics); }

/* ============ BOTOES ============ */
.btn {
  border: none;
  padding: 9px 18px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: filter .15s ease, transform .15s ease, box-shadow .15s ease;
  font-family: inherit;
}
.btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-primary { background: linear-gradient(180deg, var(--accent-soft), var(--accent)); color: #1a1200; }
.btn-primary:hover { box-shadow: 0 6px 18px rgba(255,196,0,0.22); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { background: var(--surface-2); }
.btn-danger { background: var(--danger); color: #fff; }

/* ============ TABELAS ============ */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; color: var(--text-muted); font-weight: 500; padding: 10px 8px; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.5px; }
td { padding: 12px 8px; border-top: 1px solid var(--border-soft); }
tr.row-hover { transition: background .15s ease; }
tr.row-hover:hover { background: var(--surface-2); }

.badge { font-size: 11px; padding: 4px 11px; border-radius: 20px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.badge-online { background: rgba(34,197,94,0.12); color: var(--success); }
.badge-online::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 6px var(--success); }
.badge-offline { background: rgba(255,77,95,0.1); color: var(--danger); }
.badge-offline::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--danger); }

.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.5rem;
}
.page-title { font-size: 18px; font-weight: 700; margin: 0; letter-spacing: -0.3px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.form-grid input, .form-grid select {
  background: #0f0f11; border: 1px solid var(--border); color: var(--text);
  padding: 11px 13px; border-radius: 9px; font-size: 13px; font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-grid input:focus, .form-grid select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,196,0,0.12);
}

/* ============ LISTA DE DISPOSITIVOS (estilo linha) ============ */
.device-row {
  display: grid;
  grid-template-columns: 130px 1.6fr 1fr 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px 8px;
  border-top: 1px solid var(--border-soft);
  transition: background .15s ease;
}
.device-row:hover { background: var(--surface-2); }
.status-pill {
  font-size: 11px; font-weight: 700; padding: 5px 12px; border-radius: 20px;
  display: inline-flex; align-items: center; gap: 6px; width: fit-content;
  text-transform: uppercase; letter-spacing: 0.3px; white-space: nowrap;
}
.status-pill.on { background: rgba(34,197,94,0.12); color: var(--success); box-shadow: 0 0 16px rgba(34,197,94,0.12); }
.status-pill.on::before { content:''; width:6px; height:6px; border-radius:50%; background: var(--success); box-shadow: 0 0 10px 2px var(--success); }
.status-pill.off { background: rgba(255,77,95,0.1); color: var(--danger); }
.status-pill.off::before { content:''; width:6px; height:6px; border-radius:50%; background: var(--danger); box-shadow: 0 0 6px 1px var(--danger); }
.status-pill.blocked { background: rgba(255,196,0,0.12); color: var(--accent); box-shadow: 0 0 16px rgba(255,196,0,0.12); }
.status-pill.blocked::before { content:''; width:6px; height:6px; border-radius:50%; background: var(--accent); box-shadow: 0 0 10px 2px var(--accent); }
.device-client-name { color: var(--accent); font-weight: 600; font-size: 14px; }
.device-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.device-col-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin: 0 0 3px; }
.device-col-value { font-size: 13px; margin: 0; }
.icon-btn {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border);
  background: transparent; color: var(--text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
  transition: all .15s ease;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

/* ============ MINI-PAINEL DE DISPOSITIVO ============ */
.sheet-header { display:flex; align-items:center; justify-content:space-between; margin-bottom: 1.25rem; }
.sheet-close {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
  transition: all .15s ease;
}
.sheet-close:hover { color: var(--text); border-color: var(--border-strong, var(--border)); }

.signal-box {
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.1rem 1.35rem;
  margin-bottom: 1rem;
}
.signal-box.bad { border-left-color: var(--danger); background: linear-gradient(90deg, rgba(255,92,92,0.06), transparent 60%); }
.signal-box.warn { border-left-color: var(--accent); background: linear-gradient(90deg, rgba(255,196,0,0.06), transparent 60%); }
.signal-box.good { border-left-color: var(--success); }

.section-title { font-size: 14px; font-weight: 700; margin: 0 0 14px; letter-spacing: -0.2px; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 28px; }
.info-label { font-size: 10.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin: 0 0 4px; }
.info-value { font-size: 14px; font-weight: 500; margin: 0; }

/* ============ FUNDO IMERSIVO (partículas + varredura radar) ============ */
#bg-particles {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
}
body::before {
  content: '';
  position: fixed; inset: -20%;
  z-index: 0; pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(255,196,0,0.05) 8deg, transparent 40deg);
  animation: radar-sweep 8s linear infinite;
}
@keyframes radar-sweep { to { transform: rotate(360deg); } }
.topbar, .navbar, .content, .login-wrap { position: relative; z-index: 1; }
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 7px 12px;
  flex: 1; max-width: 340px;
  margin: 0 1rem;
}
.search-box i { color: var(--text-muted); font-size: 15px; }
.search-box input {
  background: transparent; border: none; outline: none;
  color: var(--text); font-size: 13px; width: 100%;
  font-family: inherit;
}
.search-box input::placeholder { color: var(--text-muted); }
@media (max-width: 760px) {
  .search-box { margin: 0; max-width: none; }
  .topbar { flex-wrap: wrap; gap: 10px; }
}

/* ============ GLASSMORPHISM ============ */
body {
  background: #030507;
  position: relative;
}
body::after {
  content: '';
  position: fixed;
  inset: -25%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(700px 500px at 15% 5%, rgba(255,196,0,0.07), transparent 60%),
    radial-gradient(600px 500px at 88% 25%, rgba(59,130,246,0.05), transparent 55%),
    radial-gradient(650px 550px at 30% 90%, rgba(139,92,246,0.045), transparent 60%);
  animation: derivar-blobs 26s ease-in-out infinite;
  will-change: transform;
}
@keyframes derivar-blobs {
  0%   { transform: translate(0%, 0%); }
  33%  { transform: translate(2%, 3%); }
  66%  { transform: translate(-2%, -2%); }
  100% { transform: translate(0%, 0%); }
}
.card, .stat-card, .modal-panel, .login-card, .signal-box {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 4px 24px rgba(0,0,0,0.3);
}
.card:hover, .stat-card:hover { border-color: rgba(255,255,255,0.14); }
.topbar {
  background: rgba(3,5,7,0.45);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}
.modal-panel { background: rgba(10,12,16,0.55); }
.search-box, .form-grid input, .form-grid select, .login-card input {
  background: rgba(255,255,255,0.03) !important;
  border-color: rgba(255,255,255,0.08) !important;
}

/* ============ RESPONSIVO (CELULAR) ============ */
@media (max-width: 760px) {
  .content { padding: 1rem; padding-left: 1rem; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .navbar {
    position: static; flex-direction: row; width: auto; max-width: calc(100% - 2rem);
    top: auto; left: auto; bottom: auto; margin: 10px auto 16px;
    gap: 0.15rem; padding: 0.4rem 0.75rem; overflow-x: auto;
  }
  .navbar a { padding: 8px 10px; font-size: 12.5px; white-space: nowrap; }
  .navbar a i { margin-right: 4px; }
  .topbar { padding: 0.7rem 1rem; position: static; }
  .brand-logo { height: 24px; }
  .logout-link span, .logout-link { font-size: 0; }
  .logout-link i { font-size: 18px; margin-right: 0; }
  #radar-ticker { left: 10px; }

  .device-row {
    grid-template-columns: 1fr !important;
    gap: 6px;
    padding: 14px 4px;
  }
  .device-row .status-pill { margin-bottom: 6px; }
  .device-row .icon-btn { display: none; }
  .device-row > div[style*="display:flex"] { flex-wrap: wrap; }

  .info-grid { grid-template-columns: 1fr; gap: 10px; }
  .form-grid { grid-template-columns: 1fr !important; }

  .modal-overlay { padding: 0; align-items: stretch; }
  .modal-panel {
    max-width: 100%; width: 100%;
    max-height: 100vh; height: 100vh;
    border-radius: 0;
  }
  .page-title { font-size: 16px; }
  .sheet-header { flex-wrap: wrap; gap: 10px; }
}

/* ============ ÍCONES (Tabler via CDN) ============ */
.ti { font-size: 16px; vertical-align: -2px; margin-right: 6px; }

/* ============ NEON / GLOW ============ */
.glow-accent { box-shadow: 0 0 0 1px rgba(255,196,0,0.25), 0 0 24px rgba(255,196,0,0.12); }
.glow-success { box-shadow: 0 0 0 1px rgba(34,197,94,0.3), 0 0 24px rgba(34,197,94,0.15); }
.glow-danger { box-shadow: 0 0 0 1px rgba(255,77,95,0.3), 0 0 24px rgba(255,77,95,0.15); }
.glow-info { box-shadow: 0 0 0 1px rgba(59,130,246,0.3), 0 0 24px rgba(59,130,246,0.15); }

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 currentColor; opacity: 1; }
  50% { box-shadow: 0 0 0 4px transparent; opacity: 0.7; }
}
.status-pill.on::before { animation: pulse-dot 2s ease-in-out infinite; }

.stat-card {
  display: block;
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border-soft);
  border-radius: 20px 20px 20px 8px;
  padding: 1.1rem;
  position: relative;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-radius .2s ease;
}
.stat-card:hover { transform: translateY(-3px); border-radius: 20px 20px 8px 20px; }
.stat-card .stat-icon {
  width: 34px; height: 34px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px; font-size: 17px;
}
.stat-icon.i-accent { background: rgba(255,196,0,0.12); color: var(--accent); }
.stat-icon.i-success { background: rgba(34,197,94,0.12); color: var(--success); }
.stat-icon.i-danger { background: rgba(255,77,95,0.12); color: var(--danger); }
.stat-icon.i-info { background: rgba(59,130,246,0.12); color: var(--info); }

/* ============ MODAL (mini-painel em pop-up) ============ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(2,6,12,0.65);
  backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 4vh 1rem;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  width: 100%; max-width: 760px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,196,0,0.08);
  transform: translateY(16px) scale(0.98);
  transition: transform .25s cubic-bezier(.2,.9,.3,1.2);
  padding: 1.5rem;
}
.modal-overlay.open .modal-panel { transform: translateY(0) scale(1); }
.modal-loading {
  display: flex; align-items: center; justify-content: center;
  padding: 4rem 0; color: var(--text-muted); font-size: 13px; gap: 10px;
}
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--border-strong, var(--border));
  border-top-color: var(--accent);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.status-pill i.ti-loader-2 { animation: girar-loader 0.9s linear infinite; }
@keyframes girar-loader { to { transform: rotate(360deg); } }

.rd-row:hover { background: var(--surface-2); }

/* ============ TICKER DE EVENTOS (barra flutuante) ============ */
#radar-ticker {
  position: fixed;
  left: 240px; right: 20px; bottom: 16px;
  height: 40px;
  z-index: 50;
  background: rgba(10,14,20,0.55);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  box-shadow: 0 12px 34px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05);
  overflow: hidden;
  display: flex;
  align-items: center;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
#radar-ticker.radar-ticker-oculto { transform: translateY(56px); }
#radar-ticker.radar-ticker-flash { box-shadow: 0 0 0 1px rgba(255,196,0,0.5), 0 12px 34px rgba(255,196,0,0.15); }

.radar-ticker-track { flex: 1; overflow: hidden; white-space: nowrap; height: 100%; display: flex; align-items: center; mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
.radar-ticker-grupo { display: inline-flex; align-items: center; animation: radar-ticker-scroll 40s linear infinite; padding-right: 40px; }
.radar-ticker-track:hover .radar-ticker-grupo { animation-play-state: paused; }
@keyframes radar-ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-100%); } }

.radar-ticker-item { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-muted); padding: 0 14px; }
.radar-ticker-item i { font-size: 14px; }
.radar-ticker-item span:nth-child(2) { color: var(--text); }
.radar-ticker-hora { color: var(--text-muted) !important; font-size: 10.5px; opacity: 0.7; }
.radar-ticker-dot { color: var(--border); font-size: 10px; }

#radar-ticker-toggle {
  flex-shrink: 0; width: 36px; height: 100%; background: transparent; border: none; border-left: 1px solid rgba(255,255,255,0.06);
  color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center;
}
#radar-ticker-toggle:hover { color: var(--accent); }

@media (max-width: 760px) {
  #radar-ticker { left: 10px; right: 10px; height: 36px; }
}

.radar-avatar { transition: transform 0.2s ease, box-shadow 0.2s ease; border-radius: 8px; }
.radar-avatar:hover { transform: scale(1.15); box-shadow: 0 0 10px rgba(255,255,255,0.15); }

/* =====================================================================
   DESIGN RADAR — escuro, com a estrutura de UI da referência "Crextio"
   (pílulas, números grandes e finos, cartões macios, destaque em amarelo)
   Esta camada define o padrão visual de todas as telas.
   ===================================================================== */
:root {
  --bg: #0B0B0D;
  --surface: rgba(30,30,34,0.72);
  --surface-2: rgba(42,42,47,0.92);
  --border: rgba(255,255,255,0.08);
  --border-soft: rgba(255,255,255,0.05);
  --text: #F2F1EE;
  --text-muted: #8E8A82;
  --accent: #FFD84D;
  --accent-soft: #FFE58A;
  --accent-dark: #161616;
  --danger: #FF5A67;
  --success: #22C55E;
  --info: #60A5FA;
  --analytics: #A78BFA;
  --radius: 26px;
  --claro: #F2F1EE;
  --escuro-destaque: #0A0A0C;
}

body {
  background:
    radial-gradient(900px 620px at 100% -5%, rgba(255,200,40,0.11), transparent 62%),
    radial-gradient(760px 640px at 102% 105%, rgba(255,200,40,0.09), transparent 60%),
    radial-gradient(680px 520px at -5% 105%, rgba(255,200,40,0.05), transparent 60%),
    linear-gradient(180deg, #0D0D0F 0%, #121215 100%) !important;
  background-attachment: fixed !important;
  color: var(--text);
}
body::before, body::after, #bg-particles { display: none !important; }

/* ---------- Barra do topo ---------- */
.topbar {
  position: relative !important;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  padding: 18px 28px 4px !important;
}
.topbar > a:first-child {
  display: inline-flex; align-items: center;
  padding: 8px 20px;
  border: 1.5px solid rgba(255,255,255,0.28);
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
}
.brand-logo { filter: invert(1) brightness(1.6) !important; height: 22px !important; }
.search-box {
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid var(--border) !important;
  border-radius: 999px !important;
}
.search-box input { color: var(--text) !important; }
.user-badge {
  background: rgba(255,255,255,0.06) !important; color: var(--text) !important;
  border: 1px solid var(--border) !important;
}
.logout-link { color: var(--text-muted) !important; }
.logout-link:hover { color: var(--text) !important; }

/* ---------- Menu em pílula (item ativo em amarelo) ---------- */
.navbar {
  position: static !important;
  flex-direction: row !important;
  width: fit-content !important;
  max-width: calc(100% - 3rem) !important;
  top: auto !important; left: auto !important; bottom: auto !important;
  margin: 10px auto 26px !important;
  padding: 5px !important;
  gap: 2px !important;
  background: rgba(30,30,34,0.8) !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  border-radius: 999px !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35) !important;
  backdrop-filter: blur(14px) !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
}
.navbar::-webkit-scrollbar { height: 0; }
.navbar a {
  padding: 8px 15px !important;
  border-radius: 999px !important;
  color: #B5B0A7 !important;
  font-size: 12.5px !important;
  gap: 6px !important;
  transform: none !important;
}
.navbar a i { font-size: 14px !important; width: auto !important; color: inherit !important; }
.navbar a:hover { background: rgba(255,255,255,0.06) !important; color: var(--text) !important; }
.navbar a.active {
  background: var(--accent) !important;
  color: #161616 !important;
  box-shadow: 0 6px 18px rgba(255,216,77,0.25) !important;
}
.navbar a.active i { color: #161616 !important; }

.content {
  padding-left: 1.75rem !important;
  margin-top: 0 !important;
  max-width: 1320px;
  padding-bottom: 80px !important;
}

/* ---------- Cartões ---------- */
.card, .stat-card, .signal-box {
  background: linear-gradient(160deg, rgba(36,36,40,0.78), rgba(24,24,27,0.78)) !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  border-radius: var(--radius) !important;
  box-shadow: 0 12px 32px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.04) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
}
.card:hover, .stat-card:hover { border-color: rgba(255,255,255,0.10) !important; }
.stat-card:hover { border-radius: var(--radius) !important; transform: translateY(-2px); }
.glow-success, .glow-info { box-shadow: 0 12px 32px rgba(0,0,0,0.35) !important; }
.glow-danger { border-color: rgba(255,90,103,0.28) !important; box-shadow: 0 12px 32px rgba(255,90,103,0.08) !important; }
.glow-accent {
  background: linear-gradient(135deg, rgba(255,216,77,0.16), rgba(30,30,34,0.78) 70%) !important;
  border-color: rgba(255,216,77,0.25) !important;
}

/* Cartão de destaque em contraste (mais escuro, com borda amarela) */
.card:has(#rede3d-container) {
  background: var(--escuro-destaque) !important;
  border-color: rgba(255,216,77,0.18) !important;
  box-shadow: 0 18px 44px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,216,77,0.05) !important;
}
.card:has(#rede3d-container) > div:last-child { border-top-color: rgba(255,255,255,0.06) !important; }

/* ---------- Tipografia e números grandes ---------- */
.page-title { font-size: 28px !important; font-weight: 500 !important; letter-spacing: -0.8px !important; }
.section-title { font-weight: 600 !important; }
.metric-label { color: var(--text-muted) !important; }
.metric-value { font-size: 40px !important; font-weight: 300 !important; letter-spacing: -1.5px !important; color: var(--text) !important; }
.metric-value.success { color: var(--success) !important; }
.metric-value.danger { color: var(--danger) !important; }
.metric-value.accent { color: var(--accent) !important; }
.stat-icon { border-radius: 50% !important; border: 1px solid var(--border-soft); }

/* ---------- Botões em pílula ---------- */
.btn { border-radius: 999px !important; }
.btn-primary {
  background: var(--accent) !important;
  color: #161616 !important;
  border: none !important;
  box-shadow: 0 6px 18px rgba(255,216,77,0.18) !important;
}
.btn-primary i { color: #161616 !important; }
.btn-primary:hover { background: var(--accent-soft) !important; filter: none !important; }
.btn-outline { background: rgba(255,255,255,0.04) !important; }
.btn-outline:hover { background: rgba(255,255,255,0.08) !important; }

/* ---------- Campos ---------- */
.form-grid input, .form-grid select, .form-grid textarea, .login-card input {
  background: rgba(255,255,255,0.04) !important;
  border-color: var(--border) !important;
  border-radius: 14px !important;
}

/* ---------- Listas e status ---------- */
.device-row:hover, .row-hover:hover { background: rgba(255,255,255,0.03) !important; }
.status-pill.blocked { color: var(--accent) !important; background: rgba(255,216,77,0.13) !important; }
.status-pill.blocked::before { background: var(--accent) !important; }

/* ---------- Janela do cliente e Command Bar ---------- */
.modal-overlay { background: rgba(0,0,0,0.55) !important; backdrop-filter: blur(6px); }
.modal-panel {
  background: rgba(20,20,23,0.97) !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  box-shadow: 0 30px 70px rgba(0,0,0,0.6) !important;
  border-radius: 28px !important;
}

/* ---------- Barra de eventos ---------- */
#radar-ticker {
  left: 20px !important;
  background: rgba(22,22,25,0.85) !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  border-radius: 999px !important;
}

/* ---------- Login ---------- */
.login-card {
  background: linear-gradient(160deg, rgba(36,36,40,0.85), rgba(22,22,25,0.85)) !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  border-radius: 30px !important;
}
.login-card button { background: var(--accent) !important; color: #161616 !important; border-radius: 999px !important; }

/* ---------- Topo do Dashboard: saudação + barra dividida + números grandes ---------- */
.rd-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; flex-wrap: wrap; margin: 4px 0 26px; }
.rd-hero-esq { flex: 1; min-width: 300px; }
.rd-hero-titulo { font-size: 44px; font-weight: 400; letter-spacing: -1.8px; margin: 0 0 18px; line-height: 1.05; }
.rd-segmentos { display: flex; gap: 8px; align-items: flex-end; max-width: 620px; }
.rd-seg { min-width: 64px; }
.rd-seg-label { font-size: 12px; color: var(--text-muted); margin: 0 0 6px 2px; white-space: nowrap; }
.rd-seg-barra { height: 38px; border-radius: 999px; display: flex; align-items: center; padding: 0 14px; font-size: 12px; font-weight: 600; transition: transform .2s ease; }
.rd-seg-barra:hover { transform: translateY(-2px); }
.rd-seg-principal { background: var(--claro); color: #161616; }
.rd-seg-destaque { background: var(--accent); color: #161616; }
.rd-seg-listrado { background: repeating-linear-gradient(-45deg, rgba(255,255,255,0.12) 0 2px, transparent 2px 8px); color: var(--text); border: 1px solid var(--border); }
.rd-seg-contorno { border: 1.5px solid rgba(255,255,255,0.28); color: var(--text); }
.rd-hero-numeros { display: flex; gap: 34px; align-items: flex-end; }
.rd-numero { display: flex; flex-direction: column; align-items: flex-start; text-decoration: none; color: var(--text); }
.rd-numero-linha { display: flex; align-items: center; gap: 10px; }
.rd-numero-icone { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,0.05); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: #B5B0A7; font-size: 16px; }
.rd-numero-valor { font-size: 58px; font-weight: 300; letter-spacing: -2.5px; line-height: 1; }
.rd-numero-label { font-size: 12px; color: var(--text-muted); margin: 4px 0 0 44px; }
.rd-numero.ativo .rd-numero-valor { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 4px; text-underline-offset: 6px; }

@media (max-width: 760px) {
  .rd-hero-titulo { font-size: 32px; }
  .rd-numero-valor { font-size: 40px; }
  .rd-hero-numeros { gap: 18px; }
  .topbar { padding: 12px 14px 4px !important; }
}

/* =====================================================================
   EFEITOS AVANÇADOS (Guia de design: todo movimento tem função)
   ===================================================================== */

/* Troca de tela suave (navegadores recentes; nos outros, nada muda) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .25s; }

/* Entrada dos cartões — só esconde se o script carregou (classe rd-js no <html>) */
.rd-js .content .card, .rd-js .content .stat-card, .rd-js .content .rd-hero {
  opacity: 0;
  translate: 0 14px;
  transition: opacity .5s ease var(--rd-atraso, 0ms), translate .5s cubic-bezier(.2,.8,.2,1) var(--rd-atraso, 0ms),
              transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.rd-js .content .rd-visivel { opacity: 1; translate: 0 0; }

/* Brilho amarelo que segue o mouse dentro do cartão */
.card, .stat-card { position: relative; }
.card::after, .stat-card::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(380px circle at var(--mx, -400px) var(--my, -400px), rgba(255,216,77,0.07), transparent 60%);
  opacity: 0; transition: opacity .3s ease;
}
.card:hover::after, .stat-card:hover::after { opacity: 1; }
.card:has(#rede3d-container)::after { display: none; }

/* Menu: pílula de destaque que desliza */
.navbar { position: relative !important; }
.navbar a { position: relative; z-index: 1; }
.navbar a:hover { background: transparent !important; }
.navbar a.active:hover { background: var(--accent) !important; }
.rd-nav-hover {
  position: absolute; top: 5px; bottom: 5px; left: 0; width: 0;
  border-radius: 999px; background: rgba(255,255,255,0.08);
  opacity: 0; pointer-events: none; z-index: 0;
  transition: transform .28s cubic-bezier(.3,.7,.2,1), width .28s cubic-bezier(.3,.7,.2,1), opacity .2s ease;
}

/* Botões respondem ao toque */
.btn { transition: transform .12s ease, background .2s ease, box-shadow .2s ease !important; }
.btn:active { transform: scale(0.96) !important; }

/* Clientes online "respiram" */
.status-pill.on::before { animation: rd-respirar 2.6s ease-out infinite; }
@keyframes rd-respirar {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,0.55); }
  70%  { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

/* Mini-gráfico de sinal se desenha ao carregar */
[title^="Tendência de sinal"] svg path {
  stroke-dasharray: 300; stroke-dashoffset: 300;
  animation: rd-desenhar 1.4s ease forwards .4s;
}
@keyframes rd-desenhar { to { stroke-dashoffset: 0; } }

/* Janela do cliente: carregamento com brilho passando */
.modal-loading { position: relative; overflow: hidden; border-radius: 20px; }
.modal-loading::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,0.05) 50%, transparent 80%);
  animation: rd-brilho 1.2s linear infinite;
}
@keyframes rd-brilho { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* Avisos flutuantes */
#rd-avisos { position: fixed; top: 18px; right: 18px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.rd-aviso {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; border-radius: 999px; font-size: 13px; color: var(--text);
  background: rgba(22,22,25,0.92); border: 1px solid var(--border);
  box-shadow: 0 12px 30px rgba(0,0,0,0.45); backdrop-filter: blur(12px);
  opacity: 0; translate: 16px 0; transition: opacity .3s ease, translate .3s cubic-bezier(.2,.8,.2,1);
}
.rd-aviso-on { opacity: 1; translate: 0 0; }
.rd-aviso-sucesso i { color: var(--success); }
.rd-aviso-erro i { color: var(--danger); }
.rd-aviso-info i { color: var(--accent); }

/* Quem prefere menos movimento no sistema: tudo parado */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rd-js .content .card, .rd-js .content .stat-card, .rd-js .content .rd-hero { opacity: 1; translate: 0 0; }
}

/* =====================================================================
   ACABAMENTO PREMIUM
   ===================================================================== */

/* Textura granulada bem sutil no fundo (tira o aspecto "chapado" do preto) */
body { position: relative; }
.rd-grao {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.topbar, .navbar, .content { position: relative; z-index: 1; }

/* Borda de "vidro líquido": clara em cima, sumindo, com toque amarelo no canto */
.card, .stat-card { border-color: transparent !important; }
.card::before, .stat-card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(150deg, rgba(255,255,255,0.16), rgba(255,255,255,0.03) 38%, rgba(255,255,255,0.02) 70%, rgba(255,216,77,0.12));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.card:has(#rede3d-container)::before {
  background: linear-gradient(150deg, rgba(255,216,77,0.35), rgba(255,216,77,0.04) 40%, rgba(255,255,255,0.03) 75%, rgba(255,216,77,0.2));
}
.glow-danger::before { background: linear-gradient(150deg, rgba(255,90,103,0.45), rgba(255,90,103,0.05) 45%, rgba(255,90,103,0.2)) !important; }

/* Títulos de tela com leve degradê */
.page-title {
  background: linear-gradient(90deg, #F2F1EE 30%, #A9A49A);
  -webkit-background-clip: text; background-clip: text; color: transparent !important;
}
.page-title i { color: var(--accent); -webkit-text-fill-color: var(--accent); }

/* Ícone dos títulos de seção dentro de uma bolinha */
.section-title { display: flex; align-items: center; gap: 9px; }
.section-title > i {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,216,77,0.1); color: var(--accent); font-size: 15px;
  border: 1px solid rgba(255,216,77,0.18);
}

/* Linhas das listas: cantos arredondados e leve elevação ao passar o mouse */
.device-row { border-radius: 16px; transition: background .2s ease, translate .2s ease; }
.device-row:hover { translate: 3px 0; }

/* Ícones dos resumos com anel de brilho */
.stat-icon { box-shadow: 0 0 0 4px rgba(255,255,255,0.02), 0 6px 16px rgba(0,0,0,0.3); }

/* Foco em amarelo (teclado e campos) */
input:focus, select:focus, textarea:focus {
  outline: none !important;
  border-color: rgba(255,216,77,0.55) !important;
  box-shadow: 0 0 0 3px rgba(255,216,77,0.12) !important;
}
a:focus-visible, button:focus-visible { outline: 2px solid rgba(255,216,77,0.7); outline-offset: 2px; }

/* Barras de rolagem finas e escuras */
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.14) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.14); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,216,77,0.4); }
::-webkit-scrollbar-track { background: transparent; }

/* Seleção de texto em amarelo */
::selection { background: rgba(255,216,77,0.35); color: #fff; }

/* Relógio na barra do topo */
.rd-relogio {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; font-size: 12px; color: #B5B0A7;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
.rd-relogio .rd-ponto-vivo { width: 6px; height: 6px; border-radius: 50%; background: var(--success); animation: rd-respirar 2.6s ease-out infinite; }
@media (max-width: 760px) { .rd-relogio { display: none; } }


/* Barra de pesquisa das listas */
.busca-lista { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 14px; margin-bottom: 14px; border: 1px solid var(--border); border-radius: 999px; background: rgba(255,255,255,0.03); }
.busca-lista:focus-within { border-color: rgba(255,216,77,0.5); box-shadow: 0 0 0 3px rgba(255,216,77,0.08); }
.busca-lista i { color: var(--text-muted); font-size: 17px; }
.busca-lista input { flex: 1; min-width: 0; background: transparent; border: none; outline: none; color: var(--text); font: inherit; font-size: 14px; padding: 9px 0; }
.busca-contador { font-size: 12px; color: var(--text-muted); white-space: nowrap; padding-right: 10px; }

/* Selos de situação das cobranças (Pago, Pendente, Vence hoje, Vencido, Cancelado) e do boleto */
.st-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 4px 11px 4px 8px; border-radius: 999px; white-space: nowrap; }
.st-pill i { font-size: 15px; }
.st-pago { background: rgba(34,197,94,0.12); color: #22C55E; }
.st-pendente { background: rgba(255,216,77,0.12); color: #FFD84D; }
.st-hoje { background: #FFD84D; color: #161616; }
.st-vencido { background: rgba(255,90,103,0.13); color: #FF5A67; }
.st-cancelado { background: rgba(255,255,255,0.06); color: var(--text-muted); }
.st-boleto { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-muted); white-space: nowrap; }
.st-boleto i { font-size: 17px; }
.st-boleto-ok { color: var(--text); }
.st-boleto-ok i { color: #22C55E; }
.st-boleto em { font-style: normal; font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: rgba(50,188,173,0.16); color: #32BCAD; margin-left: 3px; }

/* Listas no tablet e no celular: a tabela rola dentro do cartão, e as ações ficam enxutas */
.tabela-rolar { overflow-x: auto; -webkit-overflow-scrolling: touch; }
#tabela-cobrancas { min-width: 720px; }
#tabela-clientes { min-width: 940px; }
.sem-quebra { white-space: nowrap; }
.col-acoes { text-align: right; width: 1%; }
.acoes { display: flex; gap: 6px; justify-content: flex-end; align-items: flex-start; flex-wrap: wrap; }
.acoes > .btn, details.mais > summary.btn { padding: 6px 12px; font-size: 12px; white-space: nowrap; }
details.mais > summary { list-style: none; cursor: pointer; }
details.mais > summary::-webkit-details-marker { display: none; }
details.mais[open] { flex-basis: 100%; display: flex; flex-direction: column; align-items: flex-end; }
details.mais[open] > summary { background: rgba(255,216,77,0.12); border-color: rgba(255,216,77,0.4); }
.mais-menu { display: grid; gap: 2px; margin-top: 6px; padding: 6px; min-width: 220px; border: 1px solid var(--border); border-radius: 16px; background: rgba(16,16,19,0.97); box-shadow: 0 12px 30px rgba(0,0,0,0.45); text-align: left; }
.mais-menu form { margin: 0; }
.mais-menu .item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 12px; border-radius: 10px; background: transparent; border: 0; color: var(--text); font: inherit; font-size: 13px; text-decoration: none; cursor: pointer; text-align: left; white-space: nowrap; }
.mais-menu .item:hover { background: rgba(255,255,255,0.06); }
.mais-menu .item i { font-size: 16px; color: var(--text-muted); }
.mais-menu .item-perigo, .mais-menu .item-perigo i { color: var(--danger); }
/* Campos dentro das tabelas (telefone, dia do vencimento) no visual escuro */
.tabela-rolar td input[type="text"], .tabela-rolar td input[type="number"] { background: rgba(255,255,255,0.04); border: 1px solid var(--border); color: var(--text); border-radius: 10px; font-family: inherit; }
.tabela-rolar td input:focus { outline: none; border-color: rgba(255,216,77,0.5); }
.col-plano { min-width: 150px; }
.col-plano small { display: block; color: var(--text-muted); font-size: 11.5px; margin-top: 2px; }
#tabela-clientes td:first-child { min-width: 150px; }
#tabela-clientes td:last-child { white-space: nowrap; }

/* Janela "Ver código do boleto" */
.dlg-codigo { width: min(520px, calc(100vw - 32px)); padding: 20px; border: 1px solid var(--border); border-radius: 22px; background: linear-gradient(160deg, #1E1E22, #141417); color: var(--text); box-shadow: 0 30px 70px rgba(0,0,0,0.6); }
.dlg-codigo::backdrop { background: rgba(3,6,12,0.7); backdrop-filter: blur(4px); }
.dlg-topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.dlg-topo b { font-size: 16px; font-weight: 600; }
.dlg-topo .btn { padding: 6px 10px; }
.dlg-bloco { margin-bottom: 14px; }
.dlg-rotulo { margin: 0 0 6px; font-size: 12px; color: var(--text-muted); }
.dlg-valor { font-size: 13px; line-height: 1.5; word-break: break-all; background: rgba(0,0,0,0.3); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; font-variant-numeric: tabular-nums; max-height: 120px; overflow-y: auto; }
.dlg-bloco .btn { padding: 7px 14px; font-size: 12.5px; }

/* Botão HUB (volta pro painel) ao lado do Sair */
.hub-link { margin-right: 8px; color: var(--accent) !important; border-color: rgba(255,216,77,0.35) !important; }
.hub-link:hover { background: rgba(255,216,77,0.10) !important; }

/* ===== Link para a ficha do cliente ===== */
.lk-cliente { color: inherit; text-decoration: none; border-bottom: 1px dashed rgba(255,216,77,.45); }
.lk-cliente:hover { color: #FFD84D; border-bottom-color: #FFD84D; }

/* ===== Selo "A vencer" (fatura que ainda não venceu: não é dívida) ===== */
.st-avencer { background: rgba(255,255,255,0.07); color: #C9D1DC; }
.s-aberto { background: rgba(255,255,255,0.07) !important; color: #C9D1DC !important; }

/* ===== FILTROS DAS LISTAS (Cobranças, Clientes, Avisos) ===== */
details.filtros { margin: 10px 0 14px; }
details.filtros > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; font-size: 13px; border-radius: 999px; }
details.filtros > summary::-webkit-details-marker { display: none; }
details.filtros.filtros-ligados > summary { border-color: var(--accent, #FFC400); color: var(--accent, #FFC400); }
details.filtros .filtros-qtd { font-weight: 700; }
.filtros-corpo { margin-top: 12px; padding: 14px; border-radius: 16px; background: rgba(255,255,255,.035); border: 1px solid var(--border-soft, rgba(255,255,255,.08)); }
.filtros-atalhos { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; font-size: 12px; color: var(--text-muted, #8593a8); }
.filtros-atalhos button { font: inherit; font-size: 12px; padding: 5px 11px; border-radius: 999px; cursor: pointer; background: rgba(255,255,255,.05); color: var(--text, #f4f6f9); border: 1px solid rgba(255,255,255,.12); }
.filtros-atalhos button:hover { border-color: var(--accent, #FFC400); color: var(--accent, #FFC400); }
.filtros-grade { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 12px; }
.filtros-grade label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted, #8593a8); margin: 0; }
.filtros-grade input, .filtros-grade select { width: 100%; min-height: 38px; padding: 7px 10px; font: inherit; font-size: 13px; text-transform: none; letter-spacing: 0; font-weight: 400;
  background: rgba(255,255,255,.04); color: var(--text, #f4f6f9); border: 1px solid rgba(255,255,255,.14); border-radius: 12px; color-scheme: dark; }
.filtros-grade select option { background: #15181D; color: #f4f6f9; }
.filtros-grade input:focus, .filtros-grade select:focus { outline: none; border-color: var(--accent, #FFC400); box-shadow: 0 0 0 3px rgba(255,196,0,.15); }
.filtros-grade .filtros-caixa { flex-direction: row; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 500; color: var(--text, #f4f6f9); grid-column: span 2; }
.filtros-grade .filtros-caixa input { width: 18px; min-height: 0; height: 18px; accent-color: var(--accent, #FFC400); }
.filtros-acoes { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.filtros-acoes .btn { padding: 6px 12px; font-size: 12px; }
.filtros-busca { margin-bottom: 4px; }
[data-filtro-grupo][hidden], .av-linha[hidden] { display: none !important; }
@media (max-width: 900px) { .filtros-grade { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .filtros-grade { grid-template-columns: 1fr; } .filtros-grade .filtros-caixa { grid-column: auto; } }
/* ===== FIM DOS FILTROS ===== */
