:root {
  --primary: #0b2345;
  --border-radius: 18px;
  --text-muted: #8a92a2;
  --border-color: #e8eaef;
}

* {
  -webkit-tap-highlight-color: transparent;
}

html, body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'SF Pro Text',
    'Segoe UI', sans-serif;
  background-color: #f8f9fb;
  color: #2c3e50;
  font-size: 14px;
}

/* NAVBAR */
.navbar {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
  background: white;
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--primary) !important;
  font-size: 1.4rem;
  margin: 0 !important;
}

.vr {
  height: 1.5rem;
  margin: 0 0.75rem;
}

/* CARDS */
.card {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.card-section {
  background: white;
}

.card-metric {
  background: white;
  border-radius: 16px;
}

.card-metric .card-body {
  padding: 1rem 0.5rem;
}

.metric-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.metric-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: 0.5rem;
}

.card-header {
  background: transparent;
  border: none;
}

.card-header h6 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary);
}

.card-body {
  padding: 1rem;
}

/* TABLAS */
.table {
  margin-bottom: 0;
  color: #2c3e50;
}

.table thead th {
  border: none;
  padding: 0.5rem 0;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.75rem;
}

.table tbody td {
  border-top: 1px solid var(--border-color);
  padding: 0.7rem 0;
  vertical-align: middle;
}

/* INPUTS */
.form-control,
.form-select {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.9rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(11, 35, 69, 0.1);
}

.input-price {
  font-weight: 500;
}

/* BOTONES */
.btn {
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.4rem 0.8rem;
}

.btn-primary {
  background-color: var(--primary);
  border: none;
}

.btn-primary:hover {
  background-color: #072f52;
}

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline-primary:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  color: white;
}

.btn-outline-secondary {
  color: var(--text-muted);
  border-color: var(--border-color);
}

.btn-outline-secondary:hover {
  background-color: #f8f9fb;
  border-color: var(--text-muted);
  color: var(--text-muted);
}

/* TABS */
.nav-pills .nav-link {
  border-radius: 20px;
  background-color: #f2f4f8;
  color: #555;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.4rem 0.9rem;
  margin-bottom: 0.5rem;
  border: none;
  transition: all 0.2s ease;
}

.nav-pills .nav-link:hover {
  background-color: #e8eaef;
}

.nav-pills .nav-link.active {
  background-color: var(--primary);
  color: white;
}

/* SWITCHES */
.form-check-input {
  border-color: var(--border-color);
  cursor: pointer;
  width: 2.5em;
  height: 1.25em;
}

.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

/* TEXTOS */
.form-label {
  font-weight: 500;
  color: #2c3e50;
  margin-bottom: 0.4rem;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--primary);
}

.fw-500 { font-weight: 500; }
.fw-700 { font-weight: 700; }
.text-muted { color: var(--text-muted) !important; }
.xsmall { font-size: 0.75rem; }
.small { font-size: 0.85rem; }

/* ALERTAS */
.alert {
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
}

.alert-danger {
  background-color: #fee;
  color: #b33;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .container-fluid {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .metric-number {
    font-size: 1.5rem;
  }

  .card-metric .card-body {
    padding: 0.8rem 0.4rem;
  }

  .table {
    font-size: 0.85rem;
  }

  .btn {
    padding: 0.35rem 0.7rem;
    font-size: 0.85rem;
  }
}


/* Horarios compactos */
.horarios-row .horarios-slots {
  gap: 0.35rem;
}

.horarios-time {
  width: 70px;
  min-width: 70px;
  text-align: center;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

.horarios-sep {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.horarios-label-noche {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0 0.15rem 0 0.35rem;
}

@media (max-width: 768px) {
  .horarios-time {
    width: 64px;
    min-width: 64px;
    font-size: 0.8rem;
  }

  .horarios-row .horarios-slots {
    justify-content: flex-end;
  }
}
/* Forzar ancho fijo en inputs de horarios, por encima del width:100% de Bootstrap */
.horarios-time.form-control {
  width: 50px !important;
  min-width: 50px !important;
  max-width: 80px;
  display: inline-block;
}

/* En móviles, aún más compacto */
@media (max-width: 768px) {
  .horarios-time.form-control {
    width: 44px !important;
    min-width: 44px !important;
  }
}