/* ═══════════════════════════════════════════════════════════
   ExclusiveLockers — Design System v2
   Light theme • Based on exclusivelockers-mock-v2.html
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Design tokens ─────────────────────────────────────────── */
:root {
  --brand:       #F59E0B;
  --brand-dark:  #D97706;
  --brand-light: #FEF3C7;
  --dark:        #111118;
  --dark2:       #1C1C28;
  --sidebar-w:   260px;
  --bg:          #F5F6FA;
  --surface:     #FFFFFF;
  --border:      #E8EAF0;
  --border2:     #D1D5E0;
  --text-primary:   #111118;
  --text-secondary: #5B6072;
  --text-tertiary:  #9CA3AF;
  --green:       #10B981;
  --green-l:     #ECFDF5;
  --red:         #EF4444;
  --red-l:       #FEF2F2;
  --amber:       #F59E0B;
  --amber-l:     #FFFBEB;
  --amber-m:     #FDE68A;
  --blue:        #3B82F6;
  --blue-l:      #EFF6FF;
  --purple:      #8B5CF6;
  --purple-l:    #F5F3FF;
  --gray:        #6B7280;
  --gray-l:      #F3F4F6;
  --r:     10px;
  --rs:    6px;
  --rl:    16px;
  --sh:    0 1px 4px rgba(17,17,24,.06), 0 4px 16px rgba(17,17,24,.06);
  --sh2:   0 8px 32px rgba(17,17,24,.12);
  --sans:  'Plus Jakarta Sans', system-ui, sans-serif;
  --mono:  'JetBrains Mono', monospace;
  --font-display: 'Syne', var(--sans);
}

/* ── Reset & base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body.xb-app, body.xb-login {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

/* Override Bootstrap / site.css input constraints */
body.xb-app input,
body.xb-app select,
body.xb-app textarea,
body.xb-login input,
body.xb-login select,
body.xb-login textarea {
  max-width: 100% !important;
}

/* ── App layout shell ─────────────────────────────────────── */
body.xb-app {
  display: flex;
}

/* ── SIDEBAR ───────────────────────────────────────────────── */
.xb-sidebar {
  width: var(--sidebar-w);
  background: var(--dark);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 200;
  overflow-y: auto;
  transition: transform .3s ease;
}

.xb-sidebar-brand {
  padding: 20px 20px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  cursor: pointer;
  text-decoration: none;
}
.xb-sidebar-brand:hover .xb-sb-name { color: var(--brand); }

.xb-sb-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.xb-sb-icon svg { width: 18px; height: 18px; }

.xb-sb-name {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.02em;
  transition: color .2s;
}
.xb-sb-name span { color: var(--brand); }

.xb-sb-section { padding: 0 12px; margin-bottom: 4px; }

.xb-sb-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.25);
  padding: 12px 8px 6px;
  display: block;
}

.xb-sb-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255,255,255,.55);
  cursor: pointer;
  transition: all .18s;
  text-decoration: none;
  position: relative;
  margin-bottom: 1px;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--sans);
}
.xb-sb-item:hover {
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.85);
  text-decoration: none;
}
.xb-sb-item.active {
  background: rgba(245,158,11,.15);
  color: var(--brand);
}
.xb-sb-item svg { width: 17px; height: 17px; flex-shrink: 0; opacity: .75; }
.xb-sb-item.active svg { opacity: 1; }
.xb-sb-item.disabled {
  opacity: .35;
  cursor: default;
  pointer-events: none;
}

.xb-sb-badge {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
}

.xb-sidebar-footer {
  margin-top: auto;
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.xb-sb-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  margin-bottom: 8px;
}

.xb-sb-avatar {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #000;
  flex-shrink: 0;
}

.xb-sb-user-info { flex: 1; min-width: 0; }
.xb-sb-user-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.xb-sb-user-role { font-size: 11px; color: rgba(255,255,255,.4); }

.xb-sb-logout {
  width: 100%;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 7px;
  background: none;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,.4);
  cursor: pointer;
  transition: all .2s;
  text-align: center;
  text-decoration: none;
  display: block;
}
.xb-sb-logout:hover {
  background: rgba(239,68,68,.15);
  color: #EF4444;
  border-color: rgba(239,68,68,.3);
}

/* Mobile overlay */
.xb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 199;
}
.xb-overlay.active { display: block; }

/* ── Main content ───────────────────────────────────────────── */
.xb-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Topbar ─────────────────────────────────────────────────── */
.xb-topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 var(--border);
}

.xb-topbar-left { display: flex; align-items: center; gap: 16px; }

