@font-face { font-family: "Golos"; src: url("../fonts/golos-text-cyrillic-400-normal.woff2") format("woff2"); font-weight: 400; unicode-range: U+0400-045F,U+2116; font-display: swap; }
@font-face { font-family: "Golos"; src: url("../fonts/golos-text-latin-400-normal.woff2") format("woff2"); font-weight: 400; unicode-range: U+0000-00FF,U+2000-206F; font-display: swap; }
@font-face { font-family: "Golos"; src: url("../fonts/golos-text-cyrillic-600-normal.woff2") format("woff2"); font-weight: 600; unicode-range: U+0400-045F,U+2116; font-display: swap; }
@font-face { font-family: "Golos"; src: url("../fonts/golos-text-latin-600-normal.woff2") format("woff2"); font-weight: 600; unicode-range: U+0000-00FF,U+2000-206F; font-display: swap; }
@font-face { font-family: "Sign"; src: url("../fonts/pt-sans-narrow-cyrillic-700-normal.woff2") format("woff2"); font-weight: 700; unicode-range: U+0400-045F; }
@font-face { font-family: "Sign"; src: url("../fonts/pt-sans-narrow-latin-700-normal.woff2") format("woff2"); font-weight: 700; unicode-range: U+0000-00FF,U+2000-206F; }

:root { --sign: #1d5aa6; --sign-deep: #12407a; --wash: #e8f0fa; --plate: #f7c600; --ink: #18222d; --ink-2: #4a5662; --ink-3: #75808b; --line: #dce2e8; --bg: #f3f5f8; --ok: #2d6a3e; --danger: #b3261e; }
* { box-sizing: border-box; }
body { margin: 0; font: 400 15px/1.5 "Golos", system-ui, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--sign); }
h1, h2 { margin: 0; line-height: 1.25; }
h2 { font-size: 1.1rem; margin-bottom: .8rem; display: flex; align-items: center; gap: .5rem; }
.ic { width: 1.2em; height: 1.2em; flex: none; }
.muted { color: var(--ink-3); }
.mt { margin-top: 1.5rem; }
.nowrap { white-space: nowrap; }
.narrow { max-width: 520px; }
:focus-visible { outline: 3px solid var(--plate); outline-offset: 1px; }

