/* style.css depurado: variables, layout, utilidades y componentes principales */
:root {
  --primary-color: #2563eb;
  --secondary-color: #64748b;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --info-color: #3b82f6;
  --dark-color: #1e293b;
  --light-color: #f8fafc;
  --border-color: #e2e8f0;
  --sidebar-width: 260px;
  --header-height: 60px;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  background: #f5f5f5;
}
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.login-container {
  max-width: 420px;
  padding: 20px;
  width: 100%;
}
.login-box {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  padding: 40px;
}
.login-header {
  text-align: center;
  margin-bottom: 30px;
}
.login-header i {
  font-size: 48px;
  color: var(--primary-color);
  margin-bottom: 10px;
}
.login-header h2 {
  color: var(--dark-color);
  font-size: 24px;
  font-weight: 600;
}
.login-form .form-group {
  margin-bottom: 20px;
}
.login-form label {
  display: block;
  margin-bottom: 8px;
  color: #555;
  font-weight: 500;
}
.login-form input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-size: 14px;
  transition: border-color 0.3s;
}
.login-form input:focus {
  outline: none;
  border-color: var(--primary-color);
}
.login-footer {
  text-align: center;
  margin-top: 20px;
}
.login-footer .text-muted {
  color: #999;
  font-size: 12px;
}
.wrapper {
  display: flex;
  min-height: 100vh;
  transition: all 0.3s;
}
.sidebar-toggle {
  position: relative;
  top: 0;
  left: 0;
  z-index: 1;
  background: var(--primary-color);
  color: #fff;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.3s;
  margin-right: 18px;
}
.sidebar-toggle:hover {
  background: #1d4ed8;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.sidebar {
  width: var(--sidebar-width);
  background: var(--dark-color);
  color: #fff;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  transition: transform 0.3s;
  z-index: 1000;
}
.wrapper.sidebar-collapsed .sidebar {
  transform: translateX(-100%);
}
.wrapper.sidebar-collapsed .main-content {
  margin-left: 0;
}
.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.sidebar-header h3 {
  font-size: 18px;
  font-weight: 600;
}
.sidebar-menu {
  list-style: none;
  padding: 10px 0;
}
.sidebar-menu li {
  margin: 2px 0;
}
.sidebar-menu a {
  display: block;
  padding: 12px 20px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s;
}
.sidebar-menu a:hover,
.sidebar-menu a.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-left: 3px solid var(--primary-color);
}
.sidebar-menu i {
  margin-right: 10px;
  width: 20px;
}
.menu-item-has-children > a {
  position: relative;
}
.menu-item-has-children .toggle-icon {
  position: absolute;
  right: 20px;
  transition: transform 0.3s;
}
.menu-item-has-children.active .toggle-icon {
  transform: rotate(180deg);
}
.submenu {
  list-style: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s;
  background: rgba(0, 0, 0, 0.2);
}
.menu-item-has-children.active .submenu {
  max-height: 500px;
}
.submenu li {
  margin: 0;
}
.submenu a {
  padding: 10px 20px 10px 50px;
  font-size: 13px;
}
.submenu a:hover {
  background: rgba(255, 255, 255, 0.15);
  border-left: 3px solid var(--info-color);
}
.menu-toggle {
  cursor: pointer;
}
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.3s;
}
.top-header {
  height: var(--header-height);
  background: #fff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px 0 70px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 15px;
}
.sucursal-badge {
  background: #e0f2fe;
  color: #0369a1;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}
.sucursal-badge i {
  margin-right: 5px;
}
.user-info {
  color: #555;
}
.content-area {
  flex: 1 0 auto;
  padding: 30px;
  display: block;
}
.main-footer {
  background: #fff;
  border-top: 1px solid var(--border-color);
  padding: 15px 30px;
  text-align: center;
  color: #999;
  font-size: 12px;
}
.btn {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
  text-align: center;
}
.btn i {
  margin-right: 5px;
}
.btn-primary {
  background: var(--primary-color);
  color: #fff;
}
.btn-primary:hover {
  background: #1d4ed8;
}
.btn-secondary {
  background: var(--secondary-color);
  color: #fff;
}
.btn-success {
  background: var(--success-color);
  color: #fff;
}
.btn-danger {
  background: var(--danger-color);
  color: #fff;
}
.btn-warning {
  background: var(--warning-color);
  color: #fff;
}
.btn-info {
  background: var(--info-color);
  color: #fff;
}
.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}
.btn-block {
  display: block;
  width: 100%;
}
.btn-logout {
  background: var(--danger-color);
  color: #fff;
  padding: 8px 16px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 13px;
}
.btn-group {
  display: flex;
  gap: 5px;
}
.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}
.card-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}
.card-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--dark-color);
}
.card-body {
  padding: 20px;
}
.alert {
  padding: 15px 20px;
  border-radius: 5px;
  margin-bottom: 20px;
}
.alert i {
  margin-right: 10px;
}
.alert-success {
  background: #d1fae5;
  color: #065f46;
  border-left: 4px solid var(--success-color);
}
.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border-left: 4px solid var(--danger-color);
}
.alert-warning {
  background: #fef3c7;
  color: #92400e;
  border-left: 4px solid var(--warning-color);
}
.alert-info {
  background: #dbeafe;
  color: #1e40af;
  border-left: 4px solid var(--info-color);
}
.table {
  width: 100%;
  border-collapse: collapse;
}
.table thead {
  background: #f8fafc;
}
.table th,
.table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}
.table th {
  font-weight: 600;
  color: #555;
  font-size: 13px;
  text-transform: uppercase;
}
.table tbody tr:hover {
  background: #f9fafb;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #555;
  font-weight: 500;
}
.form-control {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-size: 14px;
  transition: border-color 0.3s;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
}
.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}
.form-row .form-group {
  margin-bottom: 0;
}
.col-md-6 {
  flex: 1;
}
.form-actions {
  margin-top: 30px;
  display: flex;
  gap: 10px;
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}
.page-header h1 {
  font-size: 28px;
  color: var(--dark-color);
  font-weight: 600;
}
.page-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}
.stat-card {
  background: #fff;
  border-radius: 8px;
  padding: 25px;
  display: flex;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.stat-icon {
  font-size: 40px;
  margin-right: 20px;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}
.stat-primary .stat-icon {
  background: #dbeafe;
  color: var(--primary-color);
}
.stat-success .stat-icon {
  background: #d1fae5;
  color: var(--success-color);
}
.stat-warning .stat-icon {
  background: #fef3c7;
  color: var(--warning-color);
}
.stat-info .stat-icon {
  background: #dbeafe;
  color: var(--info-color);
}
.stat-content h3 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 5px;
}
.stat-content p {
  color: #999;
  font-size: 14px;
}
.dashboard-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}
.pending-list {
  list-style: none;
}
.pending-list li {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
}
.pending-list li:last-child {
  border-bottom: none;
}
.pending-list a {
  text-decoration: none;
  color: #333;
  display: block;
}
.pending-list a:hover {
  color: var(--primary-color);
}
.info-item {
  padding: 10px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.info-item i {
  color: var(--primary-color);
}
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}
.badge-primary {
  background: #dbeafe;
  color: var(--primary-color);
}
.badge-success {
  background: #d1fae5;
  color: var(--success-color);
}
.badge-warning {
  background: #fef3c7;
  color: var(--warning-color);
}
.badge-danger {
  background: #fee2e2;
  color: var(--danger-color);
}
.badge-info {
  background: #dbeafe;
  color: var(--info-color);
}
.badge-secondary {
  background: #e2e8f0;
  color: var(--secondary-color);
}
.filters-bar {
  margin-bottom: 20px;
  display: flex;
  gap: 10px;
}
.search-box {
  max-width: 300px;
}
.text-center {
  text-align: center;
}
.text-muted {
  color: #999;
}
.text-danger {
  color: var(--danger-color);
}
.text-success {
  color: var(--success-color);
}
.mt-3 {
  margin-top: 20px;
}
.mb-3 {
  margin-bottom: 20px;
}
.badge-danger {
  background-color: var(--danger-color);
  color: #fff;
}
.badge-secondary {
  background-color: var(--secondary-color);
  color: #fff;
}
/* Intensificar colores de estado para que se vean mejor en la lista de órdenes */
.badge-info {
  background-color: var(--info-color);
  color: #fff;
}
.badge-success {
  background-color: var(--success-color);
  color: #fff;
}
.badge-warning {
  background-color: var(--warning-color);
  color: #92400e;
}
.badge-primary {
  background-color: var(--primary-color);
  color: #fff;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: normal;
}
.checkbox-label input[type="checkbox"] {
  width: auto;
  cursor: pointer;
}
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  padding: 15px;
  background: var(--light-color);
  border-radius: 5px;
}
.info-grid > div {
  padding: 10px;
}
.required {
  color: var(--danger-color);
}
small {
  color: var(--secondary-color);
  font-size: 12px;
  display: block;
  margin-top: 4px;
}
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .wrapper:not(.sidebar-collapsed) .sidebar {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
  .top-header {
    padding: 0 15px 0 60px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-row {
    grid-template-columns: 1fr;
  }
  .form-row {
    flex-direction: column;
  }
  .wrapper:not(.sidebar-collapsed)::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }
}
.servicio-item {
  border-bottom: 1px solid #e2e8f0;
  padding: 0;
  background: #fff;
}
.servicio-item hr {
  margin: 8px 0;
  border: none;
  border-top: 1px solid #e2e8f0;
}