.xb-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--rs);
  color: var(--text-secondary);
  font-size: 20px;
  line-height: 1;
}
.xb-menu-toggle:hover { background: var(--gray-l); }

.xb-topbar-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text-primary);
  margin: 0;
}

.xb-topbar-actions { display: flex; align-items: center; gap: 10px; }

.xb-env-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(239,68,68,.1);
  color: var(--red);
  border: 1px solid rgba(239,68,68,.2);
}

/* ── Page body ──────────────────────────────────────────────── */
.xb-page-body { padding: 28px 32px; flex: 1; }

/* ── Buttons ─────────────────────────────────────────────────── */
.xb-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1.5px solid var(--border2);
  border-radius: var(--r);
  background: var(--surface);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  white-space: nowrap;
}
.xb-btn-outline:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
  text-decoration: none;
}

.xb-btn-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border: none;
  border-radius: var(--r);
  background: var(--brand);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  color: #000;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  white-space: nowrap;
}
.xb-btn-action:hover {
  background: var(--brand-dark);
  text-decoration: none;
  color: #000;
}

.xb-btn-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1.5px solid var(--border2);
  border-radius: var(--rs);
  background: var(--surface);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .2s;
}
.xb-btn-filter:hover { border-color: var(--brand); color: var(--brand); }

.xb-btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: var(--rs);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  border: 1.5px solid var(--border2);
  background: var(--surface);
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
}
.xb-btn-sm:hover { color: var(--text-primary); border-color: var(--text-primary); text-decoration: none; }
.xb-btn-sm.brand { background: var(--brand); border-color: var(--brand); color: #000; }
.xb-btn-sm.brand:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.xb-btn-sm.danger { border-color: rgba(239,68,68,.3); color: var(--red); }
.xb-btn-sm.danger:hover { background: var(--red-l); border-color: var(--red); }

/* ── Alert banner ───────────────────────────────────────────── */
.xb-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--r);
  font-size: 13.5px;
  margin-bottom: 24px;
  border: 1px solid;
}
.xb-alert.amber {
  background: var(--amber-l);
  border-color: var(--amber-m);
  color: #92400E;
}
.xb-alert svg { width: 18px; height: 18px; flex-shrink: 0; }
.xb-alert-close {
  margin-left: auto;
  cursor: pointer;
  opacity: .6;
  font-size: 20px;
  line-height: 1;
  background: none;
  border: none;
  color: inherit;
  padding: 0;
}
.xb-alert-close:hover { opacity: 1; }

/* ── KPI Grid ────────────────────────────────────────────────── */
.xb-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.xb-kpi-card {
  background: var(--surface);
  border-radius: var(--rl);
  padding: 20px 22px;
  border: 1px solid var(--border);
  box-shadow: var(--sh);
  transition: transform .18s, box-shadow .18s;
}
.xb-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh2);
}

.xb-kpi-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.xb-kpi-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.xb-kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.xb-kpi-value {
  font-size: 32px;
  font-weight: 800;
  font-family: var(--font-display);
  letter-spacing: -.04em;
  line-height: 1;
  margin-bottom: 8px;
}
.xb-kpi-value.brand  { color: var(--brand); }
.xb-kpi-value.green  { color: var(--green); }
.xb-kpi-value.red    { color: var(--red); }
.xb-kpi-value.blue   { color: var(--blue); }

.xb-kpi-delta {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}
.xb-kpi-delta.up   { color: var(--green); }
.xb-kpi-delta.down { color: var(--red); }

/* ── Card ────────────────────────────────────────────────────── */
.xb-card {
  background: var(--surface);
  border-radius: var(--rl);
  border: 1px solid var(--border);
  box-shadow: var(--sh);
  overflow: hidden;
  margin-bottom: 20px;
}

.xb-card-header {
  padding: 18px 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.xb-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -.01em;
}

.xb-card-body { padding: 0 22px 22px; }

/* ── Charts grid ─────────────────────────────────────────────── */
.xb-charts-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 16px;
  margin-bottom: 20px;
}

/* CSS bar chart */
.xb-bar-chart {
  height: 180px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding-bottom: 24px;
  position: relative;
}
.xb-bar-chart::before {
  content: '';
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  top: 0;
  background: repeating-linear-gradient(
    180deg,
    transparent,
    transparent calc(25% - .5px),
    var(--border) calc(25% - .5px),
    var(--border) 25%
  );
}

.xb-bar-group {
  flex: 1;
  display: flex;
  gap: 3px;
  align-items: flex-end;
  position: relative;
  z-index: 1;
}

