:root {
  color-scheme: dark;
  --bg: #050506;
  --bg-2: #0b0b0d;
  --surface: #111114;
  --surface-2: #18181c;
  --surface-3: #202026;
  --ink: #f4f4f5;
  --muted: #a2a2ad;
  --soft: #d4d4da;
  --line: #303036;
  --line-strong: #474750;
  --red: #be1e2d;
  --red-2: #e33445;
  --red-bg: #351016;
  --amber: #f6a935;
  --amber-bg: #2e2110;
  --green: #31c48d;
  --green-bg: #0d2a20;
  --blue: #7aa7ff;
  --blue-bg: #111d35;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.46);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% -10%, rgba(190, 30, 45, 0.24), transparent 34%),
    linear-gradient(180deg, #09090b 0%, #050506 42%, #09090b 100%);
  color: var(--ink);
  font-family: Raleway, "Inter Tight", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.app-shell {
  min-height: 100vh;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 480px) minmax(320px, 1fr);
  gap: 1px;
  background: var(--line);
}

.auth-card,
.auth-panel,
.loading-card,
.empty-workspace {
  background: rgba(13, 13, 16, 0.94);
}

.auth-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 6vw, 72px);
}

.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100vh;
  padding: clamp(28px, 7vw, 88px);
  background:
    linear-gradient(rgba(5, 5, 6, 0.62), rgba(5, 5, 6, 0.92)),
    linear-gradient(135deg, rgba(190, 30, 45, 0.46), rgba(19, 19, 22, 0.95) 52%, rgba(245, 245, 245, 0.08));
}

.loading-card {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 100vh;
  color: var(--soft);
}

.auth-logo {
  width: min(260px, 70vw);
  height: auto;
  margin-bottom: 48px;
}

.brand-logo {
  width: 210px;
  max-width: 42vw;
  height: auto;
}

.auth-icon,
.empty-icon {
  width: 70px;
  height: 70px;
  object-fit: contain;
  margin-bottom: 24px;
}

.auth-card h1,
.auth-panel h2,
.empty-workspace h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 4.4rem);
  line-height: 0.98;
  font-weight: 800;
}

.auth-panel h2 {
  max-width: 760px;
}

.auth-copy,
.empty-workspace p {
  max-width: 640px;
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.58;
  font-size: 1rem;
}

.auth-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.auth-proof span,
.user-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  padding: 0 12px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.82rem;
  font-weight: 750;
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.auth-form label,
.provision-panel label,
.nav-tools label,
.field-label,
.assistant-form label {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.auth-form label span {
  color: #73737f;
  font-weight: 650;
}

input[type="search"],
input[type="text"],
input[type="email"],
input[type="password"],
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 11px 12px;
  color: var(--ink);
  background: #0a0a0c;
}

.auth-form input {
  margin-top: 7px;
}

.login-note {
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.92rem;
}

.mfa-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.15rem;
  line-height: 1.2;
}

.mfa-setup {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.mfa-qr-card {
  display: grid;
  place-items: center;
  width: min(340px, 100%);
  aspect-ratio: 1;
  justify-self: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: #ffffff;
}

.mfa-qr-code {
  width: 100%;
  height: 100%;
  image-rendering: auto;
}

.mfa-setup textarea {
  min-height: 78px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  word-break: break-all;
}

.mfa-setup input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
}

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

.field-help {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.86rem;
}

textarea {
  min-height: 116px;
  resize: vertical;
  line-height: 1.48;
}

input:focus,
textarea:focus,
button:focus-visible {
  outline: 3px solid rgba(190, 30, 45, 0.28);
  outline-offset: 1px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 22px;
  background: rgba(6, 6, 7, 0.94);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  position: sticky;
  top: 0;
  z-index: 4;
  backdrop-filter: blur(14px);
}

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

.brand h1,
.question-pane-header h2,
.assessment-header h2,
.history-panel h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.2;
  font-weight: 800;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--red-2);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.top-actions,
.header-actions,
.filter-row,
.question-actions,
.choice-grid,
.yesno-row,
.meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.primary-button,
.ghost-button,
.danger-button,
.chip-button,
.segmented-button,
.icon-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 0 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

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

