/* ═══════════════════════════════════════════════
   CEKID ZN — Neobrutalism Design System
   Palet: Orange #ff5e00, Black #000, White #fff,
          Cream #f4f4f0, Charcoal #0c0c0e
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --neo-orange: #ff5e00;
  --neo-orange-hover: #e65400;
  --neo-black: #000000;
  --neo-white: #ffffff;
  --neo-cream: #f4f4f0;
  --neo-charcoal: #0c0c0e;
  --neo-gray: #e5e5e5;
  --neo-gray-dark: #333333;
  --neo-success: #16a34a;
  --neo-error: #dc2626;
  --neo-warning: #ca8a04;
  --neo-info: #2563eb;
  --neo-border: 2px solid var(--neo-black);
  --neo-shadow: 4px 4px 0px var(--neo-black);
  --neo-shadow-sm: 3px 3px 0px var(--neo-black);
  --neo-shadow-hover: 5px 5px 0px var(--neo-black);
  --neo-radius: 0px;
  --neo-font: 'Inter', system-ui, -apple-system, sans-serif;
  --neo-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --neo-transition: 120ms ease;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--neo-font);
  background: var(--neo-cream);
  color: var(--neo-charcoal);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--neo-orange); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

/* ── CONTAINER ── */
.neo-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── TYPOGRAPHY ── */
.neo-h1 { font-size: 2.5rem; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
.neo-h2 { font-size: 2rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
.neo-h3 { font-size: 1.5rem; font-weight: 700; line-height: 1.3; }
.neo-h4 { font-size: 1.125rem; font-weight: 600; line-height: 1.4; }
.neo-body { font-size: 1rem; font-weight: 400; line-height: 1.6; }
.neo-small { font-size: 0.875rem; font-weight: 400; }
.neo-mono { font-family: var(--neo-mono); font-size: 0.875rem; }
.neo-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }

/* ── BUTTONS ── */
.neo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 24px;
  font-family: var(--neo-font);
  font-size: 0.9375rem;
  font-weight: 600;
  border: var(--neo-border);
  box-shadow: var(--neo-shadow);
  cursor: pointer;
  transition: transform var(--neo-transition), box-shadow var(--neo-transition);
  text-decoration: none;
  white-space: nowrap;
}

.neo-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: var(--neo-shadow-hover);
  text-decoration: none;
}

.neo-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px var(--neo-black);
}

.neo-btn-primary {
  background: var(--neo-orange);
  color: var(--neo-white);
}
.neo-btn-primary:hover { background: var(--neo-orange-hover); color: var(--neo-white); }

.neo-btn-dark {
  background: var(--neo-charcoal);
  color: var(--neo-white);
}
.neo-btn-dark:hover { background: var(--neo-black); color: var(--neo-white); }

.neo-btn-outline {
  background: var(--neo-white);
  color: var(--neo-charcoal);
}
.neo-btn-outline:hover { background: var(--neo-cream); }

.neo-btn-ghost {
  background: transparent;
  border: none;
  box-shadow: none;
  color: var(--neo-charcoal);
  padding: 8px 12px;
}
.neo-btn-ghost:hover { background: var(--neo-gray); box-shadow: none; transform: none; }

.neo-btn-sm { min-height: 36px; padding: 6px 16px; font-size: 0.8125rem; box-shadow: var(--neo-shadow-sm); }
.neo-btn-lg { min-height: 52px; padding: 14px 32px; font-size: 1.0625rem; }
.neo-btn-block { width: 100%; }
.neo-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ── CARDS ── */
.neo-card {
  background: var(--neo-white);
  border: var(--neo-border);
  box-shadow: var(--neo-shadow);
  padding: 24px;
}

.neo-card-hover:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px var(--neo-black);
}

.neo-card-orange { background: var(--neo-orange); color: var(--neo-white); }
.neo-card-dark { background: var(--neo-charcoal); color: var(--neo-white); }
.neo-card-cream { background: var(--neo-cream); }