.xb-bar {
  flex: 1;
  border-radius: 4px 4px 0 0;
  transition: opacity .2s;
}
.xb-bar:hover { opacity: .8; }
.xb-bar.entry { background: var(--brand); }
.xb-bar.exit  { background: var(--green); }

.xb-chart-labels {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.xb-chart-label-item {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: var(--text-tertiary);
}

.xb-chart-legend {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}
.xb-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}
.xb-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}
.xb-legend-dot.entry { background: var(--brand); }
.xb-legend-dot.exit  { background: var(--green); }

/* Donut chart */
.xb-donut-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 22px 22px;
}
.xb-donut-svg { width: 140px; height: 140px; margin-bottom: 16px; }
.xb-donut-legend {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.xb-donut-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.xb-donut-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.xb-donut-label { flex: 1; color: var(--text-secondary); }
.xb-donut-val { font-weight: 700; color: var(--text-primary); }

/* Occupancy circles (from previous design, restyled) */
.xb-circles-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding: 4px 0;
}

.xb-circle-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 100px;
}

.xb-circular-progress {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: conic-gradient(var(--brand) var(--progress, 0%), var(--gray-l) 0deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--sh);
}

.xb-circular-inner {
  width: 74px;
  height: 74px;
  background: var(--surface);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.xb-circular-pct {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--sans);
}

.xb-circle-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}

.xb-circle-count {
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
}

/* 2-col section grid */
.xb-section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ── Alert / Exception items ────────────────────────────────── */
.xb-exc-item {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 12px;
}
.xb-exc-item:last-child { border-bottom: none; }

.xb-exc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  margin-top: 5px;
  flex-shrink: 0;
}

.xb-exc-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--red);
  margin-bottom: 2px;
}

.xb-exc-desc { font-size: 12px; color: var(--text-secondary); }

/* ── Filter bar ──────────────────────────────────────────────── */
.xb-filter-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  box-shadow: var(--sh);
}

.xb-filter-search {
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1.5px solid var(--border2);
  border-radius: var(--rs);
  background: var(--bg);
}
.xb-filter-search input {
  border: none;
  background: transparent;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
  flex: 1;
  padding: 0;
}
.xb-filter-search input::placeholder { color: var(--text-tertiary); }
.xb-filter-search svg { width: 16px; height: 16px; color: var(--text-tertiary); flex-shrink: 0; }

.xb-filter-select {
  padding: 4px 8px;
  border: 1.5px solid var(--border2);
  border-radius: var(--rs);
  font-family: var(--sans);
  font-size: 10px;
  color: var(--text-secondary);
  background: var(--surface);
  outline: none;
  cursor: pointer;
  height: 30px;
}
.xb-filter-select:focus { border-color: var(--brand); }

.xb-filter-date {
  padding: 9px 12px;
  border: 1.5px solid var(--border2);
  border-radius: var(--rs);
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--surface);
  height: 40px;
  outline: none;
  cursor: pointer;
}
.xb-filter-date:focus { border-color: var(--brand); }

.xb-filter-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
}
.xb-filter-check input { accent-color: var(--brand); width: 15px; height: 15px; cursor: pointer; }

/* Advanced filter grid (collapsible) */
.xb-adv-filters {
  width: 100%;
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  margin-top: 2px;
}
.xb-adv-filters.open { display: grid; }

.xb-adv-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.xb-adv-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.xb-adv-input {
  padding: 7px 10px;
  border: 1.5px solid var(--border2);
  border-radius: var(--rs);
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text-primary);
  background: var(--bg);
  outline: none;
  width: 100%;
}
.xb-adv-input:focus { border-color: var(--brand); }

/* Active filter tags */
.xb-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.xb-filter-tag {
  background: var(--amber-l);
  color: #92400E;
  border: 1px solid var(--amber-m);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 600;
}

/* Block filter pills (moradores) */
.xb-block-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.xb-block-btn {
  padding: 7px 16px;
  border-radius: var(--rs);
  border: 1.5px solid var(--border2);
  background: var(--surface);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .18s;
}
.xb-block-btn:hover { border-color: var(--brand); color: var(--brand); }
.xb-block-btn.active { background: var(--brand); border-color: var(--brand); color: #000; font-weight: 700; }

/* ── Table card ──────────────────────────────────────────────── */
.xb-table-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rl);
  box-shadow: var(--sh);
  margin-bottom: 20px;
  overflow: hidden;
}

.xb-table-card-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.xb-table-card-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--text-primary);
}

.xb-table-card-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.xb-table-wrap { overflow-x: auto; }

.xb-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  font-family: var(--sans);
}

.xb-table-wrap thead th {
  padding: 10px 16px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  white-space: nowrap;
  position: sticky;
  top: 0;
}

