/* assets/css/style.css */

/*===============================
   Variables Globales
===============================*/
.d-none {
  display: none !important;
}

:root {
  --color-bg:          #f5f5f5;
  --color-light:       #ffffff;
  --color-text:        #222222;
  --color-muted:       #666666;
  --color-primary:     #c00;
  --color-accent:      #c00;
  --color-accent-hover:#a00;
  --color-light-bg:    #f9f9f9;
  --radius:            8px;
  --gap:               0.5rem;
}

/*===============================
   Reset Básico
===============================*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/*===============================
   Tipografía y Fondo
===============================*/
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

/*===============================
   Enlaces y Botones
===============================*/
a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

button,
.btn {
  display: inline-block;
  background-color: var(--color-accent);
  color: var(--color-light);
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  text-align: center;
  transition: background-color 0.2s ease;
}
button:hover,
.btn:hover {
  background-color: var(--color-accent-hover);
}

/*===============================
   Header y Footer
===============================*/
.site-header {
  background-color: var(--color-light);
  border-bottom: 1px solid #ddd;
}
.site-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-header__logo {
  height: 60px;
}
.site-header__nav {
  display: flex;
  gap: 1rem;
}
.site-header__link {
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}
.site-header__link:hover {
  background: #e0e0e0;
}
.site-header__logout {
  background-color: var(--color-accent);
}
footer {
  background-color: var(--color-light);
  color: var(--color-muted);
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
}

/*===============================
   Contenedores Principales
===============================*/
.main,
.main-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: var(--color-light);
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/*===============================
   Acciones y Formularios
===============================*/
.actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
  margin-bottom: 1rem;
}
.inline-form {
  margin: 0;
}
.filter-group label {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--gap);
}

/*===============================
   Tablas y Listados
===============================*/
.table-responsive {
  overflow-x: auto;
  margin-bottom: 1.5rem;
}
.table-responsive table,
.data-table,
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-light);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  border-radius: var(--radius);
  overflow: hidden;
}
.table-responsive th,
.data-table th,
table th,
.table-responsive td,
.data-table td,
table td {
  padding: 0.8rem;
  border-bottom: 1px solid #eee;
  text-align: left;
}
.table-responsive th,
.data-table th,
table th {
  background: var(--color-light-bg);
  font-weight: 600;
}
.table-responsive tr:last-child td,
.data-table tr:last-child td {
  border-bottom: none;
}

@media (max-width: 768px) {
  .table-responsive thead { display: none; }
  .table-responsive tr {
    display: block;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: var(--color-light);
    padding: 0.75rem;
  }
  .table-responsive td {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border: none;
  }
  .table-responsive td::before {
    content: attr(data-label);
    font-weight: 600;
  }
}

/*===============================
   Badges de Estado
===============================*/
.status-badge,
.badge {
  display: inline-block;
  padding: 0.2em 0.6em;
  border-radius: 0.3em;
  color: #fff;
  font-weight: bold;
  font-size: 0.85em;
}
.status-verde,
.badge-verde    { background-color: #28a745; }
.status-amarillo,
.badge-amarillo { background-color: #ffc107; color: #000; }
.status-rojo,
.badge-rojo     { background-color: #dc3545; }

/*===============================
   Quick Check y Tarjetas
===============================*/
.quick-check {
  padding: 1rem;
  border-radius: var(--radius);
}
.color-rojo     { background-color: rgba(220,53,69,0.1); border:1px solid #dc3545; }
.color-amarillo { background-color: rgba(255,193,7,0.1);  border:1px solid #ffc107; }
.color-verde    { background-color: rgba(40,167,69,0.1);  border:1px solid #28a745; }

.card {
  background: var(--color-light);
  padding: 1rem;
  margin-bottom: 1rem;
  border:1px solid #ddd;
  border-radius: var(--radius);
}

/*===============================
   Responsive: Header y Nav
===============================*/
@media (max-width: 600px) {
  .site-header__inner {
    flex-direction: column;
    gap: var(--gap);
  }
  .site-header__nav {
    justify-content: space-around;
    width: 100%;
  }
}

/* ================================
   Botones: texto siempre blanco
   ================================ */
button,
.btn {
  color: #fff !important;        /* fuerza texto blanco */
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

/* ================================
   Hero de bienvenida con fondo
   ================================ */
.welcome-hero {
  position: relative;
  height: 100vh;
  background: url('/p360/assets/images/hero-bg.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Capa semitransparente */
.welcome-hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
}

/* Contenido centrado */
.welcome-hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #fff;
  padding: 2rem;
  max-width: 90%;
}

/* Logo sobre fondo claro */
.welcome-hero__logo {
  max-width: 300px;
  margin: 0 auto 1.5rem;
  background: rgba(255,255,255,0.85);
  padding: 0.5rem 1rem;
  border-radius: 8px;
}

/* Título y subtítulo */
.welcome-hero__title {
  font-size: clamp(1.8rem, 5vw, 3rem);
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}
.welcome-hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  opacity: 0.9;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

/* Botón grande: contraste alto */
.btn--lg {
  background-color: var(--color-accent);
  color: #fff;
  padding: 0.8rem 1.8rem;
  font-size: 1.1rem;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.btn--lg:hover {
  background-color: var(--color-accent-hover);
}

/* ================================
   Botón de Cerrar sesión (Header)
   ================================ */
.site-header__logout {
  background-color: var(--color-accent);
  border: none;
  color: #fff !important;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 600;
  transition: background-color 0.2s ease;
}
.site-header__logout:hover {
  background-color: #a00;
}

/* si fuera un <a class="btn">... */
.site-header a.btn {
  color: #fff !important;
}
