:root {
  --bg: #0e0e14;
  --nav: #06060a;
  --surface: #101016;
  --text: #e5e7eb;
  --muted: #9a9eaa;
  --border: #22222a;
  --forensic: #b8bcc6;
  --forensic-mid: #989aa2;
  --forensic-deep: #6e7178;
  --forensic-soft: rgba(255, 255, 255, 0.06);
  --forensic-line: rgba(255, 255, 255, 0.14);
  --forensic-blue: #5a9fd4;
  --forensic-blue-mid: #4a90c8;
  --forensic-blue-deep: #2a5a8a;
  --gold: var(--forensic);
  --warn: #fbbf24;
  --danger: #ef4444;
  --field-bg: #121218;
  --log-bg: #040405;
  --log-fg: #8aa4bc;
  --radius: 10px;
  --pro-font: "Instrument Sans", system-ui, sans-serif;
  font-family: var(--pro-font);
}

* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
body.inicio-body {
  overflow: hidden;
  height: 100dvh;
  max-height: 100dvh;
}
button, input, select, textarea { font: inherit; }
a { color: var(--gold); }

#app {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100dvh;
  --presidium-dock-edge: 16px;
  --presidium-dock-gap: 4px;
  --presidium-dock-strip-h: clamp(52px, 7.5vh, 64px);
  --presidium-dock-surface: #12121a;
  --presidium-dock-line: rgba(255, 255, 255, 0.08);
  --presidium-dock-line-muted: rgba(255, 255, 255, 0.05);
}

#nav {
  background: var(--nav);
  border-right: 1px solid var(--border);
  padding: 20px 12px var(--presidium-dock-edge);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 0;
  height: 100dvh;
  max-height: 100dvh;
  box-sizing: border-box;
  overflow: hidden;
}

.brand {
  padding: 10px 10px 16px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}
.brand-home-btn {
  width: 100%;
  margin: 0;
  flex: 0 0 auto;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  border-radius: 10px;
  transition: background 0.15s ease;
}
@media (hover: hover) {
  .brand-home-btn:hover {
    background: rgba(255, 255, 255, 0.04);
  }
}
.brand-home-btn:active {
  background: rgba(74, 144, 200, 0.08);
}
.brand-mark {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  background: #000;
}
.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  min-width: 0;
  flex: 1;
}
.brand-title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  line-height: 1.15;
}
.brand-tagline {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.2;
}

.nav-btn {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.nav-btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: inherit;
  opacity: 0.85;
}

.nav-btn-icon svg,
.nav-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.nav-btn-label {
  flex: 1;
  min-width: 0;
}

.nav-btn.active .nav-btn-icon {
  opacity: 1;
  color: var(--gold);
}
.nav-btn:hover { background: #14141c; }
.nav-btn.active {
  background: #1a1810;
  border-color: #5a4e3a;
  color: var(--gold);
}

.nav-links {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.nav-session-dock {
  flex: 0 0 auto;
  margin-top: auto;
  padding-top: var(--presidium-dock-gap);
}

.nav-session-dock.hidden {
  display: none !important;
}

.nav-session-host {
  display: none !important;
}

.nav-session-sidebar-slot {
  flex: 0 0 auto;
  margin-top: auto;
  padding-top: var(--presidium-dock-gap);
  width: 100%;
}

.inicio-hero-session .nav-session-dock {
  width: auto;
  margin-top: 0;
  padding-top: 0;
}

.inicio-hero-session .inicio-dock.nav-session-dock-card {
  width: auto;
  min-width: 0;
}

.inicio-hero-session .nav-session-panel {
  min-height: 0;
}

.nav-session-dock .inicio-dock {
  width: 100%;
}

.nav-session-dock .nav-session-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: var(--presidium-dock-strip-h);
}

.nav-session-dock .nav-session-user {
  flex: 1;
  min-height: var(--presidium-dock-strip-h);
  padding: 0 10px;
  border: none;
  border-radius: 9px;
  background: transparent;
}

.nav-session-dock .nav-session-user:hover {
  background: rgba(255, 255, 255, 0.04);
}

.nav-session-dock .nav-session-user:active {
  background: rgba(74, 144, 200, 0.1);
}

.nav-session-dock .nav-session-avatar {
  width: 32px;
  height: 32px;
  font-size: 0.88rem;
}

.nav-session-dock .nav-session-name {
  font-size: 0.86rem;
}

.nav-session-dock .nav-session-status {
  font-size: 0.68rem;
}

.nav-session-panel.hidden {
  display: none !important;
}

.nav-session-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.nav-session-user {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

@media (hover: hover) {
  .nav-session-user:hover {
    background: rgba(74, 144, 200, 0.08);
    border-color: rgba(74, 144, 200, 0.22);
  }
}

.nav-session-user:active {
  background: rgba(74, 144, 200, 0.14);
  border-color: rgba(74, 144, 200, 0.38);
}

.nav-session-avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}

.nav-session-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.nav-session-name {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  color: #fff;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-session-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.2;
}

.nav-session-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.55);
  flex-shrink: 0;
}

#main {
  padding: 20px 24px 40px;
  overflow: auto;
}

.app-page-panel {
  display: none;
}

.app-page-panel:not(.is-active) {
  display: none !important;
}

.app-page-panel.is-active {
  display: block;
}

#main.inicio-layout > .app-page-panel.is-active {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  width: 100%;
}

#main.inicio-layout {
  padding: 20px 24px 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  max-height: 100dvh;
  box-sizing: border-box;
}

.page-title { margin: 0 0 6px; font-size: 1.35rem; }
.page-sub { margin: 0 0 18px; color: var(--muted); font-size: 0.9rem; }

.inicio-page {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: clamp(8px, 1.1vh, 14px);
  width: 100%;
  overflow: hidden;
}

.inicio-page .card {
  margin-bottom: 0;
}

.inicio-hero {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 0;
  flex-shrink: 0;
}

.inicio-hero-session {
  flex: 0 0 auto;
  align-self: flex-start;
  margin-left: auto;
  width: auto;
  max-width: min(300px, 44vw);
}

.inicio-hero-session.hidden {
  display: none !important;
}

.inicio-hero-session-user {
  width: auto;
  min-width: 0;
  max-width: 100%;
  padding: 8px 12px 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.inicio-hero-session-user:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.inicio-hero-panel--compact .inicio-hero-session {
  max-width: min(260px, 52vw);
}

.inicio-hero-panel--compact .inicio-hero-session-user {
  padding: 7px 10px 7px 8px;
}

.inicio-hero-text {
  flex: 1 1 320px;
  min-width: 0;
}

.inicio-greeting {
  margin: 0 0 4px;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.3;
}

.inicio-welcome-title {
  margin: 0;
  font-size: clamp(1.5rem, 2.8vw, 1.85rem);
  line-height: 1.2;
  max-width: 100%;
}

.inicio-welcome-lead,
.inicio-welcome-join,
.inicio-welcome-brand {
  display: inline;
}

.inicio-welcome-lead {
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.inicio-welcome-join {
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
}

.inicio-welcome-brand {
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.02em;
}

.inicio-hero-text .inicio-hero-sub {
  margin: 8px 0 0;
  max-width: 720px;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--muted);
}

.inicio-hero-panel {
  flex-shrink: 0;
  padding: 14px 16px 12px;
  border-radius: 12px;
  background: var(--inicio-surface, #12121a);
  border: 1px solid var(--inicio-line, rgba(255, 255, 255, 0.08));
  box-shadow: none;
}

.inicio-hero-panel--compact {
  padding: 10px 12px 8px;
  border-radius: 12px;
}

.inicio-hero-panel--compact .inicio-hero-stat {
  display: none;
}

.inicio-hero-panel .inicio-hero {
  margin-bottom: 0;
}

.inicio-greeting-user {
  color: var(--text);
  font-weight: 600;
}

.inicio-hero-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin: 10px 0 0;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
  line-height: 1.2;
}

.inicio-hero-stat-val {
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.inicio-hero-stat-lbl {
  color: var(--muted);
}

.inicio-hero--compact {
  padding: 0 0 6px;
  gap: 6px 14px;
}

.inicio-hero--compact .inicio-welcome-title {
  font-size: 1.42rem;
}

.inicio-hero--compact .inicio-welcome-brand {
  letter-spacing: 0.02em;
}

.inicio-hero--compact .inicio-hero-sub {
  font-size: 0.85rem;
  max-width: none;
}

.inicio-title {
  color: var(--gold);
  letter-spacing: 0.02em;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  margin-bottom: 2px;
}
.inicio-sub {
  font-size: clamp(0.72rem, 2vw, 0.85rem);
  margin-bottom: 0;
}
.inicio-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #5a4e3a;
  background: linear-gradient(145deg, #12121a 0%, #0c0c12 100%);
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
}
.inicio-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.inicio-status--ok {
  color: var(--gold);
  border-color: rgba(74, 144, 200, 0.55);
}
.inicio-status--ok .inicio-status-dot {
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.65);
}
.inicio-status--warn {
  color: var(--warn);
  border-color: rgba(251, 191, 36, 0.45);
}
.inicio-status--warn .inicio-status-dot {
  background: var(--warn);
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.55);
}

.inicio-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(4px, 1vw, 8px);
  margin-bottom: 0;
}

.inicio-footer {
  flex-shrink: 0;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 4px;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.inicio-last {
  margin-bottom: 0;
  padding: clamp(6px, 1.5vw, 10px) clamp(8px, 2vw, 12px);
  background: var(--inicio-surface, #12121a);
  border-color: var(--inicio-line-muted, rgba(255, 255, 255, 0.06));
  flex-shrink: 0;
}

@media (max-height: 700px) {
  .inicio-last { display: none; }
}

.inicio-grid.photo-grid {
  --inicio-meta-min-h: 34px;
  --inicio-name-font: 0.88rem;
  --inicio-meta-font: 0.68rem;
  --inicio-name-lines: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: var(--inicio-row-h, auto);
  gap: 8px;
  align-items: stretch;
  align-content: start;
  width: 100%;
  flex: 0 0 auto;
  min-height: 0;
  max-height: none;
  overflow-x: clip;
  max-width: 100%;
  --inicio-row-h: auto;
  box-sizing: border-box;
  padding-bottom: 0;
}

.inicio-grid.inicio-grid--ready .photo-card-frame,
.inicio-grid.inicio-grid--ready .photo-card-info {
  transition: none !important;
}

.inicio-grid.inicio-grid--ready .photo-card-frame > img,
.inicio-grid.inicio-grid--ready .photo-card img {
  transition: none !important;
}

.inicio-grid.photo-grid.inicio-grid--scroll {
  flex: 0 0 auto;
  max-height: none;
  overflow: visible;
}

.inicio-photos-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: clip;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(235, 235, 245, 0.24) transparent;
  align-content: flex-start;
  box-sizing: border-box;
}

.inicio-photos-scroll--clip {
  flex: 0 0 auto !important;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.inicio-photos-scroll::-webkit-scrollbar {
  width: 4px;
}

.inicio-photos-scroll::-webkit-scrollbar-track {
  background: transparent;
  margin: 6px 0;
}

.inicio-photos-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.32) 0%,
    rgba(255, 255, 255, 0.16) 100%
  );
  border-radius: 999px;
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.07);
}

.inicio-photos-scroll::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.46) 0%,
    rgba(255, 255, 255, 0.26) 100%
  );
}

