/* =============================================================================
   Alap: reset, tipográfia, űrlapmezők, fókusz, segédosztályok
   ========================================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.45;
  color: var(--ink);
  background: var(--paper);
  display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;   /* számok oszlopba rendeződnek (pénz, mennyiség) */
}
h1, h2, h3, h4 { font-family: var(--font-cond); font-weight: 600; letter-spacing: 0; line-height: 1.2; color: var(--ink); }
a { color: var(--primary); }
a:hover { color: var(--primary-hover); }
strong, b { font-weight: 600; }
::selection { background: var(--primary-tint); color: var(--primary-ink); }

button { font-family: inherit; cursor: pointer; color: inherit; }
input, select, textarea {
  font-family: inherit; font-size: var(--fs-md); color: var(--ink);
  padding: 8px 11px; min-height: 38px;
  border: 1px solid var(--rule-2); border-radius: var(--r-sm);
  width: 100%; background: var(--sheet);
  transition: border-color var(--transition), box-shadow var(--transition);
}
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; accent-color: var(--primary); }
input[type=color] { padding: 2px; }
input::placeholder, textarea::placeholder { color: var(--ink-3); opacity: .85; }
input:hover:not(:focus):not(:disabled), select:hover:not(:focus):not(:disabled), textarea:hover:not(:focus):not(:disabled) { border-color: var(--ink-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--focus); box-shadow: var(--ring); }
input:disabled, select:disabled, textarea:disabled { background: var(--sheet-2); color: var(--ink-3); }
textarea { resize: vertical; min-height: 76px; line-height: 1.5; }
select {
  appearance: none; -webkit-appearance: none;
  padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%233d4743' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
select[multiple] { background-image: none; padding-right: 11px; }

/* Címkék: mondatkezdő betűvel, nem csupa nagybetűvel */
label, .form-label {
  display: block; font-size: var(--fs-sm); font-weight: 500;
  color: var(--ink-2); margin-bottom: 5px;
  text-transform: none; letter-spacing: 0;
}

/* Fókusz: billentyűzetes navigációnál mindig látszik */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
button:focus:not(:focus-visible) { outline: none; }

/* Görgetősáv (asztali) */
* { scrollbar-width: thin; scrollbar-color: var(--rule-2) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--rule-2); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background-color: var(--ink-3); }
*::-webkit-scrollbar-track { background: transparent; }

kbd {
  font-family: var(--font-cond); font-size: 11px; font-weight: 600;
  background: var(--sheet); border: 1px solid var(--rule-2); border-bottom-width: 2px;
  border-radius: var(--r-xs); padding: 0 5px; color: var(--ink-2);
}

/* Láthatóság */
body.role-viewer .editor-only { display: none !important; }
body.in-hub .nav-project-only { display: none !important; }
body.in-project .nav-hub-only { display: none !important; }
.file-input-hidden { display: none; }
.hidden { display: none !important; }
.muted { color: var(--ink-3); }
.num { font-variant-numeric: tabular-nums; text-align: right; }

/* Mozgás csökkentése */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
