:root {
    --bg: #f5f6f8;
    --panel: #ffffff;
    --ink: #18202a;
    --muted: #667085;
    --line: #dde2ea;
    --accent: #0f766e;
    --accent-2: #134e4a;
    --danger: #b42318;
    --warn: #b54708;
    --ok: #027a48;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, sans-serif; color: var(--ink); background: var(--bg); }
.app { min-height: 100vh; display: grid; grid-template-columns: 280px 1fr; }
.sidebar { background: #13201f; color: #f7fbfa; padding: 18px 14px; display: flex; flex-direction: column; gap: 18px; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 4px 12px; border-bottom: 1px solid rgba(255,255,255,.12); }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; background: var(--accent); border-radius: 8px; font-weight: 700; }
.brand-name { font-weight: 700; font-size: 18px; }
.brand-sub, .tenant-label, .tenant-meta { color: #a8b7b4; font-size: 12px; }
.tenant { padding: 10px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 8px; }
.tenant select { width: 100%; margin: 6px 0; padding: 9px; border-radius: 6px; border: 1px solid rgba(255,255,255,.18); background: #0d1716; color: white; }
.nav { display: grid; gap: 4px; }
.nav a { color: #d9e6e3; text-decoration: none; padding: 10px 12px; border-radius: 7px; }
.nav a.active, .nav a:hover { background: rgba(15,118,110,.35); color: white; }
.userbox { margin-top: auto; color: #d9e6e3; font-size: 14px; }
.userbox a { color: #a8e3dc; }
.main { padding: 24px; min-width: 0; }
.topline { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
h1 { margin: 0 0 6px; font-size: 28px; }
.sub { color: var(--muted); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 18px; margin-bottom: 16px; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
button, .btn { border: 0; border-radius: 7px; padding: 10px 13px; background: var(--accent); color: white; cursor: pointer; font-weight: 600; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
button.secondary, .btn.secondary { background: #eef4f3; color: var(--accent-2); border: 1px solid #c9dbd8; }
button.danger { background: var(--danger); }
input, select { width: 100%; padding: 10px 11px; border: 1px solid var(--line); border-radius: 7px; font: inherit; }
label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; border-bottom: 1px solid var(--line); padding: 10px 8px; vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.badge { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: #eef4f3; color: var(--accent-2); font-size: 12px; }
.badge.error { background: #fee4e2; color: var(--danger); }
.badge.ok { background: #dcfae6; color: var(--ok); }
.toast-box { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 8px; z-index: 10; }
.toast { background: #111827; color: white; padding: 12px 14px; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.16); max-width: 360px; }
.toast.error { background: var(--danger); }
.raw { white-space: pre-wrap; word-break: break-word; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; background: #0b1220; color: #d7e4ff; padding: 12px; border-radius: 7px; max-height: 360px; overflow: auto; }
@media (max-width: 860px) {
    .app { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .grid.two { grid-template-columns: 1fr; }
    .topline { display: block; }
}
