/* ==========================================================================
   Naplóolvasó - "technikai audit-jelentés" vizuális rendszer
   Tudatosan NEM generikus SaaS-dashboard: hűvös, papír-fehér vászon, mély
   indigó akcentus, minden naplóadat monospace betűtípussal, "ink-stamp"
   pecsét-verdikt, számozott exhibit-szekciók (CSS counter).
   Nincs külső webfont-betöltés (szigorú CSP + "nincs külső függőség" elv).
   ========================================================================== */

/* A színek/tipográfia/sugarak/árnyékok EGYETLEN forrása a brand.css - lásd
   ott a design-tokenek dokumentációját. Ez a fájl KIZÁRÓLAG a komponensek
   (fejléc, kártyák, gombok stb.) elrendezését és egyedi stílusát adja.
   FONTOS: a brand.css-t az index.php <head>-je KÖZVETLENÜL linkeli (ELŐBB,
   mint ezt a fájlt) - itt NEM @import-áljuk, hogy ne legyen felesleges,
   plusz round-trip-et igénylő CSS-import lánc. */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-sans);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding-top: var(--header-height);
    padding-bottom: var(--footer-height);
}

a {
    color: var(--accent);
}

/* ---------------------------- Fejléc / feltöltés ---------------------------- */

.app-footer {
    text-align: center;
    padding: 0.75rem 1.5rem;
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--paper-alt) 92%, transparent);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--footer-height);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.app-footer p {
    margin: 0;
    font-size: 0.78rem;
    color: var(--ink-soft);
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.75rem;
    background: color-mix(in srgb, var(--surface) 75%, transparent);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: var(--ink);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    box-sizing: border-box;
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.brand-mark-logo {
    display: block;
    height: 2.75rem;
    width: auto;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-search {
    position: relative;
    display: flex;
    align-items: center;
}

.header-search-icon {
    position: absolute;
    left: 0.65rem;
    width: 16px;
    height: 16px;
    color: var(--ink-soft);
    pointer-events: none;
}

.header-search #global-search {
    width: 15rem;
    padding: 0.45rem 1.8rem 0.45rem 2rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    font-family: var(--font-sans);
    font-size: 0.82rem;
    color: var(--ink);
}

/* A böngésző natív "×" törlés-ikonját (type="search" mezőknél) elrejtjük -
   a SAJÁT, egységesen stílusozott .header-search-clear gombunkat mutatjuk
   helyette, minden böngészőben egyformán. */
.header-search #global-search::-webkit-search-cancel-button {
    display: none;
}

.header-search-clear {
    position: absolute;
    right: 0.5rem;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--ink-soft);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.header-search-clear:hover {
    background: var(--paper-alt);
    color: var(--ink);
}

.header-search #global-search:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

/* A márka-arculat .brand-scroll-top ("Vissza a tetejére" gomb) alap
   pozíciója (bottom: 18px) a fixált láblécünk (lásd .app-footer) MÖGÉ/ALÁ
   csúszna - ezt a lábléc magasságával megemelve igazítjuk. */
.brand-scroll-top {
    bottom: calc(var(--footer-height) + 1rem) !important;
    z-index: 90;
}

.brand h1 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.subtitle {
    margin: 0;
    font-size: 0.78rem;
    color: var(--ink-soft);
    font-family: var(--font-sans);
}

/* ---------------------------- Feltöltő szekció (body) ---------------------------- */

.upload-section {
    max-width: 720px;
    margin: 1.75rem auto 0;
    padding: 0 1.5rem;
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 2rem 1.5rem;
    border: 2px dashed var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    text-align: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.dropzone:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.dropzone.dropzone-active {
    border-color: var(--accent);
    background: var(--accent-light);
    box-shadow: var(--shadow-md);
}

.dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.dropzone-icon {
    font-size: 1.8rem;
    color: var(--accent);
}

.dropzone-text {
    font-size: 0.95rem;
    color: var(--ink);
}

.dropzone-hint {
    font-size: 0.72rem;
    color: var(--ink-soft);
    font-family: var(--font-mono);
}

.selected-files {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.selected-files:empty {
    display: none;
}

.selected-files li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.4rem 0.7rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: 0.78rem;
}

.selected-files .file-size {
    color: var(--ink-soft);
    flex: 0 0 auto;
}

.selected-files li.file-too-many {
    border-color: var(--danger);
    color: var(--danger);
}

.upload-form .btn-primary {
    align-self: flex-start;
}

/* ---------------------------- Oldalsávbeli (kompakt) feltöltés ---------------------------- */

.sidebar-upload {
    border-top: 1px solid var(--line);
    padding-top: 0.85rem;
}

.upload-form-compact {
    gap: 0.6rem;
}

.upload-form-compact .dropzone {
    padding: 0.9rem 0.6rem;
    gap: 0.25rem;
    border-radius: 6px;
}

.upload-form-compact .dropzone-icon {
    font-size: 1.15rem;
}

.upload-form-compact .dropzone-text {
    font-size: 0.74rem;
    line-height: 1.3;
}

.upload-form-compact .dropzone-hint {
    font-size: 0.6rem;
    line-height: 1.4;
}

.upload-form-compact .selected-files li {
    font-size: 0.68rem;
    padding: 0.3rem 0.5rem;
    flex-wrap: wrap;
}

.upload-form-compact .btn-primary {
    align-self: stretch;
    text-align: center;
    font-size: 0.8rem;
    padding: 0.5rem 0.8rem;
}

.btn-primary,
.btn-secondary {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius);
    border: 1px solid var(--accent);
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--accent-dark);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary {
    background: var(--surface);
    color: var(--accent);
}

