/* =========================================================
   TRANSPARENCIA CODEGUA
   ESTILO GLOW + GLASS (VERSIÓN FINAL)
   - Fondo oscuro institucional
   - Glow azul y verde
   - Sidebar glass
   - Cards blancas flotantes
   - Compatible Bootstrap + DataTables
========================================================= */

/* =========================
   VARIABLES
========================= */
:root{
  --tf-azul: #0f3f88;
  --tf-verde: #0e9f6e;

  --bg-0: #020617;
  --bg-1: #071225;
  --bg-2: #0b1b34;

  --tf-texto: #111827;
  --tf-texto-suave: #6b7280;

  --radius-xl: 26px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 12px;
}

/* =========================
   RESET
========================= */
*{
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body{
  height: 100%;
}

/* =========================
   FONDO PRINCIPAL (IMPORTANTE)
========================= */
body,
body.tf-body{
  min-height: 100vh;
  font-family: 'Poppins', system-ui, sans-serif;
  color: rgba(255,255,255,.92);

  background:
    radial-gradient(circle at 50% 12%, rgba(14,159,110,.35), transparent 42%),
    radial-gradient(circle at 55% 20%, rgba(37,99,235,.30), transparent 46%),
    radial-gradient(circle at 92% 78%, rgba(14,159,110,.22), transparent 44%),
    radial-gradient(circle at 40% 82%, rgba(37,99,235,.18), transparent 52%),
    linear-gradient(145deg, var(--bg-0), var(--bg-1) 45%, var(--bg-0));

  background-attachment: fixed;
}

/* textura suave */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .12;
  background-image:
    radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 22px 22px;
  mix-blend-mode: overlay;
  z-index: 0;
}

/* sombreado suave */
body::after{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events:none;
  background: linear-gradient(180deg, rgba(0,0,0,.10), rgba(0,0,0,.35));
  z-index: 0;
}

/* evita que contenedores tapen el fondo */
.tf-main,
.container,
.container-fluid,
.tf-content{
  background: transparent !important;
}

/* =========================
   LAYOUT
========================= */
.tf-layout{
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* =========================
   SIDEBAR (GLASS)
========================= */
.tf-sidebar{
  color: #e5e7eb;
  padding: 1.4rem 1.2rem;

  background:
    linear-gradient(135deg, rgba(255,255,255,.10), rgba(255,255,255,.04));

  border-right: 1px solid rgba(255,255,255,.10);

  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  box-shadow: 18px 0 45px rgba(0,0,0,.25);
}

.tf-sidebar-header h1{
  font-size: 1.35rem;
  font-weight: 600;
}

.tf-subtitle{
  font-size: 0.75rem;
  letter-spacing: .12em;
  color: rgba(191,219,254,.85);
}

/* NAV */
.tf-nav ul{ list-style: none; }

.tf-nav a{
  display: flex;
  gap: .6rem;
  padding: .55rem;
  border-radius: .8rem;
  text-decoration: none;
  color: inherit;
  font-size: .85rem;
  transition: .15s;
}

.tf-nav a:hover{
  background: rgba(2,6,23,.55);
}

.tf-nav li.active a{
  background: linear-gradient(
    135deg,
    rgba(37,99,235,0.28),
    rgba(14,159,110,0.35)
  );
}

/* =========================
   MAIN
========================= */
.tf-main{
  padding: 1.6rem 1.8rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* =========================
   HERO / HEADER SUPERIOR
========================= */
.tf-hero{
  border-radius: var(--radius-xl);
  padding: 26px 30px;

  background:
    linear-gradient(135deg, rgba(255,255,255,.10), rgba(255,255,255,.04));

  border: 1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 50px rgba(0,0,0,.45);

  position: relative;
  overflow: hidden;
}

.tf-hero h2{
  font-size: clamp(22px, 2.4vw, 34px);
  font-weight: 700;
}

.tf-hero p{
  color: rgba(255,255,255,.70);
  font-size: .95rem;
}

/* =========================
   CARD (TABLA / FORM)
========================= */
.tf-card{
  background: rgba(255,255,255,.92);
  color: #0f172a;

  border-radius: var(--radius-xl);
  border: 1px solid rgba(255,255,255,.55);

  box-shadow: 0 20px 60px rgba(0,0,0,.35);

  padding: 1.3rem;
}

/* =========================
   INPUTS
========================= */
.tf-field input,
.tf-field select,
.tf-field textarea{
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(15,23,42,.15);
  padding: .6rem .75rem;
  font-size: .9rem;
}

.tf-field input:focus,
.tf-field select:focus,
.tf-field textarea:focus{
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37,99,235,.15);
}

/* =========================
   BOTONES
========================= */
.tf-btn-primary{
  border: none;
  border-radius: 999px;
  padding: .6rem 1.2rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;

  background:
    radial-gradient(circle at 0% 0%, rgba(14,159,110,.35), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(37,99,235,.45), transparent 55%),
    linear-gradient(145deg, #020617, #0b1b34 55%, #020617);

  box-shadow: 0 16px 40px rgba(15,23,42,.25);
}

.tf-btn-primary:hover{
  transform: translateY(-1px);
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 900px){
  .tf-layout{
    grid-template-columns: 80px 1fr;
  }
}

@media (max-width: 640px){
  .tf-layout{
    grid-template-columns: 1fr;
  }

  .tf-sidebar{
    display: none;
  }

  .tf-main{
    padding: 1.1rem;
  }
}
