/* Аудиобрендинг МТС -- оформление кабинета.
 *
 * Два цвета делят работу: синий держит навигацию и структуру, оранжевый
 * достаётся только тому, что требует действия или внимания оператора.
 * Если оранжевым выделить всё, он перестаёт значить что-либо, а
 * дежурный по сети из 601 магазина смотрит на экран именно в поисках
 * того, что сломалось.
 */

:root {
  --blue-900: #0d2b4e;
  --blue-800: #123a68;
  --blue-700: #17497f;
  --blue-600: #1e5aa8;
  --blue-500: #2a72cc;
  --blue-100: #e3edf9;
  --blue-50:  #f2f7fd;

  --orange-700: #c25a0a;
  --orange-600: #e26c0d;
  --orange-500: #f07a1a;
  --orange-100: #fdeedd;

  --ink:      #16202e;
  --ink-soft: #5a6b80;
  --line:     #d7e0ea;
  --surface:  #ffffff;
  --canvas:   #f5f8fc;

  --green-600: #0a7d42;
  --green-100: #e2f4ea;
  --red-600:   #c2283a;
  --red-100:   #fbe6e8;
  --grey-100:  #eef1f5;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(13, 43, 78, .06), 0 4px 16px rgba(13, 43, 78, .06);
  --shadow-sm: 0 1px 2px rgba(13, 43, 78, .08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:      #e8eef6;
    --ink-soft: #9aabc0;
    --line:     #26374d;
    --surface:  #141d29;
    --canvas:   #0c141e;
    --blue-100: #1b2f49;
    --blue-50:  #16263b;
    --orange-100: #3a2410;
    --green-100: #13301f;
    --red-100:   #3a1a1e;
    --grey-100:  #1b2735;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 16px rgba(0, 0, 0, .3);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", sans-serif;
}

a { color: var(--blue-600); text-decoration: none; }
a:hover { text-decoration: underline; }
@media (prefers-color-scheme: dark) { a { color: var(--blue-500); } }

/* ---------- Шапка ---------- */

.top {
  background: linear-gradient(135deg, var(--blue-800), var(--blue-600));
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.top__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 56px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 650;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }

.brand__mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--orange-500);
  display: grid;
  place-items: center;
  font-size: 15px;
  line-height: 1;
}

.nav { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; }

.nav a {
  color: rgba(255, 255, 255, .82);
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  white-space: nowrap;
}
.nav a:hover { background: rgba(255, 255, 255, .12); color: #fff; text-decoration: none; }

.nav a[aria-current="page"] {
  background: rgba(255, 255, 255, .16);
  color: #fff;
  box-shadow: inset 0 -2px 0 var(--orange-500);
}

.top__exit { color: rgba(255, 255, 255, .72); font-size: 14px; white-space: nowrap; }
.top__exit:hover { color: #fff; }

/* ---------- Каркас страницы ---------- */

main { max-width: 1280px; margin: 0 auto; padding: 24px; }

.crumbs {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--ink-soft);
  font-size: 13px;
  margin-bottom: 14px;
}
.crumbs span::after { content: "/"; margin-left: 8px; color: var(--line); }
.crumbs span:last-child::after { content: ""; }

h1 {
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -.02em;
  margin: 0 0 4px;
}

h2 {
  font-size: 17px;
  letter-spacing: -.01em;
  margin: 28px 0 12px;
}

.lede { color: var(--ink-soft); margin: 0 0 20px; }

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

/* ---------- Карточки ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
  margin-bottom: 18px;
}

.card > h2:first-child { margin-top: 0; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

/* ---------- Плитки сводки ---------- */

.tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue-600);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px 18px;
  display: block;
  color: inherit;
}
.tile:hover {
  text-decoration: none;
  border-color: var(--blue-500);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
  transition: all .12s ease;
}

.tile--alert { border-left-color: var(--orange-500); }

.tile__label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink-soft);
  font-weight: 600;
}

.tile__value {
  font-size: 30px;
  font-weight: 680;
  letter-spacing: -.03em;
  line-height: 1.1;
  margin-top: 6px;
}

.tile--alert .tile__value { color: var(--orange-600); }

.tile__hint { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }

