/* ================================================================
   RADAR CASA NOVA — CSS Mobile-First PWA
   ================================================================ */

:root {
  --brand:       #1a3a9f;
  --brand-dark:  #132b80;
  --brand-light: #eef1fb;
  --success:     #22c55e;
  --danger:      #ef4444;
  --warning:     #f59e0b;
  --info:        #3b82f6;
  --dark:        #1e293b;
  --muted:       #64748b;
  --border:      #e2e8f0;
  --bg:          #f8fafc;
  --card:        #ffffff;
  --text:        #1e293b;
  --text-sm:     #475569;
  --radius:      12px;
  --radius-sm:   8px;
  --shadow:      0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:   0 4px 16px rgba(0,0,0,.10);
  --bottom-nav-h: 60px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand); text-decoration: none; }

/* ── AUTH ──────────────────────────────────────────────────────── */
.auth-body { background: linear-gradient(160deg, #091840 0%, #1a3a9f 70%, #1e44bc 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-card { background: var(--card); border-radius: 20px; padding: 0 28px 28px; width: 100%; max-width: 400px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.auth-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; justify-content: center; }
.auth-logo-icon { font-size: 2.5rem; }
.auth-logo-text { display: flex; flex-direction: column; }
.auth-app-name { font-size: 1.35rem; font-weight: 800; color: var(--dark); }
.auth-slogan { font-size: .78rem; color: var(--muted); }
.auth-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; }
.auth-subtitle { color: var(--muted); font-size: .88rem; margin-bottom: 20px; }
.auth-helper { text-align: center; font-size: .8rem; color: var(--muted); margin-top: 16px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }

/* ── FIELDS ────────────────────────────────────────────────────── */
.field-group { display: flex; flex-direction: column; gap: 5px; }
.field-label { font-size: .82rem; font-weight: 600; color: var(--text-sm); }
.field-required { color: var(--danger); }
.field-input, .field-textarea {
  width: 100%; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 11px 14px; font-size: 15px; background: var(--card); color: var(--text);
  transition: border .15s; -webkit-appearance: none; appearance: none;
}
.field-input:focus, .field-textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(26,58,159,.15); }
.field-textarea { resize: vertical; min-height: 80px; }
.field-password-wrap { position: relative; }
.field-password-wrap .field-input { padding-right: 42px; }
.field-password-toggle { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 16px; }