.primary-button:hover {
  background: #a91825;
}

.ghost-button,
.danger-button,
.chip-button,
.segmented-button,
.icon-button {
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
  border-color: var(--line);
}

.danger-button {
  color: #ffd1d6;
  border-color: rgba(227, 52, 69, 0.45);
  background: rgba(190, 30, 45, 0.12);
}

.danger-button:hover {
  background: var(--red-bg);
  border-color: var(--red-2);
}

.ghost-button:hover,
.chip-button:hover,
.segmented-button:hover,
.icon-button:hover {
  border-color: var(--red);
}

.text-button {
  margin-top: 16px;
  align-self: flex-start;
  padding: 0;
  background: transparent;
  color: var(--soft);
  border: 0;
}

.icon-button {
  width: 36px;
  padding: 0;
  font-size: 1.15rem;
}

.compact {
  min-height: 34px;
  padding: 0 11px;
}

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

.alert,
.toast {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 12px;
  line-height: 1.45;
}

.alert {
  margin-top: 18px;
}

.toast {
  margin: 14px 18px 0;
  background: var(--green-bg);
  color: #c8f7e3;
  border-color: rgba(49, 196, 141, 0.45);
}

.alert-error {
  color: #ffd2d7;
  border-color: rgba(227, 52, 69, 0.5);
  background: var(--red-bg);
}

.alert-success {
  color: #c8f7e3;
  border-color: rgba(49, 196, 141, 0.45);
  background: var(--green-bg);
}

.portal-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  align-items: start;
}

.history-panel,
.nav-panel,
.question-pane,
.assistant-panel,
.assessment-header,
.help-queue-panel,
.empty-workspace {
  background: rgba(17, 17, 20, 0.94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.history-panel {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 106px);
  overflow: auto;
}

.panel-header,
.assessment-header,
.nav-tools,
.assistant-inner,
.question-pane-header {
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.panel-header,
.assessment-header,
.question-pane-header,
.assistant-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.assessment-header {
  align-items: center;
}

.history-list {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.provision-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
}

.provision-panel input {
  margin-top: 6px;
}

.admin-users-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.012);
  color: var(--soft);
}

.admin-users-header h3 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 1rem;
}

.admin-user-form {
  display: grid;
  gap: 10px;
}

.admin-user-form input {
  margin-top: 6px;
}

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

.admin-user-row {
  display: grid;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #0b0b0e;
  color: var(--soft);
}

.admin-user-row > div:first-child,
.admin-user-actions {
  display: grid;
  gap: 6px;
}

.admin-user-row strong {
  color: #ffffff;
}

.admin-user-row span:not(.mini-pill) {
  color: #cfd0d8;
  font-size: 0.8rem;
  word-break: break-word;
}

.admin-user-row .admin-self-note {
  color: #cfd0d8;
  font-size: 0.78rem;
  line-height: 1.35;
}

.compact-empty {
  padding: 8px 0 0;
}

.generated-credentials {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(49, 196, 141, 0.36);
  border-radius: 7px;
  background: var(--green-bg);
  color: #c8f7e3;
  font-size: 0.82rem;
}

.generated-credentials code {
  color: #fff;
  word-break: break-all;
}

.assessment-button {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--soft);
  background: transparent;
  text-align: left;
}

.assessment-button strong {
  color: var(--ink);
}

.assessment-button span {
  color: var(--muted);
  font-size: 0.8rem;
}

.assessment-button:hover,
.assessment-button.active {
  background: var(--surface-2);
  border-color: var(--line);
}

.assessment-button.active {
  border-color: rgba(190, 30, 45, 0.72);
}

.assessment-button .help-preview {
  display: block;
  margin-top: 2px;
  color: #e9d4b4;
  font-size: 0.78rem;
  line-height: 1.45;
  white-space: normal;
}

.empty-copy {
  margin: 0;
  padding: 16px;
  color: var(--muted);
}

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

.readonly-banner {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(246, 169, 53, 0.44);
  border-radius: var(--radius);
  background: var(--amber-bg);
  color: #ffd99a;
  box-shadow: var(--shadow);
}

