:root {
  color-scheme: light;
  font-family:
    Inter, Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #eef1f5;
  color: #17202a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(238, 241, 245, 0.94)),
    url("https://images.unsplash.com/photo-1450101499163-c8848c66ca85?auto=format&fit=crop&w=1800&q=80");
  background-size: cover;
  background-position: center;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 28px 18px;
  background: rgba(20, 27, 36, 0.92);
  color: #fff;
  backdrop-filter: blur(16px);
}

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

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: #53c6a1;
  color: #0d1d1a;
  font-weight: 900;
}

.brand strong,
.brand span {
  display: block;
}

.brand span,
.label,
.sidebar-foot {
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
}

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

.nav-item {
  border: 0;
  border-radius: 8px;
  padding: 12px 14px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  text-align: left;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.sidebar-foot {
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

.workspace-name {
  display: block;
  margin-top: 6px;
  color: #fff;
}

.main {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 28px;
}

.topbar,
.panel-head,
.summary-grid,
.content-grid,
.table-panel {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0 8px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #476170;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 34px;
  line-height: 1.15;
}

h2 {
  font-size: 18px;
}

.topbar p:last-child,
.panel-head p {
  margin-top: 6px;
  color: #5f6b76;
  line-height: 1.55;
}

.mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
  border: 0;
  border-radius: 8px;
  padding: 12px 14px;
  background: #17202a;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 16px 40px rgba(23, 32, 42, 0.18);
}

.toggle-track {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
}

.toggle-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 180ms ease;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric,
.work-panel,
.insight-panel,
.table-panel {
  border: 1px solid rgba(107, 121, 134, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 48px rgba(37, 47, 58, 0.1);
  backdrop-filter: blur(14px);
}

.metric {
  display: grid;
  gap: 6px;
  padding: 18px;
}

.metric-label,
.metric small {
  color: #64727f;
  font-size: 13px;
}

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

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.8fr);
  gap: 18px;
}

.work-panel,
.insight-panel,
.table-panel {
  padding: 20px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
}

.panel-head.compact {
  align-items: center;
}

.primary-action,
.table-actions button {
  border: 0;
  border-radius: 8px;
  padding: 11px 14px;
  background: #278a73;
  color: #fff;
  font-weight: 800;
}

.case-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}

label {
  display: grid;
  gap: 7px;
}

label span {
  color: #5f6b76;
  font-size: 13px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  border: 1px solid #d8dee5;
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  color: #17202a;
}

.process-list {
  display: grid;
  gap: 10px;
}

.process {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid #e3e7eb;
  border-radius: 8px;
  background: #f9fafb;
}

.process p,
.alert span {
  display: block;
  margin-top: 4px;
  color: #64727f;
  font-size: 14px;
  line-height: 1.45;
}

.dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: #a7b1ba;
}

.process.done .dot {
  background: #278a73;
}

.process.active {
  border-color: rgba(39, 138, 115, 0.36);
  background: #f0faf6;
}

.process.active .dot {
  background: #f2b84b;
}

.alert-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.alert {
  padding: 14px;
  border: 1px solid #e3e7eb;
  border-radius: 8px;
  background: #fff;
}

.alert.warning {
  border-color: rgba(209, 138, 33, 0.38);
  background: #fff8ec;
}

.table-panel {
  display: grid;
  gap: 18px;
}

.table-actions {
  display: flex;
  gap: 8px;
}

.table-actions button {
  background: #eef3f6;
  color: #26323d;
}

.table {
  overflow: hidden;
  border: 1px solid #e3e7eb;
  border-radius: 8px;
}

.row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.2fr 0.8fr 0.7fr;
  gap: 14px;
  align-items: center;
  min-width: 760px;
  padding: 14px 16px;
  border-bottom: 1px solid #e7ebef;
  background: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.row:last-child {
  border-bottom: 0;
}

.row.header {
  background: #f4f6f8;
  color: #596775;
  font-size: 13px;
  font-weight: 800;
}

.status {
  display: inline-block;
  min-width: 72px;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.status.running {
  background: #fff1d6;
  color: #8f5e00;
}

.status.done {
  background: #e7f8ef;
  color: #1b765e;
}

.status.issue {
  background: #ffe9e7;
  color: #a33b32;
}

.app[data-mode="saas"] .toggle-thumb {
  transform: translateX(18px);
}

.app[data-mode="saas"] .brand-mark,
.app[data-mode="saas"] .primary-action {
  background: #356df3;
  color: #fff;
}

.app[data-mode="saas"] .sidebar {
  background: rgba(14, 24, 46, 0.94);
}

.app[data-mode="saas"] .process.active {
  border-color: rgba(53, 109, 243, 0.34);
  background: #f2f6ff;
}

.app[data-mode="saas"] .process.done .dot {
  background: #356df3;
}

.app[data-mode="saas"] .mode-toggle {
  background: #356df3;
}

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

  .sidebar {
    position: static;
    padding: 18px;
  }

  .nav {
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    overflow-x: auto;
  }

  .topbar,
  .content-grid {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 640px) {
  .main {
    padding: 18px;
  }

  h1 {
    font-size: 28px;
  }

  .summary-grid,
  .case-form {
    grid-template-columns: 1fr;
  }

  .table {
    overflow-x: auto;
  }
}
