/* Emglare Servers — doplňky ke stylům Workspace/Trackeru (style.css, work.css): rozvržení jako Calendar,
   stav serverů a webů, metriky, tabulky, detail serveru, přístupy. */

/* vlastní tlačítka bez globálního oranžového stylu ze style.css */
.pbtn, .tbtn, .ibtn, .seg button, .lnk, .rowbtn, .tab, .acc-cell, .chip-btn, .nav-new { box-shadow: none; transform: none !important; font-family: inherit; }
.rowbtn, .tab, .acc-cell, .chip-btn { background: none; color: inherit; padding: 0; font-weight: inherit; font-size: inherit; text-align: left; }
.pbtn { display: inline-flex; align-items: center; gap: 6px; background: var(--orange); color: #fff; border-radius: 8px; padding: 7px 14px; font-size: 12.5px; font-weight: 600; }
.pbtn:hover { background: var(--orange-dark); }
.pbtn:disabled { opacity: .5; }
.tbtn.danger-t { color: var(--red); }
.tbtn.danger-t:hover { border-color: #f1b9b9; background: var(--red-soft); }
.tbtn:disabled { opacity: .55; cursor: default; }
.modal.wide { width: 820px; }
.modal.narrow { width: 460px; }
.ck-line { display: flex !important; align-items: center; gap: 7px; font-size: 12.5px !important; font-weight: 500 !important; color: #3a4250 !important; margin: 10px 0 0 !important; cursor: pointer; }
.ck-line input { width: auto; margin: 0; }
.seg.wide { display: flex; }
.seg.wide button { flex: 1; justify-content: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
.hint { display: block; color: var(--gray); font-size: 11.5px; margin-top: 4px; line-height: 1.45; }
.notice { padding: 10px 12px; border-radius: 10px; background: #f4f5f7; color: #5b6270; font-size: 12.5px; line-height: 1.5; margin: 0 0 12px; }
.notice.warn { background: #fff4e5; color: #8a4b00; }
.notice.ok { background: var(--green-soft); color: var(--green); }
.notice.bad { background: var(--red-soft); color: var(--red); }
.notice code, .code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; }
.code { display: block; white-space: pre-wrap; word-break: break-all; background: #17191c; color: #e8e8e8; border-radius: 10px; padding: 12px 14px; margin: 6px 0 0; line-height: 1.55; }
.muted { color: var(--gray); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.nowrap { white-space: nowrap; }

/* ---------- rozvržení jako Emglare // Calendar: plovoucí tmavý panel vlevo, obsah v bílé kartě na šedém pozadí ---------- */
body.srv-body { background: var(--bg); overflow: hidden; }
.srv-body .layout { height: 100vh; }
.srv-body #sidebar { overflow-y: auto; scrollbar-width: thin; scrollbar-color: #3a3e44 transparent; }
.srv-body #nav { flex: 1 0 auto; overflow: visible; }
.srv-body #nav a { cursor: pointer; }
.srv-body #nav a .nl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srv-body #nav a > svg { opacity: .6; }
.srv-body #nav .nav-badge { font-style: normal; background: var(--orange); color: #fff; border-radius: 99px; padding: 1px 7px; font-size: 10.5px; font-weight: 700; }
.srv-body #nav .nav-badge.red { background: #e34948; }
.srv-body #nav a.active .nav-badge { background: #fff; color: var(--orange-dark); }
.srv-body #nav a.nav-bug { margin-top: 14px; color: #8b9097; font-size: 12px; }
.srv-body #nav a.nav-bug:hover { color: #fff; }
.srv-body .sb-user { cursor: default; flex-shrink: 0; }
.srv-body .sb-user .avatar { color: #fff; }
.srv-body .sb-out { margin-left: auto; color: #8b9097; background: none; }
.srv-body .sb-out:hover { color: #fff; background: rgba(255,255,255,.08); }
.srv-body .sb-lang { margin-left: auto; flex-shrink: 0; width: auto; height: auto; min-width: 0; -webkit-appearance: none; appearance: none; background: transparent; color: #8b9097; border: 1px solid rgba(255,255,255,.12); border-radius: 7px; padding: 3px 5px; font: inherit; font-size: 10.5px; font-weight: 600; letter-spacing: .04em; text-align: center; cursor: pointer; }
.srv-body .sb-lang:hover, .srv-body .sb-lang:focus { color: #fff; border-color: rgba(255,255,255,.28); outline: none; box-shadow: none; }
.srv-body .sb-lang option { color: #17191c; }
.srv-body .sb-lang + .sb-out { margin-left: 0; }
.srv-body #content { display: flex; flex-direction: column; min-height: 0; height: calc(100vh - 24px); }
.srv-body #main { display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 0; }
.side-sum { margin: 0 0 14px; padding: 10px 12px; border-radius: 16px; background: rgba(255,255,255,.04); display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; text-align: center; }
.side-sum b { display: block; color: #fff; font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums; }
.side-sum span { display: block; white-space: nowrap; font-size: 9px; letter-spacing: .03em; text-transform: uppercase; color: #6f757e; }
.side-sum .bad b { color: #ff8a80; }
.side-sum .warn b { color: #f5a54a; }

.pg-top { display: flex; position: static; margin: 0; padding: 2px 4px 12px; align-items: center; gap: 12px; background: none; flex-wrap: wrap; }
.pg-top h1 { margin: 0; font-size: 22px; font-weight: 600; display: flex; align-items: center; gap: 10px; min-width: 0; }
.pg-top h1 small { font-size: 13px; color: var(--gray); font-weight: 500; }
.pg-top .back { color: var(--gray); }
.pg-top .right { display: flex; gap: 8px; align-items: center; margin-left: auto; flex-wrap: wrap; }
.pg-top .tbtn { background: #fff; }
.pg-top .seg { background: #e2e3e6; }
.pg-card { flex: 1; min-height: 0; display: flex; flex-direction: column; background: #fff; border-radius: var(--r-card); box-shadow: var(--shadow); overflow: hidden; }
.pg-card > .scroll { flex: 1; overflow-y: auto; padding: 18px 22px 40px; }
.sec-h { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--gray); margin: 22px 0 10px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.sec-h:first-child { margin-top: 0; }
.sec-h .right { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 600; }

/* ---------- stav ---------- */
.hd { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #b2b6bc; flex-shrink: 0; }
.hd.ok { background: #1baf7a; }
.hd.warn { background: #eda100; }
.hd.down { background: #e34948; box-shadow: 0 0 0 4px rgba(227,73,72,.16); }
.hd.paused { background: #d3d7dc; }
.hd.lg { width: 14px; height: 14px; }
.stc { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: #f1f2f4; color: #5b6270; white-space: nowrap; }
.stc.ok { background: var(--green-soft); color: var(--green); }
.stc.warn { background: #fff4e5; color: #8a4b00; }
.stc.down { background: var(--red-soft); color: var(--red); }
.reasons { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.rs { font-size: 11px; padding: 1px 8px; border-radius: 99px; background: #f1f2f4; color: #5b6270; white-space: nowrap; }
.rs.warn { background: #fff4e5; color: #8a4b00; }
.rs.down { background: var(--red-soft); color: var(--red); }
.tagc { display: inline-block; font-size: 10.5px; font-weight: 600; padding: 1px 8px; border-radius: 99px; background: #eef0f3; color: #4a4e54; margin-right: 3px; }
.pchip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: #4a4e54; }
.pchip i { width: 8px; height: 8px; border-radius: 3px; background: var(--c, #8a8f96); display: inline-block; }

/* ---------- přehled ---------- */
.ov-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.ov-kpi { border: 1px solid #eceef1; border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; background: #fff; text-align: left; color: inherit; }
.ov-kpi:hover { border-color: #d9dce1; background: #fafafb; }
.ov-kpi .n { font-size: 26px; font-weight: 300; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ov-kpi .l { font-size: 11.5px; color: var(--gray); font-weight: 500; }
.ov-kpi .s { font-size: 11.5px; display: flex; gap: 8px; flex-wrap: wrap; }
.ov-kpi .s .bad { color: var(--red); font-weight: 600; }
.ov-kpi .s .wrn { color: #8a4b00; font-weight: 600; }
.ov-kpi .s .okk { color: var(--green); font-weight: 600; }
.srv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.srv-card { border: 1px solid #eceef1; border-radius: 14px; padding: 14px 16px; cursor: pointer; display: flex; flex-direction: column; gap: 10px; background: #fff; text-align: left; color: inherit; font: inherit; }
.srv-card:hover { border-color: #d9dce1; box-shadow: 0 4px 16px rgba(23,25,28,.06); }
.srv-card.down { border-color: #f1b9b9; background: #fffafa; }
.srv-card.warn { border-color: #f6dcbc; }
.srv-card .h { display: flex; align-items: center; gap: 9px; }
.srv-card .h b { font-size: 14px; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srv-card .h small { color: var(--gray); font-size: 11px; }
.srv-card .sub { color: var(--gray); font-size: 11.5px; margin-top: -6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mt { display: flex; flex-direction: column; gap: 3px; }
.mt .lbl { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--gray); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.mt .lbl b { color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.mt .bar { height: 5px; background: #eef0f3; border-radius: 99px; overflow: hidden; }
.mt .bar i { display: block; height: 100%; border-radius: 99px; background: #1baf7a; }
.mt .bar i.warn { background: #eda100; }
.mt .bar i.down { background: #e34948; }
.srv-card .foot { display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: var(--gray); flex-wrap: wrap; }
.srv-card .foot .r { margin-left: auto; }
.spark { display: block; width: 100%; height: 34px; }

/* ---------- tabulky ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: #9a9daa; font-weight: 600; border-bottom: 1px solid #ececf3; padding: 8px 10px; white-space: nowrap; }
.tbl td { border-bottom: 1px solid #f1f1f6; padding: 10px; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover td { background: #fafafb; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .name b { font-weight: 600; display: block; }
.tbl .name small { color: var(--gray); font-size: 11.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 360px; }
.tbl .acts { text-align: right; white-space: nowrap; }
.tbl-wrap { overflow-x: auto; }
.flt { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.flt input[type=search], .flt select { width: auto; min-width: 160px; padding: 7px 10px; font-size: 12.5px; background: #f3f4f5; }
.flt input[type=search] { min-width: 220px; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 60px 20px; color: var(--gray); text-align: center; }
.empty svg { color: #c9cdd3; }
.empty b { color: var(--ink); font-size: 15px; font-weight: 600; }

/* ---------- detail serveru ---------- */
.tabs2 { display: flex; gap: 2px; border-bottom: 1px solid #eceef1; margin: -6px 0 16px; overflow-x: auto; }
.tab { padding: 9px 13px; font-size: 12.5px; font-weight: 600; color: #5b6270; border-bottom: 2px solid transparent; white-space: nowrap; border-radius: 0; cursor: pointer; }
.tab:hover { color: var(--ink); background: none; }
.tab.on { color: var(--ink); border-bottom-color: var(--orange); }
.tab em { font-style: normal; font-size: 10.5px; color: var(--gray); margin-left: 4px; font-weight: 600; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 16px; }
.kp { border: 1px solid #eceef1; border-radius: 12px; padding: 12px 14px; }
.kp .l { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--gray); font-weight: 600; }
.kp .n { font-size: 22px; font-weight: 300; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kp .n small { font-size: 12px; color: var(--gray); font-weight: 500; }
.kp .s { font-size: 11.5px; color: var(--gray); margin-top: 2px; }
.kp.warn { border-color: #f6dcbc; background: #fffbf5; }
.kp.down { border-color: #f1b9b9; background: #fffafa; }
.chart { border: 1px solid #eceef1; border-radius: 12px; padding: 12px 14px 6px; margin-bottom: 16px; }
.chart-h { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; flex-wrap: wrap; }
.chart-h b { font-size: 13px; font-weight: 600; }
.chart-h .seg { margin-left: auto; }
.legend { display: flex; gap: 12px; font-size: 11.5px; color: var(--gray); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 10px; height: 3px; border-radius: 2px; background: var(--c); display: inline-block; }
.chart svg { display: block; width: 100%; height: 190px; overflow: visible; }
.chart svg text { font-size: 10px; fill: #9a9daa; font-family: inherit; }
.chart .tip { position: absolute; pointer-events: none; background: #17191c; color: #fff; font-size: 11px; padding: 6px 9px; border-radius: 8px; white-space: nowrap; transform: translate(-50%, -110%); }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 24px; }
.info-grid > div { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.info-grid .k { font-size: 11px; color: var(--gray); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.pills { display: flex; flex-wrap: wrap; gap: 5px; }
.pl { font-size: 11.5px; padding: 3px 9px; border-radius: 8px; background: #f3f4f6; color: #3a4250; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.pl.bad { background: var(--red-soft); color: var(--red); }
.pl.ok { background: var(--green-soft); color: var(--green); }
.note-box { white-space: pre-wrap; line-height: 1.55; color: #3a4250; background: #f8f9fa; border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.who { display: inline-flex; align-items: center; gap: 7px; }
.av { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-weight: 700; flex: 0 0 auto !important; }
.lvl { font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: #eef0f3; color: #4a4e54; }
.lvl.manage { background: var(--orange-soft); color: var(--orange-dark); }
.lvl.admin { background: #17191c; color: #fff; }
.uptime-bars { display: flex; gap: 2px; height: 28px; align-items: stretch; margin: 6px 0 4px; }
.uptime-bars i { flex: 1; border-radius: 2px; background: #1baf7a; min-width: 2px; }
.uptime-bars i.warn { background: #eda100; }
.uptime-bars i.down { background: #e34948; }
.uptime-bars i.none { background: #eceef1; }

/* ---------- přístupy (matice) ---------- */
.acc-wrap { overflow: auto; max-height: calc(100vh - 220px); border: 1px solid #eceef1; border-radius: 12px; }
.acc { border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.acc th, .acc td { border-bottom: 1px solid #f1f1f6; border-right: 1px solid #f4f4f8; padding: 6px 8px; background: #fff; }
.acc thead th { position: sticky; top: 0; z-index: 2; font-size: 11px; font-weight: 600; color: #4a4e54; text-transform: none; letter-spacing: 0; vertical-align: bottom; min-width: 92px; max-width: 120px; white-space: normal; line-height: 1.25; }
.acc th.pn, .acc td.pn { position: sticky; left: 0; z-index: 1; min-width: 200px; text-align: left; }
.acc thead th.pn { z-index: 3; }
.acc td.c { text-align: center; padding: 4px; }
.acc-cell { width: 100%; padding: 6px 4px !important; border-radius: 7px; font-size: 11px !important; font-weight: 600 !important; text-align: center !important; color: #b2b6bc !important; cursor: pointer; }
.acc-cell:hover { background: #f3f4f6 !important; }
.acc-cell.view { background: #eef0f3 !important; color: #3a4250 !important; }
.acc-cell.manage { background: var(--orange-soft) !important; color: var(--orange-dark) !important; }
.acc td.admin { text-align: center; color: var(--gray); font-size: 11px; }

/* ---------- formuláře ---------- */
.m-body label:first-child { margin-top: 0; }
.wh-row { display: grid; grid-template-columns: 1fr 2fr 110px 110px 32px; gap: 8px; align-items: center; margin-bottom: 8px; }
.wh-row input, .wh-row select { padding: 7px 9px; font-size: 12.5px; }
.form-card { border: 1px solid #eceef1; border-radius: 14px; padding: 16px 18px; margin-bottom: 14px; max-width: 860px; }
.form-card h3 { margin: 0 0 4px; font-size: 14px; font-weight: 600; }
.form-card > p { margin: 0 0 10px; color: var(--gray); font-size: 12.5px; line-height: 1.5; }
.th-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 14px; }
.inc-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid #f1f1f6; }
.inc-row:last-child { border-bottom: 0; }
.inc-row .t { flex: 1; min-width: 0; }
.inc-row .t b { font-weight: 600; display: block; }
.inc-row .t small { color: var(--gray); font-size: 12px; }
.inc-row .r { text-align: right; white-space: nowrap; font-size: 12px; color: var(--gray); display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.inc-row.open .t b { color: var(--red); }
.inc-row.open.warn .t b { color: #8a4b00; }

@media (max-width: 900px) {
  body.srv-body { overflow: auto; }
  .srv-body .layout { height: auto; }
  .srv-body #content { height: auto; }
  .srv-body .side-sum, .srv-body #nav .nav-sep { display: none; }
  .pg-card { min-height: 72vh; }
  .pg-top h1 { font-size: 18px; width: 100%; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .wh-row { grid-template-columns: 1fr 1fr; }
  .pg-card > .scroll { padding: 14px 14px 30px; }
  .tbl .hide-m { display: none; }
}
