/* Карев — стили кабинета (владелец: исполнитель А).

Раскладка: слева тёмное меню (как в эталоне _скриншоты/01_stranicy_papki.jpg),
справа светлый кабинет. Акцент — жёлтый. Шрифты системные, без внешних CDN.
Имена классов (для исполнителей Б, В, Г) — в README, раздел «Стили и шаблоны».
*/

:root {
  --ink: #17162b;
  --ink-2: #2a2846;
  --side: #1b1930;
  --side-2: #232042;
  --side-text: #d9d6ea;
  --side-text-dim: #9b98b8;
  --page: #f4f5f8;
  --card: #ffffff;
  --line: #e4e6ed;
  --text: #1d1c2b;
  --muted: #6f6d84;
  --yellow: #ffe032;
  --yellow-2: #feae00;
  --yellow-deep: #f5c400;
  --ok: #1f9d55;
  --ok-bg: #e6f7ee;
  --warn: #b7791f;
  --warn-bg: #fdf3df;
  --err: #c53030;
  --err-bg: #fdecec;
  --r: 14px;
  --shadow: 0 6px 24px rgba(23, 22, 43, .07);
  --shadow-sm: 0 2px 8px rgba(23, 22, 43, .06);
  --font: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body.app-body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ------------------------------------------------------------- каркас */

.app-shell {
  display: flex;
  min-height: 100vh;
}

.side {
  width: 250px;
  flex: 0 0 250px;
  background: var(--side);
  color: var(--side-text);
  display: flex;
  flex-direction: column;
  padding: 18px 14px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 30;
}

.side-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px 18px;
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: .2px;
}

.side-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, #ffdf3f, #f39c00);
  color: #4a2c00;
  font-size: 17px;
  box-shadow: 0 0 0 3px rgba(255, 224, 50, .14);
}

.side-burger {
  display: none;
  background: none;
  border: 0;
  padding: 6px;
  cursor: pointer;
}
.side-burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  margin: 4px 0;
  border-radius: 2px;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--side-text);
  text-decoration: none;
  font-size: 15px;
  transition: background .15s, color .15s;
}
.side-link:hover { background: var(--side-2); color: #fff; }
.side-link .ico {
  width: 20px;
  text-align: center;
  font-size: 15px;
  color: var(--side-text-dim);
}
.side-link.is-active {
  background: rgba(255, 224, 50, .12);
  color: #fff;
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--yellow);
}
.side-link.is-active .ico { color: var(--yellow); }

.side-bottom {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.side-link--quiet { color: var(--side-text-dim); }

.main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 28px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  min-height: 62px;
}
.topbar-crumb { font-weight: 650; font-size: 17px; color: var(--text); }
.topbar-right { display: flex; align-items: center; gap: 10px; }

.who { display: inline-flex; align-items: center; gap: 9px; margin-right: 6px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #ffdf3f, #f39c00);
  color: #4a2c00; font-weight: 700; font-size: 14px;
}
.who-name { font-weight: 600; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.content {
  padding: 26px 28px 48px;
  max-width: 1180px;
  width: 100%;
}

.inline-form { display: inline; margin: 0; }
.hidden-form { display: none; }

/* ------------------------------------------------------------- кнопки */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s, background .15s, border-color .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 7px 12px; font-size: 14px; border-radius: 9px; }
.btn-block { width: 100%; }

.btn-yellow {
  background: linear-gradient(180deg, #ffe94d, var(--yellow-2));
  color: #241a00;
  box-shadow: 0 2px 10px rgba(254, 174, 0, .35);
}
.btn-yellow:hover { box-shadow: 0 6px 16px rgba(254, 174, 0, .45); transform: translateY(-1px); }

.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-2); }

.btn-ghost { background: #fff; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: #c9cdd8; background: #fafbfd; }

.btn-danger { background: #fff; color: var(--err); border-color: #f3c2c2; }
.btn-danger:hover { background: var(--err-bg); }

.btn-ok { background: #fff; color: var(--ok); border-color: #b9e4cc; }
.btn-ok:hover { background: var(--ok-bg); }

.btn[disabled], .btn.is-disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ------------------------------------------------------------- плитки, карточки */

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.page-head h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: .1px;
}
.page-head .sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
}

.stack { display: flex; flex-direction: column; gap: 14px; }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; }

/* ------------------------------------------------------------- сообщения */

