/* ═══════════════════════════════════════════════════
   BÉRKALKULÁTOR 2026 – Emerald / fintech téma
   ═══════════════════════════════════════════════════ */

:root {
  --bg:           #080F0D;
  --surface:      #0D1512;
  --surface2:     #131E1B;
  --surface3:     #192620;
  --border:       rgba(16,185,129,0.10);
  --border-hover: rgba(16,185,129,0.22);
  --accent:       #10B981;
  --accent2:      #34D399;
  --accent-glow:  rgba(16,185,129,0.18);
  --accent-soft:  rgba(16,185,129,0.08);
  --text:         #E2F0EB;
  --muted:        rgba(226,240,235,0.42);
  --muted2:       rgba(226,240,235,0.65);
  --red:          #F87171;
  --amber:        #F59E0B;
  --t:            0.2s;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── VISSZA GOMB ── */
.back {
  position: fixed;
  top: 1.25rem;
  left: 1.5rem;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--t);
  letter-spacing: 0.02em;
}
.back:hover { color: var(--text); }
.back svg { opacity: 0.6; transition: opacity var(--t); }
.back:hover svg { opacity: 1; }

/* ── HERO ── */
.hero {
  min-height: 52vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 7rem 1.5rem 4rem;
  text-align: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 65% 55% at 50% 58%, rgba(16,185,129,0.13) 0%, transparent 70%),
    radial-gradient(ellipse 35% 25% at 50% 90%, rgba(16,185,129,0.05) 0%, transparent 60%);
  pointer-events: none;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(16,185,129,0.07) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 50%, black 0%, transparent 72%);
          mask-image: radial-gradient(ellipse 60% 55% at 50% 50%, black 0%, transparent 72%);
  pointer-events: none;
}

.hero::before,
.hero::after {
  content: '';
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16,185,129,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero::before { top: 15%; left: 8%; }
.hero::after  { bottom: 20%; right: 8%; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent2);
  border: 1px solid rgba(52,211,153,0.28);
  border-radius: 50px;
  padding: 0.35rem 1rem;
  margin-bottom: 1.4rem;
  background: rgba(16,185,129,0.07);
  animation: fade-up 0.8s cubic-bezier(.16,1,.3,1) 0.3s both;
}

.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse-dot 2.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .4; transform: scale(.7); }
}

.hero h1 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(3rem, 9vw, 6rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 1.2rem;
  animation: fade-up 0.9s cubic-bezier(.16,1,.3,1) 0.45s both;
}

.hero h1 .line1 { display: block; }
.hero h1 .line2 {
  display: block;
  color: var(--accent2);
  font-style: italic;
}

.hero-subtitle {
  font-size: clamp(0.87rem, 2vw, 1rem);
  color: var(--muted);
  max-width: 420px;
  line-height: 1.75;
  animation: fade-up 0.9s cubic-bezier(.16,1,.3,1) 0.6s both;
}

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

/* ── MAIN ── */
main { padding-bottom: 5rem; }

.container {
  max-width: 620px;
  margin-inline: auto;
  padding: 0 1.25rem;
}

/* ── KÁRTYÁK ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 26px 26px 24px;
  margin-bottom: 12px;
  animation: fade-up 0.65s cubic-bezier(.16,1,.3,1) both;
}
.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.15s; }
.card:nth-child(3) { animation-delay: 0.25s; }
.card:nth-child(4) { animation-delay: 0.35s; }

.card-title {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.card-title-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ── IRÁNY-TOGGLE ── */
.direction-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 4px;
  gap: 4px;
}
.toggle-btn {
  padding: 0.65rem 1rem;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
  font-family: inherit;
  transition: background var(--t), color var(--t), box-shadow var(--t);
  line-height: 1.3;
}
.toggle-btn span {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  opacity: 0.7;
  margin-top: 1px;
}
.toggle-btn.active {
  background: var(--surface3);
  color: var(--accent2);
  box-shadow: 0 1px 8px rgba(0,0,0,0.25);
}
.toggle-btn:hover:not(.active) {
  color: var(--text);
}

