/* BoomReach Bridge — стили панели.
 *
 * Всё оформление живёт здесь и только здесь: политика безопасности запрещает
 * inline-стили (style-src 'self'), поэтому ни <style> в шаблоне, ни атрибут
 * style="..." браузером не применятся. Нужен новый размер колонки — заводим
 * класс тут, а не пишем style в разметке.
 */

:root {
  --text: #37352f;
  --text-2: #787774;
  --text-3: #9b9a97;
  --line: #e9e9e7;
  --line-2: #f1f1ef;
  --bg: #ffffff;
  --bg-side: #fbfbfa;
  --bg-hover: #f5f5f4;
  --bg-sunken: #f7f7f5;
  --accent: #2383e2;
  --green: #0f7b3f;
  --red: #c0392b;
  --amber: #b26100;
  --radius: 6px;
  --side-w: 240px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter,
               Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { margin: 0; font-weight: 600; }

/* ---------- боковое меню ---------- */

.side {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--side-w);
  background: var(--bg-side);
  border-right: 1px solid var(--line);
  padding: 14px 8px;
  overflow-y: auto;
}

.side .brand {
  display: block;
  padding: 6px 10px 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.side .brand:hover { text-decoration: none; }

.side .group {
  padding: 14px 10px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-3);
}

.side .item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 10px;
  margin-bottom: 1px;
  border-radius: var(--radius);
  color: var(--text-2);
  font-size: 14px;
}
.side .item:hover { background: var(--bg-hover); text-decoration: none; color: var(--text); }
.side .item.active { background: var(--bg-hover); color: var(--text); font-weight: 500; }
.side .item span:first-child {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.side .foot { margin-top: 18px; padding: 8px 10px; border-top: 1px solid var(--line); }
.side .foot a { color: var(--text-3); font-size: 13px; }

/* ---------- страница ---------- */

.content {
  margin-left: var(--side-w);
  padding: 40px 48px 80px;
  max-width: 1060px;
}

.page-head { margin-bottom: 26px; }
.page-head h1 { font-size: 26px; letter-spacing: -.01em; margin-bottom: 5px; }
.page-head p { margin: 0; color: var(--text-2); font-size: 14px; }
.page-head .back { display: inline-block; margin-bottom: 10px; font-size: 13px; color: var(--text-2); }

.head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }

/* ---------- панели ---------- */

.panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  margin-bottom: 18px;
  overflow: hidden;
}
.panel > h2 {
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  border-bottom: 1px solid var(--line-2);
}
.panel .body { padding: 18px; }
.panel .body > :last-child { margin-bottom: 0; }
.panel .body.tight { padding: 6px 18px 14px; }

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

.table-wrap { overflow-x: auto; }

table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.table th {
  padding: 9px 18px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-3);
  border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
}
table.table td {
  padding: 11px 18px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: top;
}
table.table tbody tr:last-child td { border-bottom: 0; }
table.table tbody tr:hover { background: #fcfcfb; }
table.table td.tight { padding-top: 8px; padding-bottom: 8px; }

.col-when { width: 160px; }
.col-status { width: 130px; }
.col-auto { width: 150px; }
.col-dur { width: 90px; }
.col-name { width: 240px; }
.col-value { width: 300px; }
.col-source { width: 110px; }
.col-actions { width: 130px; }

/* ---------- строки со списком действий ---------- */

.row-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 0;
  border-top: 1px solid var(--line-2);
}
.row-line:first-child { border-top: 0; padding-top: 4px; }
.row-line:last-child { padding-bottom: 4px; }
.row-line .grow { flex: 1 1 auto; min-width: 0; }

/* ---------- статусы и метки ---------- */

.dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: 1px;
}
.dot.created, .dot.on { background: var(--green); }
.dot.check { background: var(--accent); }
.dot.updated { background: var(--accent); }
.dot.skipped, .dot.off { background: var(--text-3); }
.dot.duplicate { background: var(--amber); }
.dot.error { background: var(--red); }

