/* --- 2. VISTA AGENCIA A PANTALLA COMPLETA + SALA DE ENTREVISTAS (100% VIEWPORT, CERO SCROLL) --- */
#view-agency.view.active {
  display: flex;
  height: 100%;
  background: #090e1c;
  overflow: hidden;
}

.ag-shell {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.ag-topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 10px;
  background: #131c36;
  border-bottom: 3px solid #3b4f7a;
}

.ag-topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ag-topbar-title {
  font-family: var(--font-px-title) !important;
  font-size: 18px;
  font-weight: 700;
  color: #ffd447;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.ag-body {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#view-agency .agency-tab-pane {
  display: none;
  width: 100%;
  height: 100%;
  min-height: 0;
}

#view-agency .agency-tab-pane.active {
  display: flex;
  flex-direction: column;
}

#view-agency .ag-pane-interview {
  padding: 6px;
  overflow: hidden;
}

#view-agency #int-cash-chip,
#view-agency #btn-int-exit {
  display: none !important;
}

#view-interview .int-layout {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 42% minmax(0, 1fr);
  gap: 8px;
  min-height: 0;
  overflow: hidden;
}

/* A) IZQUIERDA (~40%): CABINA DE ENTREVISTA ILUSTRADA */
#view-interview .int-booth-col {
  background: #131c36;
  border: 2px solid #3b4f7a;
  box-shadow: 0 4px 0 #050812;
  padding: 6px 6px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 0;
  overflow: hidden;
}

.int-booth-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: nowrap;
}

.int-cash-badge {
  font-family: var(--font-px-title);
  font-size: 14px;
  font-weight: 700;
  padding: 3px 7px;
  background: #0b1226;
  border: 2px solid #b45309;
  color: #fde047;
}

#btn-int-exit {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
}

#btn-int-guide-open {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #f8fafc !important;
}

/* Escena Canvas de Cabina (~58% altura izquierda) */
.int-booth-canvas-wrap {
  position: relative;
  flex: 0 0 55%;
  min-height: 190px;
  background: #1a120d;
  border: 3px solid #475569;
  box-shadow: inset 0 0 0 2px #0f172a;
  overflow: hidden;
  cursor: pointer;
}

.int-booth-canvas-wrap.aura-LEGENDARIA {
  border-color: #f59e0b;
  box-shadow: inset 0 0 18px rgba(245, 158, 11, 0.35), 0 0 12px rgba(245, 158, 11, 0.3);
}

.int-booth-canvas-wrap.aura-UNICA {
  border-color: #ff3864;
  box-shadow: inset 0 0 22px rgba(255, 56, 100, 0.45), 0 0 14px rgba(245, 158, 11, 0.45);
}

#int-booth-canvas {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}

/* Bocadillo RPG Tactil con cola */
#view-interview .int-speech-bubble {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: 0 0 auto;
  overflow: visible;
  background: linear-gradient(180deg, #fffdf5 0%, #f6ecd4 100%);
  color: #161822;
  border: 2px solid #2c3548;
  box-shadow: inset 0 0 0 2px #e2d4b0, 0 4px 0 #070b16;
  padding: 7px 10px;
  min-height: 54px;
}

#view-interview .int-speech-bubble::before {
  content: '';
  position: absolute;
  top: -11px;
  left: 44%;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 10px solid #2c3548;
}

#view-interview .int-speech-bubble::after {
  content: '';
  position: absolute;
  top: -7px;
  left: calc(44% + 2px);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 8px solid #fffdf5;
}

.int-speech-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 4px;
  margin-bottom: 5px;
  border-bottom: 2px solid #d6c59a;
  flex-wrap: nowrap;
}

.int-speech-name {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: 0.4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

@keyframes int-live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

#view-interview .int-speech-bubble p {
  margin: 0;
  font-family: var(--font-px-body);
  font-size: 19px;
  line-height: 1.15;
  font-weight: 400;
  color: #0f172a;
}

#view-interview .int-lupa-status.is-hidden {
  display: none;
}

.int-rules-mini-btn {
  background: #1e293b;
  color: #cbd5e1;
  border: 2px solid #475569;
  padding: 3px 8px;
  font-family: var(--font-px-title);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.int-rules-mini-btn:hover {
  border-color: #ffd447;
  color: #ffd447;
}

.int-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: auto;
}

.int-actions-grid.has-3-actions #btn-stamp-hire {
  grid-column: 1 / -1;
}

.int-actions-grid .int-rubber-stamp {
  height: 52px;
  border: 2px solid #090e1c;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), inset 0 -3px 0 rgba(0, 0, 0, 0.28), 0 4px 0 #050812;
  gap: 1px;
}

.int-actions-grid .int-rubber-stamp:hover:not(:disabled) {
  filter: brightness(1.08);
  border-color: #fde047;
}

