:root {
  color-scheme: light;
  --ink: #18201f;
  --muted: #66716d;
  --panel: #ffffff;
  --line: #dce4e0;
  --soft: #f4f7f5;
  --brand: #66cc00;
  --brand-hover: #7dff33;
  --brand-dark: #4e9e00;
  --nav: #111918;
  --warn: #a06300;
  --risk: #b83333;
  --ok: #16834a;
  --blue: #315cba;
  --focus: #0b6f45;
}

* {
  box-sizing: border-box;
}

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

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

button,
select,
input,
textarea {
  border-radius: 8px;
}

button {
  cursor: pointer;
}

.advisor-launch {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding: 11px 12px;
  border: 1px solid rgba(102, 204, 0, 0.32);
  border-radius: 9px;
  color: #b8f77b;
  background: rgba(102, 204, 0, 0.08);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 800;
}

.advisor-launch:hover {
  border-color: #66cc00;
  background: rgba(102, 204, 0, 0.14);
}

button:focus,
input:focus,
select:focus,
a:focus {
  outline: 3px solid rgba(102, 204, 0, 0.35);
  outline-offset: 2px;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(7, 26, 45, 0.12), rgba(5, 12, 18, 0.04) 34%, rgba(5, 12, 18, 0.18) 50%, rgba(5, 12, 18, 0.04) 66%, rgba(7, 26, 45, 0.12)),
    url("/assets/mos-login-background-rc943h.webp") center center / cover no-repeat,
    #071a2d;
}

.login-panel {
  position: relative;
  z-index: 1;
  width: min(460px, 100%);
  padding: clamp(28px, 5vw, 42px);
  background: #ffffff;
  border: 1px solid rgba(102, 204, 0, 0.28);
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.58), 0 0 0 1px rgba(255, 255, 255, 0.04), 0 0 45px rgba(102, 204, 0, 0.08);
  text-align: center;
}

.mos-login__logo {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 100%;
  margin: 0 auto 28px;
  text-align: center;
}

.login-logo {
  display: block;
  width: auto;
  max-width: min(280px, 78%);
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  object-position: center center;
}

.login-lede {
  margin-bottom: 8px;
  font-size: 1.05rem;
  font-weight: 800;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--brand-dark);
  font-weight: 800;
}

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

h1 {
  font-size: 2rem;
  line-height: 1.1;
  margin-bottom: 10px;
}

h2 {
  font-size: 1.35rem;
  margin-bottom: 14px;
}

h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.muted {
  color: var(--muted);
}

.stack {
  display: grid;
  gap: 14px;
  text-align: left;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 700;
}

input,
select,
textarea {
  min-height: 48px;
  border: 1px solid var(--line);
  padding: 0 14px;
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(102, 204, 0, 0.16);
}

