:root {
    --bg: #f7edda;
    --box: #ffffff;
    --text: #000000;
    --border: #ccc;
    --primary: #007bff;
}

body.dark-mode {
    --bg: #1e1e1e;
    --box: #2c2c2c;
    --text: #ffffff;
    --border: #444;
    --primary: #3399ff;
}

body {
  font-family: Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  transition: background 0.3s, color 0.3s;
  margin: 0;
  padding-top: 80px;
}


/* Light háttér dark módban is a táblákhoz */
body.dark-mode table {
    background-color: #f9f9f9;
    color: #000;
}

.scrollable-table-container {
    max-height: 800px;
    overflow-y: auto;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 5px;
    margin-bottom: 20px;
}

/* Hamburger */
.hamburger {
    display: none;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text);
    margin-left: 10px;
}

/* Mobil menü */
@media (max-width: 768px) {

    header {
        flex-direction: column;
        align-items: stretch;
    }

    header > div {
        width: 100%;
        box-sizing: border-box;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 20px;
    }

    .hamburger {
        display: block;
    }

    #main-nav {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        background-color: #f6ebd8;
        padding: 20px;
        border-top: 1px solid var(--border);
        width: 100%;
        max-height: 80vh;
        overflow-y: auto;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        z-index: 9999;
    }

    #main-nav.active {
        display: flex;
    }

    #main-nav a {
        display: block;
        margin: 10px 0;
        padding: 10px;
        border: 1px solid var(--border);
        border-radius: 5px;
        background-color: #f6ebd8;
        text-align: center;
        width: 100%;
    }

    #main-nav a:hover {
        background-color: #e6dbca;
    }

    .page-nav {
        display: flex !important;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        padding: 10px 0;
    }
}

/* =====================================================
   BEJÖVŐ SZÁMLÁK – SOR SZÍNEZÉS (KIZÁRÓLAG table-invoices)
   ===================================================== */

.table-invoices tbody tr.invoice-row {
    transition: background-color 0.12s ease;
}

/* Fizetett */
.table-invoices tbody tr.invoice-row--paid {
    background-color: #ffffff !important;
}

/* Fizetetlen – normál */
.table-invoices tbody tr.invoice-row--unpaid {
    background-color: #fff3b8 !important;  /* egységes világos sárga */
}

/* Fizetetlen + lejárt */
.table-invoices tbody tr.invoice-row--overdue {
    background-color: #ffce7a !important;  /* erős narancs */
}

/* Jóváírás / negatív */
.table-invoices tbody tr.invoice-row--credit {
    background-color: #d7efff !important;  /* halvány, kellemes kék */
}

/* Hover hatás – minden típusra */
.table-invoices tbody tr.invoice-row:hover {
    filter: brightness(0.95);
    cursor: pointer;
}

/* =====================================================
   MOBIL NÉZET – MINDEN OLYAN TÁBLA, AMI NEM SZÁMLA / ÖSSZESÍTŐ / LÁTOGATÁS
   ===================================================== */

@media (max-width: 768px) {

    /* csak azokra a táblákra, ahol nincs .table-invoices, .visits-table vagy .cash-table class */
    table:not(.table-invoices):not(.visits-table):not(.cash-table),
    table:not(.table-invoices):not(.visits-table):not(.cash-table) thead,
    table:not(.table-invoices):not(.visits-table):not(.cash-table) tbody,
    table:not(.table-invoices):not(.visits-table):not(.cash-table) th,
    table:not(.table-invoices):not(.visits-table):not(.cash-table) td,
    table:not(.table-invoices):not(.visits-table):not(.cash-table) tr {
        display: block;
    }

    table:not(.table-invoices):not(.summary-table):not(.visits-table) thead tr {
        display: none;
    }

    table:not(.table-invoices):not(.summary-table):not(.visits-table) tr {
        margin-bottom: 15px;
        border: 2px solid var(--border);
        border-radius: 8px;
        padding: 10px;
        background-color: var(--box);
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }

    table:not(.table-invoices):not(.summary-table):not(.visits-table) td {
        position: relative;
        padding-left: 50%;
        border: none;
        border-bottom: 1px solid var(--border);
    }

    table:not(.table-invoices):not(.summary-table):not(.visits-table) td::before {
        position: absolute;
        top: 10px;
        left: 10px;
        width: 45%;
        white-space: nowrap;
        font-weight: bold;
        content: attr(data-label);
        color: var(--primary);
    }
}

