/* ================== PALETA HÍBRIDA ================== */
:root{
  --sidebar:       #1E293B;   /* sidebar oscuro */
  --primary:       #2563EB;   /* azul acento */
  --primary-dark:  #1D4ED8;   /* azul hover */
  --fondo:         #F8FAFC;   /* fondo general CLARO */
  --fondo-card:    #FFFFFF;   /* tarjetas blancas */
  --texto:         #1E293B;   /* texto principal oscuro */
  --texto-sec:     #64748B;   /* texto secundario gris */
  --borde:         #E2E8F0;   /* bordes claros */

  --verde:         #10B981;
  --amarillo:      #F59E0B;
  --rojo:          #EF4444;
  --gris:          #6B7280;
}

/* ============ Reset esquinas (recto) ============ */
.card, .btn, .form-control, .custom-select, .select2-selection,
.navbar, .brand-link, .main-sidebar, .content-header, .page-link,
.input-group .form-control, .input-group .btn { border-radius:0 !important; }

/* ================== NAVBAR ================== */
.navbar-dark{
  background: var(--sidebar) !important;
  border-bottom: 2px solid var(--primary);
}
.navbar .nav-link, .navbar .navbar-brand{ color: var(--sidebar) !important; font-weight:600; }
.navbar .nav-link:hover{ color: var(--primary) !important; }

ul.navbar-nav:nth-child(2) > li:nth-child(1) > a.nav-link {
  color: var(--sidebar) !important;
  font-weight: 600;
}

ul.navbar-nav:nth-child(2) > li:nth-child(1) > a.nav-link:hover {
  color: #b05353 !important;
  /* text-decoration: underline; /* opcional */
}



/* ================== BRAND ================== */
.brand-link{
  background: var(--sidebar) !important;
  border-bottom: 1px solid var(--borde);
  color: var(--primary) !important;
}
.brand-link .brand-text {
  color: #fff !important;      /* blanco como el login header */
  font-weight: 800;            /* un poquito más bold para dar jerarquía */
  letter-spacing: .5px;        /* opcional: abre un poco el texto */
  font-size: 1.2rem;           /* tamaño un poco más grande que el menú */
}

/* ================== SIDEBAR ================== */
.main-sidebar{ background: var(--sidebar) !important; }

.nav-sidebar .nav-link{
  color: #ffffff !important;
  padding:8px 12px;
  border-left:3px solid transparent;
}
.nav-sidebar .nav-link:hover{
  background: var(--primary-dark) !important;
  color:#fff !important;
  border-left-color: var(--primary);
}
.nav-sidebar .nav-link.active{
  background: var(--primary) !important;
  color:#fff !important;
  border-left-color: var(--primary);
}

/* Buscador sidebar */
.form-control-sidebar{
  background: #fff !important;
  color: var(--texto) !important;
  border:1px solid var(--borde) !important;
  height:36px !important;
}
.form-control-sidebar::placeholder{ color: var(--texto-sec) !important; }
.input-group[data-widget="sidebar-search"] .btn-sidebar{
  background: #fff !important;
  border:1px solid var(--borde) !important;
  border-left:0 !important;
  color: var(--texto) !important;
  height:36px !important;
}
.input-group[data-widget="sidebar-search"] .btn-sidebar:hover{
  background: var(--primary) !important;
  color:#fff !important;
}

/* ================== CONTENT ================== */
.content-wrapper{ background: var(--fondo); color: var(--texto); }
.content-header{
  background: var(--fondo-card);
  border-bottom: 1px solid var(--borde);
  color: var(--texto);
}

/* ================== CARDS ================== */
.card{
  border:1px solid var(--borde);
  background: var(--fondo-card);
  color: var(--texto);
}
.card .card-header{
  background: var(--fondo-card);
  border-bottom:1px solid var(--borde);
  color: var(--texto-sec);
  font-weight:600;
}