.content-area {
  flex: 1;
  padding: 30px;
}

.main-footer {
  background: white;
  border-top: 1px solid var(--border-color);
  padding: 15px 30px;
  text-align: center;
  color: #999;
  font-size: 12px;
}

/* Botones */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
  text-align: center;
}

.btn i {
  margin-right: 5px;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-secondary {
  background: var(--secondary-color);
  color: white;
}

.btn-success {
  background: var(--success-color);
  color: white;
}

.btn-danger {
  background: var(--danger-color);
  color: white;
}

.btn-warning {
  background: var(--warning-color);
  color: white;
}

.btn-info {
  background: var(--info-color);
  color: white;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-block {
  display: block;
  width: 100%;
}

.btn-logout {
  background: var(--danger-color);
  color: white;
  padding: 8px 16px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 13px;
}

.btn-group {
  display: flex;
  gap: 5px;
}

/* Cards */
.card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.card-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--dark-color);
}

.modal {
  display: none;
  position: fixed;
  z-index: 1050;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal[aria-hidden="false"],
.modal.show {
  display: flex;
}
.modal-dialog {
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  pointer-events: auto;
}
.modal-dialog * {
  pointer-events: auto;
}
.modal-content {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}
.modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--dark-color);
}
.modal-body {
  padding: 18px 20px;
}
.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: transparent;
}
.modal .close {
  background: transparent;
  border: none;
  font-size: 20px;
  line-height: 1;
  color: #666;
  cursor: pointer;
}
.modal .close:hover {
  color: #000;
}
.modal .form-control,
.modal textarea.form-control {
  width: 100%;
}
.modal textarea.form-control {
  min-height: 120px;
  resize: vertical;
  padding: 12px;
}
.card-body {
  padding: 20px;
  .custom-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1040;
  }
}

