/*
 * Quadra Live — tema profissional (login e câmeras).
 * Carregado depois de styles.css e branding.css. O prefixo body.pro:not(#z)
 * dá especificidade de ID para vencer as regras antigas sem !important.
 * Para desfazer: remover o <link> deste arquivo e o markup novo das views.
 */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

body.pro:not(#z) {
  --pro-bg: #f5f6f4;
  --pro-surface: #ffffff;
  --pro-ink: #111814;
  --pro-ink-2: #3a453f;
  --pro-muted: #5b6660;
  --pro-line: #e3e7e4;
  --pro-field: #d5dbd7;
  --pro-brand: var(--brand-primary, #00804a);
  --pro-brand-dark: var(--brand-primary-dark, #0a5c36);
  --pro-live: #ff4d3d;
  --pro-radius: 14px;
  color-scheme: light;
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Fundo e cor de texto neutros (o modo tablet mantém o próprio fundo). */
body.pro:not(#z):not(.pro-kiosk) {
  background: var(--pro-bg);
  color: var(--pro-ink);
}

/* Campos e botões: base comum, com especificidade baixa para não brigar com
   componentes que já têm estilo próprio. */
:where(body.pro) :where(input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]), select, textarea) {
  border-color: var(--pro-field);
  border-radius: 10px;
  background-color: #ffffff;
}

:where(body.pro) :where(input, select, textarea):focus {
  border-color: var(--pro-brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pro-brand) 16%, transparent);
}

:where(body.pro) button {
  border-radius: 10px;
  font-weight: 600;
}

:where(body.pro) button:hover {
  box-shadow: none;
  transform: none;
}

body.pro:not(#z) :where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--pro-brand) 55%, #ffffff);
  outline-offset: 2px;
}

