﻿/* ═══════════════════════════════════════════════════════
   ORION MOBILE DIRETOR — Premium executive mobile UI
   ═══════════════════════════════════════════════════════ */
:root {
  --mdir-navy: #0B1628;
  --mdir-navy2: #132337;
  --mdir-teal: #14B8A6;
  --mdir-teal2: #0E7C86;
  --mdir-bg: #EEF2F7;
  --mdir-card: #FFFFFF;
  --mdir-bdr: #E2E8F0;
  --mdir-txt3: #64748B;
  --mdir-shadow: 0 4px 24px rgba(11, 22, 40, .08);
  --mdir-shadow-lg: 0 12px 40px rgba(11, 22, 40, .14);
  --mdir-r: 16px;
}

/* ─── Base mobile diretor ─── */
body.modo-mobile-diretor {
  font-size: 15px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  overflow: hidden;
  height: 100dvh;
  background: var(--mdir-bg);
}
body.modo-mobile-diretor #appPage {
  display: flex !important;
  flex-direction: column;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}
body.modo-mobile-diretor #appPage > .app {
  flex: 1;
  min-height: 0 !important;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body.modo-mobile-diretor .main-wrap {
  margin-left: 0 !important;
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body.modo-mobile-diretor .ca {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0 !important;
  background: var(--mdir-bg) !important;
  color: var(--txt);
}
body.modo-mobile-diretor .sb { display: none !important; }
body.modo-mobile-diretor .tb-menu { display: none !important; }
body.modo-mobile-diretor .tb-clock { display: none; }
body.modo-mobile-diretor .tb-user .tb-urole { display: none; }
body.modo-mobile-diretor .tb-user .tb-uname {
  font-size: 12px;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255,255,255,.9);
}
body.modo-mobile-diretor .dir-dock { display: flex; }
body.modo-mobile-diretor .btn { min-height: 44px; font-size: 14px; }
body.modo-mobile-diretor .page-title { font-size: 20px; }

/* ─── Topbar premium ─── */
body.modo-mobile-diretor .mdir-topbar,
body.modo-mobile-diretor .topbar {
  flex-shrink: 0;
  height: 56px;
  padding: 0 14px;
  padding-left: max(14px, env(safe-area-inset-left));
  padding-right: max(14px, env(safe-area-inset-right));
  padding-top: env(safe-area-inset-top);
  background: linear-gradient(135deg, var(--mdir-navy) 0%, var(--mdir-navy2) 100%);
  border-bottom: none;
  box-shadow: 0 2px 16px rgba(11, 22, 40, .2);
}
body.modo-mobile-diretor .tb-title {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.2px;
}
body.modo-mobile-diretor .tb-av {
  border: 2px solid rgba(20, 184, 166, .5) !important;
}

