/* ───────────── DC • FOCUS — szklany panel ───────────── */
:root {
  --ink: #f7f0ea;
  --ink-2: rgba(247, 240, 234, 0.72);
  --ink-3: rgba(247, 240, 234, 0.48);
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --glass: linear-gradient(160deg, rgba(64, 48, 39, 0.52), rgba(24, 18, 15, 0.58));
  --glass-strong: linear-gradient(160deg, rgba(52, 39, 32, 0.78), rgba(22, 17, 14, 0.82));
  --accent: #f59a4a;
  --accent-2: #ffbf80;
  --accent-deep: #c9632a;
  --good: #4ade80;
  --bad: #f87171;
  --radius: 22px;
  --shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 18px 50px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  background: #140f0c url("/static/bg.jpg") center / cover fixed no-repeat;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(1200px 600px at 15% 0%, rgba(245, 154, 74, 0.10), transparent 60%),
    linear-gradient(180deg, rgba(14, 10, 8, 0.62), rgba(14, 10, 8, 0.80));
  backdrop-filter: blur(3px);
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: rgba(245, 154, 74, 0.4); }

.glass {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
}
.glass.accent {
  background: linear-gradient(150deg, rgba(240, 150, 85, 0.62), rgba(150, 82, 42, 0.50));
  border-color: rgba(255, 200, 150, 0.28);
}

/* ───────────── układ ───────────── */
.app { display: grid; grid-template-columns: 268px 1fr; gap: 18px; padding: 18px; min-height: 100vh; }
.sidebar {
  position: sticky; top: 18px; height: calc(100vh - 36px);
  display: flex; flex-direction: column; padding: 18px 14px; gap: 6px;
  background: var(--glass-strong);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 16px; }
.brand-logo {
  width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center;
  font-weight: 800; color: #2b1407; font-size: 18px;
  background: linear-gradient(160deg, var(--accent-2), var(--accent));
  box-shadow: 0 6px 18px rgba(245, 154, 74, 0.35), inset 0 1px 0 rgba(255,255,255,.5);
}
.brand-name { font-weight: 800; letter-spacing: 0.12em; font-size: 14px; }
.brand-sub { font-size: 12px; color: var(--ink-3); }

.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 14px;
  color: var(--ink-2); font-weight: 600; cursor: pointer; transition: background .15s, color .15s;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.06); color: var(--ink); }
.nav-item.active { background: rgba(255, 255, 255, 0.11); color: var(--ink); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.nav-ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); flex: none; }
.nav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-meta { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.nav-section { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); padding: 14px 10px 6px; }
.server-list { flex: 1; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.server-list::-webkit-scrollbar { width: 6px; }
.server-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 6px; }

.gicon {
  width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: #3a2a21 center / cover no-repeat; font-weight: 800; font-size: 12px; color: var(--ink);
  box-shadow: 0 0 0 1px rgba(255,255,255,.12);
}
.gicon.lg { width: 64px; height: 64px; font-size: 22px; border-radius: 20px; }

