  :root {
    --bg: #eef6f1;
    --panel: #fbfefc;
    --card: #ffffff;
    --soft: #e3f2ea;
    --soft-2: #d5eadf;
    --primary: #3fae84;
    --primary-dark: #2f946f;
    --primary-text: #1f5f52;
    --accent: #bfe3d0;
    --mint: #d8f0e3;
    --blue: #dfeaf7;
    --text: #1f2d28;
    --muted: #566660;
    --border: #cfe8da;
    --success: #3fae84;
    --shadow: 0 18px 40px rgba(31, 95, 82, 0.08);
    color-scheme: light;
  }

  html[data-theme="dark"] {
    --bg: #121a17;
    --panel: #1a2420;
    --card: #202c27;
    --soft: #2a3a33;
    --soft-2: #324539;
    --primary: #3fae84;
    --primary-dark: #2f946f;
    --primary-text: #9fd8c0;
    --accent: #38564a;
    --mint: #24382f;
    --blue: #223249;
    --text: #e6f2ec;
    --muted: #a9bdb4;
    --border: #38564a;
    --success: #5ec79e;
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }

  html[data-theme="dark"] body { background: linear-gradient(180deg, #101714 0%, #17211d 100%); }
  html[data-theme="dark"] .topbar,
  html[data-theme="dark"] .panel { background: rgba(26, 36, 32, 0.86); }
  html[data-theme="dark"] input,
  html[data-theme="dark"] select,
  html[data-theme="dark"] textarea { background: #16201c; color: var(--text); border-color: var(--border); }
  html[data-theme="dark"] input::placeholder,
  html[data-theme="dark"] textarea::placeholder { color: #8aa196; }
  html[data-theme="dark"] .segment.active,
  html[data-theme="dark"] .check-item,
  html[data-theme="dark"] .tag,
  html[data-theme="dark"] .download-btn,
  html[data-theme="dark"] .history-panel { background: var(--card); color: var(--text); }
  html[data-theme="dark"] .chip { background: var(--soft); color: var(--muted); }
  html[data-theme="dark"] .chip.active { color: #fff; }
  html[data-theme="dark"] .btn.secondary { background: var(--soft); color: var(--text); }
  html[data-theme="dark"] .slider { background: #3d544a; }
  html[data-theme="dark"] .inline-box,
  html[data-theme="dark"] .preview-box,
  html[data-theme="dark"] .preview-empty { background: var(--card); border-color: var(--border); }
  html[data-theme="dark"] .document-shell { background: #141c19; }
  html[data-theme="dark"] #generationErrorBanner { background: #3a1f1d !important; color: #ffd1ca !important; border-color: #6d3a35 !important; }
  /* The printable document keeps its own warm palette in both themes. */
  .document-sheet, html[data-theme="dark"] .document-sheet {
    --text: #2d2a2d; --muted: #6a5e5b; --border: #eaded0; --soft: #f2e9df; --card: #ffffff;
    --primary-text: #8d6852; color: #1d2329; background: white;
  }

  .document-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
  .document-tabs[hidden] { display: none; }
  .doc-tab {
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    border-radius: 10px 10px 0 0;
    padding: 8px 12px;
    font-weight: 700;
    cursor: pointer;
  }
  .doc-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
  .download-zip { background: var(--primary); color: #fff; border-color: var(--primary); }

  .summary-section {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--soft);
    color: var(--text);
  }
  .summary-section strong { display: block; margin-bottom: 6px; color: var(--primary-text); }
  .summary-section .summary-items { display: grid; gap: 4px; font-size: 0.92rem; line-height: 1.5; color: var(--text); }
  .summary-section .summary-items div { overflow-wrap: anywhere; }

  .generation-loader {
    margin-top: 18px;
    padding: 18px;
    border: 1px dashed var(--primary);
    border-radius: 16px;
    background: var(--card);
    color: var(--text);
    text-align: center;
    display: grid;
    gap: 8px;
    justify-items: center;
  }
  .generation-loader[hidden] { display: none; }
  .loader-stage { display: flex; align-items: flex-end; gap: 10px; height: 64px; }
  .loader-block { width: 22px; height: 22px; border-radius: 5px; animation: loaderSpin 1.6s linear infinite; }
  .loader-block.b1 { background: #e57373; }
  .loader-block.b2 { background: #64b5f6; border-radius: 50%; animation-delay: -0.5s; }
  .loader-block.b3 { background: #ffd54f; animation-delay: -1s; }
  .loader-bear { font-size: 44px; line-height: 1; animation: loaderBounce 0.9s ease-in-out infinite; }
  .loader-pencil { font-size: 30px; display: inline-block; transform-origin: bottom left; animation: loaderDraw 1.2s ease-in-out infinite; }
  @keyframes loaderBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-18px); } }
  @keyframes loaderSpin { to { transform: rotate(360deg); } }
  @keyframes loaderDraw { 0%, 100% { transform: rotate(-12deg); } 50% { transform: rotate(14deg) translateX(6px); } }
  @media (prefers-reduced-motion: reduce) {
    .loader-block, .loader-bear, .loader-pencil { animation: none; }
  }

  html[data-theme="dark"] .doc-tab { background: var(--card); color: var(--text); }
  html[data-theme="dark"] .doc-tab.active { background: var(--primary); color: #fff; }
  html[data-theme="dark"] .summary-section,
  html[data-theme="dark"] .generation-loader { background: var(--card); color: var(--text); border-color: var(--border); }
  html[data-theme="dark"] .inline-box h3,
  html[data-theme="dark"] .subhead { color: var(--text); }
  html[data-theme="dark"] .document-shell { border-color: var(--border); }

  .theme-toggle {
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 700;
    cursor: pointer;
    order: 4;
  }

  .advanced-settings {
    grid-column: 1 / -1;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--card);
    overflow: hidden;
  }
  .advanced-settings > summary {
    cursor: pointer;
    list-style: none;
    padding: 14px 18px;
    font-weight: 800;
    color: var(--primary-text);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .advanced-settings > summary::-webkit-details-marker { display: none; }
  .advanced-settings > summary .summary-hint { flex: 1; margin: 0 10px 0 8px; font-weight: 400; font-size: 0.82rem; color: var(--muted); opacity: 0.8; }
  .advanced-settings > summary::after { content: '▾'; transition: transform 0.2s ease; }
  .advanced-settings[open] > summary::after { transform: rotate(180deg); }
  .advanced-body { display: grid; gap: 16px; padding: 4px 18px 18px; }
  .field-hint { display: block; margin-top: 6px; font-size: 0.82rem; color: var(--muted); line-height: 1.4; }

  * { box-sizing: border-box; }

  html, body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(180deg, #eaf5ef 0%, #f6fbf8 100%);
    color: var(--text);
  }

  body {
    min-height: 100vh;
    padding: 32px 18px;
  }

  .page {
    max-width: 1440px;
    margin: 0 auto;
  }

  .topbar {
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(207, 232, 218, 0.95);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    box-shadow: var(--shadow);
  }

  .brand {
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 700;
    letter-spacing: 0.01em;
  }

  .brand-mark { width: 42px; height: 42px; flex: none; }
  .brand-text { font-size: 22px; font-weight: 500; color: var(--text); }
  .brand-text strong { font-weight: 800; color: #2f946f; }

  .app {
    margin-top: 24px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .main-form-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
  }

  .preview {
    grid-column: 1 / -1;
    width: 100%;
    order: 3;
  }

  .panel {
    background: rgba(255,255,255,0.72);
    border: 1px solid var(--border);
    border-radius: 28px;
    box-shadow: var(--shadow);
  }

  .wizard {
    padding: 22px 18px;
  }

  .wizard-header {
    margin: 0 0 20px;
    font-size: 14px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
  }

  .wizard-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .wizard-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 12px;
    border-radius: 18px;
    color: var(--muted);
    border: 1px solid transparent;
    background: transparent;
    transition: 0.2s ease;
  }

  .wizard-item.active {
    background: linear-gradient(135deg, rgba(63,174,132,0.12), rgba(191,227,208,0.25));
    border-color: rgba(63,174,132,0.22);
    color: var(--text);
  }

  .wizard-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--soft);
    color: var(--primary-text);
    font-weight: 700;
    font-size: 14px;
  }

  .wizard-item.active .wizard-number {
    background: var(--primary);
    color: white;
  }

  .content {
    padding: 24px;
  }

  .step-panel {
    display: none;
    animation: fadeIn 0.25s ease;
  }

  .step-panel.active {
    display: block;
  }

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

  h1, h2, h3, p {
    margin-top: 0;
  }

  h2 {
    font-size: clamp(1.6rem, 2vw, 2.2rem);
    margin-bottom: 10px;
  }

  .subhead {
    color: var(--muted);
    margin-bottom: 22px;
    line-height: 1.6;
  }

  .field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .field {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .field.full {
    grid-column: 1 / -1;
  }

  label {
    font-size: 0.95rem;
    color: var(--muted);
    font-weight: 600;
  }

  input, select, textarea {
    width: 100%;
    background: rgba(255,255,255,0.9);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 14px;
    padding: 14px 16px;
    font: inherit;
  }

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

  .segmented {
    display: inline-flex;
    background: var(--soft);
    border-radius: 16px;
    padding: 6px;
    width: 100%;
    gap: 6px;
  }

  .segment {
    flex: 1 1 0;
    border: none;
    background: transparent;
    padding: 12px 10px;
    border-radius: 12px;
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
  }

  .segment.active {
    background: white;
    color: var(--text);
    box-shadow: 0 6px 16px rgba(31,95,82,0.08);
  }

  .weekly-settings-panel {
    margin-top: 12px;
    padding: 14px 16px;
    border: 1px solid rgba(78,137,100,0.4);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(123,173,136,0.12), rgba(168,210,187,0.16));
    display: grid;
    gap: 12px;
    animation: weeklyPanelIn 0.25s ease-out;
  }
  .weekly-settings-panel[hidden] { display: none; }
  .weekly-days-label { font-weight: 600; }
  .day-picker { display: flex; flex-wrap: wrap; gap: 8px; }
  .day-chip {
    border: 1px solid var(--border);
    background: var(--soft);
    color: var(--muted);
    border-radius: 999px;
    padding: 9px 16px;
    min-height: 40px;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  .day-chip:hover { border-color: var(--primary); }
  .day-chip.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #ffffff;
    border-color: var(--primary-text);
    box-shadow: 0 8px 14px rgba(47, 148, 111, 0.2);
  }
  .day-chip:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
  .field-hint.field-warning { color: #b3261e; font-weight: 700; }
  @keyframes weeklyPanelIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .focus-area-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .focus-area-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  }
  .focus-area-card:has(input[type="checkbox"]:checked) {
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 6%, var(--card));
  }
  .focus-area-card .check-item {
    padding: 0;
    min-height: unset;
    border: none;
    background: transparent;
  }
  .focus-area-day-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--border);
    animation: focusDayRowIn 0.2s ease-out;
  }
  .focus-area-day-row[hidden] {
    display: none !important;
  }
  .focus-area-day-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
  }
  .focus-area-day-select {
    flex: 1;
    min-height: 38px;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--text);
    font: inherit;
    font-size: 0.88rem;
    cursor: pointer;
  }
  @keyframes focusDayRowIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
  }
  @media (max-width: 640px) {
    .focus-area-grid {
      grid-template-columns: 1fr;
    }
  }

  .document-sheet .document-day-sheet {
    break-before: auto;
    page-break-before: auto;
    break-inside: auto;
    page-break-inside: auto;
  }

  .check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 8px;
  }

  .check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text);
  }

  .check-item input {
    width: 18px;
    height: 18px;
  }

  input[type="range"] {
    accent-color: var(--primary);
    padding: 0;
    border: none;
    background: transparent;
  }

  .toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: linear-gradient(135deg, rgba(223,238,230,0.7), rgba(223,234,247,0.7));
    border-radius: 18px;
    padding: 16px 18px;
    border: 1px solid rgba(122,169,131,0.2);
  }

  .switch {
    position: relative;
    width: 64px;
    height: 36px;
  }

  .switch input {
    opacity: 0;
    width: 0;
    height: 0;
  }

  .slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #cfe0d6;
    border-radius: 999px;
    transition: 0.2s ease;
  }

  .slider:before {
    content: "";
    position: absolute;
    width: 28px;
    height: 28px;
    left: 4px;
    top: 4px;
    background: white;
    border-radius: 50%;
    transition: 0.2s ease;
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  }

  .switch input:checked + .slider {
    background: linear-gradient(135deg, var(--success), #8fd0a3);
  }

  .switch input:checked + .slider:before {
    transform: translateX(28px);
  }

  .inline-box {
    margin-top: 20px;
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(242,233,223,0.6));
    border: 1px solid var(--border);
  }

  .inline-box h3 {
    font-size: 1.05rem;
    margin-bottom: 12px;
  }

  .mini-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .tag {
    padding: 8px 12px;
    border-radius: 999px;
    background: white;
    border: 1px solid var(--border);
    color: var(--muted);
  }

  .footer-actions {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
  }

  .btn {
    border: none;
    border-radius: 16px;
    padding: 14px 18px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
  }

  .btn:hover {
    transform: translateY(-1px);
  }

  .btn.secondary {
    background: #e7f4ec;
    color: var(--text);
  }

  .btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 12px 18px rgba(47,148,111,0.22);
  }

  .preview {
    padding: 20px 18px;
  }

  .preview-box {
    background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(247,243,238,0.9));
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 18px;
  }

  .coupon-row { margin: 10px 0 4px; }
  .coupon-controls { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
  .coupon-controls input { flex: 1 1 180px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); color: var(--text); font: inherit; text-transform: uppercase; }
  .coupon-controls button { min-height: 44px; }
  .coupon-status { margin-top: 6px; font-size: 14px; color: var(--muted); line-height: 1.5; }
  .coupon-status:empty { display: none; }

  .panel.preview[hidden] { display: none !important; }
  .preview-hidden {
    opacity: 0.8;
    filter: grayscale(0.05);
  }

  .preview-empty {
    min-height: 420px;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(255,255,255,0.7), rgba(244,239,234,0.8));
    border: 1px dashed var(--border);
    border-radius: 22px;
    color: var(--muted);
    text-align: center;
    padding: 26px;
  }

  .preview-empty strong {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-size: 1.1rem;
  }

  .preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
  }

  .preview-header h3 {
    margin: 0;
    font-size: 1.05rem;
  }

  .status-pill {
    background: rgba(122,169,131,0.12);
    color: var(--success);
    border-radius: 999px;
    padding: 8px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .document-shell {
    background: #eef3f0;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 0;
  }

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

  .document-sheet {
    width: 210mm;
    min-height: 297mm;
    max-width: 100%;
    height: auto;
    padding: var(--doc-margin);
    background: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    box-sizing: border-box;
    color: #1d2329;
    font-family: Arial, Helvetica, sans-serif;
  }

  /* Az előnézet és az export azonos szövegbeállítást használ, hogy a tördelés mindenhol egyezzen. */
  .document-sheet,
  .document-sheet * {
    hyphens: manual;
    -webkit-hyphens: manual;
    text-rendering: optimizeSpeed;
  }

  @page {
    size: A4;
    margin: 0;
  }

  .document-sheet .doc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: var(--doc-title-after);
  }

  .document-sheet .doc-header h2 {
    margin: 0;
    font-size: var(--doc-title-pt);
    line-height: var(--doc-lh-body);
    color: #000000;
  }

  .document-sheet .doc-meta {
    display: none;
  }

  /* Az előnézet méretei a közös DOC_LAYOUT-ból jönnek (tervezo-core.js, --doc-* változók): ugyanezekkel dolgozik a PDF és a DOCX is. */
  .document-sheet .doc-section {
    margin-bottom: 0;
  }

  .document-sheet .doc-section h3 {
    margin: var(--doc-heading-before) 0 var(--doc-heading-after);
    font-size: var(--doc-heading-pt);
    line-height: var(--doc-lh-body);
    color: #000000;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .document-sheet .doc-section p,
  .document-sheet .doc-section li {
    color: #000000;
    line-height: var(--doc-lh-body);
    margin: 0 0 var(--doc-par-after);
    font-size: var(--doc-body-pt);
  }

  .document-sheet .doc-section p {
    orphans: 2;
    widows: 2;
  }

  .document-sheet .official-meta {
    display: grid;
    grid-template-columns: var(--doc-meta-label) 1fr;
    gap: 0;
    border: var(--doc-border) solid #000000;
    border-radius: 0;
    padding: 0;
    margin-bottom: var(--doc-block-gap);
    background: transparent;
    font-size: var(--doc-meta-pt);
    line-height: var(--doc-lh-meta);
  }

  .document-sheet .meta-row {
    display: contents;
  }

  .document-sheet .meta-label,
  .document-sheet .meta-value {
    padding: var(--doc-meta-pad-y) var(--doc-meta-pad-x);
    border-bottom: var(--doc-border) solid #000000;
    color: #000000;
    overflow-wrap: anywhere;
    min-width: 0;
  }

  .document-sheet .meta-label {
    font-weight: 700;
    border-right: var(--doc-border) solid #000000;
  }

  .document-sheet .meta-row:last-child .meta-label,
  .document-sheet .meta-row:last-child .meta-value { border-bottom: 0; }

  .document-sheet .official-table {
    width: 100%;
    border-collapse: collapse;
    border: var(--doc-border) solid #000000;
    font-size: var(--doc-table-pt);
    table-layout: fixed;
    background: transparent;
    margin-bottom: var(--doc-block-gap);
  }

  .document-sheet .official-table th,
  .document-sheet .official-table td {
    border: var(--doc-border) solid #000000;
    vertical-align: top;
    padding: var(--doc-pad-y) var(--doc-pad-x);
    text-align: left;
    color: #000000;
    background: transparent;
    background-color: transparent;
    overflow-wrap: anywhere;
    line-height: var(--doc-lh-table);
    break-inside: auto;
    page-break-inside: auto;
  }

  /* Táblázatsor lapközben csak akkor törik, ha nem fér el egyben (a DOCX-ben cantSplit, a PDF-ben dontBreakRows). */
  .document-sheet .official-table tr {
    background: transparent;
    background-color: transparent;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .document-sheet .official-table th {
    background: transparent;
    background-color: transparent;
    font-weight: 700;
    color: #000000;
  }

  .document-sheet .doc-table-section,
  .document-sheet .official-table {
    break-inside: auto;
    page-break-inside: auto;
  }

  .document-sheet .official-table thead {
    display: table-header-group;
  }

  .document-sheet h2,
  .document-sheet h3,
  .document-sheet .doc-meta-block,
  .document-sheet .official-meta {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .document-sheet h2,
  .document-sheet h3 {
    break-after: avoid;
    page-break-after: avoid;
  }

  .document-sheet {
    word-break: normal;
    overflow-wrap: break-word;
  }

  .document-sheet[data-orientation="landscape"] {
    width: 297mm;
    min-height: 210mm;
  }

  .document-sheet .official-table p {
    font-size: inherit;
    line-height: inherit;
    margin: 0 0 var(--doc-cell-par-after);
    orphans: 2;
    widows: 2;
  }

  .document-sheet .doc-section ul,
  .document-sheet .doc-section ol {
    margin: 0 0 0 18px;
    padding: 0;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .document-sheet .doc-section strong {
    color: #000000;
  }

  .download-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
  }

  .download-btn {
    border: 1px solid var(--border);
    background: white;
    padding: 12px 10px;
    border-radius: 14px;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
  }

  .quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .chip {
    border: 1px solid var(--border);
    background: var(--soft);
    color: var(--muted);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .chip.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #ffffff;
    border-color: var(--primary-text);
    box-shadow: 0 10px 16px rgba(47, 148, 111, 0.2);
  }

  .history-panel {
    display: none;
    margin-top: 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 6px 24px rgba(31, 95, 82, 0.08);
  }

  .history-panel.open {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .history-item-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
  }

  .history-item-card:hover {
    border-color: var(--primary);
  }

  .history-item-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
  }

  .history-item-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  .history-item-title {
    font-size: 1rem;
    color: var(--text);
  }

  .history-item-type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--soft);
    color: var(--muted);
  }

  .history-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  .history-item-date {
    font-size: 0.82rem;
    color: var(--muted);
  }

  .history-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
  }

  .history-badge-paid {
    background: #dff0e3;
    color: #1f6b32;
    border: 1px solid #7bc594;
  }

  .history-badge-draft {
    background: var(--soft);
    color: var(--muted);
    border: 1px solid var(--border);
  }

  .history-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 6px;
    border-top: 1px solid var(--border);
  }

  .btn-history {
    padding: 7px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
  }

  .btn-history:hover {
    border-color: var(--primary);
    background: var(--soft);
  }

  .btn-history-load {
    background: #e7f4ec;
    color: var(--primary-dark, #2f946f);
    border-color: #c0e3d0;
  }

  .btn-history-download {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary-dark);
  }

  .btn-history-download:hover {
    background: var(--primary-dark);
    color: #ffffff;
  }

  .btn-history-attach {
    background: var(--soft);
  }

  .btn-history-delete {
    color: #b3261e;
    margin-left: auto;
  }

  .btn-history-delete:hover {
    background: #fdf2f2;
    border-color: #f5c2c2;
  }

  /* Csatolt előzmény információs sáv */
  .attached-plan-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 14px;
    padding: 12px 16px;
    border: 1.5px solid var(--primary);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(63, 174, 132, 0.14), rgba(255, 255, 255, 0.95));
    box-shadow: 0 4px 14px rgba(47, 148, 111, 0.08);
  }

  .attached-plan-banner[hidden] {
    display: none !important;
  }

  .attached-plan-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
    flex-wrap: wrap;
  }

  .attached-plan-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--primary);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
  }

  .attached-plan-text {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
  }

  .attached-plan-remove {
    background: transparent;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 8px;
    transition: color 0.15s ease, background 0.15s ease;
  }

  .attached-plan-remove:hover {
    color: #b3261e;
    background: rgba(179, 38, 30, 0.08);
  }

  /* Cloudflare Turnstile widget */
  .turnstile-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 14px 0 10px;
    min-height: 65px;
  }

  .modal-box.turnstile-box { width: min(400px, 100%); text-align: center; }
  .modal-box.turnstile-box h2 { margin-right: 0; }
  .modal-box.turnstile-box .modal-actions { justify-content: center; }
  .modal-box.turnstile-box .modal-error[hidden] { display: none; }

  .history-item {
    width: 100%;
    text-align: left;
    margin-top: 8px;
    background: var(--soft);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer;
    color: var(--text);
  }

  @media (max-width: 1100px) {
    .main-form-layout {
      grid-template-columns: 1fr;
    }

    .wizard {
      order: 2;
    }

    .content {
      order: 1;
    }

    .preview {
      order: 3;
      grid-column: auto;
    }
  }

  @media (max-width: 768px) {
    .document-sheet {
      width: 100%;
      max-width: 100%;
      min-height: auto;
      height: auto;
      padding: 16mm;
    }
  }

  @media (max-width: 640px) {
    body {
      padding: 20px 12px;
    }

    .field-grid,
    .check-grid,
    .download-row {
      grid-template-columns: 1fr;
    }

    .topbar {
      flex-direction: column;
      align-items: flex-start;
      gap: 12px;
    }

    .footer-actions {
      flex-direction: column-reverse;
    }

    .btn {
      width: 100%;
    }
  }

  /* ===== Letisztult, érintésbarát megjelenés (csak képernyőn) ===== */
  @media screen {
    html[data-theme="dark"] {
      --bg: #121a17;
      --panel: #1a2420;
      --card: #202c27;
      --soft: #2a3a33;
      --soft-2: #324539;
      --text: #e6f2ec;
      --muted: #a9bdb4;
      --border: #38564a;
    }

    body { font-size: 16px; line-height: 1.6; }

    .app { align-items: start; }

    .wizard { position: sticky; top: 24px; align-self: start; }

    .wizard-progress { display: none; }

    .wizard-item { min-height: 52px; font-size: 1rem; cursor: pointer; }
    .wizard-item:hover { background: var(--soft); }

    .content .inline-box {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 22px;
      padding: 20px;
      box-shadow: 0 6px 18px rgba(31, 95, 82, 0.06);
    }
    .content .inline-box:nth-of-type(3n+1) { background: color-mix(in srgb, var(--mint) 45%, var(--card)); }
    .content .inline-box:nth-of-type(3n+2) { background: color-mix(in srgb, var(--blue) 45%, var(--card)); }

    label { font-size: 1rem; font-weight: 700; color: var(--text); }
    .field-hint, .subhead { font-size: 0.95rem; line-height: 1.6; }

    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
    select {
      min-height: 48px;
      border-radius: 14px;
      font-size: 1rem;
      line-height: 1.4;
    }
    textarea { min-height: 120px; border-radius: 14px; font-size: 1rem; line-height: 1.6; }
    input, select, textarea { transition: border-color 0.2s ease, box-shadow 0.2s ease; }
    input:focus, select:focus, textarea:focus {
      outline: none;
      border-color: var(--primary);
      box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 25%, transparent);
    }
    input::placeholder, textarea::placeholder { color: #82968c; opacity: 1; }
    html[data-theme="dark"] input,
    html[data-theme="dark"] select,
    html[data-theme="dark"] textarea { background: var(--card); color: var(--text); }
    input[type="range"] { min-height: 32px; accent-color: var(--primary); }

    .check-item {
      min-height: 52px;
      padding: 12px 16px;
      font-size: 1rem;
      font-weight: 600;
      cursor: pointer;
      gap: 12px;
    }
    .check-item input[type="checkbox"],
    .toggle-row input[type="checkbox"]:not(.switch input) {
      width: 22px; height: 22px; min-height: 0; flex: none; accent-color: var(--primary);
    }
    .check-item:has(input:checked) {
      border-color: var(--primary);
      background: color-mix(in srgb, var(--primary) 14%, var(--card));
    }
    .toggle-row { min-height: 56px; }

    .segment { min-height: 48px; font-size: 1rem; }
    .chip, .doc-tab { min-height: 44px; font-size: 1rem; cursor: pointer; }

    .btn { min-height: 52px; font-size: 1rem; padding: 14px 24px; }
    .btn.secondary {
      background: transparent;
      border: 1px solid var(--border);
      color: var(--muted);
      box-shadow: none;
    }
    .btn.secondary:hover { background: var(--soft); color: var(--text); }
    .download-btn {
      min-height: 48px;
      background: transparent;
      border: 1px solid var(--border);
      color: var(--text);
      box-shadow: none;
    }
    .download-btn:hover { background: var(--soft); }
    .download-btn.download-zip { background: var(--primary); border-color: var(--primary); color: #fff; }

    .document-shell {
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      background: var(--soft);
      border: 1px solid var(--border);
      border-radius: 20px;
      padding: 14px;
    }
    .document-shell .document-sheet { margin: 0 auto; }
  }

  @media screen and (max-width: 768px) {
    body { padding: 0 12px 24px; }
    .topbar { margin-top: 12px; }
    .app { margin-top: 12px; gap: 14px; }
    .content { padding: 16px; }

    .wizard {
      position: sticky;
      top: 0;
      z-index: 30;
      order: 0;
      padding: 10px 14px;
      border-radius: 0 0 20px 20px;
      margin: 0 -12px;
      background: var(--panel);
    }
    .wizard-header { display: none; }
    .wizard-progress {
      display: flex;
      flex-direction: column;
      gap: 8px;
      width: 100%;
      min-height: 48px;
      background: transparent;
      border: none;
      padding: 4px 0;
      font: inherit;
      font-weight: 700;
      color: var(--text);
      text-align: left;
      cursor: pointer;
    }
    .wizard-progress-text { display: flex; justify-content: space-between; align-items: center; }
    .wizard-progress-text::after { content: "▾"; color: var(--muted); transition: transform 0.2s ease; }
    .wizard.open .wizard-progress-text::after { transform: rotate(180deg); }
    .wizard-progress-track { height: 6px; border-radius: 999px; background: var(--soft-2); overflow: hidden; }
    .wizard-progress-bar { height: 100%; width: 25%; background: var(--primary); border-radius: 999px; transition: width 0.3s ease; }
    .wizard-list { display: none; margin-top: 8px; gap: 6px; }
    .wizard.open .wizard-list { display: flex; }

    .content { order: 1; }

    .document-shell { padding: 8px; border-radius: 16px; }
     #documentTabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  }

  /* ===== Valós A4-es lapszimuláció az előnézetben ===== */
  @media screen {
    .document-shell {
      background: #d3e0d9;
      padding: 24px;
      max-height: 80vh;
      overflow: auto;
    }
    html[data-theme="dark"] .document-shell { background: #1a1614; }

    #resultDocument.document-sheet,
    .document-sheet.a4-host.a4-host {
      width: max-content;
      max-width: none;
      min-width: 100%;
      min-height: 0;
      padding: 0;
      margin: 0 auto;
      background: transparent;
      box-shadow: none;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 28px;
    }

    .a4-page {
      flex: none;
      margin: 0 auto;
      box-sizing: border-box;
      width: 210mm;
      min-height: 297mm;
      padding: var(--doc-margin);
      background: #fff;
      color: #1d2329;
      box-shadow: 0 8px 28px rgba(40, 30, 20, 0.22);
      overflow-wrap: break-word;
      word-break: normal;
    }
    .a4-page-body { display: flow-root; }

    .a4-host[data-orientation="landscape"] .a4-page { width: 297mm; min-height: 210mm; }
  }

  .a4-page { break-after: page; page-break-after: always; }
  .a4-page:last-child { break-after: auto; page-break-after: auto; }

  /* ===== Fizetési kapu, modálisok, lábléc ===== */
  .paywall-gate { position: relative; margin-top: 14px; padding: 22px 18px; border: 1px solid var(--border); border-radius: 18px; background: var(--soft); text-align: center; break-inside: avoid; }
  .paywall-gate p { margin: 8px 0 14px; color: var(--muted); }
  .download-btn[disabled] { opacity: .45; cursor: not-allowed; }
  .modal-backdrop { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(30, 24, 20, .55); }
  .modal-backdrop.open { display: flex; }
  .modal-box { width: min(560px, 100%); max-height: 88vh; overflow: auto; padding: 22px; border-radius: 20px; background: var(--card); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow); }
  .modal-box { position: relative; }
  .modal-box h2 { margin: 0 36px 10px 0; font-size: 20px; }
  .modal-box h3 { margin: 14px 0 4px; font-size: 16px; }
  .modal-box ul, .modal-box ol { margin: 6px 0; padding-left: 20px; line-height: 1.55; }
  .modal-box p { line-height: 1.55; }
  .modal-box p { margin: 4px 0; line-height: 1.6; }
  .modal-x { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--soft); color: var(--text); font-size: 26px; line-height: 1; cursor: pointer; }
  .modal-box label.consent { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; font-size: 15px; }
  .modal-box input[type="email"], .modal-box input.billing-input { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); color: var(--text); font: inherit; }
  .modal-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
  .modal-actions button { min-height: 48px; padding: 10px 18px; border-radius: 14px; border: 1px solid var(--border); background: var(--soft); color: var(--text); font-weight: 600; cursor: pointer; }
  .modal-actions button.primary { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
  .modal-note { padding: 10px 12px; border-radius: 12px; background: var(--soft); color: var(--muted); font-size: 14px; }
  .btn.is-busy, .btn.is-busy:disabled { opacity: .6; cursor: progress; filter: grayscale(.4); }
  /* Fogadóoldal: menta/pasztell kártyák, az e-mail sablonnal azonos arculat */
  .landing { margin: 8px 0 28px; display: grid; gap: 22px; }
  .landing-hero { background: linear-gradient(135deg, #d8f0e3, #eef6f1); border: 1px solid #cfe8da; border-radius: 24px; padding: 40px 28px; text-align: center; color: #1f3d34; }
  .landing-hero h1 { margin: 0 0 12px; font-size: clamp(26px, 5vw, 40px); line-height: 1.2; color: #1f5f52; }
  .landing-hero p { margin: 0 auto 22px; max-width: 640px; font-size: 18px; line-height: 1.6; }
  .landing-cta { display: inline-block; min-height: 48px; padding: 14px 30px; border-radius: 999px; background: #3fae84; color: #fff; font-weight: 700; font-size: 17px; text-decoration: none; }
  .landing-cta:hover, .landing-cta:focus-visible { background: #2f946f; }
  .landing-hero-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; }
  .landing-action-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin: 0; }
  .landing-secondary-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 24px;
    border-radius: 999px;
    border: 1.5px solid var(--primary);
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-dark, #2f946f);
    font: inherit;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
  }
  .landing-secondary-cta:hover, .landing-secondary-cta:focus-visible {
    background: var(--primary);
    color: #ffffff;
    transform: translateY(-1px);
  }

  .landing-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .landing-card { background: var(--panel); border: 1px solid #cfe8da; border-radius: 20px; padding: 20px; text-align: center; }
  .landing-card .step-num { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: #d8f0e3; color: #1f5f52; font-weight: 700; margin-bottom: 8px; }
  .landing-card h3 { margin: 0 0 6px; font-size: 18px; color: #1f5f52; }
  .landing-card p { margin: 0; color: var(--muted, #5b6b64); line-height: 1.5; }
  .landing-card .price { font-size: 28px; font-weight: 700; color: #2f946f; margin: 4px 0; }
  .landing h2 { margin: 0; text-align: center; font-size: 22px; color: #1f5f52; }
  .landing-note { text-align: center; font-size: 13px; color: var(--muted, #5b6b64); margin: 0; }

  @media (max-width: 768px) { .landing-steps { grid-template-columns: 1fr; } .landing-hero { padding: 28px 18px; } }
  .footer-note { font-size: 12px; opacity: .8; }
  .unlock-cta { min-height: 48px; padding: 12px 22px; border: 0; border-radius: 14px; background: var(--primary-dark); color: #fff; font-weight: 700; font-size: 16px; cursor: pointer; }
  .unlock-cta[hidden], .unlocked-badge[hidden] { display: none; }
  .preview-actionbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0; }
  .unlocked-badge { padding: 10px 16px; border-radius: 14px; background: #dff0e3; color: #1f6b32; font-weight: 700; }

  .preview-actionbar .lock-note { flex-basis: 100%; margin: 0; }

  .lock-note { margin-left: 6px; color: var(--muted); font-size: 13px; }
  .modal-error { color: #c0392b; font-size: 14px; margin-top: 8px; }
  .seo-content { max-width: 1280px; margin: 28px auto 0; padding: 0 18px; color: var(--muted); line-height: 1.65; }
  .seo-content h2 { font-size: 22px; margin: 26px 0 12px; text-align: center; color: #1f5f52; }
  .seo-content .benefit-grid { margin-bottom: 8px; }
  .seo-content .benefit-grid .landing-card { text-align: left; }

  .seo-content .seo-cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
  .seo-content .seo-cards li { padding: 12px 14px; border: 1px solid #cfe8da; border-radius: 20px; background: var(--panel); text-align: center; color: var(--text); }

  /* Visszajelzések és vélemények szekció */
  .reviews-summary-card { background: var(--panel); border: 1px solid #cfe8da; border-radius: 20px; padding: 22px 20px; text-align: center; max-width: 520px; margin: 16px auto 24px; box-shadow: 0 4px 20px rgba(31, 95, 82, 0.05); }

  .reviews-summary-score { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
  .reviews-rating-number { font-size: 36px; font-weight: 800; color: #1f5f52; line-height: 1; }

  .reviews-stars { display: inline-flex; align-items: center; gap: 3px; color: #f59e0b; }
  .star-icon { width: 17px; height: 17px; fill: #f59e0b; display: inline-block; flex-shrink: 0; }
  .reviews-summary-score .star-icon { width: 22px; height: 22px; }
  .reviews-summary-sub { margin: 8px 0 10px; font-size: 15px; font-weight: 600; color: var(--muted); }
  .reviews-verified-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 999px; background: var(--soft); border: 1px solid var(--border); color: #2f946f; font-weight: 600; font-size: 13px; }
  .reviews-verified-badge .verified-check { width: 16px; height: 16px; flex-shrink: 0; fill: currentColor; }

  .reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 20px 0 32px; }
  @media (max-width: 900px) { .reviews-grid { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 600px) { .reviews-grid { grid-template-columns: 1fr; } }

  .review-card { background: var(--panel); border: 1px solid #cfe8da; border-radius: 18px; padding: 20px; display: flex; flex-direction: column; text-align: left; box-shadow: 0 4px 18px rgba(31, 95, 82, 0.04); }

  .review-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
  .review-avatar { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0; letter-spacing: .02em; }
  .avatar-1 { background: #d8f0e3; color: #1f5f52; }
  .avatar-2 { background: #d2f2ea; color: #185b50; }
  .avatar-3 { background: #e2edd8; color: #325424; }
  .avatar-4 { background: #d4f0f0; color: #175357; }
  .avatar-5 { background: #e5f0dc; color: #355325; }
  .avatar-6 { background: #daf2e8; color: #1c5946; }

  .review-meta { display: flex; flex-direction: column; min-width: 0; }
  .review-name { font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.3; }
  .review-role-date { font-size: 12.5px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
  .review-card .reviews-stars { margin: 4px 0 10px; }
  .review-text { margin: 0; font-size: 14px; line-height: 1.55; color: var(--text); flex-grow: 1; }

  .seo-content details { border: 1px solid #cfe8da; border-radius: 16px; background: var(--panel); padding: 10px 14px; margin-bottom: 8px; }
  .seo-content summary { cursor: pointer; font-weight: 600; color: var(--text); }
  .site-footer { margin: 28px auto 0; max-width: 1280px; padding: 26px 18px 34px; border-top: 1px solid var(--border); color: var(--muted); font-size: .875rem; line-height: 1.65; }
  .site-footer .footer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 32px; align-items: start; }
  .site-footer .footer-col { display: flex; flex-direction: column; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
  .site-footer .footer-col h3 { margin: 0 0 6px; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text); }
  .site-footer strong { color: var(--text); }
  .site-footer a { color: var(--primary-text); text-decoration: underline; cursor: pointer; }
  .site-footer .footer-links { display: flex; flex-direction: column; gap: 6px; }
  .site-footer .trust-badges { margin-top: 10px; }
  @media (max-width: 900px) { .site-footer .footer-grid { grid-template-columns: 1fr; gap: 14px; } .site-footer .footer-col { padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--soft); } }
  .trust-badges { display: flex; flex-wrap: wrap; gap: 8px; }
  .trust-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--soft); color: var(--muted); font-weight: 600; font-size: 12.5px; }
  .footer-actions .btn[hidden], #nextBtn[hidden] { display: none !important; }
  .modal-box.checkout-box { padding: 26px 24px; }
  .modal-box.checkout-box h2 { font-size: 1.25rem; }
  .modal-box.checkout-box .modal-note { margin: 10px 0; line-height: 1.55; }
  .modal-box.checkout-box label.consent { align-items: flex-start; line-height: 1.5; font-size: .9rem; }
  .modal-box.checkout-box label.consent input { flex: 0 0 auto; width: 20px; height: 20px; margin: 2px 0 0; }
  .modal-box.checkout-box .modal-actions { flex-direction: column-reverse; }
  .modal-box.checkout-box .modal-actions button { width: 100%; }
  .modal-test-strip { padding: 8px 12px; border-radius: 10px; border: 1px dashed var(--border); font-size: .85rem; color: var(--muted); }
  @media screen and (max-width: 768px) {
    .panel.preview, #previewContent { min-width: 0; max-width: 100%; }
    .document-shell { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  }

.restore-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--primary); border-radius: 12px; background: color-mix(in srgb, var(--primary) 12%, transparent); }
.restore-banner[hidden] { display: none; }

/* ===== Értékelő aloldal csillagai ===== */
.interactive-star-group { display: inline-flex; gap: 8px; align-items: center; justify-content: center; }
.interactive-star-group .star-btn {
  background: transparent;
  border: none;
  padding: 6px;
  cursor: pointer;
  line-height: 1;
  border-radius: 8px;
  transition: transform 0.15s ease;
}
.interactive-star-group .star-btn:hover,
.interactive-star-group .star-btn:focus-visible {
  transform: scale(1.18);
  outline: none;
}
.interactive-star-group .star-btn svg {
  width: 40px;
  height: 40px;
  display: block;
}
.interactive-star-group .star-btn.filled svg path {
  fill: #f59e0b;
  stroke: #f59e0b;
}
.interactive-star-group .star-btn.empty svg path {
  fill: transparent;
  stroke: #cbd5e1;
}

/* ===== Fizetés előtti tükör-struktúra és terjedelem-jelző sáv (emoji nélkül) ===== */
.locked-mirror-text {
  color: transparent !important;
  text-shadow: 0 0 7px rgba(100, 116, 139, 0.85);
  filter: blur(2px);
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

.locked-mirror-table {
  border: 1px solid #000000;
  width: 100%;
}

.locked-mirror-table th,
.locked-mirror-table td {
  border: 1px solid #000000 !important;
}

.locked-boundary-card {
  margin: 18px 0 16px;
  padding: 16px 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(63, 174, 132, 0.12), rgba(255, 255, 255, 0.96));
  border: 1.5px solid var(--primary);
  text-align: center;
  box-shadow: 0 4px 14px rgba(47, 148, 111, 0.08);
  break-inside: avoid;
  page-break-inside: avoid;
}

.locked-boundary-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.locked-boundary-text {
  margin: 0 0 12px;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
}

.locked-floating-bar {
  position: sticky;
  top: 14px;
  z-index: 20;
  margin-bottom: 16px;
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--card, #ffffff);
  border: 1.5px solid var(--primary);
  box-shadow: 0 6px 20px rgba(47, 148, 111, 0.16);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.locked-floating-bar[hidden] {
  display: none !important;
}

.locked-floating-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 280px;
}

.locked-floating-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(63, 174, 132, 0.15);
  color: var(--primary-dark, #2f946f);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.locked-floating-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

/* ===== Mintatervezet modál (főoldal) ===== */
.sample-modal-backdrop .modal-box.sample-modal-box {
  width: min(920px, 95vw);
  max-width: 920px;
  max-height: 90vh;
  padding: 24px;
  display: flex;
  flex-direction: column;
  background: var(--card, #ffffff);
  border-radius: 24px;
}

.sample-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.sample-modal-header-titles {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sample-modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--text);
}

.sample-modal-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(63, 174, 132, 0.15);
  color: var(--primary-dark, #2f946f);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sample-modal-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 4px 20px;
  flex-grow: 1;
  -webkit-overflow-scrolling: touch;
}

.sample-document-sheet {
  background: #ffffff;
  color: #000000;
  padding: 32px 36px;
  border: 1px solid #d2ded8;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
  margin: 0 auto;
  max-width: 100%;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
  line-height: 1.6;
}

.sample-document-sheet .doc-header h2 {
  margin: 0 0 16px 0;
  font-size: 1.65rem;
  letter-spacing: 0.02em;
  color: #000000;
  border-bottom: none;
}

.sample-document-sheet .doc-section {
  margin-bottom: 24px;
}

.sample-document-sheet .doc-section h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  color: #000000;
  border-bottom: none;
}

.sample-document-sheet .doc-section p {
  color: #000000;
  line-height: 1.65;
  margin: 0 0 10px;
  font-size: 0.96rem;
}

.sample-document-sheet .official-meta {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 8px 18px;
  border: 1px solid #000000;
  border-radius: 4px;
  padding: 12px 14px;
  background: transparent;
  color: #000000;
}

.sample-document-sheet .meta-row {
  display: contents;
}

.sample-document-sheet .meta-label {
  font-weight: 700;
  color: #000000;
}

.sample-document-sheet .meta-value {
  color: #000000;
}

.sample-document-sheet .official-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #000000;
  font-size: 0.92rem;
  table-layout: fixed;
  background: transparent;
}

.sample-document-sheet .official-table th,
.sample-document-sheet .official-table td {
  border: 1px solid #000000;
  vertical-align: top;
  padding: 10px 8px;
  text-align: left;
  color: #000000;
  background: transparent;
  background-color: transparent;
  overflow-wrap: anywhere;
  hyphens: auto;
  line-height: 1.6;
}

.sample-document-sheet .official-table th {
  font-weight: 700;
  color: #000000;
}

.sample-document-sheet .official-table p {
  margin: 0 0 0.6em;
}

.sample-document-sheet .official-table p:last-child {
  margin-bottom: 0;
}

.sample-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: 10px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .sample-modal-backdrop .modal-box.sample-modal-box {
    width: 100%;
    max-width: 100%;
    height: 96vh;
    max-height: 96vh;
    padding: 16px 12px;
    border-radius: 16px;
  }

  .sample-document-sheet {
    padding: 16px 12px;
  }

  .sample-document-sheet .official-meta {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .sample-document-sheet .meta-label {
    margin-top: 6px;
  }

  .sample-modal-footer {
    justify-content: stretch;
  }

  .sample-modal-footer button,
  .sample-modal-footer a {
    width: 100%;
    text-align: center;
  }
}

/* ===== Sötét mód: komponens-felülírások ===== */
  :root[data-theme="dark"] .brand-text strong { color: #7fd8b4; }
:root[data-theme="dark"] .history-badge-paid {
    background: #1d3626;
    color: #98dfab;
    border-color: #2f6b43;
  }
:root[data-theme="dark"] .btn-history-load {
    background: #1c3327;
    color: #9fd8c0;
    border-color: #2e5942;
  }
:root[data-theme="dark"] .attached-plan-banner {
    background: linear-gradient(135deg, rgba(63, 174, 132, 0.18), rgba(32, 44, 39, 0.95));
  }
:root[data-theme="dark"] .landing-secondary-cta {
    background: var(--card);
    border-color: var(--primary);
    color: #9fd8c0;
  }
:root[data-theme="dark"] .landing-secondary-cta:hover, :root[data-theme="dark"] .landing-secondary-cta:focus-visible {
    background: var(--primary);
    color: #ffffff;
  }
  :root[data-theme="dark"] .landing-hero { background: linear-gradient(135deg, #24382f, #1f2b26); border-color: #38564a; color: #e6f2ec; }
  :root[data-theme="dark"] .landing-hero h1, :root[data-theme="dark"] .landing h2, :root[data-theme="dark"] .landing-card h3 { color: #9fd8c0; }
  :root[data-theme="dark"] .landing-card { border-color: #38564a; }
  html[data-theme="dark"] .unlocked-badge { background: #22382a; color: #a8dcb5; }
  :root[data-theme="dark"] .seo-content h2 { color: #9fd8c0; }
  :root[data-theme="dark"] .seo-content .seo-cards li { border-color: #38564a; }
  :root[data-theme="dark"] .reviews-summary-card { border-color: #38564a; box-shadow: none; }
  :root[data-theme="dark"] .reviews-rating-number { color: #9fd8c0; }
  :root[data-theme="dark"] .reviews-verified-badge { color: #5ec79e; }
  :root[data-theme="dark"] .review-card { border-color: #38564a; box-shadow: none; }
  :root[data-theme="dark"] .avatar-1 { background: #254236; color: #a6ecc9; }
  :root[data-theme="dark"] .avatar-2 { background: #20413b; color: #9be9db; }
  :root[data-theme="dark"] .avatar-3 { background: #2b3e24; color: #c6e8b5; }
  :root[data-theme="dark"] .avatar-4 { background: #203d3f; color: #9ee3e3; }
  :root[data-theme="dark"] .avatar-5 { background: #2e3d23; color: #cae9b4; }
  :root[data-theme="dark"] .avatar-6 { background: #224335; color: #a1edc8; }
:root[data-theme="dark"] .interactive-star-group .star-btn.empty svg path {
  stroke: #4b5563;
}
:root[data-theme="dark"] .locked-boundary-card {
  background: linear-gradient(135deg, rgba(63, 174, 132, 0.16), rgba(32, 44, 39, 0.96));
  border-color: var(--primary);
}
:root[data-theme="dark"] .locked-floating-badge {
  background: rgba(63, 174, 132, 0.25);
  color: #9fd8c0;
}
:root[data-theme="dark"] .sample-modal-badge {
  background: rgba(63, 174, 132, 0.25);
  color: #9fd8c0;
}

/* ===== Korábbi inline stílusok osztályokként ===== */
a.brand { text-decoration: none; color: inherit; }
.official-table col.col-time { width: 10%; }
.official-table col.col-activity { width: 58%; }
.official-table col.col-notes { width: 32%; }
.u-mb-4 { margin-bottom: 4px !important; }
.u-mb-16 { margin-bottom: 16px !important; }
.u-mb-18 { margin-bottom: 18px !important; }
.u-mb-20 { margin-bottom: 20px !important; }
.u-mt-0 { margin-top: 0 !important; }
.u-mt-4 { margin-top: 4px !important; }
.u-mt-8 { margin-top: 8px !important; }
.u-mt-12 { margin-top: 12px !important; }
.u-mt-18 { margin-top: 18px !important; }
.hp-field { position: absolute; left: -9999px; top: -9999px; width: 0; height: 0; overflow: hidden; }
.check-item.check-item-strong { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text); }
.summary-checklist { display: grid; gap: 10px; margin-top: 12px; }
.generation-error-banner { margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: #fdecea; color: #7a1f1f; border: 1px solid #f5c2b8; font-weight: 600; }
.doc-settings-scope { margin: 0 0 10px; }
.fb-main { max-width: 680px; margin: 32px auto 48px; padding: 0 16px; }
.fb-notice { padding: 36px 28px; text-align: center; }
.fb-notice-title { color: #1f5f52; margin: 0 0 14px; font-size: 22px; }
.fb-text { color: var(--muted); line-height: 1.6; margin: 0 0 14px; font-size: 15px; }
.fb-text-small { color: var(--muted); line-height: 1.6; margin: 0 0 24px; font-size: 14px; }
.fb-link-btn { display: inline-block; text-decoration: none; }
.fb-link-plain { text-decoration: none; }
.fb-form { padding: 32px 28px; }
.fb-title { margin: 0 0 10px; font-size: 24px; color: #1f5f52; }
.fb-intro { margin: 0 0 24px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.fb-rating { margin-bottom: 24px; text-align: center; }
.fb-rating-label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px; }
.fb-rating-text { margin-top: 8px; font-size: 15px; font-weight: 700; color: #1f5f52; }
.fb-actions { display: flex; gap: 12px; align-items: center; justify-content: flex-end; }
.fb-success { padding: 40px 24px; text-align: center; }
.fb-success-icon { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background: #d8f0e3; color: #1f5f52; margin-bottom: 18px; }
.fb-success-title { color: #1f5f52; margin: 0 0 12px; font-size: 24px; }
.fb-success-text { color: var(--muted); line-height: 1.6; margin: 0 0 28px; font-size: 15px; max-width: 480px; margin-left: auto; margin-right: auto; }
.history-item-empty { pointer-events: none; opacity: 0.7; }

/* ===== Nyomtatás (egyetlen blokk, az eredeti kaszkád-sorrendben) ===== */
@media print {

    @page {
      size: A4 portrait;
      margin: 0;
    }

    body {
      background: #fff;
      padding: 0;
    }

    .topbar,
    .wizard,
    .content,
    .preview-empty,
    .preview-header,
    .main-form-layout,
    .document-tabs,
    #generationErrorBanner,
    .download-row,
    .footer-actions,
    .btn,
    .chip,
    .history-panel,
    #loadPreviousBtn,
    .quick-actions {
      display: none !important;
    }

    .page {
      width: 100%;
      max-width: none;
      padding: 0;
      margin: 0;
      background: #fff;
    }

    .app {
      display: block;
      width: 100%;
      max-width: none;
      margin: 0 !important;
      grid-template-columns: none;
    }

    .panel.preview,
    .preview-box,
    .document-shell,
    .document-sheet {
      display: block !important;
      width: 100% !important;
      max-width: none !important;
      margin: 0 !important;
      padding: 0 !important;
      border: none !important;
      box-shadow: none !important;
      background: #fff !important;
    }

    .document-sheet {
      min-height: 0;
      page-break-inside: auto;
      break-inside: auto;
    }

    .a4-page {
      min-height: 0 !important;
      box-shadow: none !important;
      margin: 0 !important;
      overflow: hidden;
    }
    #resultDocument { display: block !important; }

    .preview-actionbar, .unlock-cta { display: none !important; }

    .paywall-gate, .site-footer, .modal-backdrop { display: none !important; }

    .locked-floating-bar,
    .locked-boundary-card {
      display: none !important;
    }
}

/* ===== Tervezet típusa: óvodai / oktatási célú ===== */
.plan-mode-block {
  margin: 0 0 20px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--soft);
  display: grid;
  gap: 12px;
}
.plan-mode-label { font-weight: 700; color: var(--text); }
.plan-mode-cards,
.plan-mode-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plan-mode-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.plan-mode-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(63, 174, 132, 0.2);
}
.plan-mode-title { font-weight: 800; }
.plan-mode-sub { font-size: 0.85rem; color: var(--muted); }
.price-hint { display: block; font-size: 0.78rem; color: var(--muted); font-weight: 400; margin-top: 4px; line-height: 1.35; }
.price-hint[hidden] { display: none; }
.segment .price-hint { margin-top: 2px; }
.plan-mode-info {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.5;
  opacity: 0.6;
}
.plan-mode-info.active { opacity: 1; border-color: var(--primary); }
.plan-mode-info p { margin: 4px 0 0; }
.plan-mode-academic-extra { display: grid; gap: 8px; }
.plan-mode-academic-extra[hidden] { display: none; }
@media (max-width: 720px) {
  .plan-mode-cards,
  .plan-mode-compare { grid-template-columns: 1fr; }
}

/* ===== Oktatási célú dokumentumok (táblázatok, fejléc, dőlt szöveg) ===== */
.document-sheet em { font-style: italic; }

.document-sheet .academic-meta { grid-template-columns: var(--doc-academic-meta-label) 1fr; }

.document-sheet .official-table.thematic-table { font-size: var(--doc-thematic-pt); }
.document-sheet .official-table.thematic-table th,
.document-sheet .official-table.thematic-table td {
  padding: var(--doc-thematic-pad-y) var(--doc-thematic-pad-x);
}

.document-sheet .academic-frame p,
.document-sheet .academic-literature .lit-item {
  margin: 0 0 var(--doc-par-after);
  line-height: var(--doc-lh-body);
}

/* ===== Barion fizetési gomb és kötelező Barion Payment logócsík ===== */
.barion-btn {
  background: #ffffff;
  color: var(--text);
  border: 1.5px solid var(--primary);
  font-weight: 700;
}
.barion-btn:hover:not([disabled]) { background: var(--soft); }
.checkout-box label[for^="billing"], .checkout-box label[for="checkoutEmail"] { display: block; margin: 10px 0 4px; }
.checkout-box .field-hint { color: var(--muted); font-size: .85rem; font-weight: 400; }
.billing-row { display: grid; grid-template-columns: minmax(96px, 1fr) minmax(0, 2.4fr); gap: 10px; }
.billing-row label { margin-top: 10px; }
.checkout-box .modal-actions button[disabled] { opacity: 0.5; cursor: not-allowed; }
.barion-strip { margin: 8px 0; padding: 8px; text-align: center; }
.barion-pic { display: block; }
.barion-pic-dark { display: none; }
html[data-theme="dark"] .barion-pic-light { display: none; }
html[data-theme="dark"] .barion-pic-dark { display: block; }
/* Hivatalos logósor: eredeti képarány, nincs háttér, keret vagy árnyék; a méret csak arányosan változik. */
.barion-logo { display: block; width: min(100%, 340px); height: auto; margin: 0 auto; }
@media (max-width: 640px) { .barion-logo { width: min(100%, 300px); } }
@media (max-width: 380px) { .barion-logo { width: min(100%, 260px); } }
/* A fizetési ablakban a sor görgetés nélkül is látszik: az ablak alján marad. */
.checkout-box .barion-strip { position: sticky; bottom: -26px; margin: 8px 0 -26px; padding-bottom: 34px; background: var(--card); }

/* Opcionális fiók (Supabase Auth) és felhős tervek */
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.auth-btn {
  border: 1px solid var(--primary-dark);
  background: var(--primary-dark);
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.auth-btn.is-logged-in { background: var(--card); color: var(--text); border-color: var(--primary); }
.auth-btn[hidden], #authModal [hidden], #cloudPlansField[hidden] { display: none !important; }
.auth-box .modal-note { margin: 10px 0; line-height: 1.55; }
.auth-box label { display: block; margin: 12px 0 4px; }
.auth-box input[type="text"], .auth-box input[type="email"], .auth-box input[type="password"] { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); color: var(--text); font: inherit; }
.auth-box input:focus-visible, .profile-form input:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.auth-tabs { display: flex; gap: 4px; margin: 4px 0 8px; padding: 4px; border-radius: 14px; background: var(--soft); }
.auth-tab { flex: 1 1 0; min-height: 42px; padding: 8px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; }
.auth-tab.is-active { background: var(--card); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); }
.auth-password { position: relative; }
.auth-password input { padding-right: 52px; }
.auth-eye { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; }
.auth-eye:hover, .auth-eye:focus-visible { color: var(--text); background: var(--soft); }
.auth-eye svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.auth-eye .eye-slash { display: none; }
.auth-eye[aria-pressed="true"] .eye-slash { display: block; }
.auth-link { display: block; margin: 8px 0 0; padding: 4px 0; border: 0; background: none; color: var(--primary-dark); font: inherit; font-size: 14px; font-weight: 600; text-decoration: underline; cursor: pointer; }
html[data-theme="dark"] .auth-link { color: var(--primary); }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 16px 0 10px; color: var(--muted); font-size: 13px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1 1 0; height: 1px; background: var(--border); }
.auth-google { width: 100%; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 18px; border-radius: 14px; border: 1px solid var(--border); background: var(--card); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.auth-google:disabled { opacity: 0.7; cursor: not-allowed; }
.auth-google-icon { flex: none; }
.auth-captcha { margin: 12px 0; min-height: 65px; }
.modal-box.auth-box label.consent { align-items: flex-start; line-height: 1.5; font-size: .9rem; font-weight: 400; }
.modal-box.auth-box label.consent input { flex: 0 0 auto; width: 20px; height: 20px; margin: 2px 0 0; }
.cloud-plans-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.cloud-plans-head label { margin: 0; }
.history-badge-cloud { background: var(--soft); color: var(--primary-text); border: 1px solid var(--primary); }
.history-badge-local { background: transparent; color: var(--muted); border: 1px dashed var(--border); }
.cloud-error { color: #c0392b; }

/* Felhasználói portál (profil.html) */
.profile-page { max-width: 880px; margin: 0 auto; padding: 18px 18px 40px; }
.profile-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 8px 0 16px; }
.profile-head h1 { margin: 0; font-size: 1.6rem; }
.profile-email { margin: 2px 0 0; color: var(--muted); font-size: 0.95rem; word-break: break-all; }
.profile-btn { min-height: 44px; padding: 8px 18px; border-radius: 14px; border: 1px solid var(--border); background: var(--soft); color: var(--text); font: inherit; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.profile-btn.primary { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.profile-btn:disabled { opacity: 0.6; cursor: wait; }
.profile-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 16px; background: var(--soft); flex-wrap: wrap; }
.profile-tab { flex: 1 1 180px; min-height: 44px; padding: 8px 14px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; }
.profile-tab[aria-selected="true"] { background: var(--card); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); }
.profile-panel { margin-top: 16px; padding: 20px; border: 1px solid var(--border); border-radius: 20px; background: var(--card); }
.profile-page [hidden] { display: none !important; }
.profile-panel h2 { margin: 0 0 6px; font-size: 1.15rem; }
.profile-hint { margin: 0 0 12px; color: var(--muted); font-size: 0.92rem; line-height: 1.5; }
.profile-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.profile-form .span-2 { grid-column: 1 / -1; }
.profile-newsletter { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border); }
.profile-newsletter h3 { margin: 0 0 6px; font-size: 1rem; }
.profile-newsletter .profile-hint { margin-bottom: 10px; }
.profile-form label { display: block; margin-bottom: 4px; font-weight: 600; font-size: 0.92rem; }
.profile-form input { width: 100%; min-height: 46px; padding: 9px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); color: var(--text); font: inherit; }
.profile-form input[readonly] { opacity: 0.75; }
.profile-form .admin-pill-group { border: 0; padding: 0; margin: 0; min-width: 0; }
.profile-form .admin-pill-legend { padding: 0; margin-bottom: 4px; font-weight: 600; font-size: 0.92rem; }
.profile-form .admin-pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-form .admin-pill { position: relative; display: inline-flex; margin: 0; cursor: pointer; }
.profile-form .admin-pill input { position: absolute; width: auto; min-height: 0; opacity: 0; pointer-events: none; }
.profile-form .admin-pill span { display: inline-block; padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--panel); color: var(--text); font-weight: 600; font-size: 0.9rem; line-height: 1.2; user-select: none; transition: background 0.15s, border-color 0.15s, color 0.15s; }
.profile-form .admin-pill:hover span { border-color: var(--primary); }
.profile-form .admin-pill input:checked + span { background: var(--primary); border-color: var(--primary-dark); color: #fff; }
.profile-form .admin-pill input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.profile-form h3 { grid-column: 1 / -1; margin: 10px 0 0; font-size: 1rem; }
.profile-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.profile-status { font-size: 0.92rem; color: var(--primary-dark); }
html[data-theme="dark"] .profile-status { color: var(--primary); }
.profile-error { color: #c0392b; font-size: 0.92rem; }
.profile-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.profile-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); }
.profile-item-main { flex: 1 1 260px; min-width: 0; }
.profile-item-title { display: block; font-weight: 700; overflow-wrap: anywhere; }
.profile-item-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; color: var(--muted); font-size: 0.85rem; }
.profile-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--soft); border: 1px solid var(--border); font-size: 0.78rem; font-weight: 700; }
.profile-badge.is-paid { border-color: var(--primary); color: var(--primary-dark); }
html[data-theme="dark"] .profile-badge.is-paid { color: var(--primary); }
.profile-empty { padding: 14px; border: 1px dashed var(--border); border-radius: 14px; color: var(--muted); text-align: center; }
.profile-footer { margin: 22px 0 0; text-align: center; }
.profile-delete-link { padding: 6px 10px; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 0.9rem; text-decoration: underline; cursor: pointer; }
.profile-delete-link:hover { color: var(--text); }
.modal-actions button.danger { background: #c0392b; border-color: #c0392b; color: #fff; }
.profile-gate { max-width: 520px; margin: 40px auto; padding: 24px; text-align: center; border: 1px solid var(--border); border-radius: 20px; background: var(--card); }
@media (max-width: 640px) { .profile-form { grid-template-columns: 1fr; } .profile-panel { padding: 16px 14px; } }

/* Főoldali akciós sáv (site.js tölti, a téma változóit használja) */
.announcement-bar { padding: 10px 16px; text-align: center; font-size: 0.95rem; font-weight: 600; line-height: 1.4; color: var(--primary-text); background: var(--mint); border-bottom: 1px solid var(--border); }
html[data-theme="dark"] .announcement-bar { background: var(--soft); color: var(--primary-text); }

/* Admin Központ (admin.html) és a fiók melletti Vezérlőpult link */
.admin-link { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border-radius: 14px; border: 1px dashed var(--border); color: var(--muted); font-size: 0.9rem; font-weight: 600; text-decoration: none; }
.admin-link:hover { color: var(--primary-dark); border-color: var(--primary); }
html[data-theme="dark"] .admin-link:hover { color: var(--primary); }
.admin-page { max-width: 1100px; margin: 0 auto; padding: 18px 18px 40px; }
.admin-page [hidden] { display: none !important; }
.admin-order-error { color: #c0392b; font-weight: 600; font-size: 0.85rem; overflow-wrap: anywhere; }
[data-theme="dark"] .admin-order-error, [data-theme="dark"] .admin-alert-banner { color: #ff8f84; }
.admin-alert-banner { margin: 0 0 16px; padding: 14px 16px; border: 1px solid #c0392b; border-left-width: 6px; border-radius: 14px; background: rgba(192, 57, 43, 0.08); color: #8e2a20; }
.admin-free-label { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--primary); color: var(--primary); font-weight: 600; font-size: 0.85rem; white-space: nowrap; }
.admin-toast { position: fixed; right: 20px; bottom: 20px; z-index: 1000; max-width: min(420px, calc(100vw - 40px)); padding: 12px 16px; border-radius: 12px; border: 1px solid var(--primary); background: var(--surface, #fff); color: var(--text, #1f2d27); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); overflow-wrap: anywhere; }
.admin-toast[hidden] { display: none; }
.admin-toast.is-error { border-color: #c0392b; color: #8e2a20; }
[data-theme="dark"] .admin-toast { background: var(--surface, #1c2622); color: var(--text, #e6f2ec); }
[data-theme="dark"] .admin-toast.is-error { color: #ff8f84; }
.admin-alert-banner ul { margin: 8px 0 10px; padding-left: 20px; overflow-wrap: anywhere; }
.admin-tools { margin: 0 0 16px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 18px; background: var(--mint); }
.admin-tools h2 { margin: 0 0 10px; font-size: 1rem; }
.admin-tools-list { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 12px 0 18px; }
.admin-kpi { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--panel); }
.admin-kpi-label { color: var(--muted); font-size: 0.85rem; }
.admin-kpi-value { font-size: 1.5rem; color: var(--primary-text); }
.admin-kpi-note { color: var(--muted); font-size: 0.78rem; }
.admin-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin: 10px 0 18px; }
.admin-card { padding: 14px 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--panel); min-width: 0; }
.admin-card h4 { margin: 0 0 8px; font-size: 1rem; color: var(--primary-text); }
.admin-table-wrap { overflow-x: auto; }
.admin-status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 10px 0 18px; }
.admin-status-card { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--border); border-left-width: 5px; border-radius: 16px; background: var(--panel); }
.admin-status-card.ok { border-left-color: var(--primary); background: var(--mint); }
.admin-status-card.warn { border-left-color: var(--muted); }
.admin-status-title { color: var(--muted); font-size: 0.85rem; }
.admin-status-value { font-size: 1.15rem; color: var(--primary-text); }
.admin-status-detail { color: var(--muted); font-size: 0.8rem; white-space: pre-line; }
.admin-announcement { border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; }
.admin-filters { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.admin-filters > div { flex: 1 1 220px; }
.admin-filter-controls { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.admin-filter-controls label { margin: 0; font-weight: 600; font-size: 0.92rem; }
.admin-filter-controls select { flex: 0 1 auto; min-width: 160px; min-height: 40px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); color: var(--text); font: inherit; }
.admin-page label { display: block; margin-bottom: 4px; font-weight: 600; font-size: 0.92rem; }
.admin-page input[type="text"], .admin-page input[type="search"], .admin-page input[type="number"], .admin-page input[type="date"], .admin-page input[type="url"], .admin-page select, .admin-page textarea { width: 100%; min-height: 46px; padding: 9px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); color: var(--text); font: inherit; }
.admin-page textarea { resize: vertical; font-family: inherit; }
.admin-table-wrap { margin: 12px 0 16px; overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.admin-table th, .admin-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.admin-table th { background: var(--soft); font-size: 0.82rem; white-space: nowrap; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-empty { text-align: center !important; color: var(--muted); }
.admin-switch { min-height: 36px; padding: 4px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--soft); color: var(--muted); font: inherit; font-size: 0.82rem; font-weight: 700; cursor: pointer; }
.admin-switch[aria-checked="true"] { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.admin-switch:disabled { opacity: 0.6; cursor: wait; }
.admin-newsletter { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.admin-recipients { display: grid; gap: 8px; margin: 0; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; }
.admin-recipients label { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; }
.admin-recipients input[type="radio"] { width: auto; min-height: 0; }
.admin-preview h4 { margin: 0 0 8px; }
.admin-preview iframe { width: 100%; min-height: 560px; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
@media (max-width: 900px) { .admin-newsletter { grid-template-columns: 1fr; } }

.admin-table tr.log-error td { background: #fdecec; color: #8a1c1c; font-weight: 600; }
[data-theme="dark"] .admin-table tr.log-error td { background: #3a1f22; color: #ffb4b4; }

/* Fizetési ablak: tágasabb, hogy a nyilatkozatok kényelmesen elférjenek */
.modal-box.checkout-box { width: min(600px, 100%); max-width: 600px; }
.consent-group { margin: 14px 0; }
.check-all-btn { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 8px; padding: 9px 16px; border: 0; border-radius: 999px; background: var(--primary); color: #fff; font-weight: 700; cursor: pointer; }
.check-all-btn:hover, .check-all-btn:focus-visible { filter: brightness(.92); }

.checkout-total { margin: 12px 0 4px; font-weight: 700; font-size: 16px; color: var(--text, inherit); }
.checkout-legal-note { margin: 12px 0 0; font-size: 12px; line-height: 1.5; color: #8a948f; background: none; padding: 0; text-align: center; }
[data-theme="dark"] .checkout-legal-note { color: #8e9a95; }
.admin-actions { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.admin-template-picker { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.admin-template-picker select { flex: 1 1 260px; min-width: 0; }
.admin-template-new { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 12px; border: 1px dashed var(--primary); border-radius: 12px; }
.admin-template-new[hidden] { display: none; }
.admin-template-new small { display: block; margin-top: 4px; color: var(--muted, #5b6b64); font-size: 12px; }
@media (max-width: 700px) { .admin-template-new { grid-template-columns: 1fr; } }
.admin-template-vars { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.admin-template-vars button { padding: 2px 8px; border: 1px solid var(--border, #cfe8da); border-radius: 999px; background: transparent; color: inherit; font: inherit; font-size: 12px; cursor: pointer; }
.admin-template-vars button:hover { border-color: var(--primary); }
.profile-btn.danger { background: #c0392b; border-color: #c0392b; color: #fff; }
.admin-switch.admin-danger { background: #fdecec; border-color: #d64545; color: #a12626; }
.admin-dialog { border: 1px solid var(--border, #d9ebe0); border-radius: 16px; padding: 20px; max-width: min(480px, 94vw); }
.admin-history-dialog { max-width: min(760px, 96vw); width: 100%; }
.admin-history-list { margin: 8px 0; padding-left: 20px; max-height: 55vh; overflow: auto; }
.admin-history-list li { margin: 0 0 14px; }
.admin-history-list time { font-weight: 700; }
.admin-history-list textarea { width: 100%; min-height: 90px; font: 13px/1.5 ui-monospace, Menlo, monospace; }
.admin-dialog::backdrop { background: rgba(20, 40, 33, 0.45); }

/* ---------- Admin Központ: bal oldali navigáció, lapozás, oszloponkénti szűrők ---------- */
.admin-page { max-width: 1600px; }
.admin-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; align-items: start; }
.admin-content { min-width: 0; }
.admin-sidebar { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - 24px); overflow-y: auto; padding: 14px; border: 1px solid var(--border); border-radius: 18px; background: var(--card); }
.admin-sidebar-head strong { color: var(--primary-text, var(--text)); font-size: 1.05rem; }
.admin-sidebar-head .profile-email { margin: 4px 0 0; overflow-wrap: anywhere; font-size: 0.85rem; }
.admin-sidenav { display: flex; flex-direction: column; gap: 4px; }
.admin-sidenav .profile-tab { flex: none; width: 100%; min-height: 44px; text-align: left; padding: 8px 14px; }
.admin-sidenav .profile-tab[aria-selected="true"] { background: var(--mint); color: var(--text); box-shadow: inset 3px 0 0 var(--primary); }
.admin-sidebar .admin-tools { margin: 0; padding: 10px 12px; border-radius: 14px; }
.admin-sidebar .admin-tools summary { cursor: pointer; min-height: 32px; font-weight: 700; }
.admin-sidebar .admin-tools-list { flex-direction: column; margin-top: 8px; }
.admin-sidebar .admin-tools-list .profile-btn { width: 100%; text-align: left; }
.admin-mobilebar, .admin-backdrop { display: none; }

.admin-filters .admin-daterange { flex: 2 1 320px; }
.admin-daterange > span { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.admin-daterange input[type="date"] { width: auto; min-width: 140px; }
.admin-quick { margin-top: 6px; }
.admin-quick .profile-btn { min-height: 36px; padding: 4px 12px; }
.admin-filters select, .admin-filters input[type="date"] { min-height: 44px; }
.admin-filter-row th { padding: 4px 6px; background: var(--card); }
.admin-filter-row input { width: 100%; min-width: 90px; min-height: 36px; padding: 4px 8px; font-size: 0.82rem; }
.admin-filter-row .profile-btn { min-height: 36px; padding: 4px 10px; font-size: 0.78rem; white-space: nowrap; }
.admin-table { min-width: 720px; }
/* Az Áttekintés alsó statisztika-kártyái (Top témák / korcsoportok / források) a kártya szélességéhez igazodnak: nincs vízszintes görgetés. */
.admin-card-grid { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.admin-card .admin-table-wrap { margin: 0; overflow: visible; border: 0; border-radius: 0; }
.admin-card .admin-table { min-width: 0; table-layout: auto; }
.admin-card .admin-table th, .admin-card .admin-table td { padding: 8px 6px; }
.admin-card .admin-table td:first-child, .admin-card .admin-table th:first-child { white-space: normal; overflow-wrap: anywhere; word-break: break-word; min-width: 0; width: 100%; }
.admin-card .admin-table td:last-child, .admin-card .admin-table th:last-child { white-space: nowrap; flex-shrink: 0; text-align: right; width: 1%; font-variant-numeric: tabular-nums; }
.admin-kpi-label { overflow-wrap: anywhere; }
.admin-kpi-value { white-space: nowrap; }
.admin-table .admin-actions .profile-btn { min-height: 36px; }

.admin-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.admin-pager-total { color: var(--muted); font-size: 0.88rem; }
.admin-pager-nav { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.admin-pager-nav .profile-btn { min-height: 40px; min-width: 40px; padding: 4px 10px; }
.admin-pager-nav .profile-btn[aria-current="page"] { background: var(--primary-dark, var(--primary)); color: #fff; border-color: var(--primary-dark, var(--primary)); }
.admin-subtabs { margin-bottom: 14px; }
.admin-subtabs .profile-tab { flex: 0 1 auto; }

.admin-audit-value { display: inline-block; max-width: 280px; overflow-wrap: anywhere; white-space: pre-wrap; font-size: 0.82rem; }
.admin-audit-details summary { cursor: pointer; max-width: 280px; overflow-wrap: anywhere; font-size: 0.82rem; }
.admin-audit-full { width: min(420px, 70vw); min-height: 140px; margin-top: 6px; font: 12px/1.5 ui-monospace, Menlo, monospace; }
.admin-audit-empty, .admin-audit-key { color: var(--muted); }

@media (max-width: 900px) {
  .admin-page { padding: 12px 12px 32px; }
  .admin-shell { display: block; }
  .admin-mobilebar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; margin: 0 0 12px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); }
  .admin-mobilebar .profile-btn { min-height: 44px; }
  .admin-sidebar { position: fixed; z-index: 50; top: 0; left: 0; bottom: 0; width: min(300px, 86vw); max-height: none; border-radius: 0 18px 18px 0; transform: translateX(-105%); transition: transform 0.2s ease; box-shadow: 0 0 28px rgba(0, 0, 0, 0.25); }
  .admin-sidebar.is-open { transform: translateX(0); }
  .admin-backdrop:not([hidden]) { position: fixed; z-index: 40; inset: 0; display: block; background: rgba(20, 40, 33, 0.5); }
  .admin-filters > div, .admin-filters .admin-daterange { flex: 1 1 100%; }
  .admin-filters .profile-btn { min-height: 44px; }
  .admin-pager { justify-content: center; }
  .admin-pager-nav .profile-btn { min-width: 44px; min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .admin-sidebar { transition: none; } }

/* Admin: kompakt listasor, összecsukható szűrők, műveletek menü */
.admin-listbar { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; margin: 6px 0 10px; }
.admin-listbar .profile-hint { margin: 0; flex: 1 1 220px; }
.admin-listbar-tools { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-listbar-tools .profile-btn { min-height: 40px; }
.planner-steps { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.planner-step { padding: 8px 14px; border: 1px solid var(--border, #d8e6df); border-radius: 999px; background: transparent; color: inherit; cursor: pointer; font: inherit; }
.planner-step.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.planner-card { max-width: 860px; padding: 18px; border: 1px solid var(--border, #d8e6df); border-radius: 16px; background: var(--surface, transparent); }
.planner-card-head { margin-bottom: 14px; }
.planner-field { margin: 14px 0; padding-top: 12px; border-top: 1px dashed var(--border, #d8e6df); }
.planner-edit { display: flex; align-items: center; gap: 6px 8px; flex-wrap: wrap; margin: 6px 0; border-left: 3px solid transparent; padding-left: 6px; }
.planner-edit input, .planner-edit textarea { flex: 1 1 260px; min-width: 0; font: inherit; }
.planner-edit.is-changed { border-left-color: var(--primary); }
.planner-edit-title input { font-size: 1.15rem; font-weight: 700; }
.planner-edit-label input { font-weight: 600; }
.planner-edit-subtle input { font-size: 0.92rem; }
.planner-edit-hint { background: color-mix(in srgb, var(--primary) 7%, transparent); border-radius: 8px; padding: 6px 8px; }
.planner-edit-hint textarea { background: transparent; }
.planner-role { flex-basis: 100%; font-size: 0.78rem; color: var(--muted); }
.planner-badge { font-size: 0.75rem; color: var(--primary); border: 1px solid var(--primary); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.planner-reset { border: 0; background: transparent; color: var(--primary); cursor: pointer; font: inherit; font-size: 0.85rem; white-space: nowrap; }
.planner-mock-input input, .planner-mock-area textarea { font-style: italic; opacity: 0.9; }
.planner-mock-area textarea { min-height: 64px; }
.planner-mock-switch { color: var(--muted); font-size: 0.9rem; }
.planner-lock { margin: 8px 0; padding: 8px 12px; border: 1px dashed var(--border, #c9d8d0); border-radius: 10px; opacity: 0.65; cursor: help; display: flex; gap: 6px 12px; flex-wrap: wrap; }
.planner-list { margin: 10px 0; padding: 10px; background: color-mix(in srgb, var(--primary) 6%, transparent); border-radius: 10px; }
.planner-list-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.planner-option { display: flex; align-items: center; gap: 6px; margin: 6px 0; flex-wrap: wrap; }
.planner-option input[type="text"] { flex: 1 1 200px; min-width: 0; }
.planner-option.is-hidden input[type="text"] { opacity: 0.5; text-decoration: line-through; }
.planner-vis { border: 1px solid var(--primary); background: var(--primary); color: #fff; border-radius: 999px; padding: 4px 12px; cursor: pointer; font: inherit; font-size: 0.85rem; white-space: nowrap; }
.planner-vis:not(.is-on) { background: transparent; border-color: var(--border, #b8c4be); color: var(--muted); }
.planner-move, .planner-delete { border: 1px solid var(--border, #d8e6df); background: transparent; color: inherit; border-radius: 8px; padding: 4px 9px; cursor: pointer; font: inherit; }
.planner-move:disabled { opacity: 0.35; cursor: default; }
.planner-builtin { font-size: 0.75rem; color: var(--muted); cursor: help; }
.planner-add { margin-top: 6px; }
.planner-summary-section { margin: 10px 0; padding: 10px; border: 1px solid var(--border, #d8e6df); border-radius: 10px; }
.planner-summary-row { display: flex; align-items: center; gap: 8px; }
.planner-summary-row .planner-edit { flex: 0 1 320px; }
.planner-summary-value { color: var(--muted); }
@media (max-width: 700px) { .planner-card { padding: 12px; } .planner-summary-row { flex-wrap: wrap; } }
.admin-pagesize { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; color: var(--muted, inherit); }
.admin-pagesize select { min-height: 40px; }
.admin-pagesize input[type="search"], .admin-pagesize input[type="date"] { min-height: 40px; }
/* A tervező „Projekt témája” alatti ajánló chipek konténere (.field > #themeSuggestions). */
.field .theme-suggestions, #themeSuggestions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 12px; margin-bottom: 0; }
.theme-suggestions .chip { margin: 0; flex: 0 0 auto; max-width: 100%; }
.admin-themes-table { table-layout: auto; min-width: 860px; }
.admin-themes-table th:not(.col-theme), .admin-themes-table td:not(:first-child) { white-space: nowrap; width: 1%; }
.admin-themes-table .col-theme, .admin-themes-table td:first-child { width: auto; min-width: 260px; white-space: normal; }
.admin-themes-table td { padding-top: 6px; padding-bottom: 6px; line-height: 1.35; }
.admin-themes-table td:nth-child(4), .admin-themes-table td:nth-child(5), .admin-themes-table th:nth-child(4), .admin-themes-table th:nth-child(5) { text-align: right; }
.admin-sort-btn { border: 0; background: transparent; color: inherit; font: inherit; font-weight: 700; padding: 0; cursor: pointer; white-space: nowrap; }
.admin-sort-btn:hover, .admin-sort-btn:focus-visible { color: var(--primary); text-decoration: underline; outline: none; }
.admin-menu-btn { min-height: 36px; min-width: 40px; padding: 2px 10px; font-size: 1.2rem; line-height: 1; }
.admin-action-menu { min-width: 170px; }
.admin-menu-item.danger { color: #b3261e; }
[data-theme="dark"] .admin-menu-item.danger { color: #ffb4b4; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.admin-listbar .profile-btn.has-filters { border-color: var(--primary); color: var(--primary); font-weight: 700; }
.admin-filters[hidden], .admin-filter-row[hidden], .admin-menu-list[hidden] { display: none; }
.admin-menu { position: relative; display: inline-block; }
.admin-menu-toggle { min-height: 36px; white-space: nowrap; }
.admin-menu-list { position: fixed; z-index: 1000; min-width: 220px; display: flex; flex-direction: column; padding: 6px; border-radius: 12px; border: 1px solid var(--border, #cfe8da); background: var(--surface, #fff); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18); }
.admin-menu-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 8px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.admin-menu-item:hover:not(:disabled), .admin-menu-item:focus-visible { background: rgba(63, 174, 132, 0.15); outline: none; }
.admin-menu-item:disabled { opacity: 0.55; cursor: not-allowed; }
.admin-menu-reason { font-size: 0.78rem; color: var(--muted, #5b6b64); }
.admin-newsletter-cell { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-badge-on, .admin-badge-off { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; white-space: nowrap; }
.admin-badge-on { background: rgba(63, 174, 132, 0.18); color: var(--primary); }
.admin-badge-off { background: rgba(120, 130, 125, 0.18); color: var(--muted, #5b6b64); }

/* Ügyfélértékelések */
.testimonials { margin: 22px 0 8px; }
.testimonials[hidden] { display: none; }
.admin-nav-badge { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; }
.admin-nav-badge[hidden] { display: none; }
.admin-stars { color: #f59e0b; letter-spacing: 1px; white-space: nowrap; }
.admin-review-pending { color: #8a6100; }
.admin-review-approved { color: #1f7a57; }
.admin-review-rejected { color: #a33a3a; }
[data-theme="dark"] .admin-review-pending { color: #f5c46b; }
[data-theme="dark"] .admin-review-approved { color: #6fdcb1; }
[data-theme="dark"] .admin-review-rejected { color: #f59a9a; }

.review-card .review-stars { color: #f59e0b; letter-spacing: 2px; font-size: 18px; margin: 4px 0 10px; }
.review-text { overflow-wrap: anywhere; white-space: pre-line; }
.reviews-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin: -14px 0 28px; }
.reviews-pager[hidden] { display: none; }
.reviews-pager-info { font-weight: 600; color: var(--muted); min-width: 56px; text-align: center; }
.reviews-pager-btn { border: 1px solid #cfe8da; background: var(--panel); color: var(--text); border-radius: 999px; padding: 7px 16px; font: inherit; font-weight: 600; cursor: pointer; }
.reviews-pager-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.reviews-pager-btn:disabled { opacity: .45; cursor: default; }
:root[data-theme="dark"] .reviews-pager-btn { border-color: #38564a; }
.is-over{color:#b42318;font-weight:600}

/* Süti-hozzájárulás: kompakt kártya, három azonos súlyú gomb */
.cc-banner { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 950; max-width: 720px; margin: 0 auto; padding: 16px 18px; border-radius: 18px; background: var(--card); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow), 0 0 0 1px rgba(63, 174, 132, .25); max-height: 85vh; overflow-y: auto; font-size: .92rem; line-height: 1.5; }
.cc-banner .cc-title { margin: 0 28px 6px 0; font-size: 1.05rem; }
.cc-banner .cc-title:focus { outline: none; }
.cc-banner .cc-text { margin: 0 0 12px; color: var(--muted); }
.cc-banner .cc-link { color: var(--primary-text); text-decoration: underline; cursor: pointer; }
.cc-banner .cc-close { position: absolute; top: 8px; right: 10px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--text); font-size: 22px; line-height: 1; cursor: pointer; }
.cc-banner .cc-close[hidden], .cc-banner .cc-details[hidden], .cc-banner .cc-btn[hidden] { display: none; }
.cc-banner .cc-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cc-banner .cc-btn { min-height: 44px; padding: 8px 10px; border: 2px solid var(--primary); border-radius: 12px; background: var(--card); color: var(--primary-text); font: inherit; font-weight: 700; cursor: pointer; }
.cc-banner .cc-btn:hover { background: var(--soft); }
.cc-banner .cc-btn:focus-visible, .cc-banner .cc-link:focus-visible, .cc-banner input:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.cc-banner .cc-details { display: grid; gap: 10px; margin: 0 0 12px; }
.cc-banner .cc-cat { padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--soft); }
.cc-banner .cc-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 700; cursor: pointer; }
.cc-banner .cc-cat-head input { flex: 0 0 auto; width: 22px; height: 22px; accent-color: var(--primary); }
.cc-banner .cc-cat p { margin: 4px 0 0; }
.cc-banner .cc-cat-desc { color: var(--muted); }
.cc-banner .cc-cat-list { font-size: .85rem; color: var(--muted); }
@media (max-width: 560px) {
  .cc-banner { left: 8px; right: 8px; bottom: 8px; padding: 12px 14px; }
  .cc-banner .cc-actions { grid-template-columns: 1fr; }
  .cc-banner .cc-btn { min-height: 42px; }
}
.footer-link-btn { display: inline; padding: 0; border: 0; background: none; color: var(--primary-text); font: inherit; text-align: left; text-decoration: underline; cursor: pointer; }
.site-footer-mini { max-width: 1280px; margin: 28px auto 0; padding: 18px; border-top: 1px solid var(--border); color: var(--muted); font-size: .875rem; }
.site-footer-mini .footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.site-footer-mini a { color: var(--primary-text); text-decoration: underline; cursor: pointer; }

/* Jogi tájékoztató: sütitábla, vízszintes oldalgörgetés nélkül */
.legal-table-wrap { margin: 8px 0; overflow-x: auto; max-width: 100%; }
.legal-table { width: 100%; border-collapse: collapse; font-size: .82rem; line-height: 1.45; }
.legal-table th, .legal-table td { padding: 6px 8px; border: 1px solid var(--border); text-align: left; vertical-align: top; overflow-wrap: anywhere; word-break: break-word; }
.legal-table thead th { background: var(--soft); }
.legal-table .legal-table-group th { background: var(--mint); color: var(--primary-text); }
@media (max-width: 640px) {
  .legal-table thead { display: none; }
  .legal-table, .legal-table tbody, .legal-table tr, .legal-table td, .legal-table th { display: block; width: 100%; box-sizing: border-box; }
  .legal-table tr { margin-bottom: 8px; border: 1px solid var(--border); border-radius: 8px; }
  .legal-table td, .legal-table th { border: 0; border-bottom: 1px solid var(--border); }
  .legal-table td:nth-child(2)::before { content: 'Cél: '; font-weight: 700; }
  .legal-table td:nth-child(3)::before { content: 'Jogalap: '; font-weight: 700; }
  .legal-table td:nth-child(4)::before { content: 'Megőrzés: '; font-weight: 700; }
}

/* Látogatói útvonal és lemorzsolódás (admin) */
.funnel-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.funnel-table th, .funnel-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); text-align: right; overflow-wrap: anywhere; }
.funnel-table th:first-child, .funnel-table td:first-child { text-align: left; }
.funnel-table tr.funnel-worst td { background: rgba(180, 35, 24, .12); font-weight: 700; }
.funnel-bar-track { height: 10px; border-radius: 6px; background: var(--soft); overflow: hidden; margin-top: 4px; }
.funnel-bar { height: 100%; background: var(--primary); }
.funnel-worst .funnel-bar { background: #b42318; }
.funnel-note { margin: 6px 0 0; font-size: .8rem; color: var(--muted); }
@media (max-width: 640px) { .funnel-table th, .funnel-table td { padding: 4px 3px; font-size: .75rem; } }