.xb-table-wrap tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.xb-table-wrap tbody tr:hover { background: var(--bg); }
.xb-table-wrap tbody tr:last-child { border-bottom: none; }

.xb-table-wrap td {
  padding: 13px 16px;
  color: var(--text-primary);
  vertical-align: middle;
  white-space: nowrap;
}

.xb-table-wrap td.xb-td-id {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--brand);
  font-weight: 500;
}
.xb-table-wrap td.xb-td-muted { color: var(--text-secondary); }
.xb-table-wrap td.xb-td-mono {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
}

/* Scrollable table body */
.xb-table-scroll { max-height: 68vh; overflow-y: auto; }
.xb-table-scroll table { width: 100%; }

/* ── Badges ──────────────────────────────────────────────────── */
.xb-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  white-space: nowrap;
}
.xb-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.xb-badge-notificado { background: var(--amber-l);  color: #92400E; } .xb-badge-notificado::before { background: var(--amber); }
.xb-badge-depositado { background: var(--purple-l); color: #5B21B6; } .xb-badge-depositado::before { background: var(--purple); }
.xb-badge-alocado    { background: var(--blue-l);   color: #1D4ED8; } .xb-badge-alocado::before    { background: var(--blue); }
.xb-badge-retirado   { background: var(--green-l);  color: #065F46; } .xb-badge-retirado::before   { background: var(--green); }
.xb-badge-ativo      { background: var(--green-l);  color: #065F46; } .xb-badge-ativo::before      { background: var(--green); }
.xb-badge-inativo    { background: var(--gray-l);   color: var(--gray); } .xb-badge-inativo::before { background: var(--gray); }
.xb-badge-danger     { background: var(--red-l);    color: #991B1B; } .xb-badge-danger::before     { background: var(--red); }

/* ── Action buttons (table rows) ─────────────────────────────── */
.xb-actions { display: flex; align-items: center; gap: 6px; }

.xb-action-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--rs);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  color: var(--text-secondary);
  transition: all .15s;
  font-size: 13px;
  text-decoration: none;
}
.xb-action-btn:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
  text-decoration: none;
}
.xb-action-btn.danger:hover { border-color: var(--red); color: var(--red); background: var(--red-l); }

/* ── Empty state ─────────────────────────────────────────────── */
.xb-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-secondary);
}
.xb-empty-icon { font-size: 40px; margin-bottom: 12px; }
.xb-empty-text { font-size: 14px; }

/* Days overdue / senha crossed */
.xb-overdue { color: var(--red); font-weight: 700; }
.xb-senha-crossed { text-decoration: line-through; color: var(--text-tertiary); }

/* ══════════════════════════════════
   LOGIN LAYOUT
══════════════════════════════════ */
body.xb-login {
  display: flex;
  min-height: 100vh;
}

.xb-login-left {
  width: 42%;
  background: var(--dark);
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.xb-login-left::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -80px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,158,11,.18) 0%, transparent 70%);
  pointer-events: none;
}
.xb-login-left::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -60px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,158,11,.10) 0%, transparent 70%);
  pointer-events: none;
}

.xb-login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 56px;
  position: relative;
  z-index: 1;
}

.xb-login-brand-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.xb-login-brand-icon svg { width: 26px; height: 26px; }

.xb-login-brand-name {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.02em;
}
.xb-login-brand-name span { color: var(--brand); }

.xb-login-headline {
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -.03em;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}
.xb-login-headline em {
  color: var(--brand);
  font-style: normal;
  display: block;
}

.xb-login-desc {
  font-size: 15px;
  color: rgba(255,255,255,.5);
  line-height: 1.6;
  margin-bottom: 48px;
  max-width: 340px;
  position: relative;
  z-index: 1;
}

.xb-login-features {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.xb-login-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: rgba(255,255,255,.65);
}
.xb-login-feature::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  flex-shrink: 0;
}

/* Login right panel */
.xb-login-right {
  flex: 1;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 48px;
}

.xb-login-form-wrap {
  width: 100%;
  max-width: 420px;
}

.xb-login-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--amber-l);
  border: 1px solid var(--amber-m);
  font-size: 12px;
  font-weight: 600;
  color: #92400E;
  margin-bottom: 28px;
}
.xb-login-badge svg { width: 14px; height: 14px; }

.xb-login-title {
  font-size: 28px;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--text-primary);
  letter-spacing: -.03em;
  margin-bottom: 6px;
}
.xb-login-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 36px;
}

.xb-form-group { margin-bottom: 20px; }

.xb-form-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.xb-form-input {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border2);
  border-radius: var(--r);
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text-primary);
  background: #fff;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.xb-form-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(245,158,11,.15);
}