/* ===== ÚJ FEJLÉC DESIGN - SZÁMLA TÁBLÁK ===== */

.table-invoices thead th {
    background: #f6ebd8 !important;        /* Bézs háttér */
    color: #000 !important;                /* Fekete szöveg */
    padding: 10px;
    font-weight: bold;
    border-bottom: 2px solid #d8c7b1;
    border-top: 1px solid #e9dcc7;
    border-right: 1px solid #e9dcc7;
    white-space: nowrap;
}

.table-invoices thead th a {
    color: #000 !important;
    text-decoration: none;
}

.table-invoices thead th a:hover {
    color: #000 !important;
}

/* ASC és DESC ikonok – fekete */
.table-invoices th.sorted-asc a::after {
    content: " ▲";
    color: #000 !important;
    font-weight: bold;
}

.table-invoices th.sorted-desc a::after {
    content: " ▼";
    color: #000 !important;
    font-weight: bold;
}

/* Finom hover effekt a fejlécre */
.table-invoices thead th:hover {
    background: #efdfc7 !important;
}

/* ==== Fizetetlen számlák összesítő kártya ==== */

.summary-card {
    width: 100%;
    background: #fef7ec;
    border-radius: 10px;
    border: 1px solid #e2d4c1;
    padding: 10px 15px;
    margin-bottom: 25px;
    box-sizing: border-box;
}

.summary-table {
    width: 100%;
}

/* a táblázat maga szinte olyan, mint a KPI tábla */
.summary-table {
    border-collapse: collapse;
    font-size: 13px;
    background: transparent;
}

.summary-table th,
.summary-table td {
    padding: 4px 10px;
}

.summary-table thead th {
    background: #f1e2c6;
    border-bottom: 1px solid #e2d4c1;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
}

.summary-table tbody tr:nth-child(odd) {
    background: #fffaf0;
}

.summary-table tbody tr:nth-child(even) {
    background: #fdf3e5;
}

/* skontó sor kicsit halványabb */
.summary-table .summary-row-skonto {
    background: #f7ecdd;
    font-size: 12px;
}

/* =====================================================
   LANDROVER – LÁTOGATÁSOK LISTA (visits.php)
   ===================================================== */

.visits-card {
    background: #fdf7ee;
    border: 1px solid #e0d2be;
    border-radius: 16px;
    padding: 12px 16px 14px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.04);
    margin: 12px 0 24px;
}

.visits-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 8px;
}

.visits-card-header h2 {
    margin: 0;
    font-size: 1rem;
}

.visits-card-header small {
    color: #6b7280;
    font-size: 0.8rem;
}

.visits-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.visits-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #fffdf7;
}

.visits-table thead th {
    position: sticky;
    top: 0;
    background: #f6ebd8;
    border-bottom: 1px solid #e2d4c1;
    padding: 6px 8px;
    font-weight: 600;
    white-space: nowrap;
}

.visits-table tbody td {
    padding: 4px 6px;
    border-bottom: 1px solid #f1e2c6;
    vertical-align: top;
}

/* finom zebra csíkozás */
.visits-table tbody tr:nth-child(odd) {
    background: #fffaf0;
}

.visits-table tbody tr:nth-child(even) {
    background: #fdf3e5;
}

/* hover a sorokra */
.visits-table tbody tr:hover {
    background: #ffe8bf;
    cursor: pointer;
}

/* hosszú megjegyzés oszlop */
.visits-table .col-notes {
    max-width: 550px;
}

