﻿/* =========================================================
   1554-34G - TEMA LIMPO / LOGO NOVO / LIGHT FIX
   ========================================================= */

/* ---------- LOGO + TÍTULO ---------- */
.brand-wrap,
.sidebar .brand-wrap {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.brand-logo,
.sidebar .brand-logo {
  width: 56px !important;
  min-width: 56px !important;
  height: 56px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  border-radius: 8px !important;
}

.brand-logo img,
.sidebar .brand-logo img {
  width: 56px !important;
  height: 56px !important;
  object-fit: contain !important;
  display: block !important;
}

.brand-title,
.sidebar .brand-title {
  display: block !important;
  font-size: 19px !important;
  font-weight: 900 !important;
  line-height: 1.02 !important;
  color: #0f172a !important;
  white-space: nowrap !important;
}

.brand-title span,
.sidebar .brand-title span {
  display: inline-block !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  color: #0f172a !important;
}

/* ---------- FUNDO BASE ---------- */
body.light #loginBg {
  opacity: 0 !important;
  visibility: hidden !important;
}

body.light .app-shell {
  background: #edf4fb !important;
}

body:not(.light) .app-shell {
  background: rgba(0, 8, 20, .35) !important;
}

/* ---------- SIDEBAR ---------- */
body.light .sidebar {
  background: #dce8f5 !important;
  border-right: 1px solid rgba(15,23,42,.10) !important;
}

body:not(.light) .sidebar {
  background: rgba(5,16,33,.92) !important;
  border-right: 1px solid rgba(120,170,230,.18) !important;
}

body.light .sidebar,
body.light .sidebar * {
  color: #0f172a !important;
  text-shadow: none !important;
}

body:not(.light) .sidebar,
body:not(.light) .sidebar * {
  color: #ffffff !important;
}

body.light .nav-item {
  background: rgba(255,255,255,.42) !important;
  border: 1px solid rgba(15,23,42,.06) !important;
  color: #0f172a !important;
}

body.light .nav-item * {
  color: #0f172a !important;
}

body.light .nav-item.active,
body.light .nav-item:hover {
  background: #9ec4ef !important;
  color: #ffffff !important;
}

body.light .nav-item.active *,
body.light .nav-item:hover * {
  color: #ffffff !important;
}

body:not(.light) .nav-item {
  background: rgba(7,21,42,.92) !important;
  border: 1px solid rgba(84,132,196,.20) !important;
  color: #ffffff !important;
}

body:not(.light) .nav-item * {
  color: #ffffff !important;
}

/* ---------- TOPO ---------- */
.topbar,
.topbar * {
  color: #ffffff !important;
}

/* ---------- HERO / CABEÇALHO ---------- */
.hero,
.hero * {
  color: #ffffff !important;
}