.modal-footer .btn {
  min-width: 110px;
}
/* Posicionar botón Exportar CSV a la derecha de la cabecera de filtros */
.card-header .csv-export {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}
/* Alertas */
.alert {
  padding: 15px 20px;
  border-radius: 5px;
  margin-bottom: 20px;
}

.alert i {
  margin-right: 10px;
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
  border-left: 4px solid var(--success-color);
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border-left: 4px solid var(--danger-color);
}

.alert-warning {
  background: #fef3c7;
  color: #92400e;
  border-left: 4px solid var(--warning-color);
}

.alert-info {
  background: #dbeafe;
  color: #1e40af;
  border-left: 4px solid var(--info-color);
}

/* Tablas */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table thead {
  background: #f8fafc;
}

.table th,
.table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.table th {
  font-weight: 600;
  color: #555;
  font-size: 13px;
  text-transform: uppercase;
}

.table tbody tr:hover {
  background: #f9fafb;
}

/* Formularios */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #555;
  font-weight: 500;
}

/* Control de meses: evitar overflow horizontal y permitir salto de línea */
.mes-controls {
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  justify-content: space-between;
  /* Forzar una sola línea: los botones se encogen para ajustarse */
  flex-wrap: nowrap;
}
.mes-controls .btn {
  /* Cada botón ocupa espacio proporcional y queda en una sola línea */
  flex: 1 1 0;
  min-width: 0; /* permitir encoger */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Si se prefiere que algunos botones mantengan su tamaño, añadir clase .btn-fixed */
.mes-controls .btn-fixed {
  flex: 0 0 auto;
}

/* Estilo para el mes que corresponde al mes actual pero no está seleccionado: borde/texto en verde (no fondo) */
.mes-controls .mes-hoy {
  background: transparent !important;
  border: 1px solid var(--success-color) !important;
  color: var(--success-color) !important;
}

/* Forzar que cualquier combinación con .btn-* no produzca fondo verde en mes-hoy */
.mes-controls a.mes-hoy,
.mes-controls a.mes-hoy.btn,
.mes-controls a.mes-hoy.btn-outline-primary,
.mes-controls a.mes-hoy.btn-primary {
  background-color: transparent !important;
  background: transparent !important;
  color: var(--success-color) !important;
  border-color: var(--success-color) !important;
  box-shadow: none !important;
}

/* Estilo para el mes seleccionado (usar clase custom para evitar conflictos) */
.mes-controls .selected-mes {
  background: var(--success-color) !important;
  color: #fff !important;
  border: none !important;
}

/* Mes Actual: color naranja distintivo */
.mes-controls .btn-mes-actual {
  background: var(--warning-color) !important;
  color: #fff !important;
  border: none !important;
}
/* Si por alguna razón tiene clases de selección, mantener naranja */
.mes-controls .btn-mes-actual.selected-mes,
.mes-controls .btn-mes-actual.mes-hoy {
  background: var(--warning-color) !important;
  color: #fff !important;
}
.form-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  /* evitar que los controles rompan la línea en pantallas de escritorio */
  flex-wrap: nowrap;
}