/* =====================================================
   KÁRTYÁS ŰRLAP – ÁLTALÁNOS FORMÁZÁS
   ===================================================== */

.form-card {
    background: #fdf7ee;
    border: 1px solid #e0d2be;
    border-radius: 16px;
    padding: 14px 18px 18px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.04);
    margin: 10px 0 24px;
}

.form-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 8px;
}

.form-card-header h2 {
    margin: 0;
    font-size: 1.05rem;
}

.form-card-header small {
    color: #6b7280;
    font-size: 0.8rem;
}

/* rácsos elrendezés az űrlapmezőknek */

.form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px 16px;
    margin-top: 10px;
}

@media (max-width: 1200px) {
    .form-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.form-field label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #6b7280;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid #d6c8b4;
    background: #ffffff;
    font-size: 0.85rem;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: 2px solid rgba(212, 163, 115, 0.45);
    outline-offset: 1px;
    border-color: #d4a373;
}

/* gomb-sor az űrlap alján */

.form-card-footer {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.form-card-footer button[type="submit"] {
    padding: 6px 14px;
    border-radius: 999px;
    border: none;
    background: #e3b17b;
    color: #000;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.form-card-footer button[type="submit"]:hover {
    background: #f0c18a;
}

.form-card-footer button[type="button"] {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid #d6c8b4;
    background: #fff;
    cursor: pointer;
}

.form-card-footer button[type="button"]:hover {
    background: #f6ebd8;
}

/* ===== LOGIN PAGE ===== */

body.login-page {
    min-height: 100vh;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;

    /* ugyanaz a háttér mint a dashboardon */
    background: linear-gradient(to bottom, #f8d7da, #f7e7ce);
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.login-card {
    background: #fff8ee;
    padding: 40px 50px;
    border-radius: 18px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    text-align: center;
    width: 380px;
}

/* Login – rendszer választó mező (select) a stílushoz igazítva */

.login-card .login-field {
    margin-bottom: 12px;
    text-align: left;
}

.login-card .login-field label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #6b7280; /* ugyanaz, mint .form-field label */
}

.login-card .login-field select {
    width: 100%;
    height: 40px;                    /* ugyanakkora, mint az input */
    box-sizing: border-box;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--border); /* világos / dark módhoz is jó */
    background: #ffffff;
    font-size: 15px;
}

/* fókusz állapot – ugyanaz a finom barna keret, mint a form-card mezőknél */
.login-card .login-field select:focus {
    outline: 2px solid rgba(212, 163, 115, 0.45);
    outline-offset: 1px;
    border-color: #d4a373;
}



.login-logo {
    width: 160px;
    margin-bottom: 10px;
}

.login-card h2 {
    font-size: 20px;
    margin: 10px 0 20px;
}

.login-card input {
    width: 100%;
    height: 40px;
    margin-bottom: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 0 10px;
    font-size: 15px;
}

.login-card button {
    width: 100%;
    height: 42px;
    border: none;
    border-radius: 8px;
    background: #2b3a5f;
    color: white;
    font-size: 15px;
    cursor: pointer;
}

.login-card button:hover {
    background: #1f2b45;
}

.login-card .error {
    background: #ffe3e3;
    padding: 8px;
    border-radius: 8px;
    color: #ad0000;
    margin-bottom: 10px;
    font-size: 14px;
}

/* =====================================================
   PÉNZTÁR TÁBLA – DASHBOARD STÍLUSHOZ IGAZÍTVA
   ===================================================== */

.cash-table-card {
    background: #fdf7ee;
    border: 1px solid #e0d2be;
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.05);
    margin: 15px 0 25px;
}

.cash-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.cash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #fffdf7;
}

.cash-table thead th {
    position: sticky;
    top: 0;
    background: #f6ebd8;
    border-bottom: 2px solid #e2d4c1;
    padding: 6px 10px;
    font-weight: 600;
    white-space: nowrap;
    text-align: left;
}

.cash-table tbody td {
    padding: 5px 10px;
    border-bottom: 1px solid #f1e2c6;
    vertical-align: top;
}

