/* =========================================================================
   DÖK PORTÁL — STÍLUSIRÁNY: "Warm minimalism / neo-craft editorial"
   Svájci-szerkesztőségi tipográfiai rend, kézműves vonalas illusztrációk,
   meleg papír háttér és emberi hangvétel.
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:ital,wght@0,400..700;1,400..700&family=Instrument+Serif:ital@0;1&family=Inter:wght@400;500;600&family=Playfair+Display:ital,wght@0,400..700;1,400..700&display=swap');

/* ---------- 1. TOKENEK ---------- */
:root {
  /* Színek */
  --paper: #F4EFE6;                  /* meleg, törtfehér papír háttér */
  --ink: #141414;                    /* szinte-fekete: szöveg, vonalak, ikonok */
  --accent: #C8553D;                 /* földes terrakotta kiemelésekre */
  --accent-soft: rgba(200, 85, 61, 0.08);
  --muted: #8A8478;                  /* másodlagos szöveg, számozás */
  --line: rgba(20, 20, 20, 0.15);    /* hajszálvékony elválasztók */
  --line-light: rgba(20, 20, 20, 0.08);

  /* Mapping a meglévő tokenekhez a tökéletes kompatibilitásért */
  --bg: var(--paper);
  --surface: #FCFAF6;
  --surface-2: #EDE7DC;
  --surface-3: #E4DDCE;
  --text: var(--ink);
  --text-2: var(--muted);
  --text-3: #9F998F;
  --violet: var(--ink);
  --violet-hover: #2B2A27;
  --coral: var(--accent);
  --cyan: var(--accent);
  --lime: #2E5C38;
  --amber: #B86B28;
  --portal-accent: var(--accent);
  --portal-accent-soft: var(--accent-soft);

  /* Papír-forma: mérsékelt lekerekítés, semmi neon, semmi árnyékhalmozás */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-card: 20px;
  --r-pill: 999px;

  --sh-1: none;
  --sh-2: none;
  --sh-3: none;
  --glow: none;
  --grad: none;
  --grad-warm: none;

  /* Térközök */
  --s1: 4px; --s2: 8px; --s3: 16px; --s4: 24px; --s5: 32px; --s6: 48px; --s7: 64px; --s8: 96px; --s9: 140px;

  /* Finom mozgások */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t-fast: 180ms;
  --t-base: 280ms;
  --t-slow: 600ms;

  /* Tipográfia */
  --font: 'Instrument Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Instrument Serif', 'Playfair Display', Georgia, serif;
}

/* Sötét mód letiltva: Warm minimalism szerkesztőségi meleg tónus mindenkor */
[data-theme="dark"] {
  color-scheme: light;
  --bg: #F4EFE6;
  --surface: #FCFAF6;
  --surface-2: #EDE7DC;
  --text: #141414;
  --text-2: #8A8478;
  --text-3: #9F998F;
  --line: rgba(20, 20, 20, 0.15);
  --sh-1: none;
  --sh-2: none;
}

/* ---------- 2. ALAP BEÁLLÍTÁSOK ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--paper);
}

body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}

img, svg {
  display: block;
  max-width: 100%;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- 3. TIPOGRÁFIA & DINGBATEK ---------- */