.bot-card { margin-top: 8px; padding: 12px; border-radius: 16px; background: rgba(0,0,0,.22); border: 1px solid var(--line); }
.bot-row { display: flex; align-items: center; gap: 10px; }
.bot-name { font-weight: 700; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #777; }
.dot.on { background: var(--good); box-shadow: 0 0 10px rgba(74, 222, 128, .7); }
.dot.off { background: var(--bad); }

.main { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-content: start; }
.main.full { grid-template-columns: minmax(0, 1fr); }
.content { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.rail { position: sticky; top: 18px; align-self: start; max-height: calc(100vh - 36px); display: flex; flex-direction: column; }

/* ───────────── nagłówek ───────────── */
.topbar { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 4px 4px 0; }
.hello { font-size: 28px; font-weight: 800; margin: 0; letter-spacing: -0.01em; }
.hello-sub { color: var(--ink-2); margin-top: 4px; font-size: 14px; }
.top-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 999px;
  background: rgba(30, 22, 18, 0.55); border: 1px solid var(--line-2); backdrop-filter: blur(16px);
  font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.pill:hover { background: rgba(60, 44, 36, 0.65); }
.btn-orange {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 18px; border-radius: 999px; border: 0;
  background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: #2b1407; font-weight: 700; cursor: pointer;
  box-shadow: 0 8px 22px rgba(245, 154, 74, 0.35), inset 0 1px 0 rgba(255,255,255,.55); white-space: nowrap;
}
.btn-orange:hover { filter: brightness(1.05); }
.btn-orange:disabled { opacity: .55; cursor: default; }

.seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px; background: rgba(20, 15, 12, 0.55); border: 1px solid var(--line-2); backdrop-filter: blur(16px); }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--ink-2); }
.seg button.on { background: rgba(255, 255, 255, 0.92); color: #24160e; }

/* ───────────── KPI ───────────── */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; min-height: 150px; }
.kpi-top { display: flex; justify-content: space-between; align-items: center; font-weight: 600; color: var(--ink-2); }
.glass.accent .kpi-top, .glass.accent .kpi-hint { color: rgba(255, 245, 235, .85); }
.kpi-ico { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.1); font-size: 14px; }
.glass.accent .kpi-ico { background: rgba(255,255,255,.92); color: #8a4518; }
.kpi-value { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; margin-top: auto; }
.kpi-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.kpi-hint { font-size: 12.5px; color: var(--ink-3); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.chip.up { background: rgba(74, 222, 128, .14); color: #86efac; border: 1px solid rgba(74, 222, 128, .3); }
.chip.down { background: rgba(248, 113, 113, .14); color: #fca5a5; border: 1px solid rgba(248, 113, 113, .3); }
.chip.flat { background: rgba(255,255,255,.08); color: var(--ink-2); border: 1px solid var(--line-2); }
.glass.accent .chip.flat { background: rgba(255,255,255,.2); color: #fff; }

/* ───────────── karty ───────────── */
.card { padding: 20px 22px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-title { font-size: 16px; font-weight: 700; margin: 0; }
.card-sub { color: var(--ink-3); font-size: 12.5px; margin-top: 3px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 16px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }

/* ───────────── wykres kapsułowy ───────────── */
.capsules { position: relative; height: 260px; display: grid; grid-template-columns: 34px 1fr; }
.cap-axis { position: relative; font-size: 11px; color: var(--ink-3); }
.cap-axis span { position: absolute; right: 8px; transform: translateY(50%); }
.cap-plot { position: relative; border-bottom: 1px solid var(--line); }
.cap-grid { position: absolute; left: 0; right: 0; border-top: 1px dashed rgba(255,255,255,.06); }
.cap-cols { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: space-between; padding: 0 4px; }
.cap-col { flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; position: relative; cursor: default; }
.cap-col:hover .cap { filter: brightness(1.25); }
.cap {
  width: var(--w, 12px); max-width: 40%; border-radius: 999px; min-height: 4px;
  transition: height .5s cubic-bezier(.2,.8,.2,1);
}
.cap.join {
  background: linear-gradient(90deg, #c9632a 0%, #ffcf9c 45%, #f59a4a 70%, #b8571f 100%);
  box-shadow: 0 0 18px rgba(245, 154, 74, 0.35);
}
.cap.leave {
  background: linear-gradient(90deg, rgba(255,255,255,.18) 0%, rgba(255,255,255,.62) 45%, rgba(255,255,255,.28) 75%, rgba(255,255,255,.12) 100%);
}
.cap-labels { display: flex; justify-content: space-between; padding: 8px 4px 0 38px; font-size: 11px; color: var(--ink-3); }
.cap-labels span { flex: 1; text-align: center; white-space: nowrap; }
.cap-labels span.today { color: var(--ink); font-weight: 700; }

/* ───────────── mapa serwerów ───────────── */
.map { position: relative; height: 320px; border-radius: 16px; background: rgba(0,0,0,.18); border: 1px solid var(--line); overflow: hidden; }
.map-grid { position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px); background-size: 18px 18px; }
.map-mid-x, .map-mid-y { position: absolute; border-color: rgba(255,255,255,.14); border-style: dashed; }
.map-mid-x { left: 0; right: 0; border-width: 1px 0 0; }
.map-mid-y { top: 0; bottom: 0; border-width: 0 0 0 1px; }
.map-q { position: absolute; font-size: 11px; font-weight: 600; color: var(--ink-3); padding: 8px 10px; }
.map-axis { position: absolute; font-size: 11px; color: var(--ink-3); }
.bubble {
  position: absolute; border-radius: 50%; transform: translate(-50%, -50%); cursor: pointer;
  background: #3a2a21 center / cover no-repeat; display: grid; place-items: center; font-weight: 800; color: var(--ink);
  box-shadow: 0 0 0 2px rgba(20,15,12,.9), 0 0 0 4px var(--ring, rgba(255,255,255,.25)), 0 10px 30px rgba(0,0,0,.45);
  transition: transform .15s;
}
.bubble:hover { transform: translate(-50%, -50%) scale(1.08); z-index: 3; }
.bubble.up { --ring: rgba(74, 222, 128, .75); }
.bubble.down { --ring: rgba(248, 113, 113, .75); }

/* ───────────── lista serwerów ───────────── */
.srv-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.srv-table th { text-align: left; font-size: 11.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; padding: 0 10px 10px; }
.srv-table td { padding: 11px 10px; border-top: 1px solid var(--line); vertical-align: middle; }
.srv-table tr.click { cursor: pointer; }
.srv-table tr.click:hover td { background: rgba(255,255,255,.04); }
.srv-name { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.num { font-variant-numeric: tabular-nums; font-weight: 700; }
.pos { color: #86efac; } .neg { color: #fca5a5; } .muted { color: var(--ink-3); }
.meter { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.meter-track { flex: 1; height: 10px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,.4); }
.meter-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent-deep), var(--accent-2)); box-shadow: 0 0 12px rgba(245,154,74,.45); }
.meter-val { font-weight: 700; min-width: 46px; text-align: right; font-variant-numeric: tabular-nums; }

/* ───────────── aktywność ───────────── */
.feed { padding: 18px; display: flex; flex-direction: column; min-height: 0; max-height: calc(100vh - 36px); }
.feed-list { overflow-y: auto; display: flex; flex-direction: column; gap: 8px; margin-right: -6px; padding-right: 6px; }
.feed-list::-webkit-scrollbar { width: 6px; }
.feed-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 6px; }
.feed-item { display: flex; gap: 11px; align-items: center; padding: 10px 12px; border-radius: 16px; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.05); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: #3a2a21 center / cover; flex: none; position: relative; }
.avatar b { position: absolute; right: -3px; bottom: -3px; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 900; border: 2px solid #1f1712; }
.avatar b.in { background: #22c55e; color: #052e12; }
.avatar b.out { background: #f87171; color: #3b0808; }
.feed-text { min-width: 0; flex: 1; }
.feed-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-meta { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-time { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }

/* ───────────── strona serwera ───────────── */
.srv-head { display: flex; align-items: center; gap: 16px; padding: 18px 22px; }
.srv-title { font-size: 24px; font-weight: 800; margin: 0; }
.tabs { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.period { padding: 18px 20px; }
.period-title { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 15px; margin-bottom: 14px; }
.period-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.ps-label { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.ps-value { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ring-row { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.ring-text { font-size: 12.5px; color: var(--ink-2); }
.warn { padding: 14px 18px; border-radius: 16px; background: rgba(248, 113, 113, .12); border: 1px solid rgba(248, 113, 113, .3); color: #fecaca; }
.warn ul { margin: 6px 0 0; padding-left: 18px; }
.info { padding: 12px 16px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid var(--line); color: var(--ink-2); font-size: 13px; }

.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; padding: 0 10px 10px; white-space: nowrap; }
.tbl td { padding: 11px 10px; border-top: 1px solid var(--line); }
.code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; padding: 3px 8px; border-radius: 8px; background: rgba(255,255,255,.08); }
.tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.1); color: var(--ink-2); margin-left: 6px; }

.donut-wrap { display: flex; align-items: center; gap: 22px; }
.donut-legend { display: flex; flex-direction: column; gap: 8px; font-size: 13px; min-width: 0; flex: 1; }
.donut-legend div { display: flex; align-items: center; gap: 8px; }
.donut-legend i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.donut-legend span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }

/* ───────────── ustawienia ───────────── */
.form-section { padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; }
.form-section h3 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 10px; }
.form-section > p { margin: -8px 0 0; color: var(--ink-3); font-size: 13px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field > .lbl { font-weight: 600; font-size: 13px; }
.field small { color: var(--ink-3); font-size: 12px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
select, input[type=number], input[type=text], textarea {
  width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2);
  background: rgba(10, 7, 5, 0.45); color: var(--ink); font: inherit; outline: none;
}
select:focus, input:focus, textarea:focus { border-color: rgba(245, 154, 74, .7); box-shadow: 0 0 0 3px rgba(245, 154, 74, .18); }
select option { background: #241a14; }
textarea { min-height: 80px; resize: vertical; }
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; font-weight: 600; }
.switch input { display: none; }
.switch .track { width: 44px; height: 26px; border-radius: 999px; background: rgba(255,255,255,.16); position: relative; transition: background .2s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + .track { background: linear-gradient(180deg, var(--accent-2), var(--accent)); }
.switch input:checked + .track::after { transform: translateX(18px); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 170px; overflow-y: auto; padding: 2px; }
.chips label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255,255,255,.05); cursor: pointer; font-size: 12.5px; }
.chips input { display: none; }
.chips label:has(input:checked) { background: rgba(245, 154, 74, .22); border-color: rgba(245, 154, 74, .7); color: #fff; }
.choice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.choice label { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(255,255,255,.04); cursor: pointer; }
.choice label b { display: block; margin-bottom: 2px; }
.choice label span { color: var(--ink-3); font-size: 12px; }
.choice input { display: none; }
.choice label:has(input:checked) { border-color: rgba(245, 154, 74, .8); background: rgba(245, 154, 74, .16); }
.disabled-block { opacity: .45; pointer-events: none; }
.savebar { position: sticky; bottom: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px 12px 20px; z-index: 5; background: var(--glass-strong); }

.toast { position: fixed; right: 24px; bottom: 24px; padding: 12px 18px; border-radius: 14px; background: rgba(28, 21, 17, .92); border: 1px solid var(--line-2); box-shadow: var(--shadow); z-index: 50; transform: translateY(20px); opacity: 0; transition: all .25s; max-width: 380px; }
.toast.show { transform: none; opacity: 1; }
.toast.ok { border-color: rgba(74, 222, 128, .5); }
.toast.err { border-color: rgba(248, 113, 113, .6); }

.tooltip {
  position: fixed; pointer-events: none; z-index: 60; padding: 10px 12px; border-radius: 12px; font-size: 12.5px;
  background: rgba(250, 245, 240, .96); color: #22150d; box-shadow: 0 12px 30px rgba(0,0,0,.4); min-width: 150px;
  opacity: 0; transition: opacity .1s;
}
.tooltip.show { opacity: 1; }
.tooltip b { font-size: 13.5px; }
.tooltip .tt-row { display: flex; justify-content: space-between; gap: 14px; margin-top: 3px; }
.tooltip .tt-row span:last-child { font-weight: 700; font-variant-numeric: tabular-nums; }

.empty { padding: 28px; text-align: center; color: var(--ink-2); }
.empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 6px; }

/* ───────────── logowanie ───────────── */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login form { width: 100%; max-width: 360px; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.login-error { color: #fca5a5; margin: 0; }

/* ───────────── telefony / małe ekrany ───────────── */
@media (max-width: 1560px) {
  .main { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; max-height: none; }
  .feed { max-height: 520px; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; padding: 10px; }
  .sidebar { position: static; height: auto; }
  .server-list { max-height: 260px; }
  .choice { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; }
  .srv-head { flex-wrap: wrap; }
  .tabs { margin-left: 0; }
}

.table-scroll { overflow-x: auto; }
@media (max-width: 1250px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .kpis { grid-template-columns: minmax(0, 1fr); } }

.total-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; margin-top: 8px; }
.total-num {
  font-size: 34px; font-weight: 800; letter-spacing: -0.02em; line-height: 1;
  background: linear-gradient(180deg, #ffe0c2, #f59a4a); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.total-txt { color: var(--ink); font-weight: 700; font-size: 15px; }
.total-line .chip { align-self: center; }

/* mapa serwerów — prosta wersja: kółka obok siebie z podpisami */
.map { height: auto !important; min-height: 300px; overflow: visible !important; display: flex; flex-wrap: wrap;
       align-items: flex-end; justify-content: center; gap: 22px 18px; padding: 26px 16px 18px; }
.bubble-item { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 128px; text-align: center; }
.bubble-item .bubble { position: relative; transform: none; margin-bottom: 6px; }
.bubble-item:hover .bubble { transform: scale(1.06); }
.bubble-name { font-weight: 700; font-size: 13px; max-width: 128px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bubble-count { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.bubble-badge { position: absolute; right: -6px; bottom: -4px; padding: 2px 7px; border-radius: 999px; font-size: 11.5px;
                font-weight: 800; border: 2px solid #1f1712; line-height: 1.3; }
.bubble-badge.up { background: #22c55e; color: #052e12; }
.bubble-badge.down { background: #f87171; color: #3b0808; }

/* mini-profil po najechaniu na osobę */
#profile-pop {
  position: fixed; z-index: 70; width: 320px; border-radius: 18px; overflow: hidden; pointer-events: none;
  background: #1f1814; border: 1px solid var(--line-2); box-shadow: 0 24px 60px rgba(0,0,0,.6);
  opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s;
}
#profile-pop.show { opacity: 1; transform: none; }
.pp-loading { padding: 22px; color: var(--ink-2); }
.pp-banner { height: 96px; background: linear-gradient(135deg, #f59a4a, #7c3aed) center / cover no-repeat; }
.pp-avatar { width: 84px; height: 84px; border-radius: 50%; margin: -46px 0 0 16px; border: 6px solid #1f1814;
             background: #3a2a21 center / cover no-repeat; position: relative; }
.pp-body { padding: 8px 18px 18px; display: flex; flex-direction: column; gap: 10px; }
.pp-name { font-size: 19px; font-weight: 800; line-height: 1.2; }
.pp-user { font-size: 13px; color: var(--ink-2); margin-top: -8px; }
.pp-flags { display: flex; flex-wrap: wrap; gap: 6px; }
.pp-flags:empty { display: none; }
.pp-flag { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.pp-flag.ok { background: rgba(74,222,128,.14); color: #86efac; }
.pp-flag.bad { background: rgba(248,113,113,.16); color: #fca5a5; }
.pp-flag.mid { background: rgba(250,204,21,.14); color: #fde68a; }
.pp-sec { font-size: 13px; }
.pp-lbl { font-size: 11.5px; font-weight: 700; color: var(--ink-3); margin-bottom: 2px; }
.pp-roles { display: flex; flex-wrap: wrap; gap: 5px; }
.pp-role { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 8px; background: rgba(255,255,255,.07); font-size: 12px; }
.pp-role i { width: 9px; height: 9px; border-radius: 50%; }
.feed-item[data-uid] { cursor: default; }
.feed-item[data-uid]:hover { background: rgba(255,255,255,.08); }

/* pola na ID kanałów podsumowania */
.id-list { display: flex; flex-direction: column; gap: 10px; max-width: 620px; }
.id-input { display: flex; gap: 8px; }
.id-input input { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .02em; }
.id-del { width: 44px; flex: none; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255,255,255,.05); cursor: pointer; color: var(--ink-2); }
.id-del:hover { background: rgba(248,113,113,.18); color: #fecaca; }
.id-hint { display: block; font-size: 12.5px; color: var(--ink-3); padding: 4px 4px 0; min-height: 4px; }
.id-hint.ok { color: #86efac; font-weight: 600; }
.id-hint.bad { color: #fca5a5; }
.id-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.toast { pointer-events: none; }

/* liczby nad słupkami */
.capsules { height: 290px !important; }
.cap-val { position: absolute; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column;
           align-items: center; line-height: 1.12; font-size: 11px; font-weight: 800; pointer-events: none;
           white-space: nowrap; font-variant-numeric: tabular-nums; }
.cap-val .j { color: #ffbf80; }
.cap-val .l { color: rgba(247, 240, 234, .62); }

/* wyjścia na czerwono, liczba nad własnym słupkiem */
.cap { position: relative; }
.cap.leave {
  background: linear-gradient(90deg, #7f1d1d 0%, #fca5a5 45%, #ef4444 70%, #7f1d1d 100%) !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, .35);
}
.cap-num {
  position: absolute; bottom: calc(100% + 5px); left: 50%; transform: translateX(-50%);
  font-size: 11px; font-weight: 800; line-height: 1; white-space: nowrap; pointer-events: none;
  font-variant-numeric: tabular-nums;
}
.cap[style*="--w:7px"] .cap-num { font-size: 9.5px; }
.cap-num.j { color: #ffbf80; }
.cap-num.l { color: #fca5a5; }
.cap-num.lift { bottom: calc(100% + 17px); }

/* ile wytrzymują */
.stay-big { font-size: 15px; margin-bottom: 14px; }
.stay-big b { font-size: 20px; color: var(--accent-2); }
.stay-rows { display: flex; flex-direction: column; gap: 10px; }
.stay-row { display: grid; grid-template-columns: 150px 1fr 48px; align-items: center; gap: 12px; font-size: 13px; }
.stay-row b { text-align: right; font-variant-numeric: tabular-nums; }
.stay-row .meter-fill { background: linear-gradient(90deg, #7f1d1d, #ef4444); box-shadow: 0 0 12px rgba(239,68,68,.4); }

/* kamienie milowe */
.ms-top { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.ms-now { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }
.ms-arrow { color: var(--ink-3); font-size: 20px; }
.ms-next { font-size: 22px; font-weight: 800; color: #f5b942; }
.ms-track { height: 14px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,.4); }
.ms-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #c9632a, #f5b942); box-shadow: 0 0 14px rgba(245,185,66,.5); }
.ms-fc { margin-top: 12px; font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
.ms-fc b { color: var(--ink); }
.ms-sub { margin-top: 14px; margin-bottom: 6px; font-size: 11.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.ms-up { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ms-up div { padding: 8px 10px; border-radius: 12px; background: rgba(255,255,255,.05); display: flex; flex-direction: column; }
.ms-up b { font-size: 15px; }
.ms-up span { font-size: 12px; color: var(--ink-2); }
.ms-hist { display: flex; flex-wrap: wrap; gap: 6px; }
.ms-chip { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(245,185,66,.14); border: 1px solid rgba(245,185,66,.35); }
.ms-chip i { color: var(--ink-3); font-style: normal; margin-left: 4px; }

/* złota godzina */
.hm-best { margin-bottom: 12px; font-size: 13.5px; color: var(--ink-2); }
.hm-best b { color: var(--ink); }
.hm { display: flex; flex-direction: column; gap: 3px; overflow-x: auto; }
.hm-row { display: grid; grid-template-columns: 26px repeat(24, minmax(18px, 1fr)); gap: 3px; }
.hm-head span { font-size: 10.5px; color: var(--ink-3); text-align: left; }
.hm-day { font-size: 11.5px; color: var(--ink-2); font-weight: 700; align-self: center; }
.hm-cell { height: 24px; border-radius: 6px; display: grid; place-items: center; font-size: 10.5px; font-weight: 800;
           color: rgba(255, 236, 220, .9); font-variant-numeric: tabular-nums; }
.hm-cell.dark { color: #2b1407; }

/* czas pobytu w osobnej linijce */
.feed-stay { font-size: 12px; color: #fca5a5; margin-top: 1px; }
.feed-stay b { color: #fecaca; }
.feed-stay.unknown { color: var(--ink-3); font-style: italic; white-space: normal; line-height: 1.3; }
.stay-row { grid-template-columns: 180px 1fr 48px; }

/* edycja nazwy i logo */
.brand-click { cursor: pointer; border-radius: 16px; transition: background .15s; position: relative; }
.brand-click:hover { background: rgba(255,255,255,.06); }
.brand-edit { opacity: 0; color: var(--ink-3); font-size: 15px; transition: opacity .15s; }
.brand-click:hover .brand-edit { opacity: 1; }
.brand-name, .brand-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-logo.has-image { background-size: cover !important; background-position: center !important; }
.brand-logo { flex: none; }
.modal-bg { position: fixed; inset: 0; z-index: 80; background: rgba(8,6,5,.6); backdrop-filter: blur(4px);
            display: grid; place-items: center; padding: 20px; }
.modal { width: 100%; max-width: 520px; padding: 22px; display: flex; flex-direction: column; gap: 14px;
         background: var(--glass-strong); max-height: calc(100vh - 40px); overflow-y: auto; }
.modal-preview { padding: 14px; border-radius: 16px; background: rgba(0,0,0,.25); border: 1px solid var(--line); }
.modal input[type=file] { color: var(--ink-2); }
/* dłuższe nazwy: do 2 linijek zamiast ucinania */
.brand-click .brand-name { letter-spacing: .05em; line-height: 1.2; }
.brand-click .brand-name, .brand-click .brand-sub {
  white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word;
}
