/* OPTOMIR — светлая панель: боковое меню, белые карточки, тонкие разделители.
   Основной текст — тёмно-серый, акцент — rgb(86, 136, 199). */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/inter-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/inter-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/inter-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/inter-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/inter-cyrillic-500-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/inter-cyrillic-600-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/inter-cyrillic-700-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
:root {
  --text: #3b4049;            /* основной тёмно-серый */
  --text-strong: #2b2f36;     /* заголовки */
  --muted: #7b828d;
  --faint: #a3a9b2;
  --bg: #ffffff;
  --side: #f7f8fa;
  --head: #f6f7f9;            /* шапки таблиц, подложки */
  --line: #e9ebef;
  --line-strong: #dfe2e7;
  --accent: rgb(86, 136, 199);
  --accent-hover: rgb(72, 120, 182);
  --accent-soft: rgb(235, 242, 250);
  --accent-ink: #ffffff;
  --ok: #2f9e62; --ok-bg: #e9f7ef;
  --warn: #b7791f; --warn-bg: #fdf5e6;
  --err: #d14b4b; --err-bg: #fdeeee;
  --violet: #8a63d2; --violet-bg: #f3effc;
  --code-bg: #1f2329; --code-ink: #d9dde3;
  --radius: 12px; --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04);
  --side-w: 236px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1 { font-size: 20px; font-weight: 600; color: var(--text-strong); margin: 0; }