body.light .hero {
  background: linear-gradient(90deg, #02152f 0%, #27405f 45%, #c8d1dc 100%) !important;
  border: 1px solid rgba(15,23,42,.08) !important;
}

body:not(.light) .hero {
  background: linear-gradient(90deg, rgba(1,15,40,.95) 0%, rgba(6,28,58,.88) 48%, rgba(55,73,95,.35) 100%) !important;
}

/* ---------- CARDS BRANCOS / CINZA NO LIGHT ---------- */
body.light .card,
body.light .stat-card,
body.light .panel,
body.light .section-card,
body.light .help-box,
body.light .summary-card,
body.light .module-panel,
body.light .info-panel,
body.light .extract-panel,
body.light .security-panel,
body.light .message-row,
body.light .audio-row,
body.light .pdf-row,
body.light .quick-row,
body.light .banner,
body.light .trip-card,
body.light .trip-module-card,
body.light .resume-card,
body.light .pill-card,
body.light .tile,
body.light .box,
body.light .trip-status-box,
body.light .weather-box,
body.light .schedule,
body.light .table-card,
body.light .ranking-card,
body.light .bonus-card {
  background: rgba(255,255,255,.96) !important;
  border: 1px solid rgba(15,23,42,.10) !important;
  color: #0f172a !important;
  box-shadow: none !important;
}

body.light .card *,
body.light .stat-card *,
body.light .panel *,
body.light .section-card *,
body.light .help-box *,
body.light .summary-card *,
body.light .module-panel *,
body.light .info-panel *,
body.light .extract-panel *,
body.light .security-panel *,
body.light .message-row *,
body.light .audio-row *,
body.light .pdf-row *,
body.light .quick-row *,
body.light .banner *,
body.light .trip-card *,
body.light .trip-module-card *,
body.light .resume-card *,
body.light .pill-card *,
body.light .tile *,
body.light .box *,
body.light .trip-status-box *,
body.light .weather-box *,
body.light .schedule *,
body.light .table-card *,
body.light .ranking-card *,
body.light .bonus-card * {
  color: #0f172a !important;
  text-shadow: none !important;
}

/* ---------- CARDS NO DARK ---------- */
body:not(.light) .card,
body:not(.light) .stat-card,
body:not(.light) .panel,
body:not(.light) .section-card,
body:not(.light) .help-box,
body:not(.light) .summary-card,
body:not(.light) .module-panel,
body:not(.light) .info-panel,
body:not(.light) .extract-panel,
body:not(.light) .security-panel,
body:not(.light) .message-row,
body:not(.light) .audio-row,
body:not(.light) .pdf-row,
body:not(.light) .quick-row,
body:not(.light) .banner,
body:not(.light) .trip-card,
body:not(.light) .trip-module-card,
body:not(.light) .resume-card,
body:not(.light) .pill-card,
body:not(.light) .tile,
body:not(.light) .box,
body:not(.light) .trip-status-box,
body:not(.light) .weather-box,
body:not(.light) .schedule,
body:not(.light) .table-card,
body:not(.light) .ranking-card,
body:not(.light) .bonus-card {
  background: rgba(8,25,49,.88) !important;
  border: 1px solid rgba(120,170,230,.18) !important;
  color: #ffffff !important;
}

body:not(.light) .card *,
body:not(.light) .stat-card *,
body:not(.light) .panel *,
body:not(.light) .section-card *,
body:not(.light) .help-box *,
body:not(.light) .summary-card *,
body:not(.light) .module-panel *,
body:not(.light) .info-panel *,
body:not(.light) .extract-panel *,
body:not(.light) .security-panel *,
body:not(.light) .message-row *,
body:not(.light) .audio-row *,
body:not(.light) .pdf-row *,
body:not(.light) .quick-row *,
body:not(.light) .banner *,
body:not(.light) .trip-card *,
body:not(.light) .trip-module-card *,
body:not(.light) .resume-card *,
body:not(.light) .pill-card *,
body:not(.light) .tile *,
body:not(.light) .box *,
body:not(.light) .trip-status-box *,
body:not(.light) .weather-box *,
body:not(.light) .schedule *,
body:not(.light) .table-card *,
body:not(.light) .ranking-card *,
body:not(.light) .bonus-card * {
  color: #ffffff !important;
}

/* ---------- MÓDULOS COLORIDOS ---------- */
.module-card,
.module-card * {
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0,0,0,.35) !important;
}