/* ---------- Таблицы ---------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

table { border-collapse: collapse; width: 100%; font-size: 14px; }

th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink-soft);
  font-weight: 600;
  padding: 11px 14px;
  background: var(--blue-50);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

td { padding: 11px 14px; border-bottom: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--blue-50); }

td.num { text-align: right; font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.muted { color: var(--ink-soft); }

/* ---------- Бейджи статусов ---------- */

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.badge.online  { background: var(--green-100); color: var(--green-600); }
.badge.offline { background: var(--orange-100); color: var(--orange-700); }
.badge.silent  { background: var(--red-100); color: var(--red-600); }
.badge.revoked { background: var(--red-100); color: var(--red-600); }
.badge.pending { background: var(--grey-100); color: var(--ink-soft); }
.badge.empty   { background: var(--grey-100); color: var(--ink-soft); }
.badge.draft   { background: var(--orange-100); color: var(--orange-700); }
.badge.live    { background: var(--green-100); color: var(--green-600); }

/* ---------- Формы и кнопки ---------- */

input[type="text"], input[type="search"], input[type="password"],
input[type="number"], input[type="time"], input[type="date"],
input:not([type]), select, textarea {
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 11px;
  min-width: 0;
}

input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--blue-500);
  outline-offset: -1px;
  border-color: var(--blue-500);
}

button, .button {
  font: inherit;
  font-weight: 560;
  cursor: pointer;
  border: 1px solid var(--blue-600);
  background: var(--blue-600);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 8px 15px;
  white-space: nowrap;
}
button:hover, .button:hover { background: var(--blue-700); border-color: var(--blue-700); text-decoration: none; }

button.secondary, .button.secondary {
  background: var(--surface);
  color: var(--blue-600);
  border-color: var(--line);
}
button.secondary:hover, .button.secondary:hover { background: var(--blue-50); border-color: var(--blue-500); }

/* Оранжевый -- только необратимое и требующее решения. */
button.accent, .button.accent {
  background: var(--orange-500);
  border-color: var(--orange-500);
}
button.accent:hover, .button.accent:hover { background: var(--orange-600); border-color: var(--orange-600); }

button.danger, .button.danger {
  background: var(--surface);
  color: var(--red-600);
  border-color: var(--line);
}
button.danger:hover, .button.danger:hover { background: var(--red-100); border-color: var(--red-600); }

button.link {
  background: none;
  border: none;
  color: var(--blue-600);
  padding: 0;
  font-weight: 500;
}
button.link:hover { background: none; text-decoration: underline; }
button.link.danger { color: var(--red-600); }

.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.toolbar--end { justify-content: flex-end; }

/* ---------- Прочее ---------- */

.notice {
  border-left: 3px solid var(--blue-600);
  background: var(--blue-50);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.notice.warn { border-left-color: var(--orange-500); background: var(--orange-100); }
.notice.bad  { border-left-color: var(--red-600); background: var(--red-100); }

.empty-state {
  text-align: center;
  padding: 44px 20px;
  color: var(--ink-soft);
}

.chips { display: flex; gap: 6px; flex-wrap: wrap; }

.chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--blue-700);
  font-size: 13px;
}
.chip:hover { background: var(--blue-500); color: #fff; text-decoration: none; }

.dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; }
.dl dt { color: var(--ink-soft); font-size: 14px; }
.dl dd { margin: 0; }

.login {
  max-width: 360px;
  margin: 12vh auto;
  padding: 0 20px;
}

.login .card { padding: 26px; }
.login input { width: 100%; margin-bottom: 12px; }
.login button { width: 100%; }

footer {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 36px;
  color: var(--ink-soft);
  font-size: 13px;
}

/* ---------- Расписание ---------- */

/* Две широкие колонки: черновик и эфир рядом, чтобы разницу было
   видно не листая страницу. */
.grid--wide { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }

.block {
  border: 1px solid var(--line);
  border-left: 3px solid var(--orange-500);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 12px;
  background: var(--blue-50);
}

.block__head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.block__ads { margin: 0 0 10px; padding-left: 22px; }

.block__ads li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 0;
}

/* ---------- Мелочи ---------- */

.right { text-align: right; }
.bad { color: var(--red-600); }
.narrow { width: 5em; }

@media (max-width: 640px) {
  .top__inner { padding: 8px 16px; }
  main { padding: 16px; }
  h1 { font-size: 22px; }
}