.xb-password-wrap { position: relative; }
.xb-password-wrap .xb-form-input { padding-right: 44px; }
.xb-pwd-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-tertiary);
  padding: 0;
  display: flex;
  align-items: center;
}
.xb-pwd-toggle:hover { color: var(--text-secondary); }
.xb-pwd-toggle svg { width: 18px; height: 18px; }

.xb-login-submit {
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, #F5A623 0%, #FF8C00 100%);
  box-shadow: 0 4px 15px rgba(245,166,35,0.35);
  border: none;
  border-radius: var(--r);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 700;
  color: #000;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}
.xb-login-submit:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
  box-shadow: var(--sh2);
}

.xb-btn-back {
  display: block;
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
}
.xb-btn-back:hover { color: var(--text-primary); }

/* Validation errors in login */
.xb-form-error {
  font-size: 12px;
  color: var(--red);
  margin-top: 6px;
}

/* Page header (non-login) */
.xb-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.xb-page-header h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text-primary);
  margin: 0 0 4px;
}
.xb-page-header p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}
.xb-page-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* Count pill */
.xb-count-pill {
  background: var(--gray-l);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-left: 8px;
}

/* Quick-nav shortcut cards */
.xb-quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}
.xb-quick-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rl);
  padding: 20px 22px;
  box-shadow: var(--sh);
  text-decoration: none;
  color: var(--text-primary);
  transition: box-shadow .18s, border-color .18s;
  display: block;
}
.xb-quick-card:hover {
  box-shadow: var(--sh2);
  border-color: var(--brand);
  text-decoration: none;
  color: var(--text-primary);
}
.xb-quick-card-icon { font-size: 28px; margin-bottom: 8px; }
.xb-quick-card-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.xb-quick-card-sub { font-size: 12px; color: var(--text-secondary); }

/* Bootstrap modal overrides (keep modals working) */
.modal-header { background: var(--dark); color: #fff; border-bottom: 1px solid rgba(255,255,255,.1); }
.modal-content { border: 1px solid var(--border); border-radius: var(--rl); overflow: hidden; }
.modal-footer { border-top: 1px solid var(--border); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
  :root { --sidebar-w: 220px; }
  .xb-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .xb-charts-grid { grid-template-columns: 1fr; }
  .xb-section-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .xb-sidebar { transform: translateX(-260px); width: 260px; }
  .xb-sidebar.open { transform: translateX(0); }
  .xb-main { margin-left: 0; }
  .xb-menu-toggle { display: flex; }
  .xb-topbar { padding: 0 16px; }
  .xb-page-body { padding: 16px; }
  .xb-kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .xb-filter-bar { gap: 8px; }
  .xb-login-left { display: none; }
  .xb-login-right { padding: 32px 24px; }
  .xb-charts-grid { grid-template-columns: 1fr; }
  .xb-quick-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .xb-kpi-grid { grid-template-columns: 1fr; }
  .xb-topbar-actions .xb-btn-outline { display: none; }
  .xb-section-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════
   Patch — aliases & missing classes for Razor views
   ═══════════════════════════════════════════════════════════ */

/* ── Sidebar structural aliases ─────────────────────────── */
.xb-sb-brand {
  padding: 20px 20px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.xb-sb-brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #000;
}
.xb-sb-brand-text {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.02em;
}
.xb-sb-brand-text span { color: var(--brand); }

.xb-sb-body { flex: 1; overflow-y: auto; padding: 8px 12px; }

/* Active state via xb-active class */
.xb-sb-item.xb-active {
  background: rgba(245,158,11,.15);
  color: var(--brand);
}
.xb-sb-item.xb-active svg { opacity: 1; }
.xb-sb-item.xb-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  background: var(--brand);
  border-radius: 0 2px 2px 0;
}

/* Disabled state via xb-sb-disabled */
.xb-sb-item.xb-sb-disabled {
  opacity: .35;
  cursor: default;
  pointer-events: none;
}

/* Sidebar footer */
.xb-sb-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
}
.xb-sb-user-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.xb-sb-user-role { font-size: 11px; color: rgba(255,255,255,.4); }

/* Sidebar logout link */
.xb-sb-item.xb-sb-logout {
  color: rgba(255,255,255,.35);
  margin-top: 4px;
}
.xb-sb-item.xb-sb-logout:hover {
  background: rgba(239,68,68,.12);
  color: #EF4444;
}

/* Mobile open/show state aliases */
.xb-sidebar.xb-open { transform: translateX(0) !important; }
.xb-overlay.xb-show { display: block; }

