:root {
  --ink: #15171a;
  --muted: #69717c;
  --line: #e5e8ec;
  --surface: #ffffff;
  --soft: #f5f6f8;
  --blue: #0a66c2;
  --green: #16845f;
  --red: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--soft);
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(20px, 4vw, 48px);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-weight: 760;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 13px;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.console-shell {
  padding: 32px clamp(20px, 4vw, 48px);
}

.headline {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 22px;
}

.headline h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: 0;
}

.headline p {
  max-width: 560px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.module {
  min-height: 164px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.module.disabled {
  opacity: 0.58;
}

.module b {
  display: block;
  margin-bottom: 10px;
}

.module p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-top: 18px;
  padding: 0 10px;
  border-radius: 999px;
  background: #edf7f2;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.disabled .pill {
  background: #fff1f0;
  color: var(--red);
}

.login {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-box {
  width: min(100%, 420px);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.login-box h1 {
  margin: 0 0 8px;
}

.login-box p {
  margin: 0 0 22px;
  color: var(--muted);
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 650;
}

select,
textarea,
input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

textarea {
  padding-top: 11px;
  resize: vertical;
}

button {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.ghost {
  background: transparent;
  color: var(--muted);
}

.error {
  margin-bottom: 14px;
  color: var(--red);
}

.notice {
  margin-bottom: 18px;
  padding: 13px 14px;
  border: 1px solid #b7dfcf;
  border-radius: 8px;
  background: #edf7f2;
  color: var(--green);
  font-weight: 650;
}

.error-list {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid #f3b5ad;
  border-radius: 8px;
  background: #fff1f0;
  color: var(--red);
}

.error-list p {
  margin: 0;
}

.error-list p + p {
  margin-top: 6px;
}

.empty-state {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.empty-state h2 {
  margin: 0 0 8px;
}

.empty-state p {
  margin: 0 0 18px;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  border-radius: 8px;
}

.spaced-table {
  margin-top: 16px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
}

.table th,
.table td {
  padding: 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.table th {
  color: var(--muted);
  font-size: 13px;
}

.meta {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.inline-form {
  display: grid;
  grid-template-columns: 74px 96px 120px 64px;
  gap: 8px;
  min-width: 384px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  align-items: start;
}

.form-grid.tight {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.form-section {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.form-section h2 {
  margin: 0;
  font-size: 19px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.detail-panel {
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.detail-panel h2 {
  margin: 0 0 14px;
  font-size: 20px;
}

.detail-panel p {
  margin: 6px 0;
  color: var(--muted);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
}

.compact-form {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 70px;
  gap: 8px;
  min-width: 230px;
}

.muted {
  color: var(--muted);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.metric {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.metric span,
.metric small {
  color: var(--muted);
}

.metric strong {
  font-size: 26px;
}

.inline-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.inline-metrics span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-weight: 700;
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(130px, 180px)) 96px;
  gap: 10px;
  align-items: end;
}

.vendor-user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px 70px;
  gap: 8px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.vendor-user-row:first-of-type {
  border-top: 0;
}

.review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.setting-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.setting-card.locked {
  background: #fafbfc;
}

.setting-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.setting-head h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.setting-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.setting-card form {
  display: grid;
  gap: 12px;
}

.setting-card textarea {
  min-height: 220px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
}

.editor-shell {
  padding-bottom: 80px;
}

.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: 18px;
  align-items: start;
}

.editor-form {
  display: grid;
  gap: 16px;
}

.feature-edit {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(220px, 1.2fr);
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.color-grid label {
  margin-bottom: 0;
}

.color-grid input[type="color"] {
  min-height: 42px;
  padding: 4px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
}

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

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px 12px;
}

.feature-edit:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
}

.secondary-link {
  background: #eef4ff;
  color: var(--blue);
}

.editor-preview {
  position: sticky;
  top: 18px;
}

.preview-browser {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(21, 23, 26, 0.08);
}

.preview-nav {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.preview-nav strong {
  margin-right: auto;
}

.preview-hero {
  padding: 22px;
  background: #f7f8fa;
}

.preview-hero h2 {
  margin: 0;
  font-size: 25px;
  letter-spacing: 0;
  line-height: 1.08;
}

.preview-hero p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.preview-actions span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.preview-actions span + span {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.preview-features {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.preview-features div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.preview-features b,
.preview-features small {
  display: block;
}

.preview-features small {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.35;
}

@media (max-width: 700px) {
  .headline,
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-grid,
  .compact-form,
  .editor-layout,
  .feature-edit,
  .filter-row,
  .vendor-user-row {
    grid-template-columns: 1fr;
  }

  .editor-preview {
    position: static;
  }
}
