:root {
  color-scheme: light;
  --ink: #172026;
  --muted: #60707d;
  --line: #d9e0e6;
  --panel: #ffffff;
  --page: #f5f7f9;
  --accent: #0d6b5f;
  --accent-dark: #064c43;
  --warn: #b42318;
  --warn-bg: #fff1ee;
  --ok-bg: #eaf8ef;
  --ok: #1f7a3d;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
}

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

button {
  cursor: pointer;
}

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

.sidebar {
  background: #122129;
  color: #f7fbfc;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #e8fbf7;
  color: #0c584f;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.brand span,
.eyebrow,
.section-head p,
.panel p,
.upload-box small,
.calendar-card p,
.setting-list dd {
  color: var(--muted);
}

.brand span {
  display: block;
  color: #aebdc5;
  font-size: 13px;
  margin-top: 2px;
}

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

.nav-item {
  border: 0;
  border-radius: 8px;
  color: #d9e5e8;
  background: transparent;
  min-height: 44px;
  text-align: left;
  padding: 0 14px;
}

.nav-item.active,
.nav-item:hover {
  background: #21363f;
  color: #ffffff;
}

.main {
  min-width: 0;
  padding: 28px;
}

.topbar,
.section-head,
.panel-head,
.action-bar,
.calendar-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar {
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 13px;
}

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

h1 {
  margin-bottom: 0;
  font-size: 28px;
}

h2 {
  margin-bottom: 8px;
  font-size: 20px;
}

h3 {
  margin-bottom: 6px;
}

.status-pill,
.badge {
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}

.status-pill.ok {
  color: var(--ok);
  background: var(--ok-bg);
}

.status-pill.blocked,
.badge.blocked {
  color: var(--warn);
  background: var(--warn-bg);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.pipeline-list,
.grid,
.department-grid,
.issue-list,
.media-preview {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  align-items: start;
}

.style-card,
.panel,
.calendar-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.style-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.meta {
  background: #f8fafb;
  border: 1px solid #edf1f4;
  border-radius: 8px;
  padding: 10px;
}

.meta span,
.field span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.primary-button,
.secondary-button {
  border: 1px solid transparent;
  border-radius: 8px;
  min-height: 40px;
  padding: 0 14px;
  font-weight: 700;
}

.primary-button {
  background: var(--accent);
  color: #fff;
}

.primary-button:hover {
  background: var(--accent-dark);
}

.secondary-button {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}

.style-summary {
  margin-bottom: 16px;
}

.department-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.department-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
}

.department-card label {
  display: grid;
  gap: 8px;
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

textarea {
  min-height: 92px;
  resize: vertical;
  padding: 10px;
}

input,
select {
  min-height: 40px;
  padding: 0 10px;
}

.upload-box {
  border: 1px dashed #9aabb5;
  border-radius: 8px;
  min-height: 132px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 18px;
  background: #fbfcfd;
}

.upload-box input {
  display: none;
}

.upload-box span {
  font-weight: 800;
}

.media-preview {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.media-preview img,
.media-preview video {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #eef2f5;
}

.issue-panel {
  margin-top: 16px;
}

.issue-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px 110px;
  gap: 12px;
  align-items: start;
  background: #fff;
}

.issue-title {
  font-weight: 800;
  margin-bottom: 6px;
}

.action-bar {
  justify-content: flex-start;
  margin-top: 16px;
}

.date-block {
  width: 96px;
  height: 96px;
  border-radius: 8px;
  background: #e8f5f2;
  color: var(--accent-dark);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.date-block span,
.date-block strong {
  display: block;
}

.date-block strong {
  font-size: 28px;
}

.setting-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.setting-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.setting-list dt,
.setting-list dd {
  margin: 0;
}

.rule-list {
  margin: 0;
  padding-left: 18px;
}

.rule-list li + li {
  margin-top: 10px;
}

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 14px;
    gap: 14px;
  }

  .brand {
    justify-content: center;
  }

  .nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .nav-item {
    text-align: center;
    padding: 0 6px;
    font-size: 13px;
  }

  .main {
    padding: 18px 14px 28px;
  }

  .topbar,
  .section-head,
  .panel-head,
  .action-bar,
  .style-card,
  .calendar-card {
    align-items: stretch;
    flex-direction: column;
  }

  .style-card {
    display: flex;
  }

  .grid.two,
  .department-grid,
  .media-preview {
    grid-template-columns: 1fr;
  }

  .meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .issue-item {
    grid-template-columns: 1fr;
  }

  .status-pill,
  .primary-button,
  .secondary-button {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 420px) {
  h1 {
    font-size: 24px;
  }

  .meta-grid {
    grid-template-columns: 1fr;
  }

  .panel,
  .style-card,
  .calendar-card {
    padding: 14px;
  }
}
