/* ALCAR arculat — sötét téma, piros kiemelés (hub.alcar.hu újratervezés, 2026-10-09).
   Csak megjelenés: a sablonok osztályneveit megtartjuk, a stílus ráillik. */
@import url('https://fonts.googleapis.com/css2?family=Jost:wght@400;500;600&display=swap');

:root {
  color-scheme: dark;
  --bg: #0E0F11; --bg-side: #121316; --surface: #17181B; --surface-2: #1F2024;
  --border: #26272B; --border-strong: #3A3B40;
  --text: #F2F2F2; --text-2: #C9C7C7; --muted: #A3A1A1;
  --red: #D3242E; --red-text: #FF6B73; --red-tint: #1F1315;
  --red-chip-bg: #3B1518; --red-chip-fg: #FF8A91;
  --ok: #4CC38A; --ok-bg: #123626; --warn: #E8B84A; --warn-bg: #3A2D10; --info: #6AA7FF;

  /* régi változónevek (a meglévő szabályok még ezeket használják) */
  --card-bg: var(--surface);
  --accent: var(--red);
  --link: var(--red-text);
  --link-hover: #FFA0A6;
  --bad: var(--red);
}

* { box-sizing: border-box; }

a { color: var(--red-text); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }

body {
  margin: 0;
  font-family: 'Jost', Aptos, 'Segoe UI', sans-serif;
  font-size: 15px;
  background: var(--bg);
  color: var(--text);
}

