/* Exclusive Lockers Design System — extracted from exclusive-lockers-final.html */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=DM+Mono:wght@400;500&display=swap');

/* ─── TOKENS ─── */
:root {
  --gold: #F5A623;
  --gold-d: #D4891E;
  --gold-dd: #B87417;
  --gold-t: rgba(245,166,35,0.12);
  --gold-t2: rgba(245,166,35,0.20);
  --black: #09090B;
  --black2: #141417;
  --black3: #1E1E24;
  --black4: #27272E;
  --white: #FFFFFF;
  --bg: #F2F4F8;
  --surface: #FFFFFF;
  --surface2: #F8FAFC;
  --border: #E4E8F0;
  --border-d: #2A2A35;
  --text: #0D1117;
  --text-2: #4A5568;
  --text-3: #8A96A8;
  --green: #10B981;
  --green-t: rgba(16,185,129,0.12);
  --red: #EF4444;
  --red-t: rgba(239,68,68,0.12);
  --blue: #3B7DFF;
  --blue-t: rgba(59,125,255,0.12);
  --amber: #F59E0B;
  --amber-t: rgba(245,158,11,0.12);
  --purple: #8B5CF6;
  --purple-t: rgba(139,92,246,0.12);
  --gray: #6B7280;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --sh-xs: 0 1px 3px rgba(0,0,0,.05), 0 1px 2px rgba(0,0,0,.04);
  --sh-sm: 0 2px 8px rgba(0,0,0,.07), 0 1px 3px rgba(0,0,0,.05);
  --sh-md: 0 4px 20px rgba(0,0,0,.08), 0 2px 8px rgba(0,0,0,.05);
  --sh-lg: 0 12px 48px rgba(0,0,0,.12), 0 4px 16px rgba(0,0,0,.06);
  --sh-gold: 0 8px 32px rgba(245,166,35,0.28);
  --nav-w: 248px;
  --hdr-h: 64px;
  --font: 'DM Sans', system-ui, sans-serif;
  --font-display: 'Syne', sans-serif;
  --font-mono: 'DM Mono', monospace;
  --tr: all 0.22s cubic-bezier(.4,0,.2,1);

  /* backward-compat aliases used in existing views */
  --brand:          var(--gold);
  --brand-dark:     var(--gold-d);
  --dark:           var(--black);
  --dark2:          var(--black2);
  --text-primary:   var(--text);
  --text-secondary: var(--text-2);
  --text-tertiary:  var(--text-3);
  --sidebar-w:      var(--nav-w);
  --sans:           var(--font);
  --mono:           var(--font-mono);
  --r:              var(--radius);
  --rs:             var(--radius-sm);
  --rl:             var(--radius-lg);
  --sh:             var(--sh-sm);
  --sh2:            var(--sh-md);
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); background: var(--bg); color: var(--text); min-height: 100vh; overflow-x: hidden; }
button { cursor: pointer; font-family: var(--font); }
input, select, textarea { font-family: var(--font); }
a { text-decoration: none; }
ul { list-style: none; }

/* ─── ANIMATIONS ─── */
@keyframes fadeUp   { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:translateY(0)} }
@keyframes fadeIn   { from{opacity:0} to{opacity:1} }
@keyframes spin     { to{transform:rotate(360deg)} }
@keyframes pulse    { 0%,100%{opacity:1} 50%{opacity:.4} }
@keyframes blink    { 0%,100%{opacity:1} 50%{opacity:0} }
@keyframes slideUp  { from{transform:translateY(20px);opacity:0} to{transform:translateY(0);opacity:1} }
@keyframes toastIn  { from{transform:translateX(120%);opacity:0} to{transform:translateX(0);opacity:1} }
@keyframes toastOut { from{transform:translateX(0);opacity:1} to{transform:translateX(120%);opacity:0} }

.anim    { animation: fadeUp .35s cubic-bezier(.22,1,.36,1) both }
.anim-in { animation: fadeIn .25s ease both }
.d1{animation-delay:.04s} .d2{animation-delay:.09s} .d3{animation-delay:.14s}
.d4{animation-delay:.19s} .d5{animation-delay:.24s} .d6{animation-delay:.29s}

/* ─── ADMIN SHELL ─── */
body.xb-app {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
  background: var(--bg);
}

/* overlay for mobile */
.el-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 99;
}
.el-overlay.xb-show { display: block; }

/* ─── ADMIN SIDEBAR ─── */
.admin-sidebar {
  width: var(--nav-w);
  flex-shrink: 0;
  background: var(--black);
  color: var(--white);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  border-right: 1px solid var(--border-d);
  overflow-y: auto;
  /* overflow-x intentionally NOT hidden here — prevents logo from being clipped.
     Nav item overflow is handled by overflow-x:hidden on .sidebar-nav below. */
}

.sidebar-header {
  padding: 20px 20px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-d);
  flex-shrink: 0;
}
.sidebar-logo-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--gold) 0%, #FF8C00 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(245,166,35,0.3);
}
.sidebar-logo-name {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  max-width: 164px;
}
.sidebar-logo-name span { color: var(--gold); }

.sidebar-nav {
  flex: 1;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-x: hidden;
}
.nav-section {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.3);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 10px 12px 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  cursor: pointer;
  transition: var(--tr);
  position: relative;
  text-decoration: none;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.85); text-decoration: none; }
.nav-item.active { background: rgba(245,166,35,0.12); color: var(--gold); }
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 60%;
  background: var(--gold);
  border-radius: 2px;
}
.nav-item-icon { width: 20px; text-align: center; font-size: 15px; flex-shrink: 0; }
.nav-badge {
  margin-left: auto;
  background: var(--red);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 40px;
}
.nav-divider { height: 1px; background: var(--border-d); margin: 8px 12px; }

.sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid var(--border-d);
  flex-shrink: 0;
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: default;
  transition: var(--tr);
}
.sidebar-user:hover { background: rgba(255,255,255,0.06); }
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, #FF8C00 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--black);
  flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: rgba(255,255,255,0.4); }
.user-exit {
  font-size: 16px;
  color: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: var(--tr);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
  text-decoration: none;
}
.user-exit:hover { color: var(--red); background: rgba(239,68,68,0.15); }

/* mobile */
@media (max-width:900px) {
  .admin-sidebar { transform: translateX(-100%); transition: transform .3s ease; }
  .admin-sidebar.xb-open { transform: translateX(0); }
  .admin-main { margin-left: 0 !important; }
}

/* ─── ADMIN MAIN ─── */
.admin-main {
  margin-left: var(--nav-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
  min-width: 0;
}
.admin-header {
  height: var(--hdr-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--sh-xs);
  width: 100%;
  box-sizing: border-box;
}
.admin-header-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  flex: 1;
  color: var(--text);
}
.admin-header-actions { display: flex; align-items: center; gap: 10px; }
.admin-content { flex: 1; padding: 28px; width: 100%; box-sizing: border-box; overflow-x: hidden; }

/* xb-table-card/scroll: ensure horizontal scroll at all breakpoints (v5: table-wrap { overflow-x:auto }) */
.xb-table-card  { overflow-x: auto; font-size: 10px; }
.xb-table-scroll { overflow-x: auto; }

/* ── Movimentações: compact table (many columns) ─────────── */
#movimentoTable {
  font-size: 10px;
  width: 100%;
}
#movimentoTable th,
#movimentoTable td {
  font-size: 10px;
  padding: 4px 6px;
  white-space: nowrap;
}
/* Colunas sempre ocultas na tela normal */
.col-porta, .col-txmsg { display: none !important; }
@media (max-width: 1024px) {
  .col-descricao,
  .col-quem-retirou { display: none !important; }
}
@media (max-width: 768px) {
  .col-dias,
  .col-bloco { display: none !important; }
}
.admin-page { display: none; }
.admin-page.active { display: block; animation: fadeUp .3s cubic-bezier(.22,1,.36,1) both; }