/* ── INPUT ── */
.field-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.amount-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.amount-wrap input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 14px 54px 14px 18px;
  color: var(--text);
  font-family: 'Instrument Serif', serif;
  font-size: 1.75rem;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}

.amount-wrap input::placeholder { color: rgba(226,240,235,0.2); }

.amount-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.amount-suffix {
  position: absolute;
  right: 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
  pointer-events: none;
  user-select: none;
}

.quick-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.quick-btn {
  padding: 5px 12px;
  border-radius: 7px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted2);
  font-size: 0.78rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: border-color var(--t), color var(--t), background var(--t);
  white-space: nowrap;
}
.quick-btn:hover {
  border-color: var(--accent);
  color: var(--accent2);
  background: var(--accent-soft);
}

/* ── CHECKBOXOK ── */
.exemptions-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 0;
  padding: 0;
}

.exemption-item {
  display: flex;
  flex-direction: column;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding: 11px 14px;
  border-radius: 11px;
  border: 1px solid transparent;
  transition: background var(--t), border-color var(--t);
  margin-bottom: 2px;
}
.checkbox-label:hover {
  background: var(--surface2);
  border-color: var(--border);
}
.checkbox-label.checked {
  background: var(--accent-soft);
  border-color: rgba(16,185,129,0.18);
}

.checkbox-label input[type="checkbox"] { display: none; }

.checkbox-custom {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 1.5px solid rgba(226,240,235,0.2);
  border-radius: 5px;
  background: var(--surface2);
  transition: background var(--t), border-color var(--t);
  position: relative;
  margin-top: 1px;
}
.checkbox-label input:checked ~ .checkbox-custom {
  background: var(--accent2);
  border-color: var(--accent2);
}
.checkbox-label input:checked ~ .checkbox-custom::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 5l3.5 3.5L11 1' stroke='%23080F0D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E") center/10px no-repeat;
}

.checkbox-text strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 1px;
}
.checkbox-text small {
  font-size: 0.77rem;
  color: var(--muted);
  line-height: 1.4;
}

/* ── LENYÍLÓ DETAIL PANEL ── */
.exemption-detail {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  margin: 0 0 0 46px;
  transition:
    max-height 0.28s cubic-bezier(.16,1,.3,1),
    opacity    0.22s ease,
    margin-bottom 0.28s ease;
  pointer-events: none;
}
.exemption-detail.open {
  max-height: 400px;
  opacity: 1;
  margin-bottom: 6px;
  pointer-events: auto;
}

.detail-inner {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 13px 15px;
  margin-bottom: 2px;
}

.detail-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.79rem;
  font-weight: 600;
  color: var(--accent2);
  background: rgba(16,185,129,0.12);
  border-radius: 6px;
  padding: 3px 9px;
  margin-bottom: 8px;
}

.detail-note {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.55;
}

/* Gyerekszám választó */
.detail-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 8px;
}

.child-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.child-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 14px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface3);
  color: var(--muted2);
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--t), border-color var(--t), color var(--t);
  line-height: 1.3;
}
.child-btn span {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 400;
  margin-top: 2px;
}
.child-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent2);
}
.child-btn.active span {
  color: var(--accent);
}
.child-btn:hover:not(.active) {
  border-color: var(--border-hover);
  color: var(--text);
}

/* Fogyatékos gyermek checkbox (detail-en belül) */
.detail-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background var(--t), border-color var(--t);
  margin-top: 4px;
}
.detail-checkbox:hover {
  background: var(--surface3);
  border-color: var(--border);
}
.detail-checkbox input[type="checkbox"] { display: none; }
.detail-checkbox .checkbox-custom {
  width: 17px;
  height: 17px;
  min-width: 17px;
  margin-top: 1px;
}
.detail-checkbox input:checked ~ .checkbox-custom {
  background: var(--accent2);
  border-color: var(--accent2);
}
.detail-checkbox input:checked ~ .checkbox-custom::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 5l3.5 3.5L11 1' stroke='%23080F0D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E") center/10px no-repeat;
}
.detail-checkbox strong {
  display: block;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--text);
}
.detail-checkbox small {
  font-size: 0.74rem;
  color: var(--muted);
}

