:root {
  --bg: #090b18;
  --bg-deep: #050713;
  --sidebar: #0c0f20;
  --surface: #11152a;
  --surface-2: #171b33;
  --surface-3: #1c2140;
  --surface-glass: rgba(17, 21, 42, 0.88);
  --line: rgba(255, 255, 255, 0.085);
  --line-strong: rgba(255, 255, 255, 0.15);
  --text: #f7f7ff;
  --text-soft: #c5c9dc;
  --muted: #858ca9;
  --pink: #ff4fa3;
  --pink-strong: #ff2f92;
  --violet: #8d63ff;
  --cyan: #45d7ff;
  --green: #42e6a4;
  --orange: #ff985c;
  --yellow: #ffd166;
  --danger: #ff5f72;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  --shadow-soft: 0 14px 36px rgba(0, 0, 0, 0.2);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 13px;
  --sidebar-width: 260px;
  --topbar-height: 88px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { min-width: 320px; scroll-behavior: smooth; }

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 77% -10%, rgba(141, 99, 255, 0.12), transparent 32rem),
    radial-gradient(circle at 15% 85%, rgba(255, 79, 163, 0.07), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}

body:has(dialog[open]) { overflow: hidden; }

button,
input,
textarea,
select { font: inherit; }

button,
a { -webkit-tap-highlight-color: transparent; }

button { color: inherit; }

a { color: inherit; }

img { display: block; max-width: 100%; }

[hidden] { display: none !important; }

::selection { background: rgba(255, 79, 163, 0.35); color: #fff; }

:focus-visible {
  outline: 3px solid rgba(69, 215, 255, 0.85);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 300;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-140%);
  border-radius: 9px;
  background: var(--text);
  color: var(--bg);
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease;
}

.skip-link:focus { transform: translateY(0); }

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  z-index: 80;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  padding: 27px 18px 18px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 27%),
    var(--sidebar);
  box-shadow: 14px 0 50px rgba(0, 0, 0, 0.12);
}

.brand-block {
  display: grid;
  justify-items: start;
  gap: 2px;
  padding: 0 13px 25px;
}

.brand-link { display: inline-flex; min-height: 58px; align-items: center; }
.brand-link img { width: 150px; height: auto; object-fit: contain; object-position: left center; }

.admin-badge {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 9px;
  border: 1px solid rgba(255, 79, 163, 0.28);
  border-radius: 999px;
  background: rgba(255, 79, 163, 0.08);
  color: #ffaad1;
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.primary-nav { display: grid; gap: 5px; }

.nav-label {
  margin: 0 13px 7px;
  color: #626a89;
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-label-secondary { margin-top: 20px; }

.nav-link {
  position: relative;
  width: 100%;
  min-height: 47px;
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #9ca3bf;
  text-align: left;
  cursor: pointer;
  transition: 160ms ease;
}

.nav-link::before {
  content: "";
  position: absolute;
  left: -19px;
  width: 3px;
  height: 24px;
  border-radius: 999px;
  background: var(--pink);
  opacity: 0;
  box-shadow: 0 0 20px rgba(255, 79, 163, 0.65);
}

.nav-link:hover { background: rgba(255, 255, 255, 0.035); color: var(--text); }

.nav-link.is-active {
  border-color: rgba(255, 79, 163, 0.13);
  background: linear-gradient(90deg, rgba(255, 79, 163, 0.14), rgba(141, 99, 255, 0.07));
  color: #fff;
}

.nav-link.is-active::before { opacity: 1; }

.nav-link > span:nth-child(2) { font-size: 0.88rem; font-weight: 730; }

.nav-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #8e96b5;
  font-size: 1.04rem;
  font-weight: 900;
}

.is-active .nav-icon { color: #ff93c6; }

.nav-count,
.count-badge {
  min-width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-soft);
  font-size: 0.68rem;
  font-weight: 800;
}

.sidebar-footer { display: grid; gap: 13px; margin-top: auto; padding-top: 28px; }

.site-link {
  min-height: 43px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 760;
  text-decoration: none;
  transition: 160ms ease;
}

.site-link:hover { border-color: rgba(69, 215, 255, 0.28); color: #fff; }

.user-chip {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px;
  border-top: 1px solid var(--line);
}

.user-avatar,
.account-avatar {
  width: 36px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 79, 163, 0.34);
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(255, 79, 163, 0.26), rgba(141, 99, 255, 0.22));
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
}

.user-copy { min-width: 0; display: grid; }
.user-copy strong { overflow: hidden; font-size: 0.74rem; text-overflow: ellipsis; white-space: nowrap; }
.user-copy small { color: var(--muted); font-size: 0.62rem; }

