:root {
      --green: #629489;
      --green-dark: #4a7269;
      --green-light: #7ab5a8;
      --gold: #d4a853;
      --gold-light: #e8c87a;
      --beige: #f5f1eb;
      --white: #ffffff;
      --gray-100: #f8f9fa;
      --gray-200: #e9ecef;
      --gray-300: #dee2e6;
      --gray-400: #ced4da;
      --gray-600: #6c757d;
      --gray-800: #343a40;
      --danger: #dc3545;
      --success: #28a745;
      --info: #17a2b8;
    }

    * { margin: 0; padding: 0; box-sizing: border-box; }

    body {
      font-family: 'Outfit', sans-serif;
      background: var(--beige);
      color: var(--gray-800);
      min-height: 100vh;
    }

    .header {
      background: linear-gradient(135deg, var(--green), var(--green-dark));
      color: white;
      padding: 20px 40px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

    .header h1 { font-size: 1.5rem; font-weight: 600; }
    .header .logo { font-size: 1.2rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }

    .main-container {
      max-width: 1600px;
      margin: 0 auto;
      padding: 30px;
      display: grid;
      grid-template-columns: 420px 1fr;
      gap: 30px;
    }

    .sidebar {
      background: white;
      border-radius: 16px;
      padding: 24px;
      box-shadow: 0 4px 20px rgba(0,0,0,0.08);
      height: fit-content;
      position: sticky;
      top: 30px;
    }

    .sidebar h2 {
      color: var(--green);
      font-size: 1.2rem;
      margin-bottom: 20px;
      padding-bottom: 12px;
      border-bottom: 2px solid var(--green-light);
    }

    .form-section { margin-bottom: 24px; }
    .form-section h3 {
      font-size: 0.95rem;
      color: var(--gray-600);
      margin-bottom: 12px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .form-group { margin-bottom: 16px; }
    .form-group label {
      display: block;
      font-size: 0.85rem;
      font-weight: 500;
      color: var(--gray-600);
      margin-bottom: 6px;
    }

    .form-group input, .form-group select {
      width: 100%;
      padding: 10px 14px;
      border: 2px solid var(--gray-200);
      border-radius: 8px;
      font-family: inherit;
      font-size: 0.95rem;
      transition: border-color 0.2s, box-shadow 0.2s;
    }

    .form-group input:focus, .form-group select:focus {
      outline: none;
      border-color: var(--green);
      box-shadow: 0 0 0 3px rgba(98, 148, 137, 0.15);
    }

    .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

    .calculate-btn {
      width: 100%;
      padding: 14px;
      background: linear-gradient(135deg, var(--green), var(--green-dark));
      color: white;
      border: none;
      border-radius: 10px;
      font-family: inherit;
      font-size: 1rem;
      font-weight: 600;
      cursor: pointer;
      transition: transform 0.2s, box-shadow 0.2s;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
    }

    .calculate-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(98, 148, 137, 0.35);
    }

    .results-area { display: flex; flex-direction: column; gap: 24px; }

    .coverage-section {
      background: white;
      border-radius: 16px;
      padding: 24px;
      box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    }

    .coverage-section h2 {
      color: var(--green);
      font-size: 1.2rem;
      margin-bottom: 20px;
      padding-bottom: 12px;
      border-bottom: 2px solid var(--green-light);
    }

    .main-coverages-section { margin-bottom: 32px; }
    .main-coverages-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
    @media (max-width: 900px) { .main-coverages-grid { grid-template-columns: 1fr; } }

    .section-title {
      font-size: 1rem;
      color: var(--green-dark);
      margin-bottom: 16px;
      padding-bottom: 8px;
      border-bottom: 1px solid var(--gray-200);
    }

    .additional-coverages-section {
      padding-top: 16px;
      border-top: 2px dashed var(--gray-300);
    }

    .coverage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

    .coverage-card {
      background: var(--gray-100);
      border: 2px solid var(--gray-200);
      border-radius: 12px;
      padding: 16px;
      transition: all 0.2s;
    }

    .coverage-card.active {
      background: rgba(98, 148, 137, 0.08);
      border-color: var(--green);
    }

    .coverage-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }

    .coverage-checkbox {
      width: 22px;
      height: 22px;
      accent-color: var(--green);
      cursor: pointer;
    }

    .coverage-title { font-weight: 600; font-size: 0.95rem; color: var(--gray-800); flex: 1; }

    .coverage-amount-input {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .coverage-amount-input input {
      width: 140px;
      padding: 8px 12px;
      border: 2px solid var(--gray-200);
      border-radius: 6px;
      font-family: inherit;
      font-size: 0.9rem;
      text-align: right;
    }

    .coverage-amount-input input:focus {
      outline: none;
      border-color: var(--green);
    }

    .coverage-amount-input span { font-size: 0.85rem; color: var(--gray-600); }

    .results-table-container {
      background: white;
      border-radius: 16px;
      padding: 24px;
      box-shadow: 0 4px 20px rgba(0,0,0,0.08);
      overflow-x: auto;
    }

    .results-table-container h2 {
      color: var(--green);
      font-size: 1.2rem;
      margin-bottom: 20px;
      padding-bottom: 12px;
      border-bottom: 2px solid var(--green-light);
    }

    .results-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.9rem;
    }

    .results-table th, .results-table td {
      padding: 14px 16px;
      text-align: left;
      border-bottom: 1px solid var(--gray-200);
    }
    .results-table th:last-child,
    .results-table td:last-child {
      width: 80px;
      text-align: center;
    }
    .product-select-radio {
      width: 20px;
      height: 20px;
      accent-color: var(--green);
      cursor: pointer;
    }

    .results-table th {
      background: var(--gray-100);
      font-weight: 600;
      color: var(--gray-600);
      font-size: 0.8rem;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .results-table tr:hover { background: var(--gray-100); }

    .insurer-name { display: flex; align-items: center; gap: 12px; font-weight: 600; }

    .insurer-cell {
      display: flex;
      align-items: center;
      gap: 12px;
    }
    
    .insurer-name-text {
      font-weight: 600;
      color: var(--gray-800);
    }
    
    .insurer-logo-fallback {
      width: 40px;
      height: 40px;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.8rem;
      font-weight: 700;
      color: white;
    }
    
    .select-cell {
      text-align: center;
    }
    
    .product-cell {
      color: var(--gray-600);
    }

    .insurer-logo {
      width: 36px;
      height: 36px;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.75rem;
      font-weight: 700;
    }

    .insurer-logo-img {
      width: 40px;
      height: 40px;
      border-radius: 8px;
      object-fit: contain;
      background: white;
      padding: 4px;
      box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }

    .price { font-weight: 700; color: var(--green-dark); }
    .price-best {
      background: var(--gold);
      color: white;
      padding: 4px 10px;
      border-radius: 12px;
      font-size: 0.75rem;
      font-weight: 600;
    }

    .summary-cards {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 16px;
      margin-bottom: 24px;
    }

    /* Három sávos fedezet ajánlás stílusok */
    .coverage-scenarios-section {
      background: white;
      border-radius: 16px;
      padding: 24px;
      box-shadow: 0 4px 20px rgba(0,0,0,0.08);
      margin-bottom: 24px;
    }
    .coverage-scenarios-section h2 {
      color: var(--green);
      font-size: 1.2rem;
      margin-bottom: 20px;
      padding-bottom: 12px;
      border-bottom: 2px solid var(--green-light);
    }
    .scenarios-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 20px;
    }
    .scenario-column {
      border: 1px solid var(--gray-300);
      border-radius: 12px;
      padding: 20px;
      background: white;
      position: relative;
    }
    .scenario-column:not(:last-child)::after {
      content: '';
      position: absolute;
      right: -10px;
      top: 0;
      bottom: 0;
      width: 1px;
      background: var(--gold);
    }
    .scenario-title {
      font-size: 1.1rem;
      font-weight: 600;
      color: var(--green-dark);
      text-decoration: underline;
      margin-bottom: 16px;
      text-align: center;
    }
    .scenario-insured-name {
      font-size: 0.95rem;
      font-weight: 500;
      color: var(--gray-800);
      margin-bottom: 12px;
    }
    .scenario-coverages {
      margin-bottom: 16px;
    }
    .scenario-coverage-item {
      font-size: 0.9rem;
      color: var(--gray-700);
      margin-bottom: 8px;
      line-height: 1.4;
    }
    .scenario-coverage-amount {
      font-weight: 600;
      color: var(--green-dark);
    }
    .scenario-term {
      font-size: 0.85rem;
      color: var(--gray-600);
      margin-bottom: 12px;
      line-height: 1.4;
    }
    .scenario-description {
      font-size: 0.85rem;
      color: var(--gray-600);
      margin-bottom: 16px;
      font-style: italic;
    }
    .scenario-premiums {
      border-top: 1px solid var(--gray-200);
      padding-top: 12px;
    }
    .scenario-premium-line {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 8px;
    }
    .scenario-premium-line:last-child {
      margin-bottom: 0;
    }
    .scenario-premium-amount {
      font-size: 1rem;
      font-weight: 600;
      color: var(--green-dark);
    }
    .scenario-premium-amount.highlight {
      font-size: 1.2rem;
      color: var(--gray-800);
    }
    .scenario-premiums:hover {
      background: var(--gray-100);
      border-radius: 6px;
      transition: background 0.2s;
    }
    .scenario-premium-percent {
      font-size: 0.8rem;
      color: var(--gray-600);
      margin-top: 2px;
    }

    .summary-card {
      background: white;
      border-radius: 12px;
      padding: 20px;
      box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    }

    .summary-card-label { font-size: 0.8rem; color: var(--gray-600); margin-bottom: 8px; }
    .summary-card-value { font-size: 1.4rem; font-weight: 700; color: var(--green-dark); }
    .summary-card-value.gold { color: var(--gold); }

    .preset-buttons { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }

    .preset-btn {
      padding: 8px 16px;
      border: 2px solid var(--gray-300);
      background: white;
      border-radius: 20px;
      cursor: pointer;
      font-family: inherit;
      font-size: 0.85rem;
      transition: all 0.2s;
    }

    .preset-btn:hover { border-color: var(--green); color: var(--green); }

    .age-display {
      background: var(--green-light);
      color: white;
      padding: 4px 12px;
      border-radius: 12px;
      font-size: 0.85rem;
      font-weight: 600;
    }

    .note-box {
      background: #fff3cd;
      border: 1px solid #ffc107;
      border-radius: 8px;
      padding: 12px;
      margin-top: 16px;
      font-size: 0.85rem;
      color: #856404;
    }

    .insured-tabs {
      display: flex;
      gap: 8px;
      margin-bottom: 16px;
    }

    .insured-tab {
      padding: 8px 16px;
      border: 2px solid var(--gray-300);
      background: white;
      border-radius: 8px;
      cursor: pointer;
      font-family: inherit;
      font-size: 0.9rem;
      transition: all 0.2s;
    }

    .insured-tab.active {
      border-color: var(--green);
      background: var(--green);
      color: white;
    }

    .insured-panel { display: none; }
    .insured-panel.active { display: block; }

    .discount-section {
      background: var(--gray-100);
      border-radius: 10px;
      padding: 16px;
      margin-top: 16px;
    }

    .discount-section h4 {
      font-size: 0.9rem;
      color: var(--green-dark);
      margin-bottom: 12px;
    }

    .discount-row {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 8px;
    }

    .discount-row label {
      font-size: 0.85rem;
      color: var(--gray-600);
    }

    .discount-value {
      font-weight: 600;
      color: var(--green);
    }

    @media (max-width: 1200px) {
      .main-container { grid-template-columns: 1fr; }
      .sidebar { position: static; }
      .summary-cards { grid-template-columns: repeat(2, 1fr); }
    }

    /* Lenyitható szekció stílusok */
    .collapsible-header {
      cursor: pointer;
      user-select: none;
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 12px 16px;
      background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
      border-radius: 10px;
      margin-bottom: 0;
      transition: all 0.2s;
    }
    .collapsible-header:hover {
      background: linear-gradient(135deg, var(--gray-200), var(--gray-300));
    }
    .collapsible-header.active {
      border-radius: 10px 10px 0 0;
      margin-bottom: 0;
    }
    .collapse-icon {
      font-size: 0.8rem;
      transition: transform 0.3s ease;
    }
    .collapsible-header.active .collapse-icon {
      transform: rotate(90deg);
    }
    .coverage-count {
      font-size: 0.75rem;
      color: var(--gray-600);
      font-weight: normal;
      margin-left: auto;
    }
    .collapsible-content {
      background: var(--gray-100);
      border-radius: 0 0 10px 10px;
      padding: 16px;
      animation: slideDown 0.3s ease;
    }
    @keyframes slideDown {
      from { opacity: 0; max-height: 0; }
      to { opacity: 1; max-height: 500px; }
    }

    /* Biztosítónkénti panel stílusok */
    .insurer-coverages-section {
      margin-top: 20px;
    }
    .insurer-panel {
      margin-bottom: 8px;
      border-radius: 10px;
      overflow: hidden;
      box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    }
    .insurer-header {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 12px 16px;
      background: linear-gradient(135deg, var(--white), var(--gray-100));
      cursor: pointer;
      transition: all 0.2s;
      border: 1px solid var(--gray-200);
      border-radius: 10px;
    }
    .insurer-header:hover {
      background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
    }
    .insurer-header.active {
      border-radius: 10px 10px 0 0;
      border-bottom: none;
      background: linear-gradient(135deg, var(--green-light), var(--green));
      color: white;
    }
    .insurer-name {
      font-weight: 600;
      font-size: 0.95rem;
    }
    .insurer-hint {
      margin-left: auto;
      font-size: 0.75rem;
      color: var(--gray-600);
    }
    .insurer-header.active .insurer-hint {
      color: rgba(255,255,255,0.8);
    }
    .insurer-content {
      padding: 16px;
      background: var(--gray-100);
      border: 1px solid var(--gray-200);
      border-top: none;
      border-radius: 0 0 10px 10px;
    }
    .coverage-grid-small {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
      gap: 10px;
    }
    .mini-coverage {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 8px 12px;
      background: white;
      border-radius: 8px;
      font-size: 0.85rem;
    }
    .mini-coverage input[type="checkbox"] {
      width: 16px;
      height: 16px;
      accent-color: var(--green);
    }
    .mini-coverage label {
      flex: 1;
      min-width: 120px;
      color: var(--gray-800);
    }
    .mini-coverage input[type="number"] {
      width: 80px;
      padding: 4px 8px;
      border: 1px solid var(--gray-300);
      border-radius: 4px;
      text-align: right;
    }
    .mini-coverage select {
      padding: 4px 8px;
      border: 1px solid var(--gray-300);
      border-radius: 4px;
    }
    .mini-coverage span {
      font-size: 0.75rem;
      color: var(--gray-600);
      min-width: 40px;
    }
    .mini-coverage .fix-text {
      font-size: 0.7rem;
      color: var(--gray-500);
      font-style: italic;
    }
    .coverage-category {
      font-weight: 600;
      color: var(--green-dark);
      margin: 12px 0 8px 0;
    }

    /* Union kiegészítő fedezetek - Slider/Radio rendszer (BestPlan színekkel) */
    .coverage-row {
      display: grid;
      grid-template-columns: 180px 1fr;
      gap: 10px;
      padding: 8px 12px;
      margin-bottom: 8px;
      background: white;
      border: 1px solid var(--gray-300);
      border-radius: 6px;
      align-items: center;
    }
    .coverage-name {
      font-weight: 500;
      color: var(--gray-800);
      font-size: 0.9rem;
    }
    .coverage-controls {
      display: flex;
      flex-direction: column;
      gap: 8px;
      flex: 1;
    }
    .radio-group {
      display: flex;
      gap: 12px;
      flex-shrink: 0;
    }
    .radio-group label {
      display: flex;
      align-items: center;
      gap: 4px;
      font-weight: normal;
      cursor: pointer;
      font-size: 0.85rem;
      white-space: nowrap;
      color: var(--gray-700);
    }
    .radio-group input[type="radio"] {
      width: auto;
      margin: 0;
      cursor: pointer;
      accent-color: var(--green);
      transform: scale(0.95);
    }
    .slider-container {
      display: flex;
      flex-direction: column;
      gap: 4px;
      flex: 1;
      min-width: 0;
    }
    .slider-container input[type="range"] {
      width: 100%;
      height: 6px;
      border-radius: 3px;
      background: var(--gray-300);
      outline: none;
      -webkit-appearance: none;
    }
    .slider-container input[type="range"]::-webkit-slider-thumb {
      -webkit-appearance: none;
      appearance: none;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: var(--green);
      cursor: pointer;
      box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    }
    .slider-container input[type="range"]::-moz-range-thumb {
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: var(--green);
      cursor: pointer;
      border: none;
      box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    }
    .slider-container input[type="range"]:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }
    .slider-value {
      font-size: 0.9rem;
      font-weight: 600;
      color: var(--green-dark);
      text-align: center;
      line-height: 1.2;
    }
    .slider-range {
      display: flex;
      justify-content: space-between;
      font-size: 0.75rem;
      color: var(--gray-600);
      line-height: 1;
    }
    .slider-info {
      padding: 4px 8px;
      font-size: 0.8rem;
      color: var(--gray-600);
      line-height: 1.4;
    }
    .fixed-fee {
      color: var(--gray-600);
      font-style: italic;
    }
    .slider-container input[type="number"] {
      width: 100%;
      padding: 6px 8px;
      border: 1px solid var(--gray-300);
      border-radius: 4px;
      font-size: 0.85rem;
    }
    .slider-container input[type="number"]:focus {
      outline: none;
      border-color: var(--green);
      box-shadow: 0 0 0 2px rgba(98, 148, 137, 0.15);
    }
    .slider-container input[type="number"]:disabled,
    .slider-container input[type="range"]:disabled {
      opacity: 0.5;
      cursor: not-allowed;
      background: var(--gray-100);
    }
      font-size: 0.85rem;
    }
    .coverage-category:first-child {
      margin-top: 0;
    }
    .coverage-note {
      font-size: 0.75rem;
      color: var(--gray-600);
      margin-top: 10px;
      padding: 8px;
      background: rgba(98, 148, 137, 0.1);
      border-radius: 6px;
    }

    /* ==================== MetLife Panel Kompakt Stílusok ==================== */

    /* MetLife panel alap grid */
    #panel-metlife .coverage-grid-small {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 6px;
      margin-bottom: 12px;
    }

    @media (max-width: 1100px) {
      #panel-metlife .coverage-grid-small {
        grid-template-columns: 1fr;
      }
    }

    /* Kompakt fedezet sor */
    #panel-metlife .mini-coverage {
      display: flex;
      align-items: center;
      gap: 5px;
      padding: 6px 10px;
      background: #f8f9fa;
      border: 1px solid #e9ecef;
      border-radius: 5px;
      font-size: 0.82rem;
      flex-wrap: nowrap;
      min-height: 36px;
    }

    #panel-metlife .mini-coverage:hover {
      background: #f0f4f3;
      border-color: #629489;
    }

    /* Checkbox */
    #panel-metlife .mini-coverage input[type="checkbox"] {
      width: 15px;
      height: 15px;
      accent-color: #629489;
      cursor: pointer;
      flex-shrink: 0;
      margin: 0;
    }

    /* Label */
    #panel-metlife .mini-coverage label {
      flex: 1 1 auto;
      min-width: 120px;
      max-width: 200px;
      font-weight: 500;
      color: #343a40;
      cursor: pointer;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      margin: 0;
      font-size: 0.8rem;
    }

    /* Összeg input - text típusú */
    #panel-metlife .mini-coverage input[type="text"] {
      width: 70px !important;
      padding: 3px 5px;
      border: 1px solid #ced4da;
      border-radius: 4px;
      font-size: 0.78rem;
      text-align: right;
    }

    /* TARTAM INPUT - KISEBB! */
    #panel-metlife .mini-coverage input[type="number"] {
      width: 38px !important;  /* Csak 2-3 számjegynyi hely */
      padding: 3px 2px;
      border: 1px solid #ced4da;
      border-radius: 4px;
      font-size: 0.78rem;
      text-align: center;
      -moz-appearance: textfield;
    }

    /* Eltünteti a number input spinnereket */
    #panel-metlife .mini-coverage input[type="number"]::-webkit-outer-spin-button,
    #panel-metlife .mini-coverage input[type="number"]::-webkit-inner-spin-button {
      -webkit-appearance: none;
      margin: 0;
    }

    /* Ft és év feliratok */
    #panel-metlife .mini-coverage > span {
      font-size: 0.72rem;
      color: #6c757d;
      white-space: nowrap;
      flex-shrink: 0;
    }

    /* Min/Max info - kisebb és halványabb */
    #panel-metlife .mini-coverage .minmax-info {
      font-size: 0.65rem !important;
      color: #aaa !important;
      white-space: nowrap;
      margin-left: 2px !important;
    }

    /* Fix tartam jelzés */
    #panel-metlife .mini-coverage .fix-text {
      font-size: 0.68rem;
      color: #629489;
      font-weight: 500;
      background: #e8f4f1;
      padding: 1px 5px;
      border-radius: 3px;
      white-space: nowrap;
      margin-left: auto;
    }

    /* Input focus */
    #panel-metlife .mini-coverage input:focus {
      outline: none;
      border-color: #629489;
      box-shadow: 0 0 0 2px rgba(98, 148, 137, 0.15);
    }

    /* Kategória címek */
    #panel-metlife .coverage-category {
      font-size: 0.85rem;
      font-weight: 600;
      color: #4a7269;
      margin: 14px 0 8px 0;
      padding-bottom: 4px;
      border-bottom: 1px solid #e0e0e0;
    }

    /* Debug Panel Styles */
    .debug-trigger {
      position: fixed;
      bottom: 10px;
      right: 10px;
      width: 24px;
      height: 24px;
      background: transparent;
      border: none;
      cursor: pointer;
      opacity: 0.1;
      transition: opacity 0.3s;
      z-index: 9998;
      font-size: 16px;
    }
    .debug-trigger:hover {
      opacity: 0.8;
    }
    
    .debug-panel {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0,0,0,0.7);
      z-index: 9999;
      overflow: auto;
      padding: 20px;
    }
    .debug-panel.active {
      display: flex;
      justify-content: center;
      align-items: flex-start;
    }
    .debug-content {
      background: #1a1a2e;
      color: #e0e0e0;
      border-radius: 12px;
      max-width: 1200px;
      width: 100%;
      max-height: 90vh;
      overflow: auto;
      font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
      font-size: 12px;
      margin-top: 20px;
    }
    .debug-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 15px 20px;
      background: #16213e;
      border-radius: 12px 12px 0 0;
      border-bottom: 1px solid #0f3460;
      position: sticky;
      top: 0;
      z-index: 10;
    }
    .debug-header h2 {
      margin: 0;
      color: #00d9ff;
      font-size: 16px;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .debug-close {
      background: #e94560;
      color: white;
      border: none;
      padding: 6px 16px;
      border-radius: 6px;
      cursor: pointer;
      font-weight: 600;
    }
    .debug-close:hover {
      background: #ff6b6b;
    }
    .debug-body {
      padding: 20px;
    }
    .debug-section {
      margin-bottom: 20px;
      background: #16213e;
      border-radius: 8px;
      overflow: hidden;
    }
    .debug-section-header {
      background: #0f3460;
      padding: 10px 15px;
      font-weight: 600;
      color: #00d9ff;
      cursor: pointer;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .debug-section-header:hover {
      background: #1a4a7a;
    }
    .debug-section-content {
      padding: 15px;
    }
    .debug-table {
      width: 100%;
      border-collapse: collapse;
    }
    .debug-table th,
    .debug-table td {
      padding: 8px 12px;
      text-align: left;
      border-bottom: 1px solid #0f3460;
    }
    .debug-table th {
      background: #0f3460;
      color: #00d9ff;
      font-weight: 600;
    }
    .debug-table tr:hover {
      background: rgba(0,217,255,0.05);
    }
    .debug-value {
      color: #4ade80;
      font-weight: 600;
    }
    .debug-value.negative {
      color: #f87171;
    }
    .debug-label {
      color: #94a3b8;
    }
    .debug-insurer-tabs {
      display: flex;
      gap: 5px;
      padding: 10px 20px;
      background: #16213e;
      flex-wrap: wrap;
    }
    .debug-insurer-tab {
      padding: 8px 16px;
      background: #0f3460;
      border: none;
      border-radius: 6px;
      color: #94a3b8;
      cursor: pointer;
      font-size: 12px;
      transition: all 0.2s;
    }
    .debug-insurer-tab:hover {
      background: #1a4a7a;
      color: #e0e0e0;
    }
    .debug-insurer-tab.active {
      background: #00d9ff;
      color: #1a1a2e;
      font-weight: 600;
    }
    .debug-insurer-content {
      display: none;
    }
    .debug-insurer-content.active {
      display: block;
    }
    .debug-summary-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 15px;
      margin-bottom: 20px;
    }
    .debug-summary-card {
      background: #16213e;
      padding: 15px;
      border-radius: 8px;
      text-align: center;
    }
    .debug-summary-card .label {
      color: #94a3b8;
      font-size: 11px;
      margin-bottom: 5px;
    }
    .debug-summary-card .value {
      color: #00d9ff;
      font-size: 18px;
      font-weight: 700;
    }
    .debug-json {
      background: #0d1117;
      padding: 15px;
      border-radius: 6px;
      overflow-x: auto;
      white-space: pre-wrap;
      font-size: 11px;
      color: #8b949e;
      max-height: 300px;
      overflow-y: auto;
    }
    .debug-copy-btn {
      background: #238636;
      color: white;
      border: none;
      padding: 4px 12px;
      border-radius: 4px;
      cursor: pointer;
      font-size: 11px;
      margin-left: 10px;
    }
    .debug-copy-btn:hover {
      background: #2ea043;
    }
    /* Debug Console */
    .debug-trigger {
      position: fixed;
      bottom: 10px;
      right: 10px;
      width: 20px;
      height: 20px;
      opacity: 0.1;
      cursor: pointer;
      z-index: 9999;
      font-size: 14px;
      transition: opacity 0.3s;
    }
    .debug-trigger:hover {
      opacity: 0.5;
    }
    .debug-console {
      display: none;
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      height: 40vh;
      background: #1e1e1e;
      border-top: 3px solid #007acc;
      z-index: 10000;
      font-family: 'Consolas', 'Monaco', monospace;
      font-size: 12px;
    }
    .debug-console.open {
      display: flex;
      flex-direction: column;
    }
    .debug-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 8px 15px;
      background: #252526;
      border-bottom: 1px solid #3c3c3c;
    }
    .debug-header h3 {
      color: #007acc;
      margin: 0;
      font-size: 14px;
    }
    .debug-controls {
      display: flex;
      gap: 10px;
    }
    .debug-controls button {
      background: #3c3c3c;
      border: none;
      color: #ccc;
      padding: 5px 12px;
      border-radius: 3px;
      cursor: pointer;
      font-size: 11px;
    }
    .debug-controls button:hover {
      background: #4c4c4c;
    }
    .debug-controls button.close-btn {
      background: #c42b1c;
    }
    .debug-controls button.close-btn:hover {
      background: #e03e2d;
    }
    .debug-tabs {
      display: flex;
      background: #2d2d2d;
      border-bottom: 1px solid #3c3c3c;
    }
    .debug-tab {
      padding: 8px 16px;
      color: #888;
      cursor: pointer;
      border-bottom: 2px solid transparent;
      font-size: 12px;
    }
    .debug-tab:hover {
      color: #ccc;
    }
    .debug-tab.active {
      color: #fff;
      border-bottom-color: #007acc;
    }
    .debug-content {
      flex: 1;
      overflow: auto;
      padding: 10px 15px;
    }
    .debug-log {
      color: #d4d4d4;
      white-space: pre-wrap;
      word-break: break-all;
    }
    .debug-log .log-entry {
      padding: 3px 0;
      border-bottom: 1px solid #2d2d2d;
    }
    .debug-log .log-time {
      color: #6a9955;
      margin-right: 10px;
    }
    .debug-log .log-info { color: #4fc1ff; }
    .debug-log .log-warn { color: #dcdcaa; background: rgba(220, 220, 170, 0.1); }
    .debug-log .log-error { color: #f48771; background: rgba(244, 135, 113, 0.1); }
    .debug-log .log-success { color: #89d185; }
    .debug-state-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
      gap: 15px;
    }
    .debug-state-card {
      background: #2d2d2d;
      border-radius: 5px;
      padding: 12px;
    }
    .debug-state-card h4 {
      color: #007acc;
      margin: 0 0 10px 0;
      font-size: 12px;
      text-transform: uppercase;
    }
    .debug-state-card pre {
      color: #d4d4d4;
      margin: 0;
      font-size: 11px;
      overflow-x: auto;
    }
    .debug-calc-panel {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 15px;
      height: 100%;
    }
    .debug-calc-input, .debug-calc-output {
      background: #2d2d2d;
      border-radius: 5px;
      padding: 12px;
      overflow: auto;
    }
    .debug-calc-input h4, .debug-calc-output h4 {
      color: #007acc;
      margin: 0 0 10px 0;
      font-size: 12px;
    }
    .debug-calc-input pre, .debug-calc-output pre {
      color: #d4d4d4;
      margin: 0;
      font-size: 11px;
    }

/* === CIG KIEGÉSZÍTŐ FEDEZETEK === */
.coverage-limit-hint {
  display: block;
  font-size: 11px;
  color: #666;
  margin-top: 2px;
}

.cig-warning {
  background: #fff3cd;
  border: 1px solid #ffc107;
  padding: 8px 12px;
  border-radius: 4px;
  margin: -5px 0 10px 25px;
  font-size: 12px;
  color: #856404;
}

#cig-balhal-amt {
  background: #f0f0f0 !important;
  cursor: not-allowed;
}

#cig-balhal-hint {
  color: #28a745;
  font-weight: 500;
}

/* === EGYSÉGES MINI-COVERAGE STÍLUS === */
.mini-coverage {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 6px;
}

.mini-coverage input[type="checkbox"] {
  flex-shrink: 0;
}

.mini-coverage label {
  flex: 1;
  min-width: 180px;
  max-width: 280px;
  font-size: 13px;
  line-height: 1.3;
}

.mini-coverage input[type="text"],
.mini-coverage input[type="number"] {
  width: 110px !important;
  min-width: 110px;
  max-width: 110px;
  padding: 6px 8px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 13px;
  text-align: right;
}

.mini-coverage span:not(.coverage-limit-hint) {
  font-size: 12px;
  color: #666;
  min-width: 40px;
}

.mini-coverage .coverage-limit-hint {
  width: 100%;
  margin-left: 28px;
  margin-top: 0;
}
/* ============================================
   AUTH / LOGIN STYLES
   ============================================ */

.header-user {
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  font-size: 0.9rem;
}

.header-user span {
  opacity: 0.9;
}

.btn-logout {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s, border-color 0.2s;
}

.btn-logout:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.5);
}