/* ── Hamburger button ───────────────────────────────────── */
.xb-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--rs);
  color: var(--text-secondary);
  line-height: 1;
  margin-right: 4px;
}
.xb-hamburger:hover { background: var(--gray-l); }

@media (max-width: 768px) {
  .xb-hamburger { display: flex; align-items: center; }
}

/* ── Topbar right area ──────────────────────────────────── */
.xb-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.xb-topbar-env {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(239,68,68,.1);
  color: var(--red);
  border: 1px solid rgba(239,68,68,.2);
}
.xb-topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}
.xb-topbar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #000;
  flex-shrink: 0;
}

/* ── Main content area ──────────────────────────────────── */
.xb-content {
  padding: 28px 32px;
  flex: 1;
}
@media (max-width: 768px) {
  .xb-content { padding: 16px; }
}

/* ── Login: left panel extras ───────────────────────────── */
.xb-login-left-glow {
  position: absolute;
  top: -120px;
  right: -80px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,158,11,.2) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.xb-login-left-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
}
.xb-login-left-title {
  font-size: clamp(22px, 2.8vw, 36px);
  font-weight: 800;
  font-family: var(--font-display);
  color: #fff;
  line-height: 1.15;
  letter-spacing: -.03em;
  margin-bottom: 12px;
}
.xb-login-left-sub {
  font-size: 15px;
  color: rgba(255,255,255,.5);
  margin-bottom: 36px;
  line-height: 1.5;
}
.xb-login-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  z-index: 1;
}
.xb-login-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: rgba(255,255,255,.65);
}
.xb-login-features li svg { color: var(--brand); flex-shrink: 0; }
.xb-login-left-footer {
  font-size: 11px;
  color: rgba(255,255,255,.25);
  position: relative;
  z-index: 1;
  padding-top: 24px;
}

/* ── Login: right panel form aliases ────────────────────── */
.xb-login-form-wrap {
  width: 100%;
  max-width: 420px;
}
.xb-login-shield {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--amber-l);
  border: 1px solid var(--amber-m);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  margin-bottom: 24px;
}
.xb-login-title {
  font-size: 28px;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--text-primary);
  letter-spacing: -.03em;
  margin-bottom: 6px;
}
.xb-login-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}
.xb-login-form { display: flex; flex-direction: column; gap: 0; }
.xb-login-field { margin-bottom: 20px; }
.xb-login-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.xb-login-input {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border2);
  border-radius: var(--r);
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text-primary);
  background: #fff;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.xb-login-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(245,158,11,.15);
}
.xb-login-pw-wrap { position: relative; }
.xb-login-pw-wrap .xb-login-input { padding-right: 90px; }
.xb-pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-tertiary);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--rs);
}
.xb-pw-toggle:hover {
  color: var(--text-primary);
  background: var(--gray-l);
}
.xb-field-error {
  display: block;
  font-size: 12px;
  color: var(--red);
  margin-top: 5px;
}
.xb-login-copy {
  text-align: center;
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 24px;
}

/* ── KPI card sub-elements ──────────────────────────────── */
.xb-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.xb-kpi-icon-blue   { background: var(--blue-l);   color: var(--blue); }
.xb-kpi-icon-amber  { background: var(--amber-l);  color: var(--amber); }
.xb-kpi-icon-green  { background: var(--green-l);  color: var(--green); }
.xb-kpi-icon-purple { background: var(--purple-l); color: var(--purple); }
.xb-kpi-sub {
  font-size: 12px;
  color: var(--text-secondary);
}
.xb-kpi-link {
  text-decoration: none;
  transition: box-shadow .18s, border-color .18s;
  display: block;
}
.xb-kpi-link:hover {
  box-shadow: var(--sh2);
  border-color: var(--brand);
  text-decoration: none;
  color: var(--text-primary);
}

/* ── Badge neutral ──────────────────────────────────────── */
.xb-badge-neutral {
  background: var(--gray-l);
  color: var(--gray);
}
.xb-badge-neutral::before { background: var(--gray); }

/* ── Page header aliases ────────────────────────────────── */
.xb-page-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text-primary);
  margin: 0 0 4px;
}
.xb-page-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}
.xb-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* ── Danger button ──────────────────────────────────────── */
.xb-btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--r);
  background: var(--red);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: all .2s;
}
.xb-btn-danger:hover { background: #DC2626; }

/* ── Block filter pills ─────────────────────────────────── */
.xb-pill-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.xb-pill {
  padding: 6px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--border2);
  background: var(--surface);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .18s;
}
.xb-pill:hover { border-color: var(--brand); color: var(--brand); }
.xb-pill-active { background: var(--brand); border-color: var(--brand); color: #000; }

/* ── Table action buttons (with label text) ─────────────── */
.xb-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  width: auto;
  height: auto;
  justify-content: flex-start;
  border-radius: var(--rs);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  border: 1.5px solid var(--border2);
  background: var(--surface);
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
}
.xb-action-btn:hover { color: var(--text-primary); border-color: var(--text-primary); text-decoration: none; }
.xb-action-edit:hover  { border-color: var(--blue); color: var(--blue); background: var(--blue-l); }
.xb-action-delete:hover { border-color: var(--red); color: var(--red); background: var(--red-l); }