.int-actions-grid .int-stamp-top {
  font-size: 19px;
  gap: 7px;
  line-height: 1;
}

.int-actions-grid .int-stamp-sub {
  font-size: 15px;
  opacity: 0.96;
  line-height: 1;
}

#view-interview .int-lupa-status {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  background: #0b1226;
  border: 2px solid #2e4b8a;
  color: #93c5fd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#view-interview .int-lupa-status.alert {
  border-color: #ef4444;
  color: #fca5a5;
  background: #360c13;
}

#view-interview .int-lupa-status.ok {
  border-color: #22c55e;
  color: #86efac;
  background: #0b2e19;
}

/* B) DERECHA (~60%): ESCRITORIO DE MADERA + TAPETE VERDE ESMERALDA */
#view-interview .int-desk-col {
  position: relative;
  background:
    repeating-linear-gradient(90deg, #3c2314 0px, #3c2314 44px, #311c0f 44px, #311c0f 46px),
    linear-gradient(180deg, #472a18 0%, #2b180d 100%);
  border: 3px solid #6b4228;
  box-shadow: inset 0 0 0 2px #24130a, 0 5px 0 #050812;
  padding: 10px 12px 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  min-height: 0;
  overflow: hidden;
}

/* Tapete verde esmeralda oscuro con costura dorada */
.int-emerald-mat {
  position: relative;
  flex: 1;
  background: #14332a;
  border: 3px solid #0c211b;
  box-shadow:
    inset 0 0 0 3px #14332a,
    inset 0 0 0 5px #2e6b54,
    0 5px 0 rgba(10, 6, 3, 0.65);
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 0;
  overflow: hidden;
}

/* Columna izquierda del tapete: Carpeta Manila CV */
.int-desk-left-col {
  width: 50%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: relative;
  z-index: 2;
}

/* Columna derecha del tapete: Referencias RRHH + Post-it Sinergias */
.int-desk-right-col {
  width: 48%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  position: relative;
  z-index: 2;
}

/* 1. CARPETA DE EXPEDIENTE / CV (MANILA) */
.int-manila-folder {
  position: relative;
  background: #efe1be;
  color: #1f1b14;
  border: 3px solid #8a7349;
  box-shadow: 4px 5px 0 rgba(7, 17, 14, 0.65);
  padding: 10px;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.int-manila-date {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 9.5px;
  font-weight: 700;
  color: #78350f;
  background: rgba(254, 243, 199, 0.9);
  border: 1px dashed #b45309;
  padding: 1px 5px;
  letter-spacing: 0.4px;
}

#int-desk-mat.is-tier-1 {
  justify-content: center;
}

#int-desk-mat.is-tier-1 .int-desk-docs-row {
  justify-content: center;
  width: 100%;
}

#int-desk-mat.is-tier-1 .int-desk-left-col {
  width: min(460px, 92%);
  margin: 0 auto;
  flex: 0 1 auto;
}

.int-manila-folder.shake-paper {
  animation: paper-shake 0.18s ease-in-out;
}

.int-manila-folder.slide-out {
  transform: translateX(115%) rotate(5deg);
  opacity: 0;
}

@keyframes paper-shake {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-4px, 2px); }
  50% { transform: translate(4px, -2px); }
  75% { transform: translate(-3px, 1px); }
}

.int-manila-tab {
  position: absolute;
  top: -17px;
  left: 10px;
  background: #e5d2a4;
  border: 3px solid #8a7349;
  border-bottom: none;
  padding: 1px 9px;
  font-size: 13px;
  font-weight: 700;
  color: #3d311c;
}

.int-cv-header-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

/* Foto estilo Polaroid con clip y rotacion -2deg */
.int-polaroid {
  position: relative;
  flex: 0 0 auto;
  background: #ffffff;
  border: 2px solid #9ca3af;
  box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.28);
  padding: 4px 4px 9px;
  transform: rotate(-2deg);
}

.int-polaroid-clip {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 16px;
  pointer-events: none;
}

.int-polaroid canvas {
  width: 62px;
  height: 82px;
  display: block;
  background: #e2e8f0;
  image-rendering: pixelated;
}