/* ─── HDR BUTTONS ─── */
.hdr-btn {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--white);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 7px;
  transition: var(--tr);
  cursor: pointer;
}
.hdr-btn:hover { border-color: var(--gold); color: var(--gold-d); background: var(--gold-t); }
.hdr-btn-primary {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  border: none;
  background: linear-gradient(135deg, var(--gold) 0%, #FF8C00 100%);
  font-size: 13px;
  font-weight: 600;
  color: var(--black);
  display: flex;
  align-items: center;
  gap: 7px;
  transition: var(--tr);
  box-shadow: 0 4px 16px rgba(245,166,35,0.25);
  cursor: pointer;
}
.hdr-btn-primary:hover { box-shadow: var(--sh-gold); transform: translateY(-1px); }

/* ─── CARD BASE ─── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--sh-xs);
  overflow: hidden;
}
.card:hover { box-shadow: var(--sh-sm); }
.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
}
.card-title { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--text); margin: 0; }
.card-subtitle { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.card-body { padding: 20px 22px; }

/* ─── KPI GRID ─── */
.kpi-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 24px; }
.kpi-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px 20px;
  min-height: 90px;
  box-shadow: var(--sh-xs);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: var(--tr);
}
.kpi-card:hover { box-shadow: var(--sh-sm); transform: translateY(-2px); }
.kpi-label { font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; }
.kpi-value { font-family: var(--font-display); font-size: clamp(24px, 3vw, 36px); line-height: 1; font-weight: 700; color: var(--text); letter-spacing: -1px; }
.kpi-value.gold  { color: var(--gold-d); }
.kpi-value.green { color: var(--green); }
.kpi-value.red   { color: var(--red); }
.kpi-value.blue  { color: var(--blue); }
.kpi-change { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 4px; }
.kpi-change.up   { color: var(--green); }
.kpi-change.down { color: var(--red); }
.kpi-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; margin-bottom: 4px; }
.kpi-icon.gold   { background: var(--gold-t); }
.kpi-icon.green  { background: var(--green-t); }
.kpi-icon.red    { background: var(--red-t); }
.kpi-icon.blue   { background: var(--blue-t); }
.kpi-icon.purple { background: var(--purple-t); }
.kpi-top { display: flex; justify-content: space-between; align-items: flex-start; }

/* ─── BADGES ─── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 40px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.7; flex-shrink: 0; }
.badge.livre      { background: var(--green-t); color: var(--green); }
.badge.ocupado    { background: var(--amber-t);  color: var(--amber); }
.badge.offline    { background: rgba(107,114,128,0.12); color: var(--gray); }
.badge.manutencao { background: var(--red-t);    color: var(--red); }
.badge.criado     { background: var(--blue-t);   color: var(--blue); }
.badge.alocado    { background: var(--gold-t);   color: var(--gold-d); }
.badge.depositado { background: var(--purple-t); color: var(--purple); }
.badge.notificado { background: var(--amber-t);  color: var(--amber); }
.badge.retirado   { background: var(--green-t);  color: var(--green); }
.badge.ativo      { background: var(--green-t);  color: var(--green); }
.badge.inativo    { background: rgba(107,114,128,0.12); color: var(--gray); }
.badge.online     { background: var(--green-t);  color: var(--green); }
.badge.pendente   { background: var(--amber-t);  color: var(--amber); }
.badge.erro       { background: var(--red-t);    color: var(--red); }

/* ─── TABLE ─── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td { padding: 12px 14px; font-size: 13px; color: var(--text-2); border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: var(--tr); }
tbody tr:hover { background: var(--surface2); }
.td-bold { font-weight: 600; color: var(--text); }
.td-mono { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.5px; }
.td-actions { display: flex; gap: 6px; }

/* ─── ICON BUTTONS ─── */
.btn-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: var(--tr);
  color: var(--text-2);
  cursor: pointer;
}
.btn-icon:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-t); }
.btn-icon.danger:hover { border-color: var(--red); color: var(--red); background: var(--red-t); }

/* ─── GOLD PRIMARY BUTTON ─── */
.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--gold) 0%, #FF8C00 100%);
  color: var(--black);
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 700;
  transition: var(--tr);
  box-shadow: 0 4px 16px rgba(245,166,35,0.25);
  cursor: pointer;
  width: 100%;
  justify-content: center;
}
.btn-gold:hover { box-shadow: var(--sh-gold); transform: translateY(-1px); }

.btn-login {
  width: 100%;
  padding: 13px;
  border-radius: var(--radius-sm);
  border: none;
  background: linear-gradient(135deg, var(--gold) 0%, #FF8C00 100%);
  color: var(--black);
  font-size: 14px;
  font-weight: 700;
  margin-top: 8px;
  transition: var(--tr);
  box-shadow: var(--sh-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}
.btn-login:hover { transform: translateY(-1px); box-shadow: 0 10px 36px rgba(245,166,35,0.35); }

/* ─── FORM ─── */
.form-group { margin-bottom: 18px; }
.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 7px;
}
.form-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--white);
  font-size: 14px;
  color: var(--text);
  transition: var(--tr);
  outline: none;
}
.form-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-t); }
.form-input::placeholder { color: var(--text-3); }
.form-input[disabled], .form-input:disabled { background: var(--surface2); opacity: 0.7; }

/* ─── ALERT BANNERS ─── */
.alert-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  font-size: 13px;
}
.alert-banner.warning  { background: var(--amber-t); border: 1px solid rgba(245,158,11,0.2); color: #92400E; }
.alert-banner.error-b  { background: var(--red-t);   border: 1px solid rgba(239,68,68,0.2);  color: #991B1B; }
.alert-banner.success-b{ background: var(--green-t); border: 1px solid rgba(16,185,129,0.2); color: #065F46; }
.alert-banner.info-b   { background: var(--blue-t);  border: 1px solid rgba(59,125,255,0.2); color: #1E3A8A; }
.alert-icon  { font-size: 16px; flex-shrink: 0; }
.alert-close { margin-left: auto; background: none; border: none; cursor: pointer; opacity: 0.5; transition: var(--tr); font-size: 16px; }
.alert-close:hover { opacity: 1; }

/* ─── EMPTY STATE ─── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 24px;
  text-align: center;
  color: var(--text-3);
}
.empty-icon  { font-size: 48px; margin-bottom: 14px; opacity: 0.5; }
.empty-title { font-size: 15px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.empty-sub   { font-size: 13px; }

/* ─── LOCKER GRID ─── */
.locker-grid { display: grid; grid-template-columns: repeat(6,1fr); gap: 8px; }
.locker-cell {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--tr);
  position: relative;
}
.locker-cell:hover { transform: scale(1.06); }
.locker-cell .locker-id  {
  font-family: var(--font-mono);
  font-size: 10px;
  white-space: nowrap;
  overflow: visible;
  text-overflow: unset;
  max-width: none;
}
.locker-cell .locker-ico { font-size: 20px; }
.locker-cell.livre     { background: var(--green-t); border-color: rgba(16,185,129,0.2);  color: var(--green); }
.locker-cell.ocupado   { background: var(--amber-t); border-color: rgba(245,158,11,0.2);  color: var(--amber); }
.locker-cell.offline   { background: rgba(107,114,128,0.08); border-color: rgba(107,114,128,0.15); color: var(--gray); }
.locker-cell.manutencao{ background: var(--red-t);   border-color: rgba(239,68,68,0.2);   color: var(--red); }
.locker-occupied-dot {
  position: absolute; top: 6px; right: 6px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--amber); animation: pulse 2s infinite;
}

/* ─── FILTER BAR ─── */
.filter-bar { display: flex; gap: 8px; padding: 10px 14px; margin-bottom: 18px; flex-wrap: wrap; align-items: center; }
.filter-bar input, .filter-bar select {
  font-size: 11px;
  padding: 6px 10px;
  height: 32px;
}
.filter-input {
  padding: 6px 10px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--white);
  font-size: 11px; height: 32px; color: var(--text); outline: none; transition: var(--tr); min-width: 180px;
}
.filter-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-t); }
.filter-select {
  padding: 6px 10px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--white);
  font-size: 11px; height: 32px; color: var(--text); outline: none; cursor: pointer; transition: var(--tr);
}
.filter-select:focus { border-color: var(--gold); }
.filter-btn {
  padding: 6px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--border);
  background: var(--white); font-size: 11px; font-weight: 500; color: var(--text-2);
  height: 32px; transition: var(--tr); display: flex; align-items: center; gap: 7px;
}
.filter-btn:hover { border-color: var(--gold); color: var(--gold-d); background: var(--gold-t); }
.filter-btn.active { background: var(--gold-t); border-color: var(--gold); color: var(--gold-d); }