/* ─── Login mobile ─── */
body.mobile-entry #loginPage {
  background: transparent !important;
  min-height: 100dvh;
}
body.mobile-entry .mdir-login {
  position: relative;
  min-height: 100dvh;
  min-height: 100svh;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  padding-top: max(24px, env(safe-area-inset-top));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  overflow: hidden;
}
body.mobile-entry .mdir-login-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg, #041418 0%, var(--mdir-navy) 35%, #0D4A52 70%, #0B1628 100%);
  z-index: 0;
}
body.mobile-entry .mdir-login-bg::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -30%;
  width: 70%;
  height: 60%;
  background: radial-gradient(circle, rgba(20, 184, 166, .18) 0%, transparent 70%);
  pointer-events: none;
}
body.mobile-entry .mdir-login-bg::after {
  content: '';
  position: absolute;
  bottom: -10%;
  left: -20%;
  width: 60%;
  height: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, .12) 0%, transparent 70%);
  pointer-events: none;
}
body.mobile-entry .mdir-login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  background: rgba(255, 255, 255, .98);
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: var(--mdir-shadow-lg);
  border: 1px solid rgba(255, 255, 255, .6);
}
body.mobile-entry .mdir-login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
body.mobile-entry .mdir-login-brand img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(14, 124, 134, .2));
}
body.mobile-entry .mdir-login-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--mdir-navy);
  letter-spacing: -.3px;
}
body.mobile-entry .mdir-login-badge {
  display: inline-block;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--mdir-teal2);
  background: rgba(20, 184, 166, .1);
  padding: 3px 8px;
  border-radius: 6px;
}
body.mobile-entry .mdir-login-desc {
  font-size: 13px;
  color: var(--mdir-txt3);
  line-height: 1.5;
  margin-bottom: 20px;
}
body.mobile-entry .mdir-login-err {
  display: none;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
  border-radius: 10px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #DC2626;
  font-size: 12px;
  line-height: 1.4;
}
body.mobile-entry .mdir-login-err.show { display: flex; }
body.mobile-entry .mdir-field { margin-bottom: 14px; }
body.mobile-entry .mdir-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--mdir-txt3);
  margin-bottom: 6px;
}
body.mobile-entry .mdir-inp-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 50px;
  background: #F8FAFC;
  border: 1.5px solid var(--mdir-bdr);
  border-radius: 12px;
  transition: border-color .15s, box-shadow .15s;
}
body.mobile-entry .mdir-inp-wrap:focus-within {
  border-color: var(--mdir-teal);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, .15);
  background: #fff;
}
body.mobile-entry .mdir-inp-wrap svg { flex-shrink: 0; stroke: var(--mdir-txt3); }
body.mobile-entry .mdir-inp {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font);
  font-size: 15px;
  color: var(--txt);
  outline: none;
  min-width: 0;
}
body.mobile-entry .mdir-eye {
  border: none;
  background: transparent;
  padding: 6px;
  cursor: pointer;
  color: var(--mdir-txt3);
  display: flex;
  align-items: center;
}
body.mobile-entry .mdir-login-btn {
  width: 100%;
  height: 52px;
  margin-top: 6px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--mdir-teal2) 0%, var(--mdir-teal) 100%);
  color: #fff;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(14, 124, 134, .35);
  transition: transform .12s, opacity .12s;
}
body.mobile-entry .mdir-login-btn:active { transform: scale(.98); opacity: .92; }
body.mobile-entry .mdir-login-btn.loading { opacity: .7; pointer-events: none; }
body.mobile-entry .mdir-login-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
  font-size: 11px;
  color: var(--mdir-txt3);
}
body.mobile-entry .mdir-login-foot svg { stroke: var(--mdir-teal2); flex-shrink: 0; }