/* ── shell: bal oldalsáv + tartalom ─────────────────────────────────── */
.shell { display: flex; flex-wrap: wrap; min-height: 100vh; }
.side {
  flex: 0 0 248px; background: var(--bg-side); border-right: 1px solid var(--border);
  padding: 24px 16px; display: flex; flex-direction: column; gap: 28px;
}
.brandrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand::before { content: ""; width: 6px; height: 36px; background: var(--red); }
.brand b { font-size: 24px; font-weight: 600; letter-spacing: .14em; display: block; line-height: 1.1; }
.brand small { font-size: 12px; color: var(--muted); letter-spacing: .08em; display: block; }
.menubtn {
  display: none; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0;
  background: #1B1C20; border: 1px solid var(--border); border-radius: 8px; color: var(--text); cursor: pointer;
}
.navlist { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.navlist a {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px;
  border-radius: 8px; color: var(--muted); font-size: 15px; text-decoration: none;
}
.navlist a svg { flex: none; }
.navlist a:hover { background: #1B1C20; color: #fff; }
.navlist a.on { background: var(--red-tint); color: #fff; box-shadow: inset 3px 0 0 var(--red); }
.usernav { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; }
.usernav .who { padding: 0 14px 6px; color: var(--text-2); font-weight: 500; overflow-wrap: anywhere; }
.content {
  flex: 999 1 560px; min-width: 0; padding: 32px;
  display: flex; flex-direction: column; gap: 24px;
}
.pagehead { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pagehead h1 { margin: 0; font-size: 32px; font-weight: 600; }
.content main { max-width: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 24px; }

@media (max-width: 820px) {
  .side { flex: 1 1 100%; border-right: 0; border-bottom: 1px solid var(--border); padding: 12px 16px; gap: 8px; }
  .menubtn { display: inline-flex; }
  .navlist { display: none; padding-bottom: 8px; }
  .navlist.open { display: flex; }
  .content { padding: 20px 16px; }
  .pagehead h1 { font-size: 26px; }
}

/* ── belépés / jelszócsere ──────────────────────────────────────────── */
.centered { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login-card { width: 360px; max-width: 100%; display: flex; flex-direction: column; gap: 16px; }
.login-card h1 { margin: 0; font-size: 26px; font-weight: 600; display: flex; align-items: center; gap: 12px; }
.login-card h1::before { content: ""; width: 6px; height: 30px; background: var(--red); }
.login-card label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* ── komponensek ───────────────────────────────────────────────────── */
h1 { font-weight: 600; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 24px; }
.card h2, .card h3 { margin: 0 0 14px; font-size: 20px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.card h2::before, .card h3::before { content: ""; flex: none; width: 4px; height: 18px; background: var(--red); }
.card h3 { font-size: 18px; }
.card h2 .badge, .card h3 .badge { margin-left: auto; }
.card p { overflow-wrap: anywhere; }

.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.stat .k { color: var(--muted); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.stat .v { font-size: 36px; font-weight: 600; line-height: 1.1; }
.stat .s { font-size: 13px; color: var(--muted); }
.stat.alert { border-color: var(--red); }
.stat.alert .v { color: var(--red-text); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }

input, button, select, textarea { font: inherit; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select {
  min-height: 44px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 0 14px; color: var(--text);
}
input[type=file] { color: var(--text-2); max-width: 100%; }
input[type=file]::file-selector-button {
  min-height: 36px; margin-right: 12px; padding: 0 16px; border: 1px solid var(--border-strong);
  border-radius: 8px; background: transparent; color: var(--text-2); font: inherit; cursor: pointer;
}
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; accent-color: var(--red); }
input::placeholder { color: #75737a; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--red-text); outline-offset: 2px; }

button, .btn {
  min-height: 44px; padding: 0 24px; background: var(--red); color: #fff; border: 0; border-radius: 8px;
  font-weight: 500; cursor: pointer;
}
button:hover, .btn:hover { filter: brightness(1.12); }
button:disabled { opacity: .45; cursor: not-allowed; filter: none; }
button.danger, .btn.ghost { background: transparent; color: var(--red-text); border: 1px solid var(--red); }
.btn.neutral { background: var(--border); color: var(--text); }
.btn.big { min-height: 48px; font-size: 16px; padding: 0 28px; }
.pill { min-height: 44px; padding: 0 20px; border-radius: 8px; background: transparent; color: var(--text-2); border: 1px solid var(--border-strong); }
.pill[aria-pressed=true] { background: var(--red); color: #fff; border-color: var(--red); }

.error { color: var(--red-text); }
.hint { color: var(--muted); }
.hint.small { font-size: 13px; }

.tabs { display: inline-flex; gap: 0; margin-bottom: 0; border: 1px solid var(--border-strong); border-radius: 8px; overflow: hidden; align-self: flex-start; }
.tabs .tab { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; color: var(--text-2); text-decoration: none; font-weight: 500; }
.tabs .tab + .tab { border-left: 1px solid var(--border-strong); }
.tabs .tab:hover { background: #1B1C20; text-decoration: none; }
.tabs .tab.active { background: var(--red); color: #fff; }

.mail-list { display: flex; flex-direction: column; gap: 8px; }
.mail-item { border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; background: var(--surface); }
.mail-item.unread { box-shadow: inset 3px 0 0 var(--red); }
.mail-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); gap: 12px; flex-wrap: wrap; }
.mail-subject { font-weight: 600; margin-top: 4px; }
.mail-preview { color: var(--muted); font-size: 14px; margin-top: 4px; }

.digest-list { display: flex; flex-direction: column; gap: 16px; }
.digest-item .digest-date { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.digest-item .digest-content { white-space: pre-wrap; line-height: 1.5; }

.card form { display: flex; gap: 8px; margin-top: 12px; }
.card form input[type="text"] { flex: 1; min-width: 0; }

.card .filter-form, .filter-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; align-items: end; margin-bottom: 16px; }
.filter-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* táblázatok */
.table-scroll, .tblbox { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; font-weight: 500; padding: 10px 12px; }
td { padding: 12px; border-top: 1px solid var(--border); }
td:last-child { text-align: right; }
td a { font-weight: 500; }
.wb-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.wb-table th, .wb-table td { padding: 10px 12px; text-align: left; border-top: 1px solid var(--border); border-bottom: 0; }
.wb-table th { color: var(--muted); font-weight: 500; border-top: 0; }
.wb-table tr:first-child th, .wb-table tr:first-child td { border-top: 0; }

/* állapot-pirulák */
.badge { display: inline-block; border-radius: 999px; padding: 3px 12px; font-size: 13px; font-weight: 500; background: var(--border); color: var(--text-2); }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.bad { background: var(--red-chip-bg); color: var(--red-chip-fg); }
.badge-info { cursor: pointer; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .7); align-items: center; justify-content: center; z-index: 100; }
.modal-box { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; padding: 24px; max-width: 360px; text-align: center; }
.modal-actions { display: flex; gap: 12px; justify-content: center; margin-top: 16px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.grid .wide { grid-column: 1 / -1; }

.log { white-space: pre-wrap; font-size: 13px; color: var(--muted); max-height: 300px; overflow-y: auto; }

/* csapat-chat */
.chat .messages { height: 280px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; padding-right: 4px; }
.chat .msg { font-size: 14px; background: var(--surface-2); border-radius: 10px; padding: 8px 12px; align-self: flex-start; max-width: 90%; overflow-wrap: anywhere; display: flex; flex-wrap: wrap; gap: 0 8px; }
.chat .msg .who { order: 1; color: var(--muted); font-size: 12px; font-weight: 500; }
.chat .msg .when { order: 2; color: var(--muted); font-size: 12px; margin-left: 0; }
.chat .msg .txt { order: 3; flex-basis: 100%; }
#message-form { display: flex; gap: 8px; }
#message-text { flex: 1; min-width: 0; }

.admin-users { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.admin-form { display: flex; flex-direction: column; gap: 12px; max-width: 480px; }
.admin-form fieldset { border: 1px solid var(--border); border-radius: 8px; padding: 12px; }
.admin-form legend { color: var(--muted); font-size: 13px; padding: 0 6px; }
.checkbox-label { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; }
.admin-actions { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.admin-actions form { display: inline; }

/* lemezhasználat */
.disk-bar-track { background: var(--border); border-radius: 4px; height: 8px; overflow: hidden; }
.disk-bar-fill { background: var(--red); height: 100%; }

/* Számlaellenőrzés */
.szla-form { display: flex; flex-direction: column; gap: 16px; max-width: 560px; }
.szla-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.szla-form label .hint { text-transform: none; letter-spacing: 0; }
.dropzone {
  min-height: 120px; border: 2px dashed var(--border-strong); border-radius: 10px; padding: 16px;
  display: flex; flex-direction: column; justify-content: center; gap: 6px; color: var(--muted);
  transition: border-color .15s, background .15s;
}
.dropzone.dragover, .dropzone.drag { border-color: var(--red); background: var(--red-tint); }

.szla-preview { width: 100%; border-collapse: collapse; font-size: 13px; white-space: nowrap; }
.szla-preview th, .szla-preview td { padding: 6px 10px; border-bottom: 1px solid var(--border); border-top: 0; text-align: left; }
.szla-preview th { position: sticky; top: 0; background: var(--surface); }
.szla-preview tr.cell-ok { background: rgba(76, 195, 138, .14); }
.szla-preview tr.cell-warn-price { background: rgba(232, 184, 74, .16); }
.szla-preview tr.cell-warn-qty { background: rgba(211, 36, 46, .20); }
.szla-preview tr.cell-neutral { background: transparent; }
.szla-preview tr.cell-warn { background: rgba(232, 184, 74, .20); }
.szla-preview tr.cell-missing { background: rgba(211, 36, 46, .30); }
.szla-preview tr.row-sep td { background: #2A2B30; color: #fff; font-weight: 600; }
.szla-preview tr.row-total td { background: rgba(255, 255, 255, .07); font-weight: 600; }
.szla-preview tr.row-grand td { background: #3B1518; color: #fff; font-weight: 700; }
.szla-preview td.cell-nok { background: rgba(211, 36, 46, .50); font-weight: 700; }

.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form select { max-width: 220px; }

/* ── GPT Posta nyomkövetés ───────────────────────────────────────────── */
.cohort-chart { display: flex; gap: 8px; align-items: flex-end; padding: 8px 0 4px; overflow-x: auto; }
.cohort-col { flex: 1 0 44px; display: flex; flex-direction: column; align-items: stretch; text-align: center; }
.cohort-total { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.cohort-bar { height: 220px; display: flex; flex-direction: column-reverse; border-radius: 4px; overflow: hidden; background: var(--border); }
.cohort-bar .seg { display: flex; align-items: center; justify-content: center; color: #0E0F11; font-size: 11px; font-weight: 600;
                   text-decoration: none; min-height: 2px; border-top: 1px solid rgba(0,0,0,.25); }
.cohort-bar .seg:hover { filter: brightness(1.2); text-decoration: none; }
.cohort-day { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.1; display: block; text-decoration: none; }
.cohort-day span { font-size: 11px; }
a.cohort-day:hover { color: var(--text); text-decoration: underline; }
.cohort-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; }
.cohort-legend .chip { color: var(--text); text-decoration: none; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.cohort-legend .chip i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.cohort-legend .chip:hover { text-decoration: underline; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.posta-table td.wrap { white-space: normal; min-width: 14rem; max-width: 26rem; }
.posta-table td { vertical-align: top; }
.pager { display: flex; gap: 16px; align-items: center; margin-top: 12px; }
.day-nav { display: flex; gap: 24px; flex-wrap: wrap; margin: 4px 0 12px; }
.hbar-stack { display: flex; height: 54px; border-radius: 6px; overflow: hidden; background: var(--border); margin: 8px 0 20px; }
.hbar-stack .hseg { display: flex; align-items: center; justify-content: center; color: #0E0F11; font-size: 14px; font-weight: 600;
                    text-decoration: none; min-width: 3px; border-right: 1px solid rgba(0,0,0,.25); }
.hbar-stack .hseg:hover { filter: brightness(1.2); text-decoration: none; }
.hrows { display: flex; flex-direction: column; gap: 6px; }
.hrow { display: grid; grid-template-columns: minmax(12rem, 22rem) 1fr 9rem; align-items: center; gap: 12px;
        color: var(--text); text-decoration: none; padding: 2px 4px; border-radius: 4px; min-height: 44px; }
.hrow:hover { background: rgba(255,255,255,.05); text-decoration: none; }
.hrow.zero { opacity: .45; }
.hlabel { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.hlabel i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; flex: none; }
.htrack { height: 26px; background: var(--border); border-radius: 4px; overflow: hidden; }
.hfill { display: block; height: 100%; min-width: 4px; border-radius: 4px; }
.hrow.zero .hfill { min-width: 0; }
.hval { font-size: 14px; text-align: right; }
@media (max-width: 720px) { .hrow { grid-template-columns: 1fr; gap: 2px; } .hval { text-align: left; } }
.refresh-form { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; margin-right: 10px; white-space: nowrap; }
.chip i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.pkg-card h3 { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.timeline td { vertical-align: top; }
.timeline tr.warn-row { background: var(--warn-bg); }
.tajek-box { width: 100%; font-family: inherit; font-size: 14px; background: var(--bg); color: var(--text); border: 1px solid var(--border-strong); border-radius: 8px; padding: 10px 14px; margin-bottom: 8px; }
.ugyfel-search { display: flex; gap: 8px; }
.ugyfel-search input[type="text"] { flex: 1; min-width: 0; min-height: 56px; font-size: 17px; }
.ugyfel-search button { min-height: 56px; }
.munka-sor { margin-bottom: 10px; }
.munka-sav { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; margin-top: 4px; }
.munka-sav-ertek { height: 100%; background: var(--red); transition: width .6s; }
code { background: var(--red-chip-bg); color: var(--red-chip-fg); padding: 1px 6px; border-radius: 4px; overflow-wrap: anywhere; }

/* nyomtatás: az oldalsáv és a fejléc ne kerüljön a papírra */
@media print {
  .side, .pagehead, .no-print { display: none !important; }
  .content { padding: 0; }
}

/* ── dashboard: kétoszlopos kiosztás, mérősávok ─────────────────────── */
.cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.cols > * { flex: 1 1 380px; min-width: 0; }
.col-stack { display: flex; flex-direction: column; gap: 24px; }
.bar { height: 10px; background: var(--border); border-radius: 5px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--red); }
.bar.grey > i { background: var(--muted); }
.meter { margin-bottom: 16px; }
.meter:last-child { margin-bottom: 0; }
.meter-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--text-2); margin-bottom: 6px; }
.trio { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 16px; margin-bottom: 8px; }
.trio .v { display: block; font-size: 32px; font-weight: 600; line-height: 1.1; }
.trio .k { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--text-2); }

.ugyfel-card { max-width: 880px; }
.ugyfel-card h3 { font-size: 30px; }
.infobar { background: var(--red-tint); border: 1px solid #4A1D21; border-radius: 8px; padding: 12px 14px; color: var(--text-2); font-size: 14px; margin: 0 0 12px; }
#dropzone-export { min-height: 140px; }

/* ne lógjon ki a doboz: a flex-gyerekek összehúzódhatnak, a széles tartalom saját dobozában görgethető */
.content > *, .content main > *, .card { min-width: 0; max-width: 100%; }

/* ── SUZUKI menücsoport (lenyíló alpontok) ──────────────────────────── */
.navgroup { display: flex; flex-direction: column; gap: 4px; }
.navgroup > summary {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px;
  border-radius: 8px; color: var(--muted); font-size: 15px; cursor: pointer; list-style: none;
}
.navgroup > summary::-webkit-details-marker { display: none; }
.navgroup > summary::after {
  content: ""; margin-left: auto; width: 7px; height: 7px; flex: none;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .15s;
}
.navgroup[open] > summary::after { transform: rotate(-135deg); }
.navgroup > summary:hover { background: #1B1C20; color: #fff; }
.navgroup > summary:focus-visible { outline: 2px solid var(--red-text); outline-offset: 2px; }
.navgroup.has-on > summary { color: #fff; }
.navlist a.sub { padding-left: 46px; font-size: 14px; }
