/* _ops/mobile-client-20261015/system-mosaic.css */
.system-cctv {
  --sm-bg:#020617;
  --sm-surface:#0f172a;
  --sm-text:#f1f5f9;
  --sm-muted:#cbd5e1;
  --sm-line:#64748b;
  --sm-red:#dc2626;
  position: fixed;
  inset: 0;
  z-index: 55;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100dvh;
  overflow: auto;
  background: var(--sm-bg);
  color: var(--sm-text);
  color-scheme: dark;
  font:
    1rem/1.5 Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  padding: max(0px, var(--safe-area-inset-top,env(safe-area-inset-top,0px))) max(0px, env(safe-area-inset-right, 0px)) max(0px, var(--safe-area-inset-bottom,env(safe-area-inset-bottom,0px))) max(0px, env(safe-area-inset-left, 0px));
}
.system-cctv * {
  box-sizing: border-box;
}
.system-cctv :is(h1, h2, strong) {
  color: var(--sm-text);
  margin: 0;
}
.system-cctv :is(h1, h2) {
  font-size: 1rem;
}
.system-cctv :is(button, input, select) {
  font: inherit;
}
.system-cctv :is(button, select, input:not([type=checkbox])) {
  min-height: 48px;
  min-width: 48px;
  color: var(--sm-text);
  background: var(--sm-surface);
  border: 1px solid var(--sm-line);
  border-radius: 8px;
  padding: 8px;
  touch-action: manipulation;
}
.system-cctv button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background-color 100ms;
}
.system-cctv button:active {
  background: #334155;
}
.system-cctv button:disabled {
  opacity: .45;
  cursor: default;
}
.system-cctv :focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: -3px;
}
.system-cctv .sm-primary {
  background: var(--sm-red);
  border-color: var(--sm-red);
  color: white;
}
.sm-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  flex-shrink: 0;
  border-bottom: 1px solid #334155;
}
.sm-header > div {
  flex: 1;
  min-width: 0;
}
.sm-header span {
  display: block;
  font-size: .75rem;
  color: var(--sm-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sm-stage {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}
.sm-stage > p {
  padding: 16px;
}
.sm-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
}
.sm-title strong {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: .875rem;
}
.sm-title > span {
  font-size: .75rem;
  color: var(--sm-muted);
}
.sm-grid {
  display: grid;
  gap: 2px;
  touch-action: pan-y pinch-zoom;
  background: var(--sm-surface);
}
.sm-tile {
  position: relative;
  aspect-ratio: 4/3;
  min-width: 0;
  min-height: 72px;
  overflow: hidden;
  background: var(--sm-bg);
  border: 1px solid #334155;
  touch-action: pan-y pinch-zoom;
}
.sm-single .sm-tile {
  aspect-ratio: 16/9;
}
.sm-video {
  position: absolute !important;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto !important;
  border-radius: 0 !important;
}
.sm-video [class*="bg-emerald-600/90"] {
  display: none;
}
.sm-video [role=button] {
  min-width: 48px;
  min-height: 48px;
}
.sm-name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  padding: 8px 6px 4px;
  background: linear-gradient(transparent, #000e);
  font-size: .75rem;
  font-weight: 700;
  color: white;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.system-cctv .sm-tile-play {
  position: absolute;
  left: 8px;
  bottom: 30px;
  border-radius: 50%;
  background: #0f172ae6;
}
.system-cctv .sm-stop {
  position: absolute;
  bottom: 28px;
  right: 4px;
  border: 0;
  background: #0009;
  border-radius: 50%;
  padding: 16px;
}
.sm-stop span {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ef4444;
  border: 1px solid #fecaca;
}
.sm-edit-slot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #0f172a55 !important;
}
.sm-empty {
  display: flex;
  flex-direction: column;
}
.sm-areas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 4px 8px;
  font-size: .75rem;
  color: var(--sm-muted);
}
.system-cctv .sm-areas button {
  border: 0;
  background: transparent;
  font-size: 1.5rem;
}
.sm-footer {
  position: static;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px;
  border-top: 1px solid #334155;
  background: var(--sm-bg);
  flex-wrap: wrap;
}
.sm-layout select {
  width: auto;
  max-width: 100%;
}
.sm-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.sm-edit-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px;
  font-size: .875rem;
  flex-shrink: 0;
}
.sm-scrim {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: #000c;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: max(8px, env(safe-area-inset-top, 0px)) 8px max(8px, var(--safe-area-inset-bottom,env(safe-area-inset-bottom,0px)));
}
.sm-sheet {
  width: 100%;
  max-width: 620px;
  max-height: 90dvh;
  overflow: auto;
  background: var(--sm-surface);
  color: var(--sm-text);
  border: 1px solid var(--sm-line);
  border-radius: 12px;
}
.sm-sheet > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px;
  border-bottom: 1px solid #334155;
}
.sm-form {
  padding: 12px;
  display: grid;
  gap: 12px;
}
.sm-form label {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.sm-form select,
.sm-form input:not([type=checkbox]) {
  width: 100%;
  min-width: 0;
}
.sm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sm-form .sm-check {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
}
.sm-check input {
  width: 24px;
  height: 24px;
  accent-color: var(--sm-red);
}
.sm-hint {
  color: var(--sm-muted);
  font-size: .875rem;
  margin: 0;
}
.sm-camera-list {
  display: grid;
  gap: 8px;
}
.sm-camera-list button {
  justify-content: flex-start;
  text-align: left;
  overflow-wrap: anywhere;
}
.system-native-mosaic-active [aria-label="Abrir Saúde VMS"] {
  display: none;
}
.sm-full .sm-stage {
  display: flex;
  flex-direction: column;
}
.sm-full .sm-grid {
  flex: 1;
  align-content: center;
}
.sm-full .sm-tile {
  min-height: 72px;
}
.sm-source {
  padding: 0 8px 8px;
  flex-shrink: 0;
}
.sm-source select {
  width: 100%;
  min-width: 0 !important;
  max-width: 100%;
}
.sm-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
}
.sm-single .sm-grid {
  grid-template-columns: minmax(0, 1fr);
}
.sm-full .sm-grid {
  flex: none;
  align-content: start;
}
.sm-layout select {
  width: 7.25rem;
}
.sm-landscape-nav {
  display: none;
}
.sm-single .sm-grid {
  grid-template-rows: minmax(0, 1fr);
  align-content: stretch;
}
@media (orientation: landscape) and (max-height: 600px) {
  .sm-header {
    padding: 4px 8px;
  }
  .sm-title {
    padding: 4px 8px;
  }
  .sm-tile {
    aspect-ratio: 16/9;
  }
  .sm-grid {
    max-width: 100%;
    margin: auto;
  }
  .sm-single .sm-grid {
    max-width: min(100%, calc((100dvh - 240px)*16/9));
  }
  .sm-full.sm-single .sm-grid {
    max-width: 100%;
  }
  .sm-scrim {
    align-items: center;
  }
  .sm-sheet {
    max-height: 95dvh;
  }
}
@media (prefers-reduced-motion: reduce) {
  .system-cctv * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (orientation: landscape) and (max-height: 600px) {
  .sm-camera-open .sm-header,
  .sm-camera-open .sm-source,
  .sm-single .sm-areas {
    display: none;
  }
  .sm-single {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .sm-single .sm-grid {
    flex: 1;
    width: 100%;
    min-height: 0;
    max-width: none;
    align-items: stretch;
  }
  .sm-single .sm-tile {
    height: 100%;
    min-height: 0;
    aspect-ratio: auto;
  }
  .sm-landscape-nav {
    display: contents;
  }
  .sm-landscape-nav button {
    font-size: 1.5rem;
  }
}
