:root {
  --bg: #0b0b0c;
  --panel: #131316;
  --panel-2: #18181c;
  --line: #2a2a31;
  --text: #ece9e4;
  --muted: #9b9790;
  --accent: #e11d25;
  --ok: #2e9e6b;
  --err: #c0392b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 "Segoe UI", Roboto, Arial, sans-serif;
}

a { color: #ff8d92; text-decoration: none; }
a:hover { text-decoration: underline; }

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 12px 22px;
  background: rgba(11, 11, 12, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.top__brand {
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.top__brand span {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .16em;
  color: var(--muted);
}
.top__logout { margin-left: auto; }

.tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.tab {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
}
.tab:hover { background: var(--panel); color: var(--text); text-decoration: none; }
.tab.is-active { background: var(--accent); color: #fff; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 26px 22px 80px; }
h1 { margin: 0 0 6px; font-size: 26px; letter-spacing: -.02em; }
h2 { margin: 26px 0 10px; font-size: 17px; }
.hint { margin: 0 0 18px; color: var(--muted); font-size: 13.5px; }

.card {
  margin-bottom: 22px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.group, .service, .seo {
  padding: 14px;
  margin-bottom: 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.group__head, .service__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 10px;
}
.service__icon { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 8px; color: #d7d3cd; }
.service__icon svg { width: 20px; height: 20px; }

.field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); min-width: 120px; }
.field--grow { flex: 1 1 240px; }
.field--sm { font-size: 11.5px; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0e0e11;
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid rgba(225, 29, 37, .45); border-color: var(--accent); }

.check { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.check--danger { color: #e08080; }

.rows { width: 100%; border-collapse: collapse; }
.rows th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; padding: 4px 6px; }
.rows td { padding: 4px 6px; vertical-align: middle; }
.rows input[type=text] { width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: #0e0e11; color: var(--text); font: inherit; font-size: 13.5px; }
.rows .center { text-align: center; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #1b1b20;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.btn:hover { border-color: #45454f; text-decoration: none; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--primary:hover { background: #f02a32; }
.btn--ghost { background: transparent; }
.btn--sm { padding: 7px 11px; font-size: 12.5px; }

.flash {
  margin: 0 0 18px;
  padding: 10px 14px;
  border-radius: 9px;
  font-size: 14px;
}
.flash--ok { background: rgba(46, 158, 107, .14); border: 1px solid rgba(46, 158, 107, .4); color: #9fe3c1; }
.flash--error { background: rgba(192, 57, 43, .14); border: 1px solid rgba(192, 57, 43, .45); color: #f0a49c; }

.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.photo { margin: 0; padding: 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; }
.photo img { display: block; width: 100%; height: 130px; object-fit: cover; border-radius: 6px; margin-bottom: 8px; background: #000; }

.seo { display: grid; gap: 8px; }
.seo__file { font-family: Consolas, monospace; font-size: 12px; color: #ffb3b7; }

.log {
  max-height: 460px;
  overflow: auto;
  padding: 14px;
  background: #08080a;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: 12.5px/1.5 Consolas, monospace;
  color: #cfd6d0;
  white-space: pre-wrap;
}

.login-page { display: grid; place-items: center; min-height: 100vh; }
.login {
  width: min(360px, calc(100vw - 36px));
  padding: 28px 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.login__brand { font-weight: 800; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 18px; text-align: center; }
.login__brand span { display: block; margin-top: 4px; font-size: 10px; letter-spacing: .2em; color: var(--muted); }
.login label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.login input { padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: #0e0e11; color: var(--text); font: inherit; }
.login .btn { width: 100%; margin-top: 14px; }
.login__hint { margin: 14px 0 0; font-size: 11.5px; color: var(--muted); text-align: center; }

@media (max-width: 860px) {
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .wrap { padding: 18px 14px 70px; }
  .top { padding: 10px 14px; }
}
