/* Admin — Modul-spezifisches CSS (Shared: /shared/tenkan-shared.css) */

.site-footer { position: fixed; bottom: 0; left: 0; right: 0; z-index: 99; }

/* ─── Login ──────────────────────────────────────────────────── */
.login-body {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}
.login-card { background: white; border-radius: 12px; padding: 2.5rem; width: 100%; max-width: 380px; box-shadow: 0 12px 40px rgba(0,0,0,0.2); }
.login-brand { text-align: center; margin-bottom: 1.5rem; }
.login-logo  { width: 60px; height: 60px; border-radius: 50%; margin-bottom: 0.5rem; }
.login-brand h1 { font-size: 1.4rem; font-weight: 700; }
.login-brand .sub { color: var(--text-soft); font-size: 0.9rem; }
#login-form label { display: block; margin-top: 1rem; font-size: 0.85rem; font-weight: 600; color: var(--text); text-transform: none; letter-spacing: 0; }
#login-form input { margin-top: 0.3rem; padding: 0.7rem 0.9rem; border-radius: 8px; font-size: 0.95rem; }
#login-form button { width: 100%; margin-top: 1.5rem; padding: 0.8rem; background: var(--primary); color: white; border: none; border-radius: 8px; font-size: 0.95rem; font-weight: 600; cursor: pointer; }
#login-form button:hover { background: var(--primary-dark); }

/* ─── Tab-Navigation ─────────────────────────────────────────── */
.tabs { background: white; border-bottom: 1px solid var(--border); display: flex; padding: 0 1.5rem; gap: 0; }
.tab  { background: none; border: none; padding: 0.9rem 1.2rem; font: inherit; cursor: pointer; color: var(--text-soft); border-bottom: 3px solid transparent; font-weight: 600; font-size: 0.85rem; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-color: var(--primary); }
.tab .badge { background: var(--danger); color: white; border-radius: 10px; padding: 1px 7px; font-size: 0.7rem; margin-left: 0.3rem; font-weight: 700; display: none; }
.tabs.nested { background: transparent; padding: 0; margin: -0.5rem 0 1.5rem; }

/* ─── Tab-Panels (override shared .panel — hier: Tab-Inhalt, nicht Karte) */
.panel { display: none; background: transparent; border: none; border-radius: 0; padding: 0; margin: 0; box-shadow: none; }
.panel.active { display: block; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.2rem; gap: 1rem; }
.panel-head h2 { font-size: 1.2rem; font-weight: 700; }
.panel-head .hint { color: var(--text-soft); font-size: 0.85rem; margin-top: 0.3rem; }

/* ─── Sub-Panels (Monitoring, Wiki) ──────────────────────────── */
#tab-monitoring .sub-panel, #tab-wiki .sub-panel { display: none !important; }
#tab-monitoring .sub-panel.active, #tab-wiki .sub-panel.active { display: block !important; }
.sub-head { margin-bottom: 1rem; }
.sub-head h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.3rem; }

/* ─── Table (Admin hat grösseres Padding + border-radius) ────── */
.data { background: white; border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); }
.data th, .data td { padding: 0.7rem 1rem; }

