:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #090b0e;
  color: #f5f7fb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 12%, rgba(39, 132, 143, 0.32), transparent 28%),
    radial-gradient(circle at 82% 8%, rgba(214, 179, 88, 0.17), transparent 26%),
    linear-gradient(180deg, #11161d 0%, #090b0e 52%);
}

button,
input {
  font: inherit;
}

button,
.button-link {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: #d9f86f;
  color: #111419;
  cursor: pointer;
  font-weight: 850;
  padding: 0 15px;
  text-decoration: none;
  white-space: nowrap;
}

button:hover,
.button-link:hover {
  background: #e7ff9c;
}

input {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(230, 237, 243, 0.13);
  border-radius: 8px;
  background: #121820;
  color: #f5f7fb;
  padding: 0 13px;
}

label {
  color: #aab6c2;
  display: grid;
  font-size: 0.88rem;
  gap: 6px;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  border-right: 1px solid rgba(230, 237, 243, 0.09);
  background: rgba(10, 13, 17, 0.82);
  padding: 22px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  align-items: center;
  color: #f5f7fb;
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
  text-decoration: none;
}

.brand-mark {
  align-items: center;
  background: linear-gradient(145deg, #d9f86f, #64c7d0);
  border-radius: 8px;
  color: #111419;
  display: flex;
  font-weight: 950;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.brand small {
  color: #8f9ba8;
  display: block;
  margin-top: 3px;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  background: transparent;
  color: #c7d0d9;
  justify-content: flex-start;
  text-align: left;
  width: 100%;
}

.nav-item.active,
.nav-item:hover {
  background: #19212a;
  color: #f5f7fb;
}

.mini-status {
  align-items: center;
  bottom: 22px;
  color: #aab6c2;
  display: flex;
  gap: 9px;
  position: absolute;
}

.dot {
  background: #d9f86f;
  border-radius: 999px;
  box-shadow: 0 0 16px rgba(217, 248, 111, 0.7);
  height: 9px;
  width: 9px;
}

.content {
  padding: 26px;
}

.topbar {
  align-items: end;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  margin-bottom: 18px;
}

.eyebrow,
.kicker {
  color: #93a3af;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0 0 6px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  letter-spacing: 0;
  line-height: 0.96;
  margin-bottom: 0;
}

h2 {
  font-size: clamp(1.45rem, 3vw, 2.3rem);
  line-height: 1.05;
  margin-bottom: 10px;
}

h3 {
  font-size: 1.02rem;
  margin-bottom: 8px;
}

.global-search,
.inline-form {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr auto;
}

.panel,
.hero-panel,
.stat-panel,
.media-card,
.service-card,
.editor-card {
  border: 1px solid rgba(230, 237, 243, 0.11);
  border-radius: 8px;
  background: rgba(16, 21, 28, 0.86);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
}

.panel {
  padding: 16px;
}

.hidden,
.view {
  display: none;
}

.view.active {
  display: block;
}

.status {
  color: #93a3af;
  min-height: 22px;
}

.status.ok {
  color: #d9f86f;
}

.status.error {
  color: #ffb58f;
}

.status.loading {
  color: #9bd9ff;
}

.hero-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) 240px;
  margin-bottom: 24px;
}

.hero-panel {
  align-items: end;
  display: grid;
  min-height: 320px;
  overflow: hidden;
  padding: 24px;
  position: relative;
}

.hero-panel::before {
  background:
    linear-gradient(115deg, rgba(217, 248, 111, 0.18), transparent 45%),
    linear-gradient(45deg, rgba(100, 199, 208, 0.24), transparent 50%);
  content: "";
  inset: 0;
  position: absolute;
}

.hero-panel > * {
  position: relative;
}

.hero-panel p {
  color: #bec9d4;
  max-width: 720px;
}

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

.stat-panel {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 20px;
}

.stat-value {
  color: #d9f86f;
  font-size: 4rem;
  font-weight: 950;
  line-height: 1;
}

.stat-label {
  color: #aab6c2;
}

.section-block {
  margin-top: 20px;
}

.section-heading {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-heading.compact h2 {
  font-size: 1.1rem;
  margin-bottom: 0;
}

.section-heading span {
  color: #93a3af;
}

.media-grid,
.service-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.media-card {
  overflow: hidden;
  padding: 12px;
}

.poster-art {
  align-items: center;
  aspect-ratio: 16 / 10;
  background: linear-gradient(145deg, #d9f86f, #64c7d0);
  border-radius: 8px;
  color: #111419;
  display: flex;
  font-size: 2.4rem;
  font-weight: 950;
  justify-content: center;
  margin-bottom: 12px;
}

.accent-blue .poster-art {
  background: linear-gradient(145deg, #87b9ff, #64c7d0);
}

.accent-amber .poster-art {
  background: linear-gradient(145deg, #ffd36e, #d9f86f);
}

.accent-rose .poster-art {
  background: linear-gradient(145deg, #ff91bd, #ffd36e);
}

.media-card p,
.service-card p {
  color: #aab6c2;
  line-height: 1.45;
}

.command-panel {
  align-items: end;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 520px);
  margin-bottom: 14px;
}

.book-command {
  background:
    linear-gradient(135deg, rgba(255, 211, 110, 0.12), transparent 38%),
    rgba(16, 21, 28, 0.86);
}

.service-card {
  padding: 14px;
}

.service-top,
.card-actions,
.editor-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.service-icon {
  align-items: center;
  background: #202a35;
  border-radius: 8px;
  color: #d9f86f;
  display: flex;
  font-weight: 950;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.service-status {
  color: #93a3af;
  font-size: 0.82rem;
}

.service-status.ok {
  color: #d9f86f;
}

.service-status.bad {
  color: #ffb58f;
}

.settings-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(280px, 0.7fr) minmax(0, 1.3fr);
}

.settings-layout .full,
.settings-actions {
  grid-column: 1 / -1;
}

.settings-layout .panel {
  display: grid;
  gap: 12px;
}

.editor-list {
  display: grid;
  gap: 12px;
}

.editor-card {
  padding: 12px;
}

.field-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wide {
  grid-column: 1 / -1;
}

.check-label {
  align-items: center;
  display: flex;
  gap: 8px;
}

.check-label input {
  min-height: auto;
  width: auto;
}

@media (max-width: 920px) {
  .app-shell,
  .topbar,
  .hero-grid,
  .command-panel,
  .settings-layout,
  .field-grid,
  .global-search,
  .inline-form {
    grid-template-columns: 1fr;
  }

  .sidebar {
    height: auto;
    position: static;
  }

  .mini-status {
    margin-top: 20px;
    position: static;
  }

  .content {
    padding: 18px 12px;
  }
}
