/* ==========================================================================
   SYSTEM DECOMMISSIONED (404) - ENTERPRISE DESIGN SYSTEM
   Modern, Sleek, Industrial Dark Aesthetic with Glassmorphism
   ========================================================================== */

:root {
  --bg-primary: #080c14;
  --bg-secondary: #0f172a;
  --card-bg: rgba(15, 23, 42, 0.72);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-border-hover: rgba(245, 158, 11, 0.35);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --amber-primary: #f59e0b;
  --amber-light: #fbbf24;
  --amber-glow: rgba(245, 158, 11, 0.25);

  --crimson-primary: #ef4444;
  --crimson-glow: rgba(239, 68, 68, 0.2);

  --cyan-primary: #06b6d4;
  --cyan-glow: rgba(6, 182, 212, 0.2);

  --green-primary: #10b981;
  --terminal-bg: #030712;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Menlo, monospace;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-card: 0 20px 40px -15px rgba(0, 0, 0, 0.7), 0 0 1px 1px rgba(255, 255, 255, 0.05);
}

/* Base Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100vh;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

/* Background Atmosphere */
.background-grid {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(circle at center, black 40%, transparent 85%);
  -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 85%);
}

.ambient-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  animation: pulseGlow 10s ease-in-out infinite alternate;
}

.ambient-glow-1 {
  top: -150px;
  left: 20%;
  background: radial-gradient(circle, var(--amber-primary), transparent 70%);
}

.ambient-glow-2 {
  bottom: -200px;
  right: 15%;
  background: radial-gradient(circle, #b91c1c, transparent 70%);
}

@keyframes pulseGlow {
  0% { transform: scale(0.9) translate(0, 0); opacity: 0.25; }
  100% { transform: scale(1.1) translate(30px, 20px); opacity: 0.4; }
}

/* Header & Top Bar */
.top-nav {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(8, 12, 20, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(239, 68, 68, 0.1));
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--amber-light);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.nav-badges {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-family: var(--font-mono);
}

.status-pill-amber {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--amber-light);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--amber-light);
  box-shadow: 0 0 10px var(--amber-light);
  animation: beaconPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes beaconPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.clock-badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Page Layout */
.page-container {
  position: relative;
  z-index: 5;
  max-width: 980px;
  margin: 2.5rem auto 4rem;
  padding: 0 1.5rem;
}

/* Hazard Banner */
.decom-banner {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.stripe-bar {
  height: 6px;
  width: 100%;
  background: repeating-linear-gradient(
    -45deg,
    #f59e0b,
    #f59e0b 12px,
    #1e1b18 12px,
    #1e1b18 24px
  );
}

.banner-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
}

.warning-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.banner-text {
  font-size: 0.88rem;
  color: #fde68a;
  line-height: 1.4;
}

.banner-text strong {
  font-weight: 700;
  color: #ffffff;
}

/* Hero / Decommission Card */
.decom-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: clamp(1.75rem, 5vw, 3rem);
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition-normal);
}

.decom-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

/* Card Header Section */
.card-header {
  display: flex;
  align-items: flex-start;
  gap: 2.5rem;
  padding-bottom: 2.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.glitch-wrapper {
  flex-shrink: 0;
}

.code-number {
  font-family: var(--font-mono);
  font-size: clamp(4.5rem, 11vw, 7.5rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.06em;
  background: linear-gradient(180deg, #ffffff 15%, #f59e0b 80%, #b45309 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  text-shadow: 0 10px 30px rgba(245, 158, 11, 0.25);
  user-select: none;
}

.header-divider {
  width: 1px;
  align-self: stretch;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.12), transparent);
}

.header-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.code-badge {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--amber-light);
  background: rgba(245, 158, 11, 0.1);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245, 158, 11, 0.25);
  margin-bottom: 0.75rem;
}

