/* =====================================================================
   WJ Memorial — layout
   ===================================================================== */
:root {
  --primary: #1E4D5C;
  --primary-600: #173E4A;
  --primary-50: #E8F0F2;
  --sidebar: #0F2E38;
  --sidebar-2: #163C48;
  --sidebar-text: #B9CBD1;
  --sidebar-muted: #6F8E97;
  --gold: #B8934A;
  --gold-50: #F7F0E3;
  --gold-700: #8A6A2C;

  --bg: #F3F4F6;
  --surface: #FFFFFF;
  --border: #E5E7EB;
  --border-strong: #D1D5DB;
  --text: #1F2937;
  --text-2: #4B5563;
  --muted: #9CA3AF;

  --success: #15803D; --success-bg: #DCFCE7;
  --warning: #A16207; --warning-bg: #FEF3C7;
  --danger:  #B91C1C; --danger-bg:  #FEE2E2;
  --info:    #1D4ED8; --info-bg:    #DBEAFE;
  --neutral: #4B5563; --neutral-bg: #F3F4F6;

  --radius: 10px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --sidebar-w: 240px;
  --topbar-h: 60px;
  --bottom-h: 64px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 600; }
.ti { line-height: 1; }

/* ---------- estrutura ---------- */
.app { min-height: 100vh; }
.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.content { padding: 24px; max-width: 1200px; width: 100%; margin: 0 auto; flex: 1; }

/* ---------- sidebar ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
  background: var(--sidebar); color: var(--sidebar-text);
  display: flex; flex-direction: column; z-index: 40; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px 14px; }
.brand-logo {
  width: 38px; height: 38px; border-radius: 9px; flex: none;
  background: var(--gold); color: var(--sidebar);
  display: grid; place-items: center; font-weight: 700; font-size: 14px; letter-spacing: .5px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-text strong { color: #fff; font-size: 15px; }
.brand-text small { color: var(--sidebar-muted); font-size: 12px; }
.sidebar-close { display: none; margin-left: auto; color: var(--sidebar-text); }
.user-badge {
  margin: 4px 14px 10px; padding: 10px 12px; border-radius: 8px;
  background: rgba(184, 147, 74, .14); color: #E3C68C;
  display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 1.35;
}
.user-badge .ti { font-size: 16px; margin-top: 1px; }
.nav { padding: 4px 10px 20px; display: flex; flex-direction: column; gap: 2px; }
.nav-section {
  font-size: 11px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase;
  color: var(--sidebar-muted); padding: 16px 10px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 8px;
  color: var(--sidebar-text); font-weight: 500;
}
.nav-item .ti { font-size: 19px; color: var(--gold); }
.nav-item:hover { background: var(--sidebar-2); text-decoration: none; color: #fff; }
.nav-item.active { background: var(--primary); color: #fff; }
.nav-item.active .ti { color: #fff; }
.sidebar-backdrop { display: none; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar-h);
  background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px; padding: 0 24px;
}
.page-title { font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.topbar-date { color: var(--text-2); font-size: 13px; white-space: nowrap; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 8px; border: 0; background: transparent;
  display: inline-grid; place-items: center; cursor: pointer; color: var(--text-2); font-size: 21px; flex: none;
}
.icon-btn:hover { background: var(--bg); text-decoration: none; }
.icon-btn.menu-btn, .icon-btn.back-btn, .icon-btn.sidebar-close { display: none; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--primary-50); color: var(--primary); font-weight: 600; font-size: 13px;
}

/* dropdown */
.dropdown { position: relative; }
.dropdown-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(16, 24, 40, .12); padding: 6px; z-index: 50;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; display: flex; flex-direction: column; }
.dropdown-head small { color: var(--muted); }
.dropdown-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 6px; color: var(--text); }
.dropdown-menu a:hover { background: var(--bg); text-decoration: none; }
.dropdown-menu .ti { font-size: 18px; color: var(--text-2); }

/* ---------- bottom nav (mobile) ---------- */
.bottom-nav { display: none; }

