/* ============================================================
   70 × 7 — shell.css
   Hub minimalista oscuro. Tabs arriba, iframe abajo.
   Que la atención vaya a los diseños, no al shell.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #07070b;
  color: #e7e5e0;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   HEADER
   ============================================================ */
.shell-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 64px;
  display: grid;
  grid-template-columns: minmax(180px, auto) 1fr minmax(140px, auto);
  align-items: center;
  gap: 16px;
  padding: 0 22px;
  background: rgba(7, 7, 11, 0.85);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid rgba(231, 229, 224, 0.06);
}

/* Brand izquierda */
.shell-brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  user-select: none;
}
.shell-brand__mark {
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.04em;
  color: #f0eee8;
}
.shell-brand__sub {
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(231, 229, 224, 0.42);
}

/* ============================================================
   TABS — el corazón del shell
   ============================================================ */
.shell-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  justify-self: center;
  max-width: 100%;
  padding: 0 4px;
}
.shell-tabs::-webkit-scrollbar { display: none; }

.shell-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: rgba(231, 229, 224, 0.55);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: color 220ms ease, background 220ms ease, border-color 220ms ease;
}

.shell-tab__num {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: rgba(231, 229, 224, 0.35);
  font-variant-numeric: tabular-nums;
  transition: color 220ms ease;
}

.shell-tab__label {
  font-size: 13px;
}

.shell-tab:hover {
  color: #f0eee8;
  background: rgba(231, 229, 224, 0.04);
  border-color: rgba(231, 229, 224, 0.08);
}
.shell-tab:hover .shell-tab__num {
  color: rgba(231, 229, 224, 0.6);
}

.shell-tab.is-active {
  color: #1a1208;
  background: #d4b779;
  border-color: #d4b779;
  box-shadow: 0 0 24px rgba(212, 183, 121, 0.25);
}
.shell-tab.is-active .shell-tab__num {
  color: rgba(26, 18, 8, 0.55);
}

.shell-tab:focus-visible {
  outline: 2px solid #d4b779;
  outline-offset: 3px;
}

/* Meta derecha */
.shell-meta {
  justify-self: end;
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(231, 229, 224, 0.55);
  user-select: none;
}
.shell-meta__name {
  color: #f0eee8;
  font-weight: 500;
}
.shell-meta__sep {
  color: rgba(231, 229, 224, 0.25);
}
.shell-meta__num {
  font-variant-numeric: tabular-nums;
  color: rgba(231, 229, 224, 0.55);
}

/* ============================================================
   STAGE (iframe)
   ============================================================ */
.shell-stage {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: #0a0a0f;
  overflow: hidden;
}

.shell-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #0a0a0f;
  opacity: 0;
  transition: opacity 380ms cubic-bezier(0.16, 1, 0.3, 1);
}
.shell-frame.is-ready {
  opacity: 1;
}

/* Loading indicator */
.shell-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 220ms ease;
}
.shell-loading.is-visible { opacity: 1; }

.shell-loading__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d4b779;
  animation: shell-pulse 1.2s ease-in-out infinite;
}
.shell-loading__dot:nth-child(2) { animation-delay: 0.15s; }
.shell-loading__dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes shell-pulse {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.3; }
  40%           { transform: scale(1);   opacity: 1;   }
}

/* Placeholder (diseño no entregado) */
.shell-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  background: #0a0a0f;
}
.shell-placeholder[hidden] { display: none; }
.shell-placeholder__title {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: #f0eee8;
  margin: 0;
}
.shell-placeholder__body {
  font-size: 14px;
  color: rgba(231, 229, 224, 0.55);
  max-width: 420px;
  line-height: 1.5;
  margin: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .shell-header {
    grid-template-columns: auto 1fr;
    grid-template-areas: "brand meta" "tabs tabs";
    height: auto;
    padding: 10px 16px;
    gap: 8px;
  }
  .shell-brand { grid-area: brand; }
  .shell-meta { grid-area: meta; }
  .shell-tabs { grid-area: tabs; justify-self: start; padding-bottom: 4px; }
  .shell-stage { top: 108px; }
  .shell-tab { padding: 6px 12px; font-size: 12px; }
  .shell-tab__num { font-size: 9px; }
  .shell-tab__label { font-size: 12px; }
}

@media (max-width: 520px) {
  .shell-brand__sub { display: none; }
  .shell-meta { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .shell-frame, .shell-tab, .shell-tab__num, .shell-loading,
  .shell-loading__dot {
    transition: none !important;
    animation: none !important;
  }
}
