/* ============================================================
   Quantic Vacaciones · Componentes compartidos
   ============================================================ */

/* ---------- Nav flotante (Fluid Island) ---------- */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  padding: var(--s-4) clamp(16px, 3vw, 40px) 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.nav {
  pointer-events: auto;
  width: 100%;
  max-width: var(--maxw);
  display: flex;
  align-items: center;
  gap: var(--s-4);
  height: var(--nav-h);
  padding: 8px 8px 8px 18px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid var(--line-white);
  box-shadow: var(--shadow-md), var(--inset-hi);
}
.nav__brand { display: flex; align-items: center; gap: 11px; color: var(--ink); flex-shrink: 0; }
.nav__brand img { height: 30px; width: auto; }
.nav__brand b { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; letter-spacing: -0.02em; }
.nav__brand span { color: var(--brand-600); }
.nav__links { display: flex; gap: 2px; margin-inline: auto; }
.nav__link {
  position: relative;
  padding: 9px 16px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
  transition: color var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}
.nav__link:hover { color: var(--ink); background: rgba(10, 23, 38, 0.04); }
.nav__link.is-active { color: var(--brand-700); background: var(--brand-50); }
.nav__user { display: flex; align-items: center; gap: var(--s-2); flex-shrink: 0; }
.session-chip {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 6px 5px 14px;
  border-radius: var(--r-pill);
  background: rgba(10, 23, 38, 0.04);
}
.session-chip__name { font-weight: 700; font-size: 0.85rem; color: var(--ink-2); }
.nav__burger { display: none; }

@media (max-width: 880px) {
  .nav__links {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--s-5);
    margin: 0;
    background: rgba(233, 239, 247, 0.82);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    z-index: var(--z-overlay);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur-2) var(--ease);
  }
  .nav__links.is-open { opacity: 1; pointer-events: auto; }
  .nav__links .nav__link {
    font-size: 1.6rem; padding: 12px 28px;
    opacity: 0; transform: translateY(14px);
    transition: opacity var(--dur-3) var(--ease), transform var(--dur-3) var(--ease);
  }
  .nav__links.is-open .nav__link { opacity: 1; transform: none; }
  .nav__links.is-open .nav__link:nth-child(1) { transition-delay: 0.06s; }
  .nav__links.is-open .nav__link:nth-child(2) { transition-delay: 0.12s; }
  .nav__links.is-open .nav__link:nth-child(3) { transition-delay: 0.18s; }
  .nav__burger {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: var(--r-pill);
    background: rgba(10, 23, 38, 0.05);
    z-index: calc(var(--z-overlay) + 1);
    position: relative;
  }
  .nav__burger span {
    position: absolute; width: 18px; height: 2px; border-radius: 2px;
    background: var(--ink);
    transition: transform var(--dur-2) var(--ease), opacity var(--dur-1) var(--ease);
  }
  .nav__burger span:nth-child(1) { transform: translateY(-5px); }
  .nav__burger span:nth-child(3) { transform: translateY(5px); }
  .nav__burger.is-open span:nth-child(1) { transform: rotate(45deg); }
  .nav__burger.is-open span:nth-child(2) { opacity: 0; }
  .nav__burger.is-open span:nth-child(3) { transform: rotate(-45deg); }
}

/* ---------- Botones ---------- */
.btn {
  --bg: var(--surface);
  --fg: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px;
  padding: 8px 18px;
  border-radius: var(--r-pill);
  font-family: var(--font-sans);
  font-weight: 700; font-size: 0.92rem;
  letter-spacing: -0.01em;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-xs);
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease),
    background var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
  white-space: nowrap;
}
.btn:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; pointer-events: none; }