.readonly-banner span {
  color: #e9d4b4;
  line-height: 1.45;
}

.help-queue-panel {
  padding: 14px;
}

.help-queue-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.help-queue-header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
}

.help-queue-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.help-jump-card {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid rgba(246, 169, 53, 0.36);
  border-radius: 7px;
  background: var(--amber-bg);
  color: var(--soft);
  text-align: left;
}

.help-jump-card:hover {
  border-color: var(--red-2);
}

.help-jump-card strong {
  color: var(--ink);
  line-height: 1.35;
}

.help-jump-card span:not(.mini-pill),
.help-jump-card small {
  color: #e9d4b4;
  line-height: 1.45;
}

.empty-workspace {
  min-height: calc(100vh - 126px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 6vw, 72px);
}

.summary-band {
  display: grid;
  grid-template-columns: minmax(260px, 1.3fr) repeat(4, minmax(110px, 0.6fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  box-shadow: var(--shadow);
}

.summary-cell {
  background: rgba(17, 17, 20, 0.98);
  min-height: 86px;
  padding: 16px 18px;
}

.summary-cell strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 1.45rem;
}

.verdict-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}

.verdict-copy {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.progress-track {
  width: 100%;
  height: 8px;
  margin-top: 12px;
  overflow: hidden;
  background: #27272d;
  border-radius: 99px;
}

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

.workspace {
  display: grid;
  grid-template-columns: 270px minmax(420px, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.nav-panel,
.assistant-panel {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 106px);
  overflow: auto;
}

.nav-tools label,
.field-label,
.assistant-form label {
  margin-bottom: 6px;
}

.filter-row {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.chip-button {
  min-height: 30px;
  padding: 0 10px;
  color: var(--soft);
  font-size: 0.8rem;
}

.chip-button.active {
  background: rgba(190, 30, 45, 0.18);
  color: #fff;
  border-color: var(--red);
}

.section-list {
  padding: 10px;
}

.section-button {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  margin: 2px 0;
  padding: 11px 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--soft);
  text-align: left;
}

.section-button:hover,
.section-button.active {
  background: var(--surface-2);
  border-color: var(--line);
}

.section-button.active {
  border-color: rgba(190, 30, 45, 0.62);
}

.section-button span:first-child {
  font-weight: 800;
}

.section-count,
.meta-row {
  color: var(--muted);
  font-size: 0.8rem;
}

.question-pane {
  min-width: 0;
}

.question-list {
  padding: 14px;
}

.question-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 12px;
  background: #0d0d10;
  overflow: hidden;
}

.question-card.is-active {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(190, 30, 45, 0.18);
}

.question-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
}

.question-title-button {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.question-title-button h3 {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.38;
  font-weight: 800;
}

.question-body {
  padding: 14px;
}

.status-pill,
.mini-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid transparent;
  border-radius: 99px;
  padding: 0 9px;
  font-size: 0.75rem;
  font-weight: 850;
}

.status-pass,
.mini-pass {
  background: var(--green-bg);
  color: #baf4dd;
  border-color: rgba(49, 196, 141, 0.36);
}

.status-missing,
.mini-missing {
  background: #23232a;
  color: #c7c7d0;
  border-color: #3a3a43;
}

.status-attention,
.mini-attention {
  background: var(--amber-bg);
  color: #ffd99a;
  border-color: rgba(246, 169, 53, 0.4);
}

.status-fail,
.mini-fail {
  background: var(--red-bg);
  color: #ffd1d6;
  border-color: rgba(227, 52, 69, 0.44);
}

.guidance {
  margin: 0 0 13px;
  padding-left: 12px;
  border-left: 3px solid var(--red);
  color: #c7c7d0;
  line-height: 1.5;
  white-space: pre-line;
}

.choice-grid {
  align-items: stretch;
}

.choice-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 10px;
  background: #09090b;
  color: var(--soft);
  text-align: left;
  white-space: normal;
}

.choice-option.active {
  border-color: var(--red);
  background: rgba(190, 30, 45, 0.13);
  color: #fff;
}

.choice-dot {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  border: 2px solid var(--line-strong);
  border-radius: 99px;
  background: transparent;
}

