/* Joren brandbook színek: #0b0b0d bg, #151417 surface, #1c1b1f card,
   gold #c9a24a, ink #f2ede1, divider #2c2a2a, Inter font. */

:root {
  --bg: #0b0b0d;
  --surface: #151417;
  --card: #1c1b1f;
  --divider: #2c2a2a;
  --gold: #c9a24a;
  --gold-soft: rgba(201, 162, 74, 0.16);
  --ink: #f2ede1;
  --ink-dim: #a8a39a;
  --danger: #d9776a;
  --danger-soft: rgba(217, 119, 106, 0.16);
  --ok: #7fae8c;
  --ok-soft: rgba(127, 174, 140, 0.16);
  --radius: 14px;
  --gap: 20px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
}

.app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* ---------- Topbar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.brand { display: flex; flex-direction: column; }
.brand-mark {
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 1.1rem;
  color: var(--gold);
}
.brand-sub { color: var(--ink-dim); font-size: 0.8rem; }

.status-cluster { display: flex; align-items: center; gap: 12px; }

/* ---------- Pills / badges ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid var(--divider);
}
.pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.pill-muted { color: var(--ink-dim); }
.pill-ok { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.pill-off { color: var(--ink-dim); background: rgba(255,255,255,0.04); }
.pill-error { color: var(--danger); background: var(--danger-soft); border-color: transparent; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}
.badge-alacsony { background: rgba(255,255,255,0.06); color: var(--ink-dim); }
.badge-kozepes { background: var(--gold-soft); color: var(--gold); }
.badge-magas { background: rgba(201, 162, 74, 0.28); color: var(--gold); }
.badge-unknown { background: var(--danger-soft); color: var(--danger); }

/* ---------- Buttons ---------- */

.btn {
  appearance: none;
  border: 1px solid var(--divider);
  background: var(--card);
  color: var(--ink);
  padding: 9px 18px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.05s ease, opacity 0.15s ease;
}
.btn:hover { opacity: 0.9; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primary { background: var(--gold); color: #201a0c; border-color: var(--gold); }
.btn-stop { background: var(--danger); color: #2a1210; border-color: var(--danger); }
.btn-ghost { background: transparent; }
.btn-small { padding: 6px 12px; font-size: 0.78rem; }

/* ---------- Tabs ---------- */

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--divider);
  margin-bottom: 22px;
  overflow-x: auto;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab-btn {
  appearance: none;
  background: none;
  border: none;
  color: var(--ink-dim);
  padding: 10px 4px;
  margin-right: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  flex: 0 0 auto;
}
.tab-btn.is-active { color: var(--ink); border-bottom-color: var(--gold); }

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

/* ---------- Stat tiles ---------- */

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.stat-tile {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.stat-num { font-size: 1.6rem; font-weight: 700; color: var(--gold); }
.stat-label { color: var(--ink-dim); font-size: 0.78rem; margin-top: 4px; }

/* ---------- Panels / layout ---------- */

.grid-2col {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--gap);
  align-items: start;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 18px;
}
.panel-wide { max-width: 640px; }

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.panel-head h2 { font-size: 1rem; margin: 0; font-weight: 600; }

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

/* ---------- File list ---------- */

.file-list { display: flex; flex-direction: column; gap: 8px; max-height: 560px; overflow-y: auto; }

.file-row {
  background: var(--card);
  border: 1px solid var(--divider);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
}
.file-row:hover { border-color: var(--gold); }

.file-row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.file-name { font-weight: 600; font-size: 0.86rem; word-break: break-all; }
.file-time { color: var(--ink-dim); font-size: 0.72rem; white-space: nowrap; }

.file-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.file-badges .badge-label { color: var(--ink-dim); font-size: 0.68rem; margin-right: -2px; }

/* ---------- Live log ---------- */

.log-view {
  background: #08080a;
  border: 1px solid var(--divider);
  border-radius: 10px;
  padding: 12px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.74rem;
  line-height: 1.5;
  color: #c9c5bb;
  max-height: 560px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}

/* ---------- Settings form ---------- */

.settings-form { display: flex; flex-direction: column; gap: 16px; }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; }
.field span { color: var(--ink-dim); font-weight: 500; }
.field input[type="text"],
.field input[type="password"],
.field input[type="number"],
.field textarea {
  background: var(--card);
  border: 1px solid var(--divider);
  color: var(--ink);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 0.88rem;
  font-family: inherit;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
}
.checkbox-field { flex-direction: row; align-items: center; gap: 8px; }
.checkbox-field input { width: 16px; height: 16px; }

.advanced { border-top: 1px solid var(--divider); padding-top: 12px; }
.advanced summary { cursor: pointer; color: var(--ink-dim); font-size: 0.85rem; margin-bottom: 12px; }
.advanced .field { margin-bottom: 14px; }

.form-actions { display: flex; align-items: center; gap: 14px; }
.hint { color: var(--ink-dim); font-size: 0.78rem; }

/* ---------- Credit card ---------- */

.credit-card { margin-bottom: 22px; }
.credit-card.is-low { border-color: var(--danger); }

.credit-row { display: flex; gap: 28px; flex-wrap: wrap; margin-bottom: 12px; }
.credit-figure { display: flex; flex-direction: column; }
.credit-num { font-size: 1.5rem; font-weight: 700; color: var(--gold); }
.credit-num.credit-dim { color: var(--ink); font-size: 1.2rem; }
.credit-card.is-low .credit-num:first-child { color: var(--danger); }
.credit-label { color: var(--ink-dim); font-size: 0.75rem; margin-top: 2px; }

.credit-bar {
  height: 7px;
  background: var(--card);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 10px;
}
.credit-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--gold);
  transition: width 0.3s ease;
}
.credit-card.is-low .credit-bar span { background: var(--danger); }