.btn-secondary:hover {
    background: var(--accent-light);
}

.panel-hint {
    font-size: 0.82rem;
    color: var(--ink-soft);
}

.text-danger {
    color: var(--danger);
}

/* ---------------------------- Riasztások / állapotok ---------------------------- */

.alert {
    margin: 1rem 1.5rem;
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius);
    border-left: 4px solid;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.alert-error {
    border-left-color: var(--danger);
    background: var(--danger-bg);
    color: var(--danger);
}

.alert-info {
    border-left-color: var(--warn);
    background: var(--warn-bg);
    color: var(--warn);
}

.alert-close {
    flex: 0 0 auto;
    background: transparent;
    border: none;
    font-size: 1.2rem;
    line-height: 1;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    padding: 0 0.2rem;
}

.alert-close:hover {
    opacity: 1;
}

.alert-body {
    flex: 1 1 auto;
}

.alert-detail {
    margin-top: 0.3rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    opacity: 0.85;
}

.hero {
    margin: 2.5rem auto;
    max-width: 720px;
    padding: 0 1.5rem;
    text-align: center;
}

.hero-title {
    font-size: 1.6rem;
    color: var(--accent-dark);
    margin: 0 0 0.75rem;
}

.hero-lead {
    color: var(--ink-soft);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 1.5rem;
}

.trust-badges {
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
}

.trust-badges li {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.8rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.78rem;
    color: var(--ink);
}

.trust-badge-icon {
    font-size: 0.9rem;
}

.hero-hint {
    font-size: 0.78rem;
    color: var(--ink-soft);
    font-style: italic;
}

/* Honeypot mező: valódi felhasználó számára láthatatlan, de a DOM-ban és a
   tabuláció-sorrendben sem "display: none"-nal rejtjük el (egyes botok
   kiszűrik a display:none mezőket) - helyette a látható területen kívülre
   pozicionáljuk, 0 méretű, átlátszó dobozban. */
.honeypot-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.empty-hint {
    font-size: 0.85rem;
    color: var(--ink-soft);
    font-style: italic;
}

/* ---------------------------- Elrendezés ---------------------------- */

.layout {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.25rem;
    max-width: 1400px;
    margin: 0 auto;
}

.sidebar {
    position: sticky;
    top: calc(var(--header-height) + 1rem);
    flex: 0 0 220px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    counter-reset: exhibit;
    max-height: calc(100vh - var(--header-height) - var(--footer-height) - 2rem);
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.nav-group-title {
    margin: 0;
    padding: 0 0.2rem;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.exhibit-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.exhibit-nav li {
    counter-increment: exhibit;
    border-bottom: 1px solid var(--line);
}

.exhibit-nav li:last-child {
    border-bottom: none;
}

.exhibit-nav a {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.65rem 0.8rem;
    text-decoration: none;
    color: var(--ink);
    font-size: 0.85rem;
}

.exhibit-nav a::before {
    content: counter(exhibit, decimal-leading-zero);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--accent);
}

.exhibit-nav a.tab-link.active,
.exhibit-nav a.tab-link:hover {
    background: var(--paper-alt);
    color: var(--accent-dark);
    font-weight: bold;
}

.content {
    flex: 1 1 auto;
    min-width: 0;
}

.tab-panel {
    display: none;
    counter-reset: panel-exhibit;
}

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

/* ---------------------------- Verdikt-pecsét ---------------------------- */

.verdict-stamp {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.1rem 1.35rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.25rem;
    border: 1px solid currentColor;
    box-shadow: var(--shadow-sm);
}

.verdict-rendben {
    background: var(--ok-bg);
    color: var(--ok);
}

.verdict-figyelem {
    background: var(--warn-bg);
    color: var(--warn);
}

.verdict-veszely {
    background: var(--danger-bg);
    color: var(--danger);
}

/* Modern, egységesen KÖR alakú státusz-jelvény mindhárom állapothoz
   (a korábbi háromszög/oktagon "papír-pecsét" formák helyett) - csak a
   belső ikon és a szín különbözteti meg őket, ez a szokásos "enterprise"
   dashboard mintázat (pl. egy státusz-pötty/badge). */
.stamp-seal {
    flex: 0 0 auto;
    width: 2.75rem;
    height: 2.75rem;
    display: inline-block;
    background: currentColor;
    border-radius: 50%;
}

/* "rendben" = pipa ikon. */
.verdict-rendben .stamp-seal {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M9 16.2l-3.5-3.5-1.4 1.4L9 19 20 8l-1.4-1.4z'/%3E%3C/svg%3E") center/55% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M9 16.2l-3.5-3.5-1.4 1.4L9 19 20 8l-1.4-1.4z'/%3E%3C/svg%3E") center/55% no-repeat;
}

/* "figyelem" = felkiáltójel ikon. */
.verdict-figyelem .stamp-seal {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect fill='%23000' x='11' y='4' width='2' height='10'/%3E%3Crect fill='%23000' x='11' y='16' width='2' height='2'/%3E%3C/svg%3E") center/45% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect fill='%23000' x='11' y='4' width='2' height='10'/%3E%3Crect fill='%23000' x='11' y='16' width='2' height='2'/%3E%3C/svg%3E") center/45% no-repeat;
}