/* ── INPUTS ── */
.neo-input, .neo-select, .neo-textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  font-family: var(--neo-font);
  font-size: 0.9375rem;
  border: var(--neo-border);
  box-shadow: var(--neo-shadow-sm);
  background: var(--neo-white);
  color: var(--neo-charcoal);
  outline: none;
  transition: box-shadow var(--neo-transition);
}

.neo-input:focus, .neo-select:focus, .neo-textarea:focus {
  box-shadow: var(--neo-shadow-hover);
}

.neo-input::placeholder { color: #999; }

.neo-textarea { min-height: 100px; resize: vertical; }

.neo-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.neo-input-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--neo-charcoal);
}

.neo-input-hint {
  font-size: 0.75rem;
  color: #666;
}

/* ── BADGES ── */
.neo-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 2px solid var(--neo-black);
  box-shadow: 2px 2px 0px var(--neo-black);
}

.neo-badge-orange { background: var(--neo-orange); color: var(--neo-white); }
.neo-badge-green { background: var(--neo-success); color: var(--neo-white); }
.neo-badge-red { background: var(--neo-error); color: var(--neo-white); }
.neo-badge-dark { background: var(--neo-charcoal); color: var(--neo-white); }
.neo-badge-outline { background: var(--neo-white); color: var(--neo-charcoal); }

/* ── NAVBAR ── */
.neo-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--neo-white);
  border-bottom: var(--neo-border);
  height: 64px;
  display: flex;
  align-items: center;
}

.neo-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.neo-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--neo-charcoal);
  text-decoration: none;
}

.neo-nav-brand img { height: 32px; width: auto; }

.neo-nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.neo-nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--neo-charcoal);
  text-decoration: none;
  transition: background var(--neo-transition);
}

.neo-nav-links a:hover { background: var(--neo-cream); }
.neo-nav-links a.active { font-weight: 700; border-bottom: 3px solid var(--neo-orange); }

.neo-nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}

.neo-nav-toggle svg { width: 24px; height: 24px; }

/* ── TABLES ── */
.neo-table-wrap { overflow-x: auto; border: var(--neo-border); box-shadow: var(--neo-shadow); }

.neo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.neo-table th {
  padding: 12px 16px;
  font-weight: 600;
  text-align: left;
  background: var(--neo-charcoal);
  color: var(--neo-white);
  border-bottom: var(--neo-border);
}

.neo-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--neo-gray);
}

.neo-table tr:hover td { background: var(--neo-cream); }

/* ── MODAL ── */
.neo-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms, visibility 200ms;
}

.neo-modal-overlay.active { opacity: 1; visibility: visible; }

.neo-modal {
  background: var(--neo-white);
  border: var(--neo-border);
  box-shadow: 6px 6px 0px var(--neo-black);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
}

.neo-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: var(--neo-border);
}

.neo-modal-body { padding: 24px; }
.neo-modal-footer { padding: 16px 24px; border-top: var(--neo-border); display: flex; gap: 12px; justify-content: flex-end; }

