/* ═══════════════════════════════════════════════════════════════════════════
   v242 · LAYOUT NOVO DO ADM — "Modelo 2 · faixa de fogo", com trilho de menu
   Regra desta folha: só ADICIONA. Nenhuma regra antiga é apagada; tudo aqui é
   escopado em html.iar-v242, então desligar é só remover a classe do <html>.
   Os nomes que o JS usa (#sidebar, .nav-btn, #btn-theme-mode, #top-title…) não
   mudam: esta folha só muda forma, tamanho, cor e posição.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── realces por tema (o resto vem das variáveis do app) ────────────────── */
html.iar-v242 {
  --v242-linha-forca: color-mix(in srgb, var(--accent-theme) 22%, transparent);
  --v242-vidro: color-mix(in srgb, #fff 16%, transparent);
  --v242-sb-w: 108px;
}
html.iar-v242[data-theme="dark"] {
  --v242-vidro: color-mix(in srgb, #fff 10%, transparent);
}

/* ═══════════ 1 · TRILHO DO MENU ═══════════ */
html.iar-v242 .app-shell { grid-template-columns: var(--v242-sb-w) minmax(0, 1fr) !important; }

html.iar-v242 .sidebar {
  width: var(--v242-sb-w) !important;
  padding: 14px 9px 12px !important;
  gap: 10px;
  align-items: stretch;
}

/* logo no quadrante, sem repetir o nome na vertical */
html.iar-v242 .sidebar .brand {
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 2px 0 8px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  margin-bottom: 2px;
}
html.iar-v242 .sidebar .brand .mark {
  width: 62px; height: 62px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), 0 10px 22px rgba(0, 0, 0, .35);
  overflow: hidden;
}
html.iar-v242[data-theme="light"] .sidebar .brand .mark { background: #fff; }
html.iar-v242 .sidebar .brand .mark img,
html.iar-v242 .sidebar .brand .mark svg { width: 84%; height: 84%; object-fit: contain; }
html.iar-v242 .sidebar .brand strong {
  font-size: 9px; font-weight: 700; text-align: center; line-height: 1.2;
  opacity: .82; letter-spacing: .01em;
  display: block; max-width: 92px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
html.iar-v242 .sidebar .brand .brand-tagline { display: none; }

/* cada item: ícone em cima, palavra embaixo */
html.iar-v242 .sidebar nav { gap: 4px; }
html.iar-v242 .sidebar .nav-btn {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 9px 2px;
  border-radius: 11px;
  font-size: 9px;
  font-weight: 650;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
  border-left: 0;
  position: relative;
}
html.iar-v242 .sidebar .nav-btn i,
html.iar-v242 .sidebar .nav-btn > svg { font-size: 16px; width: 17px; height: 17px; }
html.iar-v242 .sidebar .nav-btn .brand-iarzinho { font-size: 9px; }
html.iar-v242 .sidebar .nav-btn .nav-seta { display: none; }
html.iar-v242 .sidebar .nav-btn.active {
  background: color-mix(in srgb, var(--accent-theme) 18%, transparent) !important;
  color: #fff !important;
  box-shadow: inset 0 0 0 1px var(--v242-linha-forca);
}
html.iar-v242 .sidebar .nav-btn.active::before {
  content: ""; position: absolute; left: 3px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; border-radius: 3px; background: var(--accent-theme);
}

/* submenu vira uma listinha curta, sem empurrar o menu */
html.iar-v242 .sidebar .nav-sub { margin: 2px 0 4px; padding: 0; gap: 2px; }
html.iar-v242 .sidebar .nav-sub-btn {
  flex-direction: column; gap: 2px; font-size: 8.5px; padding: 5px 2px;
  border-radius: 8px; justify-content: center; text-align: center;
}
html.iar-v242 .sidebar .nav-sub-btn i { font-size: 12px; }

/* pé: avatar com as iniciais e as ações em ícone (com dica) */
html.iar-v242 .sidebar .user-box {
  padding: 9px 6px 6px !important;
  border-radius: 12px;
  text-align: center;
  gap: 6px;
}
html.iar-v242 .sidebar .user-box strong,
html.iar-v242 .sidebar .user-box #user-role { display: none; }
html.iar-v242 .sidebar .user-box::before {
  content: var(--v242-ini, "RM"); display: grid; place-items: center;
  width: 34px; height: 34px; margin: 0 auto 2px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--accent-theme) 22%, transparent);
  color: #fff; font-size: 11px; font-weight: 800;
  box-shadow: inset 0 0 0 1px var(--v242-linha-forca);
}
html.iar-v242 .sidebar .user-actions { display: flex; flex-direction: column; gap: 3px; }
html.iar-v242 .sidebar .user-act {
  flex-direction: column; gap: 2px; font-size: 8px; padding: 5px 2px;
  justify-content: center; text-align: center; border-radius: 8px;
}
html.iar-v242 .sidebar .user-act i { font-size: 13px; }
html.iar-v242 .sidebar .user-act .user-act-tag { display: none; }

/* ═══════════ 2 · TOPO: título + data, sol/lua e a pílula ═══════════ */
html.iar-v242 .topbar { padding: 0 20px !important; gap: 12px; }
html.iar-v242 .topbar .topbar-left { gap: 12px; }
html.iar-v242 .topbar #top-title { font-size: 18px; font-weight: 750; letter-spacing: -.01em; }
html.iar-v242 .topbar .topbar-left::after {
  content: attr(data-data);
  font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent-theme);
  display: inline-flex; align-items: center; gap: 6px;
}
html.iar-v242 .topbar .topbar-left::before {
  content: ""; order: 1; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent-theme); display: none;
}
/* o botão claro/escuro continua exatamente onde está, só um pouco maior */
html.iar-v242 #btn-theme-mode {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center; padding: 0; overflow: hidden; line-height: 0;
}
html.iar-v242 #btn-theme-mode img.theme-btn-img {
  width: 24px !important; height: 24px !important; max-width: 24px; max-height: 24px;
  object-fit: contain; display: block; border-radius: 50%;
}

