/* ===========================
   Premium Theme - CheckInn ERP (Cold Edition)
   =========================== */

:root {
  /* Core Palette */
  --primary: #3a6ea5;       /* Azul elegante */
  --primary-dark: #1a2b3c;  /* Azul profundo */
  --secondary: #bfc5d2;     /* Plateado suave */
  --secondary-dark: #9aa0ac;/* Plateado más oscuro */
  
  --dark-bg: #0b0b0b;       /* Negro profundo */
  --dark-surface: #121212;  /* Negro base */
  --dark-surface-2: #1e293b;/* Slate frío */
  
  --text-main: #f2f2f2;     /* Blanco suave */
  --text-muted: hsl(215, 15%, 70%); /* Gris frío */
  
  --success: #2e7d32;       /* Verde bosque institucional */
  --warning: #b8860b;       /* Ámbar apagado */
  --danger: #8b0000;        /* Rojo vino */
  
  /* Glassmorphism */
  --glass-bg: rgba(18, 18, 18, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  
  /* Dimensions & Spacing */
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
}

/* Base Styles */
body {
  background-color: var(--dark-bg);
  background-image: 
    radial-gradient(at 0% 0%, rgba(58, 110, 165, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(191, 197, 210, 0.15) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: #fff;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.text-muted {
  color: var(--text-muted) !important;
}

/* Components: Cards & Glassmorphism */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--glass-shadow);
  color: var(--text-main);
}

.card {
  border: none;
  background: var(--dark-surface);
  border-radius: var(--radius-md);
  color: var(--text-main);
  border: 1px solid rgba(255,255,255,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card-header {
  background: transparent;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding: 1.25rem;
  font-weight: 600;
}

/* Buttons */
.btn {
  border-radius: var(--radius-sm);
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  transition: all 0.2s;
  letter-spacing: 0.025em;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  box-shadow: 0 4px 6px -1px rgba(58, 110, 165, 0.3);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary)) !important;
  transform: translateY(-1px);
  box-shadow: 0 10px 15px -3px rgba(58, 110, 165, 0.4);
}

.btn-silver {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
  border: none;
  color: black;
}

/* Tables - VISIBILIDAD CORREGIDA */
.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text-main);
  color: var(--text-main) !important;
  border-color: rgba(255, 255, 255, 0.1);
  vertical-align: middle;
}

.table thead th {
  color: #ffffff !important; /* Blanco para máximo contraste */
  text-transform: uppercase;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.2) !important; /* Fondo oscuro sutil */
}

.table tbody td {
  color: var(--text-main) !important;
  background: transparent !important;
  border-bottom-color: rgba(255, 255, 255, 0.05);
  padding: 1rem;
}

.table-hover tbody tr:hover td {
  background-color: rgba(255, 255, 255, 0.05) !important;
  color: #fff !important;
}

/* Form Controls */
.form-control, .form-select {
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255,255,255,0.1);
  color: white !important;
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-control:focus {
  background-color: rgba(0, 0, 0, 0.3);
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(58, 110, 165, 0.25);
  color: white;
}

/* Navbar */
.navbar-custom {
  background: var(--dark-surface) !important;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  backdrop-filter: blur(10px);
}

/* Badge */
.badge {
  font-weight: 500;
  padding: 0.5em 0.75em;
  letter-spacing: 0.025em;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in {
  animation: fadeIn 0.3s ease forwards;
}

/* ===========================
   MEDIA QUERIES (Mobile First)
   =========================== */

@media (max-width: 991px) {
  .navbar-collapse {
    background: var(--dark-surface);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-top: 10px;
    border: 1px solid var(--glass-border);
  }
  .input-group {
    width: 100% !important;
    margin-bottom: 15px;
  }
}

@media (max-width: 768px) {
  .container {
    padding-left: 10px;
    padding-right: 10px;
  }
  .table-responsive {
    border: 0;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table {
    white-space: nowrap;
  }
  .glass-card {
    padding: 1rem !important;
  }
  h2 { font-size: 1.35rem; }
  h3 { font-size: 1.15rem; }
  
  video, canvas {
    width: 100% !important;
    height: auto !important;
  }
}

@media (max-width: 360px) {
  h2 { font-size: 1.2rem; }
  .btn { padding: 0.4rem 0.8rem; font-size: 0.85rem; }
  .glass-card { padding: 0.75rem !important; }
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); }
::-webkit-scrollbar-thumb { 
  background: rgba(255,255,255,0.15); 
  border-radius: 4px; 
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.3); }
