/* Barufe-Doku – Grundlayout; Farben siehe Abschnitt „Barufe-Farbschema“ am Dateiende */
:root {
  --bg: #0c2615;            /* sehr dunkles Logo-Grün */
  --bg-2: #123a20;
  --topbar: #0a2012;
  --panel: #12361e;
  --panel-2: #174427;
  --input: #0e2c18;
  --border: #255d36;
  --text: #eef6ee;
  --muted: #a3c2aa;
  --accent: #72b72a;        /* Logo-Lindgrün */
  --accent-2: #1f7530;      /* Logo-Dunkelgrün */
  --accent-text: #0c2615;
  --accent-soft: rgba(114, 183, 42, .16);
  --danger: #ff8a7a; --danger-bg: rgba(255, 110, 90, .12);
  --ok-bg: rgba(114, 183, 42, .18); --ok-text: #b6e88a;
  --err-bg: rgba(255, 110, 90, .15); --err-text: #ffb3a8;
  --info-bg: rgba(120, 190, 255, .12); --info-text: #b9dcff;
  --hl: rgba(114, 183, 42, .28);
  --radius: 10px; --shadow: 0 2px 10px rgba(0, 0, 0, .25);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg) linear-gradient(160deg, var(--bg-2) 0%, var(--bg) 55%) fixed; color: var(--text);
  font: 14px/1.5 "Segoe UI", system-ui, -apple-system, sans-serif; min-height: 100vh; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0 0 16px; }