/* ---------- Figyelem / beérkezett anyagok ---------- */

.pill-alert { color: var(--danger); background: var(--danger-soft); border-color: transparent; }

.attention-card { margin-bottom: 22px; }
.attention-card.is-alert { border-color: var(--danger); }
.attention-card.is-clear { border-color: var(--ok); }

.attention-summary { font-size: 0.9rem; margin-bottom: 12px; line-height: 1.5; }
.attention-summary .att-ok { color: var(--ok); font-weight: 600; }
.attention-summary .att-bad { color: var(--danger); font-weight: 600; }
.attention-summary .att-new { color: var(--gold); font-weight: 600; }

.attention-list { display: flex; flex-direction: column; gap: 10px; }

.att-item {
  background: var(--card);
  border: 1px solid var(--divider);
  border-left: 3px solid var(--danger);
  border-radius: 10px;
  padding: 12px 14px;
}
.att-item.is-new { border-color: var(--gold); border-left-color: var(--gold); }

.att-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.att-name { font-weight: 600; font-size: 0.87rem; word-break: break-all; }
.att-time { color: var(--ink-dim); font-size: 0.74rem; white-space: nowrap; }
.att-newtag {
  background: var(--gold-soft); color: var(--gold);
  font-size: 0.64rem; font-weight: 700; padding: 2px 7px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.att-points { margin: 0; padding-left: 18px; }
.att-points li { font-size: 0.82rem; line-height: 1.55; margin-bottom: 4px; }

/* ---------- API-kulcs forgatás ---------- */

.keyrot-card { margin-bottom: 22px; }
.keyrot-card.is-due { border-color: var(--danger); }
.keyrot-card.is-soon { border-color: var(--gold); }

.keyrot-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.keyrot-status { font-size: 1.05rem; font-weight: 600; color: var(--ok); }
.keyrot-card.is-due .keyrot-status { color: var(--danger); }
.keyrot-card.is-soon .keyrot-status { color: var(--gold); }
.keyrot-card.is-untracked .keyrot-status { color: var(--ink-dim); }
.keyrot-detail { font-size: 0.8rem; }
.keyrot-help { margin: 0; max-width: 760px; line-height: 1.5; }

/* ---------- Havi tervezet (modal) ---------- */

.plan-body { padding: 16px 18px; overflow-y: auto; }
.plan-notes { margin-bottom: 16px; line-height: 1.55; }
.plan-notes p { margin: 0 0 6px; }

.plan-section { margin-bottom: 18px; }
.plan-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.plan-section-head h4 {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
}
.plan-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-dim);
  font-size: 0.76rem;
  cursor: pointer;
}
.plan-all input { accent-color: var(--gold); cursor: pointer; }

