/* helpIT Joomla-Dashboard – keine externen Schriften, nur Systemschriften */
:root {
  --dark: #2b2b33;
  --accent: #fab96f;
  --bg: #f5f5f7;
  --card: #fff;
  --line: #e4e4ea;
  --text: #2b2b33;
  --muted: #74747f;
  --ok: #1f8a4c;
  --ok-bg: #e3f4ea;
  --upd: #9a5b00;
  --upd-bg: #fff0d9;
  --err: #b42318;
  --err-bg: #fde7e5;
  --none: #5b5b66;
  --none-bg: #ececf1;
  --radius: 10px;
}

* { box-sizing: border-box; }
html { font-size: 15px; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.45;
}
a { color: inherit; }
[hidden] { display: none !important; }

.wrap { max-width: 1400px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* Kopfzeile */
.top { background: var(--dark); color: #fff; padding: 18px 0; }
.top__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 1.15rem; letter-spacing: .01em; }
.brand span { color: var(--accent); }
.latest { font-size: .85rem; opacity: .8; margin-top: 2px; }
.latest b { color: var(--accent); font-weight: 600; }
.top__nav { display: flex; gap: 18px; }
.top__nav a { text-decoration: none; font-size: .9rem; opacity: .85; }
.top__nav a:hover { opacity: 1; color: var(--accent); }

main.wrap { padding-top: 24px; padding-bottom: 40px; }

.flash {
  background: #fff; border-left: 4px solid var(--accent);
  padding: 10px 14px; border-radius: 6px; margin-bottom: 18px;
}
.flash--error { border-color: var(--err); background: var(--err-bg); }

/* Kacheln */
.summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.tile {
  font: inherit; color: inherit; text-align: left; cursor: pointer;
  background: var(--card); border: 2px solid transparent; border-radius: var(--radius);
  padding: 14px 18px; display: flex; flex-direction: column;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.tile:hover { border-color: var(--line); }
.tile.is-active { border-color: var(--dark); }
.tile__num { font-size: 2rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile__label { color: var(--muted); font-size: .9rem; }
.tile--update .tile__num { color: var(--upd); }
.tile--error .tile__num { color: var(--err); }
.tile--ok .tile__num { color: var(--ok); }

/* Werkzeugleiste */
.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar input[type="search"] { flex: 1 1 320px; max-width: 480px; }

input {
  font: inherit; font-weight: 400; color: inherit; width: 100%;
  padding: 9px 11px; border: 1px solid var(--line); border-radius: 7px; background: #fff;
}
input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }

.btn {
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block;
  background: var(--dark); color: #fff; border: 1px solid var(--dark);
  padding: 9px 16px; border-radius: 7px; white-space: nowrap;
}
.btn:hover { background: #3c3c47; }
.btn:disabled { opacity: .55; cursor: default; }
.btn--small { padding: 5px 10px; font-size: .82rem; }
.btn--ghost { background: transparent; color: var(--dark); border-color: var(--line); }
.btn--ghost:hover { background: #fff; border-color: var(--dark); }
.btn--accent { background: var(--accent); color: var(--dark); border-color: var(--accent); }
.btn--accent:hover { background: #f7a84a; border-color: #f7a84a; }
.btn--danger { background: transparent; color: var(--err); border-color: var(--err); }
.btn--danger:hover { background: var(--err-bg); }

/* Tabelle */
.table-wrap { background: var(--card); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(0,0,0,.05); overflow-x: auto; }
table.sites { width: 100%; border-collapse: collapse; }
.sites th {
  text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.sites td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.sites tr:last-child td { border-bottom: 0; }
.sites tr.is-busy { opacity: .5; }
.sites td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.site-name { font-weight: 600; }
.site-url { color: var(--muted); font-size: .85rem; text-decoration: none; }
.site-url:hover { color: var(--text); text-decoration: underline; }
.arrow { color: var(--upd); font-weight: 600; }
.note { font-size: .8rem; color: var(--muted); margin-top: 4px; max-width: 260px; }
.actions { white-space: nowrap; text-align: right; }
.actions__inner { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; min-width: 190px; }

.pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: .8rem; font-weight: 600; white-space: nowrap;
}
.pill--ok { background: var(--ok-bg); color: var(--ok); }
.pill--update { background: var(--upd-bg); color: var(--upd); }
.pill--error, .pill--eol { background: var(--err-bg); color: var(--err); }
.pill--unchecked { background: var(--none-bg); color: var(--none); }

/* Erweiterungen */
.extbtn {
  font: inherit; cursor: pointer; color: var(--text); text-align: left;
  background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 3px;
  display: flex; flex-wrap: wrap; gap: 4px; max-width: 380px; white-space: normal;
}
.extbtn:hover { border-color: var(--line); background: #fff; }
.extbtn[aria-expanded="true"] { border-color: var(--dark); background: #fff; }
.chip {
  display: inline-block; font-size: .78rem; background: var(--none-bg); color: var(--text);
  border-radius: 5px; padding: 2px 7px; white-space: nowrap;
}
.chip b { font-weight: 600; color: var(--muted); }
.chip--more { background: transparent; color: var(--muted); }
details.sub { margin-top: 12px; font-size: .85rem; }
details.sub summary { color: var(--muted); }
.sites tr.is-open td { border-bottom-color: transparent; }
.sites > tbody > tr.detail > td { background: #fafafc; padding: 16px 20px 20px; }
.detail__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.detail__grid h3 { margin: 0 0 8px; font-size: .95rem; display: inline-block; }
.detail__grid summary { cursor: pointer; list-style-position: inside; }
.exttable { width: 100%; border-collapse: collapse; font-size: .85rem; }
.sites .exttable td { padding: 5px 8px 5px 0; border-bottom: 1px solid var(--line); vertical-align: top; background: transparent; }
.sites .exttable td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.sites .exttable tr.is-off td { opacity: .55; }
@media (max-width: 900px) { .detail__grid { grid-template-columns: 1fr; } }

.empty { background: var(--card); padding: 28px; border-radius: var(--radius); text-align: center; }

/* Formulare */
.panel { background: var(--card); border-radius: var(--radius); padding: 22px 24px; margin-top: 26px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.panel h2 { margin: 0 0 14px; font-size: 1.15rem; }
.grid-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 18px; }
.grid-form label { display: flex; flex-direction: column; gap: 5px; font-size: .85rem; font-weight: 600; }
.span2 { grid-column: span 2; }
.span3 { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; align-items: end; }
.delete-form { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }

.foot { padding-bottom: 30px; }

/* Login */
body.auth { display: grid; place-items: center; min-height: 100vh; background: var(--dark); }
.auth__box {
  background: #fff; padding: 30px 32px; border-radius: 14px; width: min(400px, 92vw);
  display: flex; flex-direction: column; gap: 14px;
}
.auth__box h1 { margin: 0; font-size: 1.3rem; }
.auth__box .brand { color: var(--dark); }
.auth__box label { display: flex; flex-direction: column; gap: 5px; font-size: .85rem; font-weight: 600; }

@media (max-width: 800px) {
  .summary { grid-template-columns: repeat(2, 1fr); }
  .grid-form { grid-template-columns: 1fr; }
  .span2, .span3 { grid-column: auto; }
}
.hint { font-size: .8rem; border-bottom: 1px dotted var(--muted); cursor: help; }

/* Gruppen Sicherheitsplan */
.sites tr.group__head th {
  background: var(--dark); color: #fff; text-transform: none; letter-spacing: 0;
  font-size: .9rem; padding: 9px 14px;
}
.sites tr.group__head th .muted { color: rgba(255,255,255,.6); }
.sites tbody.group + tbody.group tr.group__head th { border-top: 14px solid var(--bg); }
.pill--notoken { background: var(--none-bg); color: var(--none); }

/* Checkboxen & Import */
label.check { flex-direction: row !important; align-items: center; gap: 8px !important; font-weight: 400 !important; cursor: pointer; }
label.check input { width: auto; }
.import-form { display: flex; flex-direction: column; gap: 10px; }
.folders { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow: auto; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.import-form label.check { display: flex; font-size: .9rem; }
.note--js { color: var(--err); }
.note__more { margin-top: 2px; }
.note__more summary { cursor: pointer; color: var(--muted); font-size: .75rem; text-decoration: underline dotted; }
.note__more[open] summary { margin-bottom: 3px; }
.group__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.btn--light { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); font-weight: 600; }
.btn--light:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.flash--warn { border-color: var(--upd); background: var(--upd-bg); }
.toolbar__check { font-size: .9rem; white-space: nowrap; display: flex; }
.pill--paused { background: var(--none-bg); color: var(--none); }
.sites tr.row[data-status="paused"] td { opacity: .7; }