.module-card.blue-card   { background: linear-gradient(135deg, #0d58ab, #063563) !important; }
.module-card.green-card  { background: linear-gradient(135deg, #0e7b36, #064b22) !important; }
.module-card.gold-card   { background: linear-gradient(135deg, #9a7106, #5f4302) !important; }
.module-card.purple-card { background: linear-gradient(135deg, #5e2db2, #3d1c73) !important; }
.module-card.orange-card { background: linear-gradient(135deg, #955005, #6d3701) !important; }
.module-card.cyan-card   { background: linear-gradient(135deg, #0c7b92, #045466) !important; }

/* ---------- TEXTO AUXILIAR ---------- */
body.light .small,
body.light .muted,
body.light .field .label,
body.light .subtitle,
body.light .secondary-text {
  color: #3c526a !important;
}

body:not(.light) .small,
body:not(.light) .muted,
body:not(.light) .field .label,
body:not(.light) .subtitle,
body:not(.light) .secondary-text {
  color: #d6e4f5 !important;
}

/* ---------- BOTÕES ---------- */
body.light button,
body.light .btn {
  color: #0f172a;
}

body.light button.secondary,
body.light .secondary,
body.light .ghost-btn,
body.light .back-home {
  background: rgba(15,23,42,.05) !important;
  color: #0f172a !important;
  border: 1px solid rgba(15,23,42,.10) !important;
}

body:not(.light) button.secondary,
body:not(.light) .secondary,
body:not(.light) .ghost-btn,
body:not(.light) .back-home {
  color: #ffffff !important;
}

/* ---------- STATUS / PILLS ---------- */
.positive,
.positive * {
  color: #22c55e !important;
}

.negative,
.negative * {
  color: #ef4444 !important;
}

.gold,
.gold * {
  color: #f59e0b !important;
}

body.light .pill,
body.light .status-pill,
body.light .badge {
  border: 1px solid rgba(15,23,42,.08) !important;
}

/* ---------- RODAPÉ ---------- */
.sw-footer {
  margin: 28px 0 10px !important;
  padding: 18px !important;
  border-radius: 16px !important;
  text-align: center !important;
  font-weight: 900 !important;
  font-size: 18px !important;
  line-height: 1.2 !important;
  opacity: 1 !important;
  display: block !important;
}

body.light .sw-footer {
  background: rgba(255,255,255,.96) !important;
  color: #111827 !important;
  border: 1px solid rgba(15,23,42,.10) !important;
}

body:not(.light) .sw-footer {
  background: rgba(8,25,49,.90) !important;
  color: #ffffff !important;
  border: 1px solid rgba(120,170,230,.18) !important;
}

.sw-footer,
.sw-footer * {
  text-shadow: none !important;
  opacity: 1 !important;
}

.sw-w {
  color: #35a7ff !important;
  font-weight: 900 !important;
}

/* ---------- CAMPOS QUE ESTAVAM APAGANDO NO LIGHT ---------- */
body.light .module-viagens,
body.light .resumo-bonificacao,
body.light .security-grid,
body.light .audio-grid,
body.light .pdf-grid,
body.light .integration-bar {
  background: rgba(255,255,255,.96) !important;
  color: #0f172a !important;
  border: 1px solid rgba(15,23,42,.10) !important;
}

body.light .module-viagens *,
body.light .resumo-bonificacao *,
body.light .security-grid *,
body.light .audio-grid *,
body.light .pdf-grid *,
body.light .integration-bar * {
  color: #0f172a !important;
}

/* 1554-38D - Responsividade App Motorista Web */
.action-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
}

.action-grid button {
  white-space: normal;
}

.action-grid button:disabled,
button:disabled {
  opacity: .45;
  cursor: not-allowed;
  filter: grayscale(1);
}

.accept-grid {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.12);
}

.accept-grid button {
  width: 100%;
  min-height: 48px;
}

@media (max-width: 900px) {
  .app-shell,
  .main,
  .content {
    width: 100%;
    max-width: 100%;
  }

  .trip-route,
  .schedule-grid,
  .stats-grid,
  .modules-grid {
    grid-template-columns: 1fr !important;
  }

  .action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .action-grid button {
    width: 100%;
    min-height: 46px;
  }
}

@media (max-width: 560px) {
  body {
    overflow-x: hidden;
  }

  .page-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .route-title {
    font-size: 1.15rem;
    line-height: 1.35;
  }

  .trip-card,
  .card,
  .schedule,
  .trip-point {
    border-radius: 18px;
  }

  .action-grid {
    grid-template-columns: 1fr;
  }

  .action-grid button,
  .accept-grid button {
    width: 100%;
    min-height: 48px;
  }

  .nav-item {
    min-height: 44px;
  }
}

/* 1554-38D - Responsividade App Motorista Web */
.action-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
}

.action-grid button {
  white-space: normal;
}

.action-grid button:disabled,
button:disabled {
  opacity: .45;
  cursor: not-allowed;
  filter: grayscale(1);
}

.accept-grid {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.12);
}

.accept-grid button {
  width: 100%;
  min-height: 48px;
}

@media (max-width: 900px) {
  .app-shell,
  .main,
  .content {
    width: 100%;
    max-width: 100%;
  }

  .trip-route,
  .schedule-grid,
  .stats-grid,
  .modules-grid {
    grid-template-columns: 1fr !important;
  }

  .action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .action-grid button {
    width: 100%;
    min-height: 46px;
  }
}

@media (max-width: 560px) {
  body {
    overflow-x: hidden;
  }

  .page-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .route-title {
    font-size: 1.15rem;
    line-height: 1.35;
  }

  .trip-card,
  .card,
  .schedule,
  .trip-point {
    border-radius: 18px;
  }

  .action-grid {
    grid-template-columns: 1fr;
  }

  .action-grid button,
  .accept-grid button {
    width: 100%;
    min-height: 48px;
  }

  .nav-item {
    min-height: 44px;
  }
}

/* 1554-42E - Segurança real */
.security-content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.security-content-card {
  border: 1px solid var(--border, rgba(255,255,255,.12));
  background: var(--card, rgba(255,255,255,.04));
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
}

.security-content-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.security-content-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(0,122,255,.12);
  font-size: 22px;
}

.security-content-type {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-secondary, #8e8e93);
  font-weight: 800;
}

.security-content-card h3 {
  margin: 4px 0 8px;
}

.security-content-card p {
  color: var(--text-secondary, #8e8e93);
  line-height: 1.45;
}

.security-content-meta {
  margin: 12px 0;
}

.security-badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.security-badge.points {
  background: rgba(52,199,89,.16);
  color: var(--text-primary, #fff);
}

.security-badge.muted {
  background: rgba(142,142,147,.16);
  color: var(--text-secondary, #8e8e93);
}

.security-content-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.security-modal.hidden {
  display: none;
}

.security-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.security-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.62);
  backdrop-filter: blur(8px);
}

.security-modal-box {
  position: relative;
  z-index: 2;
  width: min(760px, calc(100vw - 24px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  margin: 16px auto;
  border-radius: 20px;
  background: var(--card, #1c1c1e);
  color: var(--text-primary, #fff);
  border: 1px solid var(--border, rgba(255,255,255,.12));
  box-shadow: 0 24px 80px rgba(0,0,0,.42);
}

.security-modal-box.pdf-box {
  width: min(980px, calc(100vw - 20px));
}

.security-modal-head {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  background: inherit;
  border-bottom: 1px solid var(--border, rgba(255,255,255,.12));
}

.security-modal-content {
  padding: 16px;
  line-height: 1.6;
}

.security-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px;
  border-top: 1px solid var(--border, rgba(255,255,255,.12));
}

.security-pdf-frame {
  width: 100%;
  height: min(70vh, 720px);
  border: 0;
  background: #fff;
}

a.button {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* 1554-42P-R1 - Jogos / Quiz SSMA */
.games-hero {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin: 16px 0;
}

.game-card {
  position: relative;
  min-height: 170px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(80, 150, 255, .22);
  background: rgba(0, 40, 85, .42);
  cursor: default;
  box-shadow: 0 14px 32px rgba(0,0,0,.18);
}

.game-card-active {
  cursor: pointer;
}

.game-card-active:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.game-card.muted {
  opacity: .72;
}

.game-icon {
  font-size: 32px;
  margin-bottom: 16px;
}

.game-card h3 {
  margin: 0 0 8px;
}

.game-card p {
  color: var(--text-secondary, #8e8e93);
  line-height: 1.45;
}

.game-badge {
  display: inline-flex;
  margin-top: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(52,199,89,.18);
}

.game-badge.muted {
  background: rgba(142,142,147,.20);
}

.game-arrow {
  position: absolute;
  right: 18px;
  bottom: 18px;
}

.quiz-box {
  margin-top: 18px;
}

.quiz-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.quiz-kicker {
  color: var(--text-secondary, #8e8e93);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 11px;
  font-weight: 900;
}

.quiz-score {
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0,122,255,.16);
  font-weight: 900;
}

.quiz-progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(142,142,147,.22);
  overflow: hidden;
  margin: 12px 0 16px;
}

.quiz-progress div {
  height: 100%;
  background: rgba(52,199,89,.85);
}

.quiz-options {
  display: grid;
  gap: 10px;
}

.quiz-option {
  text-align: left;
  justify-content: flex-start;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
}

.quiz-option.correct {
  background: rgba(52,199,89,.22);
  border-color: rgba(52,199,89,.7);
}

.quiz-option.wrong {
  background: rgba(255,59,48,.20);
  border-color: rgba(255,59,48,.7);
}

.quiz-feedback {
  margin-top: 14px;
  line-height: 1.5;
}

.quiz-feedback .ok {
  color: #32d74b;
}

.quiz-feedback .bad {
  color: #ff453a;
}

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

.quiz-result-icon {
  font-size: 42px;
  margin-bottom: 8px;
}

.quiz-result-score {
  display: inline-flex;
  margin: 12px 0;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(52,199,89,.16);
  font-weight: 900;
}

/* 1554-43S - Fases reais de jogos via PocketBase */
.caca-grid {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(15, 23, 42, .22);
  border: 1px solid rgba(148, 163, 184, .22);
  margin: 14px 0;
}

.caca-row {
  display: flex;
  gap: 6px;
}

.caca-row span {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-weight: 900;
  background: rgba(59, 130, 246, .16);
  border: 1px solid rgba(96, 165, 250, .26);
}

.word-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 18px;
}

.word-bank button {
  width: auto;
  padding: 10px 14px;
}

.word-bank button.found {
  opacity: .52;
  text-decoration: line-through;
}

.cruzadas-list {
  display: grid;
  gap: 12px;
  margin: 16px 0;
}

.cruzada-item {
  display: grid;
  grid-template-columns: 1fr minmax(160px, 260px);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: rgba(15, 23, 42, .18);
  border: 1px solid rgba(148, 163, 184, .20);
}

.cruzada-item input {
  width: 100%;
}

.cruzada-item.ok {
  border-color: rgba(34, 197, 94, .65);
}

.cruzada-item.bad {
  border-color: rgba(239, 68, 68, .58);
}

@media (max-width: 720px) {
  .cruzada-item {
    grid-template-columns: 1fr;
  }

  .caca-row span {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }
}

/* 1554-43T-2/2 - Palavras cruzadas com grade visual */
.cz-layout-real {
  display: grid;
  grid-template-columns: minmax(320px, auto) 1fr;
  gap: 24px;
  align-items: start;
  margin-top: 18px;
}

.cz-board-wrap {
  overflow-x: auto;
  padding-bottom: 8px;
}

.cz-board-real {
  display: grid;
  gap: 5px;
  width: max-content;
  padding: 14px;
  border-radius: 18px;
  background: rgba(15, 23, 42, .24);
  border: 1px solid rgba(148, 163, 184, .22);
}

.cz-cell {
  width: 42px;
  height: 42px;
  position: relative;
  border-radius: 9px;
  background: rgba(30, 64, 120, .78);
  border: 1px solid rgba(96, 165, 250, .34);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cz-cell.cz-empty {
  background: transparent;
  border: 0;
}

.cz-cell input {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #fff;
  text-align: center;
  text-transform: uppercase;
  font-weight: 950;
  font-size: 20px;
  outline: none;
}

.cz-cell.cz-active {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .45);
}

.cz-cell.cz-ok {
  background: linear-gradient(180deg, #1fc970, #169b55);
  border-color: rgba(182, 255, 210, .9);
}

.cz-cell.cz-bad {
  background: rgba(220, 38, 38, .35);
  border-color: rgba(248, 113, 113, .85);
}

.cz-num {
  position: absolute;
  top: 2px;
  left: 4px;
  font-size: 9px;
  font-weight: 950;
  color: rgba(255,255,255,.86);
  pointer-events: none;
}

.cz-clues-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.cz-clue-col h4 {
  margin: 0 0 10px;
}

.cz-clue {
  padding: 10px 12px;
  margin-bottom: 10px;
  border-radius: 14px;
  background: rgba(15, 23, 42, .22);
  border: 1px solid rgba(148, 163, 184, .20);
}

.cz-clue span {
  display: block;
  margin: 4px 0;
}

.cz-clue small {
  opacity: .78;
}

.cz-clue.cz-active {
  border-color: rgba(96, 165, 250, .85);
  background: rgba(59, 130, 246, .16);
}

.cz-clue.cz-ok {
  border-color: rgba(34, 197, 94, .8);
  background: rgba(34, 197, 94, .12);
}

.cz-clue.cz-bad {
  border-color: rgba(239, 68, 68, .72);
}

@media (max-width: 900px) {
  .cz-layout-real,
  .cz-clues-wrap {
    grid-template-columns: 1fr;
  }
}

/* 1554-43T-R2 - Correções de UX das palavras cruzadas */
.cz-cell input {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  caret-color: #ffffff !important;
  background: transparent !important;
  opacity: 1 !important;
}

.cz-cell input:focus {
  outline: 2px solid rgba(147, 197, 253, .95) !important;
  outline-offset: -2px;
  background: rgba(59, 130, 246, .20) !important;
}

.cz-board-real.cz-focus-mode .cz-cell:not(.cz-active):not(.cz-empty) {
  opacity: .32;
  filter: grayscale(.25);
}

.cz-clues-wrap.cz-focus-mode .cz-clue:not(.cz-active) {
  opacity: .34;
  filter: grayscale(.3);
}

.cz-cell.cz-active {
  opacity: 1 !important;
  background: rgba(37, 99, 235, .92) !important;
  border-color: rgba(191, 219, 254, .95) !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .35);
}

.cz-clue.cz-active {
  opacity: 1 !important;
  background: rgba(37, 99, 235, .24) !important;
  border-color: rgba(147, 197, 253, .95) !important;
}

/* 1554-43W-2/2 - Quadro lateral limpo do Caça-palavras */
#jogos-fases-area .cp-layout {
  display: grid !important;
  grid-template-columns: minmax(420px, 560px) minmax(340px, 1fr) !important;
  gap: 28px !important;
  align-items: start !important;
}

#jogos-fases-area .cp-board-wrap {
  grid-column: 1 !important;
  max-width: max-content !important;
}

#jogos-fases-area .cp-side {
  grid-column: 2 !important;
  min-height: 420px !important;
  padding: 22px !important;
  border-radius: 22px !important;
  border: 1px solid rgba(59,130,246,.28) !important;
  background: rgba(7, 20, 47, .55) !important;
  box-sizing: border-box !important;
}

#jogos-fases-area .cp-side h4 {
  font-size: 28px !important;
  line-height: 1.15 !important;
  margin: 0 0 16px 0 !important;
  font-weight: 900 !important;
  color: #fff !important;
}

#jogos-fases-area .cp-side .cp-words,
#jogos-fases-area .cp-side #cp-words {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  margin: 0 0 18px 0 !important;
  max-width: 100% !important;
}

#jogos-fases-area .cp-side .cp-word {
  min-height: 42px !important;
  padding: 10px 16px !important;
  border-radius: 999px !important;
  white-space: nowrap !important;
  font-size: 14px !important;
}

#jogos-fases-area .cp-side .cp-word.is-found {
  background: linear-gradient(180deg, #22c55e, #16a34a) !important;
  text-decoration: line-through !important;
  text-decoration-thickness: 3px !important;
  color: #fff !important;
}

#jogos-fases-area .cp-side .cp-help,
#jogos-fases-area .cp-side .cp-status {
  margin-top: 14px !important;
  line-height: 1.45 !important;
}

/* evita que o painel lateral invada a grade */
#jogos-fases-area .cp-board-wrap + .cp-side {
  margin-left: 0 !important;
}

@media (max-width: 1050px) {
  #jogos-fases-area .cp-layout {
    grid-template-columns: 1fr !important;
  }

  #jogos-fases-area .cp-side {
    grid-column: 1 !important;
    min-height: auto !important;
  }
}

/* 1554-44B - Login motorista no padrão Portal Licenças */
body:has(#page-login.active) {
  overflow: hidden !important;
}

#page-login.login-page.active {
  display: flex !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  min-height: 100vh !important;
  padding: 0 !important;
  width: 100vw !important;
}