.plan-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.plan-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--card);
  border: 1px solid var(--divider);
  border-radius: 8px;
  padding: 8px 11px;
  font-size: 0.83rem;
}
.plan-list input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--gold); cursor: pointer; flex-shrink: 0;
}
.plan-list .plan-empty { color: var(--ink-dim); border-style: dashed; }

.plan-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-top: 1px solid var(--divider);
}

/* ---------- Checklist ---------- */

.checklist-add { display: flex; gap: 8px; margin-bottom: 16px; }
.checklist-add input {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--divider);
  color: var(--ink);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 0.88rem;
  font-family: inherit;
}
.checklist-add input:focus { outline: none; border-color: var(--gold); }

.checklist-progress { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.checklist-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--card);
  border-radius: 999px;
  overflow: hidden;
}
.checklist-progress-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--gold);
  transition: width 0.25s ease;
}

.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.checklist li.empty-hint { padding: 8px 0; }

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--divider);
  border-radius: 10px;
  padding: 11px 12px;
}
.checklist-item input[type="checkbox"] {
  margin-top: 2px;
  width: 17px;
  height: 17px;
  accent-color: var(--gold);
  cursor: pointer;
  flex-shrink: 0;
}
.checklist-item .ci-text { flex: 1; font-size: 0.86rem; line-height: 1.4; word-break: break-word; }
.checklist-item.is-done .ci-text { text-decoration: line-through; color: var(--ink-dim); }
.checklist-item .ci-auto {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
  border: 1px solid var(--gold-soft);
  background: var(--gold-soft);
  padding: 1px 6px;
  border-radius: 999px;
  flex-shrink: 0;
  margin-top: 1px;
}
.checklist-item .ci-del {
  appearance: none;
  background: none;
  border: none;
  color: var(--ink-dim);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 2px;
  flex-shrink: 0;
}
.checklist-item .ci-del:hover { color: var(--danger); }

.suggestions-intro { margin: 0 0 12px; }
.suggestion-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.suggestion-list li.empty-hint { padding: 8px 0; }

.suggestion-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px dashed var(--divider);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  color: var(--ink);
  font-size: 0.84rem;
  line-height: 1.4;
  font-family: inherit;
}
.suggestion-item:hover { border-color: var(--gold); border-style: solid; }
.suggestion-item .si-plus { color: var(--gold); font-weight: 700; font-size: 1.05rem; flex-shrink: 0; }

/* ---------- Calendar ---------- */

.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-nav h2 { margin: 0; min-width: 150px; text-align: center; font-size: 1rem; }

.cal-legend { display: flex; gap: 14px; color: var(--ink-dim); font-size: 0.74rem; }
.cal-legend span { display: inline-flex; align-items: center; gap: 5px; }
.cal-legend .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-analyzed { background: var(--gold); }
.dot-shoot { background: var(--ok); }
.dot-check { background: #7f9dae; }

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin: 14px 0 6px;
}
.cal-weekdays span {
  text-align: center;
  color: var(--ink-dim);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }

.cal-cell {
  min-height: 78px;
  background: var(--card);
  border: 1px solid var(--divider);
  border-radius: 9px;
  padding: 6px 7px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.72rem;
}
.cal-cell.is-empty { background: transparent; border-color: transparent; }
.cal-cell.is-today { border-color: var(--gold); }
.cal-daynum { color: var(--ink-dim); font-weight: 600; font-size: 0.74rem; }
.cal-cell.is-today .cal-daynum { color: var(--gold); }

