/* Кабинет pavos.ru — фирменный стиль: глубокий зелёный, латунь, медь; Unbounded + Manrope.
   Всегда на зелёном фоне, независимо от темы системы. */
:root {
  --bg: #13261E; --side: #0E1D16; --card: #0E1D16; --raised: #1B3429; --line: #2C4A3C;
  --text: #EFE6D2; --muted: #A9B8A8; --dim: #6F8176;
  --brass: #CFAE62; --copper: #C4733F; --on-brass: #13261E;
  --ok: #8CC49A; --bad: #E07A5A; --warn: #CFAE62;
  --code-bg: #0A1611; --code-text: #D9D2C0;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 Manrope, system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--brass); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font: 600 1.45rem/1.25 Unbounded, sans-serif; letter-spacing: -.01em; margin: 0 0 1rem; }
h2 { font: 600 .98rem/1.3 Unbounded, sans-serif; margin: 0 0 .8rem; }
code { font-size: .86em; background: color-mix(in srgb, var(--brass) 12%, transparent); padding: .05em .35em; border-radius: 5px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.kicker { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--copper); margin-bottom: 2px; }
.i { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.emoji { display: inline-block; text-align: center; line-height: 1; }

/* ---------- логотип ---------- */
.logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; }
.logo:hover { text-decoration: none; }
.logo-word { font: 700 1.25rem/1 Unbounded, sans-serif; letter-spacing: -.04em; color: var(--brass); }
.logo-tld { font: 500 .75rem/1 Unbounded, sans-serif; color: var(--copper); margin-left: -5px; align-self: flex-end; padding-bottom: 3px; }

/* ---------- каркас ---------- */
body.admin { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--side); border-right: 1px solid var(--line);
  padding: 22px 14px; display: flex; flex-direction: column; }
.side-logo { padding: 0 8px 22px; }
.side nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side nav a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 10px; color: var(--muted); font-weight: 500; }
.side nav a .i { color: var(--dim); transition: color .15s; }
.side nav a:hover { background: color-mix(in srgb, var(--brass) 7%, transparent); color: var(--text); text-decoration: none; }
.side nav a:hover .i { color: var(--brass); }
.side nav a.on { background: color-mix(in srgb, var(--brass) 13%, transparent); color: var(--text); font-weight: 700;
  box-shadow: inset 3px 0 0 var(--copper); }
.side nav a.on .i { color: var(--brass); }
.side .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .group { margin: 18px 10px 6px; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--dim); }
.side-foot { display: flex; justify-content: space-between; align-items: center; padding: 14px 8px 0; border-top: 1px solid var(--line); font-size: .9rem; }
.side-foot a, .side-foot .link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.side-foot .i { width: 16px; height: 16px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--dim); flex: none; }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); }
.dot.bad { background: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 22%, transparent); }
.dot.warn { background: var(--warn); }
.content { padding: 30px 36px 64px; max-width: 1240px; width: 100%; min-width: 0; }
.mobile-bar, .scrim { display: none; }

/* ---------- блоки ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; margin-bottom: 16px; }
.card-head { margin-bottom: 6px; }
.card-head h2 { margin: 0; }
.row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; }
.two-col { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; align-items: start; }
.two-col .card { margin: 0; }
dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0; }
dt { color: var(--muted); } dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.more { display: inline-flex; align-items: center; gap: 4px; }
.more .i { width: 14px; height: 14px; }

/* плитка-иконка в стиле «аватара» логотипа */
.tile { display: inline-grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 15px;
  border: 2px solid var(--brass); background: var(--side); color: var(--brass); }
.tile .i { width: 26px; height: 26px; }
.tile .emoji { font-size: 1.5rem; }
.tile.sm { width: 40px; height: 40px; border-radius: 12px; border-width: 1.5px; }
.tile.sm .i { width: 20px; height: 20px; }