/* PWA install bar */
.mdir-pwa-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 500;
  padding: 12px 14px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  background: rgba(11, 22, 40, .95);
  backdrop-filter: blur(12px);
}
.mdir-pwa-bar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 400px;
  margin: 0 auto;
}
.mdir-pwa-bar-inner img { border-radius: 10px; flex-shrink: 0; }
.mdir-pwa-bar-txt { flex: 1; min-width: 0; }
.mdir-pwa-bar-txt strong { display: block; font-size: 13px; color: #fff; }
.mdir-pwa-bar-txt span { font-size: 11px; color: rgba(255,255,255,.6); }
.mdir-pwa-bar-btn {
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  background: var(--mdir-teal);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.mdir-pwa-bar-x {
  border: none;
  background: transparent;
  color: rgba(255,255,255,.5);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}

/* ─── Boot / erro ─── */
.mdir-boot {
  padding: 48px 20px;
  text-align: center;
  color: var(--mdir-txt3);
  font-size: 14px;
}
.mdir-err-card {
  margin: 20px 16px;
  padding: 20px;
  border-radius: var(--mdir-r);
  background: #FEF2F2;
  border: 1px solid #FECACA;
}
.mdir-err-title { font-weight: 800; color: #DC2626; margin-bottom: 8px; }
.mdir-err-msg { font-size: 13px; color: #7f1d1d; line-height: 1.5; }
.mdir-err-btn {
  margin-top: 14px;
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 10px;
  background: #DC2626;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

/* ─── Dock inferior ─── */
.dir-dock {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  pointer-events: auto;
  height: 72px;
  padding: 4px 8px;
  padding-bottom: max(4px, env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .97);
  border-top: 1px solid var(--mdir-bdr);
  box-shadow: 0 -8px 32px rgba(11, 22, 40, .1);
  backdrop-filter: blur(16px);
  align-items: stretch;
  justify-content: space-around;
  gap: 4px;
}
.dir-dock.hidden { display: none !important; }
.dir-dock-btn {
  flex: 1;
  max-width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: none;
  border-radius: 14px;
  background: transparent;
  color: var(--mdir-txt3);
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(79, 70, 229, 0.15);
  font-family: var(--font);
  font-size: 10px;
  font-weight: 700;
  padding: 6px 2px;
  position: relative;
  transition: background .15s, color .15s;
}
.dir-dock-btn svg { width: 22px; height: 22px; flex-shrink: 0; }
.dir-dock-btn.active {
  background: rgba(20, 184, 166, .12);
  color: var(--mdir-teal2);
}
.dir-dock-btn.active svg { stroke: var(--mdir-teal2); }
.dir-dock-badge {
  position: absolute;
  top: 2px;
  right: 6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #DC2626;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dir-dock-mais { max-width: 52px; }

/* ─── Sheet "Mais" ─── */
.dir-mais-ov {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(11, 22, 40, .5);
  display: flex;
  align-items: flex-end;
  animation: mdirFadeIn .2s ease;
}
@keyframes mdirFadeIn { from { opacity: 0; } to { opacity: 1; } }
.dir-mais-sheet {
  width: 100%;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 8px 16px 24px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
  max-height: 72vh;
  overflow-y: auto;
}
.dir-mais-sheet::before {
  content: '';
  display: block;
  width: 36px;
  height: 4px;
  background: #CBD5E1;
  border-radius: 2px;
  margin: 8px auto 16px;
}
.dir-mais-sheet h3 {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 800;
  color: var(--mdir-navy);
}
.dir-mais-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.dir-mais-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 76px;
  padding: 14px 8px;
  border: 1px solid var(--mdir-bdr);
  border-radius: 14px;
  background: #F8FAFC;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: var(--txt);
  transition: background .12s;
}
.dir-mais-item svg { width: 24px; height: 24px; stroke: var(--mdir-teal2); }
.dir-mais-item:active { background: rgba(20, 184, 166, .1); }
.dir-mais-sair { color: #DC2626; border-color: #FECACA; background: #FEF2F2; }
.dir-mais-sair svg { stroke: #DC2626; }

/* ═══ DASHBOARD SHELL ═══ */
.mdir-shell { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }

.mdir-hero {
  background: linear-gradient(155deg, var(--mdir-navy) 0%, var(--mdir-navy2) 55%, #0D4A52 100%);
  padding: 20px 18px 28px;
  padding-top: max(12px, env(safe-area-inset-top));
  position: relative;
  overflow: hidden;
}
.mdir-hero::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 60%;
  height: 80%;
  background: radial-gradient(circle, rgba(20, 184, 166, .15) 0%, transparent 65%);
  pointer-events: none;
}
.mdir-hero-greet {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.3px;
  position: relative;
}
.mdir-hero-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, .65);
  margin-top: 4px;
  text-transform: capitalize;
  position: relative;
}
.mdir-hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 5px 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .15);
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, .85);
  position: relative;
}
.mdir-hero-chip svg { stroke: var(--mdir-teal); }

/* KPI grid — overlaps hero */
.mdir-kpi-wrap {
  padding: 0 14px;
  margin-top: -18px;
  position: relative;
  z-index: 2;
}
.mdir-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.mdir-kpi {
  background: var(--mdir-card);
  border-radius: var(--mdir-r);
  padding: 14px 16px;
  box-shadow: var(--mdir-shadow);
  border: 1px solid var(--mdir-bdr);
  position: relative;
  overflow: hidden;
}
.mdir-kpi::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--mdir-kpi-accent, var(--mdir-teal));
}
.mdir-kpi-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  background: var(--mdir-kpi-bg, rgba(20, 184, 166, .1));
}
.mdir-kpi-icon svg { width: 16px; height: 16px; stroke: var(--mdir-kpi-accent, var(--mdir-teal2)); }
.mdir-kpi-lbl {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--mdir-txt3);
  margin-bottom: 4px;
}
.mdir-kpi-val {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.3px;
  line-height: 1.1;
  color: var(--mdir-navy);
  font-family: var(--mono);
}
.mdir-kpi-sub {
  font-size: 10px;
  color: var(--mdir-txt3);
  margin-top: 4px;
}

