:root {
  color-scheme: light;
  --ink: #152238;
  --muted: #5f7088;
  --line: #d9e3ef;
  --soft: #eef5fb;
  --blue: #1f6fb8;
  --green: #15835c;
  --gold: #a46300;
  --red: #b4232a;
  --panel: #ffffff;
}

* {
  box-sizing: border-box;
}

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

.shell {
  width: min(1180px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 42px 0 60px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 28px;
}

.brand-kicker {
  color: #4f6e92;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 10px 0 0;
  font-size: 44px;
  letter-spacing: 0;
}

h2 {
  margin: 0 0 12px;
  font-size: 25px;
}

p {
  color: var(--muted);
  line-height: 1.72;
  font-size: 18px;
}

.nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a,
.button {
  color: #254568;
  text-decoration: none;
  border: 1px solid #bfd0e3;
  background: #fff;
  border-radius: 8px;
  padding: 12px 17px;
  font-weight: 750;
}

.hero,
.card,
.band {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.hero {
  margin-top: 28px;
  padding: 34px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
}

.badge-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 8px 12px;
  border: 1px solid #b9d7c8;
  background: #eefaf3;
  color: var(--green);
  font-weight: 800;
  font-size: 13px;
}

.badge.gold {
  border-color: #f1ce8f;
  background: #fff7e8;
  color: var(--gold);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 18px;
}

.card {
  min-width: 0;
  padding: 22px;
}

.card strong {
  display: block;
  font-size: 18px;
  margin-bottom: 8px;
}

.metric {
  font-size: 36px;
  font-weight: 850;
}

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

.flow-line {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 18px;
}

.flow-line span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f9fc;
  color: #29496b;
  font-weight: 800;
}

.band {
  margin-top: 18px;
  padding: 24px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.compact-head {
  align-items: center;
  margin-bottom: 8px;
}

.primary-button {
  min-height: 48px;
  border: 1px solid #1f6fb8;
  border-radius: 8px;
  background: #1f6fb8;
  color: #fff;
  padding: 0 18px;
  font-weight: 850;
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap;
}

.secondary-button {
  min-height: 48px;
  border: 1px solid #bfd0e3;
  border-radius: 8px;
  background: #fff;
  color: #254568;
  padding: 0 18px;
  font-weight: 850;
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap;
}

.small-button {
  min-height: 38px;
  padding: 0 12px;
  font-size: 13px;
}

.compact-select {
  min-height: 38px;
  border: 1px solid #bfd0e3;
  border-radius: 8px;
  background: #fff;
  color: #254568;
  padding: 0 10px;
  font-weight: 850;
}

.danger-outline {
  border-color: #f0b8b8;
  color: #9f1d1d;
}

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

.button-stack {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.primary-button:disabled,
.secondary-button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.input-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 180px;
  gap: 12px;
  margin: 0 0 18px;
}

.input-grid label {
  display: grid;
  gap: 8px;
  color: #53647b;
  font-weight: 800;
}

.input-grid input,
.input-grid select {
  min-height: 46px;
  width: 100%;
  border: 1px solid #bfd0e3;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
}

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

.flow-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.flow-card {
  position: relative;
  min-height: 174px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  padding: 22px;
}

.flow-card.is-ok {
  border-left: 4px solid var(--green);
}

.flow-card.is-warn {
  border-left: 4px solid var(--gold);
}

.flow-card.is-error {
  border-left: 4px solid var(--red);
}

.flow-card strong {
  display: block;
  font-size: 18px;
  margin: 10px 0 8px;
}

.step-no {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e5eff9;
  color: #315777;
  font-weight: 850;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border-radius: 999px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: #f6f9fc;
  color: #53647b;
  font-size: 13px;
  font-weight: 850;
}

.pill.ok {
  border-color: #a6dcbc;
  background: #eefaf3;
  color: var(--green);
}

.pill.warn {
  border-color: #f1ce8f;
  background: #fff7e8;
  color: var(--gold);
}

.pill.error {
  border-color: #f2b3b7;
  background: #fff0f1;
  color: var(--red);
}

.pill.muted {
  background: #f6f9fc;
}

.status-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  background: #fff;
  border: 1px solid var(--line);
}

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

.status-table th {
  background: #f6f9fc;
  color: #53647b;
}

.compact-table {
  table-layout: fixed;
}

.compact-table th:first-child,
.compact-table td:first-child {
  width: 130px;
}

.compact-table td {
  overflow-wrap: anywhere;
}

.storage-split {
  margin-top: 16px;
}

.record-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  color: var(--muted);
}

.session-list-head {
  margin-top: 18px;
}