/* ── BUTTONS ───────────────────────────────────────────────────── */
.btn-primary {
  background: var(--brand); color: #fff; border: none;
  border-radius: var(--radius-sm); padding: 12px 22px;
  font-size: 15px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: background .15s, transform .1s; text-decoration: none;
}
.btn-primary:hover { background: var(--brand-dark); }
.btn-primary:active { transform: scale(.97); }
.btn-primary.btn-full { width: 100%; }
.btn-primary.btn-lg { padding: 15px 22px; font-size: 16px; border-radius: var(--radius); }
.btn-primary.sm { padding: 7px 14px; font-size: 13px; }
.btn-secondary { background: var(--card); color: var(--text); border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 10px 18px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all .15s; }
.btn-secondary:hover { border-color: var(--brand); color: var(--brand); }
.btn-secondary.sm { padding: 6px 12px; font-size: 13px; }
.btn-danger { background: var(--danger); color: #fff; border: none; border-radius: var(--radius-sm); padding: 10px 18px; font-size: 14px; font-weight: 700; cursor: pointer; }
.btn-danger.sm { padding: 5px 10px; font-size: 12px; }
.btn-success { background: var(--success); color: #fff; border: none; border-radius: var(--radius-sm); padding: 10px 18px; font-size: 14px; font-weight: 700; cursor: pointer; }
.btn-success.sm { padding: 5px 10px; font-size: 12px; }
.btn-full { display: block; width: 100%; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }

/* ── ALERTS ────────────────────────────────────────────────────── */
.alert-error   { background: #fef2f2; border-left: 4px solid var(--danger); border-radius: var(--radius-sm); padding: 12px 14px; color: #b91c1c; font-size: .88rem; margin-bottom: 12px; }
.alert-success { background: #f0fdf4; border-left: 4px solid var(--success); border-radius: var(--radius-sm); padding: 12px 14px; color: #15803d; font-size: .88rem; margin-bottom: 12px; }
.flash-error   { background: #fef2f2; border: 1px solid #fecaca; border-radius: var(--radius-sm); padding: 12px 16px; color: #b91c1c; margin: 12px 16px 0; }
.flash-success { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: var(--radius-sm); padding: 12px 16px; color: #15803d; margin: 12px 16px 0; }
.flash-warning { background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius-sm); padding: 12px 16px; color: #92400e; margin: 12px 16px 0; }

/* ── REMEMBER ──────────────────────────────────────────────────── */
.remember-label { display: flex; align-items: center; gap: 8px; font-size: .88rem; cursor: pointer; }
.remember-check { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }

/* ── APP LAYOUT ────────────────────────────────────────────────── */
.app-body { background: var(--bg); min-height: 100vh; }

.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 54px; background: var(--brand);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px; box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.topbar-left { display: flex; align-items: center; gap: 10px; }
.topbar-menu-btn { background: none; border: none; cursor: pointer; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.hamburger { width: 20px; height: 2px; background: #fff; border-radius: 2px; }
.topbar-brand { display: flex; align-items: center; gap: 6px; }
.topbar-icon { font-size: 1.3rem; }
.topbar-name { font-size: 1.1rem; font-weight: 800; color: #fff; letter-spacing: -.3px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar-notif-btn { background: rgba(255,255,255,.2); border: none; border-radius: 50%; width: 36px; height: 36px; cursor: pointer; font-size: 16px; position: relative; display: flex; align-items: center; justify-content: center; }
.topbar-avatar { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.3); display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; font-size: 15px; cursor: pointer; }
.notif-badge { position: absolute; top: -2px; right: -2px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 800; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

.app-main {
  padding-top: 54px;
  padding-bottom: calc(var(--bottom-nav-h) + 8px);
  min-height: 100vh;
}

/* ── DRAWER ────────────────────────────────────────────────────── */
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 199; display: none; }
.drawer-overlay.open { display: block; }
.drawer {
  position: fixed; top: 0; left: -280px; bottom: 0; width: 280px;
  background: var(--card); z-index: 200; overflow-y: auto;
  transition: transform .3s ease; box-shadow: var(--shadow-md);
}
.drawer.open { transform: translateX(280px); }
.drawer-header { background: var(--brand); padding: 20px 16px; display: flex; align-items: center; gap: 12px; padding-top: calc(20px + env(safe-area-inset-top)); }
.drawer-user-avatar { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.3); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; color: #fff; }
.drawer-user-info { display: flex; flex-direction: column; }
.drawer-user-info strong { color: #fff; font-size: 1rem; }
.drawer-user-info span { color: rgba(255,255,255,.75); font-size: .8rem; text-transform: capitalize; }
.drawer-nav { padding: 8px 0; }
.drawer-item { display: flex; align-items: center; gap: 12px; padding: 13px 20px; font-size: .95rem; color: var(--text); text-decoration: none; transition: background .12s; }
.drawer-item:hover { background: var(--bg); }
.drawer-item.highlight { color: var(--brand); font-weight: 700; }
.drawer-item span { font-size: 1.1rem; }
.drawer-footer { border-top: 1px solid var(--border); padding: 8px 0; }
.drawer-logout { color: var(--danger); }

/* ── BOTTOM NAV ────────────────────────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  height: var(--bottom-nav-h);
  background: var(--card);
  border-top: 1px solid var(--border);
  display: flex; align-items: stretch;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 8px rgba(0,0,0,.07);
}
.bnav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--muted); padding: 6px 0; transition: color .15s; }
.bnav-item.active { color: var(--brand); }
.bnav-icon { font-size: 1.25rem; line-height: 1; }
.bnav-label { font-size: .62rem; font-weight: 600; letter-spacing: .2px; }
.bnav-main .bnav-icon { font-size: 1.5rem; }

/* ── HOME ──────────────────────────────────────────────────────── */
.home-hero { background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%); padding: 24px 16px 20px; position: relative; overflow: hidden; }
.home-hero-content { position: relative; z-index: 1; }
.home-greeting-text { color: #fff; font-size: 1.05rem; }
.home-slogan { color: rgba(255,255,255,.85); font-size: .85rem; margin-top: 4px; }

.home-stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); }
.home-stat-card { background: var(--card); padding: 12px 8px; text-align: center; }
.home-stat-card.accent { background: #eef1fb; }
.home-stat-num { font-size: 1.5rem; font-weight: 800; color: var(--dark); line-height: 1; }
.home-stat-label { font-size: .67rem; color: var(--muted); margin-top: 3px; text-transform: uppercase; letter-spacing: .3px; }

.home-main-action { padding: 16px; }
.btn-radar-main {
  display: flex; align-items: center; gap: 14px;
  background: var(--brand); color: #fff;
  border-radius: 16px; padding: 18px 20px;
  text-decoration: none; box-shadow: 0 6px 24px rgba(26,58,159,.45);
  position: relative; overflow: hidden;
}
.btn-radar-main:hover { background: var(--brand-dark); }
.radar-pulse {
  position: absolute; inset: 0; border-radius: 16px;
  animation: pulse-ring 2s ease-in-out infinite;
  border: 2px solid rgba(255,255,255,.3);
}
@keyframes pulse-ring { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(1.02)} }
.radar-icon { font-size: 2rem; flex-shrink: 0; }
.radar-text { flex: 1; display: flex; flex-direction: column; }
.radar-text strong { font-size: 1.15rem; font-weight: 800; }
.radar-text small { font-size: .78rem; opacity: .85; }
.radar-arrow { font-size: 1.5rem; flex-shrink: 0; }

.home-quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0 16px 16px; }
.quick-action-card { background: var(--card); border-radius: var(--radius); padding: 14px 10px; text-align: center; text-decoration: none; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.qa-icon { font-size: 1.5rem; }
.qa-label { font-size: .75rem; color: var(--muted); font-weight: 600; }
.qa-count { font-size: 1.15rem; font-weight: 800; color: var(--dark); }

.home-rules { background: var(--brand-light); border-radius: var(--radius); padding: 16px; margin: 0 16px 24px; }
.rules-title { font-weight: 700; color: var(--brand-dark); margin-bottom: 10px; }
.rules-list { display: flex; flex-direction: column; gap: 6px; }
.rule-item { display: flex; align-items: center; gap: 10px; font-size: .88rem; }
.rule-pts { background: var(--brand); color: #fff; padding: 2px 8px; border-radius: 20px; font-size: .75rem; font-weight: 800; flex-shrink: 0; min-width: 36px; text-align: center; }
.rule-highlight .rule-pts { background: var(--success); }

.home-empty-state { text-align: center; padding: 40px 20px; }
.empty-icon { font-size: 3rem; margin-bottom: 10px; }
.empty-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.empty-desc { color: var(--muted); font-size: .9rem; margin-bottom: 20px; }
.empty-state { text-align: center; padding: 32px 20px; }

/* ── PAGE HEADERS ──────────────────────────────────────────────── */
.page-header { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--card); border-bottom: 1px solid var(--border); position: sticky; top: 54px; z-index: 90; }
.page-back { color: var(--muted); font-size: .9rem; text-decoration: none; flex-shrink: 0; }
.page-back:hover { color: var(--brand); }
.page-title { font-size: 1.05rem; font-weight: 800; flex: 1; }
.page-date { color: var(--muted); font-size: .82rem; }
.header-count { background: var(--brand); color: #fff; border-radius: 20px; padding: 2px 10px; font-size: .78rem; font-weight: 700; }

/* ── CARDS & SECTIONS ──────────────────────────────────────────── */
.section-block { padding: 16px; }
.section-title { font-size: .95rem; font-weight: 700; margin-bottom: 12px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.section-link { font-size: .82rem; color: var(--brand); }
.detail-card { margin: 0 16px 16px; background: var(--card); border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; }
.detail-row { display: flex; align-items: flex-start; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--border); }
.detail-row:last-child { border-bottom: none; }
.detail-label { color: var(--muted); font-size: .82rem; min-width: 100px; flex-shrink: 0; padding-top: 1px; }
.detail-value { font-size: .9rem; flex: 1; }
.detail-status-banner { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--border); }
.detail-pts { font-weight: 800; color: var(--brand); }

/* ── OPP CARDS ─────────────────────────────────────────────────── */
.opp-list { display: flex; flex-direction: column; gap: 0; }
.opp-card { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text); transition: background .12s; }
.opp-card:hover { background: var(--bg); }
.opp-thumb { width: 52px; height: 52px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; background: var(--bg); }
.opp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.opp-thumb-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.opp-thumb-placeholder.lg { font-size: 2rem; }
.opp-info { flex: 1; min-width: 0; }
.opp-tipo { font-weight: 700; font-size: .88rem; }
.opp-bairro { color: var(--muted); font-size: .8rem; }
.opp-data { color: var(--muted); font-size: .75rem; }
.opp-status-badge { flex-shrink: 0; }

.opp-list-full { display: flex; flex-direction: column; gap: 0; }
.opp-list-card {
  display: flex; align-items: center; gap: 10px; padding: 11px 16px;
  border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text);
  transition: background .12s; background: var(--card);
}
.opp-list-card:hover { background: var(--bg); }
.opp-list-card.opp-sla-danger { border-left: 3px solid var(--danger); }
.opp-list-card.opp-sla-warning { border-left: 3px solid var(--warning); }
.opp-list-thumb { width: 60px; height: 60px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; background: var(--bg); position: relative; }
.opp-list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.opp-list-body { flex: 1; min-width: 0; }
.opp-list-tipo { font-weight: 700; font-size: .9rem; }
.opp-list-situacao { font-size: .82rem; color: var(--text-sm); margin: 2px 0; }
.opp-list-meta { display: flex; gap: 8px; font-size: .75rem; color: var(--muted); flex-wrap: wrap; margin-bottom: 4px; }
.opp-list-arrow { color: var(--muted); font-size: 1.3rem; flex-shrink: 0; }
.opp-pts { color: var(--brand); font-weight: 700; }
.list-count { padding: 8px 16px; font-size: .82rem; color: var(--muted); background: var(--bg); }
.sla-badge { position: absolute; bottom: 2px; right: 2px; font-size: .6rem; font-weight: 800; padding: 1px 4px; border-radius: 4px; }
.sla-badge.danger { background: var(--danger); color: #fff; }
.sla-badge.warning { background: var(--warning); color: #fff; }
.sla-indicator { font-size: .8rem; }
.sla-indicator.sla-danger { color: var(--danger); font-weight: 700; }
.sla-indicator.sla-warning { color: var(--warning); font-weight: 700; }

/* ── INDICAR IMÓVEL ────────────────────────────────────────────── */
.indicar-hint { display: flex; align-items: flex-start; gap: 10px; background: #eff6ff; border-radius: var(--radius); padding: 12px 16px; margin: 12px 16px; border-left: 4px solid var(--info); font-size: .88rem; }
.hint-icon { font-size: 1.2rem; flex-shrink: 0; }
.indicar-form { display: flex; flex-direction: column; gap: 0; }
.form-section { padding: 16px; border-bottom: 1px solid var(--border); background: var(--card); }
.form-section-title { font-weight: 700; font-size: .9rem; margin-bottom: 12px; color: var(--dark); }

.foto-area { border: 2px dashed var(--border); border-radius: var(--radius); overflow: hidden; background: var(--bg); cursor: pointer; min-height: 160px; display: flex; align-items: center; justify-content: center; position: relative; }
.foto-placeholder { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px; text-align: center; }
.foto-icon { font-size: 2.5rem; }
.foto-text { font-weight: 600; font-size: .9rem; }
.foto-sub { font-size: .75rem; color: var(--muted); }
.foto-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.foto-preview { width: 100%; position: relative; display: flex; align-items: center; justify-content: center; }
.foto-preview img { max-height: 220px; width: 100%; object-fit: cover; }
.foto-remove { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,.6); color: #fff; border: none; border-radius: 50%; width: 28px; height: 28px; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.foto-buttons { display: flex; gap: 8px; margin-top: 10px; }
.btn-foto { flex: 1; background: var(--card); border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 10px; font-size: .85rem; font-weight: 600; cursor: pointer; }

.loc-status { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--radius-sm); font-size: .88rem; background: var(--bg); border: 1px solid var(--border); }
.loc-status.loc-ok { background: #f0fdf4; border-color: var(--success); color: #15803d; }
.loc-status.loc-error { background: #fef2f2; border-color: var(--danger); color: #b91c1c; }
.loc-status.loc-loading { background: #eff6ff; border-color: var(--info); }
.loc-status.loc-info { background: #eff6ff; border-color: var(--info); color: #1d4ed8; }
.loc-buttons { margin-top: 10px; }
.btn-loc { width: 100%; background: var(--info); color: #fff; border: none; border-radius: var(--radius-sm); padding: 12px; font-size: .9rem; font-weight: 700; cursor: pointer; transition: background .15s; }
.btn-loc:hover { background: #2563eb; }
.btn-loc:disabled { opacity: .6; cursor: not-allowed; }

.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { cursor: pointer; }
.chip input { display: none; }
.chip span { display: block; padding: 8px 14px; border: 1.5px solid var(--border); border-radius: 20px; font-size: .85rem; font-weight: 600; color: var(--text-sm); transition: all .15s; background: var(--card); }
.chip input:checked + span { background: var(--brand); color: #fff; border-color: var(--brand); }

.optional-section { border-top: 1px solid var(--border); background: var(--card); }
.optional-summary { padding: 14px 16px; cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--brand); list-style: none; }
.optional-summary::-webkit-details-marker { display: none; }
.optional-body { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 12px; }

.form-submit-area { padding: 20px 16px; background: var(--card); }
.form-submit-hint { text-align: center; font-size: .78rem; color: var(--muted); margin-top: 8px; }
.btn-submit-radar { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); font-size: 1rem; border-radius: var(--radius); }

/* ── FILTER ────────────────────────────────────────────────────── */
.filter-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--border); scrollbar-width: none; }
.filter-scroll::-webkit-scrollbar { display: none; }
.filter-chip { padding: 7px 14px; border-radius: 20px; font-size: .82rem; font-weight: 600; white-space: nowrap; background: var(--bg); color: var(--text-sm); border: 1.5px solid var(--border); text-decoration: none; transition: all .12s; }
.filter-chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ── TIMELINE ──────────────────────────────────────────────────── */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item { display: flex; gap: 10px; padding-bottom: 14px; position: relative; }
.timeline-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); flex-shrink: 0; margin-top: 4px; }
.timeline-item::before { content: ''; position: absolute; left: 4px; top: 14px; bottom: -4px; width: 2px; background: var(--border); }
.timeline-item:last-child::before { display: none; }
.timeline-body { flex: 1; }
.timeline-status { display: flex; align-items: center; gap: 6px; font-size: .88rem; font-weight: 600; flex-wrap: wrap; }
.tl-from { color: var(--muted); font-size: .82rem; font-weight: 400; }
.tl-arrow { color: var(--muted); }
.timeline-note { font-size: .85rem; color: var(--text-sm); margin-top: 4px; padding: 6px 10px; background: var(--bg); border-radius: 6px; }
.timeline-meta { font-size: .75rem; color: var(--muted); margin-top: 4px; }

/* ── PHOTOS ────────────────────────────────────────────────────── */
.detail-photos { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px; scrollbar-width: thin; }
.detail-photo { flex-shrink: 0; border-radius: var(--radius); overflow: hidden; max-height: 220px; }
.detail-photo img { height: 220px; max-width: 320px; object-fit: cover; }
.detail-map { padding: 12px 16px; }
.map-open-btn { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; font-size: .88rem; color: var(--brand); font-weight: 600; }

/* ── BADGES ────────────────────────────────────────────────────── */
.badge { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: .72rem; font-weight: 700; }
.bg-secondary { background: #e2e8f0; color: #475569; }
.bg-primary { background: var(--info); color: #fff; }
.bg-success { background: var(--success); color: #fff; }
.bg-danger { background: var(--danger); color: #fff; }
.bg-warning { background: var(--warning); color: #fff; }
.bg-warning.text-dark { color: #1e293b; }
.bg-info { background: #06b6d4; color: #fff; }
.bg-info.text-dark { color: #1e293b; }
.bg-dark { background: var(--dark); color: #fff; }
.fw-bold { font-weight: 700; }
.badge-danger { background: var(--danger); color: #fff; border-radius: 20px; padding: 2px 8px; font-size: .75rem; font-weight: 700; }

/* ── POINTS ────────────────────────────────────────────────────── */
.pts-summary { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.pts-summary-card { background: var(--card); border-radius: var(--radius); padding: 16px; text-align: center; border: 1px solid var(--border); }
.pts-summary-card.pts-main { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; }
.pts-summary-card.pts-main .pts-summary-num { color: #fff; }
.pts-summary-card.pts-main .pts-summary-label { color: rgba(255,255,255,.8); }
.pts-summary-card.warning { background: #fffbeb; border-color: var(--warning); }
.pts-summary-card.muted { background: var(--bg); }
.pts-summary-num { font-size: 2rem; font-weight: 800; color: var(--dark); line-height: 1; }
.pts-summary-label { font-size: .75rem; color: var(--muted); margin-top: 4px; }
.pts-summary-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pts-summary-card.sm .pts-summary-num { font-size: 1.3rem; }
.pts-trans-list { display: flex; flex-direction: column; gap: 0; }
.pts-trans-item { display: flex; align-items: flex-start; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.pts-trans-body { flex: 1; }
.pts-trans-rule { font-weight: 600; font-size: .9rem; }
.pts-trans-opp { font-size: .8rem; color: var(--text-sm); }
.pts-trans-date { font-size: .75rem; color: var(--muted); }
.pts-trans-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.pts-trans-value { font-size: 1.1rem; font-weight: 800; color: var(--success); }
.pts-trans-status { font-size: .72rem; }
.badge-validado { color: var(--success); font-weight: 700; }
.badge-pendente { color: var(--warning); font-weight: 700; }
.badge-cancelado { color: var(--danger); font-weight: 700; }

/* ── RANKING ───────────────────────────────────────────────────── */
.mes-selector { padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--border); }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 0; padding: 24px 16px 0; background: var(--card); }
.podium-item { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; }
.podium-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--brand); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; color: #fff; }
.podium-avatar-1 { width: 56px; height: 56px; font-size: 22px; }
.podium-name { font-size: .78rem; font-weight: 700; }
.podium-pts { font-size: .82rem; color: var(--muted); }
.podium-crown { font-size: 1.3rem; }
.podium-pos { font-size: 1.5rem; }
.podium-bar { width: 100%; border-radius: 6px 6px 0 0; }
.ranking-list { display: flex; flex-direction: column; background: var(--card); }
.ranking-item { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.ranking-item.ranking-me { background: #eef1fb; }
.ranking-pos { width: 32px; text-align: center; font-size: 1.2rem; }
.ranking-num { font-size: .88rem; font-weight: 700; color: var(--muted); }
.ranking-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brand); display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; font-size: 14px; flex-shrink: 0; }
.ranking-info { flex: 1; }
.ranking-name { font-weight: 700; font-size: .95rem; display: flex; align-items: center; gap: 6px; }
.ranking-you-badge { background: var(--brand); color: #fff; font-size: .65rem; padding: 1px 6px; border-radius: 20px; font-weight: 700; }
.ranking-meta { font-size: .75rem; color: var(--muted); }
.ranking-pts { display: flex; flex-direction: column; align-items: flex-end; }
.ranking-pts-num { font-size: 1.2rem; font-weight: 800; color: var(--dark); }
.ranking-pts-lbl { font-size: .7rem; color: var(--muted); }
.ranking-my-pos { text-align: center; padding: 12px; font-size: .88rem; color: var(--muted); background: var(--card); border-top: 1px solid var(--border); }

/* ── CAPTOR ────────────────────────────────────────────────────── */
.captor-stats-row { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--card); border-bottom: 1px solid var(--border); }
.captor-stat { text-align: center; padding: 12px 6px; border-right: 1px solid var(--border); }
.captor-stat:last-child { border-right: none; }
.captor-stat div { font-size: 1.4rem; font-weight: 800; }
.captor-stat small { font-size: .62rem; color: var(--muted); text-transform: uppercase; }
.captor-stat.danger div { color: var(--danger); }
.captor-stat.warning div { color: var(--warning); }
.captor-stat.success div { color: var(--success); }
.captor-stat.muted div { color: var(--muted); }

.status-actions-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.status-action-btn { padding: 10px 8px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--card); color: var(--text); font-size: .82rem; font-weight: 600; cursor: pointer; transition: all .12s; text-align: left; }
.status-action-btn:hover { border-color: var(--brand); color: var(--brand); }
.status-action-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.status-action-btn:disabled { opacity: .5; cursor: not-allowed; }
.inline-form { display: flex; flex-direction: column; gap: 10px; }
.wa-link { background: #25d366; color: #fff; border-radius: 4px; padding: 2px 8px; font-size: .78rem; margin-left: 8px; }

/* ── KPI CARDS ─────────────────────────────────────────────────── */
.kpi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 12px 16px; }
.kpi-card { background: var(--card); border-radius: var(--radius); padding: 16px; border: 1px solid var(--border); text-align: center; }
.kpi-card.success { border-color: var(--success); background: #f0fdf4; }
.kpi-card.danger { border-color: var(--danger); background: #fef2f2; }
.kpi-card.warning { border-color: var(--warning); background: #fffbeb; }
.kpi-card.accent { border-color: var(--brand); background: var(--brand-light); }
.kpi-card.muted { background: var(--bg); }
.kpi-num { font-size: 2rem; font-weight: 800; color: var(--dark); line-height: 1.1; }
.kpi-card.danger .kpi-num { color: var(--danger); }
.kpi-card.success .kpi-num { color: var(--success); }
.kpi-card.warning .kpi-num { color: #b45309; }
.kpi-card.accent .kpi-num { color: var(--brand-dark); }
.kpi-label { font-size: .75rem; color: var(--muted); margin-top: 4px; }

/* ── SUPERVISION ───────────────────────────────────────────────── */
.sup-actions-row { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px; scrollbar-width: none; }
.sup-actions-row::-webkit-scrollbar { display: none; }
.sup-action-btn { padding: 9px 16px; border: 1.5px solid var(--border); border-radius: 20px; font-size: .85rem; font-weight: 700; white-space: nowrap; background: var(--card); color: var(--text); text-decoration: none; flex-shrink: 0; transition: all .12s; }
.sup-action-btn.danger { border-color: var(--danger); color: var(--danger); }
.sup-action-btn.warning { border-color: var(--warning); color: #92400e; }
.sup-action-btn.accent { background: var(--brand); color: #fff; border-color: var(--brand); }
.sup-action-btn:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.danger-text { color: var(--danger); }
.warning-text { color: #92400e; }
.empty-state.sm { padding: 16px 0; }

/* ── TABLES ────────────────────────────────────────────────────── */
.table-responsive { overflow-x: auto; padding: 12px 16px; }
.data-table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.data-table th { background: var(--dark); color: #fff; padding: 10px 12px; font-size: .8rem; text-align: left; white-space: nowrap; }
.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: .88rem; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg); }

/* ── ADMIN ─────────────────────────────────────────────────────── */
.admin-panels-row { display: grid; grid-template-columns: 1fr; gap: 10px; padding: 0 16px 16px; }
.admin-panel { background: var(--card); border-radius: var(--radius); padding: 14px; border: 1px solid var(--border); }
.admin-ranking-item { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.admin-ranking-item:last-of-type { border-bottom: none; }
.admin-rank-pos { font-size: 1.2rem; width: 28px; flex-shrink: 0; }
.admin-rank-name { flex: 1; font-weight: 600; font-size: .9rem; }
.admin-rank-pts { font-weight: 800; font-size: .88rem; color: var(--brand); }

.toggle-status-btn { border: none; border-radius: 20px; padding: 4px 12px; font-size: .78rem; font-weight: 700; cursor: pointer; }
.toggle-status-btn.active { background: #dcfce7; color: #15803d; }
.toggle-status-btn.inactive { background: #fee2e2; color: #b91c1c; }

.campaigns-list { padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.campaign-card { background: var(--card); border-radius: var(--radius); padding: 14px; border: 1px solid var(--border); }
.campaign-header { font-weight: 700; margin-bottom: 8px; }
.campaign-prizes { display: flex; flex-direction: column; gap: 3px; font-size: .88rem; margin-bottom: 8px; }
.campaign-bonus { font-size: .8rem; color: var(--muted); }

.regions-list { padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.region-card { background: var(--card); border-radius: var(--radius); padding: 14px; border: 1px solid var(--border); }
.region-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.region-meta { font-size: .85rem; color: var(--text-sm); margin-bottom: 8px; }
.region-bairros { display: flex; flex-wrap: wrap; gap: 5px; }
.bairro-tag { background: var(--bg); border: 1px solid var(--border); border-radius: 20px; padding: 2px 10px; font-size: .75rem; }

.pts-val-list { display: flex; flex-direction: column; }
.pts-val-item { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--card); }
.pts-val-body { flex: 1; }
.pts-val-user { font-weight: 700; }
.pts-val-rule { font-size: .88rem; color: var(--text-sm); }
.pts-val-opp { font-size: .8rem; color: var(--muted); margin: 3px 0; }
.pts-val-date { font-size: .75rem; color: var(--muted); }
.pts-val-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.pts-val-num { font-size: 1.2rem; font-weight: 800; color: var(--success); }
.pts-val-btns { display: flex; gap: 6px; }

.dup-card { margin: 8px 16px; background: var(--card); border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; }
.dup-header { background: var(--dark); color: #fff; padding: 10px 14px; font-weight: 700; font-size: .88rem; }
.dup-compare { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; padding: 14px; }
.dup-side { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; }
.dup-label { font-weight: 700; color: var(--brand); font-size: .78rem; }
.dup-vs { display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--muted); }
.dup-form { padding: 12px 14px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.dup-btns { display: flex; gap: 8px; }

.report-filters { padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--border); }
.filter-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }

/* ── MODALS ────────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 1000; display: flex; align-items: flex-end; padding: 0; }
@media (min-width: 500px) { .modal-overlay { align-items: center; padding: 20px; } }
.modal-card { background: var(--card); border-radius: 20px 20px 0 0; width: 100%; max-height: 90vh; overflow-y: auto; padding: 0 0 env(safe-area-inset-bottom); }
@media (min-width: 500px) { .modal-card { border-radius: 20px; max-width: 480px; margin: auto; } }
.modal-card-wide { max-width: 580px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--card); z-index: 1; }
.modal-header h3 { font-size: 1rem; font-weight: 700; }
.modal-header button { background: none; border: none; font-size: 1.2rem; cursor: pointer; padding: 4px; color: var(--muted); }
.modal-card .field-group { padding: 0 20px; margin-bottom: 12px; }
.modal-card .field-group:first-of-type { margin-top: 16px; }
.modal-card .remember-label { padding: 0 20px; margin-bottom: 12px; }
.modal-footer { display: flex; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--border); }

/* ── TOAST & NOTIF ─────────────────────────────────────────────── */
.toast-msg { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); background: var(--dark); color: #fff; padding: 10px 20px; border-radius: 20px; font-size: .88rem; font-weight: 600; z-index: 9999; box-shadow: var(--shadow-md); }
.notif-panel { position: fixed; top: 54px; right: 0; width: 300px; max-height: 70vh; background: var(--card); border: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow-md); z-index: 150; display: none; overflow-y: auto; }
.notif-panel.open { display: block; }
.notif-backdrop { position: fixed; inset: 0; z-index: 149; display: none; }
.notif-backdrop.open { display: block; }
.notif-panel-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--bg); }
.notif-panel-header button { background: none; border: none; cursor: pointer; color: var(--muted); font-size: 1rem; }
.notif-empty { padding: 20px; text-align: center; color: var(--muted); font-size: .88rem; }
.notif-item { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: .85rem; }
.notif-item strong { display: block; margin-bottom: 2px; }
.notif-item small { color: var(--muted); }
.notif-unread { background: #eef1fb; }

/* ── POINTS SHOW ───────────────────────────────────────────────── */
.pts-list { display: flex; flex-direction: column; gap: 6px; }
.pts-item { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: var(--bg); border-radius: var(--radius-sm); font-size: .85rem; }
.pts-value { font-weight: 800; color: var(--success); }
.pts-status { font-size: .72rem; color: var(--muted); }
.pts-st-cancelado { opacity: .5; }

/* ── FAB ───────────────────────────────────────────────────────── */
.fab-area { position: fixed; bottom: 80px; right: 16px; z-index: 90; }
.fab { width: 52px; height: 52px; border-radius: 50%; background: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; box-shadow: 0 4px 14px rgba(26,58,159,.5); text-decoration: none; }

/* ── RESPONSIVE ────────────────────────────────────────────────── */
@media (min-width: 600px) {
  .kpi-grid { grid-template-columns: repeat(4, 1fr); }
  .admin-panels-row { grid-template-columns: repeat(2, 1fr); }
  .status-actions-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 768px) {
  .app-main { max-width: 720px; margin: 0 auto; }
}

/* ── CASANOVA PLATE LOGO ───────────────────────────────────────── */
.casanova-plate {
  background: linear-gradient(180deg, #dde0e6 0%, #b0b4bc 100%);
  border-radius: 14px; padding: 3px;
  display: inline-block;
  box-shadow: 0 6px 20px rgba(0,0,0,.28);
}
.casanova-plate-inner {
  background: #fff; border-radius: 11px;
  display: flex; align-items: stretch;
  overflow: hidden; height: 62px;
}
.casanova-plate-mark {
  width: 68px; display: flex; align-items: center;
  justify-content: center; padding: 10px 12px; flex-shrink: 0;
}
.casanova-plate-mark svg { width: 38px; height: 38px; }
.casanova-plate-name {
  background: linear-gradient(135deg, #132b80 0%, #1a3a9f 50%, #2148c0 100%);
  display: flex; align-items: center; padding: 0 22px; flex: 1;
}
.casanova-plate-name span {
  font-family: 'Arial Black', Arial, 'Helvetica Neue', sans-serif;
  font-weight: 900; font-size: 1.45rem; color: #fff;
  letter-spacing: 2px; text-transform: uppercase;
  text-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.casanova-plate-creci {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-size: .52rem; color: #94a3b8; letter-spacing: .6px;
  padding: 6px 8px; background: #fff; flex-shrink: 0;
  display: flex; align-items: center;
  border-left: 1px solid #e8eaed;
}

/* ── AUTH LOGO REDESIGN ────────────────────────────────────────── */
.auth-logo { display: flex; flex-direction: column; align-items: center; gap: 0; margin-bottom: 4px; }
.auth-logo-img {
  width: 100%; max-width: 300px; display: block;
  clip-path: inset(37% 2% 38% 2%);
  margin-top: -110px; margin-bottom: -112px;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,.25));
}
.auth-radar-sub { display: flex; align-items: center; gap: 8px; }
.auth-radar-icon { font-size: 1.3rem; }
.auth-radar-texts { display: flex; flex-direction: column; }
.auth-radar-texts .auth-app-name { font-size: 1rem; font-weight: 800; color: var(--dark); }
.auth-radar-texts .auth-slogan { font-size: .78rem; color: var(--muted); }

/* ── TOPBAR BRAND REDESIGN ─────────────────────────────────────── */
.topbar-logo-img { height: 30px; width: auto; object-fit: contain; display: block; }

/* ── HOME HERO REDESIGN ────────────────────────────────────────── */
.home-hero { background: linear-gradient(145deg, #1a3a9f 0%, #0f2460 100%); padding: 22px 16px 20px; position: relative; overflow: hidden; }
.home-hero-decor { position: absolute; top: -12px; right: -12px; opacity: .08; pointer-events: none; }
.home-hero-decor svg { width: 130px; height: 130px; }
.home-hero-brand { font-size: .68rem; font-weight: 700; letter-spacing: 3.5px; color: rgba(255,255,255,.55); text-transform: uppercase; margin-bottom: 8px; }

/* ── DASHBOARD ────────────────────────────────────────────────── */

/* Filter bar — period pills */
.dash-filter-bar {
  display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px;
  background: var(--card); border-bottom: 1px solid var(--border);
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.dash-filter-bar::-webkit-scrollbar { display: none; }
.dash-period-btn {
  padding: 6px 14px; border-radius: 20px; font-size: .82rem; font-weight: 600;
  white-space: nowrap; background: var(--bg); color: var(--text-sm);
  border: 1.5px solid var(--border); text-decoration: none; transition: all .12s; flex-shrink: 0;
}
.dash-period-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.dash-period-btn:hover:not(.active) { border-color: var(--brand); color: var(--brand); }

/* Secondary filters */
.dash-secondary-filters {
  background: var(--card); border-bottom: 1px solid var(--border); padding: 8px 16px;
}
.dash-filter-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.dash-filter-select {
  padding: 7px 10px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: .82rem; background: var(--bg); color: var(--text); cursor: pointer;
  flex: 1; min-width: 130px; max-width: 200px; -webkit-appearance: none; appearance: none;
}
.dash-filter-select:focus { outline: none; border-color: var(--brand); }

/* Alert items */
.dash-alerts-list { display: flex; flex-direction: column; gap: 8px; }
.alert-item {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  background: var(--card); border-radius: var(--radius-sm);
  border: 1px solid var(--border); text-decoration: none; color: var(--text);
  transition: background .12s;
}
.alert-item:hover { background: var(--bg); }
.alert-item-danger  { border-left: 4px solid var(--danger); }
.alert-item-warning { border-left: 4px solid var(--warning); }
.alert-item-info    { border-left: 4px solid var(--info); }
.alert-item-icon { font-size: 1.2rem; flex-shrink: 0; }
.alert-item-msg  { flex: 1; font-size: .88rem; }
.alert-item-count { flex-shrink: 0; }
.alert-item-arrow { color: var(--muted); font-size: 1.2rem; flex-shrink: 0; }

/* Insight scroll */
.insight-scroll {
  display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.insight-scroll::-webkit-scrollbar { display: none; }
.insight-chip {
  flex-shrink: 0; padding: 8px 14px; background: #eff6ff;
  border: 1px solid #bfdbfe; border-radius: 20px;
  font-size: .82rem; color: #1e40af; font-weight: 500; white-space: nowrap;
}

/* KPI grid — dashboard variant */
.kpi-grid-dash { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 600px) { .kpi-grid-dash { grid-template-columns: repeat(4, 1fr); } }

/* KPI cards extended */
.kpi-card {
  position: relative; text-decoration: none; color: var(--text);
  display: flex; flex-direction: column; align-items: flex-start;
  transition: box-shadow .15s, transform .1s;
}
.kpi-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.kpi-val { font-size: 1.9rem; font-weight: 800; line-height: 1.1; }
.kpi-lbl { font-size: .72rem; color: var(--muted); margin-top: 3px; font-weight: 500; }
.kpi-icon { position: absolute; top: 10px; right: 12px; font-size: 1.3rem; opacity: .6; }

/* KPI color variants */
.kpi-card.kpi-danger  { border-color: var(--danger);  background: #fef2f2; }
.kpi-card.kpi-danger  .kpi-val { color: var(--danger); }
.kpi-card.kpi-success { border-color: var(--success); background: #f0fdf4; }
.kpi-card.kpi-success .kpi-val { color: var(--success); }
.kpi-card.kpi-warning { border-color: var(--warning); background: #fffbeb; }
.kpi-card.kpi-warning .kpi-val { color: #b45309; }
.kpi-card.kpi-info    { border-color: var(--info);    background: #eff6ff; }
.kpi-card.kpi-info    .kpi-val { color: #1d4ed8; }
.kpi-card.kpi-brand   { border-color: var(--brand);   background: var(--brand-light); }
.kpi-card.kpi-brand   .kpi-val { color: var(--brand-dark); }
.kpi-card.kpi-muted   { border-color: var(--border);  background: var(--bg); }
.kpi-card.kpi-muted   .kpi-val { color: var(--muted); }

/* Captor performance table */
.captor-perf-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dash-table {
  width: 100%; border-collapse: collapse; font-size: .82rem;
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); min-width: 540px;
}
.dash-table th {
  background: var(--dark); color: #fff; padding: 9px 10px;
  font-size: .75rem; text-align: left; white-space: nowrap; font-weight: 700;
}
.dash-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); }
.dash-table tr:last-child td { border-bottom: none; }
.dash-table tbody tr:nth-child(even) td { background: #f8fafc; }
.dash-table tbody tr:hover td { background: var(--brand-light); }

/* Dash section */
.dash-section { /* inherits .section-block padding rules */ }

/* Hero — captador / employee */
.hero-dash {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  padding: 20px 16px 18px; color: #fff;
}
.hero-dash-inner { display: flex; align-items: center; gap: 12px; }
.hero-dash-icon { font-size: 2rem; flex-shrink: 0; }
.hero-dash-info { flex: 1; }
.hero-dash-name { font-size: 1.1rem; font-weight: 800; }
.hero-dash-sub  { font-size: .82rem; opacity: .8; margin-top: 2px; }

/* Employee hero variant */
.hero-dash-employee { padding: 24px 16px 20px; text-align: center; }
.hero-dash-greeting { font-size: 1rem; opacity: .85; margin-bottom: 8px; }
.hero-dash-pts-wrap { margin-bottom: 8px; }
.hero-dash-pts-num { font-size: 3rem; font-weight: 900; line-height: 1; }
.hero-dash-pts-lbl { font-size: .82rem; opacity: .75; margin-top: 4px; }
.hero-dash-rank-badge {
  display: inline-block; background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.3); border-radius: 20px;
  padding: 5px 14px; font-size: .85rem; font-weight: 700; margin-top: 4px;
}

/* Metric row — horizontal scrollable chips */
.metric-row {
  display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px;
  background: var(--card); border-bottom: 1px solid var(--border);
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.metric-row::-webkit-scrollbar { display: none; }
.metric-chip {
  flex-shrink: 0; display: flex; flex-direction: column; align-items: center;
  gap: 2px; padding: 10px 14px; background: var(--bg);
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  text-decoration: none; color: var(--text); transition: all .12s; min-width: 70px;
}
.metric-chip:hover { border-color: var(--brand); background: var(--brand-light); }
.metric-chip-val { font-size: 1.3rem; font-weight: 800; line-height: 1.1; }
.metric-chip-lbl { font-size: .65rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .3px; text-align: center; }

/* Metric chip color variants */
.metric-chip-danger  { border-color: var(--danger);  background: #fef2f2; }
.metric-chip-danger  .metric-chip-val { color: var(--danger); }
.metric-chip-warning { border-color: var(--warning); background: #fffbeb; }
.metric-chip-warning .metric-chip-val { color: #b45309; }
.metric-chip-success { border-color: var(--success); background: #f0fdf4; }
.metric-chip-success .metric-chip-val { color: var(--success); }
.metric-chip-info    { border-color: var(--info);    background: #eff6ff; }
.metric-chip-info    .metric-chip-val { color: #1d4ed8; }
.metric-chip-brand   { border-color: var(--brand);   background: var(--brand-light); }
.metric-chip-brand   .metric-chip-val { color: var(--brand-dark); }
.metric-chip-muted   { background: var(--bg); }
.metric-chip-muted   .metric-chip-val { color: var(--muted); }

/* Ranking card — employee dashboard */
.ranking-card {
  background: var(--card); border-radius: var(--radius); border: 1px solid var(--border);
  padding: 16px; display: flex; flex-direction: column; align-items: center; text-align: center;
}
.ranking-card-pos { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ranking-card-num { font-size: 2rem; font-weight: 900; color: var(--dark); line-height: 1; }
.ranking-card-msg { font-size: .88rem; color: var(--muted); margin-top: 4px; }