.cal-tag {
  display: flex;
  align-items: center;
  gap: 4px;
  line-height: 1.3;
  word-break: break-word;
}
.cal-tag .dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.cal-tag-shoot { color: var(--ok); }
.cal-tag-analyzed { color: var(--gold); }
.cal-tag-check { color: #9fb8c6; }

.cal-totals { margin-top: 14px; }

@media (max-width: 620px) {
  .cal-cell { min-height: 56px; font-size: 0.66rem; }
  .cal-legend { display: none; }
}

/* ---------- Shooting days ---------- */

.shootdays-intro { margin: 0 0 16px; max-width: 760px; }

.shootday-add { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.shootday-add input, .shootday-add select {
  background: var(--card);
  border: 1px solid var(--divider);
  color: var(--ink);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.84rem;
  font-family: inherit;
}
.shootday-add input:focus, .shootday-add select:focus { outline: none; border-color: var(--gold); }
.shootday-add input[name="theme"] { flex: 1; min-width: 140px; }
.shootday-add .sd-num { width: 90px; }

.table-scroll { overflow-x: auto; }

.shootday-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.shootday-table th {
  text-align: left;
  color: var(--ink-dim);
  font-weight: 600;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 8px 10px;
  border-bottom: 1px solid var(--divider);
  white-space: nowrap;
}
.shootday-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--divider);
  vertical-align: middle;
}
.shootday-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.shootday-table .sd-analyzed { color: var(--gold); font-weight: 600; text-align: center; }
.shootday-table .sd-fulfil { white-space: nowrap; }

.fulfil {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}
.fulfil-ok { background: var(--ok-soft); color: var(--ok); }
.fulfil-part { background: var(--gold-soft); color: var(--gold); }
.fulfil-none { background: var(--danger-soft); color: var(--danger); }
.fulfil-na { color: var(--ink-dim); }
.shootday-table input, .shootday-table select {
  background: var(--surface);
  border: 1px solid transparent;
  color: var(--ink);
  border-radius: 6px;
  padding: 5px 7px;
  font-size: 0.82rem;
  font-family: inherit;
  width: 100%;
}
.shootday-table input:focus, .shootday-table select:focus { outline: none; border-color: var(--gold); }
.shootday-table .sd-plan-input { width: 64px; text-align: center; }
.shootday-table .ci-del { color: var(--ink-dim); background: none; border: none; cursor: pointer; font-size: 1.1rem; }
.shootday-table .ci-del:hover { color: var(--danger); }

.sd-status-tervezett { color: var(--ink-dim); }
.sd-status-megtortent { color: var(--gold); }
.sd-status-feldolgozva { color: var(--ok); }

/* ---------- Platforms ---------- */

.platforms-intro { margin: 0 0 16px; max-width: 760px; }

.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.platform-card {
  background: var(--card);
  border: 1px solid var(--divider);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.platform-card.status-kesz { border-color: var(--ok); }
.platform-card.status-folyamatban { border-color: var(--gold); }

.pc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.pc-name { font-weight: 700; font-size: 0.98rem; }
.pc-cat { color: var(--ink-dim); font-size: 0.72rem; margin-top: 2px; }

.pc-prio {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 999px;
  flex-shrink: 0;
  font-weight: 600;
}
.pc-prio-magas { background: rgba(201,162,74,0.28); color: var(--gold); }
.pc-prio-kozepes { background: var(--gold-soft); color: var(--gold); }
.pc-prio-alacsony { background: rgba(255,255,255,0.06); color: var(--ink-dim); }

.pc-why { font-size: 0.82rem; line-height: 1.45; color: var(--ink); }

.pc-req summary {
  cursor: pointer;
  color: var(--ink-dim);
  font-size: 0.78rem;
  padding: 4px 0;
}
.pc-req ul { margin: 6px 0 4px; padding-left: 18px; }
.pc-req li { font-size: 0.78rem; line-height: 1.5; color: var(--ink); }
.pc-after { font-size: 0.74rem; color: var(--ink-dim); margin-top: 6px; font-style: italic; }

.pc-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 2px; }
.pc-controls select {
  background: var(--surface);
  border: 1px solid var(--divider);
  color: var(--ink);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
}
.pc-controls select:focus { outline: none; border-color: var(--gold); }
.pc-link { color: var(--gold); font-size: 0.78rem; text-decoration: none; }
.pc-link:hover { text-decoration: underline; }

.pc-note {
  background: var(--surface);
  border: 1px solid var(--divider);
  color: var(--ink);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 0.8rem;
  font-family: inherit;
  width: 100%;
  resize: vertical;
  min-height: 34px;
}
.pc-note:focus { outline: none; border-color: var(--gold); }