#page-login .login-card {
  width: 460px !important;
  max-width: 460px !important;
  min-height: 100vh !important;
  border-radius: 0 !important;
  border: 0 !important;
  padding: 52px 44px !important;
  background: rgba(8, 17, 32, .96) !important;
  box-shadow: 12px 0 40px rgba(0,0,0,.32) !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
}

#page-login .brand {
  align-items: center !important;
  margin-bottom: 96px !important;
}

#page-login .brand-logo {
  width: 96px !important;
  height: 76px !important;
  min-width: 96px !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#page-login .brand-logo img {
  width: 96px !important;
  height: 76px !important;
  object-fit: contain !important;
}

#page-login .brand-title {
  font-size: 25px !important;
  line-height: 1.05 !important;
  font-weight: 900 !important;
}

#page-login .brand-title span {
  color: #60a5fa !important;
}

#page-login h1 {
  font-size: 28px !important;
  margin-top: 0 !important;
  margin-bottom: 10px !important;
}

#page-login input {
  height: 48px !important;
  border-radius: 13px !important;
}

#page-login button {
  height: 52px !important;
  border-radius: 13px !important;
  font-weight: 800 !important;
}

#loginBg .slide.active {
  opacity: .72 !important;
}

#loginBg::after {
  background:
    linear-gradient(90deg, rgba(8,17,32,.88) 0%, rgba(8,17,32,.48) 30%, rgba(8,17,32,.18) 100%),
    linear-gradient(180deg, rgba(2,6,23,.25), rgba(2,6,23,.35)) !important;
}

@media (max-width: 760px) {
  #page-login .login-card {
    width: 100vw !important;
    max-width: 100vw !important;
    padding: 34px 22px !important;
  }

  #page-login .brand {
    margin-bottom: 52px !important;
  }
}

/* 1554-44C - Corrigir legibilidade do logo RotaLog Motorista */
#page-login .brand-title,
#page-login .brand-title * {
  opacity: 1 !important;
  text-shadow: 0 2px 8px rgba(0,0,0,.35) !important;
}

#page-login .brand-title {
  color: #ffffff !important;
}

#page-login .brand-title span {
  color: #38bdf8 !important;
}

#page-login .brand-logo img {
  opacity: 1 !important;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.35)) !important;
}
