:root {
  --zg-shell-sidebar: #0f172a;
  --zg-shell-sidebar-active: #34445a;
  --zg-shell-page: #f4f8fc;
  --zg-shell-toolbar: #ffffff;
  --zg-shell-table-head: #34445a;
  --zg-shell-line: #d7e1ee;
  --zg-shell-ink: #0f172a;
  --zg-shell-muted: #64748b;
  --zg-shell-sidebar-width: 240px;
  --zg-shell-sidebar-collapsed: 64px;
}

.zg-marketing-shell {
  min-height: 100vh;
  background: var(--zg-shell-page);
  color: var(--zg-shell-muted);
  font-family: var(--zg-font-family, "Open Sans", Arial, sans-serif);
}

.zg-marketing-shell :where(h1, h2, h3, h4, h5, h6) {
  color: var(--zg-shell-ink);
}

.zg-marketing-shell :where(input, textarea, select) {
  border-color: var(--zg-shell-line);
  border-radius: 10px;
  background: #fff;
  color: var(--zg-shell-ink);
}

.zg-marketing-shell :where(input, textarea)::placeholder {
  color: #94a3b8;
}

.zg-marketing-shell :where(table) {
  border-color: var(--zg-shell-line);
  background: #fff;
}

.zg-marketing-shell :where(thead th) {
  border-color: rgba(255, 255, 255, 0.32);
  background: var(--zg-shell-table-head);
  color: #fff;
}

.zg-marketing-shell :where(tbody td) {
  border-color: var(--zg-shell-line);
}

.zg-marketing-shell :where(.newsletter-dialog, .publishing-dialog, .publish-confirm-dialog, .publication-success-dialog) {
  border: 1px solid var(--zg-shell-line);
  border-radius: 20px;
  background: var(--zg-shell-page);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.24);
}

.zg-shell-toggle {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font: inherit;
  line-height: 1;
  transition: background 150ms ease, color 150ms ease;
}

.zg-shell-toggle:hover {
  background: #34445a;
  color: #ffffff;
}

.zg-shell-toggle .zg-shell-toggle-glyph {
  display: block;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: rotate(0);
  transition: transform 180ms ease;
}

.zg-sidebar-collapsed .zg-shell-toggle .zg-shell-toggle-glyph {
  transform: rotate(180deg);
}

/* Community management shell */
.zg-community-shell .sidebar {
  width: var(--zg-shell-sidebar-width);
  padding: 18px 8px 24px 0;
  gap: 18px;
  background: var(--zg-shell-sidebar);
  box-shadow: none;
  transition: width 180ms ease;
}

.zg-community-shell .sidebar-header {
  min-height: 48px;
  padding: 0 8px 0 10px;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.025em;
}

.zg-community-shell .sidebar-btn {
  min-height: 54px;
  border-radius: 0 8px 8px 0;
}

.zg-community-shell .sidebar-btn-icon {
  width: 26px;
  height: 26px;
  flex-basis: 26px;
  color: var(--zg-accent-primary);
}

.zg-community-shell .sidebar-btn-icon svg {
  width: 25px;
  height: 25px;
  stroke-width: 1.7;
}

.zg-community-shell .sidebar-btn-title {
  font-size: 16px;
  line-height: 1.25;
  font-weight: 700;
}

.zg-community-shell .sidebar-btn-subtitle {
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 400;
}

.zg-community-shell .sidebar-btn.active,
.zg-community-shell .sidebar-btn:hover {
  background: var(--zg-shell-sidebar-active);
}

.zg-community-shell .sidebar-btn:hover {
  border-color: transparent;
}

.zg-community-shell .sidebar-btn:hover .sidebar-btn-icon,
.zg-community-shell .sidebar-btn:hover .sidebar-btn-title {
  color: #ffffff;
}

.zg-community-shell .topbar {
  left: var(--zg-shell-sidebar-width);
  height: 68px;
  background: var(--zg-shell-toolbar);
  transition: left 180ms ease;
}

.zg-community-shell .content {
  margin-left: var(--zg-shell-sidebar-width);
  padding: 88px 24px 32px;
  background: var(--zg-shell-page);
  transition: margin-left 180ms ease;
}

.zg-community-shell.zg-sidebar-collapsed .sidebar {
  width: var(--zg-shell-sidebar-collapsed);
}

.zg-community-shell.zg-sidebar-collapsed .sidebar-title,
.zg-community-shell.zg-sidebar-collapsed .sidebar-btn-copy {
  display: none;
}