/* ---------- Modal ---------- */

.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}
.modal-backdrop.is-open { display: flex; }

.modal {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  width: min(680px, 100%);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--divider);
}
.modal-head h3 { margin: 0; font-size: 1rem; word-break: break-all; }
.report-body {
  margin: 0;
  padding: 18px;
  overflow-y: auto;
  white-space: pre-wrap;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.6;
}

/* ---------- Belépés / szerepkör ---------- */

.user-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: capitalize;
}

.login-body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-wrap {
  width: 100%;
  padding: 24px 18px;
  display: flex;
  justify-content: center;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 28px 26px 30px;
}
.login-brand { display: flex; flex-direction: column; margin-bottom: 22px; }
.login-title { font-size: 1.25rem; margin: 0 0 18px; }
.login-form .field { margin-bottom: 14px; }
.login-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--ink-dim);
  margin: 4px 0 20px;
  cursor: pointer;
}
.login-remember input { width: auto; }
.login-submit { width: 100%; justify-content: center; }
.login-error {
  background: var(--danger-soft);
  color: var(--danger);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.85rem;
  margin-bottom: 16px;
}
.login-alt {
  margin: 18px 0 0;
  font-size: 0.82rem;
  color: var(--ink-dim);
  line-height: 1.5;
}
.login-alt a { color: var(--gold); }
.first-login-lead { margin: 0 0 18px; line-height: 1.55; }

.reni-card { max-width: 440px; text-align: left; }
.reni-lead { line-height: 1.6; margin: 0 0 14px; }
.reni-dim { color: var(--ink-dim); font-size: 0.9rem; }
.reni-logout { margin-top: 12px; }

/* ---------- Beállítás-csoport (elérés & indulás) ---------- */

.settings-group {
  border: 1px solid var(--divider);
  border-radius: 10px;
  padding: 14px 16px 6px;
  margin: 0 0 20px;
}
.settings-group legend {
  padding: 0 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold);
}
.settings-group .field { margin-bottom: 10px; }
.lan-line { color: var(--gold); font-weight: 600; margin: 2px 0 12px; word-break: break-all; }
.settings-sep { border: none; border-top: 1px solid var(--divider); margin: 14px 0; }