/* ── EREDMÉNY KÁRTYA ── */
.result-card {
  border-color: rgba(16,185,129,0.16);
  background: linear-gradient(160deg, rgba(16,185,129,0.06) 0%, var(--surface) 50%);
}

/* Nettó fő szám */
.net-hero {
  text-align: center;
  padding: 8px 0 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.net-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.net-amount {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(2.6rem, 7vw, 3.6rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--accent2);
  transition: color 0.3s ease, font-size 0.3s ease;
}
.net-amount.empty { color: var(--muted); font-size: 2rem; }

/* Bontás */
.breakdown { display: flex; flex-direction: column; gap: 0; }

.breakdown-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 10px 0;
}
.breakdown-row + .breakdown-row {
  border-top: 1px solid var(--border);
}

.row-left { flex: 1; min-width: 0; }
.row-label {
  font-size: 0.88rem;
  color: var(--muted2);
  font-weight: 400;
}
.row-label.bold {
  color: var(--text);
  font-weight: 600;
}
.row-detail {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.4;
}

.row-value {
  font-family: ui-monospace, 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--text);
  text-align: right;
  font-weight: 500;
}
.row-value.red   { color: var(--red); }
.row-value.green { color: var(--accent2); font-weight: 600; font-size: 1.05rem; }
.row-value.bold  { color: var(--text); font-weight: 600; font-size: 1.05rem; }

.section-divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* ── SÁVDIAGRAM ── */
.bar-section {
  margin: 18px 0 4px;
}
.bar-legend {
  display: flex;
  gap: 14px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.bar-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  color: var(--muted2);
}
.bar-legend-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.bar-track {
  display: flex;
  height: 14px;
  border-radius: 7px;
  overflow: hidden;
  background: var(--surface2);
  gap: 2px;
}
.bar-segment {
  height: 100%;
  border-radius: 5px;
  width: var(--w, 0%);
  transition: width 0.4s cubic-bezier(.16,1,.3,1);
  min-width: 0;
}
.bar-netto { background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.bar-tb    { background: var(--amber); }
.bar-szja  { background: var(--red); }

.bar-pcts {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
}
.bar-pct {
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, monospace;
  color: var(--muted);
  transition: color 0.3s;
}
.bar-pct.netto { color: var(--accent); }
.bar-pct.tb    { color: var(--amber); }
.bar-pct.szja  { color: var(--red); }

/* ── INFO SZEKCIÓ ── */
.info-full {
  max-width: 1200px;
  margin-inline: auto;
  padding: 0 1.25rem;
}

.info-section {
  margin-top: 32px;
}

.info-section .card {
  margin-bottom: 12px;
}

.info-section h2 {
  font-family: 'Instrument Serif', serif;
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.info-section h3 {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  margin: 16px 0 6px;
}
.info-section h3:first-of-type { margin-top: 0; }
.info-section p {
  font-size: 0.85rem;
  color: var(--muted2);
  line-height: 1.7;
}
.info-section strong { color: var(--text); font-weight: 500; }

/* ── DASHBOARD 2-OSZLOPOS LAYOUT ── */
@media (min-width: 960px) {
  .hero { min-height: 36vh; padding: 5rem 1.5rem 3rem; }

  .container {
    max-width: 1200px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 20px;
    align-items: start;
  }

  .col-inputs { grid-column: 1; }

  .col-result {
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: 24px;
  }

  /* info-full most a grid-en kívül van */
}

/* ── MUNKAVISZONY TÍPUS TOGGLE ── */
.type-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 0;
}

.type-btn {
  padding: 0.65rem 1rem;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
  font-family: inherit;
  transition: background var(--t), color var(--t), box-shadow var(--t);
  line-height: 1.3;
  text-align: center;
}
.type-btn span {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  opacity: 0.7;
  margin-top: 1px;
}
.type-btn.active {
  background: var(--surface3);
  color: var(--accent2);
  box-shadow: 0 1px 8px rgba(0,0,0,0.25);
}
.type-btn:hover:not(.active) { color: var(--text); }

.type-info {
  margin-top: 12px;
  border-radius: 10px;
  background: rgba(16,185,129,0.07);
  border: 1px solid rgba(16,185,129,0.15);
  padding: 11px 14px;
}
.type-note {
  font-size: 0.8rem;
  color: var(--muted2);
  line-height: 1.55;
}
.type-note strong { color: var(--accent2); font-weight: 600; }

/* ── INPUT MÓD TABS (havi / órabér) ── */
.input-mode-tabs {
  display: flex;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
  margin-bottom: 18px;
}

.imode-tab {
  flex: 1;
  padding: 0.45rem 0.75rem;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--t), color var(--t);
  text-align: center;
}
.imode-tab.active {
  background: var(--surface3);
  color: var(--accent2);
  box-shadow: 0 1px 6px rgba(0,0,0,0.2);
}
.imode-tab:hover:not(.active) { color: var(--text); }