.hello { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 10px 24px; margin-bottom: 22px; }
.hello h1 { margin: 0; font-size: 1.9rem; }
.motto { color: var(--dim); font-size: .82rem; letter-spacing: .04em; }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; }
.stat-top { display: flex; justify-content: space-between; align-items: center; color: var(--dim); }
.stat-top .i { color: var(--brass); opacity: .8; }
.stat-label { color: var(--muted); font-size: .85rem; }
.stat-value { font: 700 1.9rem/1.2 Unbounded, sans-serif; margin-top: 6px; letter-spacing: -.02em; }
.stat-value .muted { font: 500 .95rem Manrope, sans-serif; }
.small-value { font-size: 1.15rem; padding-top: 8px; }
.stat.warn { border-color: color-mix(in srgb, var(--copper) 55%, var(--line)); }
.stat.warn .stat-value { color: var(--copper); }
.meter { height: 6px; border-radius: 3px; background: var(--raised); margin-top: 12px; overflow: hidden; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--brass), var(--copper)); border-radius: 3px; }

.plist { display: flex; flex-direction: column; }
.pitem { display: flex; align-items: center; gap: 14px; padding: 12px 8px; border-top: 1px solid var(--line); color: var(--text); }
.pitem:first-child { border-top: 0; }
a.pitem { border-radius: 12px; }
a.pitem:hover { background: color-mix(in srgb, var(--brass) 6%, transparent); text-decoration: none; }
.pinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.events { list-style: none; margin: 0; padding: 0; }
.events li { display: flex; gap: 12px; padding: 8px 0 8px 14px; position: relative; }
.events li::before { content: ""; position: absolute; left: 0; top: 15px; width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.events li::after { content: ""; position: absolute; left: 3px; top: 24px; bottom: -8px; width: 1px; background: var(--line); }
.events li:last-child::after { display: none; }
.events li.alert::before { background: var(--bad); } .events li.ok::before { background: var(--ok); } .events li.info::before { background: var(--brass); }
.events .time { color: var(--dim); font-size: .82rem; white-space: nowrap; font-variant-numeric: tabular-nums; padding-top: 1px; }

.badge { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 99px; font-size: .8rem; font-weight: 700;
  white-space: nowrap; background: var(--raised); color: var(--muted); }
.badge .dot { width: 7px; height: 7px; box-shadow: none; }
.badge.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.badge.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 13%, transparent); }
.badge.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }

.page-head { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.page-head .title { display: flex; gap: 16px; align-items: center; min-width: 0; }
.page-head h1 { margin: 0; }
.page-head .actions { margin: 0; align-items: center; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 20px; overflow-x: auto; }
.tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; color: var(--muted); border-bottom: 2px solid transparent;
  white-space: nowrap; font-weight: 600; }
.tabs a .i { width: 16px; height: 16px; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.on { color: var(--text); border-color: var(--copper); }
.tabs a.on .i { color: var(--brass); }

/* ---------- формы ---------- */
button, .button { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-weight: 700; border: 0; border-radius: 10px;
  cursor: pointer; padding: 9px 15px; background: var(--brass); color: var(--on-brass); }
button .i, .button .i { width: 16px; height: 16px; }
button:hover, .button:hover { filter: brightness(1.08); text-decoration: none; }
button.secondary, .button.secondary { background: transparent; color: var(--brass); border: 1px solid var(--brass); }
button.danger { background: transparent; color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 70%, transparent); }
button.link { background: none; color: var(--muted); padding: 0; font-weight: 500; border-radius: 0; }
button.link:hover { color: var(--text); }
.inline { display: inline; margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.actions.sticky { position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(transparent, var(--bg) 40%); }

input, textarea { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 11px; width: 100%; }
input:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--brass) 45%, transparent); outline-offset: 0; border-color: var(--brass); }
input::placeholder, textarea::placeholder { color: var(--dim); }
textarea { font-family: ui-monospace, Consolas, monospace; font-size: .88rem; resize: vertical; }
textarea[name="about"], textarea[name="links"], textarea[name="welcome"] { font-family: inherit; font-size: .95rem; }
label { display: block; margin-bottom: 12px; color: var(--muted); font-size: .88rem; font-weight: 600; }
label input, label textarea { margin-top: 5px; color: var(--text); font-weight: 400; }
.inline-check { display: inline-flex; gap: 7px; align-items: center; margin: 0; white-space: nowrap; color: var(--text); font-weight: 500; }
.inline-check input { width: auto; margin: 0; accent-color: var(--brass); }
.row input { width: auto; flex: 1 1 180px; }
.row label { margin: 0; display: flex; gap: 6px; align-items: center; }