.tunnel-box {
  background: var(--gold-soft);
  border: 1px solid var(--divider);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 6px 0 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.tunnel-label { color: var(--ink-dim); font-size: 0.82rem; }
.tunnel-url {
  color: var(--gold);
  font-weight: 600;
  word-break: break-all;
  text-decoration: none;
  flex: 1;
  min-width: 180px;
}
.tunnel-url:hover { text-decoration: underline; }
.tunnel-status { width: 100%; margin: 2px 0 0; }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .grid-2col { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .app { padding: 16px 14px 48px; }
  .credit-row { gap: 18px; }
  .credit-num { font-size: 1.4rem; }
  .cal-nav { flex-wrap: wrap; }
  .cal-nav h2 { min-width: 0; flex: 1; }
  .modal { width: 96vw; max-height: 88vh; }
  .report-body { font-size: 0.72rem; }
  .panel { padding: 16px 14px; }
  .settings-form .field input,
  .settings-form .field textarea { font-size: 16px; } /* iOS ne zoomoljon rá */
}

@media (max-width: 480px) {
  .stat-row { grid-template-columns: 1fr 1fr; }
  .topbar { flex-direction: column; align-items: flex-start; }
  .status-cluster { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
}

/* ---------- Jóváhagyás (Reni nézet + Moni fül) ---------- */

.btn-danger { background: var(--danger); color: #2a1210; border-color: var(--danger); }

.app-reni { max-width: 720px; }
.reni-intro { margin-bottom: 18px; }
.reni-intro h1 { font-size: 1.2rem; margin: 0 0 4px; }
.reni-tabs { display: flex; gap: 6px; margin-top: 12px; }
.reni-tab {
  appearance: none; background: var(--card); border: 1px solid var(--divider);
  color: var(--ink-dim); border-radius: 999px; padding: 6px 14px;
  font-size: 0.84rem; font-weight: 600; cursor: pointer;
}
.reni-tab.is-active { color: #201a0c; background: var(--gold); border-color: var(--gold); }

.reni-list { display: flex; flex-direction: column; gap: 16px; }

.reni-card {
  background: var(--card);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  overflow: hidden;
}
.reni-media {
  display: block; width: 100%; max-height: 60vh; object-fit: contain;
  background: #000; border-bottom: 1px solid var(--divider);
}
.reni-media-missing {
  padding: 24px 16px; color: var(--ink-dim); font-size: 0.85rem; text-align: center;
  background: var(--surface); height: auto;
}
.reni-body { padding: 14px 16px 16px; }

.reni-bands { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 10px; }
.dim { display: inline-flex; align-items: center; gap: 6px; }
.dim-label { color: var(--ink-dim); font-size: 0.76rem; }
.band {
  font-size: 0.76rem; font-weight: 700; padding: 2px 9px; border-radius: 999px;
  text-transform: capitalize;
}
.band-high { color: var(--ok); background: var(--ok-soft); }
.band-mid  { color: var(--gold); background: var(--gold-soft); }
.band-low  { color: var(--danger); background: var(--danger-soft); }
.band-na   { color: var(--ink-dim); background: rgba(168,163,154,0.14); }

.reni-reason { margin: 6px 0; line-height: 1.5; font-size: 0.9rem; }
.reni-tip { margin: 6px 0 12px; line-height: 1.5; font-size: 0.85rem; color: var(--ink-dim); }
.reni-tip strong { color: var(--ink); }

.reni-comment {
  width: 100%; background: var(--surface); border: 1px solid var(--divider);
  color: var(--ink); border-radius: 8px; padding: 10px 12px; font-family: inherit;
  font-size: 16px; resize: vertical; margin-bottom: 10px;
}
.reni-comment:focus { outline: none; border-color: var(--gold); }
.reni-actions { display: flex; gap: 10px; }
.reni-actions .btn { flex: 1; justify-content: center; padding: 11px 14px; }

.reni-verdict { font-weight: 700; font-size: 0.92rem; margin-bottom: 6px; }
.verdict-ok { color: var(--ok); }
.verdict-no { color: var(--danger); }
.reni-comment-shown {
  margin: 0 0 10px; font-style: italic; color: var(--ink-dim); line-height: 1.5;
}

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--bg); padding: 12px 20px; border-radius: 999px;
  font-weight: 600; font-size: 0.88rem; opacity: 0; transition: all 0.25s ease;
  z-index: 100; box-shadow: 0 8px 30px rgba(0,0,0,0.4); pointer-events: none;
}
.toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 620px) {
  .reni-media { max-height: 52vh; }
}

/* ---------- Jóváhagyás - Moni fül ---------- */

.tab-badge {
  display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px;
  background: var(--danger); color: #2a1210; border-radius: 999px;
  font-size: 0.7rem; font-weight: 700; text-align: center; vertical-align: middle;
}
.approvals-intro { margin: 0 0 14px; max-width: 760px; }
.approvals-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.af-btn {
  appearance: none; background: var(--card); border: 1px solid var(--divider);
  color: var(--ink-dim); border-radius: 999px; padding: 5px 12px;
  font-size: 0.8rem; font-weight: 600; cursor: pointer;
}
.af-btn.is-active { color: #201a0c; background: var(--gold); border-color: var(--gold); }
.af-btn span { opacity: 0.8; }

.approvals-list { display: flex; flex-direction: column; gap: 14px; }
.app-card {
  display: flex; gap: 14px; background: var(--card); border: 1px solid var(--divider);
  border-radius: var(--radius); padding: 12px; align-items: flex-start;
}
.app-media {
  width: 140px; height: 140px; object-fit: cover; border-radius: 8px;
  background: #000; flex-shrink: 0;
}
.app-card-body { flex: 1; min-width: 0; }
.app-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.app-status { font-size: 0.72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.st-fix { color: var(--danger); background: var(--danger-soft); }
.st-mid { color: #9fb8c6; background: rgba(159,184,198,0.16); }

/* ---------- Házirend / Névjegy dokumentum ---------- */
.doc { max-width: 760px; line-height: 1.6; }
.doc-banner {
  background: var(--gold-soft); color: var(--gold); border: 1px solid var(--divider);
  border-radius: 8px; padding: 10px 14px; font-size: 0.85rem; font-weight: 600;
  margin-bottom: 18px;
}
.doc-title { font-size: 1.3rem; margin: 0 0 4px; }
.doc-meta { color: var(--ink-dim); font-size: 0.82rem; margin: 0 0 20px; }
.doc h2 { font-size: 1rem; color: var(--gold); margin: 22px 0 8px; }
.doc p, .doc li { font-size: 0.9rem; }
.doc ul { padding-left: 20px; }
.doc li { margin-bottom: 6px; }
.st-wait { color: var(--gold); background: var(--gold-soft); }
.st-ok { color: var(--ok); background: var(--ok-soft); }
.st-no { color: var(--ink-dim); background: rgba(168,163,154,0.14); }
.st-draft { color: #9a6b00; background: rgba(201,162,74,0.22); border: 1px solid rgba(201,162,74,0.5); }
.st-arch { color: var(--ink-dim); background: rgba(120,120,130,0.18); border: 1px solid rgba(120,120,130,0.45); }
.st-test { color: #7a4fd0; background: rgba(140,110,210,0.18); border: 1px solid rgba(140,110,210,0.5); }
.app-stage { margin-left: auto; white-space: nowrap; }
.app-archive, .app-test { white-space: nowrap; }
.app-file { font-size: 0.76rem; color: var(--ink-dim); word-break: break-all; }
.app-reason { margin: 6px 0; font-size: 0.85rem; line-height: 1.5; }
.app-pairing { margin: 6px 0; font-size: 0.85rem; padding: 6px 9px; border-radius: 8px;
  background: rgba(90,170,120,0.12); border: 1px solid rgba(90,170,120,0.4); }
.app-fix { margin: 6px 0; padding-left: 18px; font-size: 0.82rem; color: var(--ink-dim); line-height: 1.5; }
.app-decision {
  margin: 8px 0; padding: 8px 10px; background: var(--surface);
  border-radius: 8px; font-size: 0.82rem;
}
.app-decision-comment { margin-top: 4px; font-style: italic; color: var(--ink-dim); }
.app-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.app-comment {
  flex: 1; min-width: 160px; background: var(--surface); border: 1px solid var(--divider);
  color: var(--ink); border-radius: 8px; padding: 8px 10px; font-family: inherit; font-size: 0.84rem;
}
.app-comment:focus { outline: none; border-color: var(--gold); }

@media (max-width: 620px) {
  .app-card { flex-direction: column; }
  .app-media { width: 100%; height: 200px; }
  .app-comment { font-size: 16px; } /* iOS zoom ellen */
}

/* ---------- Feltöltés (appon belül) ---------- */

.reni-upload {
  background: var(--card); border: 1px solid var(--divider);
  border-radius: var(--radius); padding: 16px; margin-bottom: 20px;
}
.reni-upload-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.reni-upload-head h2 { margin: 0; font-size: 1rem; }
.upload-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--gold); color: #201a0c; font-weight: 700;
  border-radius: 8px; padding: 10px 16px; cursor: pointer; font-size: 0.9rem;
}
.upload-btn:hover { filter: brightness(1.05); }
.upload-btn input { display: none; }

.upload-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.up-row {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center;
  background: var(--surface); border: 1px solid var(--divider);
  border-radius: 8px; padding: 8px 12px;
}
.up-name { font-size: 0.82rem; word-break: break-all; }
.up-size { color: var(--ink-dim); }
.up-bar {
  grid-column: 1 / -1; height: 6px; background: var(--divider);
  border-radius: 999px; overflow: hidden; margin-top: 2px;
}
.up-bar span { display: block; height: 100%; width: 0; background: var(--gold); transition: width 0.2s ease; }
.up-state { font-size: 0.78rem; text-align: right; white-space: nowrap; }
.up-pct { color: var(--ink-dim); }
.up-done { color: var(--ok); font-weight: 600; }
.up-err { color: var(--danger); font-weight: 600; }
.up-row.up-ok .up-bar span { background: var(--ok); }
.up-row.up-fail .up-bar span { background: var(--danger); }
.up-row.up-fail .up-state { white-space: normal; }
