:root {
  color-scheme: dark;
  --bg: #07090c;
  --surface: #10141a;
  --surface-2: #151a21;
  --line: #2a3039;
  --text: #f6f7f9;
  --muted: #9aa3af;
  --gold: #d7b56d;
  --cyan: #75d6df;
  --green: #35d47b;
  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; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.topbar {
  min-height: 74px;
  padding: 0 5vw;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(7, 9, 12, .94);
}
.brand, .session { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid #675833; background: #17150f; color: var(--gold);
  font-weight: 900;
}
.brand strong, .brand small { display: block; letter-spacing: 0; }
.brand strong { font-size: 14px; }
.brand small { color: var(--muted); font-size: 11px; margin-top: 2px; }
.session { color: var(--muted); font-size: 13px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px rgba(53,212,123,.5); }

main { width: min(1180px, 90vw); margin: 0 auto; padding: 70px 0 40px; }
.workspace-head { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.eyebrow { color: var(--gold); text-transform: uppercase; font-size: 11px; font-weight: 800; letter-spacing: 1.4px; }
h1 { margin: 13px 0 8px; font-size: clamp(38px, 6vw, 68px); line-height: .98; letter-spacing: 0; }
.workspace-head p { margin: 0; color: var(--muted); font-size: 17px; }
.button {
  min-height: 44px; padding: 0 18px; border: 1px solid var(--line); border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  font-weight: 800; color: var(--text); background: var(--surface);
}
.button:hover { border-color: #5a6471; }
.primary { background: var(--text); color: #080a0d; border-color: var(--text); }

.tabs { display: flex; gap: 4px; margin: 54px 0 22px; border-bottom: 1px solid var(--line); }
.tab {
  border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted);
  padding: 13px 18px; cursor: pointer; font-weight: 800;
}
.tab.active { color: var(--text); border-bottom-color: var(--gold); }
.view { display: none; }
.view.active { display: block; }

.module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.module {
  min-height: 245px; padding: 25px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); display: flex; flex-direction: column; justify-content: space-between;
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
a.module:hover { transform: translateY(-2px); border-color: #596270; background: var(--surface-2); }
.module.featured { border-color: #665a38; background: linear-gradient(135deg, #181711, #10141a 65%); }
.module-top { display: flex; align-items: start; justify-content: space-between; }
.module-code {
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 6px;
  background: #f4f5f6; color: #17191d; font-size: 20px; font-weight: 950;
}
.module-code.custom { background: #17262a; color: var(--cyan); border: 1px solid #27545a; }
.module-code.toyota { background: #271416; color: #ee646b; }
.module-code.hyundai { background: #101d30; color: #72a7e7; }
.tag { border: 1px solid var(--line); border-radius: 999px; padding: 6px 9px; color: var(--muted); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.tag.live { color: #75eaa7; border-color: #205e3b; background: #10261a; }
.module h2 { margin: 30px 0 8px; font-size: 27px; }
.module p { margin: 0; color: var(--muted); line-height: 1.55; }
.module-action { margin-top: 26px; color: var(--gold); font-size: 13px; font-weight: 850; }
.module-action b { margin-left: 4px; }
.unavailable { opacity: .54; }

.empty-state {
  min-height: 400px; border: 1px solid var(--line); display: grid; place-items: center;
  align-content: center; text-align: center; background: var(--surface); border-radius: 8px;
}
.empty-icon { font-size: 36px; color: var(--gold); }
.empty-state h2 { margin: 18px 0 6px; }
.empty-state p { color: var(--muted); margin: 0 0 24px; }
.role-strip {
  margin-top: 36px; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; gap: 30px; color: var(--muted); font-size: 13px;
}
.role-strip strong { display: block; margin-top: 4px; color: var(--text); font-size: 18px; }
footer { width: min(1180px, 90vw); margin: 0 auto; padding: 28px 0 46px; display: flex; justify-content: space-between; color: #6e7783; font-size: 11px; }

@media (max-width: 700px) {
  .topbar { padding: 0 20px; }
  .session span:last-child { display: none; }
  main { width: calc(100% - 32px); padding-top: 44px; }
  .workspace-head { display: block; }
  .workspace-head .button { width: 100%; margin-top: 24px; }
  .tabs { margin-top: 38px; }
  .module-grid { grid-template-columns: 1fr; }
  .module { min-height: 225px; }
  .role-strip { align-items: start; flex-direction: column; gap: 12px; }
  footer { width: calc(100% - 32px); flex-direction: column; gap: 6px; }
}