/* "veszély" = X (times) ikon. */
.verdict-veszely .stamp-seal {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M18.3 5.71L12 12.01l6.3 6.3-1.41 1.42L10.59 13.42 4.29 19.72 2.88 18.3l6.3-6.3-6.3-6.3L4.29 4.28l6.3 6.3 6.3-6.3z'/%3E%3C/svg%3E") center/50% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M18.3 5.71L12 12.01l6.3 6.3-1.41 1.42L10.59 13.42 4.29 19.72 2.88 18.3l6.3-6.3-6.3-6.3L4.29 4.28l6.3 6.3 6.3-6.3z'/%3E%3C/svg%3E") center/50% no-repeat;
}

.stamp-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.stamp-text strong {
    font-size: 1.2rem;
    letter-spacing: 0.05em;
}

.stamp-text span {
    font-size: 0.85rem;
}

.stamp-cta {
    margin-left: auto;
    flex: 0 0 auto;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: inherit;
    text-decoration: underline;
    white-space: nowrap;
}

.external-badge {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.1rem 0.45rem;
    border-radius: var(--radius);
    background: var(--paper-alt);
    color: var(--ink-soft);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    vertical-align: middle;
}

/* ---------------------------- Statisztika-kártyák ---------------------------- */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 8px solid transparent;
    border-radius: var(--radius);
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.15s ease;
}

.stat-card.stat-warn {
    border-color: var(--danger);
    border-left-color: var(--danger);
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-dark);
}

.stat-card.stat-warn .stat-value {
    color: var(--danger);
}

/* ---------------------------- 12 elemű szín-paletta ----------------------------
   UGYANAZ a 12 szín adja a statisztika-dobozok bal oldali csíkját (stat-color-N)
   ÉS a diagram-oszlopok kitöltését (bar-color-N) - ugyanaz a kulcs (pl. egy CMS
   típus-azonosítója) mindkét helyen ugyanazt a színt kapja (lásd
   colorClassForKey() az index.php-ban), így vizuálisan összeköthetők.
   A paletta SZÁNDÉKOSAN barátságos, modern, IT/dashboard-stílusú (élénk,
   telített, jó kontrasztú) színekből áll - nem a papír-fehér audit-jelentés
   tompább tónusaiból. */

