:root {
  color-scheme: light;
  --ink: #1d2433;
  --muted: #667085;
  --line: #d8dde7;
  --soft: #f5f7fb;
  --panel: #ffffff;
  --brand: #c82132;
  --brand-dark: #941d2a;
  --gold: #f5b841;
  --green: #147d52;
  --blue: #2854a3;
  --shadow: 0 18px 42px rgba(29, 36, 51, 0.11);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(200, 33, 50, 0.08), transparent 340px),
    var(--soft);
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.shell {
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px clamp(18px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 4;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: white;
  background: var(--brand);
  font-weight: 900;
  letter-spacing: 0;
}

.brand h1 {
  margin: 0;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  letter-spacing: 0;
}

.brand p,
.muted {
  color: var(--muted);
}

.brand p {
  margin: 2px 0 0;
  font-size: 0.9rem;
}

.main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.login-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 28px;
  align-items: stretch;
  min-height: calc(100vh - 124px);
}

.intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  padding: clamp(18px, 4vw, 42px) 0;
}

.intro h2 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(2.2rem, 6vw, 5rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.intro p {
  margin: 0;
  max-width: 660px;
  color: #3c4658;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.6;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 720px;
}

.metric,
.panel,
.card,
.login-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric {
  padding: 16px;
}

.metric strong {
  display: block;
  font-size: 1.7rem;
}

.metric span {
  color: var(--muted);
  font-size: 0.88rem;
}

.login-panel {
  align-self: center;
  padding: 22px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 5px;
  background: #eef1f6;
  border-radius: 8px;
  margin-bottom: 20px;
}

.tab {
  min-height: 42px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.tab.active {
  color: var(--ink);
  background: white;
  box-shadow: 0 4px 16px rgba(29, 36, 51, 0.08);
}

.form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: #344054;
  font-size: 0.88rem;
  font-weight: 800;
}

.field input,
.field select {
  min-width: 0;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--ink);
}

.field input:focus,
.field select:focus {
  outline: 3px solid rgba(200, 33, 50, 0.18);
  border-color: var(--brand);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 7px;
  color: white;
  background: var(--brand);
  font-weight: 850;
  text-decoration: none;
}

.btn:hover {
  background: var(--brand-dark);
}

.btn.secondary {
  color: var(--ink);
  background: #eef1f6;
}

.btn.secondary:hover {
  background: #e3e8f1;
}

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

.btn.small {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 0.86rem;
}

.alert {
  padding: 10px 12px;
  border-radius: 7px;
  background: #fff2f3;
  color: #8d1b27;
  border: 1px solid #f0bbc2;
}

.success {
  padding: 10px 12px;
  border-radius: 7px;
  background: #edf9f3;
  color: #116442;
  border: 1px solid #b7e4cb;
}

.dashboard {
  display: grid;
  gap: 22px;
}

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

.dashboard-head h2,
.panel h3,
.card h3 {
  margin: 0;
  letter-spacing: 0;
}

.dashboard-head p,
.panel p,
.card p {
  margin: 5px 0 0;
  color: var(--muted);
}

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

.panel {
  padding: 18px;
  box-shadow: none;
}

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

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: #475467;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eef1f6;
  color: #344054;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.pill.done {
  color: white;
  background: var(--green);
}

.pill.progress {
  color: white;
  background: var(--blue);
}

.store-groups {
  display: grid;
  gap: 12px;
}

.card {
  padding: 16px;
  box-shadow: none;
}

.store-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.employee-list,
.video-list {
  display: grid;
  gap: 8px;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfe;
}

.list-item strong {
  display: block;
}

.assignment-row {
  align-items: center;
}

.assignment-row input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.assessment-list {
  display: grid;
  gap: 14px;
}

.assessment-question {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.assessment-question legend {
  padding: 0;
  font-weight: 850;
}

.assessment-question p {
  margin: 0;
  color: var(--muted);
}

.answer-choice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px;
  border-radius: 7px;
  background: white;
  border: 1px solid #e7ebf2;
}

.answer-choice input {
  margin-top: 4px;
  flex: 0 0 auto;
}

.video-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
}

.video-nav {
  display: grid;
  gap: 8px;
  align-content: start;
}

.video-select {
  width: 100%;
  padding: 12px;
  text-align: left;
  border-radius: 7px;
  background: white;
  border: 1px solid var(--line);
  color: var(--ink);
}

.video-select.active {
  border-color: var(--brand);
  box-shadow: inset 4px 0 0 var(--brand);
}

.video-player {
  display: grid;
  gap: 12px;
}

video,
.vimeo-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 58vh;
  background: #101828;
  border-radius: 8px;
  border: 0;
}

.empty {
  padding: 18px;
  border: 1px dashed #b9c1cf;
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
}

.footer-note {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .login-grid,
  .panel-grid,
  .video-layout {
    grid-template-columns: 1fr;
  }

  .metric-row,
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-head {
    flex-direction: column;
  }
}

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

  .metric-row,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .intro h2 {
    font-size: 2.35rem;
  }

  .login-panel,
  .panel,
  .card {
    padding: 14px;
  }
}