body.pro:not(#z) .pro-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ------------------------------------------------------------------ */
/* LOGIN                                                               */
/* ------------------------------------------------------------------ */

body.pro-login:not(#z) {
  display: block;
  place-items: normal;
  padding: 0;
  overflow: auto;
  background: var(--pro-surface);
}

body.pro-login:not(#z) .pro-login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 520px);
  width: 100%;
  min-height: 100vh;
}

body.pro-login:not(#z) .pro-login-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 48px;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(8, 14, 11, 0.18) 0%, rgba(8, 14, 11, 0.55) 55%, rgba(8, 14, 11, 0.9) 100%),
    url("/assets/login-hero.jpg") center / cover no-repeat,
    #1a211d;
}

body.pro:not(#z) .pro-product {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

body.pro:not(#z) .pro-product-mark {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--pro-brand);
}

body.pro:not(#z) .pro-product-mark svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.pro-login:not(#z) .pro-hero-copy {
  display: grid;
  gap: 16px;
  max-width: 480px;
}

body.pro:not(#z) .pro-live-chip {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

body.pro:not(#z) .pro-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pro-live);
  box-shadow: 0 0 0 0 rgba(255, 77, 61, 0.6);
  animation: pro-pulse 2s infinite;
}

@keyframes pro-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 77, 61, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(255, 77, 61, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 77, 61, 0); }
}

@media (prefers-reduced-motion: reduce) {
  body.pro:not(#z) .pro-live-dot { animation: none; }
}

body.pro-login:not(#z) .pro-hero-copy h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.02em;
}

body.pro-login:not(#z) .pro-hero-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 16px;
  line-height: 1.5;
}

body.pro-login:not(#z) .pro-login-main {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: auto;
  min-height: 100vh;
  padding: 40px clamp(24px, 6vw, 72px) 24px;
  box-sizing: border-box;
}

body.pro-login:not(#z) .pro-login-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  max-width: 376px;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
}

body.pro-login:not(#z) .pro-club {
  display: flex;
  align-items: center;
  gap: 14px;
}

body.pro-login:not(#z) .pro-club-logo {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
}

body.pro-login:not(#z) .pro-club-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

body.pro-login:not(#z) .pro-club-text span {
  color: var(--pro-muted);
  font-size: 13px;
  font-weight: 500;
}

body.pro-login:not(#z) .pro-club-text strong {
  color: var(--pro-ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

body.pro-login:not(#z) .pro-login-title {
  margin: 6px 0 0;
  color: var(--pro-ink);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.015em;
  text-align: left;
}

body.pro-login:not(#z) .login-form {
  display: grid;
  gap: 16px;
  text-align: left;
}

body.pro-login:not(#z) .login-form > label:not(.remember-line) {
  display: grid;
  gap: 6px;
  color: var(--pro-ink);
  font-size: 14px;
  font-weight: 500;
}

body.pro-login:not(#z) .pro-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

body.pro-login:not(#z) .pro-inline-link,
body.pro-login:not(#z) .pro-register a {
  color: var(--pro-brand-dark);
  font-weight: 600;
  text-decoration: none;
}

body.pro-login:not(#z) .pro-inline-link {
  font-size: 13px;
}

body.pro-login:not(#z) .pro-inline-link:hover,
body.pro-login:not(#z) .pro-register a:hover {
  text-decoration: underline;
}

body.pro-login:not(#z) .login-form input:not([type="checkbox"]):not([type="hidden"]) {
  width: 100%;
  height: 48px;
  min-height: 48px;
  box-sizing: border-box;
  padding: 0 14px;
  border: 1px solid var(--pro-field);
  border-radius: 10px;
  background: #ffffff;
  color: var(--pro-ink);
  font-size: 16px;
  box-shadow: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

body.pro-login:not(#z) .login-form input:not([type="checkbox"]):not([type="hidden"])::placeholder {
  color: #8a948e;
}

body.pro-login:not(#z) .login-form input:not([type="checkbox"]):not([type="hidden"]):focus {
  border-color: var(--pro-brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pro-brand) 18%, transparent);
  outline: none;
}

body.pro-login:not(#z) .password-field input {
  padding-right: 52px;
}

body.pro-login:not(#z) .password-toggle {
  right: 4px;
  width: 42px;
  min-width: 42px;
  max-width: 42px;
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  border-radius: 8px;
  color: var(--pro-muted);
}

body.pro-login:not(#z) .password-toggle:hover {
  background: #f1f3f2;
  color: var(--pro-ink);
}

body.pro-login:not(#z) .remember-line {
  justify-content: flex-start;
  justify-self: start;
  gap: 10px;
  min-height: 32px;
  color: var(--pro-ink-2);
  font-size: 14px;
  text-align: left;
}

body.pro-login:not(#z) .remember-line input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  accent-color: var(--pro-brand);
}

body.pro-login:not(#z) .login-form button[type="submit"] {
  width: 100%;
  height: 50px;
  min-height: 50px;
  border: 0;
  border-radius: 12px;
  background: var(--pro-brand);
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: none;
  cursor: pointer;
  transition: background 120ms ease;
}

body.pro-login:not(#z) .login-form button[type="submit"]:hover {
  background: var(--pro-brand-dark);
}

body.pro-login:not(#z) .login-form .error {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #f3c9c5;
  border-radius: 10px;
  background: #fcebea;
  color: #9f1f16;
  font-size: 14px;
  text-align: left;
}

body.pro-login:not(#z) .pro-register {
  margin: 0;
  color: var(--pro-muted);
  font-size: 14px;
  text-align: center;
}

body.pro-login:not(#z) .login-footer-status {
  justify-content: center;
  margin: 0;
}

body.pro-login:not(#z) .pro-login-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 14px;
  margin-top: 32px;
  color: #6b756f;
  font-size: 12px;
  text-align: center;
}

@media (max-width: 900px) {
  body.pro-login:not(#z) .pro-login-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  body.pro-login:not(#z) .pro-login-hero {
    min-height: 240px;
    padding: 20px 24px 44px;
  }

  body.pro-login:not(#z) .pro-hero-copy {
    gap: 10px;
  }

  body.pro-login:not(#z) .pro-hero-copy h2 {
    font-size: 24px;
    line-height: 1.2;
  }

  body.pro-login:not(#z) .pro-hero-copy p {
    display: none;
  }

  body.pro-login:not(#z) .pro-product {
    font-size: 16px;
  }

  body.pro-login:not(#z) .pro-product-mark {
    width: 28px;
    height: 28px;
    border-radius: 7px;
  }

  body.pro-login:not(#z) .pro-login-main {
    min-height: 0;
    margin-top: -22px;
    padding: 26px 24px 20px;
    border-radius: 20px 20px 0 0;
    background: var(--pro-surface);
  }

  body.pro-login:not(#z) .pro-login-panel {
    max-width: 440px;
    margin: 0 auto;
  }

  body.pro-login:not(#z) .pro-club-logo {
    width: 44px;
    height: 44px;
  }

  body.pro-login:not(#z) .pro-login-title {
    font-size: 22px;
    margin-top: 0;
  }

  body.pro-login:not(#z) .pro-login-footer {
    margin-top: 24px;
  }
}

/* ------------------------------------------------------------------ */
/* CAMERAS                                                             */
/* ------------------------------------------------------------------ */

body:is(.pro-cameras, .pro-app):not(#z) {
  --pro-gutter: clamp(16px, 5vw, 80px);
  background: var(--pro-bg);
}

body.pro-cameras:not(#z) {
  display: flex;
  flex-direction: column;
}

body.pro-cameras:not(#z) > * { order: 4; }
body.pro-cameras:not(#z) > .skip-link { order: 0; }
body.pro-cameras:not(#z) > .pro-topbar { order: 1; }
body.pro-cameras:not(#z) > .viewer-notice { order: 2; }
body.pro-cameras:not(#z) > .viewer-feedback-prompt { order: 2; }
body.pro-cameras:not(#z) > .viewer-control-center.is-priority { order: 2; }
body.pro-cameras:not(#z) > .pro-page-head { order: 3; }
body.pro-cameras:not(#z) > .camera-grid { order: 4; }
body.pro-cameras:not(#z) > .viewer-control-center { order: 5; }
body.pro-cameras:not(#z) > .court-condition-info { order: 6; }

/* Topo */
body:is(.pro-cameras, .pro-app):not(#z) .pro-topbar,
body:is(.pro-cameras, .pro-app):not(#z).viewer-view .pro-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  height: 68px;
  box-sizing: border-box;
  padding: 0 var(--pro-gutter);
  border-bottom: 1px solid var(--pro-line);
  /* Sem backdrop-filter: ele faria a barra inferior (position: fixed) grudar no topo. */
  background: #ffffff;
  color: var(--pro-ink);
  box-shadow: none;
}

body:is(.pro-cameras, .pro-app):not(#z) .pro-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--pro-ink);
  text-decoration: none;
}

body:is(.pro-cameras, .pro-app):not(#z) .pro-brand-logo {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
}

body:is(.pro-cameras, .pro-app):not(#z) .pro-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

body:is(.pro-cameras, .pro-app):not(#z) .pro-brand-text strong {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

body:is(.pro-cameras, .pro-app):not(#z) .pro-brand-text small {
  color: var(--pro-muted);
  font-size: 12px;
}

body:is(.pro-cameras, .pro-app):not(#z) .pro-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: auto;
}

body:is(.pro-cameras, .pro-app):not(#z) .pro-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  color: var(--pro-ink-2);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

body:is(.pro-cameras, .pro-app):not(#z) .pro-nav-link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body:is(.pro-cameras, .pro-app):not(#z) .pro-nav-link:hover {
  background: #f1f3f2;
  color: var(--pro-ink);
}

body:is(.pro-cameras, .pro-app):not(#z) .pro-nav-link.is-active {
  background: color-mix(in srgb, var(--pro-brand) 9%, transparent);
  color: var(--pro-brand-dark);
  font-weight: 600;
}

body:is(.pro-cameras, .pro-app):not(#z) .camera-topbar .pro-actions,
body:is(.pro-cameras, .pro-app):not(#z).viewer-view .camera-topbar .pro-actions {
  position: static;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: none;
}

body:is(.pro-cameras, .pro-app):not(#z) .camera-topbar .session-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--pro-line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--pro-muted);
  font-size: 13px;
  font-weight: 500;
}

body:is(.pro-cameras, .pro-app):not(#z) .camera-topbar .session-pill svg,
body:is(.pro-cameras, .pro-app):not(#z) .camera-topbar .viewer-logout-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body:is(.pro-cameras, .pro-app):not(#z) .camera-topbar .viewer-logout-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--pro-line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--pro-ink);
  font-size: 14px;
  font-weight: 500;
  box-shadow: none;
  cursor: pointer;
}

body:is(.pro-cameras, .pro-app):not(#z) .camera-topbar .viewer-logout-button:hover {
  background: #f1f3f2;
}

/* Cabeçalho da página */
body:is(.pro-cameras, .pro-app):not(#z) .pro-page-head {
  width: min(1280px, calc(100% - 2 * var(--pro-gutter)));
  margin: 32px auto 0;
}

body:is(.pro-cameras, .pro-app):not(#z) .pro-page-head h1 {
  margin: 0 0 6px;
  color: var(--pro-ink);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

body:is(.pro-cameras, .pro-app):not(#z) .pro-page-head p {
  margin: 0;
  color: var(--pro-muted);
  font-size: 15px;
}

/* Grade e cards */
body:is(.pro-cameras, .pro-app):not(#z) .camera-grid {
  gap: 24px;
  width: min(1280px, calc(100% - 2 * var(--pro-gutter)));
  margin: 24px auto 0;
  padding: 0 0 40px;
}

body:is(.pro-cameras, .pro-app):not(#z) .camera-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--pro-line);
  border-radius: 16px;
  background: var(--pro-surface);
  box-shadow: 0 1px 2px rgba(17, 24, 20, 0.04);
}

body:is(.pro-cameras, .pro-app):not(#z) .camera-card.is-interdicted {
  border-color: #f0d2cf;
}

body:is(.pro-cameras, .pro-app):not(#z) .video-frame {
  order: 0;
  background: #1a211d;
}

body:is(.pro-cameras, .pro-app):not(#z) .video-frame::before {
  display: none;
}

/* Selo de estado sobre o vídeo */
body:is(.pro-cameras, .pro-app):not(#z) .video-frame .camera-live-status {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  min-height: 28px;
  box-sizing: border-box;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: rgba(10, 14, 12, 0.62);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  pointer-events: none;
}

body:is(.pro-cameras, .pro-app):not(#z) .video-frame .camera-live-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f2b705;
}

body:is(.pro-cameras, .pro-app):not(#z) .video-frame .camera-live-status[data-state="live"] {
  font-size: 0;
  letter-spacing: 0;
}

body:is(.pro-cameras, .pro-app):not(#z) .video-frame .camera-live-status[data-state="live"]::before {
  background: var(--pro-live);
  animation: pro-pulse 2s infinite;
}

body:is(.pro-cameras, .pro-app):not(#z) .video-frame .camera-live-status[data-state="live"]::after {
  content: "AO VIVO";
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

body:is(.pro-cameras, .pro-app):not(#z) .video-frame .camera-live-status[data-state="idle"]::before {
  background: #c3cac6;
}

@media (prefers-reduced-motion: reduce) {
  body:is(.pro-cameras, .pro-app):not(#z) .video-frame .camera-live-status[data-state="live"]::before { animation: none; }
}

body:is(.pro-cameras, .pro-app):not(#z) .pro-fullscreen {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: inline-flex;
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: rgba(10, 14, 12, 0.62);
  color: #ffffff;
  box-shadow: none;
  cursor: pointer;
  opacity: 0.9;
}

body:is(.pro-cameras, .pro-app):not(#z) .pro-fullscreen:hover {
  background: rgba(10, 14, 12, 0.8);
  opacity: 1;
}

body:is(.pro-cameras, .pro-app):not(#z) .pro-fullscreen svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body:is(.pro-cameras, .pro-app):not(#z) .video-frame:fullscreen {
  aspect-ratio: auto;
  background: #000000;
}

body:is(.pro-cameras, .pro-app):not(#z) .video-frame:fullscreen video,
body:is(.pro-cameras, .pro-app):not(#z) .video-frame:fullscreen iframe {
  object-fit: contain;
}

/* Linha de informação abaixo do vídeo */
body:is(.pro-cameras, .pro-app):not(#z) .pro-card-meta,
body:is(.pro-cameras, .pro-app):not(#z).viewer-view .pro-card-meta,
body:is(.pro-cameras, .pro-app):not(#z) .camera-card.is-available .pro-card-meta,
body:is(.pro-cameras, .pro-app):not(#z) .camera-card.is-interdicted .pro-card-meta {
  order: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px 12px;
  height: auto;
  min-height: 58px;
  box-sizing: border-box;
  padding: 12px 18px;
  border: 0;
  background: transparent;
  overflow: visible;
  text-align: left;
}

body:is(.pro-cameras, .pro-app):not(#z) .pro-card-meta h2,
body:is(.pro-cameras, .pro-app):not(#z).viewer-view .pro-card-meta h2,
body:is(.pro-cameras, .pro-app):not(#z) .camera-card.is-available .pro-card-meta h2,
body:is(.pro-cameras, .pro-app):not(#z) .camera-card.is-interdicted .pro-card-meta h2 {
  margin: 0;
  color: var(--pro-ink);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
}

body:is(.pro-cameras, .pro-app):not(#z) .pro-card-meta span {
  border: 0;
  padding: 0;
  font-weight: 500;
}

body:is(.pro-cameras, .pro-app):not(#z) .pro-card-meta .court-status-line {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  width: auto;
  max-width: 100%;
}

body:is(.pro-cameras, .pro-app):not(#z) .pro-card-meta .court-status-line > * {
  flex: 0 0 auto;
  max-width: none;
}

body:is(.pro-cameras, .pro-app):not(#z) .pro-card-meta .court-badge,
body:is(.pro-cameras, .pro-app):not(#z) .camera-card.is-available .pro-card-meta .court-badge.available,
body:is(.pro-cameras, .pro-app):not(#z) .camera-card.is-interdicted .pro-card-meta .court-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  height: 26px;
  min-height: 26px;
  box-sizing: border-box;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: #e6f4ec;
  color: #0b5e37;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: none;
}

body:is(.pro-cameras, .pro-app):not(#z) .pro-card-meta .court-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #12a15a;
}

body:is(.pro-cameras, .pro-app):not(#z) .pro-card-meta .court-badge.interdicted,
body:is(.pro-cameras, .pro-app):not(#z) .camera-card.is-interdicted .pro-card-meta .court-badge {
  background: #fcebea;
  color: #9f1f16;
}

body:is(.pro-cameras, .pro-app):not(#z) .pro-card-meta .court-badge.interdicted::before,
body:is(.pro-cameras, .pro-app):not(#z) .camera-card.is-interdicted .pro-card-meta .court-badge::before {
  background: #d93025;
}

body:is(.pro-cameras, .pro-app):not(#z) .pro-card-meta .court-updated-by {
  color: var(--pro-muted);
  font-size: 13px;
  background: transparent;
}

/* "por fulano" é informação de operação: só equipe vê. */
body:is(.pro-cameras, .pro-app):not(#z).viewer-view .pro-card-meta .court-updated-by {
  display: none;
}

body:is(.pro-cameras, .pro-app):not(#z) .pro-card-meta .court-update-footer,
body:is(.pro-cameras, .pro-app):not(#z) .camera-card.is-available .pro-card-meta .court-update-footer,
body:is(.pro-cameras, .pro-app):not(#z) .camera-card.is-interdicted .pro-card-meta .court-update-footer {
  display: inline-flex;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--pro-muted);
  font-size: 13px;
  font-weight: 400;
}

body:is(.pro-cameras, .pro-app):not(#z) .pro-card-meta .court-update-footer[hidden] {
  display: none;
}

body:is(.pro-cameras, .pro-app):not(#z) .pro-card-meta .court-update-footer span {
  color: inherit;
  font-size: inherit;
}

body:is(.pro-cameras, .pro-app):not(#z) .pro-card-meta .court-update-footer strong,
body:is(.pro-cameras, .pro-app):not(#z) .camera-card.is-available .pro-card-meta .court-update-footer strong {
  color: var(--pro-ink-2);
  font-weight: 500;
}

body:is(.pro-cameras, .pro-app):not(#z) .pro-card-meta .header-camera-button {
  height: 36px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--pro-brand);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
}

/* Área "Conta e suporte" e aviso de condição das quadras */
body:is(.pro-cameras, .pro-app):not(#z) .viewer-control-center,
body:is(.pro-cameras, .pro-app):not(#z) .court-condition-info,
body:is(.pro-cameras, .pro-app):not(#z) .viewer-notice,
body:is(.pro-cameras, .pro-app):not(#z) .viewer-feedback-prompt {
  width: min(1280px, calc(100% - 2 * var(--pro-gutter)));
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
}

body:is(.pro-cameras, .pro-app):not(#z) .viewer-control-center {
  scroll-margin-top: 84px;
  margin-top: 8px;
  margin-bottom: 24px;
  border-radius: var(--pro-radius);
}

body:is(.pro-cameras, .pro-app):not(#z) .court-condition-info {
  margin-top: 0;
  margin-bottom: 40px;
  padding: 18px 20px;
  border: 1px solid var(--pro-line);
  border-radius: var(--pro-radius);
  background: var(--pro-surface);
  color: var(--pro-muted);
  font-size: 14px;
  line-height: 1.55;
  box-shadow: none;
}

body:is(.pro-cameras, .pro-app):not(#z) .court-condition-info strong {
  color: var(--pro-ink);
  font-size: 15px;
}

body:is(.pro-cameras, .pro-app):not(#z) .court-condition-info p {
  margin: 6px 0 0;
}

/* Celular / tablet */
@media (max-width: 860px) {
  body:is(.pro-cameras, .pro-app):not(#z) .camera-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  body:is(.pro-cameras, .pro-app):not(#z) {
    --pro-gutter: 16px;
    padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
  }

  body:is(.pro-cameras, .pro-app):not(#z) .pro-topbar,
  body:is(.pro-cameras, .pro-app):not(#z).viewer-view .pro-topbar {
    height: 56px;
    min-height: 56px;
    gap: 8px;
    padding: 0 8px 0 16px;
  }

  body:is(.pro-cameras, .pro-app):not(#z) .pro-brand-logo {
    width: 32px;
    height: 32px;
  }

  body:is(.pro-cameras, .pro-app):not(#z) .pro-brand-text small {
    display: none;
  }

  body:is(.pro-cameras, .pro-app):not(#z) .pro-brand-text strong {
    font-size: 16px;
  }

  body:is(.pro-cameras, .pro-app):not(#z) .camera-topbar .session-pill {
    height: 34px;
    min-height: 34px;
    padding: 0 10px;
    font-size: 12px;
  }

  body:is(.pro-cameras, .pro-app):not(#z) .camera-topbar .viewer-logout-button {
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    justify-content: center;
    border: 0;
    background: transparent;
  }

  body:is(.pro-cameras, .pro-app):not(#z) .camera-topbar .viewer-logout-button span {
    display: none;
  }

  body:is(.pro-cameras, .pro-app):not(#z) .camera-topbar .viewer-logout-button svg {
    width: 20px;
    height: 20px;
  }

  /* Navegação vira barra inferior de app */
  body:is(.pro-cameras, .pro-app):not(#z) .pro-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 0;
    margin: 0;
    height: calc(68px + env(safe-area-inset-bottom, 0px));
    padding: 0 0 env(safe-area-inset-bottom, 0px);
    border-top: 1px solid var(--pro-line);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: saturate(1.4) blur(10px);
  }

  body:is(.pro-cameras, .pro-app):not(#z) .pro-nav-link {
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    height: 68px;
    padding: 0;
    border-radius: 0;
    font-size: 12px;
  }

  body:is(.pro-cameras, .pro-app):not(#z) .pro-nav-link svg {
    width: 22px;
    height: 22px;
  }

  body:is(.pro-cameras, .pro-app):not(#z) .pro-nav-link.is-active {
    background: transparent;
  }

  body:is(.pro-cameras, .pro-app):not(#z) .pro-page-head {
    margin-top: 18px;
  }

  body:is(.pro-cameras, .pro-app):not(#z) .pro-page-head h1 {
    font-size: 22px;
    margin-bottom: 4px;
  }

  body:is(.pro-cameras, .pro-app):not(#z) .pro-page-head p {
    font-size: 14px;
  }

  body:is(.pro-cameras, .pro-app):not(#z) .camera-grid {
    gap: 14px;
    margin-top: 16px;
    padding-bottom: 20px;
  }

  body:is(.pro-cameras, .pro-app):not(#z) .camera-card {
    border-radius: 14px;
  }

  body:is(.pro-cameras, .pro-app):not(#z) .video-frame .camera-live-status {
    top: 10px;
    left: 10px;
    height: 24px;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 11px;
  }

  body:is(.pro-cameras, .pro-app):not(#z) .video-frame .camera-live-status[data-state="live"]::after {
    font-size: 11px;
  }

  body:is(.pro-cameras, .pro-app):not(#z) .pro-fullscreen {
    top: 6px;
    right: 6px;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    background: rgba(10, 14, 12, 0.5);
  }

  body:is(.pro-cameras, .pro-app):not(#z) .pro-card-meta,
  body:is(.pro-cameras, .pro-app):not(#z).viewer-view .pro-card-meta,
  body:is(.pro-cameras, .pro-app):not(#z) .camera-card.is-available .pro-card-meta,
  body:is(.pro-cameras, .pro-app):not(#z) .camera-card.is-interdicted .pro-card-meta {
    min-height: 52px;
    padding: 10px 14px;
    gap: 6px 10px;
  }

  body:is(.pro-cameras, .pro-app):not(#z) .pro-card-meta h2,
  body:is(.pro-cameras, .pro-app):not(#z).viewer-view .pro-card-meta h2,
  body:is(.pro-cameras, .pro-app):not(#z) .camera-card.is-available .pro-card-meta h2,
  body:is(.pro-cameras, .pro-app):not(#z) .camera-card.is-interdicted .pro-card-meta h2 {
    font-size: 16px;
  }

  body:is(.pro-cameras, .pro-app):not(#z) .pro-card-meta .court-badge,
  body:is(.pro-cameras, .pro-app):not(#z) .camera-card.is-available .pro-card-meta .court-badge.available,
  body:is(.pro-cameras, .pro-app):not(#z) .camera-card.is-interdicted .pro-card-meta .court-badge {
    height: 24px;
    min-height: 24px;
    padding: 0 9px;
    font-size: 12px;
  }

  body:is(.pro-cameras, .pro-app):not(#z) .pro-card-meta .court-update-footer {
    font-size: 12px;
  }
}

/* ------------------------------------------------------------------ */
/* TELAS INTERNAS (Status das quadras, Admin, Usuarios)                */
/* ------------------------------------------------------------------ */

/* Botoes de acao do topo (Modo tablet, Voltar ao admin, Sair) */
body.pro:not(#z) .pro-topbar .pro-action-button,
body.pro:not(#z) .pro-topbar .pro-logout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--pro-line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--pro-ink);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: none;
  transform: none;
  cursor: pointer;
}

body.pro:not(#z) .pro-topbar .pro-action-button:hover,
body.pro:not(#z) .pro-topbar .pro-logout:hover {
  background: #f1f3f2;
}

body.pro:not(#z) .pro-topbar .pro-action-button svg,
body.pro:not(#z) .pro-topbar .pro-logout svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.pro:not(#z) .pro-topbar .topbar-actions,
body.pro:not(#z) .pro-topbar .pro-actions {
  position: static;
  display: flex;
  flex: 0 0 auto;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: auto;
  max-width: none;
  margin: 0 0 0 auto;
  transform: none;
}

/* Sino de notificacoes do admin no topo branco */
body.pro:not(#z) .pro-topbar .admin-notification-button {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  flex-basis: 38px;
  border: 1px solid var(--pro-line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--pro-ink-2);
  box-shadow: none;
}

body.pro:not(#z) .pro-topbar .admin-notification-button:hover,
body.pro:not(#z) .pro-topbar .admin-notification-center.is-open .admin-notification-button {
  border-color: var(--pro-field);
  background: #f1f3f2;
}

body.pro:not(#z) .pro-topbar .admin-notification-badge {
  border-color: #ffffff;
}

/* Conteudo */
body.pro-app:not(#z) .admin-shell {
  width: min(1280px, calc(100% - 2 * var(--pro-gutter)));
  padding-top: 24px;
}

body.pro-app:not(#z) .pro-page-head + .admin-shell {
  padding-top: 20px;
}

body.pro-app:not(#z) .admin-panel,
body.pro-app:not(#z) .notice {
  border: 1px solid var(--pro-line);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(17, 24, 20, 0.04);
}

body.pro-app:not(#z) .eyebrow {
  color: var(--pro-brand-dark);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

body.pro-app:not(#z) .admin-panel h2 {
  color: var(--pro-ink);
  font-weight: 700;
  letter-spacing: -0.015em;
}

/* Status das quadras: cartoes mais legiveis e faceis de tocar */
body.pro-courts:not(#z) .court-status-card,
body.pro-courts:not(#z) .court-bulk-actions {
  border: 1px solid var(--pro-line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: none;
}

body.pro-courts:not(#z) .court-status-card.is-interdicted {
  border-color: #f0d2cf;
}

body.pro-courts:not(#z) .court-status-head strong {
  font-size: 17px;
  font-weight: 600;
}

body.pro-courts:not(#z) .court-status-form label,
body.pro-courts:not(#z) .court-bulk-form label {
  color: var(--pro-ink-2);
  font-size: 13px;
  font-weight: 500;
}

body.pro-courts:not(#z) .court-status-form :is(select, input),
body.pro-courts:not(#z) .court-bulk-form input {
  min-height: 44px;
  font-size: 15px;
}

body.pro-courts:not(#z) .court-meta {
  color: var(--pro-muted);
  font-size: 13px;
}

body.pro-courts:not(#z) .court-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  min-height: 26px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: #e6f4ec;
  color: #0b5e37;
  font-size: 13px;
  font-weight: 600;
}

body.pro-courts:not(#z) .court-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #12a15a;
}

body.pro-courts:not(#z) .court-badge.interdicted {
  background: #fcebea;
  color: #9f1f16;
}

body.pro-courts:not(#z) .court-badge.interdicted::before {
  background: #d93025;
}

@media (max-width: 720px) {
  body.pro:not(#z) .pro-topbar .pro-action-button span,
  body.pro:not(#z) .pro-topbar .pro-logout span {
    display: none;
  }

  body.pro:not(#z) .pro-topbar .pro-action-button,
  body.pro:not(#z) .pro-topbar .pro-logout {
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    justify-content: center;
    border: 0;
    background: transparent;
  }

  body.pro:not(#z) .pro-topbar .pro-action-button svg,
  body.pro:not(#z) .pro-topbar .pro-logout svg {
    width: 20px;
    height: 20px;
  }
}

/* ------------------------------------------------------------------ */
/* TELAS DE ACESSO (recuperar senha, cadastro, nova senha, aguarde...) */
/* ------------------------------------------------------------------ */

body.pro-auth:not(#z) {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 32px 16px;
  box-sizing: border-box;
  overflow: auto;
  background: var(--pro-bg);
}

body.pro-auth:not(#z) .login-backdrop {
  display: none;
}

body.pro-auth:not(#z) .login-shell {
  width: min(100%, 440px);
}

body.pro-auth:not(#z) .login-panel {
  display: grid;
  gap: 16px;
  justify-items: stretch;
  padding: 32px;
  border: 1px solid var(--pro-line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(17, 24, 20, 0.04), 0 12px 32px rgba(17, 24, 20, 0.06);
  text-align: left;
}

body.pro-auth:not(#z) .login-logo {
  justify-self: start;
  width: 56px;
  height: 56px;
  margin: 0;
  object-fit: cover;
  box-shadow: none;
}

body.pro-auth:not(#z) .login-panel h1 {
  margin: 0;
  color: var(--pro-ink);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
  text-align: left;
}

body.pro-auth:not(#z) .login-copy {
  margin: -8px 0 0;
  color: var(--pro-muted);
  font-size: 15px;
  line-height: 1.5;
  text-align: left;
}

body.pro-auth:not(#z) .login-form {
  gap: 16px;
}

body.pro-auth:not(#z) .login-form label {
  gap: 6px;
  color: var(--pro-ink);
  font-size: 14px;
  font-weight: 500;
}

body.pro-auth:not(#z) .login-form input:not([type="checkbox"]):not([type="hidden"]),
body.pro-auth:not(#z) .login-form select {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--pro-field);
  border-radius: 10px;
  background: #ffffff;
  color: var(--pro-ink);
  font-size: 16px;
}

body.pro-auth:not(#z) .password-field input {
  padding-right: 52px;
}

body.pro-auth:not(#z) .login-form textarea {
  padding: 12px 14px;
  font-size: 16px;
}

body.pro-auth:not(#z) .login-form button[type="submit"] {
  min-height: 50px;
  border-radius: 12px;
  background: var(--pro-brand);
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
}

body.pro-auth:not(#z) .login-form button[type="submit"]:hover {
  background: var(--pro-brand-dark);
}

body.pro-auth:not(#z) .password-toggle {
  color: var(--pro-muted);
  background: transparent;
}

body.pro-auth:not(#z) .login-secondary-link {
  justify-content: center;
  color: var(--pro-brand-dark);
  font-size: 14px;
  font-weight: 600;
}

body.pro-auth:not(#z) .login-contact {
  gap: 10px;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--pro-line);
  text-align: center;
}

body.pro-auth:not(#z) .login-contact span {
  color: var(--pro-muted);
  font-size: 14px;
}

body.pro-auth:not(#z) .login-contact a {
  min-height: 44px;
  border: 1px solid var(--pro-line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--pro-brand-dark);
  font-weight: 600;
}

body.pro-auth:not(#z) .login-contact a::before {
  content: none;
}

body.pro-auth:not(#z) .error {
  padding: 10px 12px;
  border: 1px solid #f3c9c5;
  border-radius: 10px;
  background: #fcebea;
  color: #9f1f16;
  font-size: 14px;
}

body.pro-auth:not(#z) .success {
  padding: 10px 12px;
  border: 1px solid #bfe3cd;
  border-radius: 10px;
  background: #e6f4ec;
  color: #0b5e37;
  font-size: 14px;
  font-weight: 500;
}

@media (max-width: 520px) {
  body.pro-auth:not(#z) {
    place-items: start center;
    padding: 16px;
  }

  body.pro-auth:not(#z) .login-panel {
    padding: 24px 20px;
  }
}

/* Funcionario: botao de play no centro do video (o video so abre ao tocar) */
body.pro-cameras:not(#z) .video-frame .pro-play-button {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(10, 14, 12, 0.35);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  box-shadow: none;
  transform: none;
  cursor: pointer;
}

body.pro-cameras:not(#z) .video-frame .pro-play-button:hover {
  background: rgba(10, 14, 12, 0.5);
}

body.pro-cameras:not(#z) .pro-play-icon {
  display: inline-flex;
  width: 64px;
  height: 64px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--pro-brand);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

body.pro-cameras:not(#z) .pro-play-icon svg {
  width: 28px;
  height: 28px;
  margin-left: 3px;
  fill: #ffffff;
}

/* Aviso sobre a condicao das quadras: mesmo alinhamento do resto */
body.pro-cameras:not(#z) .court-condition-info,
body.pro-cameras:not(#z) .court-condition-info p {
  text-align: left;
}

body.pro-cameras:not(#z) .court-condition-info strong {
  display: block;
  margin-bottom: 4px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}

/* Ultimos acessos: coluna "Tempo assistido" */
body.pro-admin:not(#z) .access-history-head,
body.pro-admin:not(#z) .access-history-row {
  grid-template-columns: minmax(120px, 1fr) minmax(90px, 0.7fr) minmax(140px, 0.9fr) minmax(150px, 1fr) minmax(100px, 0.7fr) minmax(140px, 0.9fr);
}

body.pro-admin:not(#z) .access-history-row .access-watch {
  color: var(--pro-ink-2);
  font-variant-numeric: tabular-nums;
}

body.pro-admin:not(#z) .access-history-row .access-watch.is-watching {
  color: #0b5e37;
  font-weight: 600;
}

@media (max-width: 760px) {
  body.pro-admin:not(#z) .access-history-head,
  body.pro-admin:not(#z) .access-history-row {
    grid-template-columns: 1fr;
  }

  body.pro-admin:not(#z) .access-history-row .access-watch::before {
    content: "Assistiu: ";
    color: var(--pro-muted);
    font-weight: 400;
  }
}