/* Cards Início — padrão do print: retrato, cover no topo, texto abaixo */
/* INVARIANTE: foto SEMPRE preenche 100% do retângulo (cover). Nunca contain/letterbox. */
.inicio-grid .photo-card {
  min-width: 0;
  width: 100%;
  height: var(--inicio-row-h);
  min-height: var(--inicio-row-h);
  max-height: none;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0c0c12;
  box-sizing: border-box;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.inicio-grid .photo-card:hover {
  transform: translateY(-1px);
  z-index: 2;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.inicio-grid .photo-card.desligamento:hover,
.inicio-grid .photo-card.saida-temporaria:hover {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.inicio-grid .photo-card-frame {
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 132 / 100;
  height: auto;
  min-height: 0;
  position: relative;
  overflow: hidden;
  background: #000;
  z-index: 0;
}

.inicio-grid.inicio-grid--ready .photo-card-frame,
.inicio-grid.inicio-grid--ready .photo-card .photo-card-frame:not(:empty) {
  aspect-ratio: auto !important;
  flex: 0 0 var(--inicio-photo-h) !important;
  height: var(--inicio-photo-h) !important;
  min-height: var(--inicio-photo-h) !important;
}

.inicio-grid .photo-card img.inicio-thumb-server,
.mobile-inicio-grid .photo-card img.inicio-thumb-server {
  object-fit: cover !important;
  object-position: center center !important;
  transform-origin: center center !important;
}

.inicio-grid .photo-card img,
.mobile-inicio-grid .photo-card img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  object-position: top center;
  display: block;
  margin: 0;
  padding: 0;
  pointer-events: none;
  background: #000;
  transform: scale(1);
  transform-origin: top center;
  filter: contrast(1.04) saturate(1.06) brightness(1.02);
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.32s ease;
  will-change: transform;
}

@media (hover: hover) {
  .inicio-grid .photo-card:hover .photo-card-frame img,
  .mobile-inicio-grid .photo-card:hover .photo-card-frame img {
    transform: scale(1.07);
    filter: contrast(1.07) saturate(1.1) brightness(1.05);
  }
}

.inicio-grid .photo-card-info {
  flex: 0 0 var(--inicio-info-need, auto);
  height: var(--inicio-info-need, auto);
  min-height: var(--inicio-info-need, auto);
  max-height: var(--inicio-info-need, auto);
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  padding: 0 10px 24px;
  overflow: hidden;
  display: grid;
  grid-template-rows: var(--inicio-info-gap, 15px) var(--inicio-name-slot, auto) auto;
  align-content: end;
  justify-items: stretch;
  gap: var(--inicio-name-meta-gap, 2px);
  background: linear-gradient(180deg, #1a1a22 0%, #101018 50%, #0a0a10 100%);
  border-top: 1px solid rgba(74, 144, 200, 0.3);
  text-align: left;
  line-height: 1.2;
  --inicio-name-lines: 1;
}

.inicio-grid .inicio-card-info {
  gap: var(--inicio-name-meta-gap, 2px);
}

.inicio-grid.inicio-grid--roomy-info .inicio-card-info {
  padding: 0 10px 24px;
}

.inicio-grid .inicio-card-caption {
  --inicio-caption-name-shadow: 0 1px 2px rgba(0, 0, 0, 0.32), 0 2px 8px rgba(0, 0, 0, 0.14);
  --inicio-caption-meta-shadow: var(--inicio-caption-name-shadow);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--inicio-name-meta-gap, 5px);
  width: 100%;
  min-width: 0;
  font-family: var(--pro-font);
}

.inicio-grid .inicio-card-caption .inicio-card-name {
  line-height: 1.14;
  height: var(--inicio-name-slot, calc(2 * 1.14 * 1em));
  min-height: var(--inicio-name-slot, calc(2 * 1.14 * 1em));
  max-height: var(--inicio-name-slot, calc(2 * 1.14 * 1em));
  font-weight: 500;
  letter-spacing: -0.022em;
  text-transform: none;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  white-space: normal;
  text-shadow: var(--inicio-caption-name-shadow);
}

.inicio-grid .inicio-card-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  column-gap: 8px;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  font-size: var(--inicio-meta-font, 0.52rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.96);
  font-variant-numeric: tabular-nums;
  text-shadow: var(--inicio-caption-name-shadow);
}

.inicio-grid .inicio-card-meta-left {
  min-width: 0;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inicio-grid .inicio-card-meta-when {
  justify-self: end;
  text-align: right;
  display: inline-flex;
  align-items: baseline;
}

.inicio-grid .inicio-card-name {
  display: block;
  line-height: 1.15;
  height: var(--inicio-name-slot, calc(2 * 1.15 * 1em));
  min-height: var(--inicio-name-slot, calc(2 * 1.15 * 1em));
  max-height: var(--inicio-name-slot, calc(2 * 1.15 * 1em));
  font-size: var(--inicio-name-font, 0.88rem);
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  margin: 0;
  align-self: stretch;
  grid-row: 2;
}

.inicio-grid .inicio-card-name.inicio-card-name--tight {
  font-size: calc(var(--inicio-name-font, 0.88rem) * 0.9);
  letter-spacing: 0;
}

.inicio-grid .inicio-card-meta-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  align-self: stretch;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  width: 100%;
  min-height: 1.2em;
  line-height: 1.15;
  font-size: var(--inicio-meta-font, 0.68rem);
  margin: 0;
  grid-row: 3;
}

.inicio-grid .inicio-card-infopen {
  display: contents;
}

.inicio-grid .inicio-card-meta-label {
  display: none;
}

.inicio-grid .inicio-card-meta-sep {
  flex: 0 0 auto;
  opacity: 0.45;
  margin: 0 2px;
  font-weight: 300;
}

.inicio-grid .inicio-card-meta-row.inicio-card-meta-compact {
  font-size: var(--inicio-meta-font, 0.62rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  color: rgba(220, 224, 232, 0.82);
}

.inicio-grid .inicio-card-meta-val {
  flex: 0 1 auto;
  color: rgba(220, 224, 232, 0.92);
  font-weight: 500;
  font-size: inherit;
  line-height: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.inicio-card-info--clamped .inicio-card-name {
  white-space: nowrap;
}

.inicio-grid .photo-card-info .photo-card-date,
.inicio-grid .inicio-card-date {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  gap: 5px;
  margin-left: 0;
  font-size: inherit;
  line-height: inherit;
  color: #9aa0ac;
  margin-top: 0;
  margin-bottom: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.inicio-grid .inicio-card-meta-date,
.inicio-grid .inicio-card-meta-time {
  flex: 0 0 auto;
  white-space: nowrap;
}

.inicio-grid .photo-card-placeholder,
.inicio-grid .inicio-photo-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, #1a1a24 0%, #12121a 100%);
}

.inicio-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(74, 144, 200, 0.32);
}

.inicio-photo-placeholder svg {
  width: 38%;
  height: 38%;
  max-width: 52px;
}

.inicio-grid .photo-card-st {
  font-size: clamp(0.5rem, 1.4vw, 0.62rem);
  padding: 2px 5px;
  top: 5px;
  left: 5px;
  z-index: 2;
}

.inicio-grid .photo-card:active {
  transform: none;
}

/* Saída temporária — chip na foto + rótulo na seção */
.inicio-grid .photo-card.saida-temporaria {
  outline: none;
  border-color: var(--border);
  box-shadow: none;
}

.inicio-st-section-flag,
.inicio-desl-section-flag,
.inicio-all-section-flag,
.inicio-tz-section-flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 10px;
  border-radius: 8px;
  font-size: clamp(0.6rem, 1.35vw, 0.68rem);
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.1;
  white-space: nowrap;
  text-transform: uppercase;
}

.inicio-st-section-flag {
  background: linear-gradient(135deg, rgba(160, 70, 55, 0.12), rgba(100, 45, 35, 0.07));
  border: 1px solid rgba(255, 160, 120, 0.22);
  color: #d4a894;
}

.inicio-desl-section-flag {
  background: linear-gradient(135deg, rgba(56, 60, 72, 0.28), rgba(38, 42, 52, 0.2));
  border: 1px solid rgba(130, 138, 152, 0.2);
  color: #9aa0ad;
}

.inicio-all-section-flag {
  background: linear-gradient(135deg, rgba(44, 40, 28, 0.28), rgba(30, 28, 20, 0.18));
  border: 1px solid rgba(212, 181, 106, 0.18);
  color: #a89b82;
}

.inicio-st-section-flag .inicio-st-svg,
.inicio-filter-btn-icon .inicio-st-svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  color: #d4926e;
}

.inicio-desl-section-flag .inicio-desl-svg,
.inicio-filter-btn-icon .inicio-desl-svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  color: #8a909c;
}

.inicio-all-section-flag .inicio-all-svg,
.inicio-filter-btn-icon .inicio-all-svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  color: #b8a078;
}

.inicio-tz-section-flag {
  background: linear-gradient(135deg, rgba(48, 50, 58, 0.42), rgba(24, 25, 30, 0.32));
  border: 1px solid rgba(196, 200, 208, 0.2);
  color: #c4c8d0;
}

.inicio-tz-section-flag .inicio-filter-btn-icon,
.inicio-filter-btn-icon .inicio-anklet-svg {
  width: 13px;
  height: 13px;
  max-width: 13px;
  max-height: 13px;
  flex-shrink: 0;
}

.inicio-filter-btn-icon .inicio-anklet-svg {
  display: block;
}

.inicio-tz-section-flag .inicio-filter-btn-count {
  color: #c4c8d0;
  border-color: rgba(196, 200, 208, 0.16);
  background: rgba(36, 38, 44, 0.35);
}

.inicio-all-section-flag .inicio-filter-btn-count {
  color: #b8a882;
  border-color: rgba(212, 181, 106, 0.18);
  background: rgba(40, 34, 20, 0.18);
}

.inicio-desl-section-flag .inicio-filter-btn-count {
  color: #b8bcc6;
}

.inicio-st-section-flag .inicio-filter-btn-count {
  color: #d4a894;
  border-color: rgba(255, 160, 120, 0.16);
  background: rgba(80, 40, 30, 0.18);
}

.inicio-filter-btn.is-active.inicio-all-section-flag {
  background: linear-gradient(135deg, rgba(72, 62, 38, 0.34), rgba(48, 40, 24, 0.26));
  border-color: rgba(212, 181, 106, 0.42);
  color: #e8d4a0;
  box-shadow: 0 0 22px rgba(212, 181, 106, 0.12);
}

.inicio-filter-btn.is-active.inicio-all-section-flag .inicio-filter-btn-count {
  background: rgba(212, 181, 106, 0.14);
  border-color: rgba(212, 181, 106, 0.28);
  color: #e8d4a0;
}

.inicio-filter-btn.is-active.inicio-desl-section-flag {
  background: linear-gradient(135deg, rgba(62, 68, 82, 0.36), rgba(42, 46, 56, 0.28));
  border-color: rgba(150, 158, 172, 0.3);
  color: #b8bcc6;
  box-shadow: none;
}

.inicio-filter-btn.is-active.inicio-desl-section-flag .inicio-filter-btn-count {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(150, 158, 172, 0.24);
  color: #b8bcc6;
}

.inicio-filter-btn.is-active.inicio-st-section-flag {
  background: linear-gradient(135deg, rgba(170, 75, 58, 0.2), rgba(110, 48, 38, 0.12));
  border-color: rgba(255, 160, 120, 0.32);
  color: #d4a894;
  box-shadow: none;
}

.inicio-filter-btn.is-active.inicio-st-section-flag .inicio-filter-btn-count {
  background: rgba(100, 50, 38, 0.22);
  border-color: rgba(255, 160, 120, 0.24);
  color: #d4a894;
}

.inicio-filter-btn.is-active.inicio-tz-section-flag {
  background: linear-gradient(135deg, rgba(72, 74, 82, 0.5), rgba(28, 29, 34, 0.4));
  border-color: rgba(210, 214, 222, 0.3);
  color: #eceef2;
  box-shadow: none;
}

