/* Estilos básicos globales - Comentarios en español */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #f5f5f7;
  color: #222;
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.navbar {
  /* Barra de navegación superior reutilizable */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background-color: #0f172a;
  color: #fff;
}

.navbar-brand {
  font-weight: 600;
  letter-spacing: 0.03em;
}

.navbar-links a {
  margin-left: 1rem;
  font-size: 0.95rem;
  color: #e5e7eb;
}

.navbar-links a:hover {
  color: #ffffff;
}

.container {
  /* Contenedor principal con máximo ancho */
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem;
}

.btn {
  /* Estilo base de botones */
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
}

.btn-primary {
  background-color: #2563eb;
  color: #fff;
}

.btn-primary:hover {
  background-color: #1d4ed8;
}

.btn-outline {
  background-color: transparent;
  color: #2563eb;
  border: 1px solid #2563eb;
}

.btn-outline:hover {
  background-color: #eff6ff;
}

.card {
  /* Tarjetas reutilizables para paneles */
  background-color: #ffffff;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
  margin-bottom: 1.5rem;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.grid {
  /* Grid responsivo simple */
  display: grid;
  gap: 1rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

h1, h2, h3 {
  margin-top: 0;
}

/* Formularios - Comentarios en español */

.form-group {
  margin-bottom: 0.9rem;
}

label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
  font-size: 0.9rem;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 1px #bfdbfe;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.table th,
.table td {
  border-bottom: 1px solid #e5e7eb;
  padding: 0.6rem;
}

.table th {
  text-align: left;
  background-color: #f9fafb;
}

/* Contenedor para tablas con scroll horizontal en pantallas pequeñas */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

/* Evitamos que el contenido se rompa en muchas líneas dentro de las celdas */
.table th,
.table td {
  white-space: nowrap;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
}

.badge-success {
  background-color: #dcfce7;
  color: #166534;
}

.badge-warning {
  background-color: #fef9c3;
  color: #854d0e;
}

.badge-info {
  background-color: #e0f2fe;
  color: #075985;
}

/* Hero landing page - Comentarios en español */

.hero {
  padding: 3rem 1.5rem 4rem;
  text-align: center;
}

.hero-title {
  font-size: clamp(2rem, 3vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  font-size: 1rem;
  color: #4b5563;
  max-width: 620px;
  margin: 0 auto 1.5rem;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-tagline {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 0.75rem;
}

/* Layout del hero en escritorio */
.hero {
  padding-top: 3rem;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-mockup-card {
  min-height: 260px;
  overflow: hidden;
}

.hero-mockup-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0.75rem;
}

/* Ajustes de logo en el header (por si se ve muy grande en móvil) */
.navbar-brand img {
  max-height: 52px;
  height: auto;
  width: auto;
  object-fit: contain;
}

/* ✅ VERSIÓN MÓVIL */
@media (max-width: 768px) {
  .hero {
    padding-top: 2rem;
  }

  .hero-layout {
    grid-template-columns: 1fr;  /* Solo 1 columna */
    gap: 1.5rem;
  }

  .hero-text {
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }

  /* Mostrar el mockup debajo del texto, centrado */
  .hero-mockup {
    display: block;
  }

  .hero-mockup-card {
    max-width: 320px;
    margin: 0 auto;
  }

  .hero-title {
    font-size: 2rem;
    line-height: 1.2;
  }
}


/* Responsive ajustes menores */

@media (max-width: 640px) {
  .container {
    padding: 1rem;
  }

  /* Tablas un poco más compactas en móvil */
  .table {
    font-size: 0.85rem;
  }

  .table th,
  .table td {
    padding: 0.45rem;
  }
}


/* Header no queda demaciado alto*/

@media (max-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Centrar logo y organizar header en versión móvil */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;        /* Logo arriba, menú abajo */
    align-items: center;           /* Centra horizontalmente */
    justify-content: center;       /* Centra verticalmente */
    padding: 0.5rem 1rem;
    gap: 0.35rem;
  }

  .navbar-brand {
    margin: 0;
  }

  .navbar-links {
    display: flex;
    gap: 0.75rem;
  }

  .navbar-links a {
    margin-left: 0;               /* Quitamos el margin-left del desktop */
    font-size: 0.9rem;
  }
}



/* Layout auth (login/registro) */

.auth-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 2rem;
}


/* Hover bonito en los botones*/
.btn-primary {
  background-color: #2563eb;
  color: #fff;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.btn-primary:hover {
  background-color: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.45);
}

/* Separa header del hero*/
.hero {
  padding-top: 3.5rem;
}

/* Fila de totales (alineación) */
.totals-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

/* Settings layout helpers */
.form-group {
  margin-bottom: 12px;
}

.branding-row {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.branding-preview {
  width: 180px;
  height: 90px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  overflow: hidden;
}

.branding-preview img {
  max-width: 100%;
  max-height: 100%;
}

.branding-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* ===============================
   Branding logo preview (Settings)
   =============================== */

.branding-preview {
  width: 180px;
  height: 90px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  overflow: hidden;
}

.branding-logo-preview {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: none;
}

/* Settings layout */
.settings-grid{
  display:grid;
  grid-template-columns: 1.4fr .9fr;
  gap: 18px;
}
@media (max-width: 900px){
  .settings-grid{ grid-template-columns:1fr; }
}

/* Issuer preview */
.issuer-preview{
  display:flex;
  gap:14px;
  align-items:center;
  flex-wrap:wrap;
  margin-top:10px;
}
.issuer-preview-logo{
  width:160px;
  height:80px;
  border:1px solid #e5e7eb;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#fff;
  overflow:hidden;
}
.issuer-preview-logo img{
  max-width:100%;
  max-height:100%;
  object-fit:contain;
}
.issuer-preview-name{
  font-weight:800;
  font-size:16px;
}