/* ---------- alerts ---------- */
.alert {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm);
  margin-bottom: 16px; font-size: 14px; border: 1px solid transparent; transition: opacity .3s;
}
.alert .ti { font-size: 19px; flex: none; }
.alert-success { background: var(--success-bg); color: var(--success); border-color: #BBF7D0; }
.alert-warning { background: var(--warning-bg); color: var(--warning); border-color: #FDE68A; }
.alert-danger  { background: var(--danger-bg);  color: var(--danger);  border-color: #FECACA; }
.alert-info    { background: var(--info-bg);    color: var(--info);    border-color: #BFDBFE; }

/* ---------- cards de indicadores ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  border-top: 3px solid var(--gold); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px;
  color: inherit;
}
a.stat:hover { text-decoration: none; box-shadow: 0 4px 14px rgba(16, 24, 40, .1); }
.stat-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.stat-label { font-size: 13px; color: var(--text-2); }
.stat-icon { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; font-size: 18px; flex: none; }
.stat-value { font-size: 26px; font-weight: 700; line-height: 1.15; }
.stat-value small { font-size: 13px; font-weight: 500; color: var(--muted); }

.tone-primary { background: var(--primary-50); color: var(--primary); }
.tone-gold    { background: var(--gold-50);    color: var(--gold-700); }
.tone-success { background: var(--success-bg); color: var(--success); }
.tone-warning { background: var(--warning-bg); color: var(--warning); }
.tone-danger  { background: var(--danger-bg);  color: var(--danger); }
.tone-info    { background: var(--info-bg);    color: var(--info); }
.text-success { color: var(--success); } .text-warning { color: var(--warning); }
.text-danger  { color: var(--danger); }  .text-muted   { color: var(--muted); }
.text-2 { color: var(--text-2); }

/* ---------- badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 500; white-space: nowrap;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger); }
.badge-neutral { background: var(--neutral-bg); color: var(--neutral); }
.badge-info    { background: var(--info-bg);    color: var(--info); }
.badge-gold    { background: var(--gold-50);    color: var(--gold-700); }

/* ---------- painéis ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; }
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 16px 18px; border-bottom: 1px solid var(--border);
}
.panel-head h2 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.panel-head h2 .ti { color: var(--gold); font-size: 19px; }
.panel-link { font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.panel-body { padding: 18px; }
.panel-body.flush { padding: 0; }

.list-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 18px; border-bottom: 1px solid var(--border); color: inherit;
}
.list-row:last-child { border-bottom: 0; }
a.list-row:hover { background: #FAFAFB; text-decoration: none; }
.list-row .main-line { font-weight: 500; }
.list-row .sub-line { font-size: 12.5px; color: var(--text-2); }

.empty { text-align: center; padding: 32px 18px; color: var(--text-2); }
.empty .ti { font-size: 36px; color: var(--border-strong); display: block; margin: 0 auto 8px; }
.empty p { margin: 0 0 14px; }

/* ---------- salas ---------- */
[hidden] { display: none !important; }
.sala-num {
  width: 38px; height: 38px; border-radius: 10px; flex: none; display: grid; place-items: center;
  background: var(--sidebar); color: var(--gold); font-weight: 700; font-size: 15px;
}
.salas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; padding: 16px 18px 18px; }
.sala-card {
  display: block; border: 1px solid var(--border); border-left: 4px solid var(--success); border-radius: 10px;
  padding: 12px 14px; color: inherit; background: #fff;
}
a.sala-card:hover { text-decoration: none; box-shadow: var(--shadow); }
.sala-card.sala-ocupada { border-left-color: var(--danger); background: #FFFBFB; }
.sala-card.sala-reservada { border-left-color: #D97706; background: #FFFDF6; }
.sala-card-top { display: flex; align-items: center; gap: 10px; }
.sala-card-nome { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.sala-card-nome strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sala-card-nome small { color: var(--text-2); font-size: 12px; }
.sala-card-info { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.sala-card-info .main-line { font-weight: 600; font-size: 13.5px; }
.sala-card-info .sub-line { font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 5px; }
.sala-ocupada .sala-card-info .sub-line { color: var(--danger); }

/* ---------- financeiro ---------- */
.align-start { align-items: start; }
.fin-resumo { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.fin-resumo > div { background: #F8FAFB; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; min-width: 0; }
.fin-resumo span { font-size: 12px; color: var(--text-2); }
.fin-resumo strong { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.money-input { position: relative; display: block; }
.money-input > span { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; pointer-events: none; }
.money-input input { padding-left: 34px; text-align: right; font-variant-numeric: tabular-nums; }

.fin-sub { font-variant-numeric: tabular-nums; color: var(--primary); }
.fin-item {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) 150px; align-items: center; gap: 10px;
  padding: 8px 18px; border-bottom: 1px solid var(--border); cursor: pointer; margin: 0;
}
.fin-item:hover { background: #FAFAFB; }
.fin-item.on { background: #F5F9FA; }
.fin-item input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--primary); margin: 0; }
.fin-item-nome { font-weight: 500; display: flex; flex-direction: column; line-height: 1.3; }
.fin-item-nome small { font-weight: 400; color: var(--text-2); font-size: 12px; }
.fin-item:not(.on) .fin-item-nome { color: var(--text-2); font-weight: 400; }
.fin-item .money-input input { height: 38px; }
.fin-outro { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 10px; padding: 8px 18px; border-bottom: 1px solid var(--border); }
.fin-outro input { height: 38px; }
.fin-totais { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.fin-totais .field { width: 220px; }
.fin-botoes { display: flex; gap: 10px; }
.fin-total { display: flex; flex-direction: column; align-items: flex-end; }
.fin-total span { font-size: 13px; color: var(--text-2); }
.fin-total strong { font-size: 26px; color: var(--primary); font-variant-numeric: tabular-nums; }

details.fin-cond > summary { list-style: none; cursor: pointer; }
details.fin-cond > summary::-webkit-details-marker { display: none; }
details.fin-cond > summary .ti-chevron-down { transition: transform .2s; color: var(--text-2); font-size: 20px; }
details.fin-cond[open] > summary .ti-chevron-down { transform: rotate(180deg); }
details.fin-cond:not([open]) > summary { border-bottom: 0; }
.fin-preview { background: #F8FAFB; border: 1px dashed var(--border-strong); border-radius: 10px; padding: 12px 14px; font-size: 13.5px; color: var(--text-2); }
.fin-preview strong { color: var(--text); }
.fin-preview ol { margin: 8px 0 0; padding-left: 20px; columns: 2; column-gap: 24px; }
.fin-preview li { font-variant-numeric: tabular-nums; }
.check { display: flex !important; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); margin: 0; }

.parcela-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; }
.parcela-info { min-width: 0; }
.parcela-valor { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-variant-numeric: tabular-nums; }
.parcela-acoes { display: flex; gap: 6px; align-items: center; justify-content: flex-end; min-width: 150px; }
.venc-edit { position: relative; }
.venc-edit > summary { list-style: none; cursor: pointer; }
.venc-edit > summary::-webkit-details-marker { display: none; }
.venc-pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 220px; background: #fff; border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 10px 30px rgba(16, 24, 40, .14); padding: 12px; display: flex; flex-direction: column; gap: 8px;
}
.estornado { opacity: .6; }
.estornado .main-line { text-decoration: line-through; }

.item-preco-row { gap: 12px; padding-top: 8px; padding-bottom: 8px; }
.item-preco-nome { display: flex; flex-direction: column; min-width: 0; color: inherit; flex: 1; }
.item-preco-nome:hover { text-decoration: none; }
.item-preco-nome:hover .main-line { color: var(--primary); }
.item-preco-row .money-input { width: 140px; flex: none; }
.item-preco-row .money-input input { height: 38px; }
.item-preco-row.inativo .main-line { color: var(--muted); }

/* ---------- financeiro bloqueado ---------- */
.trava-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; margin-bottom: 16px; border-radius: var(--radius); background: #EEF4F6; border: 1px solid #C9DCE1;
}
.trava-bar.liberado { background: var(--warning-bg); border-color: #FDE68A; }
.trava-txt { display: flex; align-items: center; gap: 12px; min-width: 0; }
.trava-txt > .ti { font-size: 24px; color: var(--primary); }
.trava-bar.liberado .trava-txt > .ti { color: var(--warning); }
.trava-txt div { display: flex; flex-direction: column; line-height: 1.35; }
.trava-txt span { font-size: 13px; color: var(--text-2); }
.travado .fin-item { cursor: default; }
.travado .fin-item input[type=checkbox] { pointer-events: none; opacity: .75; }
.travado [data-trava] { background: #F6F7F8; color: var(--text-2); border-color: var(--border); }
.travado .fin-item:hover { background: transparent; }
.travado .fin-item.on { background: #F8FAFB; }
.travado .so-liberado { display: none !important; }
.travado .fin-item:not(.on) { opacity: .5; }
.travado [data-trava]::placeholder { color: transparent; }
.travado textarea[data-trava] { background: #F6F7F8; color: var(--text-2); cursor: default; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal[hidden] { display: none !important; }
.modal-fundo { position: absolute; inset: 0; background: rgba(15, 23, 42, .55); backdrop-filter: blur(2px); }
.modal-card {
  position: relative; width: 100%; max-width: 420px; background: #fff; border-radius: 16px; padding: 26px 24px 20px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .3); animation: modal-in .18s ease-out;
}
.modal-card h2 { font-size: 18px; margin-bottom: 4px; }
.modal-card > p { margin: 0 0 16px; font-size: 14px; }
.modal-icone { width: 48px; height: 48px; border-radius: 14px; background: var(--sidebar); color: var(--gold); display: grid; place-items: center; font-size: 24px; margin-bottom: 14px; }
.modal-botoes { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.modal-card .pass-wrap input { height: 46px; }
body.modal-aberto { overflow: hidden; }
@keyframes modal-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- contratos ---------- */
.tipo-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tipo-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border: 1.5px solid var(--border-strong);
  border-radius: 10px; cursor: pointer; background: #fff; position: relative;
}
.tipo-card input { position: absolute; opacity: 0; pointer-events: none; }
.tipo-card .ti { font-size: 22px; color: var(--gold); margin-bottom: 4px; }
.tipo-card small { color: var(--text-2); font-size: 12px; }
.tipo-card.on { border-color: var(--primary); background: var(--primary-50); box-shadow: 0 0 0 3px rgba(30, 77, 92, .12); }
.tipo-card.off { opacity: .45; cursor: not-allowed; }
.setor-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px 100px 34px; gap: 8px; }
.setor-row input, .setor-row select { height: 38px; }
.modelo-texto { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px !important; line-height: 1.55; min-height: 420px; }
.vars-lista { display: flex; flex-direction: column; gap: 3px; }
.vars-lista code, .text-2 code { background: #F3F4F6; border-radius: 4px; padding: 1px 5px; color: var(--primary); font-size: 12px; }
.vinc-row.sel { background: var(--warning-bg); }
details.zona-risco > summary, details.add-sep > summary { list-style: none; cursor: pointer; }
details.zona-risco > summary::-webkit-details-marker, details.add-sep > summary::-webkit-details-marker { display: none; }
details.zona-risco:not([open]) > summary { border-bottom: 0; }
details.zona-risco h2 .ti { color: var(--danger); }
.alertas-cem { border-left: 4px solid #D97706; }
.item-card-actions a.acao-wa .ti { color: #1DA851; }
.item-card-actions a.acao-off { opacity: .5; }
.locacao-acoes {
  margin-top: 16px; padding: 14px 16px; border-radius: 10px; background: var(--gold-50); border: 1px solid #EADFC6;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.locacao-acoes-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.locacao-acoes-txt strong { display: flex; align-items: center; gap: 6px; color: var(--gold-700); }
.locacao-acoes-txt span { font-size: 13px; color: var(--text-2); }
.locacao-acoes-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.locacao-acoes-btns .btn { background: #fff; }
.alertas-cem .main-line .ti { color: #D97706; }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 500; cursor: pointer;
  white-space: nowrap; transition: background .15s, border-color .15s;
}
.btn .ti { font-size: 18px; }
.btn:hover { background: var(--bg); text-decoration: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-600); }
.btn-outline { border-color: var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary-50); }
.btn-danger { border-color: #FCA5A5; color: var(--danger); }
.btn-danger:hover { background: var(--danger-bg); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }

.actions { display: flex; gap: 4px; justify-content: flex-end; }
.act {
  width: 34px; height: 34px; border-radius: 8px; display: inline-grid; place-items: center;
  color: var(--text-2); border: 1px solid var(--border); background: var(--surface); font-size: 17px;
}
.act:hover { text-decoration: none; background: var(--primary-50); color: var(--primary); border-color: #C3D6DB; }

/* ---------- toolbar / filtros ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .search { flex: 1; min-width: 220px; position: relative; }
.toolbar .search .ti { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 18px; }
.toolbar .search input { padding-left: 38px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text-2); display: inline-flex; align-items: center; font-weight: 500; font-size: 13px; white-space: nowrap; flex: none;
}
.chip:hover { text-decoration: none; background: var(--bg); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- tabela ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .4px;
  padding: 12px 16px; background: #FAFAFB; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #FAFAFB; }
.num { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--primary); }

/* cards da lista (mobile) */
.cards-list { display: none; }
.item-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 14px 10px; margin-bottom: 10px; }
.item-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.item-card-title { font-weight: 600; font-size: 15px; margin-top: 6px; }
.item-card-sub { font-size: 13px; color: var(--text-2); }
.item-card-actions {
  display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border);
}
.item-card-actions a {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; border-radius: 8px;
  color: var(--text-2); font-size: 11px; font-weight: 500;
}
.item-card-actions a .ti { font-size: 21px; color: var(--primary); }
.item-card-actions a:hover, .item-card-actions a:active { background: var(--primary-50); text-decoration: none; }

/* paginação */
.pagination { display: flex; gap: 6px; justify-content: center; align-items: center; margin: 18px 0 4px; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 36px; height: 36px; padding: 0 10px; border-radius: 8px; display: inline-grid; place-items: center;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-weight: 500;
}
.pagination .current { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination a:hover { text-decoration: none; background: var(--bg); }

/* ---------- formulários ---------- */
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px 16px; }
.col-12 { grid-column: span 12; } .col-8 { grid-column: span 8; } .col-6 { grid-column: span 6; }
.col-4 { grid-column: span 4; } .col-3 { grid-column: span 3; } .col-2 { grid-column: span 2; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 13px; font-weight: 500; color: var(--text-2); }
.field label .req { color: var(--danger); }
.hint { font-size: 12px; color: var(--muted); }
.input, .select, .textarea, input[type=text], input[type=password], input[type=email], input[type=date], input[type=time], input[type=number], input[type=tel], input[type=search], select, textarea {
  width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: #fff; color: var(--text); font: inherit; font-size: 15px; transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
select {
  padding-right: 34px; background-repeat: no-repeat; background-position: right 12px center; background-size: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30, 77, 92, .15); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--danger); }
.field-error { font-size: 12px; color: var(--danger); display: none; }
.field.invalid .field-error { display: block; }
.input-group { display: flex; gap: 8px; }
.input-group input { flex: 1; }

.form-section { margin-bottom: 16px; }
.form-section .panel-head { gap: 12px; justify-content: flex-start; }
.panel-head .step-num + h2 { margin-right: auto; }
.step-num {
  width: 28px; height: 28px; border-radius: 50%; background: var(--gold-50); color: var(--gold-700);
  display: grid; place-items: center; font-weight: 600; font-size: 13px; flex: none;
}
.form-footer {
  display: flex; gap: 10px; justify-content: flex-end; align-items: center;
  position: sticky; bottom: 0; background: rgba(243, 244, 246, .94); backdrop-filter: blur(6px);
  padding: 12px 0; margin-top: 4px; z-index: 5;
}
.form-footer .spacer { flex: 1; }

/* navegação por etapas */
.steps-nav {
  display: flex; gap: 6px; overflow-x: auto; margin-bottom: 16px; padding-bottom: 2px;
  position: sticky; top: var(--topbar-h); z-index: 6; background: var(--bg); padding-top: 4px;
  scrollbar-width: none;
}
.steps-nav::-webkit-scrollbar { display: none; }
.steps-nav a {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); font-weight: 500; font-size: 13px; white-space: nowrap;
}
.steps-nav a:hover { text-decoration: none; }
.steps-nav a.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.steps-nav a.has-error { border-color: var(--danger); color: var(--danger); }
.step-mobile-nav { display: none; }

.resp-found {
  display: none; margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: var(--info-bg); color: var(--info); font-size: 13px;
}

/* ---------- abas (configurações) ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; color: var(--text-2); font-weight: 500;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tabs a .ti { font-size: 18px; }
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs a.active { color: var(--primary); border-bottom-color: var(--gold); }

.info-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.info-list div { display: flex; flex-direction: column; }
.info-list dt { font-size: 12px; color: var(--muted); }
.info-list dd { margin: 0; font-weight: 500; }

/* ---------- login ---------- */
.login-body { background: #F6F4EF; }
.login-page { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(420px, 1fr); }

.login-side { position: relative; overflow: hidden; color: #E6EEF0; background: var(--sidebar); }
.login-side-bg {
  position: absolute; inset: 0;
  background: url('../img/fachada.jpg') center 35% / cover no-repeat;
  transform: scale(1.03);
}
.login-side-bg::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 46, 56, .50) 0%, rgba(15, 46, 56, .12) 28%, rgba(15, 46, 56, .45) 52%, rgba(15, 46, 56, .88) 74%, rgba(11, 34, 42, .97) 100%),
    linear-gradient(90deg, rgba(15, 46, 56, .35), rgba(15, 46, 56, 0) 60%);
}
.login-side-content {
  position: relative; z-index: 1; height: 100%; min-height: 100vh;
  display: flex; flex-direction: column; padding: 44px 56px 36px;
}
.login-side .brand { padding: 0; }
.login-side .brand-text small { color: #C9D6DA; }
.login-hero { max-width: 560px; margin-top: auto; margin-bottom: 32px; }
.login-kicker {
  display: inline-flex; align-items: center; gap: 10px; color: #E3C68C; font-size: 12.5px; font-weight: 600;
  letter-spacing: 1.6px; text-transform: uppercase; margin-bottom: 14px;
}
.login-kicker::before { content: ''; width: 32px; height: 2px; background: var(--gold); border-radius: 2px; }
.login-hero h2 { color: #fff; font-size: 34px; line-height: 1.2; font-weight: 600; letter-spacing: -.3px; margin-bottom: 12px; }
.login-hero p { margin: 0 0 24px; font-size: 15.5px; color: #D3DEE1; max-width: 460px; }
.login-features { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.login-features li {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 500;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); color: #fff;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.login-features .ti { color: #E3C68C; font-size: 17px; }
.login-side-foot {
  display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 12.5px; color: #A9BCC1;
  padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .12);
}
.login-side-foot span { display: inline-flex; align-items: center; gap: 6px; }
.login-side-foot .ti { color: var(--gold); font-size: 15px; }

.login-box {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 28px 28px; background:
    radial-gradient(circle at 100% 0%, rgba(184, 147, 74, .10), transparent 42%),
    radial-gradient(circle at 0% 100%, rgba(30, 77, 92, .07), transparent 45%), #F6F4EF;
}
.login-card {
  width: 100%; max-width: 410px; background: #fff; border-radius: 18px; padding: 36px 34px 28px;
  border: 1px solid #ECE7DC; box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 18px 48px -12px rgba(15, 46, 56, .18);
  position: relative;
}
.login-card::before {
  content: ''; position: absolute; left: 34px; right: 34px; top: 0; height: 3px; border-radius: 0 0 3px 3px; background: var(--gold);
}
.login-emblem {
  width: 58px; height: 58px; border-radius: 16px; margin-bottom: 20px; display: grid; place-items: center;
  background: var(--sidebar); box-shadow: inset 0 0 0 1px rgba(184, 147, 74, .5);
}
.login-emblem span { color: var(--gold); font-weight: 700; font-size: 19px; letter-spacing: .5px; }
.login-card h1 { font-size: 24px; letter-spacing: -.2px; margin-bottom: 6px; }
.login-card .sub { color: var(--text-2); margin: 0 0 26px; }
.login-card .field { margin-bottom: 16px; }
.login-card .alert { margin-bottom: 18px; }
.input-icon { position: relative; }
.input-icon > .ti { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 19px; pointer-events: none; transition: color .15s; }
.input-icon input { padding-left: 44px; height: 48px; border-radius: 10px; background: #FBFAF7; border-color: #E2DDD2; }
.input-icon input:focus { background: #fff; }
.input-icon:focus-within > .ti { color: var(--primary); }
.input-icon.pass-wrap button { top: 4px; height: 40px; }
.btn-login { height: 50px !important; border-radius: 10px; font-size: 15px; margin-top: 8px; gap: 10px; }
.btn-login .ti { transition: transform .2s; }
.btn-login:hover .ti { transform: translateX(3px); }
.login-help { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 20px 0 0; font-size: 13px; color: var(--muted); }
.login-help .ti { font-size: 16px; }
.login-foot {
  width: 100%; max-width: 410px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin-top: 22px; font-size: 12px; color: var(--muted);
}
.login-foot span { display: inline-flex; align-items: center; gap: 5px; }
.login-mobile-hero { display: none; }

.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 44px; }
.pass-wrap button { position: absolute; right: 2px; top: 2px; height: 38px; width: 40px; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 19px; }

.muted-note { font-size: 12.5px; color: var(--muted); }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.hide-desktop { display: none !important; }

/* =====================================================================
   Tablet
   ===================================================================== */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* =====================================================================
   Mobile
   ===================================================================== */
@media (max-width: 860px) {
  .main { margin-left: 0; }
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; width: 280px; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 35; }
  body.sidebar-open .sidebar-backdrop { display: block; }
  body.sidebar-open { overflow: hidden; }
  .icon-btn.sidebar-close { display: inline-grid; }

  .topbar { padding: 0 8px 0 6px; gap: 4px; height: 56px; }
  .icon-btn.menu-btn { display: inline-grid; }
  body.has-back .icon-btn.menu-btn { display: none; }
  .icon-btn.back-btn { display: inline-grid; }
  .topbar-date { display: none; }
  .page-title { font-size: 16px; }
  .topbar-right { gap: 6px; }
  .topbar-right .btn span { display: none; }
  .topbar-right .btn { padding: 0 10px; }

  .content { padding: 14px 12px calc(var(--bottom-h) + 22px + env(safe-area-inset-bottom)); }

  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    height: calc(var(--bottom-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: var(--surface); border-top: 1px solid var(--border);
  }
  .bottom-nav a {
    display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted);
    font-size: 11px; font-weight: 500; padding: 6px 0;
  }
  .bottom-nav a .ti { font-size: 23px; }
  .bottom-nav a.active { color: var(--primary); }
  .bottom-nav a:hover { text-decoration: none; }
  .bottom-nav .fab {
    width: 52px; height: 52px; border-radius: 50%; margin: -22px auto 0; padding: 0;
    background: var(--gold); color: #fff; justify-content: center; box-shadow: 0 6px 16px rgba(184, 147, 74, .45);
  }
  .bottom-nav .fab .ti { font-size: 26px; }

  .stats { gap: 10px; margin-bottom: 14px; }
  .stat { padding: 12px 12px; }
  .stat-value { font-size: 21px; }
  .stat-icon { width: 30px; height: 30px; font-size: 16px; }
  .stat-label { font-size: 12px; }
  .grid-2 { grid-template-columns: 1fr; gap: 0; }
  .salas-grid { grid-template-columns: 1fr; padding: 12px; gap: 10px; }
  .fin-resumo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fin-resumo strong { font-size: 15px; }
  .fin-item { grid-template-columns: 22px minmax(0, 1fr) 128px; padding: 8px 14px; }
  .fin-outro { grid-template-columns: minmax(0, 1fr) 128px; padding: 8px 14px; }
  .fin-totais .field { width: 100%; }
  .fin-botoes { width: 100%; }
  .fin-botoes .btn { flex: 1; height: 46px; }
  .fin-botoes .btn:first-child { flex: 0 0 auto; }
  .fin-total { width: 100%; flex-direction: row; justify-content: space-between; align-items: center; }
  .fin-total strong { font-size: 22px; }
  .fin-preview ol { columns: 1; }
  .parcela-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 8px; }
  .parcela-acoes { grid-column: 1 / -1; justify-content: stretch; min-width: 0; }
  .parcela-acoes:empty { display: none; }
  .parcela-acoes .btn { flex: 1; }
  .item-preco-row .money-input { width: 120px; }
  .tipo-cards { grid-template-columns: 1fr; }
  .trava-bar .btn { width: 100%; height: 46px; }
  .modal { align-items: flex-end; padding: 0; }
  .modal-card { max-width: none; border-radius: 18px 18px 0 0; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .modal-botoes .btn { flex: 1; height: 46px; }
  .locacao-acoes-btns { width: 100%; flex-direction: column; gap: 12px; }
  .locacao-acoes-btns .btn { width: 100%; height: 46px; }
  .tipo-card { flex-direction: row; align-items: center; gap: 10px; }
  .tipo-card .ti { margin: 0; }
  .tipo-card small { margin-left: auto; }
  .setor-row { grid-template-columns: minmax(0, 1fr) 90px 34px; }
  .setor-row select[name=ativo], .setor-row > span { display: none; }
  .modelo-texto { min-height: 320px; }
  .panel-head { padding: 14px; }
  .panel-body { padding: 14px; }
  .list-row { padding: 12px 14px; }

  .table-desktop { display: none; }
  .cards-list { display: block; }

  .form-grid { gap: 12px; }
  .col-8, .col-6, .col-4, .col-3 { grid-column: span 12; }
  .col-2 { grid-column: span 6; }
  .col-m-6 { grid-column: span 6 !important; }
  input, select, textarea { font-size: 16px; } /* evita zoom no iOS */

  /* formulário em etapas no celular */
  .stepper .form-section { display: none; }
  .stepper .form-section.current { display: block; }
  .stepper .form-footer .btn-save-desktop { display: none; }
  .step-mobile-nav { display: flex; gap: 8px; width: 100%; }
  .step-mobile-nav .btn { flex: 1; height: 46px; }
  .form-footer { bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom)); padding: 10px 0; }
  .form-footer .btn-cancel { display: none; }
  .steps-nav { top: 56px; }

  .toolbar .search { min-width: 100%; }
  .toolbar .chips { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .info-list { grid-template-columns: 1fr; }

  .login-page { grid-template-columns: 1fr; }
  .login-side { display: none; }
  .login-box { justify-content: flex-start; padding: 0 16px 24px; }
  .login-mobile-hero {
    display: flex; align-items: flex-start; width: calc(100% + 32px); margin: 0 -16px; height: 230px; padding: 22px 20px;
    background:
      linear-gradient(180deg, rgba(15, 46, 56, .45) 0%, rgba(15, 46, 56, .75) 60%, rgba(15, 46, 56, .95) 100%),
      url('../img/fachada-m.jpg') center 38% / cover no-repeat;
  }
  .login-mobile-hero .brand { padding: 0; }
  .login-mobile-hero .brand-text small { color: #C9D6DA; }
  .login-card { margin-top: -84px; padding: 28px 22px 22px; border-radius: 16px; }
  .login-card::before { left: 22px; right: 22px; }
  .login-emblem { width: 50px; height: 50px; border-radius: 14px; margin-bottom: 16px; }
  .login-card h1 { font-size: 21px; }
  .login-foot { justify-content: center; text-align: center; }
  .hide-mobile { display: none !important; }
  .hide-desktop { display: initial !important; }
}

/* Contrato sem ficha (compra antecipada / papel) */
.sem-ficha-opcoes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sem-ficha-op { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); text-decoration: none; transition: border-color .15s, background .15s; }
.sem-ficha-op:hover { border-color: var(--primary); background: rgba(30, 77, 92, .04); }
.sem-ficha-op > i { font-size: 24px; color: var(--primary); flex: none; margin-top: 2px; }
.sem-ficha-op strong { display: block; margin-bottom: 2px; }
.sem-ficha-op span { font-size: 13px; color: var(--text-2); }
.badge-antecipada { background: #EDE9FE; color: #5B21B6; }
@media (max-width: 720px) { .sem-ficha-opcoes { grid-template-columns: 1fr; } }
.aviso-antiga { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 14px; border: 1px dashed var(--border-strong); border-radius: 10px; font-size: 14px; color: var(--text-2); }
.aviso-antiga i { color: var(--primary); }
.badge-antiga { background: #F1F5F9; color: #475569; border: 1px solid #CBD5E1; }
.sem-ficha-opcoes.um { grid-template-columns: 1fr; max-width: 560px; }

/* Guia de uso */
.guia-topo { margin-bottom: 14px; }
.guia-topo .search { max-width: 520px; }
.guia-indice { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-bottom: 18px; }
.guia-indice a { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; background: var(--surface, #fff); border: 1px solid var(--border); border-radius: 10px; color: var(--text); text-decoration: none; }
.guia-indice a:hover { border-color: var(--primary); }
.guia-indice a[hidden] { display: none; }
.guia-indice i { font-size: 20px; color: var(--primary); margin-top: 1px; }
.guia-indice strong { display: block; font-size: 14px; }
.guia-indice small { color: var(--text-2); font-size: 12.5px; }
details.guia > summary { cursor: pointer; list-style: none; }
details.guia > summary::-webkit-details-marker { display: none; }
details.guia[open] > summary .ti-chevron-down { transform: rotate(180deg); }
details.guia { scroll-margin-top: 80px; }
.guia-passos { margin: 0; padding: 0; list-style: none; counter-reset: passo; }
.guia-passos li { counter-increment: passo; position: relative; padding: 0 0 14px 40px; }
.guia-passos li::before { content: counter(passo); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.guia-passos li:not(:last-child)::after { content: ""; position: absolute; left: 12.5px; top: 30px; bottom: 4px; width: 1px; background: var(--border); }
.guia-passos strong { display: block; margin-bottom: 2px; }
.guia-passos span { color: var(--text-2); font-size: 14px; line-height: 1.5; }
.guia-dica { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: #FBF6EC; color: #6B5220; font-size: 13.5px; line-height: 1.5; }
.guia-dica i { color: var(--gold, #B8934A); font-size: 18px; flex: none; }
.zerar-contagem { display: flex; flex-wrap: wrap; gap: 8px; } .zerar-contagem span { padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; color: var(--text-2); } .zerar-contagem strong { color: var(--text); }

/* Logo da WJ */
.brand-simbolo { width: 42px; height: auto; flex: none; display: block; }
.login-logo { width: 170px; height: auto; display: block; filter: drop-shadow(0 2px 8px rgba(0,0,0,.35)); }
.login-emblem img { width: 36px; height: auto; display: block; }
@media (max-width: 760px) { .login-emblem img { width: 32px; } }

/* Permissões do usuário */
.perm-topo { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 12px; }
.perm-topo strong { display: block; margin-bottom: 2px; }
.perm-topo .hint { display: block; max-width: 520px; }
.perm-atalhos { display: flex; gap: 6px; }
.perm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.perm-grupo { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px 12px; margin: 0; min-width: 0; }
.perm-grupo legend { padding: 0 6px; margin-left: -6px; font-weight: 600; }
.perm-grupo legend .check { font-weight: 600; }
.perm-grupo legend i { color: var(--primary); }
.perm-grupo > .check { display: flex; margin-top: 7px; font-size: 14px; line-height: 1.35; align-items: flex-start; }
.perm-grupo > .check input { margin-top: 2px; flex: none; }
@media (max-width: 760px) { .perm-grid { grid-template-columns: 1fr; } }
.bottom-nav .fab-vazio { display: block; }

/* Registro de atividades */
.log-resumo { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 12px; font-size: 13px; }
.chip-info { display: inline-flex; gap: 6px; align-items: center; padding: 3px 10px; border-radius: 999px; background: var(--primary-50); color: var(--primary); font-size: 12.5px; }
.log-dia { padding: 10px 18px 6px; font-size: 12px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; color: var(--text-2); background: #F8FAFB; border-bottom: 1px solid var(--border); }
.log-linha { display: flex; gap: 12px; align-items: flex-start; padding: 10px 18px; border-bottom: 1px solid var(--border); }
.log-linha:last-child { border-bottom: 0; }
.log-linha.alerta { background: #FFF7F7; }
.log-linha.alerta .log-ic { background: #FEE2E2; color: #B91C1C; }
.log-hora { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--text-2); width: 40px; flex: none; padding-top: 2px; }
.log-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--primary-50); color: var(--primary); font-size: 16px; }
.log-txt { flex: 1; min-width: 0; font-size: 14px; line-height: 1.45; }
.log-desc { color: var(--text-2); word-wrap: break-word; }
.log-filtros .chips { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 760px) { .log-linha { padding: 10px 12px; gap: 10px; } .log-hora { width: 36px; } }

/* Foto do usuário */
.user-badge { align-items: center; gap: 10px; text-decoration: none; transition: background .15s; }
.user-badge:hover { background: rgba(184, 147, 74, .22); }
.user-badge-foto { width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center; overflow: hidden;
  background: var(--gold); color: var(--sidebar); font-weight: 700; font-size: 13px; box-shadow: 0 0 0 2px rgba(227, 198, 140, .45); }
.user-badge-foto img, .avatar img, .avatar-lista img { width: 100%; height: 100%; object-fit: cover; display: block; }
.user-badge-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.user-badge-txt strong { color: #fff; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-badge-txt small { color: #E3C68C; font-size: 12px; }
.avatar { display: grid; place-items: center; overflow: hidden; padding: 0; }
.avatar.tem-foto { box-shadow: 0 0 0 2px var(--gold-50); }
.avatar-lista { display: grid; place-items: center; flex: none; cursor: default; }
.perfil-foto { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.perfil-foto-img { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; flex: none; display: grid; place-items: center;
  background: var(--primary-50); color: var(--primary); font-size: 30px; font-weight: 600; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--gold-50); }
.perfil-foto-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.perfil-foto-img.removida img { opacity: .25; filter: grayscale(1); }
.perfil-foto-acoes { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 4px; }
.perfil-foto-botoes { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.perfil-foto-botoes label { cursor: pointer; }
#foto-remover-lbl.on { background: #FEE2E2; color: #B91C1C; border-color: #FCA5A5; }
.perfil-foto.invalid .field-error { display: block; }

/* Janela de confirmação (substitui o confirm do navegador) */
.modal-confirma .modal-card { max-width: 400px; }
.modal-confirma .modal-card > p { line-height: 1.5; }
.modal-confirma.perigo .modal-icone { background: #FEE2E2; color: #B91C1C; }
.modal-confirma .modal-botoes .btn { min-width: 110px; justify-content: center; }
.modal-confirma .btn-danger { background: #B91C1C; border-color: #B91C1C; color: #fff; }
.modal-confirma .btn-danger:hover { background: #991B1B; border-color: #991B1B; }
.login-help a { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-weight: 500; }
.login-help a:hover { text-decoration: underline; }