.zg-community-shell.zg-sidebar-collapsed .sidebar-header,
.zg-community-shell.zg-sidebar-collapsed .sidebar-btn {
  justify-content: center;
  padding-right: 8px;
  padding-left: 8px;
}

.zg-community-shell.zg-sidebar-collapsed .sidebar-btn {
  grid-template-columns: 1fr;
}

.zg-community-shell.zg-sidebar-collapsed .sidebar-separator {
  margin-right: 8px;
  margin-left: 8px;
}

.zg-community-shell.zg-sidebar-collapsed .topbar {
  left: var(--zg-shell-sidebar-collapsed);
}

.zg-community-shell.zg-sidebar-collapsed .content {
  margin-left: var(--zg-shell-sidebar-collapsed);
}

/* Posting management shell */
.zg-posting-shell .zeta-app {
  grid-template-columns: var(--zg-shell-sidebar-width) minmax(0, 1fr);
  background: var(--zg-shell-page);
  transition: grid-template-columns 180ms ease;
}

.zg-posting-shell {
  --newsletter-navy: var(--zg-shell-sidebar);
  --newsletter-navy-2: #162238;
  --newsletter-line: var(--zg-shell-line);
  --newsletter-page: var(--zg-shell-page);
  --newsletter-pink: var(--zg-marketing-primary);
  --newsletter-pink-strong: var(--zg-marketing-primary);
  --newsletter-pink-soft: var(--zg-marketing-secondary);
}

.zg-posting-shell .sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  padding: 0;
  border-right: 1px solid #26334a;
  background: var(--zg-shell-sidebar);
  color: #fff;
}

.zg-posting-shell .logo {
  height: 72px;
  margin: 0;
  padding: 0 10px 0 12px;
  justify-content: flex-start;
  gap: 12px;
}

.zg-posting-shell .logo-text {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.025em;
}

.zg-posting-shell .sidebar nav {
  gap: 6px;
  padding: 0 8px 20px 0;
}

.zg-posting-shell .nav-link {
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  min-height: 54px;
  border-left: 5px solid transparent;
}

.zg-posting-shell .nav-link i {
  font-size: 21px;
  color: var(--zg-accent-primary);
}

.zg-posting-shell .nav-link strong {
  font-size: 16px;
  line-height: 1.25;
  font-weight: 700;
}

.zg-posting-shell .nav-link small {
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 400;
}

.zg-posting-shell .nav-link.active,
.zg-posting-shell .nav-link:hover {
  border-left-color: var(--zg-accent-primary);
  border-top-color: transparent;
  border-right-color: transparent;
  border-bottom-color: transparent;
  background: var(--zg-shell-sidebar-active);
}

.zg-posting-shell .nav-link:hover {
  border-top-color: transparent;
  border-right-color: transparent;
  border-bottom-color: transparent;
  color: #ffffff;
}

.zg-posting-shell .main,
.zg-posting-shell .planner-page,
.zg-posting-shell .posts-page,
.zg-posting-shell .feed-page,
.zg-posting-shell .settings-page {
  grid-column: 2;
}

.zg-posting-shell.zg-sidebar-collapsed .zeta-app {
  grid-template-columns: var(--zg-shell-sidebar-collapsed) minmax(0, 1fr);
}

.zg-posting-shell.zg-sidebar-collapsed .logo {
  justify-content: center;
  padding: 0;
}

.zg-posting-shell.zg-sidebar-collapsed .logo-text,
.zg-posting-shell.zg-sidebar-collapsed .nav-link > span {
  display: none;
}

.zg-posting-shell.zg-sidebar-collapsed .sidebar nav {
  padding-right: 6px;
}

.zg-posting-shell.zg-sidebar-collapsed .nav-link {
  display: flex;
  justify-content: center;
  padding-right: 7px;
  padding-left: 7px;
}

/* Newsletter management shell */
.zg-newsletter-shell .newsletter-app {
  grid-template-columns: var(--zg-shell-sidebar-width) minmax(0, 1fr);
  background: var(--zg-shell-page);
  transition: grid-template-columns 180ms ease;
}

.zg-newsletter-shell {
  --newsletter-navy: var(--zg-shell-sidebar);
  --newsletter-navy-2: #162238;
  --newsletter-line: var(--zg-shell-line);
  --newsletter-page: var(--zg-shell-page);
  --newsletter-pink: var(--zg-marketing-primary);
  --newsletter-pink-strong: var(--zg-marketing-primary);
  --newsletter-pink-soft: var(--zg-marketing-secondary);
}