.choice-option.active .choice-dot {
  border-color: var(--red-2);
  background: var(--red);
  box-shadow: inset 0 0 0 3px #09090b;
}

.yesno-row .segmented-button.active {
  background: rgba(190, 30, 45, 0.18);
  border-color: var(--red);
  color: #fff;
}

.answer-note {
  margin-top: 10px;
}

.finding-panel,
.help-thread,
.assistant-context,
.action-panel {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 11px;
  background: #0a0a0c;
}

.action-panel {
  display: grid;
  gap: 8px;
}

.finding-panel.fail {
  border-color: rgba(227, 52, 69, 0.48);
  background: var(--red-bg);
}

.finding-panel.attention {
  border-color: rgba(246, 169, 53, 0.44);
  background: var(--amber-bg);
}

.finding-panel p,
.assistant-context p,
.help-thread p {
  margin: 4px 0 0;
  color: #c7c7d0;
  line-height: 1.45;
}

.help-thread strong {
  color: var(--ink);
}

.help-item {
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding-top: 10px;
}

.assistant-panel {
  min-width: 0;
}

.assistant-inner {
  border-bottom: 0;
}

.assistant-title-row {
  margin-bottom: 12px;
}

.assistant-title-row h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
}

.assistant-log {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.message {
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  line-height: 1.45;
  background: #0a0a0c;
  color: var(--soft);
}

.message.user {
  background: var(--blue-bg);
  border-color: rgba(122, 167, 255, 0.38);
}

.message.assistant {
  background: var(--green-bg);
  border-color: rgba(49, 196, 141, 0.32);
}

.assistant-form {
  display: grid;
  gap: 10px;
}

.quick-prompts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  margin-top: 12px;
}

.quick-prompts .chip-button {
  justify-content: flex-start;
  text-align: left;
  white-space: normal;
  min-height: 34px;
}

