:root {
  --page: #f7f9fc;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-teal: #f0fdfa;
  --text: #18212f;
  --muted: #657184;
  --faint: #94a0b2;
  --line: #e5eaf0;
  --line-strong: #d8dee8;
  --primary: #0f9f91;
  --primary-dark: #0b7f75;
  --primary-soft: #e8f8f5;
  --good: #18864b;
  --good-soft: #eaf8ef;
  --warn: #a86508;
  --warn-soft: #fff7e6;
  --bad: #c73c47;
  --bad-soft: #fff0f1;
  --neutral-soft: #f1f4f7;
  --sidebar-width: 244px;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(20, 32, 50, 0.04);
  --shadow-card: 0 4px 18px rgba(30, 45, 70, 0.055);
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--page);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--page);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}

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

button,
select {
  cursor: pointer;
}

button {
  color: inherit;
}

[hidden] {
  display: none !important;
}

::selection {
  color: #064e47;
  background: rgba(20, 184, 166, 0.2);
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.22;
  pointer-events: none;
}

.ambient-one {
  top: -220px;
  right: -120px;
  background: #a7f3d0;
}

.ambient-two {
  bottom: -260px;
  left: -120px;
  background: #bae6fd;
}

.login-layout {
  position: relative;
  display: grid;
  width: min(440px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  align-content: center;
  gap: 26px;
  padding: 42px 0;
}

.login-layout::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(rgba(15, 159, 145, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 159, 145, 0.025) 1px, transparent 1px),
    linear-gradient(145deg, #fbfdfd 0%, #f4faf9 48%, #f7f9fc 100%);
  background-size: 56px 56px, 56px 56px, auto;
  content: "";
}

.login-intro {
  text-align: center;
}

.brand-mark {
  display: grid;
  width: 62px;
  height: 62px;
  margin: 0 auto;
  place-items: center;
  border-radius: 17px;
  color: white;
  background: linear-gradient(145deg, #19b8a8, #0b8c80);
  box-shadow: 0 12px 30px rgba(15, 159, 145, 0.22);
  font-size: 25px;
  font-weight: 800;
}

.brand-mark-small {
  width: 38px;
  height: 38px;
  margin: 0;
  border-radius: 11px;
  box-shadow: 0 5px 14px rgba(15, 159, 145, 0.18);
  font-size: 17px;
}

.login-intro h1 {
  margin: 17px 0 5px;
  color: #132033;
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -0.035em;
}

.intro-copy {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.trust-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 15px;
}

.trust-row span {
  padding: 5px 9px;
  border: 1px solid #ccebe6;
  border-radius: 999px;
  color: #33796f;
  background: rgba(240, 253, 250, 0.78);
  font-size: 11px;
  font-weight: 600;
}

.login-panel {
  padding: 30px;
  border: 1px solid rgba(218, 225, 234, 0.9);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 48px rgba(40, 60, 85, 0.1);
  backdrop-filter: blur(16px);
}

.panel-kicker {
  margin-bottom: 7px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

.login-panel h2,
.modal h2 {
  margin: 0;
  color: #172235;
  font-size: 23px;
  letter-spacing: -0.025em;
}

.login-panel > p,
.modal p {
  margin: 8px 0 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.form-stack {
  display: grid;
  gap: 17px;
}

label {
  display: grid;
  gap: 7px;
}

label > span {
  color: #465267;
  font-size: 12px;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: none;
  color: var(--text);
  background: var(--surface);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input::placeholder,
textarea::placeholder {
  color: #a4adbb;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #32b9ac;
  box-shadow: 0 0 0 3px rgba(15, 159, 145, 0.11);
}

select option {
  color: var(--text);
  background: white;
}

.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 680;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button:focus-visible,
.nav-item:focus-visible,
.text-button:focus-visible,
.icon-button:focus-visible {
  outline: 3px solid rgba(15, 159, 145, 0.18);
  outline-offset: 2px;
}

.button:disabled {
  cursor: wait;
  opacity: 0.58;
  transform: none;
}

.button-primary {
  color: white;
  background: linear-gradient(135deg, #16ad9f, #0d9185);
  box-shadow: 0 6px 16px rgba(15, 159, 145, 0.18);
}

.button-primary:hover {
  background: linear-gradient(135deg, #139f92, #0b7f75);
  box-shadow: 0 8px 20px rgba(15, 159, 145, 0.23);
}

.button-secondary {
  border-color: var(--line-strong);
  color: #435066;
  background: white;
  box-shadow: var(--shadow-sm);
}

.button-secondary:hover {
  border-color: #c7d0dc;
  background: #f8fafc;
}

.button-danger {
  border-color: #f2c8cc;
  color: #b62f3d;
  background: #fff7f7;
}

.button-danger:hover {
  border-color: #eaaeb5;
  background: #fff0f1;
}

.form-error {
  margin: -4px 0 0 !important;
  color: var(--bad) !important;
  font-size: 12px !important;
}

.security-note {
  margin: 20px 0 0 !important;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  color: var(--faint) !important;
  font-size: 11px !important;
  text-align: center;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  min-width: 0;
  height: 100vh;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px);
}

.sidebar-brand {
  display: flex;
  height: 68px;
  align-items: center;
  gap: 11px;
  padding: 0 20px;
  border-bottom: 1px solid #edf0f4;
}

.sidebar-brand strong,
.sidebar-brand small {
  display: block;
}

.sidebar-brand strong {
  color: #172235;
  font-size: 14px;
  letter-spacing: -0.015em;
}

.sidebar-brand small {
  margin-top: 2px;
  color: var(--faint);
  font-size: 10px;
}

.primary-nav {
  display: grid;
  flex: 1;
  align-content: start;
  gap: 3px;
  padding: 12px;
  overflow-y: auto;
}

.nav-label {
  margin: 8px 11px 4px;
  color: #a1aab7;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-item {
  display: grid;
  grid-template-columns: 29px 1fr;
  width: 100%;
  min-height: 39px;
  align-items: center;
  padding: 7px 11px;
  border: 0;
  border-radius: 10px;
  text-align: left;
  color: #5f6c7e;
  background: transparent;
  font-size: 13px;
  font-weight: 590;
  transition: color 140ms ease, background 140ms ease;
}

.nav-item span {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 7px;
  color: #8b96a7;
  background: #f2f5f8;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  font-weight: 700;
}

.nav-item:hover {
  color: #263247;
  background: #f5f7fa;
}

.nav-item.active {
  color: #0b8076;
  background: var(--primary-soft);
}

.nav-item.active span {
  color: white;
  background: #16a596;
  box-shadow: 0 4px 9px rgba(15, 159, 145, 0.18);
}

.sidebar-foot {
  display: grid;
  gap: 12px;
  margin-top: auto;
  padding: 17px 18px 20px;
  border-top: 1px solid #edf0f4;
}

.connection-state {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.connection-state i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d39a37;
  box-shadow: 0 0 0 3px #fff5df;
}

.connection-state i.connected {
  background: #22a35a;
  box-shadow: 0 0 0 3px #e5f7ec;
}

.connection-state i.disconnected {
  background: #d84d59;
  box-shadow: 0 0 0 3px #fdecee;
}

.text-button {
  width: max-content;
  padding: 0;
  border: 0;
  color: #8390a1;
  background: transparent;
  font-size: 11px;
}

.text-button:hover {
  color: var(--bad);
}

.workspace {
  min-width: 0;
  width: 100%;
  background: var(--page);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 11px clamp(22px, 3vw, 38px);
  border-bottom: 1px solid rgba(225, 230, 237, 0.88);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px);
}

.topbar h1 {
  margin: 0;
  color: #172235;
  font-size: 19px;
  font-weight: 720;
  letter-spacing: -0.02em;
}

.eyebrow {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 450;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 11px;
}

.session-expiry {
  padding: 5px 9px;
  border-radius: 999px;
  color: #718094;
  background: #f2f5f8;
  font-size: 10px;
}

.notice-region,
.content {
  width: min(100%, 1540px);
  margin-right: auto;
  margin-left: auto;
  padding-right: clamp(20px, 3vw, 38px);
  padding-left: clamp(20px, 3vw, 38px);
}

.notice-region {
  min-height: 28px;
  padding-top: 14px;
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #bfe8e2;
  border-radius: 10px;
  color: #176f66;
  background: #effbf9;
  font-size: 12px;
}

.notice.error {
  border-color: #f1c3c8;
  color: #b62f3d;
  background: #fff3f4;
}

.content {
  display: grid;
  gap: 18px;
  padding-top: 8px;
  padding-bottom: 44px;
}

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

.metric-card,
.panel,
.operation-card,
.resource-card,
.workflow-card,
.onboarding-hero,
.operations-intro,
.funding-card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.referral-query-panel {
  display: grid;
  gap: 18px;
}

.referral-card {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(220px, 1fr) auto;
  align-items: center;
  gap: 22px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid #cceae6;
  border-radius: 13px;
  background: linear-gradient(135deg, #f3fbfa, #fff);
}

.referral-card-copy,
.referral-facts div {
  display: grid;
  gap: 5px;
}

.referral-card-copy span,
.referral-card-copy small,
.referral-facts span {
  color: var(--muted);
  font-size: 10px;
}

.referral-card-copy strong {
  overflow-wrap: anywhere;
  color: #087d74;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 17px;
  letter-spacing: 0.025em;
}

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

.referral-facts strong {
  color: #354258;
  font-size: 12px;
}

.metric-card {
  position: relative;
  min-height: 132px;
  padding: 19px;
  overflow: hidden;
  border-radius: var(--radius);
}

.metric-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: #16ad9f;
  content: "";
}

.metric-card:nth-child(2)::before {
  background: #e5a33f;
}

.metric-card:nth-child(3)::before {
  background: #4a8de0;
}

.metric-card:nth-child(4)::before {
  background: #7f6ad8;
}

.metric-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.metric-label::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #17a99b;
  box-shadow: 0 0 0 4px #e9f8f6;
  content: "";
}

.metric-card:nth-child(2) .metric-label::before {
  background: #d4912f;
  box-shadow: 0 0 0 4px #fff5e6;
}

.metric-card:nth-child(3) .metric-label::before {
  background: #4a8de0;
  box-shadow: 0 0 0 4px #edf4fd;
}

.metric-card:nth-child(4) .metric-label::before {
  background: #7f6ad8;
  box-shadow: 0 0 0 4px #f1eefd;
}

.metric-value {
  margin: 20px 0 4px;
  color: #172235;
  font-size: 30px;
  font-weight: 750;
  letter-spacing: -0.035em;
}

.metric-detail {
  color: var(--faint);
  font-size: 10px;
}

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

.panel {
  min-width: 0;
  padding: 20px;
  border-radius: var(--radius);
}

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

.panel-head h2,
.operation-card h2 {
  margin: 0;
  color: #243044;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.panel-head p,
.operation-card > p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
}

.toolbar input,
.toolbar select {
  min-width: 160px;
  min-height: 38px;
  padding: 8px 10px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e8ecf1;
  border-radius: 11px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid #edf0f4;
  text-align: left;
  vertical-align: middle;
}

th {
  color: #6e7a8c;
  background: #f8fafc;
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}

td {
  color: #465267;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: #fbfcfd;
}

.mono {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.truncate {
  display: inline-block;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.status {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}

.status.good {
  color: var(--good);
  background: var(--good-soft);
}

.status.warn {
  color: var(--warn);
  background: var(--warn-soft);
}

.status.bad {
  color: var(--bad);
  background: var(--bad-soft);
}

.status.neutral {
  color: #657184;
  background: var(--neutral-soft);
}

.health-list {
  display: grid;
  gap: 2px;
}

.health-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid #edf0f4;
  color: #5c697b;
  font-size: 11px;
}

.health-row:last-child {
  border-bottom: 0;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.resource-card {
  padding: 17px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.resource-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
}

.resource-title h3 {
  margin: 0;
  color: #263247;
  font-size: 14px;
}

.resource-title p {
  margin: 4px 0 0;
  color: var(--faint);
  font-size: 10px;
}

.resource-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-top: 13px;
  border-top: 1px solid #edf0f4;
}

.resource-facts div {
  min-width: 0;
}

.resource-facts span,
.resource-facts strong {
  display: block;
}

.resource-facts span {
  margin-bottom: 3px;
  color: var(--faint);
  font-size: 9px;
}

.resource-facts strong {
  overflow: hidden;
  color: #526074;
  font-size: 10px;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operation-card {
  padding: 20px;
  border-radius: var(--radius);
}

.operation-card .form-stack {
  margin-top: 18px;
}

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

.form-grid .full {
  grid-column: 1 / -1;
}

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

.attention-list {
  display: grid;
  gap: 9px;
}

.attention-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border: 1px solid #f0e2c7;
  border-radius: 10px;
  color: #79531d;
  background: #fffbf3;
  font-size: 11px;
}

.attention-item i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #d99b38;
  box-shadow: 0 0 0 4px #fff1d6;
}

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

.quick-action {
  display: flex;
  min-width: 0;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  text-align: left;
  background: #fbfcfd;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.quick-action:hover {
  border-color: #bfe2dd;
  background: #f3fbf9;
  transform: translateY(-1px);
}

.quick-action span,
.quick-action strong,
.quick-action small {
  display: block;
  min-width: 0;
}

.quick-action strong {
  color: #2a374b;
  font-size: 12px;
}

.quick-action small {
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-action i {
  color: var(--primary);
  font-size: 16px;
  font-style: normal;
}

.onboarding-hero,
.operations-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 24px;
  border-color: #cde9e5;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 88% 20%, rgba(32, 184, 166, 0.13), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f2fbf9 100%);
}

.onboarding-hero h2,
.operations-intro h2 {
  margin: 4px 0 7px;
  color: #1b2b3e;
  font-size: 21px;
  letter-spacing: -0.025em;
}

.onboarding-hero > div > p:last-child,
.operations-intro > div > p:last-child {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

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

.workflow-card {
  position: relative;
  min-width: 0;
  padding: 22px;
  border-radius: var(--radius);
}

.workflow-card-wide {
  grid-column: 1 / -1;
}

.workflow-step {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  color: white;
  background: linear-gradient(145deg, #19b8a8, #0b8c80);
  box-shadow: 0 6px 14px rgba(15, 159, 145, 0.18);
  font-size: 12px;
  font-weight: 750;
}

.workflow-copy {
  margin: 14px 0 18px;
}

.workflow-copy h2 {
  margin: 0;
  color: #243044;
  font-size: 16px;
}

.workflow-copy p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.query-toolbar {
  max-width: 520px;
}

.funding-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.funding-card {
  display: grid;
  min-height: 132px;
  align-content: center;
  gap: 7px;
  padding: 20px;
  border-radius: var(--radius);
}

.funding-card span,
.funding-card small {
  color: var(--muted);
  font-size: 10px;
}

.funding-card strong {
  color: #182437;
  font-size: 26px;
  letter-spacing: -0.03em;
}

.account-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.account-meta div {
  display: grid;
  gap: 5px;
}

.account-meta span {
  color: var(--faint);
  font-size: 10px;
}

.account-meta strong {
  color: #354258;
  font-size: 13px;
}

.muted-copy {
  color: var(--faint);
  font-size: 9px;
}

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

.operation-disclosures {
  display: grid;
  gap: 12px;
}

.operation-disclosure {
  padding: 0;
  overflow: hidden;
}

.operation-disclosure summary {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 20px;
  list-style: none;
  cursor: pointer;
}

.operation-disclosure summary::-webkit-details-marker {
  display: none;
}

.operation-disclosure summary span,
.operation-disclosure summary strong,
.operation-disclosure summary small {
  display: block;
}

.operation-disclosure summary strong {
  color: #263247;
  font-size: 13px;
}

.operation-disclosure summary small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.operation-disclosure summary i {
  color: var(--primary);
  font-size: 18px;
  font-style: normal;
  transition: transform 140ms ease;
}

.operation-disclosure[open] summary {
  border-bottom: 1px solid var(--line);
  background: #f9fbfc;
}

.operation-disclosure[open] summary i {
  transform: rotate(45deg);
}

.disclosure-body {
  margin: 0 !important;
  padding: 20px;
}

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

pre {
  max-height: 460px;
  margin: 12px 0 0;
  padding: 15px;
  overflow: auto;
  border: 1px solid #dfe5ec;
  border-radius: 11px;
  color: #304057;
  background: #f7f9fb;
  font-size: 10px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.loading-state,
.empty-state {
  display: grid;
  min-height: 190px;
  place-items: center;
  color: var(--faint);
  text-align: center;
  font-size: 12px;
}

.empty-state.compact {
  min-height: 90px;
}

.empty-panel {
  padding: 0;
}

.loading-state span {
  display: inline-block;
  width: 24px;
  height: 24px;
  margin-bottom: 10px;
  border: 2px solid #d9e4e4;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 720ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.modal {
  width: min(420px, calc(100% - 30px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--text);
  background: white;
  box-shadow: 0 24px 70px rgba(22, 34, 52, 0.2);
}

.modal::backdrop {
  background: rgba(31, 42, 58, 0.42);
  backdrop-filter: blur(3px);
}

.modal form {
  padding: 25px;
}

.credential-dialog-body {
  display: grid;
  gap: 18px;
  padding: 25px;
}

.credential-dialog-body > p {
  margin: 0;
}

.credential-dialog-body > code {
  display: block;
  max-height: 180px;
  padding: 14px;
  overflow: auto;
  border: 1px solid #ead6aa;
  border-radius: 10px;
  color: #344156;
  background: #fffaf0;
  font-size: 12px;
  line-height: 1.6;
  word-break: break-all;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.modal-head .eyebrow {
  margin: 0 0 4px;
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.icon-button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #7c8898;
  background: white;
  font-size: 18px;
}

.icon-button:hover {
  color: #344156;
  background: #f6f8fa;
}

@media (max-width: 1120px) {
  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: static;
    width: 100%;
    min-width: 0;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-brand {
    height: 60px;
    padding: 0 16px;
  }

  .primary-nav {
    display: flex;
    width: 100%;
    max-width: 100%;
    flex: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 14px;
  }

  .nav-label {
    display: none;
  }

  .nav-item {
    display: flex;
    width: auto;
    min-height: 38px;
    flex: 0 0 auto;
    gap: 7px;
    padding: 7px 10px;
  }

  .nav-item span {
    width: 21px;
    height: 21px;
  }

  .sidebar-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px 10px;
  }

  .topbar {
    top: 0;
    min-height: 64px;
  }

  .session-expiry {
    display: none;
  }

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

  .workflow-card-wide {
    grid-column: auto;
  }

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

@media (max-width: 620px) {
  .login-layout {
    width: min(100% - 24px, 440px);
    padding: 28px 0;
  }

  .login-panel {
    padding: 23px 20px;
  }

  .topbar {
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 12px 16px;
  }

  .topbar-actions {
    align-self: center;
  }

  .notice-region,
  .content {
    padding-right: 14px;
    padding-left: 14px;
  }

  .metrics-grid,
  .resource-grid,
  .form-grid,
  .form-grid-three,
  .funding-summary,
  .account-meta,
  .quick-action-grid,
  .context-links {
    grid-template-columns: minmax(0, 1fr);
  }

  .referral-card,
  .referral-facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .referral-card .button {
    width: 100%;
  }

  .form-grid .full {
    grid-column: auto;
  }

  .panel {
    padding: 16px;
  }

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

  .toolbar {
    width: 100%;
  }

  .toolbar input,
  .toolbar select {
    width: 100%;
  }

  .onboarding-hero,
  .operations-intro {
    align-items: flex-start;
    flex-direction: column;
  }

  .onboarding-hero .button,
  .operations-intro .button {
    width: 100%;
  }

  .content > *,
  .workspace,
  .topbar,
  .notice-region,
  .content {
    min-width: 0;
    max-width: 100%;
  }

  .notice {
    overflow-wrap: anywhere;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
