:root {
  --bg: #f3f7f2;
  --paper: #fffefa;
  --paper-2: #eef5ee;
  --ink: #1e241f;
  --muted: #637066;
  --line: #d4dfd4;
  --charcoal: #17231f;
  --blue: #2f6f73;
  --green: #4f7d42;
  --gold: #b8842c;
  --mint: #a9dfbf;
  --coral: #c56f4f;
  --red: #a64c4c;
  --shadow: 0 24px 70px rgba(23, 35, 31, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Arial, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(243, 247, 242, 0.96), rgba(250, 252, 248, 0.98)),
    linear-gradient(135deg, rgba(47, 111, 115, 0.12), transparent 32rem),
    var(--bg);
}

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

.app-shell {
  width: min(1180px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 0 42px;
  display: grid;
  gap: 24px;
}

.sidebar {
  min-height: 76px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: center;
}

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

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(169, 223, 191, 0.95), rgba(47, 111, 115, 0.86)),
    var(--charcoal);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 12px 28px rgba(23, 35, 31, 0.18);
}

.brand h1 {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.brand p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.nav-list {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid rgba(23, 35, 31, 0.12);
}

.nav-item {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #425047;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.nav-item.active,
.nav-item:hover {
  border-color: rgba(47, 111, 115, 0.22);
  background: rgba(169, 223, 191, 0.2);
  color: var(--ink);
}

.workspace {
  min-width: 0;
  display: grid;
  gap: 22px;
}

.workspace-header {
  min-height: 360px;
  padding: 42px;
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(23, 35, 31, 0.96), rgba(47, 111, 115, 0.9) 58%, rgba(197, 111, 79, 0.9)),
    var(--charcoal);
  box-shadow: var(--shadow);
}

.workspace-header::before {
  content: "";
  position: absolute;
  left: 38px;
  bottom: 42px;
  width: 230px;
  height: 150px;
  border: 1px solid rgba(169, 223, 191, 0.38);
  background:
    linear-gradient(90deg, rgba(169, 223, 191, 0.18) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(169, 223, 191, 0.08));
  background-size: 46px 46px, 46px 46px, auto;
  box-shadow:
    28px -28px 0 -1px rgba(169, 223, 191, 0.18),
    58px 26px 0 -1px rgba(255, 255, 255, 0.1);
  transform: skewX(-8deg);
  opacity: 0.95;
}

.workspace-header::after {
  content: "";
  position: absolute;
  right: 44px;
  top: 48px;
  width: 210px;
  height: 120px;
  border-left: 10px solid rgba(169, 223, 191, 0.75);
  border-bottom: 10px solid rgba(184, 132, 44, 0.78);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.16) 0 18%, transparent 18% 28%, rgba(255, 255, 255, 0.12) 28% 52%, transparent 52% 63%, rgba(255, 255, 255, 0.18) 63% 100%);
  opacity: 0.75;
}

.workspace-header > div:first-child {
  position: relative;
  z-index: 1;
  margin-left: clamp(0px, 10vw, 160px);
  text-align: center;
}

.header-actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
  justify-content: center;
  justify-self: center;
  width: auto;
  margin-left: clamp(0px, 10vw, 160px);
}