.st { white-space: nowrap; font-size: 13px; color: var(--text-2); }
.st.error { color: var(--red); }

.tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 20px;
  background: var(--bg-sunken);
  color: var(--text-2);
  font-size: 12px;
  white-space: nowrap;
}
.tag.ok { background: #eaf6ee; color: var(--green); }
.tag.warn { background: #fdf3e7; color: var(--amber); }
.tag.err { background: #fdeeec; color: var(--red); }

/* ---------- кнопки ---------- */

.btn {
  display: inline-block;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s ease, border-color .12s ease;
}
.btn:hover { background: var(--bg-hover); text-decoration: none; }
.btn:active { background: #eeeeec; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #1b74cc; }
.btn.danger { color: var(--red); }
.btn.danger:hover { background: #fdeeec; border-color: #f3cfca; }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.link {
  border: 0; background: none; color: var(--accent); padding: 0; font-size: 13px;
}
.btn.link:hover { background: none; text-decoration: underline; }

/* ---------- формы ---------- */

label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 4px; }

input[type="text"], input[type="password"], select {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--bg-sunken);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}
input:focus, select:focus {
  outline: none;
  background: var(--bg);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(35, 131, 226, .12);
}
select { width: auto; min-width: 170px; }

.filters { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; }

/* ---------- вкладки ---------- */

.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.tabs button {
  border: 0; background: none; padding: 9px 0; margin-bottom: -1px;
  font-family: inherit; font-size: 14px; color: var(--text-2); cursor: pointer;
  border-bottom: 2px solid transparent;
}
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--text); font-weight: 500; border-bottom-color: var(--text); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ---------- метрики ---------- */

.metrics { display: flex; flex-wrap: wrap; gap: 34px; }
.metrics .k { display: block; font-size: 12px; color: var(--text-3); margin-bottom: 2px; }
.metrics .v { display: block; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.metrics .v.small { font-size: 14px; font-weight: 500; }
.metrics .v.bad { color: var(--red); }

/* ---------- текст ---------- */

.muted { color: var(--text-2); }
.small { font-size: 13px; }
.mono, code, pre {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}
.mono { font-size: 13px; }
code {
  background: var(--bg-sunken); color: #b8446b;
  padding: 1px 5px; border-radius: 4px; font-size: .875em;
}
pre {
  margin: 0; padding: 14px 16px;
  background: #f7f7f5; color: #37352f;
  border: 1px solid var(--line-2); border-radius: 8px;
  font-size: 12.5px; line-height: 1.55; overflow-x: auto;
}
pre code { background: none; color: inherit; padding: 0; }

ol.steps, ul.steps { margin: 0; padding-left: 20px; }
ol.steps li, ul.steps li { margin-bottom: 7px; }
ol.steps li:last-child, ul.steps li:last-child { margin-bottom: 0; }

.notice {
  padding: 12px 16px; border-radius: 8px; background: var(--bg-sunken);
  font-size: 14px; margin-bottom: 18px;
}
.notice.warn { background: #fdf3e7; color: #7a4a08; }
.notice.err { background: #fdeeec; color: #8f2c20; }

.nowrap { white-space: nowrap; }
.right { text-align: right; }
.inline { display: inline; }
.hidden { display: none; }
.mt { margin-top: 26px; }
.mb { margin-bottom: 14px; }
.stack { display: flex; gap: 8px; align-items: center; }

/* ---------- вход ---------- */

.login-wrap {
  max-width: 340px; margin: 0 auto; padding: 16vh 20px 0;
}
.login-wrap h1 { font-size: 20px; text-align: center; margin-bottom: 4px; }
.login-wrap .sub { text-align: center; color: var(--text-2); font-size: 14px; margin: 0 0 24px; }
.login-wrap .field { margin-bottom: 14px; }
.login-wrap .btn { width: 100%; text-align: center; margin-top: 6px; }