/* Zebra csíkozás */
.cash-table tbody tr:nth-child(odd) {
    background: #fffaf0;
}

.cash-table tbody tr:nth-child(even) {
    background: #fdf3e5;
}

/* Hover */
.cash-table tbody tr:hover {
    background: #ffe8bf !important;
    cursor: pointer;
}

/* Szélességek finomhangolásához — opcionális */
.cash-table td.small {
    width: 80px;
    white-space: nowrap;
}

.cash-table td.medium {
    width: 140px;
}

.cash-table td.large {
    width: 260px;
}

.cash-table-wrapper {
    margin-top: 8px;
}

.cash-table td,
.cash-table th {
    font-size: 13px;
}

/* ===== Pénztár – szekciók, ugyanaz a stílus mint az új számla űrlapnál ===== */

.ip-section {
  margin-top: 12px;
}

.ip-section--card {
  background: #fef7ec;               /* ugyanaz a krém, mint a számláknál */
  border-top: 1px solid #f1e9da;
  border-bottom: 1px solid #f1e9da;
  padding: 12px 16px 16px;
}

.ip-section__title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: #4b5563;
}

/* Űrlap alap */

.cash-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Új mozgás – 3 oszlopos rács */

.cash-form--movement {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 12px 16px;
}

.cash-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

.cash-field--wide {
  grid-column: 1 / -1;
}

.cash-field--grow {
  flex: 1;
}

.cash-label {
  color: #6b7280;
}

.cash-form select,
.cash-form input[type="text"],
.cash-form input[type="number"],
.cash-form input[type="date"],
.cash-form input[type="time"],
.cash-form input[type="file"] {
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  font-size: 13px;
}

/* Szilveszter blokk */

.cash-szilv {
  grid-column: 1 / -1;
  border: 1px dashed #d4c4aa;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fdf3e4;
}

.cash-szilv__row {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  margin-bottom: 6px;
}

.cash-szilv__row input[type="checkbox"] {
  margin: 0;
}

.cash-szilv__hint {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #9ca3af;
}

/* Napi zárás sor */

.cash-close__row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: flex-end;
}

.cash-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #4b5563;
}

/* Címletfelbontás */

.cash-denoms {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #e5e7eb;
}

.cash-denoms__title {
  font-size: 13px;
  color: #4b5563;
}

.cash-denom-container {
    display: flex;
    justify-content: left;
    margin-top: 10px;
}

.cash-denom-grid {
    width: 1020px;
    display: grid;
    grid-template-columns: repeat(6, 380px);
    gap: 10px;
}

.cash-denom-grid label {
    display: flex;
    flex-direction: column;
    font-size: 13px;
}



.cash-denoms__grid input {
  width: 100%;
}

.cash-denoms__footer {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

/* CSV import */

.cash-form--import {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: flex-end;
}

.cash-help {
  margin: 4px 0 10px;
  font-size: 12px;
  color: #6b7280;
}

/* Közös gomb stílus – ugyanaz, mint az új számlánál */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  color: #111827;
}

.btn.primary {
  background: #2b3a5f;
  border-color: #2b3a5f;
  color: #ffffff;
}

.btn.primary:hover {
  background: #233150;
}

.btn.small {
  padding: 4px 10px;
  font-size: 12px;
}

/* ============================================
   IratPont – Bejelentkezett felhasználók oldal
   ============================================ */

/* Közös wrapper: bejelentkezett felhasználók + hibajegyek */
.ip-logged-wrapper,
.ip-bug-wrapper {
    max-width: 1650px;
    width: 90% !important;
    margin: 20px auto 40px;
    background: #f8f2e8;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 20px 24px 28px;
}


/* Közös header blokk */
.ip-logged-header,
.ip-bug-header {
    max-width: 1650px !important;
    width: 90% !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.ip-logged-title,
.ip-bug-title {
    font-size: 22px;
    font-weight: 600;
    margin: 0;
}

.ip-logged-subtitle,
.ip-bug-subtitle {
    font-size: 13px;
    color: #666;
    margin-top: 4px;
}


.ip-status-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    margin-bottom: 10px;
}

