/* ═══════════════════════════════════════════════════════════════════════
   STRUCTURA PRO · VISUAL AUDIT EXPERTA · 2026-06-02 · SAFE BUILD
   ─────────────────────────────────────────────────────────────────────
   Versión recortada tras incidente. Solo fixes que NO afectan layout global:
   FIX A → Project cards · acciones legibles
   FIX B → Tooltips/popovers · viewport-aware
   FIX D → Fuentes · stack canónico
   ELIMINADO de la versión anterior: typography clamp() global, padding clamp()
   en panel/content, grid override de .projects-grid, container queries en .panel.
   ═══════════════════════════════════════════════════════════════════════ */


/* ─────────────────────────────────────────────────────────────────
   FIX A · PROJECT CARDS · acciones legibles + sin cortes
   ─────────────────────────────────────────────────────────────── */

.proj-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  align-items: stretch;
}

.proj-actions .proj-act-primary {
  width: 100%;
  background: linear-gradient(180deg, #f5b020 0%, var(--accent) 100%);
  color: #1a1410;
  border: none;
  padding: 9px 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .3px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  box-shadow: 0 2px 8px rgba(240,165,0,.18);
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.proj-actions .proj-act-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(240,165,0,.32);
  filter: brightness(1.04);
}

.proj-actions .proj-act-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
}

.proj-actions .proj-act-secondary > .btn {
  flex: 1 1 auto;
  min-width: 0;
  padding: 7px 11px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
  transition: all .14s ease;
  min-height: 32px;
}
.proj-actions .proj-act-secondary > .btn .pa-ic {
  font-size: 12px;
  line-height: 1;
  flex: 0 0 auto;
}
.proj-actions .proj-act-secondary > .btn:hover {
  background: rgba(240,165,0,.07);
  border-color: rgba(240,165,0,.35);
  color: var(--text);
}

.proj-actions .proj-act-delete {
  flex: 0 0 38px;
  width: 38px;
  min-width: 38px;
  max-width: 38px;
  padding: 0;
  font-size: 13px;
  color: var(--text3);
  border: 1px solid var(--border);
  background: transparent;
}
.proj-actions .proj-act-delete:hover {
  background: rgba(248,81,73,.08);
  border-color: rgba(248,81,73,.4);
  color: var(--red);
}

@media (max-width: 640px) {
  .proj-actions .proj-act-secondary > .btn {
    flex: 1 1 calc(50% - 4px);
    font-size: 11px;
    padding: 7px 8px;
  }
}


/* ─────────────────────────────────────────────────────────────────
   FIX B · TOOLTIPS · responsive, no se cortan
   ─────────────────────────────────────────────────────────────── */

[data-term]::before {
  max-width: min(280px, calc(100vw - 32px)) !important;
  z-index: 9990 !important;
  pointer-events: none !important;
  transition: opacity .15s ease !important;
}
[data-term]::after {
  z-index: 9990 !important;
  pointer-events: none !important;
}

[data-term].tt-align-right::before {
  left: auto !important;
  right: 0 !important;
  transform: none !important;
}
[data-term].tt-align-left::before {
  left: 0 !important;
  right: auto !important;
  transform: none !important;
}
[data-term].tt-flip-down::before {
  bottom: auto !important;
  top: calc(100% + 10px) !important;
}
[data-term].tt-flip-down::after {
  bottom: auto !important;
  top: calc(100% + 4px) !important;
  border-top-color: transparent !important;
  border-bottom-color: #0d1117 !important;
}

.popover, .tooltip-custom, [class*="tooltip-"],
[role="tooltip"] {
  max-width: min(280px, calc(100vw - 32px));
  z-index: 9990;
  word-wrap: break-word;
  overflow-wrap: break-word;
}


/* ─────────────────────────────────────────────────────────────────
   FIX D · FUENTES · stack canónico (Syne / system / JetBrains Mono)
   ─────────────────────────────────────────────────────────────── */

:root {
  --font-display: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-sys: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, 'Courier New', monospace;
}

/* NO se aplica font-family global a body para evitar conflictos con CSS existente.
   Las fuentes se respetan vía variables CSS y los componentes ya las usan. */
