:root{
  --az-orange:#FF6A00;
  --az-green:#2ecc71;
  --az-bg:#f8fafc;
  --az-card:#ffffff;
  --az-text:#111827;
  --az-muted:#6b7280;
}
.text-primary-az{ color:var(--az-orange); }
body{ background:var(--az-bg); color:var(--az-text); }

/* ================= HEADER ================= */
.header-az{
  /* 7¼3 QUITAMOS height:80px y min-height:80px */
  padding: 0 1rem;
  display: flex; align-items: center;
  background:#0b0b0b;
  border-bottom:1px solid rgba(255,255,255,.06);
  position: sticky; top: 0; z-index: 1030;
}
.header-az::before{
  content:""; position:absolute; inset:0; pointer-events:none; opacity:.18;
  background:
    repeating-linear-gradient(90deg, rgba(255,106,0,.25) 0 2px, transparent 2px 14px),
    linear-gradient(90deg, rgba(255,106,0,.08), rgba(255,145,77,.08));
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,.75));
          mask-image: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,.75));
}

/* ==== LOGO BRAND (modern + responsive + hover premium) ==== */
.brand-logo{
  max-height: 85px !important;
  height: auto;
  width: auto;
  object-fit: contain;
  display: block;
  transition: all .28s cubic-bezier(.25,.8,.25,1);
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.12));
}
.navbar-brand:hover .brand-logo{
  transform: scale(1.035);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.20)) brightness(1.04);
}

/* Bot¨®n idioma */
.btn-lang-header{
  display:flex; align-items:center; gap:.5rem;
  background: transparent; color:#fff;
  border:1px solid rgba(255,255,255,.15);
  padding:.4rem .75rem; border-radius:999px;
}
.btn-lang-header:hover{ background: rgba(255,106,0,.1); color:#fff; border-color: rgba(255,255,255,.25); }
.btn-lang-header .flag{ width:22px; height:22px; border-radius:2px; display:block; }

/* ================= LAYOUT ================= */
.layout{
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  column-gap: 28px;
}

/* ================= SIDEBAR ================= */
.sidebar{
  width: 260px;
  position: sticky;
  top: 90px; /* corregimos para nuevo header height */
  min-height: calc(100vh - 90px);
  background: #e5e7eb !important;
  border-right: 1px solid #d6d9df !important;
  opacity: 1 !important;
}
.sidebar .sidebar-heading{
  font-size:.75rem; letter-spacing:.08em; color:#000; margin-bottom:.25rem;
}
.sidebar .nav-link{
  color:#000 !important;
  padding:.375rem 0; border-radius:.5rem;
}
.sidebar .nav-link i{ color:#000 !important; }
.sidebar .nav-link:hover{
  background:#fff0e6 !important; color:#000 !important;
}

/* ================= CONTENIDO ================= */
.content{
  display:flex; justify-content:center;
  padding: 0 24px 24px;
}
.content > .container-xxl{
  width:100%;
  max-width: 1180px;
  margin:0 auto;
  padding-left:16px; padding-right:16px;
}
.content > .container-xxl > :first-child{ margin-top: 6px; }

/* ================= CARDS / TABLE ================= */
.card{ background:var(--az-card); border:1px solid #eef2f7; border-radius:1rem; }
.table-hover tbody tr:hover{ background:#fff6ef; }

/* ================= RESPONSIVE ================= */
@media (max-width: 991.98px){
  .layout{ display:block; }
  .sidebar{
    position: fixed; top: 100px; left:-280px; transition:left .25s ease; z-index:1040;
    height: calc(100vh - 100px);
  }
  .sidebar.open{ left:0; }
  .content{ padding: 8px 16px 24px; }
}

/* Mobile header + logo */
@media (max-width: 576px){
  .header-az {
    min-height: 85px !important;
  }
  .navbar-brand {
    min-height: 85px !important;
  }
  .brand-logo {
    max-height: 85px !important;
  }
}

/* BOTONES WARNING */
.btn-warning {
  background-color: #ff6600;
  border: none;
  color: #fff;
}
.btn-warning:hover {
  background-color: #e65c00;
}

/* ==== LOGO SOBRESALIENDO IZQUIERDA 160px ==== */

.navbar {
  min-height: unset !important;
  height: auto !important;
  align-items: center !important;
}

.navbar-brand {
  position: relative !important;
  height: 80px !important;
  display: flex !important;
  align-items: center !important;
  overflow: visible !important;
  padding: 0 !important;
}

.brand-logo {
  position: absolute !important;
  left: 0;                  /* vuelve a la IZQUIERDA */
  top: 50%;
  transform: translateY(-50%) !important;
  height: 160px !important;
  max-height: 160px !important;
  width: auto;
  object-fit: contain;
  filter: none !important;
  transition: none !important;
}
.flag-icon {
  font-size: 20px;
  display: inline-block;
  line-height: 1;
}
.flag-svg svg {
  height: 15px;
  width: auto;
  display: block;
}
.btn-lang-header {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:.35rem;
  background: transparent;
  color:#fff;
  border:1px solid rgba(255,255,255,.15);
  padding: .35rem .70rem;
  border-radius: 999px;
}
.btn-lang-header:hover {
  background: rgba(255,255,255,.12);
}

/* ===== ASK AI POPUP (estilo modal centrado) ===== */

.askai-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
  z-index: 3000;
}

.askai-backdrop {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.45);   /* oscurecer fondo suave */
}

.askai-content {
  position: relative;
  width: 90%;
  max-width: 600px;               /* tamaño MEDIANO */
  background: #ffffff;
  border-radius: 14px;
  padding: 20px;
  z-index: 3001;
  box-shadow: 0 15px 35px rgba(0,0,0,.30);
  animation: popupFade .25s ease-out;
}

@keyframes popupFade {
  from { opacity: 0; transform: translateY(-10px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.askai-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.askai-close {
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: #555;
}

.askai-body textarea {
  width: 100%;
  height: 100px;
  resize: none;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
}

#askAIresult {
  white-space: pre-wrap;
  background: #f6f6f6;
  padding: 12px;
  margin-top: 12px;
  border-radius: 8px;
  max-height: 250px;
  overflow-y: auto;
}

/* ---- Ask AI Sidebar Button ---- */
.sidebar-footer {
  position: absolute;
  bottom: 20px;
  left: 0;
  width: 100%;
  text-align: center;
}

#askAIbtn {
  border-radius: 10px;
  font-weight: 600;
  transition: 0.2s ease-in-out;
}

#askAIbtn:hover {
  background-color: #e0a800;
  transform: scale(1.03);
}