/* Dashboard metric cards */
.small-box{
  border:1px solid var(--borde);
  box-shadow:none;
}
.small-box.bg-info{ background: var(--primary) !important; color:#fff !important; }
.small-box.bg-success{ background: var(--verde) !important; color:#fff !important; }
.small-box.bg-warning{ background: var(--amarillo) !important; color:#fff !important; }
.small-box.bg-danger{ background: var(--rojo) !important; color:#fff !important; }
.small-box.bg-secondary{ background: var(--gris) !important; color:#fff !important; }

/* ================== INPUTS / SELECTS ================== */
.form-control, .custom-select, .select2-selection{
  border-color: var(--borde) !important;
  color: var(--texto);
  background: #fff;
}
.form-control::placeholder{ color: var(--texto-sec); }
.form-control:focus, .custom-select:focus, .select2-selection:focus{
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 .2rem rgba(37,99,235,.25) !important;
}

/* ================== BOTONES ================== */
.btn-primary, .btn-info{
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color:#fff !important;
  font-weight:600;
}
.btn-primary:hover, .btn-info:hover{
  background: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
}
.btn-success{
  background: var(--verde) !important; border-color: var(--verde) !important; color:#fff !important;
}
.btn-warning{
  background: var(--amarillo) !important; border-color: var(--amarillo) !important; color:#fff !important;
}
.btn-danger{
  background: var(--rojo) !important; border-color: var(--rojo) !important; color:#fff !important;
}

/* ================== DATATABLES ================== */
table.dataTable thead th{
  background: var(--fondo-card) !important;
  color: var(--texto-sec) !important;
  border-bottom: 1px solid var(--borde) !important;
}
.page-item.active .page-link{
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color:#fff !important;
  font-weight:700;
}
.page-link{ color: var(--texto-sec); background: var(--fondo-card); border:1px solid var(--borde); }

/* ================== FOOTER ================== */
.main-footer{
  background: var(--fondo-card);
  border-top: 1px solid var(--borde);
  color: var(--texto-sec);
}




/* ====== Fondo y tipografía generales del login ====== */
.login-page, .register-page { background: var(--fondo) !important; color: var(--texto); }
.login-logo a, .register-logo a { color: var(--sidebar) !important; font-weight: 800; }

/* ====== Caja de login ====== */
.login-box .card, .register-box .card {
  background: var(--fondo-card);
  border: 1px solid var(--borde);
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}
.login-box .card-header, .register-box .card-header {
  background: var(--fondo-card);
  border-bottom: 1px solid var(--borde);
  color: var(--texto-sec);
  font-weight: 700;
}

/* Resalta borde superior si usas card-outline card-primary en config */
.card-primary.card-outline { border-top-color: var(--primary) !important; }

/* ====== Inputs y addons ====== */
.login-card-body .input-group .form-control,
.register-card-body .input-group .form-control {
  background: #fff;
  border: 1px solid var(--borde);
  color: var(--texto);
}
.login-card-body .input-group .form-control::placeholder,
.register-card-body .input-group .form-control::placeholder { color: var(--texto-sec); }

.login-card-body .input-group .form-control:focus,
.register-card-body .input-group .form-control:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 .2rem rgba(37,99,235,.2) !important;
}

.login-card-body .input-group-append .input-group-text,
.register-card-body .input-group-append .input-group-text {
  background: #f4f7fb;
  color: var(--texto-sec);
  border: 1px solid var(--borde);
  border-left: 0;
}

/* ====== Botones ====== */
.btn-primary, .btn-info {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
  font-weight: 700;
}
.btn-primary:hover, .btn-info:hover {
  background: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
}

/* checkbox icheck */
.icheck-primary > input:first-child:checked + label::before,
.icheck-primary > input:first-child:not(:checked):hover + label::before {
  border-color: var(--primary) !important;
}
.icheck-primary > input:first-child:checked + label::before,
.icheck-primary > input:first-child + label:hover::before {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
}

/* enlaces secundarios (recuperar contraseña, registrar) */
.login-card-body a, .register-card-body a { color: var(--primary); }
.login-card-body a:hover, .register-card-body a:hover { color: var(--primary-dark); }

/* alertas en login */
.alert-info    { background:#eaf2ff; color:#1d3b8f; border:1px solid #cddcff; }
.alert-success { background:#e9fbf3; color:#0f6e45; border:1px solid #cbeede; }
.alert-danger  { background:#ffecec; color:#8a1f1f; border:1px solid #ffd1d1; }

/* opcional: header del auth como barra con acento */
.auth-page .card .card-header::after{
  content:"";
  display:block;
  height:3px;
  background: var(--primary);
  margin-top: 8px;
}