h2 { font-size: 16px; margin: 24px 0 10px; }
code { font-family: Consolas, ui-monospace, monospace; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

/* buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--panel-2); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { border-color: var(--danger); background: var(--danger-bg); }
.btn.small { padding: 5px 10px; font-size: 12.5px; }
.btn.full { width: 100%; }
.link { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; font: inherit; }
input[type=text], input[type=password], input[type=search], input:not([type]), textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; background: var(--input); color: var(--text); font: inherit; }
input:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: #6f9579; }
input[type=checkbox] { accent-color: var(--accent); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 13px; }
.stack.narrow { max-width: 420px; }
.inline-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.inline-form input:not([type=checkbox]) { width: 240px; }
.check { display: inline-flex; gap: 6px; align-items: center; font-weight: 400 !important; flex-direction: row !important; }

.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; border: 1px solid transparent; }
.alert.ok { background: var(--ok-bg); color: var(--ok-text); border-color: rgba(114, 183, 42, .35); }
.alert.error { background: var(--err-bg); color: var(--err-text); border-color: rgba(255, 110, 90, .3); }
.alert.info { background: var(--info-bg); color: var(--info-text); }

/* auth */
body.auth { display: grid; place-items: center; padding: 16px; }
.auth-card { width: 100%; max-width: 410px; background: var(--panel); border: 1px solid var(--border); border-top: 4px solid var(--accent); border-radius: 14px; padding: 28px; box-shadow: var(--shadow); }
.auth-card form + form { margin-top: 12px; text-align: center; }
.auth-brand { text-align: center; margin-bottom: 22px; }
.auth-brand img { max-width: 100%; height: auto; }
.auth-sub { margin-top: 6px; font-size: 13px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.otp { text-align: center; font-size: 24px !important; letter-spacing: 6px; font-family: Consolas, monospace !important; }
.qr { display: flex; justify-content: center; margin: 12px 0 6px; }
.qr img { background: #fff; padding: 6px; border-radius: 8px; }
.secret-code { display: inline-block; margin-top: 4px; padding: 3px 8px; border-radius: 6px; background: var(--input); border: 1px solid var(--border); letter-spacing: 1px; user-select: all; }

/* app layout */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 18px; padding: 10px 20px;
  background: var(--topbar); border-bottom: 2px solid var(--accent-2); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { display: block; height: 34px; width: auto; }
.brand-sub { padding-left: 12px; border-left: 1px solid var(--border); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.search { flex: 1; max-width: 520px; }
.usernav { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.usernav a { color: var(--text); font-weight: 600; }
.layout { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - 56px); }
.sidebar { border-right: 1px solid var(--border); background: rgba(10, 32, 18, .55); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.side-title { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--border); font-size: 11px; text-align: center; color: var(--muted); }
.company-list { list-style: none; margin: 0; padding: 0; flex: 1; overflow: auto; }
.company-list a { display: block; padding: 7px 10px; border-radius: 7px; color: var(--text); }
.company-list a:hover { background: var(--panel-2); text-decoration: none; }
.company-list a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
.new-company .stack { margin-top: 8px; }
select { padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--input); color: var(--text); font: inherit; }
select:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.usernav .chip { margin-left: 4px; font-weight: 600; color: var(--accent); }
.readonly-note { border-top: 1px solid var(--border); padding-top: 12px; }
/* Benutzerseite */
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 18px; box-shadow: var(--shadow); }
.panel-title { margin: 0 0 12px; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.add-user { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.add-user label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.add-user label:first-of-type { flex: 1 1 240px; }
.add-user select { padding: 9px 11px; min-width: 190px; }
.pw-notice { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 18px; margin-bottom: 18px;
  background: var(--ok-bg); border: 1px solid rgba(114, 183, 42, .45); border-radius: var(--radius); }
.pw-notice-title { font-size: 15px; }
.pw-notice-value { display: flex; gap: 8px; align-items: center; }
.pw-notice-value .secret-code { font-size: 16px; padding: 6px 12px; margin: 0; color: var(--text); }
.user-list { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.user-row { display: grid; grid-template-columns: 42px 1fr auto auto; gap: 14px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.user-row:last-child { border-bottom: 0; }
.user-row:hover { background: rgba(114, 183, 42, .05); }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; letter-spacing: .02em; }
.avatar.role-admin, .dot.role-admin { background: var(--accent); color: var(--accent-text); }
.avatar.role-editor, .dot.role-editor { background: #2f8f45; color: #eaffea; }
.avatar.role-reader, .dot.role-reader { background: #3b5f47; color: #d5e8d9; }
.user-name { font-weight: 700; font-size: 15px; }
.tag { display: inline-block; margin-left: 4px; padding: 0 7px; border-radius: 6px; font-size: 11px; font-weight: 700; background: var(--accent-soft); color: var(--accent); vertical-align: 2px; }
.user-badges { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 3px; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; border: 1px solid transparent; }
.badge.ok { background: var(--ok-bg); color: var(--ok-text); border-color: rgba(114, 183, 42, .35); }
.badge.warn { background: rgba(240, 190, 60, .12); color: #f1cf73; border-color: rgba(240, 190, 60, .35); }
.role-select { min-width: 190px; padding: 8px 10px; font-weight: 600; }
.role-select.role-admin { border-color: var(--accent); color: var(--accent); }
.user-menu { position: relative; }
.user-menu summary.icon { width: 34px; height: 34px; font-size: 18px; border: 1px solid var(--border); border-radius: 8px; }
.user-menu[open] summary.icon { border-color: var(--accent); color: var(--accent); }
.user-menu .menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 8; min-width: 230px; padding: 6px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.user-menu .menu button { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: 7px; background: none; color: var(--text); font: inherit; cursor: pointer; }
.user-menu .menu button:hover { background: var(--accent-soft); }
.user-menu .menu button.danger { color: var(--danger); }
.user-menu .menu button.danger:hover { background: var(--danger-bg); }
.role-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.role-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.role-card-head { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 8px; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.role-card ul { margin: 0; padding: 0; list-style: none; font-size: 13px; }
.role-card li { padding: 2px 0 2px 20px; position: relative; color: var(--muted); }
.role-card li.yes::before { content: "✔"; position: absolute; left: 0; color: var(--accent); }
.role-card li.no::before { content: "✕"; position: absolute; left: 0; color: var(--danger); }
@media (max-width: 640px) {
  .user-row { grid-template-columns: 40px 1fr auto; }
  .user-role { grid-column: 2 / 4; }
  .role-select { width: 100%; }
}
.import { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--border); padding-top: 12px; }
.dropzone { display: block; border: 1.5px dashed var(--border); border-radius: 10px; padding: 12px; text-align: center; cursor: pointer; }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.dropzone input { display: block; width: 100%; font-size: 12px; margin-bottom: 6px; color: var(--muted); }
.content { padding: 24px 28px; min-width: 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card { display: flex; flex-direction: column; gap: 8px; padding: 16px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); box-shadow: var(--shadow); }
.card:hover { border-color: var(--accent); text-decoration: none; }
.card-title { font-size: 16px; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--border); font-size: 12px; color: var(--muted); white-space: nowrap; }
.empty { padding: 28px; background: var(--panel); border: 1px dashed var(--border); border-radius: var(--radius); max-width: 720px; }
.empty h2 { margin-top: 0; }

.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.head-actions { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.head-actions details { position: relative; }
.popover { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; width: 260px; padding: 12px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.tabs a { padding: 8px 14px; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 600; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }
.tabs details { margin-left: 4px; position: relative; }
.tabs summary { padding: 4px 10px; border-radius: 7px; color: var(--muted); cursor: pointer; font-weight: 700; }
.tabs summary:hover { color: var(--accent); background: var(--accent-soft); }
.tabs .popover { left: 0; right: auto; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.sheet-head h2 { margin: 0; }
.sheet-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 14px; }
.meta div { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px; }
.meta dt { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.meta dd { margin: 0; font-weight: 600; font-family: Consolas, monospace; }

.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 8px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
table.data td { white-space: pre-line; }
th { position: sticky; top: 0; background: var(--panel-2); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(114, 183, 42, .06); }
tr.hl, tr.hl:hover { background: var(--hl); }
td.actions { display: flex; gap: 6px; flex-wrap: wrap; white-space: normal; }
.lock { font-size: 11px; }

.secret { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.secret .val { font-family: Consolas, monospace; letter-spacing: 1px; }
.secret.shown .val { background: var(--accent-soft); color: var(--accent); padding: 0 5px; border-radius: 4px; letter-spacing: 0; }
.icon { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; border: 1px solid transparent; background: none; color: var(--muted); cursor: pointer; padding: 0; font: inherit; font-size: 14px; line-height: 1; }
.icon:hover { border-color: var(--border); color: var(--accent); background: var(--panel-2); }
.icon.danger:hover { color: var(--danger); border-color: var(--danger); }
.icon.done { color: var(--accent); }

/* Bearbeiten-Modus */
.edit-bar { position: sticky; top: 58px; z-index: 6; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: space-between;
  padding: 10px 14px; margin-bottom: 14px; background: var(--panel); border: 1px solid var(--accent-2); border-radius: var(--radius); box-shadow: var(--shadow); }
.edit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 16px; }
.edit-grid label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 13px; }
.edit-grid textarea { min-height: 38px; }
table.edit td, table.edit th { padding: 4px; white-space: normal; }
table.edit th { text-transform: none; letter-spacing: 0; font-size: 12px; vertical-align: bottom; min-width: 150px; }
table.edit th.ctl, table.edit td.ctl { min-width: 0; width: 1%; white-space: nowrap; vertical-align: middle; }
table.edit th.add { min-width: 0; width: 1%; }
table.edit textarea { min-width: 140px; min-height: 34px; height: 34px; padding: 6px 8px; resize: vertical; font-size: 13px; }
table.edit textarea.masked { -webkit-text-security: disc; font-family: Consolas, monospace; }
.col-head { display: flex; flex-direction: column; gap: 4px; }
.col-head input { padding: 6px 8px; font-weight: 700; }
.col-tools { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-weight: 400; }
.col-tools .check { font-size: 12px; }
.col-tools > span { display: inline-flex; white-space: nowrap; }
.col-tools .icon { width: 22px; height: 22px; }
.row-tools { display: flex; gap: 2px; }
tr.dragging { opacity: .5; }

.result { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 16px 12px; margin-bottom: 14px; }
.hit { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border); color: var(--text); }
.hit:hover { text-decoration: none; background: var(--panel-2); }
.hit .cell { font-size: 13px; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--accent); color: var(--accent-text); padding: 8px 16px; border-radius: 8px; font-weight: 700; z-index: 50; }

@media (max-width: 800px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--border); }
  .company-list { max-height: 160px; }
  .topbar { flex-wrap: wrap; padding: 10px 16px; }
  .brand-sub { display: none; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .content { padding: 16px; }
  .edit-bar { top: 0; }
}

/* ---- Firmen-Zusatzpasswort ---- */
.lock-pop { width: 290px; }
.lock-pop form + form { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.unlock-wrap { display: flex; justify-content: center; padding-top: 30px; }
.unlock-card { width: 100%; max-width: 440px; text-align: center; border-top: 4px solid var(--accent); }
.unlock-card .stack { text-align: left; }
.unlock-icon { font-size: 40px; line-height: 1; margin: 6px 0 4px; }
.unlock-card h1 { margin: 6px 0 8px; }
.admin-lock { margin-top: 14px; text-align: left; border-top: 1px solid var(--border); padding-top: 10px; }
.admin-lock summary { cursor: pointer; color: var(--muted); }

/* ---- Info / Version ---- */
.side-version { margin-top: auto; padding-top: 10px; text-align: center; }
.auth-foot { margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--muted); text-align: center; }
.info-wrap { max-width: 720px; }
.info-card { border-top: 4px solid var(--accent); }
.info-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.info-head h1 { margin: 0 0 4px; }
.info-version { font-size: 20px; font-weight: 700; color: var(--accent); }
.info-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 16px 0; }
.info-list div { background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; }
.info-list dt { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.info-list dd { margin: 2px 0 0; }
.info-copy { padding-top: 12px; border-top: 1px solid var(--border); }
.changelog + .changelog { margin-top: 12px; }
.changelog ul { margin: 6px 0 0; padding-left: 20px; }

/* ---- Ordner Diverses ---- */
.file-upload { display: flex; gap: 10px; align-items: stretch; margin: 4px 0 16px; flex-wrap: wrap; }
.file-upload .dropzone { flex: 1 1 320px; }
.file-upload .btn { align-self: center; }
table.files td.num, table.files th.num { text-align: right; white-space: nowrap; }
table.files .file-name { font-weight: 600; word-break: break-all; }
.file-actions { display: flex; gap: 6px; justify-content: flex-end; align-items: center; white-space: nowrap; }
.file-actions form { margin: 0; }
table.files td { vertical-align: middle; white-space: normal; }
table.files td:first-child { width: 100%; }

/* ---- WLAN-QR-Code ---- */
.wlan-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: 20px; align-items: start; }
@media (max-width: 980px) { .wlan-layout { grid-template-columns: 1fr; } }
.wlan-settings label { display: block; margin: 8px 0; font-size: 13px; color: var(--muted); }
.wlan-settings label input:not([type=checkbox]), .wlan-settings select { display: block; width: 100%; margin-top: 4px; }
.wlan-settings .panel-title { margin-top: 18px; }
.wlan-settings .panel-title:first-child { margin-top: 0; }
.wlan-settings label.check { display: flex; gap: 8px; align-items: center; color: var(--text); }
.field-label { font-size: 13px; color: var(--muted); margin: 6px 0 4px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.seg button { padding: 7px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--input); color: var(--text); cursor: pointer; font: inherit; font-size: 13px; }
.seg button:hover { border-color: var(--accent); }
.seg button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 700; }
.eap-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.print-row { display: flex; gap: 10px; align-items: flex-end; }
.print-row label { flex: 1; margin: 0; }

.wifi-card { --c-bg: #fff; --c-text: #1d2433; --c-muted: #5d6677; --c-line: #dfe3ea; --c-head: #1d2433;
  background: var(--c-bg); color: var(--c-text); border: 1px solid var(--c-line); border-radius: 14px;
  padding: 18px 20px; max-width: 520px; box-shadow: var(--shadow); font-family: "Segoe UI", Arial, sans-serif; }
.wifi-card.style-barufe { --c-bg: #fff8f8; --c-line: #e8a0a4; --c-head: #d4202a; border-top: 6px solid #f7e80c; }
.wifi-card.style-cafe { --c-bg: #fbf3e6; --c-text: #4a3222; --c-muted: #8a6a52; --c-line: #e3cfb2; --c-head: #6b3f22; font-family: Georgia, "Times New Roman", serif; }
.wifi-card.style-guest { --c-bg: #eef6ff; --c-line: #9cc3ef; --c-head: #1557a0; border: 2px dashed #6aa5e6; }
.wifi-card-head { font-size: 20px; font-weight: 700; color: var(--c-head); margin-bottom: 14px; }
.wifi-card-body { display: flex; gap: 18px; align-items: center; }
.wifi-card.portrait { max-width: 300px; text-align: center; }
.wifi-card.portrait .wifi-card-body { flex-direction: column; }
.wifi-card.portrait .wifi-fields { width: 100%; }
.wifi-qr img { display: block; width: 150px; height: 150px; image-rendering: pixelated; background: #fff; }
.wifi-fields { flex: 1; min-width: 0; }
.wifi-fields label { display: block; font-size: 12px; font-weight: 600; color: var(--c-muted); margin-bottom: 10px; }
.wifi-fields input { display: block; width: 100%; margin-top: 3px; background: transparent; color: var(--c-text); border: 1px solid var(--c-line); border-radius: 6px; padding: 7px 9px; font: 17px/1.3 inherit; font-family: inherit; }
.wifi-fields input:focus { outline: 2px solid #72b72a; }
.wifi-value { font-size: 17px; font-weight: 600; color: var(--c-text); margin-top: 3px; word-break: break-all; }
.wifi-tip { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--c-line); font-size: 12px; color: var(--c-muted); }
.print-only { display: none; }

@media print {
  @page { margin: 12mm; }
  body { background: #fff !important; }
  .topbar, .sidebar, .no-print, .alert { display: none !important; }
  .layout, .content { display: block !important; padding: 0 !important; margin: 0 !important; }
  .print-only { display: flex !important; flex-wrap: wrap; gap: 8mm; }
  .print-only .wifi-card { box-shadow: none; break-inside: avoid; page-break-inside: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
[hidden] { display: none !important; }
.usernav a { white-space: nowrap; }
.wifi-card-head { display: flex; align-items: center; gap: 10px; }
.wifi-icon { width: 31px; height: 24px; flex: none; }
.wifi-card.portrait .wifi-card-head { justify-content: center; }

/* ---- Passwort-Generator ---- */
.pwgen { display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); gap: 20px; align-items: start; --pg-fill: 50%; }
@media (max-width: 980px) { .pwgen { grid-template-columns: 1fr; } }
.pwgen .panel-title { margin-top: 18px; }
.pwgen .panel-title:first-child { margin-top: 0; }
.pg-range-head { margin-bottom: 6px; }
.pg-range-head strong { font-size: 18px; color: var(--accent); }
.pg-level { margin-left: 6px; font-size: 12px; font-style: italic; }
.pwgen input[type=range] { width: 100%; accent-color: var(--accent); }
.pg-crack { margin-top: 6px; }
.lvl-bad { color: #ff8a7a; } .lvl-weak { color: #ffc069; } .lvl-ok { color: #e6e66a; } .lvl-good, .lvl-max { color: var(--accent); }
.pg-opts { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.pg-opts label.check { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.pg-special-set { margin: -2px 0 4px 26px; width: calc(100% - 26px); font-family: Consolas, monospace; }
.pg-special-set:disabled { opacity: .45; }
.pg-generate { margin-top: 16px; }
.pg-result-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pg-result-head .panel-title { margin: 0; }
.pg-list { list-style: none; margin: 12px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pg-list li { display: flex; gap: 10px; align-items: center; background: var(--accent-soft); border: 1px solid var(--accent-2); border-radius: 8px; padding: 10px 12px; }
.pg-pw { flex: 1; min-width: 0; font: 600 17px/1.4 Consolas, "Courier New", monospace; color: var(--text); word-break: break-all; background: none; }
.pg-list .btn.ok { border-color: var(--accent); color: var(--accent); }
.pwgen-result { position: relative; }
.pwgen-result::before { content: ""; position: absolute; left: 0; top: 0; height: 4px; width: var(--pg-fill); background: var(--accent); border-radius: var(--radius) 0 0 0; transition: width .2s; }
.pg-opts input.pg-special-set { width: calc(100% - 26px); }
.topbar { flex-wrap: wrap; row-gap: 8px; }
.search { min-width: 200px; }
.usernav { flex-wrap: wrap; row-gap: 6px; justify-content: flex-end; }

/* ---- Speedtest ---- */
.st { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: 20px; align-items: start; }
@media (max-width: 980px) { .st { grid-template-columns: 1fr; } }
.st-main { display: flex; flex-direction: column; align-items: center; padding: 24px; border-top: 4px solid var(--accent); }
.st-gauge { position: relative; width: 100%; max-width: 420px; }
.st-svg { display: block; width: 100%; height: auto; }
.st-track, .st-bar { fill: none; stroke-width: 16; stroke-linecap: round; }
.st-track { stroke: var(--panel-2); }
.st-bar { stroke: var(--accent); transition: stroke-dashoffset .25s ease-out; }
.st[data-phase="up"] .st-bar { stroke: #5fb6ff; }
.st-ticks text { fill: var(--muted); font-size: 9px; }
.st-readout { position: absolute; left: 0; right: 0; bottom: 6%; text-align: center; }
.st-value { font-size: 44px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.st-unit { color: var(--muted); font-size: 13px; margin-top: 2px; }
.st-phase { color: var(--accent); font-size: 13px; margin-top: 6px; min-height: 1.2em; }
.st-go { margin: 18px 0 8px; width: 120px; height: 120px; border-radius: 50%; border: 3px solid var(--accent); background: radial-gradient(circle at 50% 35%, var(--panel-2), var(--bg)); color: var(--accent); font-family: inherit; font-size: 22px; font-weight: 800; line-height: 1; letter-spacing: .1em; cursor: pointer; box-shadow: 0 0 0 0 var(--accent-soft); transition: transform .15s, box-shadow .3s; }
.st-go:hover:not(:disabled) { transform: scale(1.05); box-shadow: 0 0 0 10px var(--accent-soft); }
.st-go:disabled { opacity: .6; cursor: progress; }
.st-results { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: 100%; margin-top: 14px; }
@media (max-width: 640px) { .st-results { grid-template-columns: repeat(2, 1fr); } }
.st-res { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; text-align: center; }
.st-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; }
.st-num { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.st-u { color: var(--muted); font-size: 12px; }
.st-dl { margin: 0 0 12px; display: flex; flex-direction: column; gap: 10px; }
.st-dl dt { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.st-dl dd { margin: 2px 0 0; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; word-break: break-all; }
#i-ip { font-family: Consolas, monospace; font-size: 16px; color: var(--accent); }

/* ---------- Snipping-Tool ---------- */
.snip-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.snip-opt { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.snip-opt select { width: auto; }
kbd { display: inline-block; padding: 0 5px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; font-size: 11px; background: var(--input); color: var(--text); }
.snip-empty { text-align: center; padding: 40px 18px; }
.snip-empty-icon { font-size: 44px; color: var(--accent); }
.snip-countdown { position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 60; padding: 18px 30px; border-radius: 14px;
  background: rgba(0, 0, 0, .8); color: #fff; font-size: 28px; font-weight: 700; border: 2px solid var(--accent); }
.snip-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 12px; }
.snip-group { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.snip-group .btn.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.snip-color { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border); padding: 0; cursor: pointer; }
.snip-color.active { outline: 2px solid var(--accent); outline-offset: 2px; }
.snip-canvas-wrap { overflow: auto; max-height: 72vh; padding: 10px; border-radius: 8px; border: 1px solid var(--border);
  background-color: #2a2a2a; background-image: linear-gradient(45deg, #333 25%, transparent 25%, transparent 75%, #333 75%), linear-gradient(45deg, #333 25%, transparent 25%, transparent 75%, #333 75%);
  background-size: 20px 20px; background-position: 0 0, 10px 10px; text-align: center; }
#sn-canvas { max-width: 100%; height: auto; box-shadow: 0 2px 12px rgba(0, 0, 0, .5); cursor: crosshair; touch-action: none; vertical-align: middle; }
#sn-canvas[data-tool="text"] { cursor: text; }
#sn-dim { margin-top: 6px; }
.snip-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.snip-store { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-left: auto; }
.snip-store select, .snip-store input { width: auto; min-width: 180px; }
.snip-overlay { position: fixed; inset: 0; z-index: 100; background: #111; cursor: crosshair; }
.snip-overlay canvas { display: block; touch-action: none; }
.snip-ov-hint { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); padding: 6px 14px; border-radius: 8px;
  background: rgba(0, 0, 0, .75); color: #fff; font-size: 13px; pointer-events: none; }
@media (max-width: 700px) { .snip-store { margin-left: 0; } .snip-store select, .snip-store input { min-width: 0; width: 100%; } }.snip-new { padding: 10px 22px; font-size: 15px; }
.snip-alt { flex-basis: 100%; }
.snip-alt summary { cursor: pointer; }
.snip-alt-body { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-top: 10px; }
.snip-wait { display: flex; align-items: center; gap: 16px; border-color: var(--accent); }
.snip-wait > div:nth-child(2) { flex: 1; }
.snip-wait-icon { font-size: 32px; color: var(--accent); animation: snip-pulse 1.2s ease-in-out infinite; }
@keyframes snip-pulse { 50% { opacity: .35; } }

/* ---------- Smartphone: Tabellen als Karten (jede Zeile = Karte, Spaltenname links, Wert rechts) ---------- */
@media (max-width: 700px) {
  .table-wrap:has(table.cardable) { overflow: visible; background: none; border: 0; box-shadow: none; }
  table.cardable, table.cardable tbody, table.cardable tr, table.cardable td { display: block; width: 100%; }
  table.cardable thead { display: none; }
  table.cardable tr { margin-bottom: 12px; padding: 4px 0; background: var(--panel); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
  table.cardable tr.hl { border-color: var(--accent); }
  table.cardable td { display: grid; grid-template-columns: minmax(90px, 38%) 1fr; gap: 10px; align-items: baseline;
    padding: 8px 14px; border-bottom: 1px solid var(--border); font-size: 15px; line-height: 1.4;
    overflow-wrap: anywhere; word-break: break-word; }
  table.cardable td:last-child { border-bottom: 0; }
  table.cardable td:empty { display: none; }
  table.cardable td::before { content: attr(data-label); font-size: 12px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .03em; color: var(--muted); white-space: normal; overflow-wrap: anywhere; }
  table.cardable td[data-label=""] { grid-template-columns: 1fr; }
  table.cardable td[data-label=""]::before { display: none; }
  /* erste gefüllte Spalte als Kartentitel hervorheben */
  table.cardable td:first-child:not(:empty) { background: var(--panel-2); font-weight: 700; }
  table.cardable .secret { flex-wrap: wrap; white-space: normal; }
  table.cardable .secret .icon { width: 34px; height: 34px; }
  table.cardable a { overflow-wrap: anywhere; }
  .meta div { flex: 1 1 140px; }
}/* Smartphone: Kopfleiste nicht festkleben (nimmt sonst ein Viertel des Bildschirms ein), Excel-Import ausblenden */
@media (max-width: 700px) {
  .topbar { position: static; }
  .sidebar { padding: 12px 16px; gap: 8px; }
  .sidebar .import, .sidebar .side-version { display: none; }
  .page-head h1 { font-size: 22px; }
  .tabs a { padding: 8px 10px; }
}
/* Firmensuche */
.company-list li[hidden]{display:none}
.company-results{list-style:none;padding:0;margin:0}
.company-results li{padding:.45rem 0;border-bottom:1px solid var(--border)}

/* Info-Link neben dem Logo */
.top-info,.usernav > a{color:var(--text);font-weight:600;padding:4px 10px;border:1px solid var(--border);border-radius:6px;white-space:nowrap}
.top-info:hover,.usernav > a:hover{text-decoration:none;border-color:var(--accent);color:var(--accent)}
@media (max-width:700px){.top-info{order:1}}
@media (max-width:700px){.usernav{order:2}}
@media (max-width:700px){.usernav > a{padding:3px 8px}}
/* Smartphone: Kopfleiste symmetrisch, Logo oben mittig */
@media (max-width:700px){
  .topbar{justify-content:center;column-gap:6px;row-gap:8px;padding:10px 12px}
  .brand{flex-basis:100%;justify-content:center}
  .brand img{height:38px}
  .top-info{order:2}
  .usernav{display:contents}
  .usernav > a,.usernav > form{order:2}
  .search{order:4;flex-basis:100%}
}

/* Ordner-Upload */
.folder-drop{cursor:default}
.upload-picks{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;margin-top:8px}
.upload-picks .btn{cursor:pointer}
.upload-sel{display:block;margin-top:6px;color:var(--accent)}
.upload-sel:empty{display:none}
table.files tr.dir-row td{background:var(--accent-soft);font-weight:600}
table.files .dir-name{word-break:break-all}
table.files tr.in-dir td:first-child{padding-left:28px}

/* ===================================================================== Barufe-Farbschema
   Farben aus farben.jpg: Rot #D4202A, Gelb #F7E80C, Weiß, Schwarz */
:root {
  --bg: #160b0c; --bg-2: #2a0f12;
  --topbar: #d4202a; --panel: #231214; --panel-2: #2e171a; --input: #1c0e10;
  --border: #5a2a2e; --text: #fff6f4; --muted: #d6b4b0;
  --accent: #f7e80c; --accent-2: #f7e80c; --accent-text: #1a0d0e;
  --accent-soft: rgba(247, 232, 12, .14);
  --ok-bg: rgba(247, 232, 12, .14); --ok-text: #fbf28a;
  --hl: rgba(247, 232, 12, .22);
  --red: #d4202a; --red-hi: #e8343e;
}
input::placeholder, textarea::placeholder { color: #9c7773; }
.alert.ok, .badge.ok { border-color: rgba(247, 232, 12, .35); }
.user-row:hover, tbody tr:hover { background: rgba(247, 232, 12, .05); }
.wifi-fields input:focus { outline-color: var(--red); }

/* Hauptknöpfe in Vereinsrot mit weißer Schrift */
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.primary:hover { background: var(--red-hi); filter: none; }

/* Kopfleiste rot mit gelber Linie, Logo auf weißer Plakette */
.topbar { background: var(--red); border-bottom: 3px solid #f7e80c; }
.brand img.brand-logo { height: 46px; width: 46px; object-fit: contain; background: #fff; border-radius: 50%; padding: 3px;
  box-shadow: 0 0 0 2px #f7e80c; }
.brand-sub { color: #fff; border-left-color: rgba(255, 255, 255, .5); font-size: 14px; letter-spacing: .12em; }
.topbar .top-info, .topbar .usernav > a { color: #fff; border-color: rgba(255, 255, 255, .55); }
.topbar .top-info:hover, .topbar .usernav > a:hover { color: #f7e80c; border-color: #f7e80c; }
.topbar .usernav .chip { background: #fff; color: var(--red); border-color: #fff; }
.topbar .btn { background: #fff; color: var(--red); border-color: #fff; }
.topbar .btn:hover { background: #f7e80c; border-color: #f7e80c; color: #1a0d0e; }
.topbar input[type=search] { background: rgba(0, 0, 0, .22); border-color: rgba(255, 255, 255, .45); color: #fff; }
.topbar input[type=search]::placeholder { color: rgba(255, 255, 255, .75); }

/* Anmeldeseite und Info */
.auth-card { border-top-color: var(--red); }
.auth-logo { width: 150px; height: auto; background: #fff; border-radius: 16px; padding: 8px; border: 3px solid #f7e80c; }
.auth-sub { color: #f7e80c; font-size: 16px; }
.info-logo { width: 130px; height: auto; background: #fff; border-radius: 14px; padding: 6px; border: 3px solid #f7e80c; }

/* Reiter und Seitenleiste */
.tabs a.active { border-bottom-color: #f7e80c; }
.company-list a.active { border-left: 3px solid var(--red); }

@media (max-width: 700px) {
  .brand img.brand-logo { height: 54px; width: 54px; }
}.sidebar { background: rgba(30, 10, 12, .65); }