.headline {
  font-size: clamp(1.4rem, 3.2vw, 2.1rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.subheadline {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 600px;
}

.path-highlight {
  font-family: var(--font-mono);
  color: #fcd34d;
  background: rgba(253, 224, 71, 0.08);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  border: 1px solid rgba(253, 224, 71, 0.2);
  word-break: break-all;
}

/* Metadata Grid */
.metadata-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
  padding: 1.25rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.meta-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}

.meta-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.meta-value.font-highlight {
  color: #38bdf8;
}

.meta-link {
  color: var(--amber-light);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.meta-link:hover {
  color: #ffffff;
  transform: translateX(3px);
}

/* Action Buttons */
.actions-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #080c14;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

/* Collapsible Audit Log Terminal */
.terminal-container {
  margin: 1.5rem 0 2rem;
  background: var(--terminal-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  animation: fadeInDown 0.25s ease-out;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background-color: #ef4444; }
.dot-yellow { background-color: #f59e0b; }
.dot-green { background-color: #10b981; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.terminal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 2px 6px;
  border-radius: 4px;
}

.terminal-close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

.terminal-body {
  padding: 1.25rem;
  font-size: 0.82rem;
  line-height: 1.7;
  max-height: 280px;
  overflow-y: auto;
  color: #cbd5e1;
}

.log-line {
  margin-bottom: 0.4rem;
  white-space: pre-wrap;
}

.log-time {
  color: #64748b;
}

.log-info {
  color: #38bdf8;
  font-weight: 600;
}

.log-warn {
  color: #fbbf24;
  font-weight: 600;
}

.log-success {
  color: #34d399;
  font-weight: 600;
}

.log-highlight {
  color: #f43f5e;
  font-weight: 700;
}

/* Guidance Section */
.guidance-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.guidance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.25rem;
}

.guidance-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-fast);
}

.guidance-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

.guidance-icon {
  font-size: 1.75rem;
  margin-bottom: 0.85rem;
}

.guidance-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.guidance-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.2rem;
  flex-grow: 1;
}

.guidance-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--amber-light);
  text-decoration: none;
  transition: color var(--transition-fast), transform var(--transition-fast);
  display: inline-flex;
  align-items: center;
}

.guidance-link:hover {
  color: #ffffff;
  transform: translateX(3px);
}

/* FAQ Accordion */
.faq-accordion {
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.faq-heading {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.faq-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.85rem 0;
}

.faq-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.faq-question {
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  transition: color var(--transition-fast);
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: '+';
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--amber-light);
  transition: transform var(--transition-fast);
}

.faq-item[open] .faq-question {
  color: var(--text-primary);
}

.faq-item[open] .faq-question::after {
  content: '−';
  transform: rotate(0deg);
}

.faq-answer {
  padding-top: 0.65rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Footer Section */
.page-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1.25rem 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-left, .footer-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.footer-separator {
  color: rgba(255, 255, 255, 0.2);
}

.footer-link-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}

.footer-link-btn:hover {
  color: var(--amber-light);
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(245, 158, 11, 0.5);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 15px rgba(245, 158, 11, 0.25);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  color: #ffffff;
  font-size: 0.88rem;
  backdrop-filter: blur(10px);
  animation: slideUpToast 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpToast {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.toast-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--amber-primary);
  color: #080c14;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.75rem;
}

/* Modal Dialog */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-box {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 4px;
}

.modal-close:hover {
  color: #ffffff;
}

.modal-body {
  padding: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.contact-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  margin: 1rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.contact-channel {
  display: flex;
  flex-direction: column;
}

.contact-channel strong {
  font-size: 0.85rem;
  color: var(--text-primary);
}

.badge-tech {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  background: rgba(245, 158, 11, 0.12);
  color: var(--amber-light);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.modal-footnote {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: flex-end;
}

/* Utilities */
.font-mono {
  font-family: var(--font-mono);
}

/* Responsive Media Queries */
@media (max-width: 768px) {
  .top-nav {
    padding: 1rem 1.25rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .nav-badges {
    width: 100%;
    justify-content: space-between;
  }

  .card-header {
    flex-direction: column;
    gap: 1.25rem;
  }

  .header-divider {
    display: none;
  }

  .actions-group {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .page-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