/* Loading overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-overlay.hidden {
  display: none;
}

.loading-content {
  background: white;
  padding: 30px 40px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--gray-200);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-content p {
  color: var(--gray-600);
  font-size: 0.95rem;
}

/* API hiba jelzés */
.api-error {
  background: #fff5f5;
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 12px 16px;
  border-radius: 8px;
  margin: 10px 0;
  font-size: 0.9rem;
}

.api-error.hidden {
  display: none;
}

/* === CHAT RENDSZER - Értesítések és Támogatás === */
#chatSystem { 
  position: fixed; 
  top: 80px; 
  right: 20px; 
  z-index: 9999; 
}
.chat-toggle {
  width: 50px; height: 50px; border-radius: 50%; 
  background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px;
  cursor: pointer; box-shadow: 0 4px 15px rgba(0,0,0,0.25); position: relative;
  border: 2px solid rgba(255,255,255,0.3);
}
.chat-toggle:hover { transform: scale(1.08); box-shadow: 0 6px 20px rgba(0,0,0,0.3); }
.chat-badge {
  position: absolute; top: -6px; right: -6px; background: #e53e3e; color: #fff;
  font-size: 11px; min-width: 20px; height: 20px; line-height: 20px; text-align: center;
  border-radius: 10px; font-weight: 700; box-shadow: 0 2px 6px rgba(229,62,62,0.4);
}
.chat-badge.hidden { display: none; }
.chat-panel {
  position: absolute; top: 60px; right: 0; width: 380px; max-height: 520px;
  background: #fff; border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  overflow: hidden; display: flex; flex-direction: column;
  border: 1px solid rgba(0,0,0,0.08);
}
.chat-panel.hidden { display: none !important; }
.chat-tabs { display: flex; background: #f7fafc; border-bottom: 1px solid #e2e8f0; }
.chat-tab {
  flex: 1; padding: 14px 12px; border: none; background: none; cursor: pointer;
  font-size: 13px; color: #4a5568; transition: all 0.2s; font-weight: 500;
}
.chat-tab:hover { background: #edf2f7; }
.chat-tab.active { background: #fff; color: #1a365d; font-weight: 600; border-bottom: 3px solid #2c5282; }
.chat-content { flex: 1; overflow-y: auto; max-height: 360px; padding: 16px; }
.chat-content.hidden { display: none !important; }
.chat-empty { color: #a0aec0; text-align: center; padding: 50px 20px; font-size: 14px; }
#restrictionChat { display: flex; flex-direction: column; gap: 10px; }
.chat-msg {
  background: linear-gradient(135deg, #c53030 0%, #9b2c2c 100%);
  color: #fff; padding: 12px 16px; border-radius: 12px;
  font-size: 13px; line-height: 1.5; 
  box-shadow: 0 3px 12px rgba(197,48,48,0.3); animation: chatSlide 0.3s ease-out;
}
.chat-msg .chat-insurer { font-weight: 700; color: #ffd700; display: block; margin-bottom: 4px; font-size: 12px; }
.chat-msg .chat-text { color: #fff; }
.chat-msg .chat-time { font-size: 10px; color: rgba(255,255,255,0.6); display: block; margin-top: 6px; }
@keyframes chatSlide { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
#supportMessages { min-height: 100px; }
.support-msg { padding: 12px 16px; border-radius: 12px; margin-bottom: 10px; max-width: 85%; font-size: 13px; }
.support-msg.user { background: #edf2f7; margin-left: auto; border-radius: 12px 12px 4px 12px; }
.support-msg.admin { background: linear-gradient(135deg, #38a169 0%, #2f855a 100%); color: #fff; border-radius: 12px 12px 12px 4px; }
.support-msg .msg-time { font-size: 10px; color: #718096; display: block; margin-top: 6px; }
.support-msg.admin .msg-time { color: rgba(255,255,255,0.7); }
.support-msg.status { background: #fefcbf; color: #744210; text-align: center; max-width: 100%; font-size: 12px; }
.support-form { border-top: 1px solid #e2e8f0; padding: 16px; background: #f7fafc; }
.support-form textarea {
  width: 100%; height: 70px; border: 1px solid #cbd5e0; border-radius: 10px;
  padding: 12px; font-size: 13px; resize: none; margin-bottom: 10px; font-family: inherit;
}
.support-form textarea:focus { outline: none; border-color: #2c5282; box-shadow: 0 0 0 3px rgba(44,82,130,0.1); }
.support-attachments { margin-bottom: 12px; }
.support-attachments input[type="file"] { display: none; }
.support-attachments label {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; 
  background: #edf2f7; border-radius: 8px; cursor: pointer; font-size: 13px; color: #4a5568;
  transition: all 0.2s;
}
.support-attachments label:hover { background: #e2e8f0; }
#fileList { margin-top: 8px; font-size: 12px; color: #718096; }
#fileList .file-item { display: inline-block; background: #d1fae5; color: #065f46; padding: 4px 10px; border-radius: 6px; margin: 3px; font-weight: 500; }
.support-send {
  width: 100%; padding: 12px; background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
  color: #fff; border: none; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 14px;
  transition: all 0.2s;
}
.support-send:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(26,54,93,0.3); }

/* BestPlan Header Logo */
.header-logo-img {
  height: 36px;
  width: auto;
  margin-right: 8px;
  vertical-align: middle;
  max-width: 150px;
  object-fit: contain;
}

.header .logo .header-logo-img {
  background: white;
  padding: 6px 12px;
  border-radius: 50px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  height: 32px;
  width: auto;
}

/* Insurer logos */
.insurer-logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
  background: white;
  padding: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.insurer-mini-logo {
  background: white !important;
  padding: 8px 18px !important;
  border-radius: 40px !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12) !important;
  height: 48px !important;
  width: auto !important;
  max-width: 150px !important;
  object-fit: contain !important;
}

/* ============================================
   RESULTS TABLE - JAVÍTOTT STÍLUSOK
   Left-align biztosító oszlop a cikkcakk elkerülése végett
   Rakd be a styles.css VÉGÉRE
   ============================================ */

.results-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.95rem;
}

.results-table thead th {
  background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
  padding: 14px 16px;
  font-weight: 600;
  color: #4a5568;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #e2e8f0;
}

/* BIZTOSÍTÓ oszlop - BAL IGAZÍTÁS */
.results-table thead th:first-child {
  text-align: left;
  padding-left: 20px;
  border-radius: 12px 0 0 0;
}

/* TERMÉK oszlop - BAL IGAZÍTÁS */
.results-table thead th:nth-child(2) {
  text-align: left;
}

/* Díj oszlopok - JOBB IGAZÍTÁS */
.results-table thead th:nth-child(3),
.results-table thead th:nth-child(4) {
  text-align: right;
}

/* Választott - KÖZÉP */
.results-table thead th:last-child {
  text-align: center;
  border-radius: 0 12px 0 0;
}

.results-table tbody tr {
  transition: all 0.2s ease;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
}

.results-table tbody tr:hover {
  background: #f8fafc;
}

.results-table tbody tr:last-child td:first-child {
  border-radius: 0 0 0 12px;
}

.results-table tbody tr:last-child td:last-child {
  border-radius: 0 0 12px 0;
}

.results-table tbody td {
  padding: 14px 16px;
  vertical-align: middle;
}

/* Biztosító cella - BAL IGAZÍTÁS, fix szélesség */
.results-table tbody td:first-child {
  text-align: left;
  padding-left: 20px;
  min-width: 200px;
}

/* Termék cella - BAL IGAZÍTÁS */
.results-table tbody td:nth-child(2) {
  text-align: left;
  min-width: 150px;
}

/* Díj cellák - JOBB IGAZÍTÁS */
.results-table tbody td:nth-child(3),
.results-table tbody td:nth-child(4) {
  text-align: right;
  min-width: 110px;
}

/* Választott - KÖZÉP */
.results-table tbody td:last-child {
  text-align: center;
  width: 100px;
}

/* Biztosító cella belső elrendezés - BALRA */
.results-table .insurer-cell {
  display: flex;
  align-items: center;
  justify-content: flex-start !important; /* BAL IGAZÍTÁS */
  gap: 12px;
}

.results-table .insurer-logo-img {
  background: white !important;
  padding: 8px 16px !important;
  border-radius: 30px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12) !important;
  height: 44px !important;
  width: auto !important;
  max-width: 120px !important;
  object-fit: contain !important;
  flex-shrink: 0;
}

.results-table .insurer-logo-fallback {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: white;
  flex-shrink: 0;
}

.results-table .insurer-name-text {
  font-weight: 600;
  color: #2d3748;
  font-size: 0.95rem;
  white-space: nowrap;
}

/* Termék cella */
.results-table .product-cell {
  color: #718096;
  font-size: 0.9rem;
}

/* Díj cellák */
.results-table .price {
  font-weight: 600;
  color: #2d3748;
  font-size: 1rem;
  white-space: nowrap;
}

.results-table .price-monthly {
  color: #38a169;
  font-size: 1.1rem;
}

/* Custom Radio Button */
.results-table .product-select-radio {
  appearance: none;
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border: 2px solid #cbd5e0;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.results-table .product-select-radio:hover {
  border-color: #38a169;
}

.results-table .product-select-radio:checked {
  border-color: #38a169;
  background: #38a169;
}

.results-table .product-select-radio:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 14px;
  font-weight: bold;
}

.results-table .product-select-radio:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* KIVÁLASZTOTT sor kiemelése - zöld keret */
.results-table tbody tr.result-selected {
  background: linear-gradient(135deg, #f0fff4 0%, #e6ffed 100%);
  position: relative;
}

.results-table tbody tr.result-selected td {
  border-top: 2px solid #38a169;
  border-bottom: 2px solid #38a169;
}

.results-table tbody tr.result-selected td:first-child {
  border-left: 2px solid #38a169;
  border-radius: 12px 0 0 12px;
}

.results-table tbody tr.result-selected td:last-child {
  border-right: 2px solid #38a169;
  border-radius: 0 12px 12px 0;
}

.results-table tbody tr.result-selected .price {
  color: #276749;
  font-weight: 700;
}

/* Hiba sor */
.results-table tbody tr.result-error,
.results-table tbody tr.error-row {
  opacity: 0.5;
  background: #fafafa;
  cursor: not-allowed;
}

.results-table tbody tr.result-error:hover,
.results-table tbody tr.error-row:hover {
  background: #fafafa;
}

.results-table tbody tr.result-error .price,
.results-table tbody tr.error-row .price {
  color: #a0aec0;
}