.plate { display: inline-flex; background: var(--sign); color: #fff; padding: 3px; border-radius: 7px; font: 700 1.05rem/1 "Sign", "Arial Narrow", sans-serif; }
.plate span { border: 1.5px solid #fff; border-radius: 5px; padding: .3em .5em; white-space: nowrap; }
.plate--big { font-size: 1.6rem; padding: 5px; border-radius: 10px; }
.plate--big span { border-width: 2.5px; border-radius: 7px; }

/* Боковое меню */
.side { position: fixed; inset: 0 auto 0 0; width: 240px; background: #0f1923; color: #c6d0da; display: flex; flex-direction: column; z-index: 20; }
.side__brand { align-items: flex-start; display: flex; flex-direction: column; gap: 6px; padding: 20px 18px 16px; text-decoration: none; color: #8d9aa7; font-size: .8rem; }
.side nav { flex: 1; overflow-y: auto; }
.side ul { list-style: none; margin: 0; padding: 4px 10px; }
.side nav a { display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem; border-radius: 6px; color: #c6d0da; text-decoration: none; }
.side nav a:hover { background: #1b2835; color: #fff; }
.side nav a[aria-current] { background: var(--sign); color: #fff; }
.side nav a span { flex: 1; }
.side nav em { font-style: normal; background: var(--plate); color: #2b2300; font-weight: 600; font-size: .75rem; padding: 0 .45em; border-radius: 99px; }
.side__foot { padding: 12px 10px 16px; border-top: 1px solid #1f2c39; }
.side__foot a { display: flex; gap: .6rem; align-items: center; padding: .45rem .7rem; color: #9aa7b4; text-decoration: none; font-size: .9rem; }
.side__foot a:hover { color: #fff; }

.main { margin-left: 240px; min-height: 100vh; }
.top { display: flex; align-items: center; gap: 1rem; padding: 18px 32px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.top h1 { font-size: 1.35rem; flex: 1; }
.top__act { display: flex; gap: .5rem; flex-wrap: wrap; }
.menu-btn { display: none; border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: .4rem; }
.content { padding: 24px 32px 80px; max-width: 1280px; }
@media (max-width: 900px) {
  .side { transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.4); }
  .main { margin-left: 0; }
  .menu-btn { display: flex; }
  .top { padding: 12px 16px; }
  .content { padding: 16px 16px 80px; }
}

/* Кнопки */
.btn { display: inline-flex; align-items: center; gap: .45rem; padding: .6rem 1.1rem; border-radius: 6px; border: 1px solid var(--sign); background: var(--sign); color: #fff; font: 600 .95rem/1.2 inherit; font-family: inherit; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--sign-deep); }
.btn--ghost { background: #fff; color: var(--sign); border-color: var(--line); }
.btn--ghost:hover { background: var(--wash); border-color: var(--sign); }
.btn--sm { padding: .4rem .8rem; font-size: .88rem; }
.btn--danger { background: #fff; color: var(--danger); border-color: #e6b8b4; }
.btn--danger:hover { background: #fdecea; }
.ibtn { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 6px; border: 0; background: none; color: var(--ink-2); cursor: pointer; text-decoration: none; }
.ibtn:hover { background: var(--wash); color: var(--sign); }
.ibtn--danger:hover { background: #fdecea; color: var(--danger); }
.inline { display: inline; }

.flash { padding: .8rem 1rem; border-radius: 6px; margin-bottom: 1rem; background: #e7f2ea; color: #17452a; border-left: 4px solid var(--ok); }
.flash--err { background: #fdecea; color: #7a1c15; border-left-color: var(--danger); }

/* Карточки и сетки */
.card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px; margin-bottom: 16px; }
.cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
@media (max-width: 1000px) { .cols { grid-template-columns: 1fr; } }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.quick a { display: flex; flex-direction: column; gap: .2rem; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); }
.quick a:hover { border-color: var(--sign); background: var(--wash); }
.quick .ic { width: 1.8rem; height: 1.8rem; color: var(--sign); margin-bottom: .4rem; }
.quick span { color: var(--ink-3); font-size: .88rem; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stats a { padding: 14px 18px; background: #fff; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink-2); display: flex; align-items: baseline; gap: .6rem; }
.stats b { font-size: 1.8rem; color: var(--ink); }
.stats .is-hot { border-color: var(--plate); background: #fffbe6; }
@media (max-width: 1000px) { .quick, .stats { grid-template-columns: 1fr 1fr; } }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: .55rem 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; }
.list li a { text-decoration: none; color: var(--ink); display: block; }

/* Таблицы */
.tbl { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.tbl th { text-align: left; font-weight: 600; font-size: .82rem; color: var(--ink-3); padding: .7rem .8rem; background: #fafbfc; border-bottom: 1px solid var(--line); }
.tbl td { padding: .65rem .8rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: #fafcff; }
.tbl a { text-decoration: none; }
.tbl a b { color: var(--ink); font-weight: 500; }
.tbl a:hover b { color: var(--sign); text-decoration: underline; }
.tbl .acts { text-align: right; white-space: nowrap; }
.tbl .cb { width: 2.2rem; }
.tbl tr.is-off td { color: var(--ink-3); }
.tbl--form input, .tbl--form select, .tbl--form textarea { width: 100%; font: inherit; padding: .45rem .55rem; border: 1px solid var(--line); border-radius: 5px; background: #fff; }
.tbl--form td { vertical-align: top; }
.new-row td { background: #f8fbf8; }
@media (max-width: 760px) { .tbl { display: block; overflow-x: auto; } }

.pill { display: inline-block; font-size: .74rem; font-weight: 600; padding: .1rem .5rem; border-radius: 99px; background: #eef1f4; color: var(--ink-2); white-space: nowrap; }
.pill--new { background: var(--plate); color: #2b2300; }
.pill--work { background: var(--wash); color: var(--sign-deep); }
.pill--done { background: #e7f2ea; color: #17452a; }
.pill--off { background: #eef1f4; color: var(--ink-3); }

.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
.tabs a { padding: .4rem .8rem; border-radius: 6px; text-decoration: none; color: var(--ink-2); background: #fff; border: 1px solid var(--line); font-size: .9rem; }
.tabs a em { font-style: normal; color: var(--ink-3); margin-left: .2rem; }
.tabs a[aria-current] { background: var(--ink); color: #fff; border-color: var(--ink); }
.tabs a[aria-current] em { color: #aab6c2; }
.toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 12px; }
.toolbar form { display: flex; gap: .5rem; }
.toolbar input[type=search], .toolbar select { font: inherit; padding: .45rem .7rem; border: 1px solid var(--line); border-radius: 6px; min-width: 240px; background: #fff; }
.bulkbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .6rem .8rem; background: var(--ink); color: #fff; border-radius: 8px; margin-bottom: 8px; position: sticky; top: 70px; z-index: 5; }
.bulkbar select { font: inherit; padding: .35rem; border-radius: 5px; border: 0; }
.empty { padding: 2rem; text-align: center; color: var(--ink-3); background: #fff; border: 1px dashed var(--line); border-radius: 10px; }

/* Формы */
.form { display: flex; flex-direction: column; gap: 14px; }
.fld { display: flex; flex-direction: column; gap: .3rem; }
.fld > span { font-weight: 600; font-size: .88rem; }
.fld > span i { color: var(--danger); font-style: normal; }
.fld small { color: var(--ink-3); font-size: .82rem; }
.fld input:not([type=checkbox]):not([type=file]), .fld select, .fld textarea, .form > input, .form textarea, .row input { font: inherit; padding: .6rem .7rem; border: 1px solid #c8d1da; border-radius: 6px; background: #fff; width: 100%; }
.fld input:focus, .fld select:focus, .fld textarea:focus, .form textarea:focus, .rte__area:focus { outline: none; border-color: var(--sign); box-shadow: 0 0 0 3px var(--wash); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid2 .fld--wide, .grid3 .fld--wide { grid-column: 1 / -1; }
@media (max-width: 800px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.chk { display: inline-flex; align-items: flex-start; gap: .5rem; cursor: pointer; }
.chk input { width: 1.1rem; height: 1.1rem; accent-color: var(--sign); margin-top: .15rem; }
.row { display: flex; flex-wrap: wrap; gap: .8rem 1.5rem; align-items: center; }
.row--top { align-items: center; gap: .5rem; }
.grow { flex: 1; }
.actions { display: flex; gap: .6rem; padding-top: .4rem; }
.actions--sticky { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding: 18px 0 8px; grid-column: 1 / -1; }
.thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 4px; display: inline-block; vertical-align: middle; }

/* Редактор */
.rte { border: 1px solid #c8d1da; border-radius: 6px; background: #fff; }
.rte__bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 5px; border-bottom: 1px solid var(--line); background: #fafbfc; border-radius: 6px 6px 0 0; position: sticky; top: 64px; z-index: 2; }
.rte__bar button { border: 0; background: none; padding: .3rem .55rem; border-radius: 4px; font: inherit; font-size: .85rem; cursor: pointer; color: var(--ink); }
.rte__bar button:hover, .rte__bar button.on { background: var(--wash); color: var(--sign-deep); }
.rte__bar i { width: 1px; background: var(--line); margin: 3px 4px; }
.rte__area { min-height: 260px; padding: 14px 16px; font-size: 1rem; line-height: 1.6; border-radius: 0 0 6px 6px; }
.rte__area h3 { font-size: 1.15rem; margin: 1em 0 .4em; }
.rte__area blockquote { margin: .8em 0; padding: .4em 1em; border-left: 4px solid var(--plate); background: #fffbea; }
.rte__src { width: 100%; min-height: 260px; font: 13px/1.5 ui-monospace, Consolas, monospace; padding: 12px; border: 0; border-radius: 0 0 6px 6px; }

/* Загрузка */
.drop { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: 36px 20px; border: 2px dashed #b8c5d3; border-radius: 10px; background: #fafcff; text-align: center; cursor: pointer; position: relative; }
.drop .ic { width: 2.4rem; height: 2.4rem; color: var(--sign); }
.drop span { color: var(--ink-3); font-size: .9rem; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop.over { border-color: var(--sign); background: var(--wash); }
.pick { max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; display: flex; flex-direction: column; gap: 4px; }
.pick-filter { font: inherit; padding: .45rem .7rem; border: 1px solid var(--line); border-radius: 6px; margin: .3rem 0; }

/* Сообщения */
.msgs { display: flex; flex-direction: column; gap: 4px; }
.msg header { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .4rem; }
.msg header .muted { margin-left: auto; font-size: .85rem; }
.msg.is-new { border-left: 4px solid var(--plate); }
.msg__who { color: var(--ink-2); font-size: .9rem; margin: 0 0 .6rem; }
.msg__body { white-space: normal; background: #fafbfc; border-radius: 6px; padding: .8rem 1rem; margin-bottom: .8rem; }
.msg__form { display: flex; flex-direction: column; gap: .5rem; }
.msg__form textarea { font: inherit; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 6px; }
.msg__form select { font: inherit; padding: .4rem; border: 1px solid var(--line); border-radius: 6px; }

/* Фото */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.photo { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.photo img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 5px; }
.photo input { font: inherit; font-size: .88rem; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 5px; width: 100%; }
.photo__row { display: flex; gap: 4px; }
.photo__row input[type=number] { width: 4rem; }
.new-card { border-style: dashed; }

/* Вход */
.login { display: grid; place-items: center; min-height: 100vh; background: #0f1923 radial-gradient(circle at 30% 20%, #1d3a5c, transparent 60%); }
.login__box { background: #fff; padding: 36px 32px; border-radius: 14px; width: min(380px, 92vw); display: flex; flex-direction: column; gap: 14px; }
.login__box .plate { align-self: flex-start; }
.login__box h1 { font-size: 1.3rem; margin-top: .4rem; }
.login__box label { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; font-size: .9rem; }
.login__box input { font: inherit; padding: .7rem; border: 1px solid #c8d1da; border-radius: 6px; }
.login__box .btn { justify-content: center; padding: .75rem; }
.login__back { text-align: center; font-size: .9rem; color: var(--ink-3); }
[hidden] { display: none !important; }
.list li .muted { white-space: nowrap; }
@media (max-width: 760px) {
  .top { flex-wrap: wrap; }
  .top h1 { font-size: 1.15rem; }
  .tbl th:nth-child(3), .tbl td:nth-child(3) { display: none; }
  .quick, .stats { grid-template-columns: 1fr; }
  .toolbar input[type=search], .toolbar select { min-width: 0; flex: 1; }
  .bulkbar { top: 0; }
}