.empty-state {
  padding: 36px 16px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1240px) {
  .workspace {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .assistant-panel {
    grid-column: 1 / -1;
    position: static;
    max-height: none;
  }
}

@media (max-width: 980px) {
  .auth-shell,
  .portal-grid,
  .summary-band,
  .workspace {
    grid-template-columns: 1fr;
  }

  .auth-panel {
    min-height: auto;
  }

  .history-panel,
  .nav-panel {
    position: static;
    max-height: none;
  }
}

@media (max-width: 720px) {
  .topbar,
  .assessment-header,
  .help-queue-header,
  .question-pane-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-grid {
    padding: 12px;
  }

  .brand {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand-logo {
    max-width: 220px;
  }

  .question-header {
    grid-template-columns: 1fr;
  }
}

html[data-brand="iasme"] {
  color-scheme: light;
  --red: #2c7030;
  --red-2: #007226;
  --red-bg: #e8f4eb;
  --amber: #f2aa1d;
  --amber-bg: #fff3d8;
  --green: #2c7030;
  --green-bg: #e8f4eb;
  --blue: #005158;
  --blue-bg: #e5f1f2;
  --bg: #f3f8f4;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #f1f7f3;
  --surface-3: #e2efe5;
  --ink: #1f2247;
  --muted: #526364;
  --soft: #273f45;
  --line: #d7e5dc;
  --line-strong: #a9c7b3;
  --shadow: 0 22px 54px rgba(31, 34, 71, 0.12);
}

html[data-brand="iasme"] body {
  background: linear-gradient(180deg, #2c7030 0, #2c7030 212px, #f3f8f4 212px, #ffffff 100%);
}

html[data-brand="iasme"] .auth-logo {
  width: min(300px, 72vw);
}

html[data-brand="iasme"] .brand-logo {
  width: 210px;
  max-height: 84px;
  object-fit: contain;
}

select,
input[type="number"],
input[type="date"],
input[type="file"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 11px 12px;
  color: var(--ink);
  background: #0a0a0c;
}

html[data-brand="iasme"] select,
html[data-brand="iasme"] input[type="number"],
html[data-brand="iasme"] input[type="date"],
html[data-brand="iasme"] input[type="file"] {
  background: #ffffff;
}

html[data-brand="iasme"] input[type="search"],
html[data-brand="iasme"] input[type="text"],
html[data-brand="iasme"] input[type="email"],
html[data-brand="iasme"] input[type="password"],
html[data-brand="iasme"] textarea {
  background: #ffffff;
}

html[data-brand="iasme"] input:focus,
html[data-brand="iasme"] textarea:focus,
html[data-brand="iasme"] button:focus-visible {
  outline-color: rgba(44, 112, 48, 0.28);
}

html[data-brand="iasme"] .auth-shell {
  background: #d7e5dc;
}

html[data-brand="iasme"] .auth-card,
html[data-brand="iasme"] .auth-panel {
  color: #ffffff;
}

html[data-brand="iasme"] .auth-card {
  background: #2c7030;
}

html[data-brand="iasme"] .auth-panel {
  background: linear-gradient(135deg, #2c7030 0%, #005158 62%, #1f2247 100%);
}

html[data-brand="iasme"] .auth-card h1,
html[data-brand="iasme"] .mfa-heading h2,
html[data-brand="iasme"] .auth-panel h2,
html[data-brand="iasme"] .auth-card .auth-copy,
html[data-brand="iasme"] .auth-card .login-note,
html[data-brand="iasme"] .auth-card label,
html[data-brand="iasme"] .auth-panel .auth-proof span {
  color: #ffffff;
}

html[data-brand="iasme"] .auth-card .eyebrow,
html[data-brand="iasme"] .auth-panel .eyebrow {
  color: #f2aa1d;
}

html[data-brand="iasme"] .auth-card input {
  border-color: rgba(255, 255, 255, 0.64);
  color: #1f2247;
}

html[data-brand="iasme"] .mfa-setup {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.34);
}

html[data-brand="iasme"] .mfa-qr-card {
  border-color: rgba(255, 255, 255, 0.62);
}

html[data-brand="iasme"] .auth-panel .auth-proof span {
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.12);
}

html[data-brand="iasme"] .auth-icon,
html[data-brand="iasme"] .empty-icon {
  width: min(190px, 60vw);
  height: auto;
}

html[data-brand="iasme"] .empty-icon {
  width: min(220px, 60vw);
  padding: 10px 14px;
  border-radius: 7px;
  background: #2c7030;
}

html[data-brand="iasme"] .topbar {
  background: #2c7030;
  border-bottom-color: rgba(255, 255, 255, 0.24);
  color: #ffffff;
}

html[data-brand="iasme"] .topbar h1,
html[data-brand="iasme"] .topbar .eyebrow {
  color: #ffffff;
}

html[data-brand="iasme"] .topbar .user-pill,
html[data-brand="iasme"] .topbar .ghost-button {
  border-color: rgba(255, 255, 255, 0.36);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

html[data-brand="iasme"] .topbar .ghost-button:hover {
  border-color: #f2aa1d;
  background: rgba(255, 255, 255, 0.18);
}

html[data-brand="iasme"] .history-panel,
html[data-brand="iasme"] .nav-panel,
html[data-brand="iasme"] .question-pane,
html[data-brand="iasme"] .assistant-panel,
html[data-brand="iasme"] .assessment-header,
html[data-brand="iasme"] .help-queue-panel,
html[data-brand="iasme"] .empty-workspace,
html[data-brand="iasme"] .summary-cell,
html[data-brand="iasme"] .question-card,
html[data-brand="iasme"] .ce-panel,
html[data-brand="iasme"] .message,
html[data-brand="iasme"] .finding-panel,
html[data-brand="iasme"] .help-thread,
html[data-brand="iasme"] .assistant-context,
html[data-brand="iasme"] .action-panel,
html[data-brand="iasme"] .test-item,
html[data-brand="iasme"] .notice {
  background: #ffffff;
}

html[data-brand="iasme"] .provision-panel,
html[data-brand="iasme"] .admin-users-panel,
html[data-brand="iasme"] .question-header,
html[data-brand="iasme"] .filter-row,
html[data-brand="iasme"] .module-tabs,
html[data-brand="iasme"] .module-subnav,
html[data-brand="iasme"] .ce-panel,
html[data-brand="iasme"] .import-drop {
  background: #f1f7f3;
}

html[data-brand="iasme"] .primary-button {
  background: #2c7030;
  border-color: #2c7030;
}

html[data-brand="iasme"] .primary-button:hover {
  background: #005158;
  border-color: #005158;
}

html[data-brand="iasme"] .danger-button {
  color: #8f1f24;
  border-color: rgba(213, 40, 44, 0.34);
  background: #fde9e7;
}

html[data-brand="iasme"] .ghost-button,
html[data-brand="iasme"] .chip-button,
html[data-brand="iasme"] .segmented-button,
html[data-brand="iasme"] .icon-button,
html[data-brand="iasme"] .module-tab,
html[data-brand="iasme"] .choice-option {
  background: #ffffff;
}

html[data-brand="iasme"] .ghost-button:hover,
html[data-brand="iasme"] .chip-button:hover,
html[data-brand="iasme"] .segmented-button:hover,
html[data-brand="iasme"] .icon-button:hover {
  border-color: #2c7030;
}

html[data-brand="iasme"] .module-tab.active,
html[data-brand="iasme"] .chip-button.active,
html[data-brand="iasme"] .yesno-row .segmented-button.active,
html[data-brand="iasme"] .choice-option.active {
  background: #2c7030;
  border-color: #2c7030;
  color: #ffffff;
}

html[data-brand="iasme"] .assessment-button:hover,
html[data-brand="iasme"] .assessment-button.active,
html[data-brand="iasme"] .section-button:hover,
html[data-brand="iasme"] .section-button.active {
  background: #e8f4eb;
  border-color: #a9c7b3;
}

html[data-brand="iasme"] .assessment-button.active,
html[data-brand="iasme"] .section-button.active,
html[data-brand="iasme"] .question-card.is-active {
  border-color: #2c7030;
}

html[data-brand="iasme"] .question-card.is-active {
  box-shadow: 0 0 0 3px rgba(44, 112, 48, 0.18);
}

html[data-brand="iasme"] .choice-option.active .choice-dot {
  border-color: #f2aa1d;
  background: #f2aa1d;
  box-shadow: inset 0 0 0 3px #2c7030;
}

html[data-brand="iasme"] .progress-track {
  background: #d7e5dc;
}

html[data-brand="iasme"] .progress-fill {
  background: linear-gradient(90deg, #2c7030, #f2aa1d);
}

html[data-brand="iasme"] .admin-users-header h3,
html[data-brand="iasme"] .admin-user-row strong {
  color: #1f2247;
}

html[data-brand="iasme"] .admin-user-row {
  background: #ffffff;
  border-color: #d7e5dc;
  color: #1f2247;
}

html[data-brand="iasme"] .admin-user-row span:not(.mini-pill),
html[data-brand="iasme"] .admin-user-row .admin-self-note {
  color: #526364;
}

html[data-brand="iasme"] .admin-user-row .admin-self-note {
  display: block;
  padding: 8px 9px;
  border: 1px solid #d7e5dc;
  border-radius: 7px;
  background: #eef4f0;
}

html[data-brand="iasme"] .phase {
  background: #ffffff;
}

html[data-brand="iasme"] .phase.current {
  background: #e8f4eb;
  border-color: #2c7030;
}

html[data-brand="iasme"] .message.user {
  background: #e5f1f2;
  border-color: rgba(0, 81, 88, 0.24);
}

html[data-brand="iasme"] .message.assistant,
html[data-brand="iasme"] .toast,
html[data-brand="iasme"] .alert-success,
html[data-brand="iasme"] .status-pass,
html[data-brand="iasme"] .mini-pass,
html[data-brand="iasme"] .generated-credentials {
  color: #2c7030;
  background: #e8f4eb;
  border-color: rgba(44, 112, 48, 0.28);
}

html[data-brand="iasme"] .generated-credentials code {
  color: #1f2247;
}

html[data-brand="iasme"] .status-missing,
html[data-brand="iasme"] .mini-missing {
  color: #526364;
  background: #eef4f0;
  border-color: #d7e5dc;
}

html[data-brand="iasme"] .status-attention,
html[data-brand="iasme"] .mini-attention,
html[data-brand="iasme"] .mini-review,
html[data-brand="iasme"] .mini-in-progress,
html[data-brand="iasme"] .mini-advisory,
html[data-brand="iasme"] .finding-panel.attention,
html[data-brand="iasme"] .readonly-banner,
html[data-brand="iasme"] .help-jump-card {
  color: #6a4700;
  background: #fff3d8;
  border-color: rgba(242, 170, 29, 0.5);
}

html[data-brand="iasme"] .alert-error,
html[data-brand="iasme"] .status-fail,
html[data-brand="iasme"] .mini-fail,
html[data-brand="iasme"] .mini-blocked,
html[data-brand="iasme"] .finding-panel.fail {
  color: #8f1f24;
  background: #fde9e7;
  border-color: rgba(213, 40, 44, 0.34);
}

html[data-brand="iasme"] .finding-panel p,
html[data-brand="iasme"] .assistant-context p,
html[data-brand="iasme"] .help-thread p,
html[data-brand="iasme"] .help-jump-card span:not(.mini-pill),
html[data-brand="iasme"] .help-jump-card small,
html[data-brand="iasme"] .readonly-banner span {
  color: #526364;
}

html[data-brand="iasme"] .guidance {
  color: #526364;
  border-left-color: #2c7030;
}

.module-tabs,
.module-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.module-tab {
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 0 14px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 850;
}

.module-tab.active {
  border-color: var(--red);
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--red-2));
}

.ce-plus-workspace,
.ce-plus-view,
.stack,
.test-group {
  display: grid;
  gap: 16px;
}

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

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

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

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

.ce-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.ce-panel-header,
.ce-view-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.ce-panel-header h3,
.ce-view-title h3,
.test-item h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.25;
}

.ce-view-title p,
.test-item p,
.ce-metric span {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

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

.phase {
  min-height: 88px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.18);
}

.phase.current {
  border-color: var(--red);
  background: var(--red-bg);
}

.phase strong,
.phase small {
  display: block;
}

.phase small {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.35;
}

.ce-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.ce-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.ce-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.ce-list strong,
.ce-list small {
  display: block;
}

.ce-list small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}

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