h1, h2, h3, h4, .display, .serif-title {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.display {
  font-size: clamp(48px, 7vw, 104px);
  margin-bottom: var(--s4);
}

h2 {
  font-size: clamp(28px, 4vw, 44px);
  margin-bottom: var(--s3);
}

h3 {
  font-size: clamp(20px, 2.5vw, 28px);
}

.lead {
  font-size: clamp(17px, 1.8vw, 21px);
  line-height: 1.6;
  color: var(--muted);
  max-width: 64ch;
  margin-bottom: var(--s5);
}

.dingbat {
  font-style: normal;
  color: var(--accent);
  display: inline-block;
  margin: 0 4px;
  font-size: 0.9em;
}

.editorial-tag, .chip {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  padding: 4px 12px;
  color: var(--muted);
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.chip-violet, .editorial-tag.accent {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  background: var(--accent-soft) !important;
}

.chip-coral {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  background: transparent !important;
}

.editorial-num {
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

/* ---------- 4. ELRENDEZÉS & RÁCS ---------- */
.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding-left: clamp(16px, 4vw, 48px);
  padding-right: clamp(16px, 4vw, 48px);
}

.section {
  padding-top: clamp(48px, 8vw, 112px);
  padding-bottom: clamp(48px, 8vw, 112px);
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.grid {
  display: grid;
  gap: 24px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.span-2 {
  grid-column: span 2;
}

@media (max-width: 960px) {
  .bento, .grid-3 {
    grid-template-columns: 1fr;
  }
  .span-2 {
    grid-column: span 1;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* ---------- 5. KÁRTYÁK & KOMPONENSEK ---------- */
.card, .spot, .rep-card, .stat-card, .list-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: clamp(20px, 3.5vw, 36px);
  box-shadow: none !important;
  position: relative;
  transition: transform var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}

.card:hover, .rep-card:hover {
  transform: translateY(-4px);
  border-color: rgba(20, 20, 20, 0.32);
}

/* Gombok — Pill forma 1px ink kerettel */
.btn, button.btn, a.btn {
  border-radius: var(--r-pill);
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  padding: 10px 22px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}

.btn:hover:not(:disabled) {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.btn-primary {
  background: var(--ink) !important;
  color: var(--paper) !important;
  border-color: var(--ink) !important;
}

.btn-primary:hover:not(:disabled) {
  background: #2D2A26 !important;
  color: var(--paper) !important;
  border-color: #2D2A26 !important;
}

.btn-ghost {
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(20, 20, 20, 0.06);
  color: var(--ink);
  border-color: transparent;
}

.btn-secondary {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13.5px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
}

.btn-icon {
  padding: 8px;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  justify-content: center;
}

/* Linkek finom aláhúzással */
.nav-links a {
  position: relative;
  text-decoration: none;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  padding: 6px 2px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 1px;
  background: var(--accent);
  transition: width 240ms var(--ease);
}

.nav-links a:hover::after, .nav-links a.active::after {
  width: 100%;
}

/* Végtelen Editorial Marquee */
.editorial-marquee {
  overflow: hidden;
  white-space: nowrap;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  background: var(--surface);
  margin: clamp(40px, 6vw, 80px) 0;
}

.editorial-marquee-inner {
  display: inline-flex;
  gap: 48px;
  align-items: center;
  animation: editorial-scroll 45s linear infinite;
}

@keyframes editorial-scroll {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .editorial-marquee-inner {
    animation: none;
  }
}

/* Státuszjelző a fejlécben */
.header-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: 12.5px;
  color: var(--ink);
  background: var(--surface);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

.status-dot.active {
  background: #2E5C38;
}

/* Inputok és űrlapok */
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 10px 14px;
  width: 100%;
  font-size: 15px;
  transition: border-color var(--t-fast);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--ink);
}

/* ---------- 6. NAVIGÁCIÓ ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 239, 230, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-mobile-toggle {
  display: none;
}

@media (max-width: 960px) {
  .nav-links {
    display: none;
  }
  .nav-mobile-toggle {
    display: inline-flex;
  }
}

/* Mobil Hamburger Menü (Warm Minimalism Editorial Drawer) */
.mobile-nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
}

.mobile-nav-drawer.open {
  display: block;
}

.mobile-nav-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0.4);
  animation: fadeIn 200ms ease;
}

.mobile-nav-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(360px, 86vw);
  height: 100%;
  background: var(--paper);
  border-left: 1px solid var(--line);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  animation: slideLeft 260ms var(--ease);
}