/* ── Text muted helper ──────────────────────────────────── */
.xb-text-muted { color: var(--text-secondary); }

/* ── Filter search wrapper ──────────────────────────────── */
.xb-filter-search-wrap {
  flex: 1;
  min-width: 200px;
  position: relative;
  display: flex;
  align-items: center;
}
.xb-filter-search-icon {
  position: absolute;
  left: 10px;
  color: var(--text-tertiary);
  pointer-events: none;
  flex-shrink: 0;
}
/* xb-filter-search as direct input (not container) */
input.xb-filter-search {
  width: 100%;
  padding: 4px 14px 4px 34px;
  border: 1.5px solid var(--border2);
  border-radius: var(--rs);
  font-family: var(--sans);
  font-size: 10px;
  color: var(--text-primary);
  background: var(--bg);
  outline: none;
  height: 30px;
}
input.xb-filter-search:focus { border-color: var(--brand); }
input.xb-filter-search::placeholder { color: var(--text-tertiary); }

/* ── Advanced filters: xb-show alias ───────────────────── */
.xb-adv-filters.xb-show { display: grid; }

.xb-adv-filters {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 18px;
  margin-bottom: 12px;
  box-shadow: var(--sh);
}
.xb-adv-filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
  align-items: end;
}
.xb-adv-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.xb-adv-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

/* ── Active filter: danger tag & clear link ─────────────── */
.xb-filter-tag-danger {
  background: var(--red-l);
  color: #991B1B;
  border: 1px solid rgba(239,68,68,.25);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 600;
}
.xb-filter-clear {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid var(--border2);
  background: var(--surface);
  transition: all .15s;
}
.xb-filter-clear:hover { color: var(--red); border-color: var(--red); text-decoration: none; }

/* ── Modal sections ─────────────────────────────────────── */
.xb-modal-section {
  padding: 14px 16px;
  background: var(--bg);
  border-radius: var(--r);
  margin-bottom: 10px;
}
.xb-modal-section:last-child { margin-bottom: 0; }
.xb-modal-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

/* ── xb-table (used directly in views) ─────────────────── */
.xb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  font-family: var(--sans);
}
.xb-table thead th {
  padding: 10px 16px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  white-space: nowrap;
}
.xb-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.xb-table tbody tr:hover { background: var(--bg); }
.xb-table tbody tr:last-child { border-bottom: none; }
.xb-table td {
  padding: 12px 16px;
  color: var(--text-primary);
  vertical-align: middle;
  white-space: nowrap;
}

/* ── Empty state (SVG icons) ────────────────────────────── */
.xb-empty-icon svg { color: var(--text-tertiary); }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — Tablet (769–1024px) + Mobile (≤768px)
   ═══════════════════════════════════════════════════════════ */