.zg-newsletter-shell .newsletter-sidebar {
  background: var(--zg-shell-sidebar);
}

.zg-newsletter-shell .newsletter-sidebar-brand {
  height: 72px;
  padding: 0 10px 0 12px;
  gap: 12px;
}

.zg-newsletter-shell .newsletter-sidebar-brand strong {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.025em;
}

.zg-newsletter-shell .newsletter-sidebar .newsletter-nav-btn {
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
}

.zg-newsletter-shell .newsletter-sidebar .newsletter-nav-btn i {
  font-size: 21px;
  color: var(--zg-accent-primary);
}

.zg-newsletter-shell .newsletter-sidebar .newsletter-nav-btn strong {
  font-size: 16px;
  line-height: 1.25;
  font-weight: 700;
}

.zg-newsletter-shell .newsletter-sidebar .newsletter-nav-btn small {
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 400;
}

.zg-newsletter-shell .newsletter-sidebar .newsletter-nav-btn.active,
.zg-newsletter-shell .newsletter-sidebar .newsletter-nav-btn:hover {
  border-left-color: var(--zg-accent-primary);
  border-top-color: transparent;
  border-right-color: transparent;
  border-bottom-color: transparent;
  background: var(--zg-shell-sidebar-active);
}

.zg-newsletter-shell .newsletter-sidebar .newsletter-nav-btn:hover {
  color: #ffffff;
}

.zg-newsletter-shell .newsletter-main,
.zg-newsletter-shell .newsletter-app.without-workspace .newsletter-main {
  grid-column: 2;
}

.zg-newsletter-shell.zg-sidebar-collapsed .newsletter-app {
  grid-template-columns: var(--zg-shell-sidebar-collapsed) minmax(0, 1fr);
}

.zg-newsletter-shell.zg-sidebar-collapsed .newsletter-sidebar-brand {
  justify-content: center;
  padding: 0;
}

.zg-newsletter-shell.zg-sidebar-collapsed .newsletter-sidebar-brand strong,
.zg-newsletter-shell.zg-sidebar-collapsed .newsletter-sidebar .newsletter-nav-btn > span {
  display: none;
}

.zg-newsletter-shell.zg-sidebar-collapsed .newsletter-action-panel {
  padding-right: 6px;
}

.zg-newsletter-shell.zg-sidebar-collapsed .newsletter-sidebar .newsletter-nav-btn {
  display: flex;
  justify-content: center;
  padding-right: 7px;
  padding-left: 7px;
}

/* The reference layout becomes a compact top navigation on smaller screens. */
@media (max-width: 1100px) {
  .zg-shell-toggle {
    display: none;
  }

  .zg-posting-shell .zeta-app,
  .zg-posting-shell.zg-sidebar-collapsed .zeta-app,
  .zg-newsletter-shell .newsletter-app,
  .zg-newsletter-shell.zg-sidebar-collapsed .newsletter-app {
    grid-template-columns: 1fr;
  }

  .zg-posting-shell .main,
  .zg-posting-shell .planner-page,
  .zg-posting-shell .posts-page,
  .zg-posting-shell .feed-page,
  .zg-posting-shell .settings-page,
  .zg-newsletter-shell .newsletter-main,
  .zg-newsletter-shell .newsletter-app.without-workspace .newsletter-main {
    grid-column: 1;
  }

  .zg-posting-shell .sidebar,
  .zg-newsletter-shell .newsletter-sidebar {
    position: static;
    min-height: auto;
  }

  .zg-posting-shell .logo,
  .zg-newsletter-shell .newsletter-sidebar-brand {
    height: 58px;
  }

  .zg-posting-shell .sidebar nav,
  .zg-newsletter-shell .newsletter-action-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0 10px 12px;
  }

  .zg-posting-shell .nav-link,
  .zg-newsletter-shell .newsletter-sidebar .newsletter-nav-btn {
    border-left-width: 1px;
    border-radius: 7px;
  }
}

@media (max-width: 760px) {
  .zg-community-shell .sidebar {
    width: 88px;
    padding: 14px 8px;
  }

  .zg-community-shell .topbar {
    left: 88px;
  }

  .zg-community-shell .content {
    margin-left: 88px;
  }
}

@media (max-width: 600px) {
  .zg-posting-shell .sidebar nav,
  .zg-newsletter-shell .newsletter-action-panel {
    grid-template-columns: 1fr;
  }
}
