/* ===========================================================
   CABLESTAR PANEL – DISEÑO MODERNO & DINÁMICO
   =========================================================== */

:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --secondary: #3b82f6;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #ffc107;
  --info: #00bcd4;
  --light: #f0f7ff;
  --dark: #1e3a8a;
  --gradient: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%);
  --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --gradient-cyan: linear-gradient(135deg, #00bcd4 0%, #0097a7 100%);
  --gradient-gold: linear-gradient(135deg, #ffc107 0%, #ffb300 100%);
}

/* Reset y fuentes */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', 'Helvetica Neue', sans-serif;
  background: #f9f8f7;
  min-height: 100vh;
  color: #e1e1e9;
}

/* Títulos con gradiente */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: #0b132e;
  margin-bottom: 1rem;
}

h2 {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========== NAVBAR MEJORADA ========== */
.navbar {
  background: linear-gradient(90deg, #1e3a8a 0%, #2563eb 50%, #1e40af 100%) !important;
  box-shadow: 0 4px 15px rgba(30, 58, 138, 0.25);
  padding: 1rem 0;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff !important;
  background: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: #ffffff;
  background-clip: initial;
}

.logo-img {
  display: block;
  background: transparent;
  height: 40px;
  width: auto;
}

.nav-link {
  color: #ffffff !important;
  transition: all 0.3s ease;
  position: relative;
  margin: 0 0.5rem;
}

.nav-link:hover {
  color: #ffffff !important;
  transform: translateY(-2px);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.navbar-text {
  color: #b0b0b0 !important;
  font-size: 0.9rem;
}

/* ========== TARJETAS MODERNAS ========== */
.card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
  background: white;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.card:hover::before {
  transform: scaleX(1);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  font-weight: 700;
  color: #2563eb;
  margin-bottom: 0.75rem;
}

.card-text {
  color: #5a7a8a;
  line-height: 1.6;
}

/* ========== BOTONES MODERNOS ========== */
.btn {
  border: none;
  border-radius: 8px;
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: var(--gradient) !important;
  color: white !important;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

.btn-success {
  background: var(--gradient-success) !important;
  color: white !important;
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 168, 123, 0.4);
}

.btn-secondary, .btn-warning, .btn-danger {
  color: white !important;
  transition: all 0.3s ease;
}

.btn-secondary:hover, .btn-warning:hover, .btn-danger:hover {
  transform: translateY(-2px);
}

/* ========== TABLAS MEJORADAS ========== */
.table {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.table thead {
  background: linear-gradient(90deg, #1e3a8a 0%, #2563eb 100%);
  color: white;
}

.table thead th {
  border: none;
  font-weight: 700;
  padding: 1rem;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.table tbody tr {
  transition: all 0.3s ease;
  border-bottom: 1px solid #f0f0f0;
}

.table tbody tr:hover {
  background: #eeeeee;
  transform: scale(1.01);
  box-shadow: inset 0 4px 10px rgba(0,0,0,0.05);
}

.table td {
  vertical-align: middle;
  padding: 1rem;
  color: #333333;
}

.table td:first-child {
  font-weight: 600;
  color: #1a1a1a;
}

/* ========== FORMULARIOS MODERNOS ========== */
.form-control, .form-select {
  border: 2px solid #dddddd;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
  background: #fafafa;
}

.form-control:focus, .form-select:focus {
  border-color: #2563eb;
  background: white;
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
  transform: scale(1.02);
}

.form-label {
  font-weight: 600;
  color: #1e40af;
  margin-bottom: 0.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

/* ========== BADGES ========== */
.badge {
  border-radius: 20px;
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 0.85rem;
}

.badge-activa {
  background: var(--gradient-success);
  color: white;
}

.badge-inactiva {
  background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
  color: white;
}

.badge-admin {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: white;
}

/* ========== ALERTAS MEJORADAS ========== */
.alert {
  border: none;
  border-radius: 10px;
  border-left: 4px solid;
  animation: slideIn 0.4s ease;
}

.alert-info {
  background: linear-gradient(135deg, #e8e8e8 0%, #d5d5d5 100%);
  border-left-color: #999999;
  color: #1a1a1a;
}

.alert-success {
  background: linear-gradient(135deg, #d1e7dd 0%, #badbcc 100%);
  border-left-color: #198754;
  color: #0a3622;
}

.alert-warning {
  background: linear-gradient(135deg, #fff3cd 0%, #ffecb5 100%);
  border-left-color: #ffc107;
  color: #664d03;
}

.alert-danger {
  background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
  border-left-color: #dc3545;
  color: #842029;
}

/* ========== ANIMACIONES ========== */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.fade-in {
  animation: fadeIn 0.5s ease;
}

.pulse {
  animation: pulse 2s infinite;
}

/* ========== CONTENEDOR PRINCIPAL ========== */
.container {
  padding: 2rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e0e0e0;
}

.page-title {
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========== ACCIONES HOVER MEJORADAS ========== */
.action-btn {
  font-size: 0.85rem;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
}

/* ========== UTILIDADES ========== */
.mb-3 {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

/* ========== FOOTER ========== */
footer {
  background: #f9f8f7;
  border-top: 1px solid #e0e0e0;
  padding: 2rem 1rem;
  text-align: center;
  color: #1e40af;
  font-size: 0.9rem;
  margin-top: 3rem;
}

/* Responsive */
@media (max-width: 768px) {
  .navbar-nav {
    margin-top: 1rem;
  }
  
  .card {
    margin-bottom: 1rem;
  }
  
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .table {
    font-size: 0.9rem;
  }
  
  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  body {
    font-size: 0.95rem;
  }

  .container {
    padding: 1rem 0.75rem;
  }

  .navbar-brand {
    font-size: 1.2rem;
  }

  .navbar-brand .logo-img {
    height: 28px;
  }

  .navbar-nav .nav-link {
    padding: 0.5rem 0;
  }

  .page-header {
    align-items: center;
    text-align: center;
    gap: 0.75rem;
  }

  .page-header .page-title {
    font-size: 1.5rem;
    width: 100%;
  }

  .page-header p {
    font-size: 0.95rem;
  }

  .page-header svg {
    width: 20px;
    height: 20px;
  }

  .card-body {
    padding: 1.25rem;
  }

  .card .btn {
    width: 100%;
  }

  .mb-3 {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .table {
    display: block;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    font-size: 0.85rem;
  }

  footer {
    padding: 1.5rem 1rem;
    font-size: 0.85rem;
  }
}