.inicio-filter-btn.is-active.inicio-tz-section-flag .inicio-filter-btn-count {
  background: rgba(48, 50, 58, 0.45);
  border-color: rgba(210, 214, 222, 0.22);
  color: #eceef2;
}

.inicio-filter-pills .inicio-filter-btn-count {
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  font-size: 0.68rem;
}

.inicio-filter-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin: 0 0 clamp(6px, 1vh, 10px);
  padding-bottom: clamp(4px, 0.8vh, 8px);
  border-bottom: 1px solid var(--inicio-line-muted, rgba(255, 255, 255, 0.06));
  flex-shrink: 0;
}

.inicio-section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  flex-shrink: 0;
  margin: 0 0 6px;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--inicio-line-muted, rgba(255, 255, 255, 0.06));
  min-height: 40px;
}

.inicio-section-toolbar .inicio-section-title {
  margin: 0;
  flex: 0 0 auto;
}

.inicio-section-toolbar .inicio-section-flags {
  flex: 0 1 auto;
  margin-left: auto;
}

.inicio-section-flags {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--inicio-line-muted, rgba(255, 255, 255, 0.06));
  box-shadow: none;
}

.inicio-filter-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.inicio-filter-btn-body {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.inicio-filter-btn-label {
  line-height: 1.1;
  letter-spacing: 0.05em;
}

.inicio-filter-btn-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.inicio-filter-btn {
  cursor: pointer;
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.inicio-filter-btn:hover:not(:disabled):not(.is-active) {
  filter: brightness(1.04);
}

.inicio-filter-btn:active:not(:disabled) {
  transform: translateY(0);
}

.inicio-filter-btn:disabled {
  opacity: 0.42;
  cursor: default;
}

.inicio-grid-slot--empty {
  width: 100%;
  height: var(--inicio-row-h);
  min-height: var(--inicio-row-h);
  max-height: var(--inicio-row-h);
  visibility: hidden;
  pointer-events: none;
}

.inicio-grid .inicio-card-mark,
.photo-card-frame .inicio-card-mark,
.inicio-grid .inicio-st-mark,
.inicio-grid .inicio-desl-mark,
.photo-card-frame .inicio-st-mark,
.photo-card-frame .inicio-desl-mark {
  position: absolute;
  bottom: 8px;
  left: 8px;
  top: auto;
  z-index: 3;
  pointer-events: none;
  max-width: calc(100% - 16px);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.38);
  white-space: nowrap;
  text-transform: uppercase;
  line-height: 1.1;
}

.inicio-grid .inicio-card-mark.inicio-st-section-flag,
.photo-card-frame .inicio-card-mark.inicio-st-section-flag,
.inicio-grid .inicio-st-mark.inicio-st-section-flag,
.photo-card-frame .inicio-st-mark {
  background: var(--presidium-exit-st-bg, linear-gradient(135deg, rgba(200, 80, 24, 0.5), rgba(160, 55, 12, 0.4)));
  border: none;
  color: var(--presidium-exit-st-text, #ffd4b0);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.inicio-grid .inicio-card-mark.inicio-desl-section-flag,
.photo-card-frame .inicio-card-mark.inicio-desl-section-flag,
.inicio-grid .inicio-desl-mark.inicio-desl-section-flag,
.photo-card-frame .inicio-desl-mark {
  background: var(--presidium-exit-desl-bg, linear-gradient(135deg, rgba(35, 90, 150, 0.55), rgba(25, 65, 110, 0.42)));
  border: none;
  color: var(--presidium-exit-desl-text, #b8d8f4);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.inicio-grid .inicio-card-mark .inicio-st-svg,
.inicio-grid .inicio-card-mark .inicio-desl-svg,
.inicio-grid .inicio-st-mark .inicio-st-svg,
.inicio-grid .inicio-desl-mark .inicio-desl-svg,
.photo-card-frame .inicio-card-mark .inicio-st-svg,
.photo-card-frame .inicio-card-mark .inicio-desl-svg,
.photo-card-frame .inicio-st-mark .inicio-st-svg,
.photo-card-frame .inicio-desl-mark .inicio-desl-svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.inicio-card-mark--st .inicio-st-svg,
.inicio-st-mark .inicio-st-svg {
  color: var(--presidium-exit-st-icon, #ff9a55);
}

.inicio-card-mark--desl .inicio-desl-svg,
.inicio-desl-mark .inicio-desl-svg {
  color: var(--presidium-exit-desl-icon, #7eb8e8);
}

.inicio-grid .photo-card.desligamento {
  outline: none;
  border-color: var(--border);
  box-shadow: none;
}

.inicio-grid .photo-card.desligamento .photo-card-info {
  border-top: 1px solid var(--inicio-line-muted, rgba(255, 255, 255, 0.06));
}

.inicio-grid .photo-card.saida-temporaria .photo-card-info {
  background: #0c0c12;
  border-top: 1px solid var(--inicio-line-muted, rgba(255, 255, 255, 0.06));
}

.inicio-grid .photo-card.saida-temporaria .photo-card-info strong::before {
  content: none;
}

.inicio-section-head-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.inicio-grid.inicio-grid--compact .inicio-card-mark,
.inicio-grid.inicio-grid--compact .inicio-st-mark,
.inicio-grid.inicio-grid--compact .inicio-desl-mark {
  bottom: 6px;
  left: 6px;
  padding: 4px 8px 4px 6px;
  font-size: clamp(0.48rem, 1.1vw, 0.56rem);
  gap: 5px;
  max-width: calc(100% - 12px);
}

.inicio-grid.inicio-grid--compact .inicio-card-mark .inicio-st-svg,
.inicio-grid.inicio-grid--compact .inicio-card-mark .inicio-desl-svg,
.inicio-grid.inicio-grid--compact .inicio-st-mark .inicio-st-svg,
.inicio-grid.inicio-grid--compact .inicio-desl-mark .inicio-desl-svg {
  width: 10px;
  height: 10px;
}

.inicio-grid.inicio-grid--compact .photo-card-info {
  padding: 0 7px 14px;
}

.inicio-grid.inicio-grid--compact .inicio-card-name {
  margin-bottom: 0;
  line-height: 1.15;
}

.inicio-grid.inicio-grid--compact .inicio-card-meta-row {
  gap: 3px;
}

.inicio-grid.inicio-grid--compact .inicio-card-date {
  white-space: nowrap;
}

/* Início: alinhar dock da sessão (nav) com o rodapé de métricas */
#app.inicio-app {
  --inicio-dock-edge: var(--presidium-dock-edge);
  --inicio-dock-gap: 2px;
  --inicio-dock-strip-h: clamp(40px, 5.2vh, 46px);
  --presidium-dock-strip-h: clamp(40px, 5.2vh, 46px);
  --inicio-surface: var(--presidium-dock-surface);
  --inicio-line: var(--presidium-dock-line);
  --inicio-line-muted: var(--presidium-dock-line-muted);
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  align-items: stretch;
}

#app.inicio-app #nav {
  padding-bottom: var(--presidium-dock-edge);
}

#app.inicio-app #main.inicio-layout {
  height: 100%;
  max-height: 100dvh;
  padding-bottom: var(--presidium-dock-edge);
  box-sizing: border-box;
}

#app.inicio-app .inicio-footer {
  margin-top: auto;
  padding-top: 2px;
  padding-bottom: 0;
}

#app.inicio-app .inicio-page {
  gap: clamp(6px, 0.75vh, 10px);
}

#app.inicio-app .inicio-hero-panel {
  padding: 10px 14px 8px;
}

#app.inicio-app .inicio-hero-text .inicio-hero-sub {
  margin-top: 4px;
  font-size: 0.84rem;
}

#app.inicio-app .inicio-hero-stat {
  margin-top: 6px;
  padding: 4px 10px;
}

#app.inicio-app .inicio-welcome-title {
  font-size: clamp(1.35rem, 2.4vw, 1.65rem);
}

#app.inicio-app .inicio-section-toolbar {
  min-height: 34px;
  margin-bottom: 4px;
  padding-bottom: 6px;
}

#app.inicio-app .inicio-dock {
  padding: 2px;
}

#app.inicio-app .inicio-metric {
  padding: 4px 6px;
}

#app.inicio-app .inicio-metric-val {
  font-size: clamp(0.88rem, 2.8vw, 1.28rem);
  line-height: 1.05;
}

#app.inicio-app .inicio-metric--total .inicio-metric-val {
  font-size: clamp(0.95rem, 3vw, 1.35rem);
}

#app.inicio-app .inicio-metric-lbl {
  margin-top: 1px;
  font-size: clamp(0.54rem, 1.6vw, 0.62rem);
}

.inicio-dock {
  width: 100%;
  padding: 3px;
  border-radius: 12px;
  background: var(--presidium-dock-surface, var(--inicio-surface, #12121a));
  border: 1px solid var(--presidium-dock-line, var(--inicio-line, rgba(255, 255, 255, 0.08)));
  box-shadow: none;
  box-sizing: border-box;
}

.inicio-dock .inicio-metrics {
  gap: 0;
  margin: 0;
}

.inicio-dock .inicio-metric {
  border: none;
  border-radius: 9px;
  box-shadow: none;
  background: transparent;
}

.inicio-dock .inicio-metric:not(:last-child) {
  border-right: 1px solid var(--inicio-line-muted, rgba(255, 255, 255, 0.06));
}

#app.inicio-app .inicio-metrics {
  min-height: var(--inicio-dock-strip-h);
  align-items: stretch;
}

#app.inicio-app .inicio-metric {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: var(--inicio-dock-strip-h);
  box-sizing: border-box;
}

.inicio-section-eyebrow {
  display: block;
  margin-bottom: 8px;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.inicio-last-info {
  text-align: left;
}
.inicio-last-date,
.photo-bar-date,
.photo-card-date {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}

.inicio-section {
  background: var(--inicio-surface-soft, #101018);
  border-color: var(--inicio-line-muted, rgba(255, 255, 255, 0.06));
  margin-bottom: 0;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 100%;
}

.inicio-section.inicio-photos {
  padding: 10px 12px 8px;
  border-radius: 12px;
  background: var(--inicio-surface, #12121a);
  border: 1px solid var(--inicio-line, rgba(255, 255, 255, 0.08));
  justify-content: flex-start;
  box-shadow: none;
}

.inicio-section--panel {
  border-color: var(--inicio-line-muted, rgba(255, 255, 255, 0.06));
}

.inicio-section.inicio-photos .inicio-photos-scroll {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  padding: 4px 2px 4px;
  margin: 0;
  overflow-y: auto;
  overflow-x: clip;
  border-radius: 8px;
  background: transparent;
  box-sizing: border-box;
}

.inicio-section.inicio-photos .inicio-photos-scroll.inicio-photos-scroll--clip {
  flex: 0 0 auto;
  padding-bottom: 6px;
}

.inicio-section.inicio-photos .inicio-grid {
  margin: 0;
  padding: 0;
}

.inicio-section.inicio-photos .inicio-grid {
  flex: 0 0 auto;
}

.inicio-section.inicio-photos .inicio-grid.inicio-grid--scroll {
  flex: 0 0 auto;
}

.inicio-metric {
  background: transparent;
  border: none;
  border-radius: 9px;
  padding: clamp(5px, 1.2vw, 10px) clamp(4px, 1vw, 8px);
  text-align: center;
  box-shadow: none;
}

.inicio-metric--total {
  border-color: transparent;
  background: transparent;
}

.inicio-dock .inicio-metric--total {
  background: transparent;
}

.inicio-metric--total .inicio-metric-val {
  font-size: clamp(1.05rem, 3.6vw, 1.58rem);
  text-shadow: none;
  color: #fff;
}

.inicio-metric-val--pulse {
  animation: inicio-metric-pulse 0.45s ease;
}

@keyframes inicio-metric-pulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.06); color: var(--gold); }
  100% { transform: scale(1); }
}