/* ─── GRID HELPERS ─── */
.two-col      { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.two-col-wide { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; }
.three-col    { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.form-row     { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ─── PROFILE PILL ─── */
.profile-pill {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 700;
  padding: 8px 18px; border-radius: 40px; animation: fadeUp .3s ease;
}
.profile-pill.admin    { background: rgba(59,125,255,0.1); border: 1.5px solid rgba(59,125,255,0.25); color: #1E4DA8; }
.profile-pill.portaria { background: var(--purple-t);      border: 1.5px solid rgba(139,92,246,0.25); color: #5B21B6; }
.profile-pill.morador  { background: var(--gold-t);        border: 1.5px solid var(--gold-t2);        color: var(--gold-d); }

/* ─── MODAL ─── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  z-index: 1000; display: none; align-items: center; justify-content: center;
  backdrop-filter: blur(4px); padding: 24px;
}
.modal-overlay.open { display: flex; animation: fadeIn .2s ease; }
.modal-box {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--sh-lg); width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto; animation: slideUp .25s cubic-bezier(.22,1,.36,1);
}
.modal-header { padding: 22px 24px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; justify-content: space-between; }
.modal-title  { font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.modal-close  { width: 30px; height: 30px; border-radius: var(--radius-sm); border: none; background: var(--bg); font-size: 16px; color: var(--text-2); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: var(--tr); flex-shrink: 0; margin-left: 12px; }
.modal-close:hover { background: var(--red-t); color: var(--red); }
.modal-body   { padding: 22px 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* ─── RESPONSIVE (base rules — extended at end of file) ─── */
@media (max-width:900px) {
  .kpi-grid { grid-template-columns: repeat(2,1fr); }
  .kpi-value { font-size: clamp(20px, 4vw, 28px); }
  .two-col, .two-col-wide, .three-col { grid-template-columns: 1fr; }
  .locker-grid { grid-template-columns: repeat(4,1fr); }
}

/* ─── UTILS ─── */
.text-gold    { color: var(--gold); }
.text-green   { color: var(--green); }
.text-red     { color: var(--red); }
.text-muted   { color: var(--text-3); }
.font-mono    { font-family: var(--font-mono); }
.font-display { font-family: var(--font-display); }
.fw-700       { font-weight: 700; }
.fs-12        { font-size: 12px; }
.fs-13        { font-size: 13px; }
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8        { gap: 8px; }
.gap-12       { gap: 12px; }
.mt-8         { margin-top: 8px; }
.mt-16        { margin-top: 16px; }
.mb-4         { margin-bottom: 16px; }
.mb-5         { margin-bottom: 20px; }
.mb-6         { margin-bottom: 24px; }
.mb-8         { margin-bottom: 32px; }
.w-full       { width: 100%; }

/* ─── MVC-SPECIFIC ADDITIONS ─── */
.page-header { margin-bottom: 24px; }
.page-title  { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--text); }
.page-subtitle { font-size: 13px; color: var(--text-3); margin-top: 4px; }

.section-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.25);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0 12px;
  margin: 20px 0 6px;
}

.badge-v2 {
  font-size: 9px;
  background: var(--purple-t);
  color: var(--purple);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: auto;
  font-family: var(--font);
}

/* Config grid */
.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px,1fr));
  gap: 16px;
}
.config-card {
  display: block;
  text-decoration: none;
  cursor: pointer;
  transition: var(--tr);
}
.config-card:hover .card {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: var(--sh-gold);
}
.config-card-icon { font-size: 28px; margin-bottom: 12px; }

/* Validation */
.validation-message    { color: var(--red); font-size: 12px; margin-top: 4px; display: block; }
.field-validation-error{ color: var(--red); font-size: 12px; }

/* File input */
input[type="file"] {
  display: block;
  width: 100%;
  padding: 10px 14px;
  background: var(--surface2);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-2);
  font-family: var(--font);
  font-size: 14px;
  cursor: pointer;
}
input[type="file"]:hover { border-color: var(--gold); }

/* Primary submit buttons */
.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--gold) 0%, #FF8C00 100%);
  color: var(--black);
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font);
  transition: var(--tr);
  box-shadow: 0 4px 16px rgba(245,166,35,0.25);
  cursor: pointer;
}
.btn-submit:hover { box-shadow: var(--sh-gold); transform: translateY(-1px); }

.btn-secondary-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  transition: var(--tr);
  cursor: pointer;
  text-decoration: none;
}
.btn-secondary-action:hover { border-color: var(--text-3); color: var(--text); text-decoration: none; }

.btn-danger-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--red-t);
  color: var(--red);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  transition: var(--tr);
  cursor: pointer;
}
.btn-danger-action:hover { background: var(--red); color: var(--white); }

/* HML env badge */
.hdr-env-badge {
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--gold-t);
  color: var(--gold-d);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border: 1px solid var(--gold-t2);
}

/* Login layout */
body.xb-login {
  display: flex;
  min-height: 100vh;
  background: var(--black);
}

/* ─── MORADOR SHELL ─── */
.morador-header {
  background: var(--black); padding: 0 24px;
  height: var(--hdr-h); display: flex; align-items: center;
  justify-content: space-between; position: sticky; top: 0; z-index: 50;
}
.morador-logo { display: flex; align-items: center; gap: 10px; }
.morador-logo-icon {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--gold) 0%, #FF8C00 100%);
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.morador-logo-text { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--white); }
.morador-logo-text span { color: var(--gold); }
.morador-user { display: flex; align-items: center; gap: 8px; }
.morador-user-name { font-size: 13px; color: rgba(255,255,255,0.7); }
.morador-exit {
  padding: 6px 12px; border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.15); background: transparent;
  color: rgba(255,255,255,0.5); font-size: 12px; transition: var(--tr); cursor: pointer;
}
.morador-exit:hover { border-color: var(--red); color: var(--red); }
.morador-content { flex: 1; padding: 28px 24px; max-width: 900px; margin: 0 auto; width: 100%; }
.morador-nav {
  display: flex; gap: 4px; margin-bottom: 24px;
  background: var(--white); padding: 4px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); width: fit-content;
}
.morador-nav-item {
  padding: 8px 20px; border-radius: 6px; font-size: 13px; font-weight: 500;
  color: var(--text-2); cursor: pointer; transition: var(--tr); border: none; background: none;
}
.morador-nav-item.active { background: var(--gold); color: var(--black); font-weight: 700; }

/* ─── PIN BOX ─── */
.pin-box {
  background: var(--black); border-radius: var(--radius-lg);
  padding: 28px; display: flex; flex-direction: column; gap: 12px;
  border: 1px solid var(--border-d);
}
.pin-label { font-size: 11px; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: 1px; }
.pin-value { font-family: var(--font-mono); font-size: 40px; font-weight: 500; color: var(--white); letter-spacing: 8px; }
.pin-value.hidden { filter: blur(8px); user-select: none; }
.pin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pin-btn {
  padding: 8px 14px; border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.7); font-size: 12px; font-weight: 500; transition: var(--tr);
  display: flex; align-items: center; gap: 6px; cursor: pointer;
}
.pin-btn:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-t); }

/* ─── STATUS STEPPER ─── */
.stepper { display: flex; align-items: flex-start; gap: 0; margin: 16px 0; }
.step-item { display: flex; flex-direction: column; align-items: center; flex: 1; position: relative; }
.step-item:not(:last-child)::after {
  content: ''; position: absolute; top: 14px; left: 50%; width: 100%; height: 2px;
  background: var(--border); z-index: 0;
}
.step-item.done:not(:last-child)::after { background: var(--gold); }
.step-dot {
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border);
  background: var(--white); display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--text-3); position: relative; z-index: 1;
  transition: var(--tr);
}
.step-item.done .step-dot { background: var(--gold); border-color: var(--gold); color: var(--black); }
.step-item.current .step-dot { background: var(--white); border-color: var(--gold); color: var(--gold); box-shadow: 0 0 0 4px var(--gold-t); }
.step-label { font-size: 10px; font-weight: 600; color: var(--text-3); text-transform: uppercase; margin-top: 8px; text-align: center; }
.step-item.done .step-label { color: var(--gold-d); }
.step-item.current .step-label { color: var(--gold); }

