/* SHIFT TV Panel */
:root {
  --bg: #eef1f5; --card: #fff; --ink: #1f2933; --muted: #6b7785; --line: #dde3ea; --line2: #eef1f4;
  --nav: #16191e; --nav2: #23272e; --red: #e10600; --blue: #1f6fb8; --blue2: #185d9c; --blue-l: #e8f1fa;
  --ok: #1e8e4e; --warn: #c27c0e; --err: #d0312d; --link: #1f6fb8;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 13.5px/1.45 "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: var(--bg); color: var(--ink); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* top navigation */
.nav { background: var(--nav); color: #fff; display: flex; align-items: stretch; height: 48px; padding: 0 14px; position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 0 #000; }
.brand { display: flex; align-items: center; gap: 2px; font-weight: 800; font-size: 19px; letter-spacing: .4px; color: #fff; padding-right: 18px; margin-right: 6px; border-right: 1px solid #2c3139; }
.brand:hover { text-decoration: none; }
.brand .tv { color: var(--red); margin-left: 3px; }
.brand .sub { font-weight: 400; color: #9aa3ad; font-size: 12px; margin-left: 8px; letter-spacing: .3px; text-transform: uppercase; }
.menu { display: flex; align-items: stretch; margin: 0; padding: 0; list-style: none; }
.menu > li { position: relative; }
.menu > li > a { display: flex; align-items: center; height: 48px; padding: 0 14px; color: #dfe4ea; font-weight: 500; }
.menu > li > a:hover, .menu > li:hover > a, .menu > li.on > a { background: var(--nav2); color: #fff; text-decoration: none; }
.menu > li.on > a { box-shadow: inset 0 -3px 0 var(--red); }
.menu .drop { display: none; position: absolute; top: 48px; left: 0; min-width: 230px; background: #fff; border: 1px solid var(--line); border-top: 0; box-shadow: 0 8px 22px rgba(0,0,0,.14); padding: 6px 0; }
.menu > li:hover .drop { display: block; }
.menu .drop a { display: block; padding: 7px 16px; color: var(--ink); }
.menu .drop a:hover { background: var(--blue-l); text-decoration: none; }
.menu .drop .sep { border-top: 1px solid var(--line2); margin: 5px 0; }
.nav .right { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav .right .menu .drop { left: auto; right: 0; }
.nav .user { color: #dfe4ea; }

/* page */
.wrap { max-width: 1480px; margin: 0 auto; padding: 18px 22px 40px; }
.crumbs { font-size: 12px; color: var(--muted); margin: 0 0 10px; }
.crumbs a { color: var(--muted); }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.layout.full { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 1100px) { .layout { grid-template-columns: minmax(0, 1fr); } }

/* title band */
.band { background: var(--blue); color: #fff; display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-radius: 4px 4px 0 0; min-height: 50px; }
.band h1 { font-size: 18px; font-weight: 600; margin: 0; white-space: nowrap; }
.band .sel { background: #fff; color: var(--ink); border: 0; border-radius: 3px; padding: 6px 10px; width: auto; min-width: 220px; max-width: 340px; flex: 0 0 auto; font: inherit; }
.band .links { margin-left: auto; display: flex; gap: 14px; font-size: 13px; }
.band .links a { color: #e8f1fa; }
.band-tabs { background: #fff; border: 1px solid var(--line); border-top: 0; display: flex; gap: 0; padding: 0 10px; margin-bottom: 16px; }
.band-tabs a { padding: 10px 14px; color: var(--ink); border-bottom: 3px solid transparent; }
.band-tabs a.on { border-bottom-color: var(--blue); color: var(--blue); font-weight: 600; }
.band-tabs a:hover { text-decoration: none; background: #f7f9fb; }
.band + .panel, .band + .toolbar { border-top: 0; border-radius: 0 0 4px 4px; }

/* panels */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 4px; margin-bottom: 16px; }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fafbfc; border-radius: 4px 4px 0 0; }
.panel-head h2 { font-size: 14px; font-weight: 600; margin: 0; }
.panel-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.panel-head.blue { background: var(--blue); color: #fff; border-color: var(--blue2); }
.panel-head.blue a { color: #e8f1fa; }
.panel-body { padding: 14px; }
.panel-body.flush { padding: 0; }
.help .panel-head { background: #fff; }
.help .panel-body { color: #3d4a57; font-size: 13px; }
.help ul { padding-left: 18px; margin: 6px 0; }
.help li { margin: 3px 0; }

/* toolbar & buttons */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-top: 0; margin-bottom: 16px; }
.btn, button { font: inherit; font-weight: 600; font-size: 13px; padding: 7px 13px; border-radius: 3px; border: 1px solid var(--blue2); background: var(--blue); color: #fff; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; line-height: 1.2; }
.btn:hover, button:hover { background: var(--blue2); text-decoration: none; }
.btn.red, button.red { background: var(--red); border-color: #b80500; }
.btn.red:hover, button.red:hover { background: #c00500; }
.btn.green, button.green { background: var(--ok); border-color: #187a42; }
.btn.ghost, button.ghost { background: #fff; color: var(--ink); border-color: #c9d1da; }
.btn.ghost:hover, button.ghost:hover { background: #f3f6f9; }
.btn.sm, button.sm { padding: 4px 9px; font-size: 12px; }
button.link { background: none; border: 0; padding: 0; color: var(--link); font-weight: 400; }
button.link:hover { background: none; text-decoration: underline; }
form.inline { display: inline; }

/* tables */
table { width: 100%; border-collapse: collapse; }
table.data th { text-align: left; font-weight: 600; color: #3d4a57; background: #f6f8fa; border-bottom: 1px solid var(--line); padding: 8px 10px; white-space: nowrap; font-size: 12.5px; }
table.data td { padding: 8px 10px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
table.data tr:hover td { background: #f9fbfd; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; white-space: nowrap; }
table.kv td { padding: 6px 10px; border-bottom: 1px solid var(--line2); }
table.kv td:first-child { color: var(--muted); width: 38%; white-space: nowrap; }
.tbl-foot { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line2); }

/* status */
.ic { display: inline-flex; width: 18px; height: 18px; border-radius: 50%; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; vertical-align: middle; }
.ic.ok { background: var(--ok); } .ic.err { background: var(--err); } .ic.warn { background: var(--warn); } .ic.grey { background: #aab3bd; }
.badge { display: inline-block; padding: 1px 7px; border-radius: 3px; font-size: 11.5px; font-weight: 600; border: 1px solid transparent; white-space: nowrap; }
.b-ok { background: #e6f4ec; color: var(--ok); border-color: #c4e5d1; }
.b-err { background: #fbe9e9; color: var(--err); border-color: #f2c6c5; }
.b-warn { background: #fdf3e3; color: var(--warn); border-color: #f3dcb2; }
.b-grey { background: #eff2f5; color: var(--muted); border-color: #dde3ea; }
.b-blue { background: var(--blue-l); color: var(--blue); border-color: #c8ddf0; }
.bar { height: 7px; background: #e6ebf0; border-radius: 4px; overflow: hidden; width: 120px; margin: 3px 0; }
.bar > span { display: block; height: 100%; background: #2f86d6; }
.bar.ram > span { background: #22a35a; }
.bar.hot > span { background: var(--err); }
.muted { color: var(--muted); } .small { font-size: 12px; }
.mono { font-family: Consolas, "SFMono-Regular", Menlo, monospace; font-size: 12px; }
.nowrap { white-space: nowrap; }
.stats { display: flex; gap: 0; }
.stats > div { flex: 1; padding: 14px 16px; border-right: 1px solid var(--line2); }
.stats > div:last-child { border-right: 0; }
.stats .v { font-size: 24px; font-weight: 700; }
.stats .l { color: var(--muted); font-size: 12px; }
.lvl-error { color: var(--err); font-weight: 600; } .lvl-warn { color: var(--warn); }

/* messages */
.flash { padding: 10px 14px; border-radius: 3px; margin-bottom: 14px; border: 1px solid; }
.flash.ok { background: #e6f4ec; color: #145f35; border-color: #c4e5d1; }
.flash.err { background: #fbe9e9; color: #8e1d1a; border-color: #f2c6c5; }
.flash.info { background: var(--blue-l); color: #174a78; border-color: #c8ddf0; }

/* forms */
label { display: block; font-weight: 600; margin: 10px 0 4px; font-size: 12.5px; color: #3d4a57; }
label.check { font-weight: 400; display: flex; gap: 8px; align-items: center; color: var(--ink); }
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
  font: inherit; padding: 7px 9px; border: 1px solid #c9d1da; border-radius: 3px; background: #fff; width: 100%; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid #b9d5f0; border-color: var(--blue); }
textarea.code { font-family: Consolas, Menlo, monospace; font-size: 12.5px; min-height: 520px; white-space: pre; }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > * { flex: 1 1 200px; }
.formgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 14px; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.breakform { display: inline-flex; gap: 6px; align-items: center; }
.breakform input { width: 76px; padding: 5px 7px; }
.narrow { max-width: 400px; margin: 70px auto; }
pre.snippet { background: #10141a; color: #e5e7eb; padding: 14px; border-radius: 3px; overflow: auto; font-size: 12.5px; }

/* charts */
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: #e6ebf0; stroke-width: 1; }
.chart .axis { fill: #7b8794; font-size: 11px; }
.chart .in { fill: none; stroke: var(--red); stroke-width: 2; }
.chart .in-a { fill: rgba(225,6,0,.08); stroke: none; }
.chart .out { fill: none; stroke: var(--blue); stroke-width: 2; stroke-dasharray: 5 4; }
.legend { display: flex; gap: 18px; justify-content: center; font-size: 12px; color: var(--muted); padding-bottom: 8px; }
.legend i { display: inline-block; width: 18px; height: 3px; vertical-align: middle; margin-right: 6px; }

footer { text-align: center; color: var(--muted); padding: 18px; font-size: 12px; }

/* simple boxes used by forms and smaller pages */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px; margin-bottom: 16px; }
.card h2 { font-size: 14px; font-weight: 600; margin: 0 0 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line2); }
.card h1 { font-size: 18px; margin: 0 0 12px; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 6px 12px; }
.kv > div:nth-child(odd) { color: var(--muted); }
.stat { font-size: 24px; font-weight: 700; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.band + .card, .band-tabs + .card { margin-top: 0; }
.page-actions { display: flex; gap: 8px; justify-content: flex-end; margin: -6px 0 12px; }
details.clients { position: relative; display: inline-block; }
details.clients summary { cursor: pointer; color: var(--blue); }
details.clients > div { text-align: left; position: absolute; right: 0; top: 1.5em; min-width: 260px; white-space: nowrap; z-index: 5; background: #fff; border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(0,0,0,.12); padding: 8px 10px; border-radius: 4px; max-height: 260px; overflow: auto; }/* Create menu (green, like WMSPanel) */
.menu li.create > a { background: #2ea44f; color: #fff !important; }
.menu li.create > a:hover { background: #27903f; }
/* Live streams settings: vertical tabs */
.band-sub { font-size: 12px; font-weight: 600; opacity: .85; margin-left: 8px; text-transform: uppercase; letter-spacing: .3px; }
.band .sel + h1 { margin-left: 4px; }
.panel.settings { border-top: 0; border-radius: 0 0 4px 4px; }
.crumbs { padding: 10px 16px; border-bottom: 1px solid var(--line2); font-size: 13px; }
.settings-body { display: flex; gap: 0; align-items: stretch; }
.vtabs { flex: 0 0 190px; border-right: 1px solid var(--line2); padding: 12px 0; }
.vtabs a { display: block; padding: 8px 16px; color: var(--ink); font-size: 13px; }
.vtabs a small { display: block; color: var(--muted); font-size: 10.5px; }
.vtabs a.on { background: var(--blue); color: #fff; }
.vtabs a.on small { color: #d8e8f7; }
.vtabs a:hover:not(.on) { background: #f3f6f9; text-decoration: none; }
.vtabs .sep { border-top: 1px solid var(--line2); margin: 8px 0; }
.settings-main { flex: 1; min-width: 0; padding: 14px 16px; overflow-x: auto; }
.btnbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
td.acts { white-space: nowrap; text-align: right; }
td.acts a { text-decoration: none; margin-right: 6px; }
button.link.del { font-size: 13px; }
/* SRT statistics */
.srtstats th { font-size: 11.5px; white-space: normal; vertical-align: bottom; }
.srtstats tr.grp th { border-bottom: 0; padding-bottom: 0; }
/* reports */
.chart rect.bar { fill: #5b7fa6; }
.pie { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; justify-content: center; }
.pie-legend { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.pie-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.replinks { margin-left: auto; }
a.b { font-weight: 700; text-decoration: underline; }
tr.total td { background: #f6f8fa; }
.bar.share { display: inline-block; width: 70%; vertical-align: middle; margin-right: 6px; }