.inicio-metric--today .inicio-metric-val {
  color: var(--gold);
}

.inicio-metric--week .inicio-metric-val,
.inicio-metric--month .inicio-metric-val {
  color: #fff;
}

.inicio-metric-val {
  display: block;
  font-size: clamp(0.95rem, 3.2vw, 1.45rem);
  line-height: 1.1;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.inicio-metric-lbl {
  display: block;
  margin-top: 2px;
  font-size: clamp(0.58rem, 1.8vw, 0.68rem);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.inicio-grid--filtering .photo-card,
.inicio-grid--filtering .inicio-skeleton-card {
  animation: inicio-filter-fade 0.28s ease;
}

@keyframes inicio-filter-fade {
  0% { opacity: 0.45; transform: translateY(4px); }
  100% { opacity: 1; transform: translateY(0); }
}

.inicio-grid--skeleton {
  pointer-events: none;
}

.inicio-skeleton-card {
  min-width: 0;
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: #0c0c12;
  overflow: hidden;
}

.inicio-skeleton-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  min-height: 80px;
  background: linear-gradient(
    110deg,
    rgba(24, 24, 32, 0.9) 0%,
    rgba(36, 36, 48, 0.65) 45%,
    rgba(24, 24, 32, 0.9) 90%
  );
  background-size: 200% 100%;
  animation: inicio-shimmer 1.4s ease-in-out infinite;
}

.inicio-skeleton-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
}

.inicio-skeleton-line {
  display: block;
  height: 10px;
  border-radius: 4px;
  background: linear-gradient(
    110deg,
    rgba(28, 28, 38, 0.9) 0%,
    rgba(42, 42, 54, 0.6) 45%,
    rgba(28, 28, 38, 0.9) 90%
  );
  background-size: 200% 100%;
  animation: inicio-shimmer 1.4s ease-in-out infinite;
}

.inicio-skeleton-line--lg {
  width: 72%;
  height: 12px;
}

.inicio-skeleton-line:not(.inicio-skeleton-line--lg) {
  width: 48%;
}

@keyframes inicio-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.inicio-empty-panel {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 180px;
  padding: 28px 20px;
  text-align: center;
  border-radius: 12px;
  border: 1px dashed rgba(74, 144, 200, 0.22);
  background: rgba(8, 8, 14, 0.45);
}

.inicio-empty-icon {
  font-size: 2rem;
  line-height: 1;
  opacity: 0.85;
}

.inicio-empty-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.inicio-empty-text {
  margin: 0;
  max-width: 320px;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--muted);
}

.inicio-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: clamp(2px, 0.5vh, 4px);
  padding-bottom: 0;
  border-bottom: none;
  flex-shrink: 0;
}

.inicio-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: clamp(0.82rem, 1.8vw, 0.92rem);
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.1;
}

.inicio-section-title::before {
  content: "";
  flex-shrink: 0;
  width: 2px;
  height: 13px;
  border-radius: 1px;
  background: rgba(74, 144, 200, 0.68);
}

/* Quando o acento é um span explícito, o ::before não deve existir (evita corte por overflow) */
.inicio-section-title:has(.inicio-section-accent)::before {
  content: none;
  display: none;
  width: 0;
  height: 0;
  margin: 0;
  box-shadow: none;
  background: none;
}

.inicio-section-accent {
  display: block;
  flex: 0 0 auto;
  width: 2px;
  height: 13px;
  border-radius: 1px;
  background: rgba(74, 144, 200, 0.68);
}

.inicio-empty {
  margin: 0;
  padding: 24px 12px;
  text-align: center;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

.metric {
  background: #0c0c12;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  text-align: center;
}
.metric .val { font-size: 1.6rem; color: var(--gold); font-weight: 600; }
.metric .lbl { font-size: 0.75rem; color: var(--muted); margin-top: 4px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid #5a4e3a;
  background: #121214;
  color: var(--text);
  cursor: pointer;
}
.btn:hover { background: #1e1810; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.gold { border-color: var(--gold); color: var(--gold); }
.btn.danger { border-color: #7f1d1d; color: #fca5a5; }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; align-items: center; }
.toolbar .grow { flex: 1; min-width: 200px; }

input[type="search"], input[type="text"], input[type="date"], select, textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #5a4e3a;
  background: var(--field-bg);
  color: var(--text);
}

.ok { color: var(--gold); }
.warn { color: var(--warn); }
.err { color: var(--danger); }

.qr-wrap {
  text-align: center;
  background: #1a1a1a;
  padding: 16px;
  border-radius: 8px;
}
.qr-wrap img {
  max-width: min(320px, 90vw);
  background: #fff;
  image-rendering: pixelated;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 14px;
}

/* Cards Início — padrão do print (ver bloco .inicio-grid acima) */

.photo-card {
  background: #0c0c12;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 0ms, box-shadow 0ms, transform 0ms;
}
@media (hover: hover) {
  .photo-card:hover {
    border-color: rgba(74, 144, 200, 0.55);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}
.photo-card:active {
  border-color: var(--gold);
  transform: scale(0.985);
}
.photo-card-frame {
  position: relative;
  background: #14141c;
}
.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  background: transparent;
}
.photo-card-frame:not(:empty) {
  aspect-ratio: 3/4;
}

/* Início desktop: retrato 3:4 = mesma proporção da miniatura servidor. */
.inicio-grid:not(.inicio-grid--ready) .photo-card .photo-card-frame:not(:empty) {
  aspect-ratio: 3 / 4 !important;
  flex: 0 0 auto !important;
  height: auto !important;
  min-height: 0 !important;
  width: 100% !important;
}

/* Miniatura — preenchimento total do quadro (layout clássico; moderno usa premium.css). */
.inicio-page:not(.inicio-ui-modern) .inicio-grid .photo-card-frame > img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: top center !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
  background: #000 !important;
  transform: scale(1) !important;
  transform-origin: top center !important;
  filter: contrast(1.04) saturate(1.06) brightness(1.02);
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.32s ease !important;
}

@media (hover: hover) {
  .inicio-page:not(.inicio-ui-modern) .inicio-grid .photo-card:hover .photo-card-frame > img {
    transform: scale(1.07) !important;
    filter: contrast(1.07) saturate(1.1) brightness(1.05) !important;
  }
}
.photo-card-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: #111;
}

.inicio-grid .photo-card-placeholder {
  aspect-ratio: auto;
}

.photo-card-st {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(231, 76, 60, 0.92);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.photo-card-info {
  padding: 10px 10px 11px;
  text-align: left;
  line-height: 1.35;
  background: rgba(0, 0, 0, 0.35);
  border-top: 1px solid #2a2a32;
}
.photo-card-info strong {
  display: block;
  font-size: 0.88rem;
  color: var(--gold);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.photo-card-info span {
  display: block;
  font-size: 0.76rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
.arch-table-wrap {
  touch-action: manipulation;
  -webkit-overflow-scrolling: touch;
  contain: layout style paint;
}

.arch-list-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  min-height: 44px;
}

.arch-toolbar-spacer {
  display: inline-block;
  min-width: 88px;
  min-height: 40px;
  visibility: hidden;
  pointer-events: none;
}

.arch-table-wrap table.data.arch-list-table {
  table-layout: fixed;
}

.arch-table-wrap table.data.arch-list-table col.arch-col-date { width: 15%; }
.arch-table-wrap table.data.arch-list-table col.arch-col-name { width: 34%; }
.arch-table-wrap table.data.arch-list-table col.arch-col-tipo { width: 22%; }
.arch-table-wrap table.data.arch-list-table col.arch-col-infopen { width: 14%; }
.arch-table-wrap table.data.arch-list-table col.arch-col-saidas { width: 15%; }

.arch-table-wrap table.data.arch-event-table col.arch-col-date { width: 12%; }
.arch-table-wrap table.data.arch-event-table col.arch-col-name { width: 18%; }
.arch-table-wrap table.data.arch-event-table col.arch-col-infopen { width: 10%; }
.arch-table-wrap table.data.arch-event-table col.arch-col-cidade { width: 10%; }
.arch-table-wrap table.data.arch-event-table col.arch-col-orgao { width: 18%; }
.arch-table-wrap table.data.arch-event-table col.arch-col-tipo { width: 12%; }
.arch-table-wrap table.data.arch-event-table col.arch-col-tz { width: 10%; }
.arch-table-wrap table.data.arch-event-table col.arch-col-edit { width: 96px; }
.arch-table-wrap table.data.arch-event-table col.arch-col-delete { width: 104px; }

.arch-table-wrap table.data.arch-sheet-table col.arch-col-date { width: 11%; }
.arch-table-wrap table.data.arch-sheet-table col.arch-col-name { width: 16%; }
.arch-table-wrap table.data.arch-sheet-table col.arch-col-infopen { width: 9%; }
.arch-table-wrap table.data.arch-sheet-table col.arch-col-cidade { width: 10%; }
.arch-table-wrap table.data.arch-sheet-table col.arch-col-orgao { width: 20%; }
.arch-table-wrap table.data.arch-sheet-table col.arch-col-tipo { width: 12%; }
.arch-table-wrap table.data.arch-sheet-table col.arch-col-tz { width: 10%; }
.arch-table-wrap table.data.arch-sheet-table col.arch-col-edit { width: 96px; }
.arch-table-wrap table.data.arch-sheet-table col.arch-col-delete { width: 104px; }

.arch-table-wrap table.data.arch-sheet-table td.arch-orgao-cell {
  white-space: normal;
  font-size: 0.82rem;
  line-height: 1.25;
}

.arch-table-wrap table.data.cadastro-table col.cad-col-name { width: 38%; }
.arch-table-wrap table.data.cadastro-table col.cad-col-infopen { width: 14%; }
.arch-table-wrap table.data.cadastro-table col.cad-col-saidas { width: 10%; }
.arch-table-wrap table.data.cadastro-table col.cad-col-date { width: 16%; }
.arch-table-wrap table.data.cadastro-table col.cad-col-comp { width: 22%; }

.arch-table-wrap table.data.cadastro-table td.cad-name-cell {
  white-space: normal;
  height: auto;
  min-height: 56px;
  max-height: none;
  padding-top: 8px;
  padding-bottom: 8px;
}

.cad-name-cell-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.cad-name-avatar {
  flex: 0 0 44px;
  width: 44px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-2, #1a2230);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cad-name-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cad-name-avatar--empty {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
  border-style: dashed;
}

.cad-name-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cad-name-text {
  font-size: 0.95rem;
  line-height: 1.25;
}

.cad-name-sub {
  font-style: normal;
  font-size: 0.78rem;
  color: var(--muted);
}

.arch-table-wrap table.data.cadastro-table td.cad-tipo-cell {
  white-space: normal;
  font-size: 0.84rem;
  vertical-align: middle;
}

.cad-tipo-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.cad-tipo-tag {
  font-size: 0.6rem;
}

.cad-tipo-tag .inicio-desl-svg,
.cad-tipo-tag .inicio-st-svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
}

.arch-table-wrap table.data.cadastro-table th.arch-col-label--comp,
.arch-table-wrap table.data.cadastro-table td.cad-tipo-cell {
  text-align: left;
}

.arch-table-wrap table.data.cadastro-table th[data-sort="saidas"],
.arch-table-wrap table.data.cadastro-table td:nth-child(3) {
  text-align: center;
}

.arch-cadastro-multi .cad-name-text {
  font-weight: 700;
}

.arch-table-wrap table.data.arch-list-table th,
.arch-table-wrap table.data.arch-list-table td {
  height: 48px;
  max-height: 48px;
  padding: 0 12px;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-sizing: border-box;
}

.arch-table-wrap table.data.arch-list-table td.arch-name-cell,
.arch-table-wrap table.data.arch-list-table td.arch-exit-cell {
  white-space: normal;
}

.arch-table-wrap table.data.arch-list-table tbody tr {
  contain-intrinsic-size: auto 48px;
}

.arch-table-wrap table.data.arch-list-table th.arch-sort-th:last-child,
.arch-table-wrap table.data.arch-list-table td:last-child {
  text-align: center;
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
table.data th, table.data td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
table.data th {
  background: #0c0c12;
  color: var(--gold);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  touch-action: manipulation;
}
@media (hover: hover) {
  table.data tr:hover td { background: #14141c; }
  table.data td.arch-name-cell:hover { color: var(--gold); }
}
table.data tr.selected td { background: #1a1810; }
table.data tbody tr {
  content-visibility: auto;
  contain-intrinsic-size: auto 44px;
}
table.data td.arch-name-cell {
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  min-height: 44px;
  vertical-align: middle;
  transition: color 0ms, background 0ms;
}
.arch-name-text {
  min-width: 0;
}
table.data td.arch-exit-cell {
  vertical-align: middle;
  white-space: nowrap;
}
table.data th.arch-sort-th {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}
.arch-sort-th-inner {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.arch-sort-th-inner svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}
.arch-sort-th-inner--desl svg {
  color: #8b919e;
}
.arch-sort-th-inner--st svg {
  color: #ff9a55;
}
.arch-exit-type-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 5px 11px 5px 8px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1;
  white-space: nowrap;
  text-transform: uppercase;
  pointer-events: none;
  border: 1px solid transparent;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.32);
}
.arch-exit-type-tag svg,
.arch-exit-type-tag .inicio-st-svg,
.arch-exit-type-tag .inicio-desl-svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}
.arch-exit-type-tag--st {
  background: linear-gradient(135deg, rgba(220, 96, 32, 0.62), rgba(175, 58, 14, 0.5));
  border-color: rgba(255, 148, 72, 0.32);
  color: #ffe4cc;
}
.arch-exit-type-tag--st svg,
.arch-exit-type-tag--st .inicio-st-svg {
  color: #ff9348;
}
.arch-exit-type-tag--desl {
  background: linear-gradient(135deg, rgba(44, 102, 162, 0.64), rgba(28, 72, 128, 0.5));
  border-color: rgba(118, 188, 248, 0.3);
  color: #d2ebff;
}
.arch-exit-type-tag--desl svg,
.arch-exit-type-tag--desl .inicio-desl-svg {
  color: #7ec4ff;
}
.arch-exit-type-tag--tz {
  background:
    linear-gradient(180deg, #16161a 0%, #030304 100%) padding-box,
    linear-gradient(120deg, rgba(255, 255, 255, 0.62) 0%, rgba(255, 255, 255, 0.24) 45%, rgba(255, 255, 255, 0.56) 100%) border-box;
  border: 1px solid transparent;
  color: #ffffff;
}
.arch-exit-type-tag--tz svg,
.arch-exit-type-tag--tz .inicio-anklet-svg {
  color: #c4c8d0;
}
table.data td.arch-name-cell:active {
  background: #1a1810;
  color: var(--gold);
}

.arch-view-toggle {
  display: inline-flex;
  gap: 4px;
  flex-shrink: 0;
}
.arch-view-btn.active {
  border-color: var(--gold);
  color: var(--gold);
  background: #1a1810;
}
.arch-exit-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #5a4e3a;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 600;
}
.arch-cadastro-multi td.arch-name-cell {
  font-weight: 600;
}

.cadastro-modal {
  width: min(720px, 96vw);
  max-height: 90vh;
  overflow: auto;
}
.cadastro-modal-title {
  margin: 0 0 4px;
  color: var(--gold);
}
.cadastro-modal-sub {
  margin: 0 0 16px;
}
.cadastro-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: min(60vh, 520px);
  overflow: auto;
  padding-right: 4px;
}
.cadastro-event {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0c0c12;
  color: var(--text);
  cursor: pointer;
  touch-action: manipulation;
}
@media (hover: hover) {
  .cadastro-event:hover {
    border-color: var(--gold);
    background: #14141c;
  }
}
.cadastro-event img {
  width: 72px;
  height: 96px;
  object-fit: cover;
  object-position: top center;
  border-radius: 6px;
  flex-shrink: 0;
  background: #000;
}
.cadastro-no-photo {
  width: 72px;
  height: 96px;
  border-radius: 6px;
  background: #111;
  flex-shrink: 0;
}
.cadastro-event-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.cadastro-event-meta strong {
  color: var(--gold);
}
.cadastro-event-meta small {
  color: var(--muted);
}
.cadastro-st-tag {
  color: var(--warn);
  font-style: normal;
  font-size: 0.82rem;
}
.cadastro-desl-tag {
  color: #9ca3af;
  font-style: normal;
  font-size: 0.82rem;
}
.cadastro-modal-actions {
  margin-top: 16px;
  margin-bottom: 0;
}