/* ── ÓRABÉR FORM ── */
.hourly-form .amount-wrap { margin-bottom: 18px; }

.hform-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.hform-group { display: flex; flex-direction: column; gap: 8px; }

.pill-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.pill-btn {
  padding: 6px 13px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--muted2);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--t), border-color var(--t), color var(--t);
  white-space: nowrap;
}
.pill-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent2);
}
.pill-btn:hover:not(.active) {
  border-color: var(--border-hover);
  color: var(--text);
}

.hourly-summary {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--surface2);
  border: 1px solid rgba(16,185,129,0.18);
  border-radius: 10px;
  padding: 11px 14px;
  margin-top: 4px;
}
.hs-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.hs-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}
.hs-val {
  font-family: ui-monospace, 'JetBrains Mono', monospace;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.hs-val.accent { color: var(--accent2); }
.hs-sep {
  width: 1px;
  height: 36px;
  background: var(--border);
  margin: 0 14px;
  flex-shrink: 0;
}

/* ── DIÁK BADGE A RESULT SOROKBAN ── */
.row-note-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent2);
  background: rgba(16,185,129,0.1);
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: middle;
}

.row-value.zero { color: var(--accent2); font-size: 0.88rem; }

/* ── LÁBLÉC ── */
footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.03em;
}
footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color var(--t);
}
footer a:hover { color: var(--text); }

/* ── ANIMÁCIÓK ── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  .bar-segment { transition: none; }
  .badge-dot   { animation: none; }
  .card        { animation: none; }
}

/* ── KEDVEZMÉNY CSOPORTOK ── */
.ex-group { display: flex; flex-direction: column; gap: 0; }

.ex-group-hdr {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 4px 14px 8px;
}
.ex-group-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.ex-group-note {
  font-size: 0.68rem;
  color: rgba(226,240,235,0.28);
}