.sync-pill {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.sync-pill.online {
  background: rgba(169, 223, 191, 0.26);
  border-color: rgba(169, 223, 191, 0.48);
}

.eyebrow {
  margin: 0 0 12px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

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

h2 {
  margin-bottom: 10px;
  color: #fff;
  font-size: clamp(3rem, 7vw, 5.6rem);
  font-weight: 500;
  line-height: 0.94;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-copy {
  max-width: 560px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 800;
  line-height: 1.55;
}

h3 {
  margin-bottom: 0;
}

.primary-button,
.secondary-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 0;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 164px;
}

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

.primary-button:hover {
  background: #0f1815;
}

.secondary-button {
  background: rgba(255, 254, 250, 0.9);
  color: var(--charcoal);
  border-color: rgba(169, 223, 191, 0.32);
}

.view {
  display: none;
}

.view.active {
  display: grid;
  gap: 22px;
}

.hero-card,
.panel,
.metric-card {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 14px 36px rgba(23, 35, 31, 0.08);
}

.hero-card {
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px;
  gap: 24px;
  align-items: center;
}

.hero-card .eyebrow {
  color: var(--gold);
}

.hero-card h3 {
  margin-bottom: 8px;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.hero-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.score-ring {
  width: 124px;
  height: 124px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--paper) 0 52%, transparent 53%),
    conic-gradient(var(--green) 0 calc(var(--score, 0) * 1%), #dce7dc calc(var(--score, 0) * 1%) 100%);
  color: var(--charcoal);
  font-weight: 900;
}

.score-ring span {
  font-size: 2.2rem;
  line-height: 1;
}

.score-ring small {
  margin-top: -28px;
  color: var(--muted);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 14px;
}

.profile-strip {
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 14px 36px rgba(23, 35, 31, 0.08);
}

.profile-form,
.list-tools {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.list-tools {
  grid-template-columns: minmax(0, 1fr) 220px;
  margin-bottom: 14px;
}

.metric-card {
  min-height: 112px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-top: 4px solid var(--charcoal);
}

.metric-card:nth-child(2) {
  border-top-color: var(--gold);
}

.metric-card:nth-child(3) {
  border-top-color: var(--green);
}

.metric-card:nth-child(4) {
  border-top-color: var(--blue);
}

.metric-card:nth-child(5) {
  border-top-color: var(--coral);
}

.metric-card span,
.panel-heading span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.metric-card strong {
  font-size: clamp(1.6rem, 2vw, 2rem);
}

.dashboard-grid,
.resume-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
}

.panel {
  padding: 22px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.coach-list,
.task-list,
.card-list,
.table-list,
.timeline-list,
.analytics-list,
.skill-gap-list,
.schema-preview {
  display: grid;
  gap: 12px;
}

.coach-card,
.data-card,
.table-row,
.timeline-item,
.analytics-item,
.skill-gap-card,
.schema-row,
.empty-state {
  padding: 15px;
  border: 1px solid var(--line);
  background: var(--paper-2);
}

.coach-card,
.timeline-item {
  border-left: 4px solid var(--blue);
}

.analytics-item {
  border-left: 4px solid var(--green);
}

.skill-gap-card.missing {
  border-left: 4px solid var(--coral);
}

.skill-gap-card.matched {
  border-left: 4px solid var(--green);
}

.skill-gap-card h4,
.schema-row strong {
  margin: 0 0 6px;
}

.skill-gap-card p,
.schema-row span {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.schema-row {
  display: grid;
  gap: 5px;
}

.coach-card h4,
.data-card h4 {
  margin: 0 0 6px;
}

.coach-card p,
.data-card p,
.table-row p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.task-list {
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.55;
}

.timeline-item,
.analytics-item {
  display: grid;
  gap: 4px;
}

.timeline-item span,
.analytics-item span,
.empty-state {
  color: var(--muted);
  line-height: 1.45;
}

.analytics-item strong {
  font-size: 0.95rem;
  line-height: 1.45;
}

.entry-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

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

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

input,
select {
  min-height: 42px;
  padding: 0 11px;
}

textarea {
  min-height: 280px;
  padding: 12px;
  resize: vertical;
  line-height: 1.5;
}

.table-row {
  display: grid;
  grid-template-columns: 1fr 1fr 0.72fr 0.9fr 1.2fr auto;
  gap: 12px;
  align-items: center;
}

.table-row > div:not(.row-actions) {
  min-width: 0;
  overflow-wrap: anywhere;
}

.pill {
  display: inline-flex;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 6px;
  background: rgba(169, 223, 191, 0.28);
  color: #244c3a;
  font-size: 0.78rem;
  font-weight: 900;
}

.progress-track {
  height: 10px;
  margin-top: 10px;
  overflow: hidden;
  background: #dce7dc;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.full-width {
  width: 100%;
  margin-top: 12px;
}

.button-row,
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.button-row {
  margin-top: 12px;
}

.button-row .primary-button,
.button-row .secondary-button {
  flex: 1;
}

.row-actions {
  justify-content: flex-end;
}

.delete-button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-weight: 800;
}

a {
  color: var(--blue);
  font-weight: 900;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.edit-dialog {
  width: min(620px, calc(100% - 24px));
  border: 1px solid var(--line);
  padding: 0;
  background: transparent;
}

.edit-dialog::backdrop {
  background: rgba(37, 35, 33, 0.46);
}

.edit-panel {
  padding: 22px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.edit-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 1040px) {
  .app-shell {
    width: min(100% - 24px, 760px);
    padding: 14px 0 28px;
  }

  .nav-list {
    justify-content: flex-start;
  }

  .workspace-header {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 28px;
  }

  .workspace-header::before {
    display: none;
  }

  .workspace-header > div:first-child {
    margin-left: 0;
    text-align: left;
  }

  h2 {
    font-size: clamp(2rem, 10vw, 3rem);
    letter-spacing: 0.04em;
    overflow-wrap: anywhere;
  }

  .header-actions {
    justify-self: start;
    margin-left: 0;
    flex-wrap: wrap;
  }

  .metrics-grid,
  .dashboard-grid,
  .resume-grid,
  .entry-form,
  .profile-form,
  .list-tools,
  .table-row,
  .hero-card,
  .edit-fields {
    grid-template-columns: 1fr;
  }

  .row-actions {
    justify-content: flex-start;
  }
}