#logBox {
  width: 100%;
  min-height: 220px;
  max-height: 360px;
  overflow: auto;
  background: var(--log-bg);
  color: var(--log-fg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.82rem;
  white-space: pre-wrap;
}

.logout-confirm-modal {
  width: min(100%, 380px);
  padding: 22px 20px 18px;
  text-align: center;
}

.logout-confirm-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: rgba(74, 144, 200, 0.12);
  border: 1px solid rgba(74, 144, 200, 0.28);
  color: var(--gold);
}

.logout-confirm-title {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: #fff;
}

.logout-confirm-text {
  margin: 0 0 18px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted);
}

.logout-confirm-actions {
  justify-content: center;
  gap: 10px;
}

.logout-confirm-actions .btn {
  min-width: 108px;
}

.session-menu-modal {
  width: min(100%, 340px);
  padding: 18px 16px 14px;
}

.session-menu-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.session-menu-avatar {
  width: 42px;
  height: 42px;
  font-size: 1rem;
}

.session-menu-head-text {
  min-width: 0;
  flex: 1;
}

.session-menu-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  text-transform: lowercase;
  color: #fff;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-menu-status {
  margin: 4px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.45);
}

.session-menu-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.session-menu-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #0c0c12;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

@media (hover: hover) {
  .session-menu-btn:hover {
    background: rgba(74, 144, 200, 0.1);
    border-color: rgba(74, 144, 200, 0.35);
    color: var(--forensic, var(--gold));
  }

  .session-menu-btn:hover .session-menu-btn-icon {
    color: var(--forensic, var(--gold));
  }
}

.session-menu-btn--danger {
  color: #ffb4b4;
}

@media (hover: hover) {
  .session-menu-btn--danger:hover {
    color: #ff8a8a;
    border-color: rgba(255, 120, 120, 0.35);
    background: rgba(120, 30, 30, 0.12);
  }
}

.session-menu-btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.9;
}

.session-menu-btn-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.session-menu-btn-label {
  flex: 1;
  min-width: 0;
}

.session-menu-cancel {
  width: 100%;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: rgba(235, 235, 245, 0.55) !important;
}

@media (hover: hover) {
  .session-menu-cancel:hover {
    background: rgba(74, 144, 200, 0.08) !important;
    border-color: rgba(74, 144, 200, 0.28) !important;
    color: #f5f5f7 !important;
  }
}

.session-menu-cancel:active {
  background: rgba(74, 144, 200, 0.14) !important;
  border-color: rgba(74, 144, 200, 0.42) !important;
  color: #f5f5f7 !important;
}

.session-menu-cancel:focus-visible {
  outline: none;
  border-color: rgba(74, 144, 200, 0.45) !important;
  box-shadow: 0 0 0 3px rgba(74, 144, 200, 0.12);
}

@media (hover: hover) {
  .logout-confirm-actions .btn:not(.gold):hover {
    background: rgba(74, 144, 200, 0.08);
    border-color: rgba(74, 144, 200, 0.28);
    color: var(--forensic, var(--gold));
  }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  max-width: 96vw;
  max-height: 92vh;
  overflow: auto;
  padding: 16px;
}
.gallery-backdrop {
  padding: 0;
  align-items: stretch;
  background: rgba(4, 4, 8, 0.92);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
}

.modal.photo-modal {
  background: #0a0a10;
  border: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100vw;
  height: 100%;
  max-height: 100dvh;
  border-radius: 0;
  overflow: hidden;
}

.gal-topbar {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 8px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 8px;
  background: linear-gradient(180deg, rgba(12, 12, 18, 0.96) 0%, rgba(12, 12, 18, 0.72) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 4;
}

.gal-top-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #e8eaef;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.gal-top-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(74, 144, 200, 0.35);
  color: var(--gold);
}

.gal-close-btn {
  font-size: 1.45rem;
  font-weight: 300;
}

.gal-top-counter {
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: #e5e7eb;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.gal-top-spacer {
  width: 40px;
  height: 40px;
}

.gal-stage {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
  background:
    radial-gradient(ellipse 80% 60% at 50% 42%, rgba(32, 32, 42, 0.55) 0%, transparent 70%),
    linear-gradient(180deg, #0d0d14 0%, #08080e 100%);
}

.gal-stage--dragging {
  touch-action: none;
  cursor: grabbing;
}

.gal-track {
  display: flex;
  height: 100%;
  width: 300%;
  will-change: transform;
}

.gal-track--solo {
  width: 100%;
  transform: none !important;
}

.gal-slide {
  flex: 0 0 33.333333%;
  width: 33.333333%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 8px 10px;
  box-sizing: border-box;
}

.gal-track--solo .gal-slide {
  flex: 0 0 100%;
  width: 100%;
}

.gal-slide:not(.gal-slide--current) {
  opacity: 0.72;
  filter: saturate(0.88);
  transition: opacity 0.25s ease, filter 0.25s ease;
}

.gal-stage--dragging .gal-slide:not(.gal-slide--current) {
  opacity: 0.9;
  filter: none;
}

.gal-img-shell {
  flex: 1;
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
  background: transparent;
}

.gal-img-shell--zoomed {
  cursor: grab;
}

.gal-img-shell--zoomed:active {
  cursor: grabbing;
}

.gal-img-shell img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  transform-origin: center center;
  pointer-events: none;
  border-radius: 3px;
  box-shadow: 0 10px 42px rgba(0, 0, 0, 0.42);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.gal-img-shell img.photo-gal-zooming {
  max-width: none;
  max-height: none;
  box-shadow: none;
  border-radius: 0;
}

.gal-img-shell img.photo-zoom-hq {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: high-quality;
}

.gal-name-line .arch-exit-type-tag {
  flex-shrink: 0;
}

.gal-type-badge {
  position: static;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 8px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1;
  flex-shrink: 0;
  white-space: nowrap;
}

.gal-type-badge--st {
  background: var(--presidium-exit-st-bg, linear-gradient(135deg, rgba(200, 80, 24, 0.5), rgba(160, 55, 12, 0.4)));
  border: none;
  color: var(--presidium-exit-st-text, #ffd4b0);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.32);
}

.gal-type-badge--st .inicio-st-svg {
  width: 12px;
  height: 12px;
  color: var(--presidium-exit-st-icon, #ff9a55);
}

.gal-type-badge--desl {
  background: var(--presidium-exit-desl-bg, linear-gradient(135deg, rgba(35, 90, 150, 0.55), rgba(25, 65, 110, 0.42)));
  border: none;
  color: var(--presidium-exit-desl-text, #b8d8f4);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.32);
}

.gal-type-badge--desl .inicio-desl-svg {
  width: 12px;
  height: 12px;
  color: var(--presidium-exit-desl-icon, #7eb8e8);
}

.gal-nav-arrow {
  position: absolute;
  top: 50%;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(10, 10, 16, 0.52);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, 0.88);
  cursor: pointer;
  transform: translateY(-50%);
  opacity: 0.78;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.28);
  transition: opacity 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.gal-nav-arrow svg {
  width: 20px;
  height: 20px;
  pointer-events: none;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.gal-nav-arrow:hover,
.gal-nav-arrow:focus-visible {
  opacity: 1;
  background: rgba(74, 144, 200, 0.14);
  border-color: rgba(74, 144, 200, 0.42);
  color: var(--gold);
  transform: translateY(-50%);
}

.gal-nav-arrow--prev:hover svg,
.gal-nav-arrow--prev:focus-visible svg {
  transform: translateX(-2px);
}

.gal-nav-arrow--next:hover svg,
.gal-nav-arrow--next:focus-visible svg {
  transform: translateX(2px);
}

.gal-nav-arrow:active {
  transform: translateY(-50%);
}

.gal-nav-arrow--prev {
  left: max(10px, env(safe-area-inset-left, 0px));
}

.gal-nav-arrow--next {
  right: max(10px, env(safe-area-inset-right, 0px));
}

.gal-stage--dragging .gal-nav-arrow {
  opacity: 0.35;
  pointer-events: none;
}

.gal-slide-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--muted);
  font-size: 0.92rem;
}

.gal-footer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(0deg, rgba(8, 8, 14, 0.98) 0%, rgba(10, 10, 16, 0.88) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.gal-footer-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gal-info-head {
  margin: 0 0 4px;
}

.gal-name-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  line-height: 1.3;
}

.gal-name {
  display: inline;
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--gold);
  line-height: 1.25;
  margin: 0;
}

.gal-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.35;
}

.gal-meta-lbl {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.38);
  margin-right: 4px;
}

