/* ForoTV White Theme (PRO) */
:root{
  --ftv-red:#c8102e;
  --ftv-red2:#a60d25;
  --ftv-bg:#f6f7fb;
  --ftv-card:#ffffff;
  --ftv-text:#111827;
  --ftv-muted:#6b7280;
  --ftv-line:#e5e7eb;
  --ftv-shadow:0 10px 30px rgba(17,24,39,.08);
  --ftv-radius:18px;
}

body{
  background: var(--ftv-bg);
  color: var(--ftv-text);
  font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Helvetica Neue',Arial,sans-serif;
}

.ftv-topbar{
  position: sticky;
  top:0;
  z-index: 1030;
  background: linear-gradient(90deg, var(--ftv-red) 0%, var(--ftv-red2) 60%, #7a091a 100%);
  box-shadow: 0 18px 50px rgba(0,0,0,.18);
}
.ftv-topbar-inner{
  padding: 16px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.ftv-logo{
  width:42px;height:42px;border-radius:14px;
  background: rgba(255,255,255,.14);
  display:flex;align-items:center;justify-content:center;
  color:#fff;
  border: 1px solid rgba(255,255,255,.22);
}
.ftv-brand{color:#fff;font-weight:800;letter-spacing:.4px;line-height:1.15}
.ftv-subtitle{color:rgba(255,255,255,.85);font-size:.86rem}
.ftv-badge{
  background: rgba(0,0,0,.18);
  border:1px solid rgba(255,255,255,.22);
  color:#fff;
  padding:.3rem .7rem;
  border-radius: 999px;
  font-weight:800;
  font-size:.78rem;
}
.ftv-clock{
  color:rgba(255,255,255,.92);
  font-weight:700;
  font-size:.82rem;
  padding:.35rem .7rem;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,.22);
  background: rgba(0,0,0,.16);
}
.ftv-pill{border-color:rgba(255,255,255,.35)!important}

.ftv-page{padding:18px 18px 30px;}

.ftv-card{
  background: var(--ftv-card);
  border:1px solid var(--ftv-line);
  border-radius: var(--ftv-radius);
  box-shadow: var(--ftv-shadow);
}

.ftv-field{min-width: 180px}
.ftv-field.flex-grow-1{min-width: 280px}

.btn-ftv{
  background: var(--ftv-red);
  border-color: var(--ftv-red);
  color:#fff;
  font-weight:800;
  border-radius: 14px;
}
.btn-ftv:hover{background: var(--ftv-red2); border-color: var(--ftv-red2); color:#fff;}

.ftv-kpi{
  position: relative;
  background: var(--ftv-card);
  border:1px solid var(--ftv-line);
  border-radius: var(--ftv-radius);
  box-shadow: var(--ftv-shadow);
  padding: 16px 16px;
  overflow:hidden;
}
.ftv-kpi-label{color:var(--ftv-muted);font-weight:700;font-size:.85rem}
.ftv-kpi-value{font-weight:900;font-size:1.6rem;letter-spacing:.3px}
.ftv-kpi-ico{
  position:absolute;
  right:14px; top:14px;
  width:40px; height:40px;
  border-radius: 14px;
  display:flex;align-items:center;justify-content:center;
  background: rgba(200,16,46,.10);
  color: var(--ftv-red);
  border:1px solid rgba(200,16,46,.18);
}

.ftv-card-header{
  padding: 14px 16px;
  border-bottom: 1px solid var(--ftv-line);
  display:flex;align-items:center;justify-content:space-between;gap:10px;
}
.ftv-title{font-weight:900}
.ftv-muted{color:var(--ftv-muted);font-size:.9rem}
.ftv-page-pill{
  border:1px solid var(--ftv-line);
  border-radius:999px;
  padding:.25rem .6rem;
  background:#fff;
  font-weight:800;
  font-size:.85rem;
}

.ftv-table-wrap{max-height: calc(100vh - 380px);}
.ftv-table thead th{
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  border-bottom: 2px solid rgba(200,16,46,.25);
  font-size:.78rem;
  color:#111827;
  text-transform: uppercase;
  letter-spacing:.3px;
}
.ftv-table tbody td{font-size:.9rem}
.ftv-chip{
  display:inline-flex;
  align-items:center;
  gap:.4rem;
  padding:.35rem .7rem;
  border-radius:999px;
  border:1px solid rgba(200,16,46,.18);
  background: rgba(200,16,46,.08);
  color: var(--ftv-red);
  font-weight:900;
  font-size:.82rem;
  white-space:nowrap;
}
.ftv-chip .btn-link{
  color: var(--ftv-red);
  font-weight:900;
  text-decoration:none;
  padding:0;
}
.ftv-id{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  color: var(--ftv-muted);
  font-size:.78rem;
}

.modal-header{
  background: linear-gradient(90deg, rgba(200,16,46,.10), rgba(200,16,46,.03));
  border-bottom:1px solid var(--ftv-line);
}
.nav-pills .nav-link{border-radius: 999px; font-weight:800;}
.nav-pills .nav-link.active{background: var(--ftv-red);}

/* =========================================================
   COMPAT LAYER (para tus páginas actuales .grid/.card/.row)
   ========================================================= */
.wrap{max-width: 1250px; margin: 0 auto;}
.grid{display:grid;grid-template-columns:repeat(12,1fr);gap:14px}
.card{
  grid-column:span 12;
  background: var(--ftv-card);
  border:1px solid var(--ftv-line);
  border-radius: var(--ftv-radius);
  box-shadow: var(--ftv-shadow);
  padding:14px;
}
.split{display:grid;grid-template-columns:1fr 1fr;gap:14px}
@media (max-width: 900px){ .split{grid-template-columns:1fr} }

.row{display:flex;flex-wrap:wrap;gap:10px;align-items:end}
.field{display:flex;flex-direction:column;gap:6px;min-width: 200px}
label{color:var(--ftv-muted);font-size:12px;font-weight:800}
input,select{
  min-width:220px;
  background:#fff;
  border:1px solid #111827; /* contorno negro “premium” */
  color:var(--ftv-text);
  padding:10px 10px;
  border-radius:14px;
  outline:none;
  box-shadow: 0 8px 24px rgba(17,24,39,.06);
}
input:focus,select:focus{border-color: var(--ftv-red); box-shadow: 0 0 0 4px rgba(200,16,46,.15);}

button{
  background: var(--ftv-red);
  border:1px solid var(--ftv-red);
  color:#fff;
  padding:10px 12px;
  border-radius:14px;
  font-weight:900;
  cursor:pointer;
}
button:hover{background: var(--ftv-red2); border-color: var(--ftv-red2);}
.btn-secondary{
  background:#fff;
  color: var(--ftv-text);
  border:1px solid #111827;
}
.btn-secondary:hover{background:#f3f4f6}
.pill{
  display:inline-block;padding:4px 10px;border-radius:999px;
  border:1px solid var(--ftv-line);
  color:var(--ftv-muted);
  font-size:12px;
  background:#fff;
  font-weight:900;
}
.muted{color:var(--ftv-muted)}
.mono{font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;}

table{width:100%;border-collapse:collapse}
th,td{padding:10px;border-bottom:1px solid var(--ftv-line);vertical-align:top;font-size:13px}
th{color:var(--ftv-muted);text-align:left;font-weight:900}

/* FULLTEXT tables look nicer */
tbody tr:hover{background: rgba(200,16,46,.04);}

@media (max-width: 992px){
  .ftv-table-wrap{max-height: calc(100vh - 470px);}
}

/* =========================
   NAV HORIZONTAL (PRO)
   ========================= */

.ftv-topbar-inner{
  /* más compacto sin perder presencia */
  padding: 12px 18px !important;
}

.ftv-left{display:flex;align-items:center;gap:12px}
.ftv-brand-wrap{display:flex;flex-direction:column;gap:2px}

/* Barra de navegación roja: scroll horizontal elegante */
.ftv-nav{
  display:flex;
  gap:10px;
  align-items:center;
  padding: 10px 18px 12px;
  overflow-x:auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  border-top: 1px solid rgba(255,255,255,.12);
  justify-content:center;
}

/* Links tipo “pill” */
.ftv-nav-link{
  position: relative;
  display:inline-flex;
  align-items:center;
  gap:.45rem;

  color:#fff;
  text-decoration:none;
  font-weight:800;
  font-size:.88rem;

  padding: .48rem .78rem;
  border-radius: 999px;

  border: 1px solid rgba(255,255,255,.22);
  background: rgba(0,0,0,.12);

  transition: transform .12s ease, background .12s ease, border-color .12s ease, box-shadow .12s ease;
  white-space: nowrap;
}

/* Hover premium: marco redondeado, brillo sutil */
.ftv-nav-link:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.45);
  box-shadow: 0 10px 22px rgba(0,0,0,.18);
}

/* Activo: invertido (blanco) para lectura inmediata */
.ftv-nav-link.is-active{
  background: #fff;
  color: var(--ftv-red);
  border-color: rgba(255,255,255,.80);
  box-shadow: 0 12px 28px rgba(0,0,0,.22);
}

/* Tooltip “enterprise” */
.ftv-nav-link[data-tip]::after{
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;

  background: rgba(17,24,39,.96);
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 18px 40px rgba(0,0,0,.28);

  padding: 10px 12px;
  border-radius: 14px;

  font-size: .80rem;
  font-weight: 700;
  line-height: 1.25;
  width: max-content;
  max-width: 360px;
  white-space: normal;

  transition: opacity .14s ease, transform .14s ease;
  transform-origin: top;
}

.ftv-nav-link[data-tip]::before{
  content:"";
  position:absolute;
  left:50%;
  top: calc(100% + 4px);
  transform: translateX(-50%);
  opacity:0;
  width:0;height:0;
  border-left:7px solid transparent;
  border-right:7px solid transparent;
  border-bottom:7px solid rgba(17,24,39,.96);
  transition: opacity .14s ease;
}

.ftv-nav-link:hover::after,
.ftv-nav-link:hover::before{
  opacity:1;
}

/* =========================
   MEJOR USO DE ESPACIO (GLOBAL)
   ========================= */
.ftv-page{
  padding: 14px 16px 22px !important; /* antes muy “aireado” */
}

/* Cards un poco más compactas */
.ftv-card-header{ padding: 12px 14px !important; }
.ftv-card{ border-radius: 18px; }

/* Tablas: más área útil */
.ftv-table-wrap{ max-height: calc(100vh - 320px) !important; }

/* --- Dark buttons (Docs / Programar / KPI toggle) --- */
.btn-ftv-dark{
  background:#0b0f19;
  border:1px solid rgba(255,255,255,.14);
  color:#fff;
  font-weight:900;
  border-radius: 14px;
  padding: .55rem .9rem;
}
.btn-ftv-dark:hover{
  background:#111827;
  border-color: rgba(255,255,255,.22);
  color:#fff;
}

/* KPI toggle button */
.btn-ftv-kpi{
  background:#0b0f19;
  border:1px solid rgba(255,255,255,.16);
  color:#fff;
  font-weight:900;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1;
  display:inline-flex;
  align-items:center;
  gap:8px;
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
}
.btn-ftv-kpi:hover{
  background:#111827;
  border-color: rgba(255,255,255,.22);
  color:#fff;
}
.btn-ftv-kpi .mono{font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; opacity:.9}

/* --- Docs / Schedule modal content --- */
.ftv-doc{display:flex;flex-direction:column;gap:14px}
.ftv-doc-section{
  background: rgba(17,24,39,.02);
  border:1px solid var(--ftv-line);
  border-radius: 16px;
  padding: 12px 12px;
}
.ftv-doc-title{
  font-weight: 900;
  color: var(--ftv-text);
  font-size: 13px;
  margin-bottom: 6px;
}
.ftv-doc-text{color: var(--ftv-muted); font-size: 12px; line-height: 1.35}
.ftv-doc-report{padding: 10px 10px; border-radius: 14px; border:1px dashed rgba(17,24,39,.10); margin-top: 10px; background: #fff}
.ftv-doc-rh{font-weight: 900; font-size: 12px; color: var(--ftv-text); margin-bottom: 6px}
.ftv-doc-list{margin:0; padding-left: 18px; color: var(--ftv-text); font-size: 12px; line-height: 1.35}
.ftv-doc-list li{margin: 4px 0}
.ftv-form-grid{display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px}
.ftv-field{display:flex;flex-direction:column;gap:6px}
.ftv-field label{font-size: 11px; font-weight: 800; color: var(--ftv-muted); text-transform: uppercase; letter-spacing:.25px}
.ftv-field input,.ftv-field select{
  border:1px solid var(--ftv-line);
  border-radius: 12px;
  padding: 10px 10px;
  font-size: 13px;
  background: #fff;
  outline: none;
}
.ftv-field input:disabled,.ftv-field select:disabled{background: rgba(17,24,39,.03); color: rgba(17,24,39,.55)}
.ftv-field-full{grid-column: 1 / -1}
.ftv-checkrow{display:flex; flex-wrap:wrap; gap:10px}
.ftv-check{display:inline-flex; align-items:center; gap:8px; font-size: 12px; color: var(--ftv-text)}
.ftv-check input{transform: translateY(1px)}
@media (max-width: 900px){
  .ftv-form-grid{grid-template-columns: 1fr}
}