/* ── ALERTS ── */
.neo-alert {
  padding: 14px 18px;
  border: var(--neo-border);
  box-shadow: var(--neo-shadow-sm);
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.neo-alert-success { background: #dcfce7; color: #166534; }
.neo-alert-error { background: #fee2e2; color: #991b1b; }
.neo-alert-warning { background: #fef9c3; color: #854d0e; }
.neo-alert-info { background: #dbeafe; color: #1e40af; }

/* ── CODE BLOCK ── */
.neo-code {
  background: var(--neo-charcoal);
  color: #e5e7eb;
  padding: 16px 20px;
  border: var(--neo-border);
  box-shadow: var(--neo-shadow-sm);
  font-family: var(--neo-mono);
  font-size: 0.8125rem;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre;
}

.neo-code-inline {
  background: var(--neo-cream);
  border: 1px solid var(--neo-gray);
  padding: 2px 6px;
  font-family: var(--neo-mono);
  font-size: 0.8125rem;
}

/* ── TABS ── */
.neo-tabs {
  display: flex;
  border-bottom: var(--neo-border);
  gap: 0;
  overflow-x: auto;
}

.neo-tab {
  min-height: 44px;
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: 500;
  background: var(--neo-cream);
  border: var(--neo-border);
  border-bottom: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--neo-transition);
}

.neo-tab:hover { background: var(--neo-gray); }
.neo-tab.active { background: var(--neo-white); font-weight: 700; border-bottom: 2px solid var(--neo-white); margin-bottom: -2px; }

.neo-tab-content { display: none; padding: 24px 0; }
.neo-tab-content.active { display: block; }

/* ── PROGRESS BAR ── */
.neo-progress {
  height: 24px;
  background: var(--neo-cream);
  border: var(--neo-border);
  box-shadow: var(--neo-shadow-sm);
  overflow: hidden;
}

.neo-progress-bar {
  height: 100%;
  background: var(--neo-orange);
  transition: width 400ms ease;
  display: flex;
  align-items: center;
  padding-left: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--neo-white);
}

.neo-progress-bar.green { background: var(--neo-success); }
.neo-progress-bar.red { background: var(--neo-error); }

/* ── TOOLTIP ── */
[data-tooltip] { position: relative; }
[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 10px;
  background: var(--neo-charcoal);
  color: var(--neo-white);
  font-size: 0.75rem;
  white-space: nowrap;
  border: 2px solid var(--neo-black);
  z-index: 100;
}

/* ── DIVIDER ── */
.neo-divider { border: none; border-top: var(--neo-border); margin: 24px 0; }

/* ── SKELETON LOADER ── */
.neo-skeleton {
  background: linear-gradient(90deg, var(--neo-gray) 25%, #ececec 50%, var(--neo-gray) 75%);
  background-size: 200% 100%;
  animation: neo-shimmer 1.5s infinite;
  border: var(--neo-border);
  min-height: 20px;
}
@keyframes neo-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── UTILS ── */
.neo-text-center { text-align: center; }
.neo-text-right { text-align: right; }
.neo-text-orange { color: var(--neo-orange); }
.neo-text-muted { color: #666; }
.neo-text-success { color: var(--neo-success); }
.neo-text-error { color: var(--neo-error); }
.neo-mt-0 { margin-top: 0; }
.neo-mt-1 { margin-top: 8px; }
.neo-mt-2 { margin-top: 16px; }
.neo-mt-3 { margin-top: 24px; }
.neo-mt-4 { margin-top: 32px; }
.neo-mb-1 { margin-bottom: 8px; }
.neo-mb-2 { margin-bottom: 16px; }
.neo-mb-3 { margin-bottom: 24px; }
.neo-gap-1 { gap: 8px; }
.neo-gap-2 { gap: 16px; }
.neo-flex { display: flex; }
.neo-flex-col { flex-direction: column; }
.neo-flex-wrap { flex-wrap: wrap; }
.neo-items-center { align-items: center; }
.neo-justify-between { justify-content: space-between; }
.neo-justify-center { justify-content: center; }
.neo-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.neo-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.neo-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.neo-hidden { display: none !important; }
.neo-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .neo-h1 { font-size: 1.75rem; }
  .neo-h2 { font-size: 1.5rem; }
  .neo-h3 { font-size: 1.25rem; }
  .neo-container { padding: 0 16px; }
  .neo-grid-2, .neo-grid-3, .neo-grid-4 { grid-template-columns: 1fr; }
  .neo-card { padding: 16px; }

  .neo-nav-links { display: none; }
  .neo-nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--neo-white);
    border-bottom: var(--neo-border);
    padding: 12px 0;
    box-shadow: 0 4px 0 var(--neo-black);
  }
  .neo-nav-links.open a { padding: 12px 24px; }
  .neo-nav-toggle { display: block; }
}

@media (max-width: 480px) {
  html { font-size: 15px; }
  .neo-btn { padding: 10px 18px; font-size: 0.875rem; }
  .neo-card { padding: 14px; }
}

/* ── PRINT ── */
@media print {
  .neo-nav, .neo-btn, .neo-modal-overlay { display: none !important; }
  body { background: #fff; }
  .neo-card { box-shadow: none; border: 1px solid #ccc; }
}