/* Permitir que el campo de búsqueda reducido no bloquee el layout (sobrescribe inline min-width) */
.form-inline #q {
  min-width: 0 !important;
  width: 100%;
}

/* Si el formulario está forzado a usar flex:1 inline, asegurar que pueda encogerse */
.form-inline .form-group[style*="flex:1"] {
  min-width: 0;
  flex: 1 1 auto;
}

@media (max-width: 900px) {
  .mes-controls {
    max-width: 100%;
  }
  .form-inline {
    flex-wrap: wrap;
  }
  .form-inline .form-group {
    flex-basis: 100%;
  }
}

/* Controles de selección de mes (fila) */
.mes-controls {
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow-x: auto;
  gap: 6px;
  max-width: 65%;
}
.mes-controls a.btn,
.mes-controls button.btn {
  margin: 0 4px;
}

/* INVERSIÓN DE COLORES: botones dentro de la fila de meses */
.mes-controls .btn {
  background: #ffffff; /* fondo claro */
  color: var(--secondary-color); /* texto oscuro */
  border: 1px solid var(--border-color);
  box-shadow: none;
}
.mes-controls .btn:hover {
  background: #f3f4f6;
}

/* Botones con información o navegacionales (Prev/Next) en verde */
.mes-controls .btn-outline-primary {
  background: #ffffff;
  color: var(--success-color);
  border: 1px solid var(--success-color);
}
.mes-controls .btn-outline-primary:hover {
  background: #ecfdf5;
}

/* Botón activo (seleccionado) se muestra con fondo verde */
.mes-controls .btn-primary {
  background: var(--success-color);
  color: #fff;
  border: 1px solid var(--success-color);
}

/* Botón Mes Actual: texto naranja sobre fondo claro con borde naranja */
.btn-mes-actual {
  background: #ffffff;
  color: #ff8c00;
  border: 1px solid #ff8c00;
}
.btn-mes-actual:hover {
  background: #fff4e6;
}