.stat-card.stat-color-0 { border-left-color: #3b82f6; background: rgba(59, 130, 246, 0.1); }
.stat-card.stat-color-1 { border-left-color: #ef4444; background: rgba(239, 68, 68, 0.1); }
.stat-card.stat-color-2 { border-left-color: #10b981; background: rgba(16, 185, 129, 0.1); }
.stat-card.stat-color-3 { border-left-color: #f59e0b; background: rgba(245, 158, 11, 0.1); }
.stat-card.stat-color-4 { border-left-color: #8b5cf6; background: rgba(139, 92, 246, 0.1); }
.stat-card.stat-color-5 { border-left-color: #06b6d4; background: rgba(6, 182, 212, 0.1); }
.stat-card.stat-color-6 { border-left-color: #f97316; background: rgba(249, 115, 22, 0.1); }
.stat-card.stat-color-7 { border-left-color: #84cc16; background: rgba(132, 204, 22, 0.1); }
.stat-card.stat-color-8 { border-left-color: #ec4899; background: rgba(236, 72, 153, 0.1); }
.stat-card.stat-color-9 { border-left-color: #6366f1; background: rgba(99, 102, 241, 0.1); }
.stat-card.stat-color-10 { border-left-color: #14b8a6; background: rgba(20, 184, 166, 0.1); }
.stat-card.stat-color-11 { border-left-color: #a855f7; background: rgba(168, 85, 247, 0.1); }

.platform-detail.stat-color-0 { border-left-color: #3b82f6; }
.platform-detail.stat-color-1 { border-left-color: #ef4444; }
.platform-detail.stat-color-2 { border-left-color: #10b981; }
.platform-detail.stat-color-3 { border-left-color: #f59e0b; }
.platform-detail.stat-color-4 { border-left-color: #8b5cf6; }
.platform-detail.stat-color-5 { border-left-color: #06b6d4; }
.platform-detail.stat-color-6 { border-left-color: #f97316; }
.platform-detail.stat-color-7 { border-left-color: #84cc16; }
.platform-detail.stat-color-8 { border-left-color: #ec4899; }
.platform-detail.stat-color-9 { border-left-color: #6366f1; }
.platform-detail.stat-color-10 { border-left-color: #14b8a6; }
.platform-detail.stat-color-11 { border-left-color: #a855f7; }

.stat-label {
    font-size: 0.75rem;
    color: var(--ink-soft);
}

.stat-value-sub {
    font-size: 0.85rem;
    font-weight: normal;
    color: var(--ink-soft);
}

.stat-card-clickable {
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.1s ease;
}

.stat-card-clickable:hover,
.stat-card-clickable:focus-visible {
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.stat-card-clickable::after {
    content: "Részletek →";
    margin-top: 0.35rem;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--accent);
}

.stat-group-hint {
    margin-top: -0.75rem;
    margin-bottom: 1.5rem;
}

.timeline-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
}

.timeline-item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.6rem;
    padding: 0.7rem 0.8rem 0.7rem 2rem;
    position: relative;
    border-bottom: 1px solid var(--line);
    border-radius: var(--radius-sm);
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-item:hover {
    background: var(--paper-alt);
}

/* Függőleges, összekötő "idővonal"-szál - minden elemnél végigfut, az
   első/utolsó elemnél csak a lista belseje felé, hogy ne lógjon ki a
   panel szélén túlra. */
.timeline-item::before {
    content: '';
    position: absolute;
    left: 0.7rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--line);
}

.timeline-item:first-child::before {
    top: 50%;
}

.timeline-item:last-child::before {
    bottom: 50%;
}

/* Súlyosság szerint színezett pont-jelölő - a korábbi, teljes sávot
   színező bal-szegély helyett egy letisztultabb, klasszikus "activity
   feed"-stílusú jelölés. */
.timeline-dot {
    position: absolute;
    left: 0.4rem;
    top: 1rem;
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 50%;
    background: var(--line);
    border: 2px solid var(--surface);
    z-index: 1;
}

.timeline-item-magas .timeline-dot {
    background: var(--danger);
}

.timeline-item-közepes .timeline-dot {
    background: var(--warn);
}

.timeline-item-alacsony .timeline-dot {
    background: var(--ok);
}

.timeline-time {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--ink-soft);
    flex: 0 0 auto;
    white-space: nowrap;
    min-width: 11rem;
}

.timeline-desc {
    font-size: 0.85rem;
}

.help-search-wrapper {
    margin-bottom: 1.25rem;
}

.help-search-wrapper input {
    width: 100%;
    max-width: 420px;
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    font-family: var(--font-sans);
    font-size: 0.88rem;
    color: var(--ink);
}

.help-search-wrapper input:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.malformed-list {
    margin: 0;
    padding: 0;
    list-style: none;
    max-height: 420px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.malformed-list li {
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--ink);
    white-space: pre-wrap;
    word-break: break-all;
}

.malformed-list li:last-child {
    border-bottom: none;
}

.malformed-list li:nth-child(even) {
    background: var(--paper-alt);
}

.clickable-ip {
    color: var(--accent-dark);
    font-weight: 600;
}

/* ---------------------------- Panelek ("exhibit" szekciók) ---------------------------- */

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
    counter-increment: panel-exhibit;
}

.tab-heading {
    font-size: 1.05rem;
    color: var(--accent-dark);
    margin: 0 0 0.4rem;
}

.stat-group-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-soft);
    margin: 0 0 0.5rem;
    font-family: var(--font-mono);
}

.panel h2 {
    margin-top: 0;
    font-size: 1rem;
    color: var(--accent-dark);
    border-bottom: 1px solid var(--line);
    padding-bottom: 0.5rem;
}

.panel-subheading {
    font-size: 0.75rem;
    font-weight: normal;
    color: var(--ink-soft);
}

.panel h2::before {
    content: counter(panel-exhibit, decimal-leading-zero);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    margin-right: 0.5rem;
    border-radius: 50%;
    background: var(--accent-light);
    color: var(--accent-dark);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    vertical-align: middle;
}

/* ---------------------------- Sáv-diagramok ---------------------------- */

.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.bar-chart-more {
    margin-top: 0.5rem;
}

.bar-chart-more summary {
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    user-select: none;
    padding: 0.3rem 0;
}

.bar-chart-more summary:hover {
    color: var(--accent-dark);
}

.bar-chart-more .bar-chart {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--line);
}

/* ---------------------------- Oszlopdiagram (pl. "Óránkénti forgalom") ---------------------------- */

.column-chart {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    height: 14rem;
    padding: 2rem 0.5rem 0;
}

.column-bar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    width: 2.1rem;
    flex: 0 0 auto;
    cursor: default;
    border-radius: var(--radius-sm);
    position: relative;
}

/* Statisztikai kiugrás (anomália) jelölése - lásd detectHourlyAnomalies()
   PHP-függvényt: egy kis figyelmeztető "!" jelvény az oszlop tetején,
   FÜGGETLENÜL attól, hogy a piros (gyanús) szegmens egyáltalán megjelenik-e
   azon az órán. */
.column-bar-anomaly-badge {
    position: absolute;
    top: -0.15rem;
    right: 0.1rem;
    width: 1rem;
    height: 1rem;
    line-height: 1rem;
    text-align: center;
    background: var(--danger);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 50%;
    z-index: 2;
}

.column-bar-wrap:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Az érték-buborék alapból rejtett, csak ráhúzáskor/fókuszban jelenik meg -
   letisztultabb alap-nézetet ad, mint az eddig mindig látható, apró szöveg. */
.column-bar-value {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 600;
    color: #fff;
    background: var(--ink);
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    white-space: nowrap;
    margin-bottom: 0.5rem;
    box-shadow: var(--shadow-sm);
    opacity: 0.82;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.column-bar-wrap:hover .column-bar-value,
.column-bar-wrap:focus-within .column-bar-value {
    opacity: 1;
}

/* Vízszintes rács-vonalak (25/50/75/100%) a jobb leolvashatóságért - CSS-
   háttérmintaként, extra DOM-elemek nélkül. */
.column-bar-track {
    display: flex;
    flex-direction: column-reverse;
    align-items: stretch;
    width: 100%;
    flex: 1 1 auto;
    background-color: var(--paper-alt);
    background-image: repeating-linear-gradient(
        to top,
        transparent 0,
        transparent calc(25% - 1px),
        var(--line) calc(25% - 1px),
        var(--line) 25%
    );
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.column-bar-fill {
    display: block;
    width: 100%;
    height: 0;
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
    transition: background-color 0.2s ease, height 0.25s ease, filter 0.15s ease;
}

.column-bar-wrap:hover .column-bar-fill {
    filter: brightness(1.08);
}

/* A .column-bar-fill-danger-nek SZÁNDÉKOSAN a .column-bar-fill alapszabály
   UTÁN kell következnie: mindkettő egyetlen osztály-szelektor (azonos
   specificitás), és CSS-ben azonos specificitásnál a KÉSŐBB definiált
   szabály nyer - enélkül a .column-bar-fill alap teal színe felülírná a
   piros veszély-színt. */
.column-bar-fill-danger {
    background: linear-gradient(180deg, var(--danger) 0%, #b8402d 100%);
}

.column-bar-label {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--ink-soft);
    white-space: nowrap;
    margin-top: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* ---------------------------- Valódi táblázatok 25-ös vágása ---------------------------- */

.table-row-collapsed {
    display: none;
}

.table-row-filtered {
    display: none;
}

.table-expand-btn {
    display: block;
    margin: 0.6rem 0;
    padding: 0.4rem 0.9rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.table-expand-btn:hover {
    background: var(--accent-light);
    border-color: var(--accent);
}

/* ---------------------------- Súlyosság szerinti szűrő-chipek ---------------------------- */

.severity-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.severity-filter-label {
    font-size: 0.78rem;
    color: var(--ink-soft);
}

.severity-chip {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink-soft);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
    opacity: 0.55;
}

.severity-chip-active {
    opacity: 1;
}

.severity-chip-magas.severity-chip-active {
    background: var(--danger-bg);
    border-color: var(--danger);
    color: var(--danger);
}

.severity-chip-kozepes.severity-chip-active {
    background: var(--warn-bg);
    border-color: var(--warn);
    color: var(--warn);
}

.severity-chip-alacsony.severity-chip-active {
    background: var(--ok-bg);
    border-color: var(--ok);
    color: var(--ok);
}

.severity-chip:hover {
    opacity: 0.85;
}

.severity-filtered-out {
    display: none;
}

.bar-row {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.8rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--line);
}

.bar-row:last-child {
    border-bottom: none;
}

/* Egysoros elrendezés (rövid feliratokhoz, pl. HTTP státuszkódok): felirat,
   sáv és érték EGY sorban, grid-elrendezéssel - nincs szükség a hosszú
   feliratokhoz készült, tördelt (két soros) elrendezésre. */
.bar-row-single-line {
    display: grid;
    grid-template-columns: minmax(160px, 420px) 1fr auto;
    align-items: center;
    gap: 0.6rem;
}

.bar-row-single-line .bar-label {
    word-break: normal;
    overflow-wrap: anywhere;
    line-height: 1.3;
}

.bar-row-clickable {
    cursor: pointer;
}

.bar-row-clickable:hover .bar-label {
    text-decoration: underline;
}

.bar-row-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.bar-label {
    font-family: var(--font-mono);
    color: var(--ink);
    word-break: break-all;
    flex: 1 1 auto;
    line-height: 1.4;
}

.bar-track {
    background: var(--paper-alt);
    border-radius: var(--radius);
    height: 0.7rem;
    overflow: hidden;
    width: 100%;
}

.bar-fill {
    display: block;
    height: 100%;
    width: 0;
    background: var(--accent);
    border-radius: var(--radius);
    transition: background-color 0.2s ease;
}

/* A bar-color-N szabályoknak SZÁNDÉKOSAN a .bar-fill alapszabály UTÁN kell
   következniük a fájlban: mindkettő egyetlen osztály-szelektor (azonos
   specificitás), és CSS-ben azonos specificitásnál a KÉSŐBB definiált
   szabály nyer - enélkül a .bar-fill alap kék színe felülírná az egyedi
   paletta-színeket. (A .bar-color-N osztályt a legend-swatch elemek is
   használják, ezért NEM ".bar-fill.bar-color-N" összetett szelektorral van
   megadva.) */
.bar-color-0 { background: #3b82f6; }
.bar-color-1 { background: #ef4444; }
.bar-color-2 { background: #10b981; }
.bar-color-3 { background: #f59e0b; }
.bar-color-4 { background: #8b5cf6; }
.bar-color-5 { background: #06b6d4; }
.bar-color-6 { background: #f97316; }
.bar-color-7 { background: #84cc16; }
.bar-color-8 { background: #ec4899; }
.bar-color-9 { background: #6366f1; }
.bar-color-10 { background: #14b8a6; }
.bar-color-11 { background: #a855f7; }

.bar-value {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--ink-soft);
    flex: 0 0 auto;
    white-space: nowrap;
}

/* ---------------------------- Szín jelmagyarázat (legend) ---------------------------- */

.color-legend-details {
    margin-top: 0.6rem;
}

.color-legend-details summary {
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--accent);
    user-select: none;
}

.color-legend-details summary:hover {
    color: var(--accent-dark);
}

/* ---------------------------- Platformonkénti találat-részletek ---------------------------- */

.platform-detail {
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 6px solid transparent;
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin-bottom: 0.6rem;
}

.platform-detail summary {
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    user-select: none;
}

.platform-detail summary::-webkit-details-marker {
    color: var(--ink-soft);
}

.platform-detail-count {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: normal;
    color: var(--ink-soft);
    white-space: nowrap;
}

.platform-detail table {
    margin-top: 0.75rem;
}

.color-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.9rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--line);
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.74rem;
    color: var(--ink);
}

.legend-swatch {
    display: inline-block;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 2px;
    flex: 0 0 auto;
}

.legend-swatch-inline {
    margin-right: 0.4rem;
    vertical-align: middle;
}

/* ---------------------------- Arányos (sikeres/hibás) sáv ---------------------------- */

.proportional-bar {
    display: flex;
    width: 100%;
    height: 1.4rem;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--paper-alt);
    margin: 0.75rem 0 0.5rem;
}

.proportional-segment {
    display: block;
    height: 100%;
    width: 0;
    transition: width 0.2s ease;
}

.proportional-segment.proportional-ok {
    background: var(--ok);
}

.proportional-segment.proportional-danger {
    background: var(--danger);
}

.proportional-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.2rem;
    margin-bottom: 0.5rem;
}

.legend-swatch-ok {
    background: var(--ok);
}

.legend-swatch-danger {
    background: var(--danger);
}

/* ---------------------------- Feldolgozási folyamat-lista ("Napló-feldolgozás") ---------------------------- */

.stat-value-long {
    font-size: 0.82rem;
    line-height: 1.4;
}

.process-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.process-steps li {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.process-step-done::before {
    content: "✓";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    background: var(--ok);
    color: #fff;
    font-size: 0.65rem;
    flex: 0 0 auto;
}

.process-step-detail {
    color: var(--ink-soft);
    font-size: 0.78rem;
}

/* ---------------------------- Időszak szűrése ---------------------------- */

.settings-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.85rem;
}

.settings-field-wide {
    flex: 1 1 100%;
}

.settings-field-wide textarea {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--ink);
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    resize: vertical;
    width: 100%;
}

.settings-field-wide textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.settings-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: var(--ink-soft);
}

.settings-field input {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--ink);
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
}

.settings-field input:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.threshold-presets {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
}

.threshold-presets-label {
    font-size: 0.8rem;
    color: var(--ink-soft);
}

/* ---------------------------- Riport-összeállító ---------------------------- */

.report-meta-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
    margin: 0.75rem 0 1.25rem;
}

.report-meta-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: var(--ink-soft);
}

.report-meta-field-wide {
    grid-column: 1 / -1;
}

.report-meta-field input,
.report-meta-field textarea {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--ink);
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    resize: vertical;
}

.report-meta-field input:focus,
.report-meta-field textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.report-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.5rem;
    margin: 1rem 0;
}

.report-picker-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    background: var(--paper-alt);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    cursor: pointer;
}

.report-output-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.report-output-toolbar h2 {
    border-bottom: none;
    padding-bottom: 0;
    margin: 0;
}

#report-output {
    margin-top: 1rem;
}

.report-section-block {
    margin-bottom: 1.75rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--line);
}

.report-section-block:last-child {
    border-bottom: none;
}

.report-cover {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--accent);
}

.report-cover h1 {
    margin: 0 0 0.3rem;
    font-size: 1.3rem;
    color: var(--accent-dark);
}

.report-cover p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.85rem;
}

/* Nyomtatáskor (Ctrl/Cmd+P vagy a "Nyomtatás / PDF mentése" gomb) KIZÁRÓLAG
   az összeállított riport jelenjen meg - a fejléc, oldalsáv, gombok, egyéb
   fülek tartalma NE kerüljön papírra/PDF-be. */
@media print {
    /* KRITIKUS: a világos téma színeinek KÉNYSZERÍTÉSE, függetlenül attól,
       hogy a felhasználó éppen sötét módban böngészi-e az oldalt - enélkül
       sötét módban nyomtatva/PDF-be mentve a szöveg (világos szín) a fehér
       papíron/PDF-háttéren szinte LÁTHATATLAN lenne. A nyomtatott riport
       MINDIG a világos, jól olvasható színpalettát használja. */
    :root {
        --accent: #1e9e8c !important;
        --accent-dark: #167a6c !important;
        --accent-light: #e6f5f2 !important;
        --paper: #ffffff !important;
        --paper-alt: #f5f8fa !important;
        --surface: #ffffff !important;
        --ink: #14324d !important;
        --ink-soft: #3b4a5e !important;
        --line: #dde3e9 !important;
        --danger: #e0553f !important;
        --danger-bg: #fdeae7 !important;
        --warn: #e0a72e !important;
        --warn-bg: #fdf3e1 !important;
        --ok: #2fbf71 !important;
        --ok-bg: #e8f9ef !important;
    }

    .app-header,
    .app-footer,
    .brand-scroll-top,
    .sidebar,
    #report-picker-panel,
    .report-output-toolbar,
    .alert,
    .table-scroll .table-expand-btn {
        display: none !important;
    }

    body {
        background: #fff;
        padding-top: 0;
        padding-bottom: 0;
    }

    .layout {
        display: block;
    }

    .content {
        padding: 0;
    }

    .tab-panel {
        display: none !important;
    }

    #tab-report.tab-panel {
        display: block !important;
    }

    #report-output-panel {
        border: none;
        box-shadow: none;
        padding: 0;
    }
}

/* ---------------------------- Táblázatok ---------------------------- */

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

/* A "Teljes napló" (és más JSON-alapú, colgroup-pal ellátott) táblázatok
   FIX oszlopszélességet kapnak (lásd .col-w-N osztályokat) - enélkül egy
   nagyon hosszú, szóköz nélküli tartalom (pl. User-Agent string) a teljes
   táblázatot szétfeszíthetné. A kisebb, statikus táblázatok (pl.
   "IP-alapú riasztások") ezt SZÁNDÉKOSAN NEM kapják meg - ott az
   auto-elrendezés a tartalomhoz jobban igazodó oszlopszélességet ad. */
.data-table {
    table-layout: fixed;
}

/* Görgethető wrapper - biztonsági háló: ha a tartalom (pl. nagyon hosszú,
   szóköz nélküli User-Agent string) mégis szélesebb lenne, mint a
   rendelkezésre álló hely, a táblázat SAJÁT, vízszintes görgetősávot kap -
   sosem "lóg ki" a panel dobozból, és nem töri szét az oldal elrendezését. */
.table-scroll {
    width: 100%;
    overflow-x: auto;
}

.simple-table th,
.simple-table td,
.data-table th,
.data-table td {
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* A "Teljes napló" táblázat oszlopszélesség-terve (colgroup) - a rövid
   mezők (Metódus, Státusz, Méret) keskenyek, a hosszú, változó tartalmú
   mezők (Útvonal, Referer, User-Agent) kapják a legtöbb helyet. */
.col-w-6 {
    width: 6%;
}

.col-w-8 {
    width: 8%;
}

.col-w-10 {
    width: 10%;
}

.col-w-12 {
    width: 12%;
}

.col-w-14 {
    width: 14%;
}

.col-w-16 {
    width: 16%;
}

.col-w-20 {
    width: 20%;
}

.col-w-24 {
    width: 24%;
}

.simple-table th,
.data-table th {
    background: var(--paper-alt);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--ink-soft);
}

.sortable-th {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.sortable-th:hover {
    color: var(--accent-dark);
}

.sortable-th::after {
    content: "↕";
    display: inline-block;
    margin-left: 0.35rem;
    opacity: 0.5;
    font-size: 0.7rem;
}

.sortable-th.sort-asc::after {
    content: "↑";
    opacity: 1;
    color: var(--accent);
}

.sortable-th.sort-desc::after {
    content: "↓";
    opacity: 1;
    color: var(--accent);
}

.mono,
.data-table td {
    font-family: var(--font-mono);
}

.severity-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius);
    font-size: 0.72rem;
    font-family: var(--font-mono);
}

.severity-magas {
    background: var(--danger-bg);
    color: var(--danger);
}

.severity-közepes {
    background: var(--warn-bg);
    color: var(--warn);
}

.severity-alacsony {
    background: var(--ok-bg);
    color: var(--ok);
}

.table-search {
    width: 100%;
    max-width: 420px;
    margin: 0.75rem 0;
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    display: block;
}

.table-pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
}

.table-pagination button {
    padding: 0.3rem 0.6rem;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: var(--radius);
    cursor: pointer;
}

.table-pagination button:disabled {
    opacity: 0.4;
    cursor: default;
}

/* ---------------------------- IP-kereső ---------------------------- */

.ip-search-controls {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

#ip-search-input {
    flex: 1 1 260px;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-family: var(--font-mono);
}

.api-key-form {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.api-key-form input {
    flex: 1 1 260px;
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-family: var(--font-mono);
}

#abuseipdb-check-btn {
    margin-top: 0.25rem;
}

#ip-search-result,
#abuseipdb-result {
    font-size: 0.85rem;
    margin-top: 0.75rem;
}

/* ---------------------------- Mobil nézet ---------------------------- */

@media (max-width: 860px) {
    .layout {
        flex-direction: column;
    }

    .sidebar {
        position: static;
        flex: 1 1 auto;
        width: 100%;
    }

    .exhibit-nav {
        display: flex;
        overflow-x: auto;
    }

    .exhibit-nav li {
        border-bottom: none;
        border-right: 1px solid var(--line);
        flex: 0 0 auto;
    }

    .bar-row-single-line {
        grid-template-columns: minmax(90px, 160px) 1fr auto;
    }
}

/* Keskeny (mobil) képernyők - a fejléc RÖGZÍTETT magasságú (--header-height),
   ezért a cím + alcím + keresőmező + ikon-gombok könnyen túlcsordulhatnának/
   törhetnének, ha nem szűkítjük őket kifejezetten. */
@media (max-width: 640px) {
    .app-header {
        padding: 0.65rem 0.85rem;
    }

    .brand {
        gap: 0.5rem;
        min-width: 0;
    }

    .brand-mark-logo {
        height: 2rem;
        flex: 0 0 auto;
    }

    .brand h1 {
        font-size: 0.85rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 38vw;
    }

    /* Az alcím keskeny képernyőn feleslegesen foglalná a helyet a
       kereső/gombok elől - a cím önmagában is elég kontextust ad. */
    .subtitle {
        display: none;
    }

    .header-actions {
        gap: 0.35rem;
    }

    .header-search #global-search {
        width: 6.5rem;
        padding: 0.4rem 1.5rem 0.4rem 1.8rem;
    }
}

/* ---------------------------- Csere/kiegészítés modal ---------------------------- */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 26, 26, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-overlay[hidden] {
    display: none;
}

.modal-box {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    max-width: 440px;
    width: 100%;
    box-shadow: var(--shadow-lg);
}

.modal-box h3 {
    margin: 0 0 0.6rem;
    color: var(--accent-dark);
    font-size: 1.05rem;
}

.modal-box p {
    margin: 0 0 1.1rem;
    font-size: 0.85rem;
    color: var(--ink);
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.modal-actions .btn-primary,
.modal-actions .btn-secondary {
    flex: 1 1 auto;
}

.modal-cancel {
    display: block;
    margin: 0 auto;
    background: none;
    border: none;
    color: var(--ink-soft);
    font-size: 0.78rem;
    text-decoration: underline;
    cursor: pointer;
    padding: 0.2rem;
}