/* ─── Rollen-Tags ────────────────────────────────────────────── */
.perm-tag { display: inline-block; background: var(--bg-side); border: 1px solid var(--border); border-radius: 4px; padding: 2px 6px; font-size: 0.72rem; margin-right: 4px; }
.perm-tag.admin   { background: #f5d76e; border-color: #c19c08; color: #5a4500; }
.perm-tag.wiki    { background: #cfe1d4; border-color: var(--primary); color: var(--primary-dark); }
.perm-tag.ai      { background: #d5d8f0; border-color: #6975a7; color: #2c3461; }
.perm-tag.finance { background: #f0d8b8; border-color: #c08850; color: #5a3010; }

/* ─── Zeilen-Aktionen ────────────────────────────────────────── */
.row-actions { white-space: nowrap; }
.row-actions button { background: none; border: none; cursor: pointer; font-size: 0.85rem; color: var(--primary); margin-right: 0.5rem; }
.row-actions button:hover { text-decoration: underline; }
.row-actions button.del { color: var(--danger); }

/* ─── Settings ───────────────────────────────────────────────── */
.settings-list { display: grid; gap: 0.5rem; }
.settings-cat { margin-top: 1.2rem; margin-bottom: 0.3rem; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--primary); }
.settings-cat:first-child { margin-top: 0; }
.settings-subcat { margin-top: 0.9rem; margin-bottom: 0.2rem; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-soft); }
.setting { background: white; border: 1px solid var(--border); border-radius: 8px; padding: 0.9rem 1.1rem; cursor: pointer; transition: border-color 0.1s; }
.setting:hover { border-color: var(--primary); }
.setting-key   { font-weight: 600; font-family: ui-monospace, "SF Mono", monospace; font-size: 0.85rem; }
.setting-value { font-family: ui-monospace, monospace; color: var(--text-soft); font-size: 0.8rem; margin-top: 0.25rem; word-break: break-all; white-space: pre-wrap; }
.setting-desc  { color: var(--text-soft); font-size: 0.8rem; margin-top: 0.25rem; }

/* Wert-Anzeige-Pills */
.val-bool { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 1px 8px; border-radius: 12px; letter-spacing: 0.03em; }
.val-on   { background: #d4edda; color: #276036; }
.val-off  { background: #e9ecef; color: #6c757d; }
.val-tag  { display: inline-block; font-size: 0.72rem; font-weight: 600; padding: 1px 7px; border-radius: 10px; background: #e8f0fe; color: #1a56a0; font-family: ui-monospace, monospace; }
.val-num    { font-family: ui-monospace, monospace; color: var(--text-soft); }
.val-empty  { color: #bbb; font-style: italic; font-size: 0.8rem; }
.val-secret { color: #bbb; font-style: italic; font-size: 0.8rem; }

/* ─── Unanswered Cards ───────────────────────────────────────── */
.unanswered-card { background: white; border: 1px solid var(--border); border-radius: 8px; padding: 1rem 1.2rem; margin-bottom: 0.8rem; box-shadow: var(--shadow); }
.ua-head     { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.6rem; font-size: 0.85rem; }
.ua-meta     { color: var(--text-soft); font-size: 0.75rem; }
.ua-question { margin-bottom: 0.6rem; line-height: 1.45; }
.ua-response summary { cursor: pointer; color: var(--primary); font-size: 0.85rem; }
.ua-notes-label { display: block; font-size: 0.78rem; font-weight: 600; margin-top: 0.5rem; }
.ua-notes { width: 100%; padding: 0.5rem 0.7rem; border: 1px solid var(--border); border-radius: 6px; font: inherit; font-size: 0.85rem; resize: vertical; margin-top: 0.3rem; }
.ua-actions { display: flex; gap: 0.5rem; align-items: center; margin-top: 0.7rem; }
.ua-status-select { flex: 1; padding: 0.5rem 0.7rem; border: 1px solid var(--border); border-radius: 6px; font: inherit; font-size: 0.85rem; }

/* ─── Stats ──────────────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.7rem; margin-bottom: 1rem; }
.stat-box { background: white; border: 1px solid var(--border); border-radius: 8px; padding: 1rem; text-align: center; }
.stat-num { font-size: 1.4rem; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.stat-label { font-size: 0.75rem; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 0.3rem; }

/* ─── Logs ───────────────────────────────────────────────────── */
.logs-toolbar { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.8rem; flex-wrap: wrap; }
.logs-toolbar select, .logs-toolbar input { padding: 0.4rem 0.6rem; border: 1px solid var(--border); border-radius: 6px; font: inherit; font-size: 0.85rem; background: white; }
.logs-toolbar input { flex: 1; min-width: 180px; }
.logs-toolbar label { font-size: 0.8rem; display: flex; gap: 0.3rem; align-items: center; cursor: pointer; text-transform: none; letter-spacing: 0; color: var(--text); }
.logs-viewer { background: #1e1e1e; color: #d4d4d4; padding: 1rem; border-radius: 8px; font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 0.78rem; line-height: 1.4; max-height: 70vh; overflow: auto; white-space: pre-wrap; word-break: break-all; }

/* ─── Status-Cards ───────────────────────────────────────────── */
.status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin-top: 0.5rem; }
.status-card { background: white; border: 1px solid var(--border); border-radius: 8px; padding: 1.1rem 1.2rem; box-shadow: var(--shadow); }
.status-card.err { border-color: #e4a0a0; }
.status-card-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.8rem; font-size: 1rem; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.status-dot.ok  { background: #27ae60; }
.status-dot.err { background: var(--danger); }
.status-label { font-size: 0.78rem; font-weight: 600; }
.status-label.ok  { color: #27ae60; }
.status-label.err { color: var(--danger); }
.status-row { display: flex; justify-content: space-between; padding: 0.3rem 0; border-top: 1px solid var(--border); font-size: 0.82rem; }
.status-row-label { color: var(--text-soft); }
.status-row-val   { font-weight: 600; font-family: ui-monospace, monospace; font-size: 0.8rem; }

/* ─── Breites Modal für Datei-Editor ────────────────────────── */
.modal-card.modal-wide { max-width: 1100px; }

/* ─── Wiki Staging ───────────────────────────────────────────── */
.page-status { display: inline-block; font-size: 0.7rem; font-weight: 700; padding: 2px 8px; border-radius: 10px; white-space: nowrap; text-transform: uppercase; letter-spacing: 0.04em; }
.page-status.staged    { background: #fff3cd; color: #856404; border: 1px solid #ffc107; }
.page-status.modified  { background: #ffe0b2; color: #7a3a00; border: 1px solid #ff9800; }
.page-status.deleted   { background: #fde8e8; color: var(--danger); border: 1px solid #f9a0a0; }
.page-status.published { background: #d4edda; color: #276036; border: 1px solid #76c89a; }
.page-status.ignored   { background: #e9ecef; color: #6c757d; border: 1px solid #ced4da; }
.wiki-path-cell { display: flex; align-items: center; gap: 0.4rem; }
.wiki-path-input { padding: 0.2rem 0.4rem; border: 1px solid var(--border); border-radius: 4px; font-family: ui-monospace, monospace; font-size: 0.78rem; width: 260px; }
.vault-badge-sm { display: inline-block; background: var(--bg-side); border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px; font-size: 0.7rem; color: var(--text-soft); white-space: nowrap; }