/* ─── DELIVERY CARD (MORADOR) ─── */
.delivery-card-morador {
  background: var(--white); border-radius: var(--radius-lg);
  border: 1px solid var(--border); overflow: hidden; box-shadow: var(--sh-sm);
}
.delivery-card-top {
  background: var(--black); padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.delivery-card-id { font-family: var(--font-mono); font-size: 12px; color: rgba(255,255,255,0.4); }
.delivery-card-locker { font-family: var(--font-display); font-size: 24px; font-weight: 800; color: var(--gold); }
.delivery-card-body { padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.delivery-info-row { display: flex; gap: 24px; }
.delivery-info-item { flex: 1; }
.delivery-info-label { font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.delivery-info-value { font-size: 14px; font-weight: 600; color: var(--text); }
.btn-retirar {
  width: 100%; padding: 14px; border-radius: var(--radius-sm); border: none;
  background: linear-gradient(135deg, var(--gold) 0%, #FF8C00 100%);
  color: var(--black); font-size: 14px; font-weight: 700;
  box-shadow: var(--sh-gold); transition: var(--tr); cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-retirar:hover { transform: translateY(-1px); box-shadow: 0 10px 36px rgba(245,166,35,0.35); }

/* ─── GUARDA-VOLUMES ─── */
.guarda-armario-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.guarda-armario {
  padding: 16px; border-radius: var(--radius); border: 2px solid var(--border);
  background: var(--white); cursor: pointer; transition: var(--tr); text-align: center;
}
.guarda-armario:hover { border-color: var(--gold); }
.guarda-armario.selected { border-color: var(--gold); background: var(--gold-t); }
.guarda-armario.ocupado { border-color: rgba(239,68,68,0.3); background: var(--red-t); cursor: not-allowed; }
.guarda-armario-num { font-family: var(--font-mono); font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.guarda-armario-status { font-size: 11px; font-weight: 600; }

/* ─── SETTINGS ─── */
.settings-section { margin-bottom: 28px; }
.settings-section-title {
  font-family: var(--font-display); font-size: 15px; font-weight: 700;
  margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.settings-row:last-child { border-bottom: none; }
.settings-row-info { }
.settings-row-label { font-size: 13px; font-weight: 600; color: var(--text); }
.settings-row-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.toggle {
  width: 44px; height: 24px; background: var(--border); border-radius: 40px;
  position: relative; cursor: pointer; transition: var(--tr); border: none; flex-shrink: 0;
}
.toggle.on { background: var(--gold); }
.toggle::after {
  content: ''; width: 18px; height: 18px; border-radius: 50%; background: white;
  position: absolute; top: 3px; left: 3px; transition: var(--tr);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle.on::after { left: 23px; }

/* ─── TRIGGER BUTTON ─── */
.btn-trigger {
  width: 100%; padding: 14px; border-radius: var(--radius-sm); border: none;
  background: linear-gradient(135deg, var(--gold) 0%, #FF8C00 100%);
  color: var(--black); font-size: 15px; font-weight: 700;
  margin-top: 8px; box-shadow: var(--sh-gold); transition: var(--tr); cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-trigger:hover { box-shadow: 0 10px 40px rgba(245,166,35,0.4); transform: translateY(-1px); }

/* ─── AUDIT LOG ─── */
.audit-row { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; gap: 12px; }
.audit-row:last-child { border-bottom: none; }
.audit-time { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); white-space: nowrap; margin-top: 2px; min-width: 60px; }
.audit-icon { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.audit-details { flex: 1; min-width: 0; }
.audit-action { font-size: 13px; font-weight: 600; color: var(--text); }
.audit-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.audit-user { font-size: 11px; color: var(--text-3); margin-top: 4px; font-family: var(--font-mono); }

/* ─── CHARTS ─── */
.chart-container    { position: relative; height: 200px; }
.chart-container-lg { position: relative; height: 280px; }

/* ─── MODAL EXTENDED ─── */
.modal-subtitle { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.btn-modal-cancel {
  padding: 10px 20px; border-radius: var(--radius-sm); border: 1.5px solid var(--border);
  background: var(--white); font-size: 13px; font-weight: 500; color: var(--text-2);
  transition: var(--tr); cursor: pointer;
}
.btn-modal-cancel:hover { border-color: var(--text-3); }
.btn-modal-primary {
  padding: 10px 20px; border-radius: var(--radius-sm); border: none;
  background: linear-gradient(135deg, var(--gold) 0%, #FF8C00 100%);
  color: var(--black); font-size: 13px; font-weight: 700; transition: var(--tr);
  box-shadow: 0 4px 16px rgba(245,166,35,0.3); cursor: pointer;
}
.btn-modal-primary:hover { box-shadow: var(--sh-gold); }
.btn-modal-danger {
  padding: 10px 20px; border-radius: var(--radius-sm); border: none;
  background: var(--red); color: white; font-size: 13px; font-weight: 700; cursor: pointer;
}

/* ─── TOAST ─── */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; }
.toast {
  display: flex; align-items: center; gap: 12px;
  background: var(--black); color: var(--white);
  padding: 14px 18px; border-radius: var(--radius); box-shadow: var(--sh-lg);
  min-width: 300px; max-width: 420px; animation: toastIn .3s ease;
  border-left: 4px solid var(--gold);
}
.toast.error   { border-color: var(--red); }
.toast.success { border-color: var(--green); }
.toast.info    { border-color: var(--blue); }
.toast-icon    { font-size: 18px; flex-shrink: 0; }
.toast-content { flex: 1; }
.toast-title   { font-size: 13px; font-weight: 700; }
.toast-text    { font-size: 12px; color: rgba(255,255,255,0.55); margin-top: 2px; }

/* ─── UTILS (extras) ─── */
.nowrap   { white-space: nowrap; }
.clickable { cursor: pointer; }
.fs-24    { font-size: 24px; }
.gap-8    { gap: 8px; }
.gap-12   { gap: 12px; }
.text-muted { color: var(--text-3); }

/* ─── RESPONSIVE (v5 full rules) ─── */
@media (max-width: 900px) {
  /* sidebar/main handled by block at top of file (has transition + xb-open) */
  .kpi-grid { grid-template-columns: repeat(2,1fr); }
  .two-col, .two-col-wide, .three-col { grid-template-columns: 1fr; }
  .locker-grid { grid-template-columns: repeat(4,1fr); }
}
@media (max-width: 768px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .locker-grid { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .kpi-value { font-size: 22px; }
  .locker-grid { grid-template-columns: repeat(2,1fr); }
  .form-row { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .guarda-armario-grid { grid-template-columns: repeat(2,1fr); }
  .admin-content { padding: 16px; }
  .table-wrap { overflow-x: scroll; }
  .hdr-btn, .hdr-btn-primary { padding: 6px 12px; font-size: 12px; }
}

/* ── Backdrop dos modais Bootstrap — 2026-08-06 ──────────────────────────────
   Os modais de Moradores (editar e excluir) usam Bootstrap, cujo backdrop é
   apenas um véu preto sem desfoque. O `.modal-overlay` acima já tinha blur, mas
   é outro componente e não se aplica a eles.

   `backdrop-filter` no próprio backdrop desfoca o que está ATRÁS dele. Como o
   backdrop do Bootstrap cobre a viewport inteira (position: fixed), o efeito
   alcança a página toda — inclusive a barra lateral, que é `position: fixed` e
   não seria coberta por um overlay preso a um container.

   O z-index NÃO é redefinido aqui: os modais são movidos para o <body> no
   carregamento (Views/Moradores/Index.cshtml), o que já os tira de qualquer
   ancestral com `overflow: hidden`. Mexer no z-index sem necessidade só criaria
   uma segunda fonte de verdade para a mesma coisa. */
.modal-backdrop.show {
    opacity: .55;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

/* Segurança de viewport: em telas estreitas (tablet em retrato) o diálogo do
   Bootstrap encosta nas bordas. A margem lateral garante que ele nunca fique
   cortado, e o corpo rola por dentro quando o formulário é mais alto que a tela. */
@media (max-width: 576px) {
    .modal-dialog { margin-left: 12px; margin-right: 12px; }
}
.modal-dialog-centered { max-height: calc(100vh - 32px); }
.modal-content { max-height: calc(100vh - 32px); }
.modal-body { overflow-y: auto; }

/* ╔══════════════════════════════════════════════════════════════════════════╗
   ║  PADRÃO VISUAL — 2026-08-06                                              ║
   ║                                                                          ║
   ║  Bloco único, no fim do arquivo que carrega POR ÚLTIMO. Todas as regras  ║
   ║  desta entrega ficam aqui, e não espalhadas por tela — era justamente o  ║
   ║  espalhamento que produzia telas com padrões diferentes.                 ║
   ║                                                                          ║
   ║  ⚠️ O QUE NÃO FOI TOCADO, DE PROPÓSITO: as cores. Existem DOIS blocos    ║
   ║  :root no projeto (exclusivelockers.css e este), e o segundo redefine    ║
   ║  --bg, --border, --green e --red com valores diferentes. Como este       ║
   ║  arquivo carrega depois, os valores daqui já vencem em todas as telas.   ║
   ║  Unificar exigiria revisar tela a tela e está fora do escopo de          ║
   ║  acabamento — ver o relatório da entrega.                                ║
   ╚══════════════════════════════════════════════════════════════════════════╝ */

:root {
    /* Escala de espaçamento — 4 / 8 / 12 / 16 / 24 / 32.
       Existe para que valores novos saiam daqui e não de palpite. */
    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-6: 24px;
    --sp-8: 32px;

}

/* ── BOTÕES DE PERIGO — variantes NOVAS, usadas só pelo modal de morador ─────
   `.xb-btn-danger` e `.xb-btn-danger-outline` não existiam no sistema. Só elas
   recebem estilo base aqui: `.xb-btn-action` e `.xb-btn-outline` continuam como
   estavam, para que nenhuma outra tela mude de aparência. */
.xb-btn-danger,
.xb-btn-danger-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    min-height: 38px;
    padding: 0 var(--sp-4);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
/* Alvo de toque de 44px em tablet, só nos controles do modal. */
@media (pointer: coarse) {
    .xb-btn-danger, .xb-btn-danger-outline, .xb-copiar, .xb-modal-fechar { min-height: 44px; }
}
.xb-btn-danger {
    background: var(--red); color: #fff; border: 1px solid var(--red);
}
.xb-btn-danger:hover { background: #DC2626; border-color: #DC2626; }
.xb-btn-danger-outline {
    background: transparent; color: var(--red); border: 1px solid rgba(239,68,68,.35);
}
.xb-btn-danger-outline:hover { background: rgba(239,68,68,.08); border-color: var(--red); }

/* Estado disabled dos botões do modal (proteção contra duplo clique). */
#modalMorador .xb-btn-action[disabled], #modalMorador .xb-btn-outline[disabled],
.xb-btn-danger[disabled], .xb-btn-danger-outline[disabled] {
    opacity: .55; cursor: not-allowed; pointer-events: none;
}

/* Foco visível — navegação por teclado no fluxo de moradores. */
#modalMorador .xb-btn-action:focus-visible, #modalMorador .xb-btn-outline:focus-visible,
.xb-btn-danger:focus-visible, .xb-btn-danger-outline:focus-visible,
.xb-copiar:focus-visible, .xb-row-click:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.xb-btn-bloco { width: 100%; margin-top: var(--sp-4); }

/* ── 1. LINHA CLICÁVEL ───────────────────────────────────────────────────────
   Hover discreto: só fundo e uma barra à esquerda. Nada que mude altura,
   largura ou posição — mexer em geometria no hover faz a tabela "pular". */
.xb-row-click { cursor: pointer; transition: background-color .15s ease; }
.xb-row-click:hover { background: var(--gold-t); }
.xb-row-click:hover td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
.xb-row-click:focus-visible { outline-offset: -2px; }

.xb-row-actions { display: flex; gap: var(--sp-2); }

/* ── 2. MODAL ───────────────────────────────────────────────────────────────
   Centralização vem de `.modal-dialog-centered` do Bootstrap, que já resolve
   o eixo vertical. O que faltava era limite de largura e rolagem interna. */
.xb-modal-md { max-width: 560px; width: calc(100% - var(--sp-8)); }
.xb-modal-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }

.xb-modal-erro {
    margin: 0 var(--sp-6) var(--sp-4);
    padding: var(--sp-3);
    border-radius: 8px;
    border-left: 3px solid var(--red);
    background: rgba(239,68,68,.08);
    color: #842029;
    font-size: 13px;
}

.xb-footer-acoes { display: flex; gap: var(--sp-2); width: 100%; justify-content: flex-end; }

/* ── 3. LISTA DE DADOS COM CÓPIA ─────────────────────────────────────────── */
.xb-dados { margin: 0; display: grid; gap: var(--sp-1); }
.xb-dado {
    display: grid;
    grid-template-columns: 150px 1fr auto;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-2) 0;
    border-bottom: 1px solid var(--border);
}
.xb-dado:last-child { border-bottom: none; }
.xb-dado dt { font-size: 12px; color: var(--text-3); font-weight: 500; margin: 0; }
.xb-dado dd { margin: 0; font-size: 14px; color: var(--text); display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.xb-dado dd > span[data-campo] { overflow-wrap: anywhere; }
.xb-dados-compacto .xb-dado { grid-template-columns: 120px 1fr; padding: var(--sp-1) 0; }
.xb-dados-compacto .xb-copiar { display: none; }

.xb-copiar {
    flex: 0 0 auto;
    width: 28px; height: 28px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--border); border-radius: 6px;
    background: transparent; color: var(--text-3);
    cursor: pointer; transition: background-color .15s ease, color .15s ease;
}
.xb-copiar:hover { background: var(--gold-t); color: var(--gold-d); }
.xb-copiar.xb-copiado { color: var(--green); border-color: var(--green); }

/* Feedback "Copiado": posicionado, sem empurrar layout. */
.xb-copiado-marca {
    display: none;
    position: absolute;
    transform: translate(-42px, -26px);
    background: var(--black);
    color: #fff;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
}
.xb-btn-bloco .xb-copiado-marca { transform: translate(-30px, -30px); }

.xb-confirm-lead { margin: 0 0 var(--sp-2); font-size: 14px; }
.xb-confirm-nota { margin: 0 0 var(--sp-4); font-size: 12px; color: var(--text-2); }

/* ── Formulário do modal ─────────────────────────────────────────────────── */
.xb-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.xb-form-grid .xb-col-2 { grid-column: 1 / -1; }

/* ── 7. RESPONSIVIDADE ────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .xb-dado { grid-template-columns: 1fr auto; }
    .xb-dado dt { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
    .xb-form-grid { grid-template-columns: 1fr; }
    .xb-footer-acoes { flex-wrap: wrap; }
    .xb-footer-acoes > * { flex: 1 1 auto; }
}

/* Respeita quem pediu menos movimento. */
@media (prefers-reduced-motion: reduce) {
    .xb-row-click, .xb-copiar, .xb-modal-fechar,
    .xb-btn-danger, .xb-btn-danger-outline {
        transition: none;
    }
}

/* ── MODAL DE MORADOR v2 — 2026-08-06 ────────────────────────────────────────
   Botão de fechar próprio. O `.btn-close` do Bootstrap é um SVG PRETO embutido
   como background-image: sobre o cabeçalho preto deste modal ele simplesmente
   desaparecia. Aqui o ícone é markup, herda `currentColor` e tem área de 40×40
   (mínimo de alvo de toque). */
.xb-modal-fechar {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #fff;                     /* contraste alto sobre o header escuro */
    opacity: .85;
    cursor: pointer;
    transition: background-color .15s ease, opacity .15s ease;
}
.xb-modal-fechar:hover { background: rgba(255,255,255,.14); opacity: 1; }
.xb-modal-fechar:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
    opacity: 1;
}

/* Campo editável com botão de copiar ao lado. O input encolhe para caber o
   botão; sem `min-width: 0` ele empurraria o botão para fora. */
.xb-campo { display: flex; align-items: center; gap: var(--sp-2); }
.xb-campo > input { flex: 1 1 auto; min-width: 0; }
.xb-campo > .xb-copiar { position: relative; }

/* Metadados somente leitura dentro do painel de edição. */
.xb-dados-meta {
    margin-top: var(--sp-4);
    padding-top: var(--sp-3);
    border-top: 1px solid var(--border);
}

/* Rodapé da edição: "Excluir" à esquerda, separado das ações de confirmação. */
.xb-footer-editar { justify-content: flex-start; }
.xb-footer-espaco { flex: 1 1 auto; }

@media (max-width: 640px) {
    .xb-footer-editar { flex-wrap: wrap; }
    .xb-footer-espaco { display: none; }
}

/* ── CASCA DO LAYOUT — 2026-08-07 ────────────────────────────────────────────
   Substitui o `style="display:flex;flex-direction:row;min-height:100vh;
   background:var(--bg)"` inline do _AppLayout.cshtml.

   As três linhas NOVAS são `flex`, `width` e `min-width`. O resto é o que já
   estava no inline.

   `flex: 1 1 auto` + `width: 100%`  → a casca ocupa a área disponível em vez de
                                       dimensionar pelo conteúdo, que fazia cada
                                       tela ter uma largura diferente.
   `min-width: 0`                    → impede que uma tabela larga empurre a
                                       casca além da viewport. O scroll continua
                                       pertencendo ao wrapper da tabela.

   ESCOPO: só esta regra. Nenhum container interno, nenhum token, nenhum grid,
   nenhuma tipografia e nenhuma cor foram tocados. */
.xb-app-shell {
    display: flex;
    flex-direction: row;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 100vh;
    background: var(--bg);
}

/* ╔══════════════════════════════════════════════════════════════════════════╗
   ║  RELATÓRIOS — INTELIGÊNCIA OPERACIONAL · 2026-08-07                      ║
   ║                                                                          ║
   ║  TODA regra abaixo é prefixada com `.xb-relatorios`. Nenhuma classe       ║
   ║  compartilhada é redefinida — as demais telas não são alcançadas.        ║
   ║  Remover a div `.xb-relatorios` da view desliga tudo de uma vez.         ║
   ╚══════════════════════════════════════════════════════════════════════════╝ */

/* ── Seções nomeadas: dão a hierarquia A → B → C → D ─────────────────────── */
.xb-relatorios .xb-secao { margin-bottom: 28px; }
.xb-relatorios .xb-secao-titulo {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

/* ── A. Card Pendentes: número, régua, idade ─────────────────────────────── */
.xb-relatorios .xb-kpi-detalhe {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    display: grid;
    gap: 5px;
}
.xb-relatorios .xb-kpi-linha {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: var(--text-2);
}
.xb-relatorios .xb-kpi-ponto {
    width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto;
}
.xb-relatorios .xb-kpi-ponto.amarelo  { background: var(--gold); }
.xb-relatorios .xb-kpi-ponto.vermelho { background: var(--red); }

/* ── A. Taxa de Retirada como indicador-síntese ──────────────────────────── */
.xb-relatorios .xb-kpi-sintese {
    border-color: rgba(16,185,129,.35);
    box-shadow: 0 0 0 1px rgba(16,185,129,.10) inset;
}
.xb-relatorios .xb-barra-proporcao {
    height: 6px;
    border-radius: 999px;
    background: rgba(16,185,129,.14);
    overflow: hidden;
    margin: 10px 0 8px;
}
.xb-relatorios .xb-barra-preenchida {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--green);
}

/* ── B. Gráfico largo + três mini indicadores independentes ──────────────── */
.xb-relatorios .xb-tendencia {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
    gap: 16px;
    align-items: stretch;
}
.xb-relatorios .xb-mini-coluna {
    display: grid;
    grid-template-rows: repeat(3, 1fr);
    gap: 16px;
    min-width: 0;
}
.xb-relatorios .xb-mini {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}
.xb-relatorios .xb-mini-label {
    font-size: 11px; font-weight: 700; letter-spacing: .05em;
    text-transform: uppercase; color: var(--text-3);
}
.xb-relatorios .xb-mini-valor {
    font-size: 22px; font-weight: 800; margin-top: 6px; line-height: 1.1;
    color: var(--text); overflow-wrap: anywhere;
}
.xb-relatorios .xb-mini-vazio {
    font-size: 14px; font-weight: 600; margin-top: 6px; color: var(--text-3);
}
.xb-relatorios .xb-mini-nota {
    font-size: 11px; color: var(--text-3); margin-top: 6px; line-height: 1.35;
}

/* ── C + D. Ranking com barra proporcional ───────────────────────────────── */
.xb-relatorios .xb-ranking {
    list-style: none; margin: 0; padding: 0; display: grid; gap: 2px;
}
.xb-relatorios .xb-rank-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(48px, 90px) auto;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}
.xb-relatorios .xb-rank-item:last-child { border-bottom: none; }
.xb-relatorios .xb-rank-pos {
    width: 20px; height: 20px; border-radius: 6px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--gold-t); color: var(--gold-d);
    font-size: 11px; font-weight: 800; flex: 0 0 auto;
}
.xb-relatorios .xb-rank-nome {
    color: var(--text-2); min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.xb-relatorios .xb-rank-nome.xb-rank-sem-vinculo { color: var(--text-3); }
.xb-relatorios .xb-rank-barra {
    height: 6px; border-radius: 999px; background: var(--border); overflow: hidden;
}
.xb-relatorios .xb-rank-preenchida {
    display: block; height: 100%; border-radius: 999px; background: var(--gold);
}
.xb-relatorios .xb-rank-valor {
    font-variant-numeric: tabular-nums; font-weight: 700; font-size: 12px;
    color: var(--text); min-width: 22px; text-align: right;
}

/* ── D. Camada de aprofundamento: peso visual menor ──────────────────────── */
.xb-relatorios .xb-detalhamento .xb-secao-titulo { color: var(--text-3); opacity: .85; }
.xb-relatorios .xb-card-secundario { background: var(--surface2, var(--surface)); }

/* ── Responsividade da seção de tendência ────────────────────────────────── */
@media (max-width: 1100px) {
    .xb-relatorios .xb-tendencia { grid-template-columns: 1fr; }
    .xb-relatorios .xb-mini-coluna { grid-template-rows: none; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .xb-relatorios .xb-mini-coluna { grid-template-columns: 1fr; }
    .xb-relatorios .xb-rank-item { grid-template-columns: auto minmax(0, 1fr) auto; }
    .xb-relatorios .xb-rank-barra { display: none; }
}

/* ── AUDITORIA — estado vazio honesto · 2026-08-07 ───────────────────────────
   Substitui as duas linhas FALSAS de log que a tela renderizava quando não havia
   dado (violação de CLAUDE.md §2.8). Ver `D-005`: não existe endpoint nem
   persistência de auditoria em nenhuma das 4 APIs.

   Classes próprias da tela, prefixadas `xb-auditoria`. As classes `audit-row`,
   `audit-time`, `audit-icon` e `audit-details` já existiam e NÃO foram tocadas —
   são usadas só aqui e continuam servindo ao laço de renderização. */
.xb-auditoria-vazio {
    min-height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 24px;
    text-align: center;
}
.xb-auditoria-vazio-icone { color: var(--text-3); opacity: .45; }
.xb-auditoria-vazio-titulo {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-2);
}
.xb-auditoria-vazio-nota {
    font-size: 13px;
    color: var(--text-3);
    max-width: 380px;
    line-height: 1.5;
}

/* Detalhe é texto livre do backend: quebra em vez de estourar a linha. */
.xb-auditoria-detalhe {
    overflow-wrap: anywhere;
    white-space: normal;
}

/* ── CONFIGURAÇÕES — consolidação · 2026-08-07 ───────────────────────────────
   Regras próprias da tela, prefixadas `.xb-config`. As classes `config-grid`,
   `config-card` e `config-card-icon` já existiam e NÃO foram tocadas.

   ⚠️ `settings-row`, `settings-section` e `.toggle` também NÃO foram tocadas:
   apesar de terem saído desta view, `Views/GuardaVolumes/Admin.cshtml` ainda as
   usa. Remover as regras quebraria aquela tela. */
.xb-config-secao { margin-bottom: 32px; }
.xb-config-secao-titulo {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 4px;
}
.xb-config-secao-nota {
    font-size: 13px;
    color: var(--text-3);
    margin-bottom: 14px;
}

/* Agregações: visível e declarado como indisponível, não escondido e não
   clicável — a consulta falha de forma determinística (404). */
.xb-config-indisponivel { cursor: default; }
.xb-config-indisponivel .card {
    opacity: .62;
    border-style: dashed;
}
.xb-config-indisponivel:hover .card { transform: none; box-shadow: none; }
.xb-config-tag {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--text-3);
    background: rgba(107,114,128,.14);
    vertical-align: middle;
}

.xb-config-info { font-size: 13px; color: var(--text-2); line-height: 1.6; }
.xb-config-info p { margin: 0 0 10px; }
.xb-config-info p:last-child { margin-bottom: 0; }

/* ══════════════════════════════════════════════════════════════════════════
   RODADA 2 — LEITURA POR PORTA (Dashboard + Lockers)
   ──────────────────────────────────────────────────────────────────────────
   Hierarquia CONDOMÍNIO → ARMÁRIO → PORTA → OCUPAÇÃO → MORADOR.

   TODO o bloco abaixo usa prefixos próprios (xb-porta*, xb-armario*, xb-sit*,
   xb-mor*). NENHUMA regra redefine classe compartilhada — card, kpi-*, badge,
   locker-cell, table e empty-state continuam exatamente como o cliente aprovou
   em 2026-08-07. As duas exceções são ADITIVAS e estão marcadas ao final.

   Tokens: só os que já existem no topo deste arquivo. Nenhuma cor nova.
   ══════════════════════════════════════════════════════════════════════════ */

/* ─── Faixa de KPIs de porta ─── */
.xb-portas-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 10px; flex-wrap: wrap;
}
.xb-portas-title { font-size: 14px; font-weight: 700; color: var(--text); }
.xb-portas-sub   { font-size: 12px; color: var(--text-3); margin-top: 2px; }

.xb-porta-escopo { font-size: 13px; color: var(--text); margin-bottom: 10px; }

/* minmax(0,1fr) impede que o conteudo estoure a coluna e gere scroll
   horizontal — e a lacuna medida em .two-col, registrada no HANDOFF §10. */
.xb-portas-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 1200px) { .xb-portas-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px)  { .xb-portas-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.xb-porta-kpi {
  background: var(--bg-card, #fff);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  min-width: 0;
}
.xb-porta-kpi.livre        { border-left-color: var(--green); }
.xb-porta-kpi.ocupada      { border-left-color: var(--amber); }
.xb-porta-kpi.indisponivel { opacity: .72; }

.xb-porta-kpi-label {
  font-size: 11px; font-weight: 700; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.xb-porta-kpi-valor {
  font-size: 26px; font-weight: 800; line-height: 1.15; margin-top: 4px;
  color: var(--text);
}
.xb-porta-kpi.livre   .xb-porta-kpi-valor { color: var(--green); }
.xb-porta-kpi.ocupada .xb-porta-kpi-valor { color: var(--amber); }
/* Traco declarado: e ausencia de sinal, nao a medicao zero (R6). */
.xb-porta-kpi-valor.sem-sinal { color: var(--text-3); font-size: 22px; }
.xb-porta-kpi-nota { font-size: 11px; color: var(--text-3); margin-top: 2px; line-height: 1.4; }

.xb-portas-erro {
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
  border-radius: 10px;
  padding: 12px 14px; font-size: 13px;
  background: var(--bg-card, #fff);
}
.xb-portas-erro span { display: block; margin-top: 2px; font-size: 12px; }

.xb-portas-aviso {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline;
  padding: 8px 12px; border-radius: 8px;
  background: var(--amber-t); border: 1px solid rgba(245,158,11,.28);
  font-size: 12px; color: var(--text-secondary);
}

/* ─── Cards de armario ─── */
.xb-armario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.xb-armario-card {
  text-align: left; font: inherit; cursor: pointer;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 14px; min-width: 0;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.xb-armario-card:hover { border-color: var(--brand); transform: translateY(-1px); }
.xb-armario-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.xb-armario-card.selecionado {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--amber-t);
}
.xb-armario-nome {
  font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.xb-armario-linhas { display: flex; flex-direction: column; gap: 3px; }
.xb-armario-linhas > div {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 12px; color: var(--text-secondary);
}
.xb-armario-linhas > div > strong { font-weight: 700; color: var(--text); }
.xb-armario-linhas > div.ocupada > strong { color: var(--amber); }
.xb-armario-linhas > div.livre   > strong { color: var(--green); }
.xb-armario-aviso { margin-top: 8px; font-size: 11px; color: var(--amber); }

/* ─── Grade de portas ─── */
.xb-portas-painel { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 14px; }
.xb-portas-de-titulo { font-size: 13px; color: var(--text-secondary); margin-bottom: 10px; }

.xb-porta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
}
.xb-porta-cell {
  position: relative; text-align: center; font: inherit;
  border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 8px; min-width: 0;
  background: var(--bg2);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.xb-porta-cell.clicavel { cursor: pointer; }
.xb-porta-cell.clicavel:hover { transform: translateY(-1px); border-color: var(--brand); }
.xb-porta-cell.clicavel:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.xb-porta-cell.selecionada { border-color: var(--brand); box-shadow: 0 0 0 2px var(--amber-t); }
.xb-porta-cell.livre   { background: var(--green-t); border-color: rgba(16,185,129,0.22); }
.xb-porta-cell.ocupado { background: var(--amber-t); border-color: rgba(245,158,11,0.22); }
.xb-porta-id  { font-family: var(--mono); font-size: 16px; font-weight: 700; color: var(--text); }
.xb-porta-tam { font-size: 10px; color: var(--text-3); margin-top: 2px; line-height: 1.3;
                white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xb-porta-sit { font-size: 11px; font-weight: 600; margin-top: 4px; }
.xb-porta-cell.livre   .xb-porta-sit { color: var(--green); }
.xb-porta-cell.ocupado .xb-porta-sit { color: var(--amber); }

/* ─── Detalhe da porta ─── */
.xb-porta-detalhe {
  margin-top: 16px; border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 16px; background: var(--bg2);
}
.xb-porta-detalhe-topo {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 12px;
}
.xb-porta-detalhe-label {
  font-size: 11px; font-weight: 700; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .5px;
}
.xb-porta-detalhe-titulo { font-size: 15px; font-weight: 700; color: var(--text); }
.xb-porta-detalhe-sub {
  font-size: 11px; font-weight: 700; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .5px;
  margin: 14px 0 8px; padding-top: 12px; border-top: 1px solid var(--border);
}
.xb-porta-detalhe-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 16px;
}
.xb-porta-detalhe-grid > div { min-width: 0; }
.xb-porta-detalhe-grid span   { display: block; font-size: 11px; color: var(--text-3); }
.xb-porta-detalhe-grid strong { display: block; font-size: 13px; color: var(--text); word-break: break-word; }
/* Valor presente mas fora do mapa conhecido: exibido cru e marcado. */
.xb-porta-detalhe-grid strong.nao-reconhecido {
  color: var(--red); border-bottom: 1px dashed rgba(239,68,68,.45);
}
.xb-porta-detalhe-nota { margin-top: 10px; font-size: 12px; color: var(--text-secondary); }

/* ─── Portas por situacao (substituiu o donut) ─── */
.xb-sit-lista { display: flex; flex-direction: column; gap: 10px; }
.xb-sit-linha { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.xb-sit-linha.indisponivel { opacity: .6; }
.xb-sit-swatch { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.xb-sit-swatch.livre      { background: var(--green); }
.xb-sit-swatch.ocupada    { background: var(--amber); }
.xb-sit-swatch.offline    { background: var(--gray); }
.xb-sit-swatch.manutencao { background: var(--red); }
.xb-sit-nome  { flex: 1; color: var(--text-secondary); min-width: 0; }
.xb-sit-valor { font-weight: 700; color: var(--text); }
.xb-sit-nota  { font-size: 11px; font-style: italic; color: var(--text-3); }
.xb-sit-total {
  display: flex; align-items: center; gap: 10px; font-size: 13px;
  border-top: 1px solid var(--border); padding-top: 10px; margin-top: 2px;
}

/* ─── Consulta de moradores (rodape de Lockers) ─── */
.xb-mor-filtros { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.xb-mor-filtros > input { height: 34px; font-size: 12px; }
.xb-mor-filtros > input[type="text"]:first-child { flex: 1 1 220px; min-width: 0; }
.xb-mor-tabela { width: 100%; }
.xb-mor-tabela th, .xb-mor-tabela td { font-size: 12px; white-space: nowrap; }

/* ─── ADITIVAS a classes compartilhadas (nao redefinem nada existente) ─── */
/* 1. celula do mapa de armarios vira seletor na Dashboard */
.locker-cell[data-armario] { cursor: pointer; }
.locker-cell.selecionado   { box-shadow: 0 0 0 2px var(--amber-t); border-color: var(--brand); }
/* 2. coluna de telefone do morador em Movimentacoes — segue a mesma regra de
      ocultar em tela estreita que as demais col-* ja tinham */
@media (max-width: 1024px) { .col-telefone { display: none !important; } }

/* ══════════════════════════════════════════════════════════════════════════
   RODADA 3 — FARÓIS CLICÁVEIS · DASHBOARD ARMÁRIOS | PORTAS · LOTADO
   ──────────────────────────────────────────────────────────────────────────
   Feedback do cliente de 2026-08-10. Nada aqui é redesign: a identidade, os
   tokens, o card, o badge e a grade de portas continuam os de 2026-08-07.
   O que muda é ESTRUTURA e INTERAÇÃO.

   Continua valendo a regra do bloco da rodada 2: prefixos próprios (xb-farol*,
   xb-dash-split, xb-armario-lotado, xb-tam*), zero redefinição de classe
   compartilhada, zero cor nova.
   ══════════════════════════════════════════════════════════════════════════ */

/* ─── Faróis: o KPI virou controle ───
   Mesmo cartão da rodada 2 (.xb-porta-kpi), agora <button>. O estado ativo NÃO
   é só cor: o cartão ganha anel, fundo dourado E a linha "· filtrando" — cor
   sozinha não pode ser o único indicador de estado. */
.xb-farois {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 1200px) { .xb-farois { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px)  { .xb-farois { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.xb-farol {
  text-align: left; font: inherit; cursor: pointer;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px; min-width: 0;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.xb-farol:hover:not(:disabled) { border-color: var(--brand); }
.xb-farol:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.xb-farol.livre   { border-left-color: var(--green); }
.xb-farol.ocupado { border-left-color: var(--amber); }
.xb-farol.ativo {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--gold-t2);
  background: var(--gold-t);
}
/* Sem sinal no modelo: o farol existe porque o cliente pede os cinco estados,
   mas nao ha o que filtrar. Desabilitado e declarado — nunca "0" clicavel. */
.xb-farol:disabled { cursor: not-allowed; opacity: .62; }

.xb-farol-label {
  font-size: 11px; font-weight: 700; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.xb-farol-valor { font-size: 26px; font-weight: 800; line-height: 1.15; margin-top: 4px; color: var(--text); }
.xb-farol.livre   .xb-farol-valor { color: var(--green); }
.xb-farol.ocupado .xb-farol-valor { color: var(--amber); }
.xb-farol-valor.sem-sinal { color: var(--text-3); font-size: 22px; }
.xb-farol-nota { font-size: 11px; color: var(--text-3); margin-top: 2px; line-height: 1.4; }
/* Rotulo textual do estado ativo — acessibilidade: cor nao e o unico indicador. */
.xb-farol-ativo-tag { display: none; font-size: 11px; font-weight: 700; color: var(--gold-d); margin-top: 4px; }
.xb-farol.ativo .xb-farol-ativo-tag { display: block; }

/* ─── Dashboard: ARMÁRIOS | PORTAS ───
   Substitui a pilha "armarios em cima, mapa de armarios embaixo". Em telas
   estreitas as colunas empilham: ARMARIOS -> PORTAS -> DETALHE. */
.xb-dash-split {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
  gap: 18px; align-items: start;
}
@media (max-width: 1024px) { .xb-dash-split { grid-template-columns: minmax(0, 1fr); } }

/* Coluna de armarios: lista vertical. A camada de armarios e ESTAVEL — nenhum
   farol a esvazia; ver .xb-armario-card.fora-do-farol. */
.xb-armario-lista {
  display: flex; flex-direction: column; gap: 10px;
  max-height: 520px; overflow-y: auto; padding-right: 2px;
}
.xb-armario-lista .xb-armario-card { width: 100%; }

/* Armario sem nenhuma porta no estado do farol ativo. Continua VISIVEL e
   clicavel — apenas recuado, com a razao escrita. Some-lo esconderia do
   operador que o armario existe. */
.xb-armario-card.fora-do-farol { opacity: .55; }
.xb-armario-card .xb-armario-farol-nota {
  display: none; margin-top: 6px; font-size: 11px; color: var(--text-3);
}
.xb-armario-card.fora-do-farol .xb-armario-farol-nota { display: block; }

/* LOTADO — unica sinalizacao de capacidade. Sem percentual, por decisao do
   cliente: 80%/60%/42% nao aparecem em lugar nenhum. */
.xb-armario-topo {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 8px;
}
.xb-armario-topo .xb-armario-nome { margin-bottom: 0; min-width: 0; }
.xb-armario-lotado {
  flex-shrink: 0;
  font-size: 10px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase;
  color: var(--red); background: var(--red-t);
  border: 1px solid rgba(239,68,68,.28); border-radius: 20px;
  padding: 2px 8px; white-space: nowrap;
}

/* Coluna de portas */
.xb-portas-scroll { max-height: 520px; overflow-y: auto; padding-right: 2px; }
.xb-porta-grupo + .xb-porta-grupo { margin-top: 16px; }
.xb-porta-grupo-titulo {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12px; font-weight: 700; color: var(--text-secondary);
  margin-bottom: 8px;
}
.xb-porta-grupo-titulo .xb-text-muted { font-weight: 400; }

/* Barra de filtros (status + tamanho) do card de portas */
.xb-filtro-bar {
  display: flex; gap: 10px 16px; flex-wrap: wrap;
  align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.xb-filtro-grupo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.xb-filtro-rotulo {
  font-size: 11px; font-weight: 700; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .5px;
}
/* Legenda dos tamanhos: P/M/G/XG so podem aparecer abreviados se a tela disser
   a que dado real correspondem. */
.xb-tam-legenda { font-size: 11px; color: var(--text-3); margin-top: 8px; line-height: 1.5; }
.xb-tam-legenda strong { color: var(--text-secondary); font-weight: 700; }

/* Estado vazio de filtro: o operador precisa saber que o filtro escondeu, e
   nao que o armario esta vazio. */
.xb-filtro-vazio {
  padding: 18px 14px; border: 1px dashed var(--border); border-radius: 10px;
  font-size: 13px; color: var(--text-secondary); text-align: center;
}

/* ─── Acao indisponivel por falta de backend (SMS) ───
   Controle VISIVEL e explicitamente indisponivel, com o motivo em linguagem de
   usuario. Nao simula sucesso e nao promete acao que nao existe. */
.xb-btn-indisponivel {
  font: inherit; font-size: 11px; font-weight: 600;
  padding: 5px 10px; border-radius: 6px;
  border: 1px dashed var(--border); background: transparent;
  color: var(--text-3); cursor: not-allowed; white-space: nowrap;
}
.xb-nota-rodape {
  font-size: 11px; color: var(--text-3); padding: 10px 20px 14px; line-height: 1.5;
}

/* Barra de contexto: mostra o que esta selecionado e como limpar. */
.xb-contexto-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 12px; font-size: 12px; color: var(--text-secondary);
}
.xb-contexto-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--gold-t); border: 1px solid var(--gold-t2);
  color: var(--text); border-radius: 20px; padding: 3px 10px;
  font-size: 12px; font-weight: 600;
}
.xb-contexto-chip button {
  font: inherit; line-height: 1; border: 0; background: transparent;
  color: var(--text-3); cursor: pointer; padding: 0 0 0 2px; font-size: 14px;
}
.xb-contexto-chip button:hover { color: var(--red); }
.xb-contexto-chip button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .xb-farol, .xb-armario-card, .xb-porta-cell { transition: none; }
}

/* ══════════════════════════════════════════════════════════════════════════
   RODADA 4 — "Reenviar SMS" restaurado no modal de Movimentações
   ──────────────────────────────────────────────────────────────────────────
   O botão volta como sempre foi: visível na movimentação PENDENTE e `disabled`,
   porque nenhuma das 4 APIs expõe rota de envio.

   Esta é a ÚNICA regra nova. Existe porque `.xb-btn-action[disabled]` só tinha
   estilo dentro de `#modalMorador`: em `#modalSenha` o botão desabilitado
   renderizava dourado e cheio, com aparência de ativo. Um controle que parece
   clicável e não faz nada é pior que o controle ausente — e era assim antes.
   Mesmo padrão e mesmos valores da regra que já existia para o outro modal.
   ══════════════════════════════════════════════════════════════════════════ */
#modalSenha .xb-btn-action[disabled] {
  opacity: .55; cursor: not-allowed; pointer-events: none;
}
