:root {
  --bg: #f4f7f4;
  --surface: #ffffff;
  --surface-2: #edf3ef;
  --text: #142018;
  --muted: #647067;
  --line: #d8e1db;
  --green: #168a4a;
  --green-strong: #0b6f3a;
  --yellow: #e4b629;
  --blue: #1574b8;
  --danger: #b42318;
  --shadow: 0 18px 50px rgba(28, 47, 35, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

button,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

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

.sidebar {
  background: #102017;
  color: #f7fff9;
  padding: 24px 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

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

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, var(--green) 0 38%, var(--yellow) 38% 62%, #111 62% 72%, var(--blue) 72% 100%);
  color: #fff;
  font-weight: 800;
  border-radius: 8px;
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
}

.brand-country {
  color: #a9b9ae;
  font-size: 13px;
}

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

.nav-item {
  width: 100%;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #d9e7dd;
  text-align: left;
  padding: 0 12px;
}

.nav-item.is-active {
  background: #f7fff9;
  color: #102017;
}

.nav-item:disabled {
  color: #718075;
}

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

.topbar,
.auth-panel,
.summary-panel,
.workspace-panel,
.work-surface {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
}

.topbar h1,
.work-surface h2,
.auth-panel h2 {
  margin: 0;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.topbar-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.select-field {
  display: grid;
  gap: 6px;
  min-width: 150px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.select-field select {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 0 10px;
}

.auth-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  padding: 22px;
  border-left: 5px solid var(--yellow);
}

.auth-panel p {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--muted);
}

.primary-button,
.ghost-button,
.workspace-chip {
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 0 14px;
  white-space: nowrap;
}

.primary-button {
  border-color: var(--green-strong);
  background: var(--green);
  color: #fff;
  font-weight: 800;
}

.ghost-button,
.workspace-chip {
  background: #fff;
  color: var(--text);
}

.session-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.7fr);
  gap: 20px;
}

.summary-panel,
.workspace-panel,
.work-surface {
  padding: 20px;
}

.panel-head,
.work-surface-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.identity-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 0;
}

.identity-list div {
  min-width: 0;
}

.identity-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

.identity-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.workspace-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.workspace-chip.is-active {
  border-color: var(--green);
  background: var(--surface-2);
  color: var(--green-strong);
  font-weight: 800;
}

.work-surface {
  min-height: 260px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--green-strong);
  padding: 0 10px;
  font-size: 13px;
  font-weight: 800;
}

.view-content {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.view-copy h3 {
  margin: 0 0 8px;
}

.view-copy p {
  margin: 0;
  color: var(--muted);
}

.error-text {
  color: var(--danger);
  font-weight: 800;
}

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

  .sidebar {
    position: static;
  }

  .topbar,
  .auth-panel,
  .panel-head,
  .work-surface-head {
    display: grid;
  }

  .session-grid,
  .identity-list {
    grid-template-columns: 1fr;
  }
}