/* Indicador visual para el mes correspondiente a la fecha actual dentro de la fila */
.mes-controls .mes-hoy {
  background: var(--success-color) !important;
  color: #fff !important;
  border: 1px solid var(--success-color) !important;
}
/* Si el mes actual coincide con el mes seleccionado, combinar estilos (verde con halo naranja) */
.mes-controls .btn-primary.mes-hoy {
  box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.12) inset;
  color: #fff !important;
}

/* small scrollbar styling for better UX */
.mes-controls::-webkit-scrollbar {
  height: 6px;
}
.mes-controls::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
}

.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.form-row .form-group {
  margin-bottom: 0;
}

.col-md-6 {
  flex: 1;
}

.form-actions {
  margin-top: 30px;
  display: flex;
  gap: 10px;
}

/* Page Header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.page-header h1 {
  font-size: 28px;
  color: var(--dark-color);
  font-weight: 600;
}

/* Dashboard */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  border-radius: 8px;
  padding: 25px;
  display: flex;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-icon {
  font-size: 40px;
  margin-right: 20px;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}

.stat-primary .stat-icon {
  background: #dbeafe;
  color: var(--primary-color);
}

.stat-success .stat-icon {
  background: #d1fae5;
  color: var(--success-color);
}

.stat-warning .stat-icon {
  background: #fef3c7;
  color: var(--warning-color);
}

.stat-info .stat-icon {
  background: #dbeafe;
  color: var(--info-color);
}

.stat-content h3 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 5px;
}

.stat-content p {
  color: #999;
  font-size: 14px;
}

.dashboard-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.pending-list {
  list-style: none;
}

.pending-list li {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
}

.pending-list li:last-child {
  border-bottom: none;
}

.pending-list a {
  text-decoration: none;
  color: #333;
  display: block;
}

.pending-list a:hover {
  color: var(--primary-color);
}

.info-item {
  padding: 10px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-item i {
  color: var(--primary-color);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.badge-primary {
  background: var(--primary-color);
  color: #fff;
}

.badge-success {
  background: var(--success-color);
  color: #fff;
}

.badge-warning {
  background: var(--warning-color);
  color: #92400e;
}

.badge-danger {
  background: var(--danger-color);
  color: #fff;
}

.badge-info {
  background: var(--info-color);
  color: #fff;
}

.badge-secondary {
  background: var(--secondary-color);
  color: #fff;
}

/* Filtros */
.filters-bar {
  margin-bottom: 20px;
  display: flex;
  gap: 10px;
}

.search-box {
  max-width: 300px;
}

/* Utilidades */
.text-center {
  text-align: center;
}

.text-muted {
  color: #999;
}

.text-danger {
  color: var(--danger-color);
}

.text-success {
  color: var(--success-color);
}

.mt-3 {
  margin-top: 20px;
}

.mb-3 {
  margin-bottom: 20px;
}

/* Checkbox label */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  cursor: pointer;
}

/* Info grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  padding: 15px;
  background: var(--light-color);
  border-radius: 5px;
}

.info-grid > div {
  padding: 10px;
}

/* Required asterisk */
.required {
  color: var(--danger-color);
}

/* Small text helper */
small {
  color: var(--secondary-color);
  font-size: 12px;
  display: block;
  margin-top: 4px;
}

/* Responsive */
@media (max-width: 768px) {
  /* En móviles, sidebar colapsado por defecto */
  .sidebar {
    transform: translateX(-100%);
  }

  .wrapper:not(.sidebar-collapsed) .sidebar {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .top-header {
    padding: 0 15px 0 60px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-row {
    grid-template-columns: 1fr;
  }

  .form-row {
    flex-direction: column;
  }

  /* Overlay cuando el sidebar está abierto en móvil */
  .wrapper:not(.sidebar-collapsed)::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }
}

/* Estilos específicos para servicios (migrados desde crear.php) */
.servicio-item {
  border-bottom: 1px solid #e2e8f0;
  padding: 0;
  background: #fff;
}
.servicio-item hr {
  margin: 8px 0;
  border: none;
  border-top: 1px solid #e2e8f0;
}