.status-dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-right: 4px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(66, 230, 164, 0.1), 0 0 12px rgba(66, 230, 164, 0.35);
}

.main-area { min-height: 100vh; margin-left: var(--sidebar-width); }

.topbar {
  position: sticky;
  z-index: 45;
  top: 0;
  min-height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 15px clamp(22px, 4vw, 58px);
  border-bottom: 1px solid var(--line);
  background: rgba(9, 11, 24, 0.82);
  backdrop-filter: blur(18px);
}

.topbar-title-group,
.topbar-actions { display: flex; align-items: center; gap: 15px; }

.topbar h1 { margin: 0; font-size: clamp(1.15rem, 2vw, 1.45rem); line-height: 1.15; }

.eyebrow,
.panel-kicker,
.section-kicker {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.section-kicker { color: #a6acc4; }
.section-kicker span { width: 19px; height: 2px; display: inline-block; margin: 0 7px 3px 0; border-radius: 99px; background: var(--pink); box-shadow: 0 0 12px rgba(255, 79, 163, 0.6); }

.sync-status,
.health-summary,
.social-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(66, 230, 164, 0.18);
  border-radius: 999px;
  background: rgba(66, 230, 164, 0.055);
  color: #a2efd0;
  font-size: 0.68rem;
  font-weight: 760;
  white-space: nowrap;
}

.sync-status.is-busy .status-dot { background: var(--yellow); box-shadow: 0 0 0 4px rgba(255, 209, 102, 0.1); animation: pulse 1s infinite; }
.sync-status.is-error { border-color: rgba(255, 95, 114, 0.25); color: #ffabb5; }
.sync-status.is-error .status-dot { background: var(--danger); box-shadow: 0 0 0 4px rgba(255, 95, 114, 0.1); }

.menu-button { display: none !important; }

.icon-button {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-soft);
  font-size: 1.3rem;
  cursor: pointer;
}

.icon-button:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.065); color: #fff; }

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 0.78rem;
  font-weight: 820;
  text-decoration: none;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease, background 150ms ease;
}

.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { opacity: 0.5; cursor: not-allowed; }

.button-primary {
  background: linear-gradient(135deg, var(--pink), #f8348d 48%, var(--violet));
  color: #fff;
  box-shadow: 0 10px 28px rgba(255, 79, 163, 0.2);
}

.button-primary:hover:not(:disabled) { box-shadow: 0 12px 32px rgba(255, 79, 163, 0.3); }

.button-secondary { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.055); color: #fff; }
.button-secondary:hover:not(:disabled) { border-color: rgba(141, 99, 255, 0.38); background: rgba(141, 99, 255, 0.1); }
.button-quiet { border-color: var(--line); background: transparent; color: var(--text-soft); }
.button-quiet:hover:not(:disabled) { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.04); color: #fff; }
.button-danger { border-color: rgba(255, 95, 114, 0.26); background: rgba(255, 95, 114, 0.09); color: #ffabb5; }
.button-danger:hover:not(:disabled) { background: rgba(255, 95, 114, 0.18); }
.button-full { width: 100%; }

.text-button {
  padding: 4px;
  border: 0;
  background: transparent;
  color: #a9b0ca;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.text-button:hover { color: #fff; }

.global-message {
  margin: 18px clamp(22px, 4vw, 58px) 0;
  padding: 12px 15px;
  border: 1px solid rgba(255, 95, 114, 0.3);
  border-radius: 12px;
  background: rgba(255, 95, 114, 0.09);
  color: #ffc1c8;
  font-size: 0.8rem;
}

.view-panel {
  width: min(1520px, 100%);
  margin: 0 auto;
  padding: 42px clamp(22px, 4vw, 58px) 70px;
}

.view-panel:not(.is-active) { display: none; }

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 27px;
}

.section-heading h2 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.7rem); letter-spacing: -0.035em; line-height: 1.08; }
.section-heading p:not(.section-kicker) { max-width: 720px; margin: 9px 0 0; color: var(--muted); font-size: 0.9rem; }
.hero-heading { align-items: center; margin-bottom: 32px; }
.hero-heading h2 { max-width: 780px; font-size: clamp(2rem, 3.8vw, 3.5rem); }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 18px;
}

.metric-card {
  --metric: var(--pink);
  position: relative;
  min-height: 134px;
  display: flex;
  align-items: center;
  gap: 16px;
  overflow: hidden;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  box-shadow: var(--shadow-soft);
}