.gal-meta-sep {
  opacity: 0.45;
}

.gal-meta-date {
  font-variant-numeric: tabular-nums;
}

.gal-zoom-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.gal-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #e5e7eb;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.gal-tool-btn--text {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0 14px;
}

.gal-download-btn {
  margin-left: 2px;
}

.gal-tool-btn:hover {
  background: rgba(74, 144, 200, 0.12);
  border-color: rgba(74, 144, 200, 0.35);
  color: var(--gold);
}

.gal-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  max-height: 28px;
  overflow: hidden;
}

.gal-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  transition: transform 0.2s ease, background 0.2s ease, width 0.2s ease;
}

.gal-dot.is-active {
  width: 18px;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(74, 144, 200, 0.45);
}

.photo-modal--st .gal-stage {
  background:
    radial-gradient(ellipse 70% 55% at 50% 40%, rgba(80, 28, 18, 0.22) 0%, transparent 68%),
    linear-gradient(180deg, #100c0c 0%, #08080e 100%);
}

.photo-modal--desl .gal-stage {
  background:
    radial-gradient(ellipse 70% 55% at 50% 40%, rgba(40, 48, 68, 0.2) 0%, transparent 68%),
    linear-gradient(180deg, #0c0d12 0%, #08080e 100%);
}

/* Legado — galeria antiga e photo-viewport em outros contextos */
.photo-viewport {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
}

.photo-viewport:active {
  cursor: grabbing;
}

.photo-viewport img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  transform-origin: center center;
  pointer-events: none;
  image-rendering: auto;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.photo-viewport img.photo-gal-zooming {
  max-width: none;
  max-height: none;
  object-fit: unset;
}

.photo-viewport img.photo-zoom-hq {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: high-quality;
}

.photo-viewport--empty {
  cursor: default;
}

.photo-empty-msg {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.photo-bar {
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.88);
  border-top: 1px solid #2a2a32;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.photo-bar-nav,
.photo-bar-zoom,
.photo-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.photo-bar-nav {
  justify-content: center;
}

.photo-bar-counter {
  min-width: 64px;
  text-align: center;
  color: #e5e7eb;
  font-size: 0.88rem;
  font-weight: 600;
}

.photo-bar-zoom {
  justify-content: center;
}

.photo-bar-info {
  text-align: center;
  color: #e5e7eb;
  line-height: 1.35;
}

.photo-bar-info strong {
  display: block;
  font-size: 0.92rem;
  color: var(--gold);
}

.photo-bar-info span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
}

.photo-bar-actions {
  justify-content: center;
}

.photo-bar-btn {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 0.86rem;
  text-decoration: none;
}

.photo-bar-actions a.photo-bar-btn,
.photo-bar-actions a.photo-bar-btn:hover,
.photo-bar-actions a.photo-bar-btn:focus {
  text-decoration: none;
  color: inherit;
}

.photo-bar-btn:disabled {
  opacity: 0.35;
  pointer-events: none;
}

@media (min-width: 640px) {
  .gallery-backdrop {
    padding: 14px;
    align-items: center;
  }
  .modal.photo-modal {
    width: min(96vw, 1100px);
    height: min(94dvh, 880px);
    max-height: 94dvh;
    border-radius: 14px;
    border: 1px solid rgba(74, 144, 200, 0.18);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  }
  .gal-topbar {
    padding-top: 10px;
    border-radius: 14px 14px 0 0;
  }
  .gal-footer {
    flex-direction: column;
    gap: 10px;
    border-radius: 0 0 14px 14px;
  }
  .gal-footer-main {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
  }
  .gal-info {
    flex: 1;
    min-width: 200px;
  }
  .gal-zoom-bar {
    justify-content: flex-end;
    margin-left: auto;
  }
  .gal-dots {
    width: 100%;
  }
  .gal-nav-arrow {
    width: 46px;
    height: 46px;
  }
  .gal-nav-arrow--prev {
    left: 14px;
  }
  .gal-nav-arrow--next {
    right: 14px;
  }
  .photo-bar {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
  }
  .photo-bar-nav,
  .photo-bar-zoom {
    justify-content: flex-start;
  }
  .photo-bar-info {
    flex: 1;
    text-align: left;
    min-width: 180px;
  }
  .photo-bar-actions {
    margin-left: auto;
    justify-content: flex-end;
  }
}
.send-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.send-list {
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px;
}
.send-list label {
  display: flex;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.send-list label:hover { background: #14141c; }

.report-modal {
  width: min(560px, 96vw);
  max-height: none;
  overflow: visible;
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
}

.report-modal .report-filter-block,
.report-modal .toolbar.report-actions,
.report-modal .report-summary {
  flex-shrink: 0;
}

.report-modal-title {
  margin: 0 0 6px;
  font-size: 1.15rem;
}

.report-modal-sub {
  margin: 0 0 14px;
  line-height: 1.45;
}

.report-filter-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  background: #0c0c12;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.report-date-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 10px;
}

.report-date-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.report-date-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.report-date-sep {
  flex-shrink: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  padding-bottom: 10px;
  text-align: center;
}

.report-date-input {
  flex: 1 1 0;
  min-width: 0;
  height: 40px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid #5a4e3a;
  background: var(--field-bg);
  color: var(--text);
  font-size: 0.9rem;
  color-scheme: dark;
}

.report-date-input::-webkit-calendar-picker-indicator {
  filter: brightness(0) invert(1);
  opacity: 0.95;
  cursor: pointer;
}

.report-date-input::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

.report-date-input:focus {
  outline: none;
  border-color: var(--gold);
}

.report-text-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.report-text-input {
  flex: 1 1 140px;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid #5a4e3a;
  background: var(--field-bg);
  color: var(--text);
  font-size: 0.9rem;
}

.report-text-input::placeholder {
  color: #4a4f58;
}

.report-text-input:focus {
  outline: none;
  border-color: var(--gold);
}

.report-infopen-input {
  flex: 0 1 160px;
  max-width: 200px;
}

.report-tipo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 2px;
}

.report-tipo-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.1;
  cursor: pointer;
  user-select: none;
  border: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
  transition: filter 0.15s ease, transform 0.15s ease;
}

.report-tipo-check-inner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.report-tipo-check-inner svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.report-tipo-check input {
  width: 14px;
  height: 14px;
  accent-color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  flex-shrink: 0;
}

.report-tipo-check--st {
  background: var(--presidium-exit-st-bg, linear-gradient(135deg, rgba(200, 80, 24, 0.5), rgba(160, 55, 12, 0.4)));
  color: var(--presidium-exit-st-text, #ffd4b0);
}

.report-tipo-check--st .inicio-st-svg {
  color: var(--presidium-exit-st-icon, #ff9a55);
}

.report-tipo-check--desl {
  background: var(--presidium-exit-desl-bg, linear-gradient(135deg, rgba(35, 90, 150, 0.55), rgba(25, 65, 110, 0.42)));
  color: var(--presidium-exit-desl-text, #b8d8f4);
}

.report-tipo-check--desl .inicio-desl-svg {
  color: var(--presidium-exit-desl-icon, #7eb8e8);
}

.report-tipo-check:hover {
  filter: brightness(1.06);
}

.report-tipo-tag {
  display: block;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 2px;
}

.report-tipo-tag--st {
  color: #d4a894 !important;
}

.report-tipo-tag--desl {
  color: #9aa0ad !important;
}

.report-actions {
  margin-bottom: 10px;
  gap: 8px;
}

.report-summary {
  margin: 4px 0 0;
  padding: 14px 16px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
  color: var(--text);
  background: var(--presidium-dock-surface, #12121a);
  border: 1px solid var(--presidium-dock-line, rgba(255, 255, 255, 0.08));
  border-radius: 10px;
}

.report-summary .warn {
  font-weight: 500;
  color: var(--warn);
}

.sistema-backup-card {
  margin-top: 0;
}

.sistema-backup-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.sistema-card-title {
  margin: 0 0 6px;
  font-size: 1rem;
}

.sistema-card-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
  max-width: 52ch;
}

.backup-modal {
  width: min(580px, 96vw);
}

.backup-mode-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.backup-mode-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  font-size: 0.88rem;
}

.backup-mode-opt input {
  accent-color: var(--gold);
}

.backup-period-block--disabled {
  opacity: 0.45;
  pointer-events: none;
}

.backup-db-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
  color: var(--text);
  cursor: pointer;
  padding-top: 4px;
}

.backup-db-check input {
  accent-color: var(--gold);
}

.backup-db-check code {
  font-size: 0.82rem;
  color: var(--muted);
}

.report-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  max-height: 55vh;
  overflow: auto;
  padding: 4px 0;
}
.report-card {
  background: #0c0c12;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
}
.report-card img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top center;
  display: block;
  background: #000;
}
.report-no-photo { aspect-ratio: 3/4; background: #111; }
.report-card-body { padding: 8px; font-size: 0.82rem; }
.report-card-body small { display: block; color: var(--muted); margin-top: 2px; }

/* Visualização do PDF — otimizada para celular */
body.pdf-viewer-open { overflow: hidden; }

.pdf-viewer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: #0a0a0f;
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.pdf-viewer {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.pdf-viewer-toolbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--nav);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.pdf-viewer-title {
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pdf-viewer-btn {
  min-height: 44px;
  min-width: 44px;
  padding: 8px 14px;
  font-size: 0.88rem;
  white-space: nowrap;
}

.pdf-viewer-scroll {
  flex: 1;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px;
  background: #4a4a56;
}

.pdf-paper {
  max-width: 720px;
  margin: 0 auto;
  background: #fff;
  color: #1a1a1a;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  padding: 14px 16px 18px;
  font-family: var(--pro-font);
}

.pdf-doc-frame {
  border: 1px solid #0e0e14;
  box-shadow: inset 0 0 0 1px #5a9fd4;
  padding: 8px;
  margin-bottom: 6px;
}

.pdf-top-gold {
  height: 2px;
  background: #5a9fd4;
  margin: -8px -8px 8px;
}

.pdf-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.pdf-head-mark-wrap {
  flex-shrink: 0;
  padding: 2px;
  border: 0.75px solid #5a9fd4;
  background: #0e0e14;
  border-radius: 4px;
  line-height: 0;
}

.pdf-head-mark {
  width: 30px;
  height: 30px;
  border-radius: 3px;
  display: block;
}

.pdf-head-text h1 {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  color: #0e0e14;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.1;
}

.pdf-head-text p {
  margin: 2px 0 0;
  font-size: 0.68rem;
  color: #6b6b76;
  line-height: 1.3;
}

.pdf-head-accent {
  width: 52px;
  height: 1.5px;
  background: #5a9fd4;
  margin-top: 4px;
}

.pdf-meta-strip {
  display: flex;
  margin-bottom: 5px;
}

.pdf-meta-strip-bar {
  width: 3px;
  background: #5a9fd4;
  flex-shrink: 0;
}

.pdf-meta-row {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 0.68rem;
  padding: 5px 7px;
  background: #f5f3ee;
}

.pdf-meta-lbl {
  color: #6b6b76;
  font-weight: 400;
}

.pdf-meta-row strong {
  color: #1a1a1a;
  font-weight: 600;
}

.pdf-head-rules {
  margin-bottom: 4px;
}

.pdf-gold-line {
  height: 1px;
  background: #5a9fd4;
}

.pdf-black-line {
  height: 0.5px;
  background: #0e0e14;
  margin-top: 1px;
}

.pdf-entries {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pdf-entry {
  border: 1px solid #0e0e14;
  break-inside: avoid;
  background: #fff;
}

.pdf-entry-tag {
  display: flex;
  align-items: stretch;
  background: #0e0e14;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
}

.pdf-entry-tag-bar {
  width: 3px;
  background: #5a9fd4;
  flex-shrink: 0;
}

.pdf-entry-tag-text {
  padding: 3px 8px;
}

.pdf-entry-body {
  display: flex;
  gap: 8px;
  padding: 6px;
}

.pdf-entry-photo {
  width: 86px;
  min-width: 86px;
  height: 110px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #0a0a0c;
}

.pdf-entry-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border: 0;
}

.pdf-entry-photo-empty {
  width: 86px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #6b6b76;
  border: 1px solid #5a9fd4;
  background: #fff;
  box-sizing: border-box;
}

.pdf-entry-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-width: 0;
  border: 1px solid #0e0e14;
}

.pdf-field {
  padding: 3px 4px;
  border-bottom: 1px solid #e8e0d0;
  background: #fafaf8;
}

.pdf-field:not(.pdf-field--full):nth-child(2n) {
  border-right: 1px solid #e8e0d0;
}

.pdf-field--full {
  grid-column: 1 / -1;
}

.pdf-field-label {
  display: block;
  font-size: 0.55rem;
  font-weight: 600;
  color: #8a6d2f;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 1px;
}

.pdf-field-value {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.2;
  word-break: break-word;
}

.pdf-field-st {
  color: #b83232;
}

.pdf-field-desl {
  color: #3d3d46;
}

@media (max-width: 480px) {
  .report-modal {
    padding: 14px 12px 12px;
  }
  .report-date-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .report-date-sep {
    display: none;
  }
  .report-text-row {
    flex-direction: column;
    align-items: stretch;
  }
  .report-infopen-input {
    flex: 1 1 auto;
    max-width: none;
  }
  .report-actions {
    flex-wrap: wrap;
  }
  .report-actions .btn {
    flex: 1 1 auto;
    min-height: 44px;
  }
  .pdf-viewer-toolbar {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }
  .pdf-viewer-title {
    grid-column: 1 / -1;
    order: -1;
    padding-bottom: 4px;
  }
}

@media print {
  html,
  body {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    background: #fff !important;
  }

  body.pdf-printing > *:not(#reportPdfViewer) {
    display: none !important;
  }

  body.pdf-printing #reportPdfViewer {
    position: static !important;
    inset: auto !important;
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    background: #fff !important;
    padding: 0 !important;
  }

  body.pdf-printing .pdf-viewer {
    height: auto !important;
    min-height: 0 !important;
    background: #fff !important;
  }

  body.pdf-printing .pdf-viewer-toolbar {
    display: none !important;
  }

  body.pdf-printing .pdf-viewer-scroll {
    flex: none !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    padding: 0 !important;
    background: #fff !important;
  }

  body.pdf-printing .pdf-paper {
    max-width: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    padding: 0 !important;
    background: #fff !important;
  }

  .pdf-doc-frame {
    border: 1pt solid #0e0e14 !important;
    box-shadow: inset 0 0 0 1pt #5a9fd4 !important;
  }

  .pdf-entry {
    border: 1pt solid #0e0e14 !important;
    page-break-inside: avoid;
    break-inside: avoid;
    box-shadow: none !important;
  }

  .pdf-entry-grid {
    border: 1pt solid #0e0e14 !important;
  }

  .pdf-field {
    border-bottom: 1pt solid #d8d0c0 !important;
    background: #fafaf8 !important;
  }

  .pdf-field:not(.pdf-field--full):nth-child(2n) {
    border-right: 1pt solid #d8d0c0 !important;
  }

  .pdf-entry-photo img,
  .pdf-entry-photo-empty {
    border: 1pt solid #5a9fd4 !important;
  }
}

.hidden { display: none !important; }

.boot-splash {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

body.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at top, #14141c 0%, var(--bg) 55%);
  padding: 24px;
}

.login-card {
  width: min(400px, 96vw);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 24px 22px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 22px;
}
.login-brand-mark {
  display: block;
  width: 40px;
  height: 40px;
  margin: 0;
  border-radius: 10px;
  object-fit: cover;
  background: #000;
  flex-shrink: 0;
}
.login-brand h1 { margin: 0; color: var(--gold); letter-spacing: 0.06em; font-size: 1.35rem; }
.login-brand p { margin: 6px 0 0; color: var(--muted); font-size: 0.9rem; }

.sobre-page {
  max-width: 480px;
  text-align: left;
}

.sobre-brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.sobre-lead {
  margin: 0 0 24px;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--muted);
}

