/* ===============================
   GLOBAL
================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

/* ===============================
   TIPOGRAFÍA
================================== */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: auto;
  max-width: 100%;
  overflow-x: hidden;
  font-family: "Montserrat", sans-serif;
  background: #f7f7f7;
  color: #333;
}

/* ===============================
   CONTENEDOR GENERAL LOGIN/REGISTER
================================== */
.container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  width: 100%;
}

/* ===============================
   PANEL IZQUIERDO (BRAND)
================================== */
.brand {
  background: #B08733;
  color: white;
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand h1 {
  font-family: "Playfair Display", serif;
  font-size: 52px;
  margin: 0;
  user-select: none;
}

.brand p,
.brand span {
  font-size: 18px;
  opacity: 0.9;
}

.brand .hero {
  width: 100%;
  max-width: 380px;
  border-radius: 16px;
  margin-top: 15px;
  text-align: left;
  /* filter: drop-shadow(0 2px 4px rgba(0,0,0,0.18)); */
  filter: contrast(1.08) saturate(0.95);
}

/* ===============================
   CARD (FORMULARIOS)
================================== */
.card {
  background: #ffffff;
  padding: 60px 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo .mark {
  width: 45px;
  height: 45px;
  background: #AF822D;
  color: white;
  font-weight: bold;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.muted {
  color: #666;
  font-size: 14px;
}

/* ===============================
   FORMULARIOS
================================== */
form {
  margin-top: 25px;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

input {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #d3d3d3;
  margin-bottom: 18px;
  font-size: 15px;
}

/* Mejor accesibilidad */
input:focus {
  outline: 2px solid #AF822D;
  border-color: #AF822D;
}

/* ===============================
   PASSWORD WRAPPER
================================== */
.password-wrapper {
  position: relative;
}

.password-wrapper i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.1rem;
    color: #666;
    transition: 0.2s;
}

.password-wrapper i:hover {
    color: #000;
}

.error-box {
    margin-top: 15px;
    padding: 12px;
    border-radius: 6px;
    background: #ffe5e5;
    color: #b30000;
    display: none;
    font-size: 0.9rem;
    border-left: 4px solid #b30000;
}

/* ===============================
   FILAS Y ENLACES
================================== */
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.link-muted,
.link-accent {
  transition: opacity 0.2s;
}

.link-muted:hover,
.link-accent:hover {
  opacity: 0.8;
}

.link-muted {
  color: #777;
  font-size: 14px;
}

.link-accent {
  color: #AF822D;
  font-weight: 600;
}

/* ===============================
   BOTÓN PRINCIPAL
================================== */
.btn {
  width: 100%;
  padding: 14px;
  border-radius: 25px;
  border: 2px solid #ebe0cd;
  background: white;
  color: #ebe0cd;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
  font-size: 16px;
  margin-top: 10px;
}

.btn:hover {
  background: #ebe0cd;
  color: white;
}

/* Accesibilidad */
.btn:focus {
  outline: 3px solid rgba(175,130,45,0.4);
  outline-offset: 3px;
}

/* ===============================
   BOTON ACCEDER CON GOOGLE
================================== */

#googleBtn {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  background-color: #ffffff;
  border-radius: 25px;
  border: 2px solid #dadce0;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

#googleBtn img {
  width: 20px;
  height: 20px;
}

#googleBtn:hover {
  box-shadow: 0 1px 3px rgba(60,64,67,0.30), 0 4px 8px rgba(60,64,67,0.15);
}

#Btngoogle {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  background-color: #ffffff;
  border-radius: 25px;
  border: 2px solid #dadce0;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

#Btngoogle img {
  width: 20px;
  height: 20px;
}

#Btngoogle:hover {
  box-shadow: 0 1px 3px rgba(60,64,67,0.30), 0 4px 8px rgba(60,64,67,0.15);
}

/* ===============================
   FOOTER
================================== */
footer {
  margin-top: 10px;
  grid-column: 1 / -1; /* ocupa todo el ancho del grid */
  text-align: center;
  padding: 20px 0;
  font-size: 14px;
  color: #777;
  width: 100%;
}

/* ===============================
   DASHBOARD CONTAINER
================================== */
.dashboard-container {
  padding: 40px 20px;
  width: 100%;
  background: #f7f7f7;
  overflow-x: hidden;
}

