/* ============================================================================
 * base.css — webtemplate sablon alap CSS
 * ============================================================================
 * Filozófia: minimális, testreszabható. A színek CSS változókból jönnek
 * (a body-n vannak deklarálva, adminból állíthatók). A layout flex-alapú.
 *
 * Főbb komponensek:
 *   - .container                 : középre igazító wrapper
 *   - .site-header (3-zone)      : fejléc
 *   - .sidebar.sidebar-left/right: oldalsávok, data-open attribútummal
 *   - .site-main                 : fő tartalom terület
 *   - .footer-toggle/-content    : lábléc
 * ============================================================================ */

/* ---------- RESET ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #222;
  background: var(--main-bg, #ffffff);
  /* Fix viewport layout: a body pontosan a viewport magasságát tölti ki,
   * és csak a .content + .sidebar-content görget. A header/footer/banner
   * mindig látható. */
  height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button {
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  cursor: pointer;
}

/* ---------- LAYOUT WRAPPER ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ---------- HEADER ---------- */
.site-header {
  background: var(--header-bg, #fff);
  color: var(--header-fg, #222);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  flex-shrink: 0; /* ne zsugorodjon flex belül */
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 1rem;
  min-height: 56px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.header-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.header-right {
  display: flex;
  flex-direction: row-reverse; /* jobbról sorrendezés */
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.home-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
}

.header-logo { height: 36px; width: auto; }

.site-title {
  font-weight: 600;
  font-size: 1.1rem;
  white-space: nowrap;
}

/* ikon-gombok (menu, search, stb.) */
.hdr-btn,
.hdr-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
  transition: background 0.15s;
}
.hdr-btn:hover,
.hdr-icon:hover {
  background: rgba(0,0,0,0.06);
}
.hdr-btn:focus-visible,
.hdr-icon:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.hdr-icon.hidden { display: none; }

.icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Header kereső */
.header-search {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  width: 100%;
  max-width: 500px;
}
.header-search .search-input-wrapper {
  flex: 1;
  position: relative;
}
.header-search input[type=text] {
  width: 100%;
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 6px;
  background: rgba(255,255,255,0.9);
  color: #222;
}

/* ---------- MAIN + SIDEBAR LAYOUT ---------- */
.site-main {
  flex: 1;
  background: var(--main-bg, #fff);
  overflow: hidden; /* a belső scroll a content/sidebar-content rétegekben */
  display: flex;
  flex-direction: column;
  min-height: 0; /* flex-child shrink korrekt működéséhez */
}

.main-inner {
  display: flex;
  gap: 1rem;
  padding: 0;
  position: relative;
  flex: 1;
  min-height: 0;       /* flex shrink */
  overflow: hidden;    /* a görgés a gyerekekben */
}

.content {
  flex: 1;
  min-width: 0;
  min-height: 0;
  /* overflow-y: scroll: a scrollbar **mindig látható** (akkor is, ha
     nincs tartalom alá), így a content szélessége soha nem változik
     a görgetősáv megjelenése/eltűnése miatt. */
  overflow-y: scroll;
  overflow-x: hidden;
  padding: 0.75rem;
}

/* ---------- SIDEBAR ---------- */
.sidebar {
  background: #f9f9f9;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 8px;
  padding: 1rem;
  overflow-y: auto;                /* belső görgés */
  transition: transform 0.25s ease, width 0.25s ease, margin 0.25s ease,
              padding 0.25s ease, border-width 0.25s ease, opacity 0.2s ease;
  min-height: 0;                   /* flex shrink */
}

/* A bal oldalsáv nincs lekerekítve — szögletes szélekkel csatlakozik
   a layouthoz, és a teljes oldalmagasságot kitölti. */
.sidebar-left {
  border-radius: 0;
  border-left: none;
  border-top: none;
  border-bottom: none;
}

/* Desktop: a sidebar-ok fix szélességűek, teljes oldalmagasságot kitöltenek,
   belül görget, ha szükséges. */
@media (min-width: 900px) {
  .sidebar {
    width: 25%;
    min-width: 180px;
    max-width: 320px;
    flex-shrink: 0;
  }

  /* csukott állapot */
  .sidebar[data-open="0"] {
    width: 0;
    min-width: 0;
    padding: 0;
    border-width: 0;
    margin: 0;
    opacity: 0;
    overflow: hidden;
  }
  .sidebar-left  { order: 0; }
  .content       { order: 1; }
  .sidebar-right { order: 2; }
}

/* Mobil: a sidebar-ok fix pozíció overlay-k */
@media (max-width: 899px) {
  .main-inner {
    flex-direction: column;
  }
  .sidebar {
    position: fixed;
    top: 56px;
    bottom: 48px;
    width: 80%;
    max-width: 320px;
    z-index: 90;
    margin: 0;
    border-radius: 0;
  }
  .sidebar-left {
    left: 0;
    transform: translateX(-100%);
  }
  .sidebar-right {
    right: 0;
    transform: translateX(100%);
  }
  .sidebar[data-open="1"] {
    transform: translateX(0);
  }
}

/* ---------- SIDEBAR NAV ---------- */
.sidebar-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sidebar-nav-link {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  text-decoration: none;
  color: inherit;
}
.sidebar-nav-link:hover {
  background: rgba(0,0,0,0.05);
}

.sidebar-empty {
  font-size: 0.9rem;
  color: #777;
}
.muted { color: #777; }

/* ---------- FOOTER ---------- */
.footer-toggle {
  background: var(--footer-bg, #f5f5f5);
  color: var(--footer-fg, #333);
  border-top: 1px solid rgba(0,0,0,0.08);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.footer-toggle .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-toggle-btn {
  cursor: pointer;
  padding: 0 0.5rem;
  user-select: none;
}

.footer-content {
  background: var(--footer-bg, #f5f5f5);
  color: var(--footer-fg, #333);
  padding: 1rem;
  flex-shrink: 0;
  display: none; /* alapból csukva; a layout.js toggle-li */
}
.footer-content.open {
  display: block;
}
.footer-content .container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
}
/* A linkek középre igazodnak; a payment-logo (ha van) alattuk középen. */
.legal-links {
  text-align: center;
}
.legal-links a {
  text-decoration: none;
  color: inherit;
}
.legal-links a:hover {
  text-decoration: underline;
}
.payment-logo {
  display: inline-block;
  cursor: pointer;
}
.payment-logo img {
  max-height: 30px;
  display: block;
}

/* ---------- CONTENT KOMPONENSEK ---------- */
.static-page {
  background: #fff;
  border-radius: 8px;
  padding: 1rem 1.5rem;
}
.static-page h1 { margin-top: 0; }

.page-body p { margin: 0.5rem 0; }
.page-body img { margin: 0.5rem 0; border-radius: 4px; }

/* ---------- ERROR ---------- */
.error-htmx,
.error-box {
  padding: 0.75rem 1rem;
  background: #ffe8e6;
  color: #a00;
  border: 1px solid #e0b0ac;
  border-radius: 4px;
  margin: 0.5rem 0;
}

/* ---------- UTILITY ---------- */
.hidden { display: none !important; }

/* ============================================================================
 * HEADER – AUTH ikon + user menü
 * ============================================================================ */

.hdr-auth-menu {
  position: relative;
  display: inline-block;
}

.hdr-auth-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  cursor: pointer;
  transition: background 0.15s;
}
.hdr-auth-btn:hover      { background: rgba(0,0,0,0.06); }
.hdr-auth-btn:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.hdr-auth-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  border: 2px solid var(--header-bg, #fff);
  color: #fff;
}
.hdr-auth-badge.badge-ok    { background: #28a745; }
.hdr-auth-badge.badge-off   { background: #888; }
.hdr-auth-badge.badge-warn  { background: #ffc107; color: #222; }

.hdr-auth-btn.is-degraded { opacity: 0.7; }

/* User menü dropdown */
.hdr-auth-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  background: #fff;
  color: #222;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  padding: 0.25rem 0;
  z-index: 150;
}
.hdr-auth-menu[data-open="1"] .hdr-auth-dropdown {
  display: block;
}

.hdr-auth-dropdown a {
  display: block;
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: inherit;
  white-space: nowrap;
}
.hdr-auth-dropdown a:hover {
  background: rgba(0,0,0,0.05);
}
.hdr-auth-dropdown hr {
  border: none;
  border-top: 1px solid rgba(0,0,0,0.08);
  margin: 0.25rem 0;
}

/* ============================================================================
 * MODAL overlay (login, image picker, stb.)
 * ============================================================================
 * A `.modal` egy full-screen overlay, alapból rejtett. A layout.js kapcsolja
 * be/ki .open osztály hozzáadásával, amikor a modal-ba HTML tartalom kerül
 * vagy onnan kiürül.
 * ============================================================================ */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  padding-top: 2.8rem;
  overflow-y: auto;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(2px);
  z-index: 1000;
}
.modal.open {
  display: block;
}


/* Restricted sidebar szekció elválasztója — vékony halvány vonal a normál
   menüpontok és a zárt tartalmak között. */
.sidebar-section-divider {
  border: none;
  border-top: 1px solid rgba(0,0,0,0.12);
  margin: 0.75rem 0;
}

/* Restricted link enyhén megkülönböztetett megjelenése. */
.sidebar-nav-link-restricted {
  font-style: italic;
  opacity: 0.85;
}
.sidebar-nav-link-restricted:hover {
  opacity: 1;
}

/* ============================================================================
 * Kapcsolat-űrlap (a /kapcsolat oldalon a {{CONTACT_FORM}} token helyén)
 * ============================================================================ */
.contact-form-wrapper {
  margin-top: 1.25rem;
  max-width: 700px;
}
.contact-form .adatsor-container {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.contact-form .cimsor {
  flex: 0 0 100px;
  font-weight: 600;
  padding-top: 0.4rem;
}
.contact-form .adatsor-szoveg {
  flex: 1;
}
.contact-form .texteditor {
  width: 100%;
  padding: 0.4rem 0.6rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.95rem;
  box-sizing: border-box;
}
.contact-form .texteditor:focus {
  outline: none;
  border-color: #1a5490;
  box-shadow: 0 0 0 2px rgba(26, 84, 144, 0.15);
}
.contact-actions {
  margin-top: 0.75rem;
  text-align: right;
}
.contact-success {
  background: #e8f5e9;
  border: 1px solid #a7db73;
  border-radius: 6px;
  padding: 1rem 1.5rem;
}
.contact-success h3 {
  margin: 0 0 0.5rem 0;
  color: #1a3a00;
}
.contact-warning {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 1rem;
}

/* ============================================================================
 * Speciális tartalom — sidebar szekció (összecsukható "details")
 * ============================================================================ */
.sidebar-special-group {
  margin-top: 0.5rem;
}
.sidebar-special-summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.4rem 0.5rem;
  list-style: none;
  user-select: none;
  border-radius: 4px;
}
.sidebar-special-summary:hover {
  background: rgba(0,0,0,0.04);
}
.sidebar-special-summary::-webkit-details-marker {
  display: none;
}
.sidebar-special-summary::before {
  content: "▶";
  display: inline-block;
  margin-right: 0.4rem;
  font-size: 0.75rem;
  transition: transform 0.15s;
}
.sidebar-special-group[open] .sidebar-special-summary::before {
  transform: rotate(90deg);
}
.sidebar-nav-link-special {
  font-style: italic;
  opacity: 0.85;
}

/* ============================================================================
 * Személyiségteszt UI
 * ============================================================================ */
.personality-test {
  max-width: 800px;
  margin: 1.5rem auto;
  padding: 1.5rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.pt-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.pt-question {
  flex: 1;
  font-size: 1.1rem;
  line-height: 1.45;
  margin: 0;
}
.pt-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}
.pt-arrow {
  background: #f0f4f9;
  border: 1px solid #cfd9e4;
  border-radius: 4px;
  font-size: 1rem;
  width: 32px;
  height: 32px;
  cursor: pointer;
  color: #1a5490;
}
.pt-arrow:hover:not(.disabled) {
  background: #d8e3ee;
}
.pt-arrow.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.pt-progress-label {
  font-family: ui-monospace, monospace;
  font-size: 0.95rem;
  color: #555;
}

.pt-answer-form {
  margin: 0;
}
.pt-answer-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.pt-answer-label {
  font-weight: 600;
  margin-right: 0.5rem;
}
.pt-btn {
  flex: 1;
  min-width: 100px;
  padding: 0.7rem 1.2rem;
  border: 2px solid #cfd9e4;
  background: #fff;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s;
}
.pt-btn:hover {
  border-color: #1a5490;
  background: #f0f4f9;
}
.pt-btn-yes.selected {
  background: #c8e6c9;
  border-color: #2e7d32;
  color: #1a3a00;
}
.pt-btn-maybe.selected {
  background: #fff8e1;
  border-color: #ffa726;
  color: #6d4c00;
}
.pt-btn-no.selected {
  background: #ffcdd2;
  border-color: #c62828;
  color: #5a0000;
}

.pt-progress {
  margin-top: 1.5rem;
}
.pt-progress-bar {
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}
.pt-progress-fill {
  height: 100%;
  background: linear-gradient(to right, #4caf50, #2e7d32);
  transition: width 0.3s;
}
.pt-progress-text {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: #666;
  text-align: center;
}
.pt-finish {
  margin-top: 1rem;
  text-align: center;
}

/* ----- Eredmény oldal: 10 vonás vízszintes csúszka -100..+100 ----- */
.pt-result h2 {
  margin: 0 0 0.5rem 0;
}
.pt-trait-list {
  margin-top: 1.5rem;
}
.pt-trait-row {
  margin-bottom: 1.25rem;
}
.pt-trait-header {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}
.pt-trait-code {
  font-family: ui-monospace, monospace;
  font-weight: 700;
  background: #1a5490;
  color: #fff;
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
  font-size: 0.85rem;
}
.pt-trait-title {
  flex: 1;
  font-weight: 500;
}
.pt-trait-score {
  font-family: ui-monospace, monospace;
  font-weight: 700;
  font-size: 1rem;
  color: #1a5490;
}
.pt-trait-bar {
  position: relative;
  height: 24px;
  background: #f0f4f9;
  border: 1px solid #cfd9e4;
  border-radius: 3px;
  overflow: hidden;
}
.pt-trait-axis {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #888;
  z-index: 2;
}
.pt-trait-fill {
  position: absolute;
  top: 0;
  bottom: 0;
}
.pt-trait-fill.positive {
  background: linear-gradient(to right, #66bb6a, #2e7d32);
}
.pt-trait-fill.negative {
  background: linear-gradient(to left, #ef5350, #b71c1c);
}
.pt-trait-desc {
  margin-top: 0.25rem;
  font-size: 0.85rem;
}
.pt-trait-scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #999;
  margin-top: 0.15rem;
  padding: 0 0;
}
/* Raw-only sor (nincs norma-tábla): kompaktabb */
.pt-trait-row--rawonly {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  margin-bottom: 0.5rem;
}
/* Eredmény-figyelmeztetés (pl. nincs norma-tábla) */
.pt-result-warning {
  border: 1px solid #f0c0c0;
  background: #fff8f8;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  color: #800;
}
.pt-result-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Admin személyiségteszt lista + részletek ===== */
.admin-personality-meta {
  background: #f8f9fb;
  border: 1px solid #e0e4ea;
  border-radius: 6px;
  padding: 0.85rem 1rem;
  margin: 1rem 0 1.5rem;
}
.admin-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.3rem 1.5rem;
  font-size: 0.9rem;
}
.personality-list-table .badge-success {
  background: #d4edda;
  color: #155724;
}
.personality-list-table .badge-info {
  background: #fff3cd;
  color: #856404;
}

/* ===== Respondent (személyes adatok) form, schema_step12 ===== */
.pt-respondent h2,
.pt-respondent-thanks h2 {
  margin-top: 0;
}
.pt-respondent .pt-consent-box {
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin: 1rem 0 1.25rem;
  background: #fafafa;
}
.pt-respondent .pt-consent-title {
  font-size: 1rem;
  margin: 0 0 0.5rem;
}
.pt-respondent .pt-consent-text {
  font-size: 0.9rem;
  line-height: 1.45;
  margin: 0 0 0.75rem;
}
.pt-respondent .pt-consent-check {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-size: 0.95rem;
  cursor: pointer;
}
.pt-respondent .pt-consent-check input[type="checkbox"] {
  margin-top: 0.25rem;
  flex: 0 0 auto;
}
.pt-respondent .pt-respondent-title {
  font-size: 1rem;
  margin: 1.25rem 0 0.75rem;
}

/* ----- Start-form: a teszt-bevezető 3 mezős nyitóűrlapja ----- */
.pt-start h2 {
  margin-top: 0;
}
.pt-start-form {
  margin-top: 1rem;
}
.pt-start-form .texteditor[type="number"] {
  max-width: 8rem;
}
.pt-start-form select.texteditor {
  max-width: 14rem;
}
.pt-start-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ----- Read-only kiírás (név/nem/életkor a respondent-form-ban) ----- */
.pt-readonly-field {
  display: inline-block;
  padding: 0.45rem 0.7rem;
  border: 1px solid #e0e0e0;
  background: #f7f7f7;
  border-radius: 4px;
  color: #333;
  font-size: 0.95rem;
  min-width: 6rem;
}

/* ===== OCA SVG grafikon ===== */
.oca-chart-wrap {
  width: 100%;
  max-width: 960px;
  margin: 0.75rem 0;
  background: #fff;
}
.oca-svg-chart {
  display: block;
  width: 100%;
  height: auto;
}

/* ===== OCA összefoglaló táblázat ===== */
.oca-score-table-wrap {
  margin: 0.75rem 0 1.5rem;
  overflow-x: auto;
}
.oca-score-table {
  border-collapse: collapse;
  font-size: 0.82rem;
  min-width: 600px;
  width: 100%;
}
.oca-score-table th,
.oca-score-table td {
  border: 1px solid #dde;
  padding: 0.3rem 0.5rem;
  text-align: center;
}
.oca-score-table th {
  background: #f0f4fa;
  font-weight: 600;
  font-size: 0.85rem;
}
.oca-score-table .row-label {
  text-align: left;
  font-weight: 600;
  background: #f8f9fb;
  white-space: nowrap;
}
.oca-score-table .score-pos  { color: #1a5490; font-weight: 700; }
.oca-score-table .score-neg  { color: #b71c1c; font-weight: 700; }
.oca-score-table .score-zero { color: #555; }
.oca-score-table .trait-name-cell {
  font-size: 0.75rem;
  color: #555;
}

@media print {
  .oca-chart-wrap { border: none; page-break-inside: avoid; }
  .oca-score-table-wrap { page-break-inside: avoid; }
}

/* ═══════════════════════════════════════════════════════════════
   KRONOBIOLÓGIA SZÁMOLÓGÉP  (9. lépés)
   ═══════════════════════════════════════════════════════════════ */

.krono-app {
  max-width: 680px;
  margin: 0 auto;
}

/* ── Kártyák ── */
.krono-form-card,
.krono-section-card {
  background: #fff;
  border: 1px solid #dde3ed;
  border-radius: 8px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.krono-form-card {
  padding: 0.85rem 1.5rem;
}
.krono-form-card > .krono-label {
  display: block;
  margin-bottom: 0.4rem;
}

.krono-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7a8aaa;
  margin: 0 0 1.1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eef0f5;
}

/* ── Dátum form ── */
.krono-date-form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.krono-date-form .krono-input {
  flex: 1;
  min-width: 0;
}

.krono-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #4a5568;
  letter-spacing: 0.04em;
}

.krono-input {
  font-size: 1rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #cbd5e0;
  border-radius: 5px;
  background: #f9fafb;
  color: #1a202c;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.krono-input:focus {
  border-color: #4a90d9;
  box-shadow: 0 0 0 3px rgba(74,144,217,0.15);
  background: #fff;
}

.krono-btn {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.55rem 1.4rem;
  background: #2d6bcf;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.krono-btn:hover { background: #2558a8; }

.krono-btn-ghost {
  background: transparent;
  color: #4a6fa5;
  border: 1px solid #c0ccdc;
  font-size: 0.82rem;
  padding: 0.4rem 1rem;
}
.krono-btn-ghost:hover {
  background: #f0f4fa;
  color: #2d6bcf;
}

.krono-loading {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: #7a8aaa;
  font-style: italic;
  display: none;
}
.htmx-request .krono-loading { display: block; }

/* ── Eredmény fejléc ── */
.krono-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.krono-markers-row {
  display: flex;
  gap: 0.7rem;
  flex: 1;
  justify-content: center;
  flex-wrap: wrap;
}

.krono-marker-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #f0f4fb;
  border: 1px solid #c8d4e8;
  border-radius: 6px;
  padding: 0.35rem 0.9rem;
  min-width: 70px;
}
.krono-badge-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6a7fa8;
}
.krono-badge-val {
  font-size: 1.4rem;
  font-weight: 700;
  color: #2d6bcf;
  line-height: 1.2;
}

/* ── Kördiagram ── */
.krono-circle-wrap {
  display: flex;
  justify-content: center;
  padding: 0.5rem 0;
}
.krono-circle-wrap svg {
  width: min(360px, 100%);
  height: auto;
}

/* ── Energiák ── */
.krono-energy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.krono-energy-card {
  background: #f7f9fc;
  border: 1px solid #dde3ed;
  border-radius: 6px;
  padding: 1rem;
  text-align: center;
}

.kec-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #4a5568;
  margin-bottom: 0.2rem;
}
.kec-formula {
  font-size: 0.78rem;
  color: #7a8aaa;
  font-style: italic;
  margin-bottom: 0.5rem;
}
.kec-value {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.krono-energy-male  .kec-value { color: #1a5c5c; }
.krono-energy-female .kec-value { color: #8b3a0f; }

.krono-split-bar-wrap {
  margin-top: 1rem;
}
.krono-split-bar {
  display: flex;
  height: 10px;
  border-radius: 20px;
  overflow: hidden;
  background: #e2e8f0;
}
.krono-split-male {
  height: 100%;
  background: linear-gradient(90deg, #1a7070, #2aacac);
  transition: width 0.7s ease;
}
.krono-split-female {
  height: 100%;
  background: linear-gradient(90deg, #c05020, #8b3a0f);
  transition: width 0.7s ease;
}
.krono-split-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
}
.ksl-male   { color: #1a7070; }
.ksl-female { color: #8b3a0f; }

/* ── Összesítő táblázat ── */
.krono-table-wrap { overflow-x: auto; }

.krono-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.krono-table thead th {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6a7fa8;
  padding: 0.45rem 0.75rem;
  border-bottom: 2px solid #dde3ed;
  text-align: right;
}
.krono-table thead th:first-child { text-align: left; }
.krono-table tbody td {
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid #eef0f5;
  text-align: right;
  color: #1a202c;
}
.krono-table tfoot td {
  padding: 0.5rem 0.75rem;
  text-align: right;
  border-top: 2px solid #dde3ed;
  font-weight: 700;
  color: #2d6bcf;
  font-size: 0.92rem;
}
.krono-row-label {
  text-align: left !important;
  font-style: italic;
  color: #4a5568;
}
.krono-col-ossz { font-weight: 700; color: #1a5c5c; }
.krono-total    { color: #2d6bcf !important; font-size: 1rem !important; }

.krono-error-msg {
  color: #9b2226;
  background: #fff5f5;
  border: 1px solid #f0c0c0;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

@media (max-width: 500px) {
  .krono-energy-grid { grid-template-columns: 1fr; }
  .krono-date-form   { flex-direction: column; align-items: stretch; }
  .krono-form-card,
  .krono-section-card { padding: 1.1rem 1rem; }
}

/* Kronobiológia — dátum visszajelző */
.krono-datum-hint {
  font-size: 0.78rem;
  color: #7a8aaa;
  min-height: 1rem;
  font-variant-numeric: tabular-nums;
}
.krono-input-datum {
  font-size: 1.1rem;
  font-weight: 700;
  color: #4a5568;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.kec-symbol {
  font-size: 1.3rem;
  vertical-align: middle;
  margin-right: 0.1em;
  opacity: 0.75;
}

/* ── Csakra változók ── */
:root {
  --chakra-root:       #B94A48;
  --chakra-sacral:     #D9823B;
  --chakra-solar:      #B8920A;
  --chakra-heart:      #27AE60;
  --chakra-throat:     #2980B9;
  --chakra-third-eye:  #3F51B5;
}

/* Energia kártyák csakra alapú színekkel */
.krono-energy-male  .kec-value { color: #2980B9; }   /* torok + harmadik szem = kék irány */
.krono-energy-female .kec-value { color: #B94A48; }  /* gyökér = piros irány */
.krono-energy-male  .kec-symbol { color: #2980B9; }
.krono-energy-female .kec-symbol { color: #B94A48; }

.krono-split-male  { background: linear-gradient(90deg, #3F51B5, #2980B9); }
.krono-split-female { background: linear-gradient(90deg, #D9823B, #B94A48); }
.ksl-male   { color: #3F51B5; }
.ksl-female { color: #B94A48; }

/* ── Összesítő táblázat: M halvány, F/É/G hangsúlyos ── */
.krono-table .col-m {
  color: #aab0bc;
  font-weight: 400;
  font-size: 0.88rem;
}
.krono-table .col-feg {
  color: #1a202c;
  font-weight: 700;
  font-size: 1rem;
}
.krono-table thead .col-m   { color: #c0c8d8; }
.krono-table thead .col-feg { color: #4a5568; font-weight: 800; }