h2 { font-size: 15px; font-weight: 600; color: var(--text-strong); margin: 0 0 4px; }
h3 { font-size: 14px; font-weight: 600; color: var(--text-strong); margin: 16px 0 8px; }
b, strong { font-weight: 600; color: var(--text-strong); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------ каркас */
.app { display: flex; min-height: 100vh; background: linear-gradient(to right, var(--side) var(--side-w), var(--bg) var(--side-w)); }
.body { background: var(--bg); }
.side { width: var(--side-w); flex: none; background: var(--side); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 16px 12px; }
.org { display: flex; align-items: center; gap: 10px; padding: 4px 6px 18px; color: var(--text-strong); }
.org:hover { color: var(--text-strong); }
.logo { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; display: grid;
  place-items: center; font-weight: 700; font-size: 15px; flex: none; }
.org .t b { display: block; font-size: 14px; line-height: 1.2; }
.org .t span { display: block; font-size: 12px; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: var(--radius-sm);
  color: var(--text); font-weight: 500; }
.nav a:hover { background: #eef0f3; color: var(--text-strong); }
.nav a.on { background: var(--bg); color: var(--text-strong); box-shadow: 0 1px 2px rgba(16, 24, 40, .06); }
.nav a.on svg.i { color: var(--accent); }
.nav .cnt { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--err);
  color: #fff; font-size: 11.5px; font-weight: 600; display: grid; place-items: center; }
.nav-title { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); padding: 18px 10px 6px; }
.side-bottom { margin-top: auto; }
.side-bottom form { margin: 0; }
.side-bottom button { width: 100%; display: flex; align-items: center; gap: 11px; padding: 8px 10px; border: 0;
  background: none; border-radius: var(--radius-sm); color: var(--text); font-weight: 500; text-align: left; }
.side-bottom button:hover { background: #eef0f3; }

.body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 60px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px;
  padding: 0 28px; position: sticky; top: 0; background: rgba(255, 255, 255, .92); backdrop-filter: blur(6px); z-index: 5; }
.crumbs { color: var(--muted); font-size: 13px; }
.crumbs b { color: var(--text-strong); font-weight: 500; }
.me { margin-left: auto; display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: 999px;
  color: var(--text-strong); }
.me:hover { background: var(--head); color: var(--text-strong); }
.ava { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid;
  place-items: center; font-weight: 600; font-size: 13px; flex: none; }
.me .t b { display: block; font-size: 13.5px; line-height: 1.2; }
.me .t span { display: block; font-size: 11.5px; color: var(--muted); }
.burger { display: none; border: 0; background: none; padding: 6px; color: var(--text); }
main { padding: 24px 28px 64px; max-width: 1240px; width: 100%; }

/* ------------------------------------------------------------ заголовок страницы */
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head .back { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid;
  place-items: center; color: var(--text); }
.page-head .back:hover { background: var(--head); }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.page-sub { color: var(--muted); margin: -12px 0 20px; font-size: 13px; }

/* ------------------------------------------------------------ блоки */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow); min-width: 0; }
.card + .card { margin-top: 16px; }
.grid .card + .card { margin-top: 0; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head .sub { color: var(--muted); font-size: 12.5px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.section { padding: 18px 0; border-top: 1px solid var(--line); }
.section:first-child { border-top: 0; padding-top: 4px; }

.flash { padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 12px; background: var(--ok-bg); color: var(--ok);
  border: 1px solid rgba(47, 158, 98, .15); }
.flash.err { background: var(--err-bg); color: var(--err); border-color: rgba(209, 75, 75, .15); }

/* ------------------------------------------------------------ метки статусов */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px;
  font-weight: 500; white-space: nowrap; line-height: 20px; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.s-ok, .p-published { background: var(--ok-bg); color: var(--ok); }
.s-warn, .p-held, .p-pending { background: var(--warn-bg); color: var(--warn); }
.s-stop, .s-error, .p-failed, .p-blocked { background: var(--err-bg); color: var(--err); }
.s-queued, .s-running, .p-publishing { background: var(--accent-soft); color: var(--accent); }
.p-rejected, .p-superseded, .p-none { background: var(--head); color: var(--muted); }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 500;
  background: var(--accent-soft); color: var(--accent); }
.tag.violet { background: var(--violet-bg); color: var(--violet); }

/* ------------------------------------------------------------ таблицы */
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12.5px; color: var(--muted); font-weight: 500; background: var(--head); border-bottom: 0; }
th:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
th:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td, table.hover tr:hover td { background: #fafbfc; }
td { overflow-wrap: break-word; }
td a, .kv dd a { overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; }
.t-title { font-weight: 500; color: var(--text-strong); }
.t-title:hover { color: var(--accent); }

/* ------------------------------------------------------------ кнопки и поля */
button, .btn { font: inherit; font-weight: 500; cursor: pointer; border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: var(--bg); color: var(--text-strong); padding: 7px 14px; display: inline-flex; align-items: center; gap: 7px;
  line-height: 1.35; }
button:hover, .btn:hover { background: var(--head); color: var(--text-strong); }
.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.outline { border-color: var(--accent); color: var(--accent); }
.outline:hover { background: var(--accent-soft); color: var(--accent); }
.danger { color: var(--err); }
.warnbtn { background: var(--warn-bg); color: var(--warn); border-color: rgba(183, 121, 31, .45); }
.warnbtn:hover { background: #fbecd0; color: var(--warn); }
.linkbtn { border: 0; background: none; color: var(--accent); padding: 0; }
.linkbtn:hover { background: none; color: var(--accent-hover); }
button:disabled { opacity: .6; cursor: default; }
form.inline { display: inline; margin: 0; }

label { display: block; font-size: 13px; font-weight: 500; color: var(--text-strong); margin: 14px 0 6px; }
.help { font-size: 12.5px; color: var(--muted); margin-top: 4px; font-weight: 400; }
input[type=text], input[type=password], input[type=number], input[type=time], select, textarea {
  font: inherit; width: 100%; padding: 8px 11px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: var(--bg); color: var(--text-strong); outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { min-height: 90px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; accent-color: var(--accent); vertical-align: -3px; margin: 0; }
.check { display: flex; gap: 9px; align-items: center; font-weight: 500; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { padding: 0; }

/* настройки в два столбца: слева название и пояснение, справа поле */
.setrow { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 1.4fr); gap: 8px 32px; padding: 16px 0;
  border-top: 1px solid var(--line); align-items: start; }
.setrow:first-of-type { border-top: 0; }
.setrow .lbl { font-weight: 500; color: var(--text-strong); }
.setrow .lbl .help { margin-top: 2px; }
.setrow label { margin: 0; }
.setgroup { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); padding: 18px 0 2px;
  border-top: 1px solid var(--line); }
.setgroup:first-child { border-top: 0; padding-top: 0; }

/* ------------------------------------------------------------ прочее */
pre.log { background: var(--code-bg); color: var(--code-ink); padding: 14px; border-radius: var(--radius-sm); overflow: auto;
  max-height: 520px; font: 12px/1.5 ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-word; margin: 0; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 18px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; color: var(--text-strong); overflow-wrap: anywhere; min-width: 0; }
.holds { background: var(--warn-bg); color: var(--warn); border-radius: var(--radius-sm); padding: 10px 14px; margin: 12px 0;
  border: 1px solid rgba(183, 121, 31, .18); }
.holds ul { margin: 6px 0 0; padding-left: 20px; }
.drop { border: 1.5px dashed var(--line-strong); border-radius: var(--radius); padding: 30px 20px; text-align: center; background: var(--side); }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop .ic { width: 44px; height: 44px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid;
  place-items: center; margin: 0 auto 10px; }
.drop input[type=file] { margin: 14px auto 0; display: block; max-width: 100%; }
.job { border-top: 1px solid var(--line); padding: 12px 0; }
.job:first-of-type { border-top: 0; }
.days { display: flex; flex-wrap: wrap; gap: 6px; }
.days label { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 5px 10px; border: 1px solid var(--line-strong);
  border-radius: 999px; font-weight: 500; cursor: pointer; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat .v { font-size: 22px; font-weight: 600; color: var(--text-strong); }
.stat .l { font-size: 12.5px; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stats .card { padding: 14px 16px; }
.stats .card + .card { margin-top: 0; }
.person { display: flex; align-items: center; gap: 10px; }
.person .ava { width: 30px; height: 30px; font-size: 12px; }
.person .t b, .person > b { display: block; font-weight: 500; line-height: 1.25; }
.person .t span { display: block; font-size: 12px; color: var(--muted); }
details.edit > summary { list-style: none; cursor: pointer; color: var(--accent); font-weight: 500; }
details.edit > summary::-webkit-details-marker { display: none; }

/* вход */
.auth { min-height: 100vh; display: grid; place-items: center; background: var(--side); padding: 16px; }
.auth .card { width: 100%; max-width: 380px; padding: 28px; }
.auth .org { padding: 0 0 18px; }

/* ------------------------------------------------------------ телефон */
@media (max-width: 900px) {
  .side { position: fixed; left: 0; top: 0; z-index: 20; transform: translateX(-100%); transition: transform .2s;
    box-shadow: 0 10px 30px rgba(16, 24, 40, .15); }
  body.menu-open .side { transform: none; }
  body.menu-open .veil { display: block; }
  .veil { display: none; position: fixed; inset: 0; background: rgba(16, 24, 40, .25); z-index: 15; }
  .burger { display: inline-flex; }
  .topbar { padding: 0 16px; }
  main { padding: 18px 16px 56px; }
  .me .t span { display: none; }
}
@media (max-width: 640px) {
  .setrow { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .kv dt { margin-top: 8px; }
  th.hide-sm, td.hide-sm { display: none; }
  td .pill { white-space: normal; }
  td.num { width: 1%; }
  .me .t { display: none; }
  .card { padding: 16px; }
  h1 { font-size: 18px; }
}