/* Content sections */
.mdir-body { padding: 16px 14px 0; }

.mdir-section {
  background: var(--mdir-card);
  border-radius: var(--mdir-r);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--mdir-shadow);
  border: 1px solid var(--mdir-bdr);
}
.mdir-section-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.mdir-section-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--mdir-navy);
}
.mdir-section-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: #F1F5F9;
  color: var(--mdir-txt3);
}
.mdir-section-badge.warn { background: #FEF2F2; color: #DC2626; }
.mdir-section-badge.ok { background: #ECFDF5; color: #059669; }

/* Alert cards */
.mdir-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .1s;
}
.mdir-alert:last-child { margin-bottom: 0; }
.mdir-alert:active { transform: scale(.98); }
.mdir-alert-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, .6);
}
.mdir-alert-ico svg { width: 18px; height: 18px; }
.mdir-alert-tit { font-size: 13px; font-weight: 700; color: var(--mdir-navy); }
.mdir-alert-sub { font-size: 11px; color: var(--mdir-txt3); margin-top: 2px; }
.mdir-empty {
  text-align: center;
  padding: 24px 16px;
  color: var(--mdir-txt3);
  font-size: 13px;
}
.mdir-empty svg { display: block; margin: 0 auto 10px; stroke: #CBD5E1; }

/* Quick actions */
.mdir-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}
.mdir-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  border: 1px solid var(--mdir-bdr);
  border-radius: 12px;
  background: #F8FAFC;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  color: var(--mdir-navy);
  cursor: pointer;
  transition: background .12s;
}
.mdir-action-btn svg { width: 16px; height: 16px; stroke: var(--mdir-teal2); }
.mdir-action-btn:active { background: rgba(20, 184, 166, .1); }
.mdir-action-btn.primary {
  background: linear-gradient(135deg, var(--mdir-teal2), var(--mdir-teal));
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(14, 124, 134, .25);
}
.mdir-action-btn.primary svg { stroke: #fff; }

/* Resumo rows */
.mdir-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #F1F5F9;
  font-size: 13px;
}
.mdir-stat-row:last-child { border-bottom: none; padding-bottom: 0; }
.mdir-stat-row span { color: var(--mdir-txt3); }
.mdir-stat-row strong { font-family: var(--mono); color: var(--mdir-navy); }

/* ─── Listagens internas (OS, financeiro) ─── */
body.modo-mobile-diretor .mdir-shell ~ .card,
body.modo-mobile-diretor .ca > .card {
  margin: 12px 14px;
  border-radius: var(--mdir-r);
}
body.modo-mobile-diretor .ca > :not(.mdir-shell):not(.mdir-boot):not(.mdir-err-card) {
  padding: 12px 14px 88px;
}
body.modo-mobile-diretor .tbl-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
}
body.modo-mobile-diretor table.tbl { font-size: 12px; }
body.modo-mobile-diretor table.tbl th,
body.modo-mobile-diretor table.tbl td { padding: 10px 8px; }
body.modo-mobile-diretor .filtros,
body.modo-mobile-diretor .toolbar { flex-wrap: wrap; gap: 8px; }
body.modo-mobile-diretor .filtros input,
body.modo-mobile-diretor .filtros select,
body.modo-mobile-diretor .toolbar input {
  min-height: 44px;
  font-size: 14px;
  border-radius: 10px;
}

