:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif;
  line-height: 1.6;
  color: #20242a;
  background: #f4f6f8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: #f4f6f8;
}

button {
  font: inherit;
}

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

.sidebar {
  background: #202832;
  color: #fff;
  padding: 24px 18px;
}

.brand {
  padding: 0 8px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.brand-name,
.brand-subtitle {
  margin: 0;
}

.brand-name {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.brand-subtitle {
  margin-top: 2px;
  font-size: 0.88rem;
  color: #cbd3dd;
}

.side-nav {
  padding-top: 20px;
}

.nav-group + .nav-group {
  margin-top: 24px;
}

.nav-group-title {
  margin: 0 8px 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #aeb8c4;
  letter-spacing: 0.08em;
}

.nav-item {
  width: 100%;
  display: block;
  border: 0;
  border-radius: 8px;
  padding: 10px 12px;
  text-align: left;
  color: #e9eef4;
  background: transparent;
  cursor: pointer;
}

.nav-item:hover,
.nav-item:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.nav-item.is-active {
  background: #fff;
  color: #202832;
  font-weight: 700;
}

.main-content {
  padding: 32px clamp(20px, 4vw, 56px) 48px;
}

.page-header {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.eyebrow,
.workspace-label {
  margin: 0 0 4px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #69727e;
  letter-spacing: 0.06em;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.3;
}

.environment-badge,
.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.environment-badge {
  background: #e8edf2;
  color: #4e5966;
}

.notice-card,
.workspace-card {
  border: 1px solid #d9dee5;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(31, 39, 48, 0.04);
}

.notice-card {
  padding: 18px 20px;
  margin-bottom: 20px;
}

.notice-card h2,
.notice-card p {
  margin: 0;
}

.notice-card h2 {
  font-size: 1rem;
}

.notice-card p {
  margin-top: 5px;
  color: #5e6874;
}

.workspace-card {
  padding: 24px;
}

.workspace-heading {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid #e7ebef;
}

.workspace-heading h2 {
  margin: 0;
  font-size: 1.2rem;
}

.status-chip {
  background: #f0f2f5;
  color: #59636f;
}

.status-chip--neutral,
.status-chip--loading {
  background: #f0f2f5;
  color: #59636f;
}

.status-chip--success {
  background: #e6f5eb;
  color: #1f6a3a;
}

.status-chip--warning {
  background: #fff4d8;
  color: #7a5710;
}

.status-chip--danger {
  background: #fdeaea;
  color: #9a2d2d;
}

.placeholder {
  min-height: 220px;
  display: grid;
  place-items: center;
  padding: 32px;
  text-align: center;
  color: #68727e;
}

.placeholder p {
  max-width: 640px;
  margin: 0;
}

.state-panel {
  padding-top: 22px;
}

.state-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.button {
  border: 0;
  border-radius: 8px;
  padding: 9px 14px;
  font-weight: 700;
  cursor: pointer;
}

.button--primary {
  background: #202832;
  color: #fff;
}

.button--primary:hover,
.button--primary:focus-visible {
  background: #323d49;
  outline: 2px solid #7f8b98;
  outline-offset: 2px;
}

.state-message {
  padding: 14px 16px;
  border-radius: 10px;
  background: #f1f8f3;
  border: 1px solid #d6eadb;
  margin-bottom: 18px;
}

.state-message--danger {
  background: #fff2f2;
  border-color: #f0cccc;
}

.state-message strong,
.state-message p {
  display: block;
  margin: 0;
}

.state-message p {
  margin-top: 4px;
  color: #56606b;
}

.state-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

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

.state-item {
  min-width: 0;
  padding: 14px;
  border: 1px solid #e3e7ec;
  border-radius: 10px;
  background: #fafbfc;
}

.state-label,
.state-value {
  margin: 0;
}

.state-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #68727e;
}

.state-value {
  margin-top: 4px;
  font-weight: 700;
  color: #20242a;
}

.state-section {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid #e7ebef;
}

.state-section-title {
  margin: 0 0 12px;
  font-size: 1rem;
}

.state-note {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: #fff7e7;
  color: #6f531a;
}

@media (max-width: 900px) {
  .state-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .sidebar {
    padding: 18px 16px;
  }

  .brand {
    padding-bottom: 16px;
  }

  .side-nav {
    display: grid;
    gap: 16px;
  }

  .nav-group,
  .nav-group + .nav-group {
    margin-top: 0;
  }

  .nav-item {
    padding: 10px;
  }

  .main-content {
    padding: 24px 16px 36px;
  }

  .page-header {
    align-items: center;
  }

  .workspace-card {
    padding: 18px;
  }

  .placeholder {
    min-height: 160px;
    padding: 24px 12px;
  }

  .state-grid,
  .state-grid--compact {
    grid-template-columns: 1fr;
  }

  .state-actions {
    justify-content: stretch;
  }

  .state-actions .button {
    width: 100%;
  }
}