.metric-card::after {
  content: "";
  position: absolute;
  width: 130px;
  height: 130px;
  right: -55px;
  top: -70px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--metric) 18%, transparent);
  filter: blur(10px);
}

.metric-live { --metric: var(--green); }
.metric-draft { --metric: var(--orange); }
.metric-tags { --metric: var(--violet); }

.metric-icon {
  width: 45px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--metric) 34%, transparent);
  border-radius: 13px;
  background: color-mix(in srgb, var(--metric) 11%, transparent);
  color: var(--metric);
  font-size: 1.05rem;
  font-weight: 900;
}

.metric-card > div { display: grid; }
.metric-card small { color: var(--muted); font-size: 0.66rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; }
.metric-card strong { margin: 1px 0 -2px; font-size: 2rem; line-height: 1.2; }
.metric-card div span { color: #717997; font-size: 0.66rem; }

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  gap: 18px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(23, 27, 51, 0.88), rgba(14, 18, 36, 0.9));
  box-shadow: var(--shadow-soft);
}

.health-panel,
.build-panel,
.recent-panel,
.audit-panel,
.social-status-panel,
.compact-panel,
.account-card,
.split-layout > .panel { padding: 23px; }

.recent-panel { grid-column: 1 / -1; }

.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.panel-heading h3 { margin: 0; font-size: 1.04rem; }
.panel-kicker { color: #6f7695; }

.health-list { display: grid; }

.health-row {
  display: grid;
  grid-template-columns: 13px 1fr auto;
  align-items: center;
  gap: 13px;
  min-height: 67px;
  border-top: 1px solid var(--line);
}

.health-row:first-child { border-top: 0; }
.health-row > div { display: grid; }
.health-row strong { font-size: 0.8rem; }
.health-row small { color: var(--muted); font-size: 0.67rem; }
.health-indicator { width: 9px; aspect-ratio: 1; border-radius: 50%; background: #5d647f; box-shadow: 0 0 0 5px rgba(93, 100, 127, 0.1); }
.health-indicator.is-ok { background: var(--green); box-shadow: 0 0 0 5px rgba(66, 230, 164, 0.1), 0 0 12px rgba(66, 230, 164, 0.28); }
.health-indicator.is-warning { background: var(--yellow); box-shadow: 0 0 0 5px rgba(255, 209, 102, 0.1); }
.health-indicator.is-error { background: var(--danger); box-shadow: 0 0 0 5px rgba(255, 95, 114, 0.1); }
.health-state { color: var(--text-soft); font-size: 0.68rem; font-weight: 850; text-transform: uppercase; }

.build-panel { position: relative; overflow: hidden; }
.build-panel::after { content: ""; position: absolute; width: 180px; height: 180px; right: -100px; bottom: -100px; border-radius: 50%; background: rgba(141, 99, 255, 0.12); filter: blur(12px); }
.build-panel > * { position: relative; z-index: 1; }
.build-panel > p { margin: 0 0 20px; color: var(--muted); font-size: 0.76rem; }
.build-mark { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(141, 99, 255, 0.3); border-radius: 12px; background: rgba(141, 99, 255, 0.1); color: #b7a2ff; font-size: 1.25rem; }
.build-meta { display: grid; gap: 8px; margin: 0 0 20px; }
.build-meta div { display: flex; justify-content: space-between; gap: 15px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.build-meta dt { color: var(--muted); font-size: 0.68rem; }
.build-meta dd { margin: 0; color: var(--text-soft); font-size: 0.68rem; font-weight: 750; text-align: right; }

.recent-list { display: grid; }

.recent-item {
  display: grid;
  grid-template-columns: minmax(180px, 1.6fr) minmax(100px, 0.6fr) minmax(110px, 0.6fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 65px;
  border-top: 1px solid var(--line);
}

.recent-item:first-child { border-top: 0; }
.recent-title { min-width: 0; display: grid; }
.recent-title strong { overflow: hidden; font-size: 0.78rem; text-overflow: ellipsis; white-space: nowrap; }
.recent-title small { color: var(--muted); font-size: 0.64rem; }
.recent-meta { color: var(--muted); font-size: 0.68rem; }

.state-badge {
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 0.61rem;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.state-published { border-color: rgba(66, 230, 164, 0.25); background: rgba(66, 230, 164, 0.08); color: #9cf0ce; }
.state-draft { border-color: rgba(255, 209, 102, 0.22); background: rgba(255, 209, 102, 0.07); color: #ffe09b; }
.state-unpublished { border-color: rgba(141, 99, 255, 0.25); background: rgba(141, 99, 255, 0.08); color: #c3b2ff; }

.filter-panel {
  display: grid;
  grid-template-columns: minmax(230px, 1.5fr) minmax(150px, 0.55fr) minmax(150px, 0.55fr) auto;
  align-items: end;
  gap: 13px;
  margin-bottom: 17px;
  padding: 17px;
}

label,
.tag-choice-field > span {
  display: inline-block;
  margin: 0 0 6px;
  color: #aeb4cc;
  font-size: 0.68rem;
  font-weight: 790;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(4, 7, 18, 0.52);
  color: var(--text);
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

input,
select { min-height: 43px; padding: 0 12px; }
textarea { min-height: 90px; padding: 11px 12px; line-height: 1.55; resize: vertical; }
select { appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, #7f87a5 50%), linear-gradient(135deg, #7f87a5 50%, transparent 50%); background-position: calc(100% - 17px) 18px, calc(100% - 12px) 18px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
input::placeholder,
textarea::placeholder { color: #59607c; }
input:hover,
textarea:hover,
select:hover { border-color: rgba(255, 255, 255, 0.22); }
input:focus,
textarea:focus,
select:focus { outline: 0; border-color: rgba(141, 99, 255, 0.75); background: rgba(7, 9, 23, 0.78); box-shadow: 0 0 0 3px rgba(141, 99, 255, 0.12); }
input[aria-invalid="true"],
textarea[aria-invalid="true"],
select[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(255, 95, 114, 0.1); }

.search-field { position: relative; }
.search-field > span { position: absolute; left: 13px; bottom: 10px; color: var(--muted); font-size: 1.1rem; }
.search-field input { padding-left: 38px; }

.news-panel { overflow: hidden; }
.list-summary { min-height: 53px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid var(--line); }
.list-summary p { margin: 0; font-size: 0.75rem; font-weight: 850; }
.list-summary span { color: var(--muted); font-size: 0.64rem; }
.news-list { display: grid; }

.news-row {
  display: grid;
  grid-template-columns: minmax(250px, 1.55fr) minmax(120px, 0.55fr) minmax(135px, 0.55fr) minmax(125px, 0.55fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 86px;
  padding: 13px 20px;
  border-top: 1px solid var(--line);
  transition: background 130ms ease;
}

.news-row:first-child { border-top: 0; }
.news-row:hover { background: rgba(255, 255, 255, 0.018); }
.news-row-main { min-width: 0; display: grid; gap: 3px; }
.news-row-main strong { overflow: hidden; font-size: 0.82rem; text-overflow: ellipsis; white-space: nowrap; }
.news-row-main code { overflow: hidden; color: var(--muted); font-family: inherit; font-size: 0.63rem; text-overflow: ellipsis; white-space: nowrap; }
.news-row-cell { min-width: 0; color: var(--text-soft); font-size: 0.7rem; }
.news-row-cell small { display: block; margin-bottom: 3px; color: #606884; font-size: 0.57rem; font-weight: 850; letter-spacing: 0.08em; text-transform: uppercase; }
.news-tags { display: flex; gap: 5px; overflow: hidden; }
.tag-chip { min-height: 22px; display: inline-flex; align-items: center; padding: 0 7px; border: 1px solid rgba(69, 215, 255, 0.15); border-radius: 999px; background: rgba(69, 215, 255, 0.05); color: #9cdff1; font-size: 0.58rem; white-space: nowrap; }
.row-action { min-width: 76px; min-height: 34px; padding: 0 11px; }

.empty-state { padding: 60px 20px; text-align: center; }
.empty-state > span { width: 55px; height: 55px; display: grid; place-items: center; margin: 0 auto 15px; border: 1px solid var(--line); border-radius: 16px; color: var(--muted); font-size: 1.6rem; }
.empty-state h3 { margin: 0 0 5px; font-size: 1rem; }
.empty-state p { margin: 0; color: var(--muted); font-size: 0.76rem; }

.split-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(270px, 0.65fr); gap: 18px; align-items: start; }
.compact-panel form { display: grid; }
.field-help { margin: 6px 0 12px; color: var(--muted); font-size: 0.64rem; }

.tag-manager-list { display: grid; }
.tag-manager-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 9px; min-height: 63px; padding: 9px 0; border-top: 1px solid var(--line); }
.tag-manager-row:first-child { border-top: 0; }
.tag-manager-row input { min-height: 38px; }
.tag-manager-row .button { min-height: 36px; padding: 0 11px; }

.social-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 18px; }
.social-card { min-height: 190px; display: grid; grid-template-columns: auto 1fr; gap: 15px; padding: 22px; }
.social-card > div { align-self: center; }
.social-card small { color: var(--muted); font-size: 0.63rem; font-weight: 850; letter-spacing: 0.08em; text-transform: uppercase; }
.social-card h3 { margin: 3px 0 7px; }
.social-card p { margin: 0; color: var(--muted); font-size: 0.72rem; }
.social-icon { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgba(255, 79, 163, 0.25); border-radius: 13px; background: rgba(255, 79, 163, 0.08); color: #ff9bc9; font-size: 1.1rem; font-weight: 900; }
.social-pill { grid-column: 1 / -1; justify-self: start; min-height: 26px; }
.social-pill.is-muted { border-color: var(--line); background: rgba(255, 255, 255, 0.03); color: var(--muted); }
.social-status-panel { min-height: 160px; }
.status-details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0; }
.status-details div { padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: rgba(0, 0, 0, 0.1); }
.status-details dt { color: var(--muted); font-size: 0.61rem; font-weight: 800; text-transform: uppercase; }
.status-details dd { margin: 4px 0 0; font-size: 0.75rem; font-weight: 760; overflow-wrap: anywhere; }

.audit-list { display: grid; }
.audit-item { display: grid; grid-template-columns: 130px 135px minmax(180px, 1fr) 100px; gap: 17px; min-height: 70px; align-items: center; border-top: 1px solid var(--line); }
.audit-item:first-child { border-top: 0; }
.audit-time { color: var(--muted); font-size: 0.66rem; }
.audit-action { font-size: 0.72rem; font-weight: 800; }
.audit-target { min-width: 0; }
.audit-target strong { display: block; overflow: hidden; font-size: 0.73rem; text-overflow: ellipsis; white-space: nowrap; }
.audit-target small { display: block; overflow: hidden; color: var(--muted); font-size: 0.62rem; text-overflow: ellipsis; white-space: nowrap; }

.settings-layout { grid-template-columns: minmax(280px, 0.7fr) minmax(0, 1.3fr); }
.account-card { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 16px; }
.account-avatar { width: 54px; border-radius: 16px; font-size: 1rem; }
.account-card h3 { margin: 0 0 4px; }
.account-card p:not(.panel-kicker) { margin: 0; color: var(--muted); font-size: 0.72rem; }
.account-card dl { grid-column: 1 / -1; display: grid; gap: 8px; margin: 15px 0 0; }
.account-card dl div { display: flex; justify-content: space-between; gap: 18px; padding-top: 10px; border-top: 1px solid var(--line); }
.account-card dt,
.account-card dd { font-size: 0.68rem; }
.account-card dt { color: var(--muted); }
.account-card dd { margin: 0; font-weight: 760; }
.stack-form { display: grid; gap: 15px; }
.form-status { min-height: 20px; margin: 0; color: var(--muted); font-size: 0.68rem; }
.form-status.is-error { color: #ffabb5; }
.form-status.is-success { color: #9cf0ce; }

.editor-dialog {
  width: min(1180px, calc(100vw - 30px));
  max-width: none;
  max-height: calc(100vh - 30px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: #0d1021;
  color: var(--text);
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.62);
}

.editor-dialog::backdrop,
.confirm-dialog::backdrop { background: rgba(2, 3, 10, 0.78); backdrop-filter: blur(8px); }

.editor-dialog form { max-height: calc(100vh - 30px); display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; }

.editor-header {
  min-height: 91px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 20, 40, 0.98);
}

.editor-header h2 { margin: 0; font-size: 1.38rem; }
.editor-header p:last-child { margin: 3px 0 0; color: var(--muted); font-size: 0.7rem; }

.editor-statusbar { min-height: 45px; display: flex; align-items: center; gap: 12px; padding: 0 24px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.018); color: var(--muted); font-size: 0.65rem; }
.editor-revision { margin-left: auto; }
.editor-body { display: grid; gap: 16px; padding: 20px 24px 35px; overflow-y: auto; }

.editor-section {
  min-width: 0;
  margin: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.018);
}

.editor-section legend { padding: 0 8px; color: #e3e5f1; font-size: 0.74rem; font-weight: 850; letter-spacing: 0.035em; }
.form-grid { display: grid; gap: 14px; }
.form-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field-span-2 { grid-column: span 2; }

.input-prefix,
.input-suffix { display: flex; align-items: stretch; }
.input-prefix > span,
.input-suffix > span { display: inline-flex; align-items: center; padding: 0 10px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.035); color: var(--muted); font-size: 0.69rem; }
.input-prefix > span { border-right: 0; border-radius: 10px 0 0 10px; }
.input-prefix input { border-radius: 0 10px 10px 0; }
.input-suffix input { border-radius: 10px 0 0 10px; }
.input-suffix > span { border-left: 0; border-radius: 0 10px 10px 0; }

.switch-row { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 17px; padding-top: 16px; border-top: 1px solid var(--line); }
.switch-control { position: relative; display: grid; grid-template-columns: 40px auto; column-gap: 10px; align-items: center; margin: 0; cursor: pointer; }
.switch-control input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch-control > span { position: relative; grid-row: 1 / span 2; width: 39px; height: 22px; border: 1px solid var(--line-strong); border-radius: 999px; background: #242942; transition: 150ms ease; }
.switch-control > span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #8b92ac; transition: 150ms ease; }
.switch-control input:checked + span { border-color: rgba(255, 79, 163, 0.48); background: rgba(255, 79, 163, 0.25); }
.switch-control input:checked + span::after { left: 20px; background: #fff; box-shadow: 0 0 12px rgba(255, 79, 163, 0.7); }
.switch-control input:focus-visible + span { outline: 3px solid rgba(69, 215, 255, 0.85); outline-offset: 3px; }
.switch-control strong { color: var(--text-soft); font-size: 0.7rem; }
.switch-control small { color: var(--muted); font-size: 0.6rem; }

.character-count { display: block; margin-top: 4px; color: var(--muted); font-size: 0.59rem; text-align: right; }
.key-points-block { display: grid; grid-template-columns: minmax(180px, 0.45fr) 1fr; gap: 20px; margin-top: 19px; padding-top: 18px; border-top: 1px solid var(--line); }
.key-points-block h3 { margin: 0 0 4px; font-size: 0.82rem; }
.key-points-block p { margin: 0; color: var(--muted); font-size: 0.65rem; }
.key-points-block ol { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; counter-reset: points; }
.key-points-block li { position: relative; padding-left: 34px; counter-increment: points; }
.key-points-block li::before { content: counter(points); position: absolute; left: 0; bottom: 8px; width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid rgba(141, 99, 255, 0.25); border-radius: 7px; background: rgba(141, 99, 255, 0.08); color: #b8a4ff; font-size: 0.62rem; font-weight: 850; }
.key-points-block label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.tag-choice-field { margin-top: 17px; }
.tag-options { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-option { margin: 0; }
.tag-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.tag-option span { min-height: 30px; display: inline-flex; align-items: center; padding: 0 11px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, 0.02); color: var(--muted); font-size: 0.64rem; font-weight: 760; cursor: pointer; }
.tag-option input:checked + span { border-color: rgba(69, 215, 255, 0.34); background: rgba(69, 215, 255, 0.09); color: #b5edfa; }
.tag-option input:focus-visible + span { outline: 3px solid rgba(69, 215, 255, 0.85); outline-offset: 3px; }

.cover-layout { display: grid; grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr); gap: 20px; }
.cover-preview { position: relative; min-height: 260px; overflow: hidden; border: 1px dashed rgba(141, 99, 255, 0.32); border-radius: 14px; background: radial-gradient(circle at 70% 25%, rgba(255, 79, 163, 0.11), transparent 40%), rgba(4, 7, 18, 0.45); }
.cover-preview img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; }
.cover-preview > div { height: 100%; min-height: 260px; display: grid; place-content: center; justify-items: center; padding: 25px; text-align: center; }
.cover-preview > div > span { font-size: 2rem; color: #777f9f; }
.cover-preview strong { margin-top: 8px; font-size: 0.77rem; }
.cover-preview small { max-width: 230px; margin-top: 4px; color: var(--muted); font-size: 0.63rem; }

.editor-footer { min-height: 75px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 24px; border-top: 1px solid var(--line); background: #11152a; }
.editor-primary-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }

.confirm-dialog { width: min(420px, calc(100vw - 30px)); padding: 27px; border: 1px solid var(--line-strong); border-radius: 19px; background: #11152a; color: var(--text); box-shadow: var(--shadow); text-align: center; }
.confirm-icon { width: 49px; height: 49px; display: grid; place-items: center; margin: 0 auto 15px; border: 1px solid rgba(255, 95, 114, 0.3); border-radius: 14px; background: rgba(255, 95, 114, 0.1); color: #ff9aa6; font-size: 1.2rem; font-weight: 900; }
.confirm-dialog h2 { margin: 0 0 7px; font-size: 1.15rem; }
.confirm-dialog p { margin: 0; color: var(--muted); font-size: 0.75rem; }
.confirm-actions { display: flex; justify-content: center; gap: 9px; margin-top: 23px; }

.toast-region { position: fixed; z-index: 250; right: 20px; bottom: 20px; width: min(370px, calc(100vw - 40px)); display: grid; gap: 9px; pointer-events: none; }
.toast { display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 11px; min-height: 55px; padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: 13px; background: rgba(20, 24, 46, 0.97); box-shadow: var(--shadow); animation: toast-in 180ms ease both; pointer-events: auto; }
.toast > span:first-child { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px rgba(66, 230, 164, 0.5); }
.toast.is-error > span:first-child { background: var(--danger); box-shadow: 0 0 10px rgba(255, 95, 114, 0.5); }
.toast div { display: grid; }
.toast strong { font-size: 0.7rem; }
.toast small { color: var(--muted); font-size: 0.62rem; }
.toast button { width: 28px; height: 28px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }

.loading-screen { position: fixed; z-index: 500; inset: 0; display: grid; place-content: center; justify-items: center; background: var(--bg-deep); transition: opacity 260ms ease, visibility 260ms ease; }
.loading-screen.is-hidden { opacity: 0; visibility: hidden; }
.loading-screen img { width: 180px; height: auto; }
.loading-screen p { margin: 11px 0 0; color: var(--muted); font-size: 0.7rem; }
.loading-spinner { width: 28px; height: 28px; margin-top: 18px; border: 2px solid rgba(255, 255, 255, 0.09); border-top-color: var(--pink); border-radius: 50%; animation: spin 700ms linear infinite; }

.login-page { display: grid; place-items: center; padding: 24px; overflow-x: hidden; background: radial-gradient(circle at 80% 20%, rgba(141, 99, 255, 0.17), transparent 35rem), radial-gradient(circle at 10% 80%, rgba(255, 79, 163, 0.11), transparent 30rem), #070914; }
.login-shell { width: min(1050px, 100%); min-height: min(690px, calc(100vh - 48px)); display: grid; grid-template-columns: minmax(360px, 0.82fr) minmax(400px, 1.18fr); overflow: hidden; border: 1px solid var(--line); border-radius: 26px; background: #0d1021; box-shadow: 0 35px 100px rgba(0, 0, 0, 0.46); }
.login-card { display: flex; flex-direction: column; padding: clamp(30px, 5vw, 58px); }
.login-brand { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.login-brand img { width: 160px; height: auto; }
.login-brand > span { padding: 5px 9px; border: 1px solid rgba(255, 79, 163, 0.24); border-radius: 999px; color: #ff9bc9; font-size: 0.59rem; font-weight: 850; letter-spacing: 0.09em; text-transform: uppercase; }
.login-intro { margin-top: auto; padding-top: 55px; }
.login-intro h1 { margin: 0; font-size: clamp(2.3rem, 5vw, 3.5rem); letter-spacing: -0.05em; }
.login-intro > p:last-child { max-width: 370px; margin: 10px 0 0; color: var(--muted); font-size: 0.82rem; }
.login-form { display: grid; gap: 17px; margin-top: 31px; }
.password-field { position: relative; }
.password-field input { padding-right: 78px; }
.password-field button { position: absolute; top: 5px; right: 5px; min-height: 33px; padding: 0 9px; border: 0; border-radius: 7px; background: rgba(255, 255, 255, 0.05); color: var(--text-soft); font-size: 0.63rem; font-weight: 800; cursor: pointer; }
.login-status { min-height: 21px; margin: -4px 0 0; color: #ffabb5; font-size: 0.68rem; }
.login-footer { display: flex; justify-content: space-between; gap: 15px; margin-top: auto; padding-top: 45px; color: var(--muted); font-size: 0.62rem; }
.login-footer a { text-decoration: none; }
.login-footer a:hover { color: #fff; }

.login-art { position: relative; min-height: 650px; overflow: hidden; background: radial-gradient(circle at 50% 50%, rgba(141, 99, 255, 0.2), transparent 28%), linear-gradient(145deg, rgba(255, 79, 163, 0.12), rgba(69, 215, 255, 0.04)), #0a0d1d; }
.login-art::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #0d1021, transparent 23%), radial-gradient(circle at 70% 30%, rgba(255, 79, 163, 0.22), transparent 25%); }
.art-grid { position: absolute; inset: 0; opacity: 0.2; background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px); background-size: 42px 42px; transform: perspective(700px) rotateX(62deg) translateY(210px) scale(1.4); mask-image: linear-gradient(to top, #000, transparent 78%); }
.art-orbit { position: absolute; border: 1px solid rgba(255, 255, 255, 0.11); border-radius: 50%; }
.orbit-one { width: 480px; height: 480px; right: -100px; top: 75px; box-shadow: inset 0 0 80px rgba(141, 99, 255, 0.08); }
.orbit-two { width: 280px; height: 280px; right: 0; top: 175px; border-color: rgba(255, 79, 163, 0.25); box-shadow: 0 0 60px rgba(255, 79, 163, 0.12); }
.art-copy { position: absolute; z-index: 2; right: 10%; bottom: 14%; display: grid; justify-items: end; text-align: right; }
.art-copy span { color: var(--pink); font-size: 0.65rem; font-weight: 900; letter-spacing: 0.4em; }
.art-copy strong { margin: 10px 0; font-size: clamp(3.2rem, 6vw, 5.5rem); line-height: 0.83; letter-spacing: -0.07em; text-shadow: 0 16px 40px rgba(0, 0, 0, 0.4); }
.art-copy small { color: #8f97b4; font-size: 0.65rem; font-weight: 800; letter-spacing: 0.11em; text-transform: uppercase; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: 0.45; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(9px); } }

@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-row { grid-template-columns: minmax(230px, 1.4fr) minmax(120px, .55fr) minmax(120px, .55fr) auto; }
  .news-row .news-row-cell:nth-of-type(3) { display: none; }
  .social-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 920px) {
  .sidebar { transform: translateX(-105%); box-shadow: 18px 0 60px rgba(0, 0, 0, 0.45); transition: transform 180ms ease; }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-scrim { position: fixed; z-index: 70; inset: 0; display: block; border: 0; background: rgba(2, 3, 10, 0.68); backdrop-filter: blur(4px); }
  .main-area { margin-left: 0; }
  .menu-button { display: inline-grid !important; }
  .overview-grid { grid-template-columns: 1fr; }
  .recent-panel { grid-column: auto; }
  .filter-panel { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  .clear-filters { align-self: stretch; }
  .split-layout,
  .settings-layout { grid-template-columns: 1fr; }
  .cover-layout { grid-template-columns: 1fr; }
  .login-shell { grid-template-columns: 1fr; min-height: auto; }
  .login-art { display: none; }
  .login-card { min-height: min(680px, calc(100vh - 48px)); }
}

@media (max-width: 700px) {
  :root { --topbar-height: 74px; }
  .topbar { padding: 12px 16px; }
  .topbar .eyebrow { display: none; }
  .topbar-actions .sync-status { display: none; }
  .view-panel { padding: 28px 15px 55px; }
  .global-message { margin-inline: 15px; }
  .section-heading,
  .hero-heading { align-items: stretch; flex-direction: column; gap: 18px; }
  .section-heading .button { align-self: flex-start; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 112px; }
  .filter-panel { grid-template-columns: 1fr; }
  .search-field { grid-column: auto; }
  .news-row { grid-template-columns: 1fr auto; gap: 12px; padding: 17px; }
  .news-row .news-row-cell { display: none; }
  .news-row .state-badge { justify-self: start; }
  .recent-item { grid-template-columns: 1fr auto; gap: 10px; padding: 12px 0; }
  .recent-item .recent-meta { display: none; }
  .social-grid { grid-template-columns: 1fr; }
  .status-details { grid-template-columns: 1fr; }
  .audit-item { grid-template-columns: 1fr auto; gap: 5px 12px; padding: 13px 0; }
  .audit-target { grid-column: 1 / -1; }
  .audit-time { order: 2; text-align: right; }
  .form-grid-2,
  .form-grid-3 { grid-template-columns: 1fr; }
  .field-span-2 { grid-column: auto; }
  .key-points-block { grid-template-columns: 1fr; }
  .editor-dialog { width: 100vw; max-height: 100vh; border: 0; border-radius: 0; }
  .editor-dialog form { max-height: 100vh; }
  .editor-header,
  .editor-statusbar,
  .editor-footer { padding-inline: 15px; }
  .editor-body { padding-inline: 13px; }
  .editor-section { padding: 16px 13px; }
  .editor-footer { align-items: stretch; flex-direction: column-reverse; }
  .editor-primary-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .editor-primary-actions .button { width: 100%; }
  .login-page { padding: 0; }
  .login-shell { width: 100%; min-height: 100vh; border: 0; border-radius: 0; }
  .login-card { min-height: 100vh; padding: 30px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