/* ===============================
   NAVBAR DORADA
================================== */
.dashboard-nav {
  background: #AF822D;
  padding: 18px 30px;
  border-radius: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.dashboard-nav a {
  text-decoration: none;
  color: white;
  font-weight: 600;
  margin-right: 20px;
  font-size: 15px;
}

.dashboard-nav a:hover {
  opacity: 0.8;
}

/* ===============================
   TITULO
================================== */
.welcome-title {
  text-align: center;
  font-family: "Playfair Display", serif;
  font-size: 40px;
  margin: 35px 0;
  color: #333;
}

.welcome-name{
  font-size: 30px;
  text-align: center;
  font-family: "Playfair Display", serif;
  margin: 35px 0;
  color: #333;
}

/* ===============================
   GRID PRINCIPAL DEL DASHBOARD
================================== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 25px;
  width: 100%;
}

/* ===============================
   TARJETAS
================================== */
.card-box {
  background: white;
  padding: 25px;
  border-radius: 30px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.card-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
}

.points-total {
  font-size: 48px;
  font-weight: bold;
  color: #AF822D;
}

/* ===============================
   TABLA
================================== */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  overflow-x: auto;
}

table th {
  text-align: left;
  padding: 10px 0;
  font-weight: 600;
  border-bottom: 2px solid #ddd;
}

table td {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.tabla-usuarios {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0px 4px 12px rgba(0,0,0,0.1);
}

.tabla-usuarios th {
  background: #AF822D;
  color: white;
  padding: 12px;
  text-align: left;
  font-size: 14px;
}

.tabla-usuarios td {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
}

/* Alternancia de filas */
.tabla-usuarios tr:nth-child(even) {
  background: #f8fafc;
}

.tabla-usuarios tr:hover {
  background: #e2e8f0;
}


/* ===============================
   RESPONSIVE
================================== */
@media (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
  }

  .brand {
    display: none;
  }

  .card {
    padding: 40px 25px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-nav {
    flex-direction: column;
    gap: 15px;
  }
}

/* ===============================
   LOGOS CABECERA
================================== */
.navbar-logo {
  height: 40px;
}

.header-logo-img {
  height: 40px;
}

/* ===============================
   ADMIN PANEL + MODAL
================================== */

/* Tabla del panel admin */
.admin-table-actions button {
  background: #AF822D;
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: 0.2s;
}

.admin-table-actions button:hover {
  opacity: 0.85;
}
/* ===============================
   MODAL (QR perfil)
================================== */

.modal-perfil {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.oculto-perfil {
  display: none;
}

.modal-perfil-content {
  background: #fff;
  padding: 20px;
  border-radius: 15px;
  text-align: center;
  width: 320px;

  /* opcional: sombra suave */
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
}

.modal-perfil-content h2 {
  margin-top: 0;
}

#qrUser {
  margin: 10px auto;
  width: 200px;
  height: 200px;
}

.codigo-texto-perfil {
  margin-top: 10px;
  font-size: 18px;
  font-weight: bold;
}

/* ===============================
   MODAL (editar usuario)
================================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal.oculto {
  display: none;
}

.modal-content {
  background: #ffffff;
  padding: 30px;
  width: 90%;
  max-width: 350px;
  border-radius: 18px;
  box-shadow: 0 4px 30px rgba(0,0,0,0.20);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-content h2 {
  margin: 0 0 10px 0;
  font-size: 22px;
  font-weight: 700;
}

.modal-content input {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #d3d3d3;
  font-size: 15px;
}

/* botones dentro del modal */
.modal-content button {
  padding: 12px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: 0.2s;
  font-size: 15px;
}

#guardarCambiosBtn {
  background: #AF822D;
  color: white;
}

#guardarCambiosBtn:hover {
  background: #916b24;
}

.modal-content button:last-child {
  background: #ddd;
  color: #444;
}

.modal-content button:last-child:hover {
  background: #ccc;
}

.tag-admin {
  color: #16a34a;
  font-weight: bold;
}

.tag-user {
  color: #dc2626;
}

/* ===============================
   LOGIN / RESET EN MISMO LUGAR
================================== */
/* ===============================
   LOGIN / RESET (SIMPLE Y ESTABLE)
================================== */

#resetForm {
  display: none;
}

.form-box {
  width: 100%;
}

.form-box.show {
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