.msg {
  border-radius: 10px;
  padding: 11px 14px;
  margin-bottom: 14px;
  background: var(--ok-bg);
  color: #14603a;
  border: 1px solid #bfe7d0;
}
.msg--err { background: var(--err-bg); color: #8f2020; border-color: #f3c2c2; }
.msg--warn { background: var(--warn-bg); color: #7a4f0d; border-color: #f0dcb2; }
.msg--info { background: #eef2ff; color: #2f3f8f; border-color: #d7dffb; }
.msg ul { margin: 0; padding-left: 18px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 12px;
  font-weight: 600;
  background: #eef0f5;
  color: #4b4961;
  white-space: nowrap;
}
.badge--ok { background: var(--ok-bg); color: #14603a; }
.badge--err { background: var(--err-bg); color: #8f2020; }
.badge--warn { background: var(--warn-bg); color: #7a4f0d; }
.badge--admin { background: #fff4b8; color: #6b5100; }
.badge--gray { background: #eef0f5; color: #4b4961; }

/* ------------------------------------------------------------- таблицы */

.table-wrap { overflow-x: auto; border-radius: var(--r); }
table.list {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.list th, table.list td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.list th {
  font-size: 12px;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--muted);
  background: #fafbfd;
  font-weight: 650;
  white-space: nowrap;
}
table.list tr:last-child td { border-bottom: 0; }
table.list tbody tr:hover td { background: #fcfcfe; }

/* ------------------------------------------------------------- формы */

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 15px; }
.field > label, .label { font-weight: 600; font-size: 14px; }
.field .hint { color: var(--muted); font-size: 12.5px; }
.input, .textarea, .select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #d5d8e2;
  border-radius: 10px;
  font: inherit;
  background: #fff;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .textarea:focus, .select:focus {
  outline: 0;
  border-color: #f2c200;
  box-shadow: 0 0 0 3px rgba(255, 224, 50, .3);
}
.textarea { min-height: 110px; resize: vertical; }
.input-prefix {
  display: flex;
  align-items: stretch;
}
.input-prefix .prefix {
  padding: 11px 11px;
  border: 1px solid #d5d8e2;
  border-right: 0;
  border-radius: 10px 0 0 10px;
  background: #f7f8fb;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}
.input-prefix .input { border-radius: 0 10px 10px 0; }

.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 6px; }

/* ------------------------------------------------------------- вход и регистрация */

.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: var(--page);
}
.auth-hero {
  background:
    radial-gradient(1100px 500px at 10% 0%, rgba(255, 224, 50, .22), transparent 60%),
    linear-gradient(160deg, var(--side) 0%, #141227 100%);
  color: #fff;
  padding: 56px 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
}
.auth-hero .brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-weight: 750; font-size: 22px;
}
.auth-hero h2 { margin: 0; font-size: 34px; line-height: 1.2; letter-spacing: -.3px; }
.auth-hero p { margin: 0; color: #c9c6dd; font-size: 16.5px; max-width: 46ch; }
.auth-hero ul { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; color: #e6e4f2; }
.auth-hero li::before { content: "✓"; color: var(--yellow); margin-right: 9px; font-weight: 800; }
.auth-hero .back { margin-top: 12px; color: #c9c6dd; text-decoration: none; font-size: 14px; }
.auth-hero .back:hover { color: #fff; }

.auth-panel {
  padding: 56px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-card {
  width: min(420px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 30px 28px;
}
.auth-card h1 { margin: 0 0 4px; font-size: 24px; }
.auth-card .lead { color: var(--muted); margin: 0 0 20px; font-size: 14.5px; }
.auth-alt { margin-top: 16px; font-size: 14px; color: var(--muted); text-align: center; }
.auth-alt a, .link { color: #7a5c00; text-decoration: none; font-weight: 600; }
.auth-alt a:hover, .link:hover { text-decoration: underline; }

/* ------------------------------------------------------------- админка */

.stat-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 18px;
  min-width: 150px;
  box-shadow: var(--shadow-sm);
}
.stat b { display: block; font-size: 22px; line-height: 1.2; }
.stat span { color: var(--muted); font-size: 13px; }

.domains { display: grid; gap: 6px; }
.domain-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.domain-host { font-weight: 600; font-size: 13.5px; }
.domain-err { color: var(--err); font-size: 12.5px; width: 100%; }
.btn-tiny { padding: 3px 9px; font-size: 12px; border-radius: 7px; }

/* ------------------------------------------------------------- простые страницы */

.simple-wrap { max-width: 720px; margin: 0 auto; padding: 40px 20px; }
.simple-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 30px;
}
.empty {
  text-align: center;
  padding: 42px 20px;
  color: var(--muted);
}
.empty h2 { color: var(--text); margin: 0 0 6px; font-size: 19px; }

/* ------------------------------------------------------------- узкий экран */

@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-hero { padding: 32px 24px; }
  .auth-hero h2 { font-size: 26px; }
  .auth-panel { padding: 24px 16px 40px; }
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .side {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    transform: translateX(-100%);
    transition: transform .18s ease;
    box-shadow: 12px 0 40px rgba(0, 0, 0, .25);
    height: 100dvh;
  }
  .side.is-open { transform: translateX(0); }
  /* кнопка «Меню» — справа в шапке кабинета (меню выезжает слева и не закрывает её) */
  .side-burger {
    display: block;
    position: fixed;
    right: 14px;
    top: 12px;
    z-index: 40;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--ink);
    padding: 8px 7px;
  }
  .side-burger span { background: var(--yellow); margin: 3px 0; width: 20px; }
  .topbar { padding-right: 60px; }
  .topbar { padding: 10px 14px; min-height: 56px; }
  .topbar-crumb { font-size: 15.5px; }
  .who-name { display: none; }
  .content { padding: 18px 14px 40px; }
  .page-head h1 { font-size: 19px; }
}
