/* Tarea Ciber — identidad visual (laboratorio de auditoría) */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&display=swap');

.tarea-ciber {
  --te-cyan: #22d3ee;
  --te-magenta: #e879f9;
  --te-green: #34d399;
  --te-red: #f87171;
  --te-mono: 'JetBrains Mono', ui-monospace, monospace;
  position: relative;
}

.tarea-ciber code,
.tarea-ciber .te-mono {
  font-family: var(--te-mono);
  font-size: 0.88em;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(34, 211, 238, 0.2);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  color: #a5f3fc;
}

/* —— Hero briefing —— */
.te-hero {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 1.5rem 1.65rem 1.35rem;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background:
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(232, 121, 249, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 0% 100%, rgba(34, 211, 238, 0.12) 0%, transparent 50%),
    linear-gradient(145deg, #0c1222 0%, #111827 45%, #0f0a1a 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 20px 50px -20px rgba(99, 102, 241, 0.35);
}

.te-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9) 0%, transparent 85%);
  pointer-events: none;
  animation: te-grid-drift 24s linear infinite;
}

@keyframes te-grid-drift {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 28px 28px, 28px 28px; }
}

.te-hero__inner {
  position: relative;
  z-index: 1;
}

.te-hero__top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 0.85rem;
}

.te-hero__chip {
  font-family: var(--te-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.28rem 0.55rem;
  border-radius: 6px;
  border: 1px solid;
}

.te-hero__chip--auth {
  color: #86efac;
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(16, 185, 129, 0.12);
}

.te-hero__chip--warn {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(239, 68, 68, 0.12);
}

.te-hero__chip--opt {
  color: #ddd6fe;
  border-color: rgba(168, 85, 247, 0.5);
  background: rgba(139, 92, 246, 0.15);
}

.te-hero__title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #f0fdfa 0%, #a5f3fc 40%, #e9d5ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.te-hero__terminal {
  font-family: var(--te-mono);
  font-size: 0.72rem;
  color: var(--te-cyan);
  opacity: 0.85;
  margin-bottom: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.te-hero__terminal .te-prompt {
  color: var(--te-magenta);
}

.te-hero__desc {
  margin: 0;
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.6;
  max-width: 42rem;
}

.te-hero__desc a {
  color: var(--te-cyan);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dashed rgba(34, 211, 238, 0.5);
}

.te-hero__desc a:hover {
  color: #fff;
  border-bottom-color: #fff;
}

.te-hero__shield {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.2), rgba(232, 121, 249, 0.2));
  border: 1px solid rgba(34, 211, 238, 0.35);
  color: var(--te-cyan);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.25);
  flex-shrink: 0;
}

.te-hero__headrow {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

/* —— Quick tool strip —— */
.te-quick-tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.te-quick-tool {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.65);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.te-quick-tool:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 8px 24px -8px rgba(34, 211, 238, 0.35);
}

.te-quick-tool__icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.te-quick-tool--target .te-quick-tool__icon {
  background: rgba(248, 113, 113, 0.15);
  color: #fca5a5;
}

.te-quick-tool--zap .te-quick-tool__icon {
  background: rgba(52, 211, 153, 0.15);
  color: #6ee7b7;
}

.te-quick-tool--burp .te-quick-tool__icon {
  background: rgba(167, 139, 250, 0.15);
  color: #c4b5fd;
}

.te-quick-tool--devtools .te-quick-tool__icon {
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
}

.te-quick-tool__label {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
}

.te-quick-tool__sub {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* —— Info cards —— */
.te-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.te-info-card {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.1rem 1.15rem;
  position: relative;
  overflow: hidden;
}

.te-info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--te-accent, var(--te-cyan)), transparent);
}

.te-info-card--goal { --te-accent: #818cf8; }
.te-info-card--skills { --te-accent: var(--te-green); }

.te-info-card h3 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

.te-info-card--goal h3 { color: #a5b4fc; }
.te-info-card--skills h3 { color: #6ee7b7; }

/* —— Collapsible panels —— */
.te-details {
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
  margin-bottom: 0.75rem;
}

.te-details--cyan { border-color: rgba(56, 189, 248, 0.35); }
.te-details--green {
  border-color: rgba(52, 211, 153, 0.45);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.06) 0%, rgba(15, 23, 42, 0.5) 35%);
}

.te-details summary {
  cursor: pointer;
  font-weight: 800;
  font-size: 0.95rem;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.te-details summary::-webkit-details-marker { display: none; }

.te-details--cyan summary { color: #7dd3fc; }
.te-details--green summary { color: #6ee7b7; }
.te-details--phase summary { font-size: 0.92rem; }

.te-guide-nested {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 0.65rem 0.9rem;
  margin-bottom: 0.55rem;
}

.te-guide-nested summary {
  font-weight: 700;
  font-size: 0.88rem;
}

.te-phase {
  border-left: 4px solid var(--te-phase-color, var(--te-cyan));
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.6rem;
  background: var(--bg-card);
  border-top: 1px solid color-mix(in srgb, var(--te-phase-color) 25%, transparent);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.te-phase summary {
  color: var(--te-phase-color);
  cursor: pointer;
  font-weight: 800;
}

.te-table-wrap {
  margin-top: 0.85rem;
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.te-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.te-table th,
.te-table td {
  padding: 0.55rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.te-table th {
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.2);
  font-family: var(--te-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.te-table tr:last-child td { border-bottom: none; }

/* —— Entrega block —— */
.te-entrega-box {
  background: linear-gradient(135deg, rgba(88, 28, 135, 0.15) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 12px;
  padding: 1.25rem;
  margin-top: 1.5rem;
  box-shadow: 0 0 40px -16px rgba(168, 85, 247, 0.4);
}

.te-entrega-box h3 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  color: #e9d5ff;
}

/* —— Dashboard mission card —— */
.te-dash-mission {
  position: relative;
  margin-bottom: 0.85rem;
  border-radius: 14px;
  padding: 1px;
  background: linear-gradient(120deg, rgba(34, 211, 238, 0.55), rgba(232, 121, 249, 0.45), rgba(99, 102, 241, 0.35));
  animation: te-dash-glow 4s ease-in-out infinite;
}

@keyframes te-dash-glow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.12); }
}

.te-dash-mission__inner {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 27, 75, 0.85) 100%);
  border-radius: 13px;
  padding: 1rem 1.1rem;
}

.te-dash-mission .task-title {
  color: #e9d5ff !important;
}

.te-dash-mission__tag {
  font-family: var(--te-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--te-cyan);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
  display: block;
}

/* Nav accent for Tarea Ciber */
.nav-item[onclick*="tarea-extra"] i {
  filter: drop-shadow(0 0 6px rgba(244, 114, 182, 0.6));
}

#view-tarea-extra .section-title {
  background: linear-gradient(90deg, #e9d5ff, #a5f3fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