.flash { display: flex; align-items: center; gap: 12px; background: color-mix(in srgb, var(--brass) 10%, var(--card));
  border: 1px solid color-mix(in srgb, var(--brass) 55%, transparent); border-radius: 14px; padding: 11px 16px; margin-bottom: 20px; }
.error { color: var(--bad); font-weight: 600; }

pre.log { background: var(--code-bg); color: var(--code-text); padding: 16px; border-radius: 14px; border: 1px solid var(--line);
  font-size: .8rem; max-height: 68vh; overflow: auto; white-space: pre-wrap; word-break: break-word; margin: 0 0 12px; }
details summary { cursor: pointer; margin: 10px 0; color: var(--muted); font-weight: 600; }

table.env { width: 100%; border-collapse: collapse; }
table.env th { text-align: left; font-family: ui-monospace, Consolas, monospace; font-size: .82rem; font-weight: 500; color: var(--brass);
  padding: 6px 10px 6px 0; width: 30%; word-break: break-all; }
table.env td { padding: 4px 0; }
table.env td.val { display: flex; gap: 6px; }
button.eye { background: transparent; border: 1px solid var(--line); padding: 4px 10px; color: var(--brass); }

.steps li { margin-bottom: 16px; }
.steps li::marker { color: var(--copper); font-weight: 700; }
.note textarea { margin: 8px 0; font-family: inherit; font-size: .95rem; }
.note-form textarea { margin: 10px 0; font-family: inherit; }
.search { margin-bottom: 14px; justify-content: flex-start; }
.narrow { max-width: 440px; }
.pub-item { display: grid; grid-template-columns: 240px 1fr 1fr; gap: 8px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }

/* ---------- вход и служебные страницы ---------- */
body.brand-bg { background:
    radial-gradient(900px 500px at 50% -10%, rgba(207, 174, 98, .10), transparent 60%), var(--bg); }
body.center { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login { width: 100%; max-width: 360px; text-align: center; padding: 30px 28px; }
.login-mark { margin-bottom: 10px; }
.login-title { display: inline-flex; align-items: center; }
.login-title .logo-word { font-size: 1.7rem; }
.login-sub { margin: 4px 0 22px; }
.login label { text-align: left; }
.login button { width: 100%; justify-content: center; margin-top: 4px; }
.login .back { display: inline-block; margin-top: 16px; color: var(--dim); font-size: .85rem; }
.prose { max-width: 720px; margin: 0 auto; padding: 28px 16px 60px; }
.prose h1 { margin-top: 24px; }
.prose h2 { margin-top: 28px; color: var(--brass); }

/* ---------- адаптив ---------- */
@media (max-width: 1050px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .pub-item { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
  body.admin { display: block; }
  .mobile-bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: var(--side);
    border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
  .burger { display: grid; place-items: center; cursor: pointer; margin: 0; color: var(--brass); }
  .burger .i { width: 24px; height: 24px; }
  .side { display: none; position: fixed; inset: 0 auto 0 0; z-index: 10; width: 280px; }
  .menu-toggle:checked ~ .side { display: flex; }
  .menu-toggle:checked ~ .scrim { display: block; position: fixed; inset: 0; z-index: 9; background: rgba(5, 12, 9, .6); margin: 0; }
  .content { padding: 20px 16px 48px; }
  .hello h1 { font-size: 1.5rem; }
  .motto { display: none; }
  .page-head .tile { width: 44px; height: 44px; }
  table.env, table.env tr, table.env th, table.env td { display: block; width: 100%; }
  table.env tr { border-bottom: 1px solid var(--line); padding: 6px 0; }
}
@media (max-width: 480px) {
  /* в списке проектов от статуса остаётся только точка */
  .pitem .badge { font-size: 0; gap: 0; padding: 7px; }
  .pitem .badge .dot { width: 9px; height: 9px; }
}