.btn--primary {
  --fg: #fff;
  color: #fff;
  background: var(--brand-grad);
  border-color: transparent;
  box-shadow: var(--shadow-brand);
  padding-right: 8px;
}
.btn--primary:hover { box-shadow: 0 22px 50px -16px rgba(11, 132, 255, 0.6); }
.btn--ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-2); }
.btn--ghost:hover { background: rgba(10, 23, 38, 0.05); box-shadow: none; }
.btn--soft { background: var(--brand-50); color: var(--brand-700); border-color: transparent; }
.btn--danger { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-line); }
.btn--danger:hover { background: #f8dada; }
.btn--success { background: var(--success-bg); color: var(--success); border-color: var(--success-line); }
.btn--sm { min-height: 34px; padding: 6px 13px; font-size: 0.84rem; }
.btn--lg { min-height: 52px; padding: 12px 24px; font-size: 1rem; }
.btn--block { width: 100%; }

/* Botón-dentro-de-botón (icono en círculo) */
.btn__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.22);
  transition: transform var(--dur-2) var(--ease-spring), background var(--dur-2) var(--ease);
}
.btn--soft .btn__icon, .btn--ghost .btn__icon { background: rgba(11, 132, 255, 0.12); }
.btn:hover .btn__icon { transform: translate(2px, -1px) scale(1.06); }
.btn__icon svg { width: 15px; height: 15px; }
.btn--lg .btn__icon { width: 30px; height: 30px; }
.btn--lg .btn__icon svg { width: 16px; height: 16px; }
/* Iconos sueltos (sin círculo) dentro de botones: tamaño consistente */
.btn > svg { width: 17px; height: 17px; flex-shrink: 0; }
.btn--sm > svg { width: 15px; height: 15px; }

/* ---------- Eyebrow / badges / pills ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: 0.66rem; font-weight: 800;
  letter-spacing: 0.18em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand-500); }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: var(--r-pill);
  font-size: 0.74rem; font-weight: 800; letter-spacing: 0.01em;
  background: rgba(10, 23, 38, 0.06); color: var(--ink-2);
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.9; }
.badge--aprobado  { background: var(--success-bg); color: var(--success); }
.badge--pendiente { background: var(--warn-bg);    color: var(--warn); }
.badge--rechazado { background: rgba(148,163,184,.18); color: #64748B; }
.badge--plain::before { display: none; }
.badge--brand { background: var(--brand-50); color: var(--brand-700); }

/* ---------- Dot / avatar / chip ---------- */
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--muted)); flex-shrink: 0; display: inline-block; }
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: var(--r-pill);
  font-weight: 800; font-size: 0.85rem; line-height: 1; color: #fff;
  background: var(--c, var(--brand-500));
  box-shadow: var(--inset-hi);
  flex-shrink: 0;
  text-transform: uppercase;
}
.avatar--sm { width: 30px; height: 30px; font-size: 0.74rem; }
.avatar--lg { width: 52px; height: 52px; font-size: 1.05rem; }

.chip {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 14px 8px 11px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
  font-weight: 700; font-size: 0.86rem; color: var(--ink-2);
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
}
button.chip:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); border-color: var(--brand-200); }
.chip.is-active { border-color: var(--brand-400); background: var(--brand-50); color: var(--brand-700); }

/* ---------- Cards / paneles (Doppelrand) ---------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md), var(--inset-hi);
  padding: var(--s-6);
}
.panel--flush { padding: 0; overflow: hidden; }
.panel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-5); }
.panel__title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; }
.panel__sub { color: var(--muted); font-size: 0.85rem; margin-top: 2px; }

/* Bisel doble para piezas "hero" (login, modal) */
.bezel {
  background: var(--shell);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  padding: var(--bezel);
  box-shadow: var(--shadow-lg);
}
.bezel__inner {
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--inset-hi);
  border: 1px solid var(--line);
}

/* ---------- Formularios ---------- */
.field { display: grid; gap: 7px; }
.field > label, .label { font-size: 0.8rem; font-weight: 700; color: var(--ink-2); letter-spacing: -0.005em; }
.input, .select, .textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 2px rgba(10, 23, 38, 0.04);
  color: var(--ink);
  transition: border-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; background: var(--surface);
  border-color: var(--brand-400); box-shadow: var(--ring-focus);
}
.textarea { resize: vertical; min-height: 84px; }
.field__hint { font-size: 0.78rem; color: var(--muted); }
.input-group { display: flex; gap: var(--s-2); }

