:root {
  color-scheme: light;
  --ink: #13232d;
  --muted: #667882;
  --line: #dce4e3;
  --panel: #ffffff;
  --page: #f2f5f4;
  --teal: #0d6f70;
  --teal-soft: #dff3ed;
  --amber: #8a5b00;
  --amber-soft: #fff0c9;
  --red: #9d3434;
  --red-soft: #fde5e2;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font: 15px/1.55 "Segoe UI", system-ui, sans-serif;
  background: var(--page);
  color: var(--ink);
}
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
button {
  border: 0;
  border-radius: 10px;
  background: var(--teal-soft);
  color: var(--ink);
  cursor: pointer;
  padding: 10px 15px;
  font: inherit;
  font-weight: 650;
}
button.primary { background: var(--teal); color: white; }
button.quiet { padding: 6px 10px; background: transparent; }
.app-shell { max-width: 1180px; margin: 0 auto; padding: 20px 24px 56px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 750; }
.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  color: white;
  background: var(--teal);
}
.identity { display: flex; flex-direction: column; text-align: right; }
.identity small, .muted, small { color: var(--muted); }
.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 20px 0 8px;
  border-bottom: 1px solid var(--line);
}
.tabs a { white-space: nowrap; border-radius: 9px; padding: 8px 11px; color: var(--ink); }
.tabs a:hover { background: white; text-decoration: none; }
.page-heading { padding: 42px 0 24px; }
.page-heading h1 { margin: 2px 0 6px; font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.04; }
.page-heading p:last-child { margin: 0; color: var(--muted); font-size: 1.05rem; }
.eyebrow { margin: 0; color: var(--teal); font-size: .77rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.hero-grid, .module-grid, .split { display: grid; gap: 16px; }
.hero-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 18px; }
.module-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.metric, .module-card, .panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 8px 28px rgb(36 58 64 / 5%);
}
.metric { display: flex; min-height: 135px; flex-direction: column; justify-content: space-between; padding: 18px; }
.metric > span, .module-card > span { color: var(--muted); font-size: .78rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.metric strong { font-size: 1.2rem; }
.module-card { display: flex; min-height: 150px; flex-direction: column; align-items: flex-start; gap: 14px; padding: 20px; color: var(--ink); }
.module-card small { margin-top: auto; }
.module-card:hover { border-color: #9fc9c3; text-decoration: none; transform: translateY(-1px); }
.panel { margin-bottom: 16px; padding: 22px; overflow: auto; }
.panel h2 { margin: 6px 0 14px; font-size: 1.35rem; }
.asset-preview { display: block; max-width: 100%; margin: 16px 0; border: 1px solid var(--line); border-radius: 14px; }
.avatar-preview { width: min(280px, 100%); aspect-ratio: 1; object-fit: cover; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.button-link { display: inline-flex; border-radius: 10px; padding: 9px 13px; background: var(--teal); color: white; font-weight: 650; }
.button-link.secondary { background: var(--teal-soft); color: var(--ink); }
.button-link:hover { text-decoration: none; filter: brightness(.97); }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.section-heading h2 { margin: 4px 0 0; }
.badge { display: inline-flex; align-items: center; border-radius: 99px; padding: 5px 9px; font-size: .72rem; font-weight: 800; letter-spacing: .02em; }
.badge.live { color: #075d4b; background: var(--teal-soft); }
.badge.pending { color: var(--amber); background: var(--amber-soft); }
.badge.blocked { color: var(--red); background: var(--red-soft); }
.badge.neutral { color: #53646c; background: #e9eeed; }
table { width: 100%; margin-top: 14px; border-collapse: collapse; background: white; }
th, td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: .73rem; letter-spacing: .04em; text-transform: uppercase; }
dl { margin: 18px 0 0; }
dl > div { display: grid; grid-template-columns: minmax(120px, .7fr) minmax(180px, 1.3fr); gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); }
dt { color: var(--muted); }
dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
footer { display: flex; justify-content: space-between; align-items: center; margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); }
#vk-login { min-height: 48px; margin-top: 24px; }
body > main:not(.app-shell) { max-width: 46rem; margin: 0 auto; padding: 64px 20px; }

@media (max-width: 800px) {
  .hero-grid, .module-grid, .split { grid-template-columns: 1fr; }
  .app-shell { padding-inline: 14px; }
  .topbar { align-items: flex-start; }
  .identity { max-width: 45%; }
  dl > div { grid-template-columns: 1fr; gap: 2px; }
}