.record-button {
  display: grid;
  gap: 5px;
  width: 100%;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  color: var(--ink);
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
}

.record-button span,
.record-button small {
  overflow-wrap: anywhere;
}

.record-button span {
  font-weight: 850;
}

.record-button small {
  color: var(--muted);
}

.record-button:hover {
  border-color: #9fb9d8;
  background: #eef5fb;
}

.record-button.allow {
  border-left: 4px solid var(--ok);
}

.record-button.block {
  border-left: 4px solid var(--danger);
}

.os-agent-card {
  margin-top: 16px;
  border-left: 4px solid #264f7a;
}

.access-flow-panel {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.mobile-approval-panel {
  border-top: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
}

.mobile-device-shell {
  border: 1px solid #c7d8ea;
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
  box-shadow: 0 8px 22px rgba(21, 34, 56, 0.06);
}

.mobile-device-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.mobile-device-top strong {
  display: block;
  margin: 4px 0 0;
  font-size: 20px;
}

.mobile-kicker {
  color: #4f6e92;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mobile-device-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.mobile-device-status span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f9fc;
  color: #315777;
  padding: 10px;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.mobile-product-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 12px;
  margin: 12px 0;
  align-items: stretch;
}

.mobile-detail-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  padding: 14px;
}

.mobile-detail-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 16px;
}

.tight-table {
  margin-top: 10px;
  font-size: 13px;
}

.tight-table th,
.tight-table td {
  padding: 9px 10px;
  vertical-align: top;
}

.tight-table th:first-child,
.tight-table td:first-child {
  width: 120px;
}

.mobile-reject-label {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  color: #53647b;
  font-size: 13px;
  font-weight: 850;
}

.mobile-reject-label select {
  min-height: 38px;
  border: 1px solid #bfd0e3;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font: inherit;
  font-weight: 750;
}

.mobile-detail-actions {
  justify-content: flex-start;
  margin-top: 10px;
}

.mobile-lifecycle-grid {
  align-items: start;
  margin-top: 14px;
}

.mobile-lifecycle-grid .record-list {
  margin-top: 10px;
}

.mobile-approval-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.mobile-approval-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  padding: 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.mobile-approval-card:hover {
  border-color: #9fb9d8;
  background: #f1f7fd;
}

.mobile-approval-card.is-selected {
  border-color: #1f6fb8;
  background: #eef5fb;
  box-shadow: 0 0 0 2px rgba(31, 111, 184, 0.12);
}

.mobile-approval-card.allow {
  border-left: 4px solid var(--green);
}

.mobile-approval-card.block {
  border-left: 4px solid var(--red);
}

.mobile-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.mobile-card-head strong {
  display: block;
  margin: 0 0 4px;
  overflow-wrap: anywhere;
}

.mobile-approval-card p {
  margin: 0;
  font-size: 15px;
}

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

.mobile-card-grid span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  padding: 8px;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.mobile-card-grid b {
  display: block;
  color: var(--ink);
  margin-bottom: 4px;
}

.agent-event {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  padding: 10px 12px;
}

.agent-event.block {
  border-left: 4px solid var(--red);
}

.agent-event.allow {
  border-left: 4px solid var(--green);
}

.agent-event small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.ok {
  color: var(--green);
  font-weight: 850;
}

.warn {
  color: var(--gold);
  font-weight: 850;
}

.small {
  font-size: 15px;
}

.code {
  min-height: 220px;
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111827;
  color: #d7f7e5;
  padding: 16px;
  font-size: 15px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.mini-code {
  min-height: 250px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 10px;
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.steps li {
  min-height: 108px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbff;
  padding: 14px;
}

.steps strong,
.steps span {
  display: block;
}

.steps span {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.download-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.download-guide {
  margin-top: 18px;
  padding: 22px;
}

.download-guide pre {
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111827;
  color: #d7f7e5;
  padding: 16px;
  font-size: 15px;
  line-height: 1.55;
}

.download-guide code,
.download-box code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

@media (max-width: 860px) {
  .top,
  .hero,
  .panel-head,
  .split,
  .download-box {
    grid-template-columns: 1fr;
    display: block;
  }

  .nav {
    justify-content: flex-start;
    margin-top: 18px;
  }

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

  .flow-cards {
    grid-template-columns: 1fr;
  }

  .button-stack,
  .primary-button,
  .secondary-button {
    width: 100%;
    margin-top: 12px;
  }

  .input-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .flow-line {
    grid-template-columns: 1fr 1fr;
  }

  .mobile-device-status,
  .mobile-card-grid,
  .mobile-product-grid {
    grid-template-columns: 1fr;
  }

  .mobile-card-head {
    display: grid;
  }
}