/* Notificações */
body.modo-mobile-diretor .notif-panel {
  position: fixed !important;
  top: auto !important;
  bottom: calc(72px + env(safe-area-inset-bottom)) !important;
  left: 8px !important;
  right: 8px !important;
  max-height: 50vh;
  border-radius: 16px;
  box-shadow: var(--mdir-shadow-lg);
}

/* Modais */
body.modo-mobile-diretor .ov-box {
  max-width: calc(100vw - 24px) !important;
  max-height: calc(100vh - 100px) !important;
  margin: 12px !important;
  border-radius: 16px !important;
}
body.modo-mobile-diretor .ov-producao-full .ov-box,
body.modo-mobile-diretor .ov-center .ov-box {
  width: calc(100vw - 20px) !important;
}

/* ═══ MOBILE V2 — Dashboard colorido (referência moderna) ═══ */
body.modo-mobile-diretor {
  background: #ECEFF4 !important;
}
body.modo-mobile-diretor .topbar,
body.modo-mobile-diretor .mdir-topbar {
  display: none !important;
}
body.modo-mobile-diretor .ca {
  background: #ECEFF4 !important;
  padding: 0 !important;
}
body.modo-mobile-diretor .pfbanner { flex-shrink: 0; }

.mdir-v2 {
  padding: max(14px, env(safe-area-inset-top)) 18px calc(96px + env(safe-area-inset-bottom));
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

.mdir-v2-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.mdir-v2-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: #111827;
  margin: 0;
  line-height: 1.1;
}
.mdir-v2-sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: #6B7280;
}
.mdir-v2-hd-r {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.mdir-v2-icon-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(15, 23, 42, .08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #374151;
}
.mdir-v2-icon-btn svg { width: 18px; height: 18px; }
.mdir-v2-av {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, .25);
}

.mdir-v2-hero {
  background: linear-gradient(135deg, #4F46E5 0%, #6366F1 55%, #818CF8 100%);
  border-radius: 24px;
  padding: 20px 18px 18px;
  color: #fff;
  box-shadow: 0 16px 40px rgba(79, 70, 229, .35);
  margin-bottom: 14px;
}
.mdir-v2-hero-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  opacity: .9;
  margin-bottom: 8px;
  text-transform: capitalize;
}
.mdir-v2-hero-val {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1;
  margin-bottom: 14px;
}
.mdir-v2-progress {
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .25);
  overflow: hidden;
  margin-bottom: 12px;
}
.mdir-v2-progress i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: #fff;
  transition: width .4s ease;
}
.mdir-v2-hero-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  opacity: .88;
  flex-wrap: wrap;
}

.mdir-v2-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}
.mdir-v2-kpi {
  background: #fff;
  border-radius: 16px;
  padding: 12px 10px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(15, 23, 42, .06);
}
.mdir-v2-kpi span {
  display: block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #9CA3AF;
  margin-bottom: 4px;
}
.mdir-v2-kpi strong {
  font-size: 14px;
  font-weight: 800;
  color: #111827;
  font-family: 'DM Mono', ui-monospace, monospace;
}

.mdir-v2-block { margin-bottom: 18px; }
.mdir-v2-block-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 0 2px;
}
.mdir-v2-block-hd span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  color: #9CA3AF;
}
.mdir-v2-block-hd button {
  border: none;
  background: none;
  color: #4F46E5;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  padding: 4px 0;
}