textarea {
  min-height: 112px;
  padding: 12px 14px;
  resize: vertical;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

legend {
  padding: 0 6px;
  font-weight: 800;
}

.primary,
.secondary,
.ghost,
.danger {
  min-height: 48px;
  border: 1px solid transparent;
  padding: 0 14px;
  font-weight: 800;
}

.primary {
  background: var(--brand);
  color: #071a2d;
}

.mos-login__submit {
  width: 100%;
  min-height: 52px;
  padding: 0.875rem 1.25rem;
  border: 1px solid #66cc00;
  border-radius: 12px;
  background: #66cc00;
  color: #071a2d;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(102, 204, 0, 0.18);
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.mos-login__submit:hover {
  background: #7dff33;
  border-color: #7dff33;
  box-shadow: 0 10px 30px rgba(102, 204, 0, 0.28);
  transform: translateY(-1px);
}

.mos-login__submit:focus-visible {
  outline: 3px solid rgba(102, 204, 0, 0.35);
  outline-offset: 3px;
}

.mos-login__submit:active {
  transform: translateY(0);
}

.mos-login__submit:disabled,
.mos-login__submit[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
}

.secondary {
  background: #e7f3ed;
  color: #0d4f33;
  border-color: #bfe4cf;
}

.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.danger {
  background: #fbe9e9;
  color: #8d1d1d;
  border-color: #efc4c4;
}

.error-text {
  min-height: 20px;
  color: var(--risk);
  font-weight: 700;
}

.app-shell {
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  overflow: hidden;
}

.sidebar {
  background: var(--nav);
  color: #eef7f2;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 148px;
  padding: 4px 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
}

.brand-logo {
  display: block;
  height: auto;
  margin: 0 auto;
  max-width: 100%;
  object-fit: contain;
  object-position: center center;
}

.brand-logo-primary {
  width: auto;
  max-width: min(160px, 100%);
  max-height: 136px;
}

.brand-logo-compact {
  display: none;
  width: auto;
  max-width: 44px;
  max-height: 44px;
}

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

.nav button {
  width: 100%;
  min-height: 38px;
  border: 0;
  padding: 0 10px;
  color: #d8e4de;
  background: transparent;
  text-align: left;
}

.nav button.active,
.nav button:hover {
  background: rgba(36, 217, 121, 0.16);
  color: #fff;
}

.main {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.topbar {
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  padding: 14px 22px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar h1 {
  font-size: 1.25rem;
  margin: 0;
}

.search {
  width: min(360px, 40vw);
}

.content {
  min-height: 0;
  padding: 24px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.hero,
.welcome-panel {
  display: grid;
  gap: 18px;
  padding: 24px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.hero {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.hero p {
  max-width: 820px;
  margin-bottom: 0;
  color: var(--muted);
}

.hero-status {
  min-width: 220px;
  display: grid;
  justify-items: end;
  gap: 6px;
  align-content: center;
  text-align: right;
}

.hero-status .pill {
  max-width: 220px;
  min-height: 26px;
  padding: 0 10px;
  line-height: 1.15;
}

.welcome-panel {
  max-width: 1080px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.advisor-actions {
  justify-content: center;
  align-items: center;
  width: 100%;
}

.advisor-action-groups {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.advisor-action-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.advisor-action-card__header {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 10px;
  text-align: center;
}

.advisor-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 154px;
  min-height: 48px;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
  touch-action: manipulation;
}

.advisor-action-link:hover,
.advisor-action-link:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(11, 31, 52, 0.12);
}

.advisor-action-link:focus-visible {
  outline: 3px solid rgba(102, 204, 0, 0.35);
  outline-offset: 3px;
}

.advisor-action-link:active {
  transform: translateY(0);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(17, 25, 24, 0.58);
}

.modal-panel {
  width: min(560px, 100%);
  max-height: min(720px, calc(100vh - 48px));
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(17, 25, 24, 0.28);
}

.invitation-handoff__panel {
  display: grid;
  gap: 14px;
}

.invitation-manual-copy input {
  width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
}

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

.check-row {
  display: flex;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 36px;
  font-weight: 800;
}

.check-row input {
  min-height: auto;
}

.activation-form {
  gap: 16px;
}

.client-preview {
  display: grid;
  gap: 14px;
}

.section-gap {
  margin-top: 16px;
}

.grid {
  display: grid;
  gap: 16px;
}

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

.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  min-width: 0;
}

.department-workspace {
  background: transparent;
  min-width: 0;
}

.department-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 14px;
}

.department-card,
.mini-card,
.priority-card,
.soft-card {
  min-width: 0;
}

.department-selector {
  display: grid;
  gap: 8px;
  width: 100%;
  text-align: left;
  color: inherit;
}

.department-selector.active {
  border-color: var(--brand-dark);
  box-shadow: inset 0 0 0 1px var(--brand-dark);
}

.mini-card,
.priority-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

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

.priority-title {
  font-size: 1.2rem;
  font-weight: 900;
}

.capability-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.capability-strip span {
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f5faf7;
  color: #24463a;
  font-size: 0.78rem;
  font-weight: 800;
}

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

.metric-value {
  font-size: 1.55rem;
  font-weight: 900;
  line-height: 1.12;
}

.metric-card {
  display: grid;
  gap: 8px;
}

.metric-card strong {
  display: block;
  overflow-wrap: anywhere;
  line-height: 1.15;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  min-width: 0;
}

.metric-row strong,
.metric-row span {
  overflow-wrap: anywhere;
}

.queue-item {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.queue-item-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.result-panel {
  min-height: 48px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

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

.list-item {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  width: max-content;
  max-width: 100%;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  background: #e8eeeb;
  color: #31413b;
  overflow-wrap: anywhere;
}

.pill.ok {
  background: #dcf5e8;
  color: var(--ok);
}

.pill.watch {
  background: #fff2d8;
  color: var(--warn);
}

.pill.risk,
.pill.critical {
  background: #fbe4e4;
  color: var(--risk);
}

.pill.blocked {
  background: #eee7ff;
  color: #50369a;
}

.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.tabs button {
  min-height: 34px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0 10px;
}

.tabs button.active {
  background: var(--nav);
  color: #fff;
}

.progress {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #dfe7e3;
}

.progress span {
  display: block;
  height: 100%;
  background: var(--brand-dark);
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.timeline-item p {
  margin-bottom: 0;
}

.dot {
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border-radius: 999px;
  background: var(--line);
}

.dot.ok {
  background: var(--ok);
}

.dot.watch {
  background: var(--warn);
}

.dot.risk,
.dot.critical {
  background: var(--risk);
}

.table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

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

.table th {
  background: #f2f6f4;
  font-size: 0.82rem;
}

.empty {
  padding: 18px;
  border: 1px dashed #b9c6c0;
  border-radius: 8px;
  color: var(--muted);
  background: #fbfdfc;
}

.notice {
  border-left: 4px solid var(--blue);
}

.private-note {
  background: #fff8e8;
  border-color: #ecd391;
}

.mobile-menu {
  display: none;
}

@media (max-width: 940px) {
  .app-shell {
    min-height: 100vh;
    height: auto;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .sidebar {
    display: none;
  }

  .sidebar.open {
    display: flex;
    position: fixed;
    z-index: 10;
    inset: 0 auto 0 0;
    width: min(280px, 88vw);
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
  }

  .main,
  .content {
    overflow: visible;
  }

  .brand {
    min-height: 54px;
  }

  .brand-logo-primary {
    display: none;
  }

  .brand-logo-compact {
    display: block;
  }

  .mobile-menu {
    display: inline-flex;
  }

  .grid.cols-2,
  .grid.cols-3,
  .grid.cols-4 {
    grid-template-columns: 1fr;
  }

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

  .topbar-left,
  .topbar-right {
    width: 100%;
    flex-wrap: wrap;
  }

  .search {
    width: 100%;
  }

  .hero,
  .department-header {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .hero-status {
    justify-items: start;
    text-align: left;
    min-width: 0;
  }

  .content {
    padding: 16px;
  }

  .hero,
  .welcome-panel,
  .card,
  .department-header {
    padding: 16px;
  }

  h1 {
    font-size: 1.65rem;
  }
}

@media (max-width: 520px) {
  .topbar {
    padding: 10px;
  }

  .topbar-left {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }

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

  .topbar-right button,
  .topbar-right select,
  .action-row button,
  .advisor-action-link {
    width: 100%;
  }

  .advisor-actions {
    align-items: stretch;
  }

  .metric-value {
    font-size: 1.35rem;
  }

  .metric-row,
  .queue-item-head {
    align-items: start;
    flex-direction: column;
  }

  .content {
    padding: 10px;
  }

  .page-heading h2,
  .topbar h1 {
    font-size: 1.15rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .card,
  .hero,
  .welcome-panel,
  .department-header {
    padding: 12px;
  }

  input,
  select,
  textarea {
    width: 100%;
    min-width: 0;
  }
}

.journey-stage-list {
  display: grid;
  gap: 12px;
}

.journey-stage {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel);
}

.journey-stage.blocked-stage {
  border-color: var(--risk);
}

.stage-heading,
.button-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

.button-row {
  justify-content: flex-start;
  margin-top: 10px;
}
.sales-library-grid { display: grid; gap: 16px; }
.sales-library-category { display: grid; gap: 12px; }
.sales-library-heading,
.sales-library-document { align-items: center; display: flex; gap: 16px; justify-content: space-between; }
.sales-library-heading h3,
.sales-library-document h4,
.sales-library-document p { margin-bottom: 4px; }
.sales-library-document { background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.check-label { align-items: center; display: flex; gap: 8px; }
.check-label input { min-height: 0; width: auto; }
@media (max-width: 720px) {
  .sales-library-heading,
  .sales-library-document { align-items: stretch; flex-direction: column; }
}