/* ---------- Tabla ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--r-md); }
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th {
  text-align: left; padding: 12px 14px;
  font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
}
.table td { padding: 13px 14px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.table tbody tr { transition: background var(--dur-1) var(--ease); }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: none; }
.cell-user { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); }

/* ---------- Stat cards ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s-4); }
.stat {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--s-5);
  display: grid; gap: 4px;
}
.stat__value { font-family: var(--font-display); font-size: 2rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.stat__label { font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.stat--brand { background: var(--brand-50); border-color: var(--brand-100); }
.stat--brand .stat__value { color: var(--brand-700); }
.stat--warn .stat__value { color: var(--warn); }
.stat--success .stat__value { color: var(--success); }

/* ---------- Estados de vacaciones (átomos compartidos) ---------- */
.event-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: var(--r-sm);
  font-size: 0.72rem; font-weight: 800; color: #fff;
  background: var(--c, var(--brand-500));
  line-height: 1.2;
}
.event-pill.is-pendiente { box-shadow: inset 0 0 0 2px rgba(255,255,255,.55); opacity: 0.96; }
.event-pill.is-rechazado { opacity: 0.5; text-decoration: line-through; }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: var(--z-modal);
  display: flex; align-items: center; justify-content: center;
  padding: clamp(14px, 3vw, 32px);
  background: rgba(10, 23, 38, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity var(--dur-2) var(--ease);
}
.modal-backdrop.is-open { opacity: 1; }
.modal {
  width: 100%; max-width: 560px;
  max-height: calc(100dvh - 48px); overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: var(--s-6);
  transform: translateY(16px) scale(0.98);
  opacity: 0;
  transition: transform var(--dur-3) var(--ease), opacity var(--dur-2) var(--ease);
}
.modal-backdrop.is-open .modal { transform: none; opacity: 1; }
.modal--wide { max-width: 760px; }
.modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-5); }
.modal__head h3 { font-size: 1.3rem; }
.modal__sub { color: var(--muted); font-size: 0.88rem; margin-top: 4px; }
.modal__foot { display: flex; justify-content: flex-end; gap: var(--s-3); margin-top: var(--s-6); flex-wrap: wrap; }
.modal__close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: var(--r-pill);
  background: rgba(10, 23, 38, 0.05); color: var(--muted); flex-shrink: 0;
  transition: background var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}
.modal__close:hover { background: rgba(10, 23, 38, 0.1); color: var(--ink); }

/* ---------- Toasts ---------- */
.toast-stack {
  position: fixed; z-index: var(--z-toast);
  bottom: 24px; right: 24px;
  display: grid; gap: 10px; max-width: min(380px, calc(100vw - 32px));
}
.toast {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 13px 16px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  font-size: 0.88rem; font-weight: 600; color: var(--ink-2);
  transform: translateX(120%);
  transition: transform var(--dur-3) var(--ease-out);
}
.toast.is-in { transform: none; }
.toast::before { content: ""; width: 6px; align-self: stretch; border-radius: var(--r-pill); background: var(--brand-500); }
.toast--success::before { background: var(--success); }
.toast--error::before { background: var(--danger); }
.toast--warn::before { background: var(--warn); }

/* ---------- Tabs segmentadas ---------- */
.segmented { display: inline-flex; padding: 4px; gap: 3px; background: rgba(10,23,38,0.05); border-radius: var(--r-pill); }
.segmented button {
  padding: 8px 16px; border-radius: var(--r-pill);
  font-weight: 700; font-size: 0.85rem; color: var(--muted);
  transition: color var(--dur-2) var(--ease), background var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.segmented button.is-active { color: var(--brand-700); background: var(--surface); box-shadow: var(--shadow-sm); }

/* ---------- Empty / loading ---------- */
.empty { text-align: center; padding: var(--s-9) var(--s-5); color: var(--muted); display: grid; gap: var(--s-3); justify-items: center; }
.empty__icon { width: 56px; height: 56px; border-radius: var(--r-lg); background: var(--brand-50); color: var(--brand-500); display: grid; place-items: center; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--brand-100); border-top-color: var(--brand-500); animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, #e9eef5 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: var(--r-sm); }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ---------- Divider ---------- */
.divider { height: 1px; background: var(--line); margin: var(--s-5) 0; border: 0; }