.ip-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f1e4d6;
}

.ip-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.ip-status-dot--active  { background: #2e7d32; }
.ip-status-dot--idle    { background: #f9a825; }
.ip-status-dot--offline { background: #757575; }

/* Közös táblastílus: logged users + bug lista */
.ip-logged-table,
.ip-bug-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 6px;
}

.ip-logged-table thead,
.ip-bug-table thead {
    background: #ecddc7;
}

.ip-logged-table th,
.ip-logged-table td,
.ip-bug-table th,
.ip-bug-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e0d2be;
    text-align: left;
    white-space: normal;
    vertical-align: top;
}

.ip-logged-table tbody tr:nth-child(even),
.ip-bug-table tbody tr:nth-child(even) {
    background: #fbf5ec;
}

/* Leírás oszlop (5. oszlop): kényszerített törés is */
.ip-bug-table td:nth-child(5) {
  overflow-wrap: anywhere;  /* modern böngészők */
  word-break: break-word;   /* fallback */
  hyphens: auto;            /* ahol támogatott, szebb törés */
}

/* opcionális: fixebb leírás-szélesség, hogy ne a többi oszlopot nyomja össze */
.ip-bug-table th:nth-child(5),
.ip-bug-table td:nth-child(5) {
  width: 38%;
}

.ip-logged-table tbody tr:hover,
.ip-bug-table tbody tr:hover {
    background: #f2e6d7;
}


.ip-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ip-user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #c49f7a;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
}

.ip-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
}

.ip-status-badge--active {
    background: #e3f3e5;
    color: #1b5e20;
}

.ip-status-badge--idle {
    background: #fff7e0;
    color: #f57f17;
}

.ip-status-badge--offline {
    background: #eeeeee;
    color: #424242;
}

.ip-current-page-muted {
    color: #777;
    font-style: italic;
}

@media (max-width: 900px) {
    .ip-logged-wrapper {
        margin: 12px;
        padding: 16px;
    }
    .ip-logged-table {
        font-size: 12px;
    }
    .ip-logged-table th,
    .ip-logged-table td {
        padding: 6px;
    }
}

/* ==========================
   Hiba jelentések – státusz
   ========================== */

.ip-bug-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
}

.ip-bug-status--open {
    background: #fff7e0;
    color: #92400e;
}

.ip-bug-status--inprogress {
    background: #e0f2fe;
    color: #075985;
}

.ip-bug-status--closed {
    background: #dcfce7;
    color: #166534;
}


.env-badge {
    position: fixed;
    left: 20px;
    bottom: 20px;
    background: #666;
    color: #fff;
    padding: 8px 14px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: bold;
    z-index: 99999;
    box-shadow: 0 0 8px rgba(0,0,0,0.3);
}

/* GTJK (zöld) */
.env-badge--gtjk {
    background-color: #2ecc71;
}

/* DEMO (narancs) */
.env-badge--ceg {
    background-color: #e67e22;
}

.page-nav--top {
    margin-top: 90px;
}

/* ===== TESZTEK – KÜLÖN STÍLUS ===== */

.test-page {
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 10px 15px;
}