.ex-sep {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

/* Disabled partial exemptions when full exemption active */
.ex-group.group-disabled .exemption-item {
  opacity: 0.38;
  pointer-events: none;
}
.ex-group.group-disabled .ex-group-note::after {
  content: ' — teljes mentesség aktív';
  color: var(--accent);
  opacity: 0.7;
}

.new-badge {
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 600;
  margin-left: 4px;
}

/* ── EGYÉNI ÓRA/NAP INPUT ── */
.pill-row-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pill-custom-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.pill-custom-num {
  width: 52px;
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 5px 6px;
  color: var(--text);
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  outline: none;
  transition: border-color var(--t);
  -moz-appearance: textfield;
}
.pill-custom-num::-webkit-inner-spin-button,
.pill-custom-num::-webkit-outer-spin-button { -webkit-appearance: none; }
.pill-custom-num:focus { border-color: var(--accent); }
.pill-custom-wrap span {
  font-size: 0.75rem;
  color: var(--muted);
}

/* ── MŰSZAKPÓTLÉKOK ── */
.potlek-section {
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.potlek-toggle-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: none;
  border: none;
  color: var(--muted2);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 4px;
  border-radius: 7px;
  transition: color var(--t), background var(--t);
  text-align: left;
}
.potlek-toggle-btn:hover { color: var(--text); background: var(--surface2); }
.potlek-toggle-btn svg { flex-shrink: 0; transition: transform 0.2s ease; }
.potlek-toggle-btn[aria-expanded="true"] svg { transform: rotate(45deg); }
.potlek-hint {
  font-size: 0.72rem;
  color: var(--muted);
  margin-left: auto;
}

/* Beosztás típusa toggle a pótlék panelben */
.potlek-beosztás {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.potlek-type-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.potlek-type-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 10px;
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted2);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--t), background var(--t), color var(--t);
  text-align: left;
}
.potlek-type-btn span {
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--muted);
}
.potlek-type-btn:hover { border-color: var(--border-hover); color: var(--text); }
.potlek-type-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--text);
}

.potlek-body {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.potlek-body.open {
  max-height: 700px;
}

.potlek-item {
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid transparent;
  transition: border-color var(--t);
}
.potlek-item:has(input:checked) {
  border-color: rgba(16,185,129,0.2);
  background: rgba(16,185,129,0.04);
}

.potlek-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  cursor: pointer;
  border-radius: 8px;
  transition: background var(--t);
}
.potlek-row:hover { background: var(--surface2); }
.potlek-row input[type="checkbox"] { display: none; }
.potlek-row input:checked ~ .checkbox-custom {
  background: var(--accent);
  border-color: var(--accent);
}
.potlek-row input:checked ~ .checkbox-custom::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 5l3.5 3.5L11 1' stroke='%23080F0D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E") center/10px no-repeat;
}

.potlek-name {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
}
.potlek-name strong { font-size: 0.85rem; font-weight: 500; color: var(--text); }
.potlek-time { font-size: 0.72rem; color: var(--muted); }

.potlek-default-pct {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent2);
  background: rgba(16,185,129,0.1);
  border-radius: 5px;
  padding: 2px 7px;
  flex-shrink: 0;
}

.potlek-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 12px 12px;
}
.potlek-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.potlek-field-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.potlek-num-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.potlek-num {
  width: 72px;
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 6px 8px;
  color: var(--text);
  font-family: ui-monospace, monospace;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  outline: none;
  transition: border-color var(--t);
  -moz-appearance: textfield;
}
.potlek-num::-webkit-inner-spin-button,
.potlek-num::-webkit-outer-spin-button { -webkit-appearance: none; }
.potlek-num:focus { border-color: var(--accent); }
.potlek-num-wrap span { font-size: 0.78rem; color: var(--muted); }
.potlek-pct { width: 56px; }

/* ── RESZPONZÍV ── */
@media (max-width: 520px) {
  .container { padding: 0 1rem; }
  .hero { padding: 6rem 1rem 3rem; min-height: 44vh; }
  .card { padding: 20px 18px; border-radius: 18px; }
  .amount-wrap input { font-size: 1.4rem; padding: 12px 48px 12px 14px; }
  .net-amount { font-size: 2.4rem; }
  .bar-legend { gap: 10px; }
  .breakdown-row { gap: 0.75rem; }
  .hform-grid { grid-template-columns: 1fr; }
  .type-toggle { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 360px) {
  .quick-btns { flex-direction: column; }
  .quick-btn  { text-align: center; }
  .pill-row   { gap: 4px; }
  .pill-btn   { padding: 5px 10px; font-size: 0.78rem; }
}