.sobre-meta {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.75;
}

.sobre-brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sobre-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  line-height: 1.15;
}

.sobre-tagline {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.25;
}

.sobre-mark {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  background: #000;
}

.sobre-section {
  margin-bottom: 20px;
}

.sobre-section-title {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}

.sobre-section-body {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--muted);
}

.sobre-section-note {
  margin: 10px 0 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--muted);
  opacity: 0.9;
}

.sobre-section-body code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.88em;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 6px;
  border-radius: 4px;
}

.sobre-list {
  margin: 0;
  padding: 0 0 0 1.15rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--muted);
}

.sobre-list li {
  margin-bottom: 6px;
}

.sobre-list li:last-child {
  margin-bottom: 0;
}

.sobre-list strong {
  color: var(--text);
  font-weight: 600;
}

.sobre-footer {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.sobre-footer p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--muted);
}

/* legado — removido layout centralizado */
.sobre-card {
  display: block;
  text-align: left;
}

.login-card label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.88rem;
  color: var(--muted);
}

.login-card .login-field,
.login-card input[type="password"],
.login-card input[type="text"]#password {
  margin-bottom: 14px;
}

.login-card .login-field,
.login-password-wrap input,
.login-password-wrap input[type="password"],
.login-password-wrap input[type="text"] {
  height: 38px;
  line-height: 38px;
  padding-top: 0;
  padding-bottom: 0;
  font-size: 0.95rem;
  border-radius: 8px;
  border: 1px solid #5a4e3a;
  background: var(--field-bg);
  color: #e5e7eb;
  -webkit-text-fill-color: #e5e7eb;
  caret-color: var(--gold);
  box-shadow: none;
  appearance: none;
}

.login-card .login-field {
  width: 100%;
  padding-left: 10px;
  padding-right: 10px;
}

.login-card .login-field::placeholder,
.login-password-wrap input::placeholder {
  color: #4a4f58;
  opacity: 1;
  -webkit-text-fill-color: #4a4f58;
}

.login-card .login-field:focus::placeholder,
.login-password-wrap input:focus::placeholder {
  opacity: 0;
}

.login-card .login-field:focus,
.login-password-wrap input:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--field-bg);
  color: #e5e7eb;
  -webkit-text-fill-color: #e5e7eb;
}

.login-card .login-field:-webkit-autofill,
.login-card .login-field:-webkit-autofill:hover,
.login-card .login-field:-webkit-autofill:focus,
.login-password-wrap input:-webkit-autofill,
.login-password-wrap input:-webkit-autofill:hover,
.login-password-wrap input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--field-bg) inset;
  box-shadow: 0 0 0 1000px var(--field-bg) inset;
  -webkit-text-fill-color: #e5e7eb;
  color: #e5e7eb;
  caret-color: var(--gold);
  transition: background-color 99999s ease-out 0s;
}

.login-password-wrap {
  position: relative;
  margin-bottom: 10px;
}

.login-password-wrap input,
.login-password-wrap input[type="password"],
.login-password-wrap input[type="text"] {
  width: 100%;
  padding-left: 10px;
  padding-right: 44px;
}

/* Oculta o olho nativo do navegador (Edge/Chrome) — mantém só o botão à direita */
.login-password-wrap input::-ms-reveal,
.login-password-wrap input::-ms-clear {
  display: none;
}

.login-password-wrap input::-webkit-credentials-auto-fill-button,
.login-password-wrap input::-webkit-strong-password-auto-fill-button {
  display: none !important;
  visibility: hidden;
  pointer-events: none;
}

.login-password-wrap input:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--field-bg);
  color: #e5e7eb;
  -webkit-text-fill-color: #e5e7eb;
}

.login-password-toggle {
  position: absolute;
  right: 6px;
  top: 0;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #5c6068;
  cursor: pointer;
}

.login-password-toggle:hover {
  color: var(--gold);
  background: rgba(74, 144, 200, 0.12);
}

.login-remember {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin: 4px 0 14px;
  font-size: 0.86rem;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.login-remember input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--gold);
  cursor: pointer;
}

.login-btn {
  width: 100%;
  padding: 11px;
}

.login-error {
  margin: 10px 0 0;
  color: var(--danger);
  font-size: 0.88rem;
  text-align: center;
}

.login-hint {
  margin: 18px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.45;
}

.login-hint code {
  color: var(--gold);
  font-size: 0.72rem;
}

body.report-modal-open { overflow: hidden; }

#modal-root:not(:empty) {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
}

#modal-root:not(:empty) .modal-backdrop {
  pointer-events: auto;
}

#modal-root:empty {
  display: none;
  pointer-events: none;
}

