/* Nocturne Team Control Panel – Nocturne-Grau/Silber, Gefahr rot (Projektleitungs-Rot), Status grün/gelb */
:root {
    --brand: #ed2638;
    --brand-soft: rgba(237, 38, 56, .14);
    --side: 248px;
    --mono: ui-monospace, 'JetBrains Mono', 'Cascadia Code', Consolas, monospace;
}
body { min-height: 100vh; min-height: 100svh; background:
    radial-gradient(ellipse 70% 40% at 60% -10%, rgba(201, 206, 214, .07), transparent 70%), var(--bg); font-size: 15px; }
body.plain { display: grid; place-items: center; padding: 24px 16px; }

/* ── Laden / Anmeldung ─────────────────────────────────── */
.boot { min-height: 100vh; display: grid; place-items: center; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.gate { width: min(440px, 100%); margin: auto; padding: 2.2rem 1.8rem; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
.gate img.logo { width: 76px; height: 76px; }
.gate h1 { margin: .8rem 0 .2rem; font: 700 1.9rem/1.1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--white); }
.gate .sub { margin: 0 0 1.4rem; color: var(--muted); font: 600 .8rem/1 var(--display); letter-spacing: .3em; text-transform: uppercase; }
.gate p { color: var(--soft); margin: .4rem 0 1rem; }
.gate .btn { width: 100%; }
.gate .discord { background: #5865f2; border-color: #6d78f5; color: #fff; }
.gate .discord:hover { background: #4752c4; box-shadow: 0 0 1.2rem rgba(88, 101, 242, .45); }
.gate .qr { display: block; width: 220px; height: 220px; margin: 1rem auto; border-radius: 12px; background: #fff; padding: 6px; }
.gate .secret { font: 600 1rem/1.4 var(--mono); letter-spacing: .06em; color: var(--white); background: var(--tile); border: 1px dashed var(--line-strong); border-radius: 8px; padding: .5rem .7rem; user-select: all; word-break: break-all; }
.gate ol { text-align: left; color: var(--soft); padding-left: 1.2rem; margin: .4rem 0 1rem; }
.gate ol li { margin: .25rem 0; }
.code-input { width: 100%; text-align: center; font: 700 1.8rem/1 var(--mono); letter-spacing: .45em; padding: .7rem .4rem .7rem .85rem; margin: .4rem 0 .8rem; }
.gate .err, .form-err { color: var(--bad); min-height: 1.3em; font-size: .92rem; margin: .2rem 0 .6rem; }
.gate .hint { font-size: .85rem; color: var(--muted); margin-top: 1rem; }

/* ── Grundgerüst ───────────────────────────────────────── */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: linear-gradient(180deg, #101314, #0c0e0f); border-right: 1px solid var(--line); overflow-y: auto; }
.brand { display: flex; align-items: center; gap: .7rem; padding: 1.1rem 1.1rem 1rem; text-decoration: none; color: var(--white); border-bottom: 1px solid var(--line); }
.brand img { width: 38px; height: 38px; }
.brand b { display: block; font: 700 1.05rem/1 var(--display); letter-spacing: .16em; text-transform: uppercase; }
.brand small { display: block; margin-top: .25rem; font: 600 .68rem/1 var(--display); letter-spacing: .26em; text-transform: uppercase; color: var(--muted); }
.nav { padding: .7rem .6rem; display: grid; gap: 2px; }
.nav .grp { margin: .9rem .6rem .35rem; font: 600 .68rem/1 var(--display); letter-spacing: .24em; text-transform: uppercase; color: #6c7173; }
.nav a { display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem; border-radius: 8px; color: var(--soft); text-decoration: none; font-weight: 500; border: 1px solid transparent; }
.nav a svg { width: 18px; height: 18px; flex: none; opacity: .8; }
.nav a:hover { background: var(--tile); color: var(--white); }
.nav a.on { background: linear-gradient(90deg, rgba(201, 206, 214, .12), rgba(201, 206, 214, .03)); border-color: var(--line); color: var(--white); }
.nav a.on svg { opacity: 1; }
.nav .badge { margin-left: auto; }
.side-foot { margin-top: auto; padding: .9rem; border-top: 1px solid var(--line); }
.me { display: flex; align-items: center; gap: .6rem; }
.me img, .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--tile); flex: none; object-fit: cover; }
.me .who { min-width: 0; line-height: 1.25; }
.me .who b { display: block; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .who span { font-size: .8rem; }
.me .btn { margin-left: auto; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .8rem; padding: .8rem 1.4rem; background: rgba(10, 12, 13, .86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top h1 { margin: 0; font: 700 1.35rem/1 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--white); }
.top .menu-btn { display: none; }
.top .right { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.content { padding: 1.4rem; display: grid; gap: 1.2rem; align-content: start; }

/* ── Bausteine ─────────────────────────────────────────── */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.2rem; min-width: 0; }
.card > h2, .card-h h2 { margin: 0 0 .8rem; font: 700 1.05rem/1.1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--white); }
.card-h { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .8rem; }
.card-h h2 { margin: 0; }
.card-h .tools { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.grid { display: grid; gap: 1.2rem; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.1rem; }
.stat .k { font: 600 .72rem/1 var(--display); letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.stat .v { margin-top: .5rem; font: 700 1.9rem/1 var(--display); color: var(--white); letter-spacing: .03em; }
.stat .s { margin-top: .35rem; font-size: .85rem; color: var(--muted); }
.bar { height: 6px; border-radius: 99px; background: var(--tile); margin-top: .6rem; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-mid), var(--accent)); border-radius: inherit; }
.bar.warn i { background: var(--warn); } .bar.bad i { background: var(--bad); }

.pill { display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .65rem; border-radius: 99px; border: 1px solid var(--line-strong); font-size: .82rem; color: var(--soft); white-space: nowrap; background: var(--tile); }
.pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.pill.good::before { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.pill.warn::before { background: var(--warn); }
.pill.bad::before { background: var(--bad); }
.pill.plain::before { display: none; }
.tag { display: inline-block; padding: .1rem .5rem; border-radius: 6px; font-size: .78rem; font-weight: 600; background: var(--tile); border: 1px solid var(--line-strong); color: var(--soft); white-space: nowrap; }
.tag.good { color: var(--add-fg); background: var(--add-bg); border-color: rgba(111, 207, 151, .3); }
.tag.bad { color: var(--del-fg); background: var(--del-bg); border-color: rgba(229, 105, 92, .3); }
.tag.warn { color: #f3d38c; background: rgba(230, 180, 80, .12); border-color: rgba(230, 180, 80, .3); }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--brand); color: #fff; font: 700 .72rem/20px var(--body); text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono { font-family: var(--mono); font-size: .88em; }
.right { text-align: right; }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }
.empty { padding: 1.6rem; text-align: center; color: var(--muted); }
.notice { padding: .8rem 1rem; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--tile); color: var(--soft); }
.notice.warn { border-color: rgba(230, 180, 80, .35); background: rgba(230, 180, 80, .08); color: #f1dca8; }
.notice.bad { border-color: rgba(229, 105, 92, .35); background: var(--del-bg); color: var(--del-fg); }
.notice.good { border-color: rgba(111, 207, 151, .3); background: var(--add-bg); color: var(--add-fg); }

input[type=text], input[type=number], input[type=search], input[type=password], textarea, .input {
    width: 100%; padding: .55rem .75rem; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--tile); color: var(--white); font: inherit; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
textarea { resize: vertical; min-height: 90px; }
label.f { display: grid; gap: .3rem; font-size: .88rem; color: var(--soft); }
label.f > span { font-weight: 600; }
.search { max-width: 320px; }
.card-h .tools .search { width: 260px; }
.btn.danger { border-color: rgba(229, 105, 92, .45); color: #f6b3ab; }
.btn.danger:hover { background: rgba(229, 105, 92, .12); }
.btn.good { border-color: rgba(111, 207, 151, .4); color: #b6ecca; }
.btn.ghost { background: transparent; }
.btn.icon { min-height: 34px; width: 34px; padding: 0; }
.btngrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.btngrid .btn { justify-content: flex-start; text-transform: none; letter-spacing: .02em; font: 600 .95rem/1.1 var(--body); min-height: 40px; }

/* Tabellen */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table.t { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.t th { position: sticky; top: 0; text-align: left; font: 600 .72rem/1 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); background: #121516; padding: .7rem .75rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t th.sort { cursor: pointer; user-select: none; }
table.t th.sort:hover { color: var(--white); }
table.t td { padding: .6rem .75rem; border-bottom: 1px solid rgba(42, 46, 48, .6); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: rgba(201, 206, 214, .04); }
table.t td.cell { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: .82rem; }
table.t td.cell.null { color: #5d6264; font-style: italic; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: 0; }
.dl dt { color: var(--muted); font-size: .88rem; }
.dl dd { margin: 0; color: var(--white); min-width: 0; overflow-wrap: anywhere; }

/* Spieler-Kopf */
.who-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.who-head .big { font: 700 1.7rem/1.1 var(--display); letter-spacing: .05em; color: var(--white); }
.who-head .sub { color: var(--muted); }
.screens img { max-width: 100%; border-radius: 10px; border: 1px solid var(--line); }

/* Teamchat */
.chat { display: grid; grid-template-columns: 1fr 240px; gap: 1.2rem; }
.chat-log { height: min(62vh, 640px); overflow-y: auto; display: flex; flex-direction: column; gap: .5rem; padding: .3rem .2rem .3rem 0; }
.msg { padding: .55rem .8rem; border-radius: 10px; background: var(--tile); border: 1px solid var(--line); max-width: 92%; }
.msg.mine { align-self: flex-end; background: rgba(201, 206, 214, .08); }
.msg.sys { align-self: center; background: transparent; border-style: dashed; color: var(--muted); font-size: .88rem; }
.msg .h { display: flex; gap: .5rem; align-items: baseline; font-size: .8rem; color: var(--muted); }
.msg .h b { color: var(--white); font-size: .9rem; }
.msg .b { margin-top: .15rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.ping { border-color: rgba(237, 38, 56, .5); }

/* Konsole */
.console { height: min(64vh, 720px); overflow: auto; background: #050607; border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem; font: 12.5px/1.5 var(--mono); color: #cfd3d6; white-space: pre-wrap; overflow-wrap: anywhere; }
.console .l.hide { display: none; }
.console .c1 { color: #ff6b6b; } .console .c2 { color: #7ee787; } .console .c3 { color: #f2cc60; } .console .c4 { color: #79c0ff; }
.console .c5 { color: #67e8f9; } .console .c6 { color: #d2a8ff; } .console .c7 { color: #e6edf3; } .console .c8 { color: #ff9b70; } .console .c9 { color: #8b949e; }
.console .bold { font-weight: 700; }
.console .mark { background: rgba(242, 204, 96, .2); }
.cmdline { display: flex; gap: .5rem; margin-top: .7rem; }
.cmdline input { font-family: var(--mono); }

/* Editor / SQL */
.code { width: 100%; min-height: 360px; font: 13px/1.55 var(--mono); tab-size: 4; white-space: pre; background: #070809; }
.sqlbox { min-height: 140px; font: 13px/1.55 var(--mono); }

/* Dialoge (eigene Formulare – Bestätigungen kommen aus /shared/ui.js) */
dialog.fd { padding: 0; border: 0; background: transparent; max-width: min(560px, calc(100vw - 32px)); width: 100%; color: var(--text); }
dialog.fd::backdrop { background: rgba(0, 0, 0, .62); backdrop-filter: blur(3px); }
dialog.fd form { background: var(--panel); border: 1px solid var(--line-strong); border-radius: 16px; padding: 1.2rem 1.3rem; display: grid; gap: .8rem; box-shadow: 0 30px 90px rgba(0, 0, 0, .6); max-height: calc(100vh - 40px); overflow-y: auto; }
dialog.fd h2 { margin: 0; font: 700 1.2rem/1.2 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--white); }
dialog.fd.danger form { border-color: rgba(229, 105, 92, .5); }
dialog.fd .foot { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .3rem; }
dialog.fd .checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .3rem .8rem; max-height: 220px; overflow-y: auto; padding: .2rem; }
dialog.fd .checks label { display: flex; gap: .4rem; align-items: center; font-size: .9rem; }

/* Meldungen */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 1000; display: grid; gap: .5rem; width: min(380px, calc(100vw - 32px)); }
.toast { padding: .75rem 1rem; border-radius: 12px; background: #1b1f20; border: 1px solid var(--line-strong); box-shadow: 0 12px 40px rgba(0, 0, 0, .5); animation: tin .2s ease-out; overflow-wrap: anywhere; }
.toast.good { border-color: rgba(111, 207, 151, .5); } .toast.bad { border-color: rgba(229, 105, 92, .6); } .toast.warn { border-color: rgba(230, 180, 80, .5); }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } }

.tabs { display: flex; gap: .3rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); padding: .55rem .8rem; font: 600 .9rem/1 var(--display); letter-spacing: .14em; text-transform: uppercase; cursor: pointer; }
.tabs button.on { color: var(--white); border-bottom-color: var(--accent); }
.tabs button:hover { color: var(--white); }
.split { display: grid; grid-template-columns: 260px 1fr; gap: 1.2rem; align-items: start; }
.tlist { max-height: 72vh; overflow-y: auto; display: grid; gap: 2px; }
.tlist button { display: flex; justify-content: space-between; gap: .5rem; width: 100%; text-align: left; padding: .4rem .6rem; border: 0; border-radius: 7px; background: none; color: var(--soft); font: 500 .88rem/1.3 var(--mono); cursor: pointer; }
.tlist button:hover { background: var(--tile); color: var(--white); }
.tlist button.on { background: rgba(201, 206, 214, .1); color: var(--white); }
.tlist button small { color: var(--muted); }
.pager { display: flex; align-items: center; gap: .6rem; justify-content: flex-end; margin-top: .7rem; }

/* Handy */
@media (max-width: 1100px) { .grid.three { grid-template-columns: 1fr 1fr; } .chat { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
    .shell { grid-template-columns: 1fr; }
    .side { position: fixed; z-index: 50; left: 0; top: 0; width: min(280px, 86vw); transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 60px rgba(0, 0, 0, .7); }
    .shell.nav-open .side { transform: none; }
    .top .menu-btn { display: inline-flex; }
    .top { padding: .7rem 16px; }
    .content { padding: 1rem 16px; }
    .grid.two, .grid.three, .split { grid-template-columns: 1fr; }
    .top .right .pill.srv { display: none; }
}

/* ── Auswahl mit Suche ─────────────────────────────────── */
.picker { position: relative; }
.picker input { width: 100%; }
.picker.chosen input { border-color: rgba(111, 207, 151, .45); }
.picker-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); max-height: 280px; overflow-y: auto; background: #15191a; border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: 0 18px 50px rgba(0, 0, 0, .55); padding: 4px; }
.picker-item { display: flex; width: 100%; align-items: baseline; justify-content: space-between; gap: .8rem; padding: .45rem .6rem; border: 0; border-radius: 7px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.picker-item small { color: var(--muted); font-family: var(--mono); font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.picker-item.on, .picker-item:hover { background: rgba(201, 206, 214, .1); }
.picker-empty { padding: .6rem; color: var(--muted); }

/* ── Spielerakte ───────────────────────────────────────── */
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .6rem; margin-top: 1rem; }
.fact { background: var(--tile); border: 1px solid var(--line); border-radius: 10px; padding: .55rem .75rem; min-width: 0; }
.fact span { display: block; font: 600 .68rem/1 var(--display); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.fact b { display: block; margin-top: .35rem; color: var(--white); font-weight: 600; overflow-wrap: anywhere; }
.agroups { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: .9rem; }
.agroup { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: .8rem .85rem .9rem; }
.agroup h3 { margin: 0 0 .65rem; font: 600 .72rem/1 var(--display); letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.alist { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .4rem; }
.abtn { display: flex; align-items: center; gap: .55rem; min-width: 0; height: 38px; padding: 0 .7rem; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--tile); color: var(--white); font: 500 .9rem/1 var(--body); text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.abtn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.abtn svg { width: 16px; height: 16px; flex: none; opacity: .7; }
.abtn:hover { border-color: var(--accent); background: #1d2223; }
.abtn:hover svg { opacity: 1; }
.abtn:disabled { opacity: .5; cursor: wait; }
.abtn.danger { color: #f6b3ab; border-color: rgba(229, 105, 92, .3); }
.abtn.danger:hover { border-color: var(--bad); background: rgba(229, 105, 92, .08); }
.tagx { margin-left: .3rem; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 .1rem; }
.tagx:hover { color: var(--bad); }

/* ── Datenbank ─────────────────────────────────────────── */
.dbmain { min-width: 0; }
.dbwrap { max-height: 68vh; }
table.dbt td.cell { max-width: 240px; font-size: .8rem; padding: .45rem .65rem; }
table.dbt th { padding: .6rem .65rem; }
dialog.fd.wide { max-width: min(900px, calc(100vw - 32px)); }
.dbfields { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .7rem; max-height: 60vh; overflow-y: auto; padding-right: .3rem; }
.dbf { min-width: 0; }
.dbf:has(textarea) { grid-column: 1 / -1; }
.dbf > span { display: flex; align-items: baseline; gap: .3rem; flex-wrap: wrap; }
.dbf textarea, .dbf input[type=text] { font-size: .82rem; }
.dbf input:disabled, .dbf textarea:disabled { opacity: .6; }
.nullbox { margin-left: auto; display: inline-flex; align-items: center; gap: .3rem; font-size: .75rem; color: var(--muted); font-weight: 500; }
dialog.fd .foot .spacer { flex: 1; }

/* ── Überwachung ───────────────────────────────────────── */
.wsplit { display: grid; grid-template-columns: 300px 1fr; gap: 1.2rem; align-items: start; }
.wlist { max-height: 62vh; overflow-y: auto; display: grid; gap: 2px; margin-top: .6rem; }
.wrow { display: grid; grid-template-columns: auto 2.6rem 1fr; align-items: center; gap: .5rem; padding: .4rem .5rem; border-radius: 8px; cursor: pointer; }
.wrow small { grid-column: 3; margin-top: -.35rem; }
.wrow:hover { background: var(--tile); }
.wgrid { display: grid; gap: .6rem; }
.wtile { margin: 0; background: #050607; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; min-width: 0; }
.wimg { aspect-ratio: 16 / 9; display: grid; place-items: center; cursor: zoom-in; background: #050607; }
.wtile.big .wimg { cursor: zoom-out; }
.wimg img { width: 100%; height: 100%; object-fit: contain; display: block; }
.wwait { color: var(--muted); font-size: .85rem; }
.wtile figcaption { display: flex; align-items: center; gap: .45rem; padding: .35rem .5rem; font-size: .82rem; border-top: 1px solid var(--line); background: var(--panel); white-space: nowrap; overflow: hidden; }
.wtile figcaption b { overflow: hidden; text-overflow: ellipsis; }
.wtile figcaption .btn.icon { min-height: 26px; width: 26px; }
.wtile figcaption .btn.icon svg { width: 14px; height: 14px; }
.wtile .bad { color: var(--bad); }

/* ── Logs ──────────────────────────────────────────────── */
.logcats .grp { margin: .8rem .5rem .3rem; font: 600 .66rem/1 var(--display); letter-spacing: .22em; text-transform: uppercase; color: #6c7173; }
.logcats button { font-family: var(--body); }
.logcats .badge { display: inline-block; }
.logbar { margin-bottom: .8rem; }
.logbar select { width: auto; }
.logs { display: grid; gap: 4px; }
.log { border: 1px solid var(--line); border-left: 4px solid var(--line-strong); border-radius: 9px; background: var(--bg-2); }
.log.warn { background: rgba(230, 180, 80, .05); }
.log.alarm { background: rgba(229, 105, 92, .07); }
.log.fresh { animation: fresh 2.5s ease-out; }
@keyframes fresh { from { background: rgba(201, 206, 214, .14); } }
.log-h { display: grid; grid-template-columns: 76px 150px minmax(200px, 1.4fr) minmax(0, 1fr) auto; gap: .7rem; align-items: center; padding: .5rem .7rem; cursor: pointer; font-size: .88rem; }
.log-h time { font-family: var(--mono); font-size: .78rem; color: var(--muted); white-space: nowrap; }
.lcat { font-size: .8rem; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ltitle { color: var(--white); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lsum { color: var(--muted); font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lpeople { display: flex; gap: .3rem; justify-content: flex-end; flex-wrap: nowrap; overflow: hidden; }
.log-d { display: none; padding: .2rem .9rem .9rem; border-top: 1px solid var(--line); }
.log.open .log-d { display: grid; gap: .8rem; padding-top: .8rem; }
.log.open .log-h .lsum { white-space: normal; }
.ldesc { margin: 0; white-space: pre-wrap; color: var(--soft); }
.lplayers { display: flex; flex-wrap: wrap; gap: .8rem; }
.lperson { display: grid; gap: .25rem; background: var(--tile); border: 1px solid var(--line); border-radius: 9px; padding: .5rem .7rem; }
.pchip { display: inline-flex; align-items: center; gap: .35rem; max-width: 220px; padding: .12rem .5rem; border-radius: 99px; background: var(--tile); border: 1px solid var(--line-strong); color: var(--white); font-size: .78rem; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pchip small { color: var(--muted); font-size: .7rem; }
a.pchip:hover { border-color: var(--accent); }

@media (max-width: 1100px) { .log-h { grid-template-columns: 70px 1fr; } .log-h .lsum, .log-h .lpeople { grid-column: 1 / -1; } .wsplit { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .agroups { grid-template-columns: 1fr; } }