/* ═══════════ 3 · CONTEÚDO: respiro do miolo ═══════════ */
html.iar-v242 .content { padding: 18px 20px 22px !important; }

/* ═══════════ 4 · DASHBOARD DO MODELO 2 ═══════════ */
.v242-dash { display: flex; flex-direction: column; gap: 14px; }

/* 4.1 · faixa de foto com a saudação dentro */
.v242-faixa {
  position: relative; border-radius: 20px; overflow: hidden;
  min-height: 196px; display: flex; align-items: stretch;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: color-mix(in srgb, var(--primary) 22%, #0b0907);
}
.v242-faixa > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.v242-faixa .v242-veu {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(10, 8, 6, .95) 4%, rgba(10, 8, 6, .74) 46%, rgba(10, 8, 6, .22) 100%);
}
.v242-faixa .v242-txt {
  position: relative; padding: 22px 24px; max-width: 62%;
  display: flex; flex-direction: column; justify-content: center; color: #fff;
}
.v242-faixa .v242-data {
  font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: color-mix(in srgb, var(--accent-theme) 55%, #ffd9ac);
}
.v242-faixa h2 {
  font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.08; margin-top: 6px;
  color: #fff;
}
.v242-faixa .v242-resumo { font-size: 12.5px; line-height: 1.5; margin-top: 7px; opacity: .92; color: #fff; }
.v242-faixa .v242-resumo b { color: #ffd9ac; font-weight: 800; }
.v242-faixa .v242-dica {
  display: inline-flex; align-items: center; gap: 6px; width: max-content;
  margin-top: 11px; padding: 5px 11px; border-radius: 999px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28);
  font-size: 10.5px; font-weight: 750; color: #fff;
}
.v242-faixa .v242-dica b { color: #ffd9ac; }
.v242-faixa .v242-hoje {
  position: relative; margin-left: auto; width: 330px; flex: 0 0 auto;
  padding: 20px 20px 20px 0; display: flex; flex-direction: column; gap: 8px;
}
.v242-faixa .v242-hoje .v242-lb {
  font-size: 9.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: color-mix(in srgb, var(--accent-theme) 55%, #ffd9ac);
}
.v242-faixa .v242-hmini {
  display: flex; align-items: center; gap: 9px;
  background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 12px; padding: 9px 11px; color: #fff;
  backdrop-filter: blur(6px);
}
.v242-faixa .v242-hmini i,
.v242-faixa .v242-hmini .v242-ic {
  width: 26px; height: 26px; border-radius: 8px; flex: 0 0 auto;
  background: rgba(255, 255, 255, .18); display: grid; place-items: center; font-size: 12px;
}
.v242-faixa .v242-hmini b { display: block; font-size: 11.5px; font-weight: 750; }
.v242-faixa .v242-hmini span { font-size: 10px; opacity: .84; }
.v242-faixa .v242-hmini.vazio { opacity: .72; font-size: 11px; }

/* 4.2 · régua dos 5 números (as mesmas 5 informações de hoje) */
.v242-kpis {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  background: var(--card); border: 1px solid var(--border);
  border-radius: 18px; box-shadow: var(--shadow); overflow: hidden;
}
.v242-kpi {
  display: flex; align-items: center; gap: 11px; padding: 14px 15px;
  border-left: 1px solid var(--border); cursor: pointer; text-align: left;
  background: transparent; border-top: 0; border-right: 0; border-bottom: 0;
  color: var(--text); font: inherit; width: 100%;
}
.v242-kpi:first-child { border-left: 0; }
.v242-kpi:hover { background: color-mix(in srgb, var(--primary) 6%, var(--card)); }
.v242-kpi .v242-kic {
  width: 36px; height: 36px; border-radius: 11px; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 15px;
}
.v242-kpi .v242-ktx { min-width: 0; }
.v242-kpi b {
  display: block; font-size: 21px; font-weight: 800; line-height: 1;
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.v242-kpi span { display: block; font-size: 11px; font-weight: 750; margin-top: 2px; }
.v242-kpi small {
  display: block; font-size: 10px; color: var(--muted); margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 4.3 · abas com os mesmos nomes, agora sublinhadas */
.v242-abas {
  display: flex; gap: 2px; align-items: center;
  border-bottom: 1px solid var(--border); padding: 0 2px; overflow-x: auto;
}
.v242-aba {
  background: transparent; border: 0; border-bottom: 2.5px solid transparent;
  padding: 9px 12px; font: inherit; font-size: 12px; font-weight: 700;
  color: var(--muted); cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 7px;
}
.v242-aba i { font-size: 11px; opacity: .9; }
.v242-aba b {
  font-size: 10px; font-weight: 800; background: var(--ghost-bg);
  border-radius: 99px; padding: 1px 6px; color: var(--muted);
}
.v242-aba.on { color: var(--text); border-bottom-color: var(--accent-theme); font-weight: 800; }
.v242-aba.on b { background: color-mix(in srgb, var(--accent-theme) 18%, var(--card)); color: var(--accent-theme); }

/* 4.4 · as três colunas */
.v242-grade {
  display: grid; grid-template-columns: 1.18fr 1fr 330px; gap: 14px; align-items: start;
}
.v242-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.v242-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 18px; box-shadow: var(--shadow); overflow: hidden;
}
.v242-card > header {
  display: flex; align-items: center; justify-content: space-between; gap: 9px;
  padding: 12px 15px; border-bottom: 1px solid var(--border);
}
.v242-card > header h3 {
  font-size: 13px; font-weight: 750; display: flex; align-items: center; gap: 7px;
}
.v242-card > header h3 i { color: var(--accent-theme); font-size: 13px; }
.v242-card > header .v242-n { font-size: 11px; color: var(--muted); white-space: nowrap; }
.v242-card .v242-corpo { padding: 13px 15px 15px; }

.v242-ln {
  display: flex; align-items: center; gap: 11px; padding: 11px 15px;
  border-top: 1px solid var(--border);
}
.v242-card > header + .v242-ln,
.v242-card > header + .v242-ln-caixa .v242-ln { border-top: 0; }
.v242-ln .v242-sq {
  width: 32px; height: 32px; border-radius: 10px; flex: 0 0 auto;
  background: var(--ghost-bg); display: grid; place-items: center;
  font-size: 11px; font-weight: 800;
}
.v242-ln .v242-tx { flex: 1; min-width: 0; }
.v242-ln .v242-tx b { display: block; font-size: 12.5px; font-weight: 700; }
.v242-ln .v242-tx span { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; line-height: 1.4; }

.v242-tag {
  font-size: 9.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  border-radius: 6px; padding: 3px 7px; white-space: nowrap;
}
.v242-tag.ok { background: color-mix(in srgb, var(--success) 16%, var(--card)); color: color-mix(in srgb, var(--success) 72%, var(--text)); }
.v242-tag.wa { background: color-mix(in srgb, var(--warning) 20%, var(--card)); color: color-mix(in srgb, var(--warning) 62%, var(--text)); }
.v242-tag.lv { background: color-mix(in srgb, var(--danger) 14%, var(--card)); color: color-mix(in srgb, var(--danger) 74%, var(--text)); }
.v242-tag.au { background: var(--ghost-bg); color: var(--muted); }
.v242-tag.az { background: color-mix(in srgb, var(--primary) 14%, var(--card)); color: color-mix(in srgb, var(--primary) 74%, var(--text)); }

/* cartão de aprovação: o único botão cheio da tela */
.v242-aprova { border-left: 4px solid var(--accent-theme); }
.v242-aprova .btn {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-theme) 18%, transparent);
}

/* fotos do mural */
.v242-foto { position: relative; border-radius: 14px; overflow: hidden; background: #12100e; }
.v242-foto img { width: 100%; height: 154px; object-fit: cover; display: block; }
.v242-foto .v242-fveu { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 14, 18, 0) 42%, rgba(10, 14, 18, .88)); }
.v242-foto .v242-flb {
  position: absolute; left: 10px; top: 10px; font-size: 9px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase; background: var(--accent-theme);
  color: #fff; border-radius: 6px; padding: 3px 7px;
}
.v242-foto .v242-fcnt {
  position: absolute; right: 10px; top: 10px; font-size: 9.5px; font-weight: 800;
  background: rgba(12, 16, 20, .72); color: #fff; border-radius: 6px; padding: 3px 7px;
}
.v242-foto .v242-ftx { position: absolute; left: 11px; bottom: 9px; right: 11px; color: #fff; }
.v242-foto .v242-ftx b { display: block; font-size: 13px; }
.v242-foto .v242-ftx span { font-size: 9.5px; opacity: .86; }
.v242-tira { display: flex; gap: 7px; align-items: center; margin-top: 9px; }
.v242-tira .v242-q {
  position: relative; width: 52px; height: 40px; border-radius: 9px; overflow: hidden;
  border: 1px solid var(--border); flex: 0 0 auto;
}
.v242-tira .v242-q img { width: 100%; height: 100%; object-fit: cover; display: block; }
.v242-tira .v242-add {
  width: 52px; height: 40px; border-radius: 9px; flex: 0 0 auto;
  border: 1.5px dashed var(--border); background: var(--ghost-bg);
  color: var(--muted); display: grid; place-items: center;
}
.v242-sw {
  width: 34px; height: 20px; border-radius: 7px; background: var(--accent-theme);
  position: relative; flex: 0 0 auto;
}
.v242-sw::after {
  content: ""; position: absolute; top: 3px; right: 3px; width: 14px; height: 14px;
  border-radius: 4px; background: #fff;
}

/* “o que rolou” */
.v242-rolou { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.v242-rolou figure { position: relative; border-radius: 10px; overflow: hidden; margin: 0; }
.v242-rolou img { width: 100%; height: 58px; object-fit: cover; display: block; }
.v242-rolou figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 6px 5px;
  color: #fff; font-size: 9px; font-weight: 750;
  background: linear-gradient(180deg, transparent, rgba(12, 16, 20, .88));
}

/* próximos 7 dias */
.v242-s7 {
  width: 38px; height: 38px; border-radius: 11px; background: var(--ghost-bg);
  display: grid; place-items: center; flex: 0 0 auto; line-height: 1; text-align: center;
}
.v242-s7 b { display: block; font-size: 15px; font-weight: 800; }
.v242-s7 span { display: block; font-size: 8.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

/* rodapé discreto */
.v242-rodape {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 11.5px; color: var(--muted); padding: 2px 4px 0;
}
.v242-rodape a, .v242-rodape .v242-link { color: var(--accent-theme); font-weight: 750; cursor: pointer; }

/* vazio amigável */
.v242-vazio {
  border: 1px dashed var(--border); border-radius: 12px; padding: 12px 14px;
  font-size: 12px; color: var(--muted); background: color-mix(in srgb, var(--card) 90%, var(--bg));
}

/* ═══════════ 5 · CELULAR: o trilho vira gaveta, o resto empilha ═══════════ */
@media (max-width: 1180px) {
  html.iar-v242 .v242-grade { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  html.iar-v242 .v242-grade > .v242-col:last-child { grid-column: span 2; }
}
@media (max-width: 980px) {
  html.iar-v242 .app-shell { grid-template-columns: minmax(0, 1fr) !important; }
  html.iar-v242 .sidebar {
    width: 244px !important;
    align-items: stretch;
    transform: translateX(-104%);
    transition: transform .22s ease;
  }
  html.iar-v242 .sidebar.open { transform: none; }
  html.iar-v242 .sidebar .brand { flex-direction: row; align-items: center; gap: 9px; text-align: left; }
  html.iar-v242 .sidebar .brand strong { font-size: 12.5px; max-width: none; white-space: normal; }
  html.iar-v242 .sidebar .brand .brand-tagline { display: block; }
  html.iar-v242 .sidebar .nav-btn {
    flex-direction: row; justify-content: flex-start; gap: 10px;
    font-size: 12px; padding: 9px 11px; text-align: left;
  }
  html.iar-v242 .sidebar .nav-sub-btn { flex-direction: row; justify-content: flex-start; font-size: 11.5px; padding: 7px 12px; }
  html.iar-v242 .sidebar .user-box { text-align: left; }
  html.iar-v242 .sidebar .user-box::before { margin: 0; }
  html.iar-v242 .sidebar .user-box strong,
  html.iar-v242 .sidebar .user-box #user-role { display: block; }
  html.iar-v242 .sidebar .user-act { flex-direction: row; justify-content: flex-start; font-size: 11px; padding: 6px 8px; }
  html.iar-v242 .v242-faixa { min-height: 0; flex-direction: column; }
  html.iar-v242 .v242-faixa .v242-txt { max-width: none; padding: 18px 18px 12px; }
  html.iar-v242 .v242-faixa h2 { font-size: 23px; }
  html.iar-v242 .v242-faixa .v242-hoje { width: auto; padding: 0 18px 16px; }
  html.iar-v242 .v242-grade { grid-template-columns: minmax(0, 1fr); }
  html.iar-v242 .v242-grade > .v242-col:last-child { grid-column: auto; }
  html.iar-v242 .v242-kpis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  html.iar-v242 .v242-kpi { padding: 11px 10px; gap: 8px; }
  html.iar-v242 .v242-kpi .v242-kic { width: 30px; height: 30px; font-size: 13px; }
  html.iar-v242 .v242-kpi b { font-size: 17px; }
  html.iar-v242 .v242-kpi span { font-size: 10px; }
  html.iar-v242 .v242-kpi small { font-size: 9px; }
  html.iar-v242 .v242-aba { padding: 8px 9px; font-size: 11px; }
  html.iar-v242 .v242-faixa .v242-dica { font-size: 9.5px; padding: 4px 9px; }
  html.iar-v242 .v242-kpi { border-left: 0; border-top: 1px solid var(--border); }
  html.iar-v242 .v242-kpi:nth-child(-n+2) { border-top: 0; }
  html.iar-v242 .v242-kpi:nth-child(5) { grid-column: span 2; border-left: 0; }
  html.iar-v242 .v242-kpi small { white-space: normal; font-size: 9.5px; line-height: 1.35; }
  html.iar-v242 .topbar .topbar-left::after { content: none; }
}