.mdir-v2-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, .07);
  overflow: hidden;
}
.mdir-v2-li {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-bottom: 1px solid #F3F4F6;
  background: #fff;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.mdir-v2-li:last-child { border-bottom: none; }
.mdir-v2-li:active { background: #F9FAFB; }
.mdir-v2-li-ic {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
  font-weight: 700;
}
.mdir-v2-li-body {
  flex: 1;
  min-width: 0;
}
.mdir-v2-li-body strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mdir-v2-li-body small {
  display: block;
  font-size: 12px;
  color: #6B7280;
  margin-top: 2px;
}
.mdir-v2-li-tag {
  font-size: 11px;
  color: #9CA3AF;
  flex-shrink: 0;
}
.mdir-v2-empty {
  padding: 24px 16px;
  text-align: center;
  color: #6B7280;
  font-size: 13px;
}

.mdir-v2-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.mdir-v2-tile {
  aspect-ratio: 1;
  border: none;
  border-radius: 20px;
  background: var(--tile, #4F46E5);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--tile) 40%, transparent);
  transition: transform .12s;
}
.mdir-v2-tile:active { transform: scale(.96); }
.mdir-v2-tile svg { width: 26px; height: 26px; }

.mdir-v2-resumo { padding: 4px 0; }
.mdir-v2-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #F3F4F6;
  font-size: 13px;
}
.mdir-v2-row:last-child { border-bottom: none; }
.mdir-v2-row span { color: #6B7280; }
.mdir-v2-row strong {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-weight: 800;
  color: #111827;
}

/* Dock moderno */
body.modo-mobile-diretor .dir-dock {
  height: 68px;
  padding: 0 8px;
  padding-bottom: max(6px, env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .98);
  border-top: none;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -8px 32px rgba(15, 23, 42, .12);
  align-items: flex-end;
  justify-content: space-around;
}
body.modo-mobile-diretor .dir-dock-btn {
  flex: 1;
  max-width: 68px;
  font-size: 10px;
  color: #9CA3AF;
  padding-bottom: 6px;
  min-height: 52px;
  justify-content: flex-end;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
body.modo-mobile-diretor .dir-dock-btn.active {
  color: #4F46E5;
  background: #EEF2FF;
}
body.modo-mobile-diretor .dir-dock-btn.dir-dock-fab {
  flex: 0 0 56px;
  max-width: 56px;
  width: 56px;
  height: 56px;
  min-height: 56px;
  padding: 0;
  margin-bottom: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4F46E5, #6366F1);
  color: #fff;
  box-shadow: 0 8px 24px rgba(79, 70, 229, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: flex-end;
}
body.modo-mobile-diretor .dir-dock-btn.dir-dock-fab svg {
  width: 28px;
  height: 28px;
  stroke-width: 2.5;
  display: block;
  flex-shrink: 0;
}
body.modo-mobile-diretor .dir-dock-btn.dir-dock-fab span { display: none; }
body.modo-mobile-diretor .dir-dock-btn.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #4F46E5;
}
body.modo-mobile-diretor .dir-dock-btn.dir-dock-fab.active::after { display: none; }

/* Páginas internas mobile (fora do dashboard) */
.mdir-page {
  padding: max(10px, env(safe-area-inset-top)) 12px calc(88px + env(safe-area-inset-bottom));
  min-height: 100%;
}
.mdir-page-hd {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 4px 2px;
}
.mdir-page-back {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(15, 23, 42, .08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #374151;
  flex-shrink: 0;
  touch-action: manipulation;
}
.mdir-page-back svg { width: 20px; height: 20px; }
.mdir-page-title {
  font-size: 18px;
  font-weight: 800;
  color: #111827;
  letter-spacing: -.02em;
}
.mdir-page-body .page-hd { display: none; }
.mdir-page-body .page-title { font-size: 16px; }

.mdir-v2-tile,
.mdir-v2-li,
.mdir-v2-icon-btn,
.mdir-v2-block-hd button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

/* Notificações mobile (fora da topbar oculta) */
body.modo-mobile-diretor #notifWrap {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  right: 12px;
  z-index: 400;
}
body.modo-mobile-diretor #notifWrap .notif-btn {
  display: none;
}
body.modo-mobile-diretor .notif-panel {
  position: fixed !important;
  top: max(56px, calc(env(safe-area-inset-top) + 44px)) !important;
  bottom: auto !important;
  left: 12px !important;
  right: 12px !important;
  max-height: 60vh;
  border-radius: 20px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, .18);
}