.arch-partial-hint {
  margin: 6px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

/* Layout mobile: public/css/presidium-mobile.css */

/* —— Notificações / saída temporária —— */
.notify-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 12000;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.notify-modal {
  width: min(420px, 100%);
  background: var(--card, #1a1a1a);
  border: 1px solid var(--gold, #4a90c8);
  border-radius: 12px;
  padding: 22px 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.notify-modal h2 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  color: var(--gold, #4a90c8);
}

.notify-modal p {
  margin: 0 0 10px;
  color: var(--text, #eee);
  line-height: 1.5;
  font-size: 0.92rem;
}

.notify-modal-hint {
  color: var(--muted, #aaa) !important;
  font-size: 0.85rem !important;
}

.notify-modal-warn {
  color: #ffd98a !important;
  font-size: 0.9rem !important;
}

.notify-modal-url {
  margin: 0 0 12px !important;
  word-break: break-all;
}

.notify-modal-url a {
  color: var(--gold, #4a90c8);
  font-weight: 600;
  text-decoration: none;
}

.notify-modal-backdrop--login {
  z-index: 13000;
  align-items: flex-end;
  padding: 0;
}

.notify-modal-backdrop--login .notify-modal {
  width: 100%;
  max-width: 100%;
  border-radius: 16px 16px 0 0;
  margin: 0;
  padding: 22px 18px calc(18px + env(safe-area-inset-bottom, 0px));
}

.notify-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.notify-denied-bar,
.saida-alert-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 11000;
  padding: 0;
  font-size: 0.9rem;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.45);
}

.saida-alert-banner-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  box-sizing: border-box;
}

.saida-alert-mark {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  background: #000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.saida-alert-badge {
  width: 18px;
  height: 18px;
  margin-right: 7px;
  vertical-align: -3px;
  border-radius: 4px;
  object-fit: cover;
  background: #000;
}

.saida-alert-text strong {
  display: flex;
  align-items: center;
}

.saida-alert-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  color: #c0392b;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.saida-alert-icon .saida-alert-svg {
  width: 22px;
  height: 22px;
}

.saida-alert-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.saida-alert-text span {
  font-size: 0.88rem;
  opacity: 0.95;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.saida-alert-btn {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 999px;
  border: none;
  background: #fff;
  color: #a93226;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  letter-spacing: 0.02em;
}

.saida-alert-btn:hover {
  background: #fff5e6;
}

.saida-alert-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.saida-alert-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

.saida-alert-flash {
  position: fixed;
  inset: 0;
  z-index: 10999;
  background: rgba(255, 70, 50, 0.2);
  pointer-events: none;
  opacity: 0;
}

.saida-alert-flash.active {
  animation: saida-flash-pulse 0.65s ease-out forwards;
}

@keyframes saida-flash-pulse {
  0% { opacity: 0.42; }
  100% { opacity: 0; }
}

.notify-denied-bar {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notify-settings-card {
  margin-bottom: 16px;
}

.notify-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(74, 144, 200, 0.15);
  user-select: none;
}

.notify-switch-row.is-disabled {
  cursor: not-allowed;
  opacity: 0.72;
  pointer-events: none;
}

label.notify-switch-row {
  margin: 0;
}

.notify-switch-copy strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 6px;
}

.notify-switch-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
  max-width: 52ch;
}

.notify-settings-foot {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.notify-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  cursor: pointer;
}

.notify-switch.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.notify-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.notify-switch-ui {
  width: 52px;
  height: 30px;
  border-radius: 999px;
  background: #3a4450;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.notify-switch-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease;
}

.notify-switch input:checked + .notify-switch-ui {
  background: #1f6f3d;
  border-color: #2ecc71;
}

.notify-switch input:checked + .notify-switch-ui::after {
  transform: translateX(22px);
}

.notify-switch input:focus-visible + .notify-switch-ui {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.notify-settings-card.is-muted {
  opacity: 0.72;
}

.notify-switch-row-split {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* —— Avisos (layout unificado) —— */
.avisos-setup-card {
  margin-bottom: 12px;
  padding: 12px 16px;
}

.avisos-main-card {
  margin-bottom: 12px;
  padding: 16px;
}

.avisos-status {
  margin: 0 0 12px;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--muted);
}

.avisos-status.ok {
  color: #3d8b5a;
}

.avisos-status.bad {
  color: #b85c5c;
}

.avisos-activate-btn {
  width: 100%;
  margin-bottom: 14px;
}

.avisos-options {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.avisos-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 10px 0;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.avisos-option:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.avisos-option-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.avisos-option-title {
  font-size: 0.95rem;
  font-weight: 600;
}

.avisos-option-hint {
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--muted);
}

.avisos-toggle-pill {
  flex-shrink: 0;
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  position: relative;
  transition: background 0.2s ease;
}

.avisos-toggle-pill::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}

.avisos-toggle-pill.on {
  background: rgba(74, 144, 200, 0.55);
}

.avisos-toggle-pill.on::after {
  transform: translateX(20px);
}

.avisos-test-details {
  margin-top: 4px;
  font-size: 0.88rem;
  color: var(--muted);
}

.avisos-test-details summary {
  cursor: pointer;
  padding: 8px 0;
  list-style: none;
  user-select: none;
}

.avisos-test-details summary::-webkit-details-marker {
  display: none;
}

.avisos-test-details summary::before {
  content: "▸ ";
  display: inline-block;
  transition: transform 0.15s ease;
}

.avisos-test-details[open] summary::before {
  transform: rotate(90deg);
}

.avisos-test-details[open] summary {
  margin-bottom: 8px;
}

.avisos-test-row {
  display: flex;
  gap: 10px;
  margin-bottom: 6px;
}

.avisos-test-link {
  flex: 1;
  min-height: 42px;
  padding: 10px 12px;
  font-size: 0.88rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.avisos-test-link:hover {
  border-color: rgba(74, 144, 200, 0.4);
}

.avisos-perm-card {
  margin-bottom: 14px;
}

.avisos-perm-badge {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  margin-bottom: 10px;
}

.avisos-perm-badge.ok {
  background: rgba(46, 204, 113, 0.18);
  color: #9be7b8;
}

.avisos-perm-badge.bad {
  background: rgba(231, 76, 60, 0.18);
  color: #f5b7b1;
}

.avisos-summary {
  margin: 0;
  color: var(--text);
  line-height: 1.5;
  font-size: 0.95rem;
}

.avisos-help-card p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.avisos-help-card p:last-child {
  margin-bottom: 0;
}

.avisos-ios-install-card {
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid rgba(74, 144, 200, 0.55);
  background: linear-gradient(135deg, rgba(74, 144, 200, 0.14), rgba(74, 144, 200, 0.04));
}

.avisos-ios-install-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.avisos-ios-install-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.avisos-ios-install-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.avisos-ios-install-copy strong {
  font-size: 1.05rem;
  color: var(--text);
}

.avisos-ios-install-copy small {
  font-size: 0.84rem;
  line-height: 1.4;
  color: var(--muted);
}

.avisos-ios-installed-card {
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(61, 139, 90, 0.45);
  background: rgba(61, 139, 90, 0.08);
}

.avisos-ios-installed-card strong {
  display: block;
  margin-bottom: 6px;
  color: #3d8b5a;
}

.avisos-ios-installed-card p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted);
}

.ios-install-modal {
  max-width: 420px;
}

.ios-install-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.ios-install-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 13px;
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.ios-install-sub {
  margin: 6px 0 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--muted);
}

.ios-install-steps {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ios-install-steps li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text);
}

.ios-step-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(74, 144, 200, 0.2);
  border: 1px solid rgba(74, 144, 200, 0.5);
  color: #5a9fd4;
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.ios-share-glyph {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  letter-spacing: -0.02em;
}

.ios-install-promo .notify-activate-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.ios-install-actions {
  flex-direction: column;
  align-items: stretch;
}

.ios-install-actions .btn {
  width: 100%;
}

.ios-install-trust {
  font-size: 0.82rem;
  line-height: 1.4;
}

.ios-install-link-hint {
  margin: 12px 0 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--muted);
  word-break: break-all;
}

.ios-install-link-hint a {
  color: #5a9fd4;
}

.avisos-ios-install-link {
  margin: 10px 0 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--muted);
  word-break: break-all;
}

.avisos-ios-install-link a {
  color: #5a9fd4;
}

.avisos-test-card {
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(74, 144, 200, 0.45);
  background: linear-gradient(180deg, rgba(74, 144, 200, 0.1), rgba(74, 144, 200, 0.03));
}

.avisos-test-card .avisos-profiles-label {
  margin-bottom: 10px;
}

.avisos-test-btn {
  width: 100%;
  margin-bottom: 8px;
}

.avisos-test-btn--push {
  margin-top: 8px;
}

.avisos-ios-push-note {
  margin: 0 0 10px;
  padding: 10px 12px;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--muted);
  background: rgba(184, 92, 92, 0.08);
  border: 1px solid rgba(184, 92, 92, 0.22);
  border-radius: 8px;
}

.avisos-test-hint {
  margin: 0 0 14px;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--muted);
}

.avisos-test-hint--ok {
  color: #3d8b5a;
}

.avisos-test-hint--bad {
  color: #b85c5c;
}

.avisos-profiles-card {
  margin-bottom: 14px;
}

.avisos-profiles-label {
  margin: 0 0 12px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.avisos-profiles {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.avisos-profile-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 14px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.avisos-profile-card:hover:not(:disabled) {
  border-color: rgba(201, 162, 39, 0.45);
  background: rgba(201, 162, 39, 0.06);
}

.avisos-profile-card.active {
  border-color: #4a90c8;
  background: rgba(201, 162, 39, 0.12);
  box-shadow: inset 0 0 0 1px rgba(201, 162, 39, 0.25);
}

.avisos-profile-card:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.avisos-profile-radio {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
  position: relative;
}

.avisos-profile-card.active .avisos-profile-radio {
  border-color: #4a90c8;
}

.avisos-profile-card.active .avisos-profile-radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #4a90c8;
}

.avisos-profile-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.avisos-profile-body strong {
  font-size: 1rem;
}

.avisos-profile-body small {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.avisos-custom-card.hidden {
  display: none;
}

.notify-activate-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 12000;
  padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(15, 20, 25, 0) 0%, rgba(15, 20, 25, 0.92) 18%, #0f1419 100%);
  pointer-events: auto;
  color: #f5f5f7;
}

.notify-activate-inner {
  pointer-events: auto;
  max-width: 520px;
  margin: 0 auto;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(201, 162, 39, 0.45);
  background: #1a222c;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #f5f5f7;
}

.notify-activate-text {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.notify-activate-mark {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  object-fit: cover;
  background: #000;
  margin-top: 2px;
}

.notify-activate-text > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.notify-activate-text strong {
  font-size: 1rem;
  font-weight: 600;
  color: #f5f5f7;
}

.notify-activate-text span {
  color: rgba(235, 235, 245, 0.62);
  font-size: 0.88rem;
  line-height: 1.4;
}

.notify-activate-actions {
  display: flex;
  gap: 10px;
}

.notify-activate-actions .btn {
  flex: 1;
  min-height: 44px;
}

.notify-activate-actions .btn.gold {
  background: rgba(255, 255, 255, 0.92);
  border: none;
  color: #0a0a0c;
  font-weight: 600;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.32);
}

.notify-activate-actions .btn.gold:hover {
  background: #fff;
}

.notify-activate-later {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(235, 235, 245, 0.85);
}

.notify-activate-later:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f5f5f7;
}


.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.notify-denied-bar {
  background: #3a2a10;
  color: #ffd98a;
  border-bottom: 2px solid #4a90c8;
}

.saida-alert-banner {
  background: linear-gradient(95deg, #7f1410 0%, #c0392b 45%, #d35400 100%);
  color: #fff;
  border-bottom: 3px solid #ffcc00;
  transform: translateY(-110%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.saida-alert-banner.visible {
  transform: translateY(0);
  animation: saida-banner-glow 2.2s ease-in-out 2;
}

@keyframes saida-banner-glow {
  0%, 100% { box-shadow: 0 6px 28px rgba(0, 0, 0, 0.45); }
  50% { box-shadow: 0 8px 36px rgba(255, 120, 60, 0.55); }
}

.saida-alert-banner strong {
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.photo-card.saida-temporaria {
  outline: 2px solid #e74c3c;
  outline-offset: 1px;
  box-shadow: 0 0 0 1px #ffcc00, 0 8px 24px rgba(231, 76, 60, 0.28);
}

.photo-card.desligamento {
  outline: 1px solid rgba(156, 168, 192, 0.4);
  outline-offset: 1px;
  box-shadow:
    0 0 0 1px rgba(132, 148, 178, 0.2),
    0 4px 16px rgba(55, 70, 105, 0.12);
}

.photo-card.saida-temporaria .photo-card-info strong::before {
  content: "⚠ ";
  color: #ff6b6b;
}
