/* ================================================================
 * Global Stylesheet for the "meugemeo" and "admgemeo" areas.
 * Base mantida + correções: painel menor e olho centralizado
 * ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

:root{
  --input-height: 48px;     /* altura dos inputs/botão */
}

/* ---------- Plano de fundo ---------- */
html, body { height: 100%; }

body {
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #051525 0%, #0a1e35 100%);
  color: #ffffff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

/* Vídeo de fundo */
.bg-video{
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Always sit behind the rest of the content; a negative z-index
   * ensures that even elements without explicit z-index values
   * (e.g. admin containers) will render above the video. */
  z-index: -1;
  pointer-events: none;
}

/* Conteúdo acima do vídeo */
.auth-wrapper{
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

/* ---------- Logo ---------- */
.logo-container{
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 15px 0;
  /* Ensure the logo appears above any background video */
  position: relative;
  z-index: 1;
}
.logo-container img{ max-height: 60px; height: auto; }

a{ color:#00a7ff; text-decoration:none; }
a:hover{ text-decoration:underline; }

/* ---------- Painel (REDUZIDO) ---------- */
.form-panel{
  background: #0f213d;
  padding: 15px;                /* padding reduzido para 15px */
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
  width: 100%;
  max-width: 380px;             /* painel ainda mais estreito */
  margin: 12px auto;
  position: relative;
  z-index: 1;
}
.form-panel h2{ margin:0 0 18px; color:#00a7ff; text-align:center; }

/* ---------- Grupos e campos ---------- */
/* Grid em duas linhas:
   - Row 1: label (auto)
   - Row 2: input (altura fixa = --input-height)
   O ícone do olho divide a mesma célula do input e é centralizado verticalmente. */
.form-group{
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto var(--input-height);
  row-gap: 6px;                 /* espaço entre label e input */
  position: relative;
}
.form-group label{
  grid-row: 1;
  margin: 0;                    /* sem margem adicional — usamos row-gap */
  font-weight: 500;
  color: #cfe0ef;
}
.form-group input,
.form-group select,
.form-group textarea{
  grid-row: 2;
  width: 100%;
  height: var(--input-height);
  padding: 10px 12px;
  border: none;
  border-radius: 12px;
  background: #0b1a2d;          /* caixa dos campos um pouco mais escura/menor */
  color: #ffffff;
  font-size: 1rem;
  box-sizing: border-box;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus{
  outline: none; box-shadow: 0 0 0 2px #00a7ff;
}

/* campo de senha com espaço p/ ícone */
.form-group input#password{ padding-right: 44px; }

/* ---------- Ícone do olho (CENTRALIZADO VERTICALMENTE) ---------- */
.password-toggle{
  position: absolute;           /* posição absoluta para controle total */
  top: calc(90% - 20px);       /* posiciona no centro vertical do input */
  right: 25px;                  /* distância da borda direita */
  width: 35px; 
  height: 35px;
  display: flex; 
  align-items: center; 
  justify-content: center;
  cursor: pointer;
  user-select: none;
  color: #ffffff;
  z-index: 2;                   /* acima do input */
}
.password-toggle svg{ width: 20px; height: 20px; pointer-events: none; }
.password-toggle .eye-open{ display:none; }
.password-toggle .eye-closed{ display:inline-block; }
.password-toggle.show-open .eye-open{ display:inline-block; }
.password-toggle.show-open .eye-closed{ display:none; }

/* ---------- Botão ---------- */
.btn{
  display: inline-block;
  width: 100%;
  height: var(--input-height);
  padding: 10px 20px;
  border: none;
  border-radius: 12px;
  background: #00a7ff;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .3s ease;
  box-sizing: border-box;
  text-align: center;
}
.btn:hover{ background:#0085cc; }

/* Alinha botão, campos e labels com MESMA largura no desktop */
@media (min-width:768px){
  :root{ --field-width: 290px; }   /* reduzido para acompanhar o painel menor */

  .login-page .form-panel form{
    display:flex; flex-direction:column; align-items:center;
  }
  .login-page .form-panel .form-group,
  .login-page .form-panel .form-group label{
    width: var(--field-width);
    margin-left:auto; margin-right:auto;
  }
  .login-page .form-panel #username,
  .login-page .form-panel #password,
  .login-page .form-panel .btn{
    width: var(--field-width) !important;
    margin-left:auto; margin-right:auto; display:block;
  }
}

/* ---------- Responsivo (mobile) ---------- */
@media (max-width:600px){
  .form-panel{ max-width: calc(100% - 32px); padding: 15px; }
}

/* ========= Demais estilos existentes (cards, etc.) mantidos ========= */

/* Cards & buttons */
.card-grid{ display:flex; flex-wrap:wrap; gap:30px; justify-content:center; }
.card{
  position:relative; background:#0f213d; border-radius:12px; overflow:hidden;
  box-shadow:0 4px 20px rgba(0,0,0,.4); width:300px; transition:transform .3s ease;
}
.card:hover{ transform:translateY(-6px); }

/* Imagens padrão dos cards (desktop 9:16) */
.card img{
  display:block; width:100%; height:533px; object-fit:cover;
  filter:grayscale(100%); transition:filter .5s ease;
}
.card:hover img{ filter:grayscale(0%); }

.card-title{ padding:15px; font-size:1.2rem; font-weight:600; text-align:center; }

/* Botões dos cards */
.card-buttons{
  padding:0 15px 15px; display:flex; gap:10px; justify-content:center;
}
.card-btn{
  flex:1; padding:10px; border:none; border-radius:8px; font-weight:600;
  cursor:pointer; transition:all .3s ease; text-align:center; text-decoration:none;
  display:inline-block;
}
.card-btn.primary{ background:#00a7ff; color:#fff; }
.card-btn.secondary{ background:transparent; color:#00a7ff; border:2px solid #00a7ff; }
.card-btn:hover{ transform:translateY(-2px); box-shadow:0 4px 12px rgba(0,167,255,.3); }

/* Seção de informações */
.info-section{
  max-width:1200px; margin:40px auto; padding:0 20px; text-align:center;
}
.info-section h2{ color:#00a7ff; margin-bottom:20px; }
.info-section p{ line-height:1.6; color:#cfe0ef; }

/* Footer */
.footer{
  margin-top:auto; padding:20px; text-align:center; color:#cfe0ef;
  border-top:1px solid rgba(255,255,255,.1);
}

/* ====================================================================
 * Site user pages
 *
 * The home page displays a set of cards (pré-book, book, mult, roteiros).
 * On desktop these cards should sit side‑by‑side; on mobile they stack.
 * We apply flexbox to the wrapper `.home-cards` and provide a
 * sensible responsive fallback.
 */
.home-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
}
@media (max-width: 600px) {
  .home-cards {
    flex-direction: column;
    align-items: center;
  }
}

/* Masonry (Pinterest-style) gallery for the book page */
.masonry {
  /* Default to three columns on larger screens */
  column-count: 3;
  column-gap: 10px;
  /* generous horizontal padding so the gallery has breathing room on the page */
  padding-left: 50px;
  padding-right: 50px;
}
.masonry img {
  width: 100%;
  display: block;
  margin-bottom: 10px;
  border-radius: 0;
  /* Prevent images from being split across columns */
  break-inside: avoid;
  transition: filter .3s ease;
}
/* Darken the image slightly on hover to indicate interactivity */
.masonry img:hover {
  filter: brightness(0.8);
}
@media (max-width: 1000px) {
  .masonry {
    column-count: 2;
    padding-left: 30px;
    padding-right: 30px;
  }
}
@media (max-width: 700px) {
  .masonry {
    column-count: 1;
    padding-left: 20px;
    padding-right: 20px;
  }
}
@media (max-width: 500px) {
  .masonry {
    column-count: 1;
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* Animações */
@keyframes fadeIn{
  from{ opacity:0; transform:translateY(20px); }
  to{ opacity:1; transform:translateY(0); }
}
.fade-in{ animation:fadeIn .6s ease-out; }

/* Utilidades */
.text-center{ text-align:center; }
.text-blue{ color:#00a7ff; }
.mb-0{ margin-bottom:0; }
.mb-20{ margin-bottom:20px; }
.mt-20{ margin-top:20px; }

/*
 * Page headers across the user area share a common layout.  On
 * desktop and mobile we display the heading above the action
 * button (e.g. "voltar") instead of side‑by‑side.  The
 * `.page-header` container provides vertical stacking with a small
 * gap while keeping the button width to its intrinsic size.
 */
.page-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 30px;
}
.page-header h2 {
  margin: 0;
  text-transform: lowercase;
}
/* ensure back buttons don’t stretch to full width in headers */
.page-header .btn {
  width: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/*
 * The video actions used inside modals consist of a form with
 * approval/rejection buttons.  Use flex layout and a gap so
 * buttons don’t collide.  This rule targets the form inside
 * `.video-actions` which is appended via JavaScript.
 */
.video-actions form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.video-actions form .btn {
  width: auto;
}

/*
 * Pre-book image selection.
 * The `.prebook-row` holds a flexible row of selectable cards. Each
 * `.prebook-item` represents an image option.  On desktop the
 * items appear at a fixed width; on smaller screens they wrap and
 * take up a larger portion of the container.  The selected item
 * receives a coloured border for feedback.
 */
.prebook-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}
.prebook-item {
  /* smaller cards for pre‑book options to avoid huge images on desktop */
  width: 180px;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  transition: transform .3s ease, border-color .3s ease;
  position: relative;
  z-index: 1;
}
.prebook-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
.prebook-item.selected {
  border-color: #00a7ff;
}
@media (max-width: 800px) {
  .prebook-item {
    width: 45%;
  }
  .prebook-item img {
    height: 160px;
  }
}
@media (max-width: 500px) {
  .prebook-item {
    width: 90%;
  }
  .prebook-item img {
    height: 140px;
  }
}

/*
 * Pre-book navigation styling
 * Shrink the default button widths in the pre‑book navigation and add
 * consistent spacing between the navigation buttons and the image
 * grid. The navigation is centred and wraps gracefully on smaller
 * screens.
 */
.prebook-navigation {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 30px;
  flex-wrap: wrap;
}
.prebook-navigation .btn {
  width: auto;
  min-width: 140px;
  padding-left: 30px;
  padding-right: 30px;
  margin: 0;
}

/* Ensure that content containers on admin pages sit above the background video */
.container{
  position: relative;
  z-index: 1;
}

/* ==========================================================================
 * Admin-specific enhancements
 *
 * The admin area of the site uses a number of classes that were never
 * defined in the base stylesheet.  Without these definitions tables,
 * status indicators, modals and variant buttons either inherit generic
 * styles or end up invisible due to missing backgrounds.  The
 * following blocks introduce sensible defaults so that these elements
 * display correctly across all admin pages.
 * ==========================================================================
 */

/* Tables used in the admin dashboards */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}
.admin-table th,
.admin-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  vertical-align: top;
}
.admin-table th {
  background-color: #071426;
  color: #00a7ff;
  font-weight: 600;
}
.admin-table tr:nth-child(even) {
  background-color: #0f213d;
}
.admin-table tr:hover {
  background-color: #152c4b;
}

/* Status badges that appear on the user-facing dashboard */
.status-chip {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}
.status-ok {
  background-color: #5cb85c;
  color: #ffffff;
}
.status-nao {
  background-color: #d9534f;
  color: #ffffff;
}

/* Modal overlay for confirmation dialogs */
/* Modal overlay for media previews and confirmation dialogs.  By
 * default modals are hidden and only displayed when toggled via
 * JavaScript.  The `display: none` here prevents stray × icons from
 * appearing when the page loads. */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
}
.modal[hidden] {
  display: none;
}
/* Container for modal content used in user pages (e.g., image/video
 * preview).  We limit its size relative to the viewport and allow
 * scrolling if the content exceeds the height. */
.modal-content {
  background: #0f213d;
  padding: 20px;
  border-radius: 12px;
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
}
/* Images and videos inside the modal should scale down to fit within the
 * viewport while maintaining aspect ratio. */
.modal-content img,
.modal-content video {
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
}
/* Style the × close button inside the modal */
.close-modal {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 1.8rem;
  color: #ffffff;
  cursor: pointer;
}
/* Reusable modal body (for admin confirmation dialogs) retains
 * previous appearance. */
.modal-body {
  background: #0f213d;
  padding: 20px;
  border-radius: 12px;
  max-width: 90%;
  color: #ffffff;
}
.modal-actions button {
  margin: 0 5px;
}

/* Additional button variants used in admin interfaces */
.btn-secondary {
  background-color: #6c757d;
  color: #ffffff;
}
.btn-secondary:hover {
  background-color: #5a6268;
}
.btn-danger {
  background-color: #d9534f;
  color: #ffffff;
}
.btn-danger:hover {
  background-color: #c9302c;
}
/* Small button for inline actions */
.btn-sm {
  height: auto;
  width: auto;
  padding: 6px 12px;
  font-size: 0.85rem;
}