.mobile-nav-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-nav-links a {
  padding: 10px 0;
  font-size: 17px;
  font-weight: 500;
  border-bottom: 1px solid var(--line-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-nav-links a:hover {
  color: var(--accent);
}

@keyframes slideLeft {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

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

/* ---------- 7. PORTÁL BELSŐ FELÜLET (APP-VIEW) ---------- */
#app-view {
  min-height: 100vh;
  display: flex;
}

#app-view.hidden, #auth-view.hidden {
  display: none !important;
}

.sidebar {
  width: 280px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
}

.sidebar-header {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.sidebar .nav-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: stretch;
}

.sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all var(--t-fast);
}

.sidebar .nav-link:hover, .sidebar .nav-link.active {
  background: var(--surface-2);
  border-color: var(--line);
}

.sidebar .nav-link.active::after {
  display: none;
}

.content {
  flex: 1;
  background: var(--paper);
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  padding: 18px clamp(16px, 3vw, 32px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
}

.main-container {
  padding: clamp(20px, 3.5vw, 36px);
  flex: 1;
}

.page-view {
  display: none;
}

.page-view.active {
  display: block;
}

/* Statisztikák rács */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  padding: 20px;
  background: var(--surface);
}

.stat-card h3 {
  font-size: 13.5px;
  font-family: var(--font);
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 44px;
  line-height: 1;
  color: var(--ink);
}

/* Táblázatok */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.data-table th {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.data-table td {
  padding: 14px;
  border-bottom: 1px solid var(--line-light);
  font-size: 14.5px;
}

.data-table tr:hover td {
  background: rgba(20, 20, 20, 0.02);
}

/* Modálok */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0.45);
}

.modal-content {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: var(--r-xl);
  padding: clamp(24px, 4vw, 36px);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
}

@media (max-width: 768px) {
  #app-view {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
}

/* =========================================================================
   WARM MINIMALISM / NEO-CRAFT EDITORIAL SPECIFIC COMPONENTS
   ========================================================================= */

/* Szekciók közti nagy függőleges tér */
.section-spacious {
  margin-top: clamp(80px, 12vw, 180px);
  margin-bottom: clamp(80px, 12vw, 180px);
}

/* Kézműves Line-Art Ikonok (~2px vonal, currentColor stroke) */
.craft-icon {
  width: 32px;
  height: 32px;
  stroke: var(--ink);
  stroke-width: 2px;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: inline-block;
  vertical-align: middle;
  transition: transform 0.25s var(--ease), stroke 0.25s var(--ease);
}

.card:hover .craft-icon,
.btn:hover .craft-icon,
.craft-icon:hover {
  stroke: var(--accent);
}

/* Kártya hover: border-color finomítás */
.card {
  transition: border-color 0.18s var(--ease);
}
.card:hover {
  border-color: rgba(20, 20, 20, 0.35);
}

/* Nagy felirat-CTA (serif, 80-140px, hover aláhúzással) */
.big-serif-cta {
  font-family: var(--font-display);
  font-size: clamp(56px, 10vw, 130px);
  font-weight: 400;
  line-height: 1.0;
  color: var(--ink);
  text-decoration: none;
  display: inline-block;
  position: relative;
  letter-spacing: -0.02em;
  transition: color 0.2s var(--ease);
}

.big-serif-cta span {
  font-size: 0.6em;
  color: var(--accent);
  display: inline-block;
  vertical-align: super;
}

.big-serif-cta::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

.big-serif-cta:hover {
  color: var(--accent);
}

.big-serif-cta:hover::after {
  transform: scaleX(1);
}

/* Szerkesztőségi Linkek (hoverre balról jobbra aláhúzás) */
a.editorial-link {
  color: var(--ink);
  text-decoration: none;
  position: relative;
  display: inline-block;
  font-weight: 500;
}

a.editorial-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s var(--ease);
}

a.editorial-link:hover::after {
  transform: scaleX(1);
}