/* ── Tablet: icon-only sidebar with hover expand ─────────── */
@media (min-width: 769px) and (max-width: 1024px) {
  :root { --sidebar-w: 60px; }

  /* Sidebar collapses to 60px, expands on hover */
  .xb-sidebar {
    width: 60px;
    overflow: hidden;
    transition: width .25s ease, transform .3s ease;
  }
  .xb-sidebar:hover { width: 220px; overflow-y: auto; }

  /* Center brand icon, body, sections, items, footer */
  .xb-sb-brand   { justify-content: center; padding: 20px 12px 16px; overflow: hidden; }
  .xb-sb-body    { padding: 8px 4px; }
  .xb-sb-section { padding: 0 4px; }
  .xb-sb-footer  { justify-content: center; }
  .xb-sb-item    { font-size: 0; justify-content: center; padding: 10px; gap: 0; }
  .xb-sb-item svg { width: 17px; height: 17px; opacity: .75; }

  /* Hide text-only elements in collapsed state */
  .xb-sb-brand-text,
  .xb-sb-footer .xb-sb-user {
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    white-space: nowrap;
    transition: max-width .2s ease, opacity .15s;
  }
  .xb-sb-section-label {
    max-height: 0;
    padding: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .2s ease, padding .2s, opacity .15s;
  }
  .xb-sb-badge { display: none; }

  /* Expand everything on sidebar hover */
  .xb-sidebar:hover .xb-sb-brand   { justify-content: flex-start; padding: 20px 20px 16px; }
  .xb-sidebar:hover .xb-sb-body    { padding: 8px 12px; }
  .xb-sidebar:hover .xb-sb-section { padding: 0 12px; }
  .xb-sidebar:hover .xb-sb-footer  { justify-content: flex-start; }
  .xb-sidebar:hover .xb-sb-item    { font-size: 13.5px; justify-content: flex-start; padding: 9px 10px; gap: 10px; }
  .xb-sidebar:hover .xb-sb-brand-text,
  .xb-sidebar:hover .xb-sb-footer .xb-sb-user { max-width: 200px; overflow: visible; opacity: 1; }
  .xb-sidebar:hover .xb-sb-section-label { max-height: 40px; padding: 12px 8px 6px; opacity: 1; }
  .xb-sidebar:hover .xb-sb-badge { display: inline-block; }

  /* KPI 2 columns */
  .xb-kpi-grid { grid-template-columns: repeat(2, 1fr); }

  /* Filters: 2 per line */
  .xb-filter-bar { flex-wrap: wrap; }
  .xb-filter-bar > * { flex: 1 1 calc(50% - 4px); min-width: 0; }
  .xb-filter-search-wrap { flex: 2 1 100%; }

  /* Tables scroll horizontally */
  .xb-table-scroll { overflow-x: auto; }
}

/* ── Mobile: ≤768px — hamburger drawer ───────────────────── */
@media (max-width: 768px) {
  /* KPI: 1 full-width column */
  .xb-kpi-grid { grid-template-columns: 1fr; gap: 10px; }

  /* Filter bar: all items stack full-width */
  .xb-filter-bar { flex-wrap: wrap; gap: 8px; }
  .xb-filter-bar > * { flex: 1 1 100%; min-width: 0; max-width: none !important; }
  .xb-filter-search-wrap { flex: 1 1 100%; min-width: 0; }

  /* Tables scroll horizontally */
  .xb-table-scroll { overflow-x: auto; }

  /* Block filter pills: horizontal scroll, no wrap */
  .xb-pill-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    scrollbar-width: none;
  }
  .xb-pill-row::-webkit-scrollbar { display: none; }

  /* Topbar user: hide name, keep avatar only */
  .xb-topbar-user span { display: none; }

  /* Moradores table: hide Bloco (col 3), DDI (col 4), Telefone (col 5) */
  .xb-table:not(#movimentoTable) th:nth-child(3),
  .xb-table:not(#movimentoTable) td:nth-child(3),
  .xb-table:not(#movimentoTable) th:nth-child(4),
  .xb-table:not(#movimentoTable) td:nth-child(4),
  .xb-table:not(#movimentoTable) th:nth-child(5),
  .xb-table:not(#movimentoTable) td:nth-child(5) { display: none; }

  /* Movimentações table: hide SenhaRetirada (col 10) and DescricaoMercadoria (col 11) */
  #movimentoTable th:nth-child(10),
  #movimentoTable td:nth-child(10),
  #movimentoTable th:nth-child(11),
  #movimentoTable td:nth-child(11) { display: none; }
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — Spec additions (Issue 4)
   ══════════════════════════════════════════════════════════ */

/* Mobile strict < 768px */
@media (max-width: 767px) {
  .xb-sidebar { transform: translateX(-260px); transition: transform .3s; }
  .xb-sidebar.xb-open { transform: translateX(0); }
  .xb-main { margin-left: 0 !important; }
  .xb-hamburger { display: flex !important; }
  .xb-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 99; }
  .xb-overlay.xb-show { display: block; }
  .xb-kpi-grid { grid-template-columns: 1fr 1fr; }
  .xb-charts-grid { grid-template-columns: 1fr; }
  .xb-section-grid { grid-template-columns: 1fr; }
  .xb-topbar-title { font-size: 16px; }
  .xb-table thead th:nth-child(n+5):not(:last-child) { display: none; }
  .xb-table td:nth-child(n+5):not(:last-child) { display: none; }
}

/* Tablet 768px–1024px */
@media (min-width: 768px) and (max-width: 1024px) {
  .xb-sidebar { width: 64px; }
  .xb-sb-section-label { display: none; }
  .xb-sb-item span:not(.xb-sb-badge) { display: none; }
  .xb-sb-brand-text { display: none; }
  .xb-main { margin-left: 64px; }
  .xb-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .xb-charts-grid { grid-template-columns: 1fr; }
}