.ce-form-grid label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.ce-form-grid input,
.ce-form-grid select,
.ce-form-grid textarea {
  margin-top: 7px;
}

.span-2 {
  grid-column: 1 / -1;
}

.test-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 240px);
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 14px;
  background: rgba(0, 0, 0, 0.14);
}

.test-meta {
  display: grid;
  align-content: start;
  gap: 10px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.mini-pass {
  border-color: rgba(49, 196, 141, 0.55);
  color: #a9f5d7;
  background: var(--green-bg);
}

.mini-fail,
.mini-missing,
.mini-blocked {
  border-color: rgba(227, 52, 69, 0.55);
  color: #ffb4bd;
  background: var(--red-bg);
}

.mini-attention,
.mini-review,
.mini-in-progress,
.mini-advisory {
  border-color: rgba(246, 169, 53, 0.55);
  color: #ffd891;
  background: var(--amber-bg);
}

.import-drop {
  display: grid;
  gap: 8px;
  border: 1px dashed var(--line-strong);
  border-radius: 7px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.notice {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.04);
}

.hidden {
  display: none !important;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

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

th {
  color: var(--soft);
  font-size: 0.74rem;
  text-transform: uppercase;
}

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

.report-text {
  min-height: 520px;
}

@media (max-width: 1100px) {
  .grid-4,
  .grid-3,
  .grid-2,
  .phase-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .grid-4,
  .grid-3,
  .grid-2,
  .phase-rail,
  .ce-form-grid,
  .test-item {
    grid-template-columns: 1fr;
  }

  .ce-panel-header,
  .ce-view-title {
    display: grid;
  }

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

@media print {
  body {
    background: #fff;
    color: #000;
  }

  .topbar,
  .history-panel,
  .nav-panel,
  .assistant-panel,
  .question-pane-header button,
  .header-actions {
    display: none;
  }

  .portal-grid,
  .workspace,
  .summary-band {
    display: block;
    padding: 0;
  }

  .question-pane,
  .question-card,
  .assessment-header {
    box-shadow: none;
    border-color: #999;
  }
}