.test-container {
    background: #ffffffcc;
    border-radius: 12px;
    padding: 25px 35px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.test-container h1 {
    margin-top: 0;
    margin-bottom: 10px;
}

.test-description {
    margin-bottom: 20px;
    color: #555;
}

.test-question {
    padding: 18px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.test-question:last-child {
    border-bottom: none;
}

.test-question-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
}

.test-question-text {
    margin-bottom: 10px;
}

.test-answer {
    display: flex;
    align-items: center;
    margin: 4px 0;
    font-size: 15px;
}

.test-answer label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.test-answer input[type="radio"] {
    margin-right: 8px;
}

.test-submit-wrapper {
    margin-top: 24px;
    text-align: right;
}

.test-submit-btn {
    background: #228a38;
    color: #fff;
    border: none;
    padding: 10px 22px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
}

.test-submit-btn:hover {
    background: #1c732f;
}

/* Eredmény és visszajelzés */

.test-score-box {
    background: #ffffffcc;
    border-radius: 12px;
    padding: 18px 24px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.test-score-box strong {
    font-size: 17px;
}

.feedback-block {
    margin-bottom: 12px;
    border-radius: 8px;
    padding: 12px 14px;
}

.feedback-correct {
    background: #e1f4df;
    border-left: 4px solid #5ab760;
}

.feedback-wrong {
    background: #ffe1e1;
    border-left: 4px solid #e36060;
}

.feedback-title {
    font-weight: 600;
    margin-bottom: 4px;
}

/* Admin felületek (szerkesztés, eredménylista) */

.test-admin-container {
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 10px 15px;
}

.test-admin-box {
    background: #ffffffcc;
    border-radius: 12px;
    padding: 20px 30px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.test-admin-box h1 {
    margin-top: 0;
    margin-bottom: 15px;
}

.test-form-group {
    margin-bottom: 15px;
}

.test-form-group label {
    font-weight: 600;
}

.test-form-group input[type="text"],
.test-form-group textarea,
.test-form-group select {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 8px;
}

.test-edit-question {
    padding: 14px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.test-edit-question:last-child {
    border-bottom: none;
}

.test-edit-question-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.test-edit-answers-row {
    display: flex;
    align-items: center;
    margin: 4px 0;
}

.test-edit-answers-row input[type="radio"] {
    margin-right: 6px;
}

.test-edit-answers-row input[type="text"] {
    flex: 1;
}

.test-admin-actions {
    margin-top: 20px;
}

.test-admin-actions a {
    margin-left: 10px;
}

.test-results-table {
    width: 100%;
    border-collapse: collapse;
}

.test-results-table th,
.test-results-table td {
    padding: 6px 8px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    text-align: left;
}

.test-results-table th {
    background: #f3f3f3;
}

/* ===== TESZTEK – ALFEJLÉC (SUBNAV) ===== */

.tests-subnav {
    max-width: 1200px;
    margin: 10px auto 15px;
    padding: 6px 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 14px;
}

.tests-subnav a {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    background: #fff7e6;
    color: #333;
    text-decoration: none;
    border: 1px solid rgba(0,0,0,0.08);
}

.tests-subnav a .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    background: #f39c12;
}

.tests-subnav a:hover {
    background: #ffeccc;
}

.tests-subnav a.active {
    background: #228a38;
    color: #fff;
    border-color: #228a38;
}

.tests-subnav a.active .dot {
    background: #ffffff;
}

/* ===== Dashboard – Kitölthető tesztek kártya ===== */

.dashboard-card-tests {
    background: #ffffffcc;
    border-radius: 12px;
    padding: 10px 14px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    font-size: 13px;
}

.dashboard-card-tests h3 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
}

.dashboard-tests-table {
    width: 100%;
    border-collapse: collapse;
}

.dashboard-tests-table th,
.dashboard-tests-table td {
    padding: 3px 4px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    text-align: left;
}

.dashboard-tests-table th {
    background: #f6f6f6;
    font-weight: 600;
}

.dashboard-tests-table tr:last-child td {
    border-bottom: none;
}

.btn-test-fill {
    display: inline-block;
    padding: 3px 8px;
    font-size: 12px;
    border-radius: 6px;
    border: none;
    text-decoration: none;
    background: #228a38;
    color: #fff;
}

.btn-test-fill:hover {
    background: #1c732f;
    color: #fff;
}

/* Fuvarok – mai sor kiemelés (opcionális) */
.visits-table tbody tr.today-row {
    background: #e8fff0 !important;
}


/* ===== Táblázat sor-színezés (narancsos–bézs), mint a Látogatásoknál ===== */
/* TR helyett TD – így biztosan látszik akkor is, ha a td-k kapnak háttérszínt máshonnan */
.table-striped-amber tbody tr:nth-child(odd)  > td { background: #fff3e3 !important; }
.table-striped-amber tbody tr:nth-child(even) > td { background: #f7edda !important; }

/* finom elválasztás */
.table-striped-amber tbody td { border-bottom: 1px solid rgba(0,0,0,0.06); }


/* ha van sticky fejléces scroll konténered */
.scrollable-table-container thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

/* =====================================================
   LÁTOGATÁSOK – CÉGLISTA SZÍNEK FINOMHANGOLÁS
   (visit_companies.php)
   ===================================================== */

.visits-table--companies {
  background: #fffdf7;                 /* enyhe krém, ne legyen vakító fehér */
  border: 1px solid #e0d2be;
}

.visits-table--companies thead th {
  background: #f1e2c6;                 /* kicsit erősebb, mint a default */
  border-bottom: 1px solid #e2d4c1;
}

/* Zebra – egységesen bézs */
.visits-table--companies tbody tr:nth-child(odd)  td { background: #fff3e3; }
.visits-table--companies tbody tr:nth-child(even) td { background: #f7edda; }

/* Hover – ugyanaz a “Látogatások” hangulat, de ne legyen rikító */
.visits-table--companies tbody tr:hover td {
  background: #ffe8bf !important;
}

/* Cellák szegélye – finomabb, ne legyen “rácsos” */
.visits-table--companies tbody td {
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

/* Részletek lenyíló sor – külön háttér, hogy látszódjon a váltás */
.visits-table--companies tr.details-row td {
  background: #fdf3e5 !important;
  border-top: 1px dashed #e2d4c1;
}

.ip-userchip{
  display:flex;
  align-items:center;
  gap:8px;
  min-height:26px;
}

.ip-userchip__avatar{
  width:26px;
  height:26px;
  border-radius:50%;
  object-fit:cover;
  border:1px solid var(--border, #ccc);
  background:#f5f5f5;
  flex:0 0 auto;
}

.ip-userchip__avatar--placeholder{
  display:inline-block;
  background:linear-gradient(135deg, #eee, #f8f8f8);
}

.ip-userchip__name{
  line-height:1.2;
  white-space:normal;
}

/* Pikachu lebegő gomb */
#pikachu-fab {
  position: fixed;
  top: 104px;
  right: 14px;
  bottom: auto;

  width: 56px;
  height: 56px;

  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(0,0,0,.18);
  border: 2px solid rgba(0,0,0,.08);

  z-index: 100001; /* fejléc fölé */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

#pikachu-fab img {
  width: 44px;
  height: 44px;
  display: block;
}
#pikachu-fab .badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  line-height: 20px;
  font-size: 11px;
}


/* Általános overlay + modal (ajándékküldés és ajándéknyitás) */
.ip-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 99998;
  display: none;
}
.ip-modal {
  position: fixed;
  left: 50%; top: 50%;
  transform: translate(-50%,-50%);
  width: min(720px, calc(100% - 24px));
  background: var(--box, #fff);
  color: var(--text, #000);
  border-radius: 16px;
  box-shadow: 0 18px 46px rgba(0,0,0,.25);
  border: 1px solid rgba(0,0,0,.10);
  z-index: 99999;
  display: none;
}
.ip-modal .hd {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  display: flex; align-items: center; justify-content: space-between;
}
.ip-modal .bd { padding: 16px; }
.ip-modal .ft {
  padding: 14px 16px;
  border-top: 1px solid rgba(0,0,0,.08);
  display: flex; gap: 10px; justify-content: flex-end;
}
.ip-btn {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.15);
  background: #fff;
  cursor: pointer;
}
.ip-btn.primary {
  background: var(--primary, #007bff);
  border-color: var(--primary, #007bff);
  color: #fff;
}
.ip-input, .ip-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.15);
  background: #fff;
}
.ip-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 700px) { .ip-row { grid-template-columns: 1fr; } }
.ip-help { font-size: 12px; opacity: .75; margin-top: 6px; }