.int-cv-identity {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.int-rarity-ribbon {
  font-size: 13px;
  font-weight: 700;
  padding: 2px 6px;
  display: inline-block;
  align-self: flex-start;
  border: 2px solid #1e293b;
  color: #fff;
  background: #475569;
}

.int-rarity-ribbon.rarity-COMUN { background: #64748b; color: #0f172a; }
.int-rarity-ribbon.rarity-RARA { background: #2563eb; }
.int-rarity-ribbon.rarity-EPICA { background: #9333ea; }
.int-rarity-ribbon.rarity-LEGENDARIA { background: #d97706; }
.int-rarity-ribbon.rarity-UNICA { background: linear-gradient(90deg, #be123c, #d97706); }

/* Campos oficiales compactos */
.int-doc-field {
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, 0.48);
  border: 2px solid rgba(138, 115, 73, 0.38);
  padding: 3px 6px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  color: inherit;
  font-family: inherit;
}

.int-doc-field span {
  font-size: 13px;
  font-weight: 700;
  color: #6b5a3e;
  text-transform: uppercase;
  line-height: 1;
}

.int-doc-field strong {
  font-size: 16px;
  font-weight: 700;
  color: #161410;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.05;
}

/* Barras visuales de estadisticas pixel art */
.int-stat-bars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.int-stat-box {
  background: rgba(255, 255, 255, 0.45);
  border: 2px solid rgba(138, 115, 73, 0.35);
  padding: 4px 6px;
  text-align: left;
  font-family: inherit;
}

.int-stat-head {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: #4a3d27;
  margin-bottom: 3px;
  line-height: 1;
}

.int-bar-track {
  height: 7px;
  background: #cbbfa0;
  border: 1px solid #6b5a3e;
  overflow: hidden;
}

.int-bar-fill {
  height: 100%;
  background: #16a34a;
}

.int-bar-fill.speed {
  background: #2563eb;
}

.int-ability-box {
  background: #fff8e1;
  border: 2px solid #b45309;
  padding: 4px 6px;
  font-size: 16px;
  line-height: 1.1;
  color: #291d08;
}

.int-ability-box.is-cond {
  background: #fef2f2;
  border-color: #dc2626;
  color: #450a0a;
}

.int-cv-footer-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

/* 2. NOTA DE REFERENCIAS (FAX / MEMO PALE YELLOW) */
.int-ref-memo {
  background: #fbf3c4;
  color: #2c2410;
  border: 3px solid #a89552;
  border-bottom: 4px dashed #a89552;
  box-shadow: 4px 5px 0 rgba(7, 17, 14, 0.65);
  padding: 7px 9px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.int-ref-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: #5c4b18;
  border-bottom: 2px solid #d4c37b;
  padding-bottom: 3px;
}

.int-ref-memo .int-doc-field {
  background: rgba(255, 255, 255, 0.45);
  border-color: rgba(168, 149, 82, 0.45);
}

/* SELLO DE TINTA ESTAMPADO (-12deg) */
.int-ink-stamp {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-12deg) scale(1.25);
  z-index: 25;
  padding: 6px 14px;
  font-size: 18px;
  font-weight: 700;
  border: 4px solid #16a34a;
  color: #16a34a;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35);
  pointer-events: none;
  animation: stamp-slam 0.18s cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
}

.int-ink-stamp.reject { border-color: #dc2626; color: #dc2626; }
.int-ink-stamp.negotiate { border-color: #d97706; color: #b45309; }
.int-ink-stamp.report { border-color: #1d4ed8; color: #1d4ed8; }

@keyframes stamp-slam {
  0% { transform: translate(-50%, -50%) rotate(-12deg) scale(2.1); opacity: 0.2; }
  100% { transform: translate(-50%, -50%) rotate(-12deg) scale(1); opacity: 0.95; }
}

.int-rubber-stamp {
  height: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 6px;
  font-family: var(--font-px-title);
  font-size: 11px;
  font-weight: 700;
  border: 3px solid #0f172a;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.35), 0 5px 0 #070910;
  cursor: pointer;
  color: #fff;
  transition: transform 0.08s;
}

.int-rubber-stamp:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.25), 0 2px 0 #070910;
}

.int-rubber-stamp:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  filter: grayscale(0.4);
}

.int-rubber-stamp.hire { background: #15803d; }
.int-rubber-stamp.reject { background: #b91c1c; }
.int-rubber-stamp.negotiate { background: #c26d0a; }
.int-rubber-stamp.report { background: #1d4ed8; }

@keyframes stamp-unlock-glow {
  from { box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.45), 0 5px 0 #070910, 0 0 6px rgba(255, 212, 71, 0.6); }
  to   { box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.65), 0 5px 0 #070910, 0 0 18px rgba(255, 212, 71, 1); }
}

.int-stamp-top {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.int-stamp-sub {
  font-size: 10px;
  opacity: 0.92;
}

/* XP TOAST NOTIFICATION */
.xp-toast-layer {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 980;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.xp-toast-card {
  background: #0f172a;
  border: 3px solid #ffd447;
  box-shadow: 0 5px 0 #020617;
  padding: 7px 12px;
  color: #f8fafc;
  font-size: 12px;
  font-weight: 700;
  animation: xp-toast-in 0.25s ease-out;
}

.xp-toast-card.level-up {
  border-color: #22c55e;
  background: #052e16;
  color: #bbf7d0;
}

@keyframes xp-toast-in {
  from { transform: translateX(30px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

