:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --ink: #172033;
  --muted: #667085;
  --line: #e4eaf2;
  --brand: #00b982;
  --brand-dark: #06966c;
  --blue: #2f80ed;
  --purple: #7c5cff;
  --orange: #f97316;
  --danger: #e5484d;
  --warn: #f59f00;
  --ok: #12a66a;
  --sidebar: #0f1f2f;
  --sidebar-2: #142a3e;
  --shadow: 0 18px 48px rgba(24, 39, 75, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 10px 18px rgba(0, 185, 130, .18);
  font-weight: 750;
}

button.secondary,
.ghost-button {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}

button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 13px;
  background: #fff;
  color: var(--ink);
  outline: 0;
}

input:focus {
  border-color: rgba(0, 185, 130, .62);
  box-shadow: 0 0 0 4px rgba(0, 185, 130, .1);
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(0, 185, 130, .18), transparent 32%),
    linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
  color: #d8f7ee;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px 14px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.brand-mark,
.brand-logo-text {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 26px;
  font-weight: 900;
  background: linear-gradient(135deg, #1157f2, #10e0ad);
  box-shadow: 0 12px 22px rgba(17, 87, 242, .16);
}

.brand-logo {
  width: 82px;
  height: 82px;
  border-radius: 22px;
  object-fit: contain;
  box-shadow: 0 18px 40px rgba(17, 87, 242, .18);
}

.brand strong {
  display: block;
  color: #fff;
  font-size: 18px;
}

.brand span {
  display: block;
  color: #9ab7c6;
  font-size: 12px;
  margin-top: 3px;
}

.side-nav {
  display: grid;
  gap: 8px;
}

.side-nav a {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
  border-radius: 13px;
  color: #b9d0dc;
  text-decoration: none;
}

.side-nav a:hover,
.side-nav a.active {
  background: rgba(255,255,255,.1);
  color: #fff;
}

.side-nav a.active {
  box-shadow: inset 3px 0 0 var(--brand);
}

.side-nav span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(255,255,255,.08);
}

.side-nav em {
  font-style: normal;
  font-weight: 750;
}

.sidebar-user {
  margin-top: auto;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #f7fbff, #e9f4ff);
  border: 1px solid #cfe0f2;
  box-shadow: 0 14px 30px rgba(47, 128, 237, .12);
  display: grid;
  gap: 7px;
}

.sidebar-user span,
.sidebar-user strong {
  color: #60758f;
  font-size: 13px;
}

.sidebar-user strong {
  color: #172033;
  font-size: 15px;
}

.content {
  width: 100%;
  max-width: 1240px;
  margin: 0;
  padding: 30px 20px 50px;
}

.hero,
.section-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow);
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 34px;
  margin-bottom: 22px;
  background:
    radial-gradient(circle at 90% 10%, rgba(0,185,130,.18), transparent 28%),
    #fff;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 820;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.hero h1 {
  margin: 0;
  font-size: 34px;
}

.hero p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

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

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

.section-head h2 {
  margin: 0;
  font-size: 22px;
}

.section-head p {
  margin: 7px 0 0;
  color: var(--muted);
}

.count-pill {
  border: 1px solid #cfe0f2;
  border-radius: 999px;
  padding: 8px 12px;
  color: #40617e;
  background: #f3f8ff;
  font-size: 13px;
  font-weight: 760;
}

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

.module-card {
  display: flex;
  flex-direction: column;
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  background: #fff;
}

.module-card h3 {
  margin: 18px 0 8px;
  font-size: 22px;
}

.module-card p {
  min-height: 52px;
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.65;
}

.module-top,
.module-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.module-category {
  border-radius: 999px;
  padding: 7px 10px;
  color: #40617e;
  background: #f3f8ff;
  font-size: 12px;
  font-weight: 760;
}

.state-dot {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 820;
}

.state-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.state-dot.online {
  color: #0d8051;
  background: #e9fbf3;
}

.state-dot.offline,
.state-dot.error {
  color: #b84334;
  background: #fff0ef;
}

.state-dot.unconfigured {
  color: #8a5a00;
  background: #fff8e7;
}

.state-dot.checking {
  color: #45627a;
  background: #eef5fb;
}

dl {
  display: grid;
  gap: 9px;
  margin: 0;
}

dl div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
}

dt {
  color: #8a9aac;
  font-size: 12px;
}

dd {
  margin: 0;
  color: #26384d;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.module-note {
  min-height: 42px;
  margin: 16px 0;
  color: #667085;
  font-size: 13px;
  line-height: 1.6;
}

.module-actions {
  margin-top: auto;
}

.module-actions button {
  flex: 1;
}

.accent-blue {
  box-shadow: inset 0 4px 0 var(--blue);
}

.accent-green {
  box-shadow: inset 0 4px 0 var(--brand);
}

.accent-purple {
  box-shadow: inset 0 4px 0 var(--purple);
}

.accent-orange {
  box-shadow: inset 0 4px 0 var(--orange);
}

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

.status-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 1.2fr);
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 15px 16px;
  background: #fff;
}

.status-row strong,
.status-row span,
.status-row small {
  display: block;
}

.status-row span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.status-meta {
  display: grid;
  grid-template-columns: 86px 80px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.status-meta small {
  color: var(--muted);
  line-height: 1.5;
}

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

.module-form button {
  grid-column: span 2;
}

.form-status {
  min-height: 24px;
  margin-top: 12px;
  color: var(--muted);
}

.empty-state {
  border: 1px dashed #cfe0f2;
  border-radius: 16px;
  padding: 22px;
  color: var(--muted);
  background: #f8fbff;
}

.user-access-list {
  display: grid;
  gap: 14px;
}

.user-access-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: #fff;
  display: grid;
  gap: 16px;
}

.user-access-head,
.user-access-actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.user-access-head strong {
  display: block;
  font-size: 18px;
}

.user-access-head span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.status-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #26384d;
  font-weight: 750;
}

.status-toggle input,
.module-checks input {
  width: auto;
  accent-color: var(--brand);
}

.module-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.module-checks label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #cfe0f2;
  border-radius: 999px;
  padding: 8px 12px;
  background: #f8fbff;
  color: #40617e;
  font-weight: 760;
}

.login-body {
  background: #f5f5f5;
}

.login-page {
  width: min(1120px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 86px 0 70px;
}

.logo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-bottom: 70px;
}

.brand-logo-text {
  width: 82px;
  height: 82px;
  border-radius: 22px;
  font-size: 42px;
}

.brand-title {
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
}

.brand-title h1 {
  margin: 0;
  font-size: 44px;
  line-height: 1;
  font-weight: 850;
}

.brand-title p {
  margin: 0;
  color: #5f6978;
  font-size: 18px;
  font-weight: 720;
}

.login-card {
  width: min(920px, 100%);
  margin: 0 auto;
  border-radius: 24px;
  background: #fff;
  padding: 76px 88px 62px;
  box-shadow: 0 16px 42px rgba(24,24,27,.06);
}

.login-panel {
  width: min(520px, 100%);
  margin: 0 auto;
}

.tabs {
  display: flex;
  justify-content: center;
  gap: 58px;
  margin-bottom: 48px;
}

.tab {
  border: 0;
  background: transparent;
  color: #72727c;
  padding: 0 0 9px;
  box-shadow: none;
  cursor: pointer;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 780;
  position: relative;
}

.tab.active {
  color: #151515;
}

.tab.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 34px;
  height: 4px;
  border-radius: 999px;
  background: #151515;
  transform: translateX(-50%);
}

.login-card form,
.modal-dialog form {
  display: grid;
  gap: 22px;
}

.login-card label,
.modal-dialog label {
  display: grid;
  gap: 9px;
  color: transparent;
  font-size: 0;
}

.login-card input,
.modal-dialog input {
  min-height: 64px;
  border-radius: 16px;
  padding: 0 24px;
  font-size: 20px;
  font-weight: 650;
}

.primary-login-button {
  border-radius: 16px;
  min-height: 70px;
  font-size: 22px;
  font-weight: 820;
  background: #191919;
  margin-top: 8px;
}

.helper-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 22px;
  color: #75757e;
  font-size: 16px;
  font-weight: 680;
}

.helper-row span:first-child {
  color: #0a8cff;
}

.text-button {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #75757e;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.status {
  min-height: 24px;
  color: var(--muted);
  font-size: 15px;
  margin-top: 16px;
  text-align: center;
}

.error {
  color: #b84334;
}

.success {
  color: #146d5b;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15,15,18,.36);
  z-index: 20;
}

.modal[hidden],
[hidden] {
  display: none;
}

.modal-dialog {
  width: min(460px, 100%);
  border-radius: 22px;
  background: #fff;
  padding: 34px;
  box-shadow: 0 24px 70px rgba(24,24,27,.18);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.modal-head h2 {
  margin: 0;
  font-size: 26px;
}

.close-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  box-shadow: none;
  color: #6f6f78;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  padding: 0;
}

.fatal-error {
  margin: 40px;
  padding: 24px;
  border-radius: 18px;
  background: #fff;
  color: #b84334;
}

.user-portal-body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 14% 18%, rgba(16, 224, 173, .16), transparent 28%),
    radial-gradient(circle at 84% 12%, rgba(17, 87, 242, .12), transparent 30%),
    linear-gradient(180deg, #f8fcff 0%, #eef6ff 48%, #f7fbf8 100%);
  color: #172033;
}

.user-portal-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(17, 87, 242, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 87, 242, .035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.55), transparent 78%);
}

.portal-bg {
  position: fixed;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(4px);
  opacity: .85;
}

.portal-bg-a {
  width: 420px;
  height: 420px;
  left: -150px;
  top: 110px;
  background: radial-gradient(circle, rgba(16, 224, 173, .2), rgba(16, 224, 173, 0) 68%);
}

.portal-bg-b {
  width: 520px;
  height: 520px;
  right: -190px;
  top: 40px;
  background: radial-gradient(circle, rgba(17, 87, 242, .16), rgba(17, 87, 242, 0) 68%);
}

.portal-bg-c {
  width: 460px;
  height: 460px;
  left: 42%;
  bottom: -260px;
  background: radial-gradient(circle, rgba(124, 92, 255, .11), rgba(124, 92, 255, 0) 70%);
}

.user-portal {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100vw - 56px));
  margin: 0 auto;
  padding: 52px 0 42px;
  text-align: center;
}

.user-portal-header {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.platform-logo-wrap {
  width: 132px;
  height: 132px;
  border-radius: 34px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(214, 228, 242, .82);
  box-shadow:
    0 22px 55px rgba(17, 87, 242, .13),
    inset 0 1px 0 rgba(255,255,255,.72);
  backdrop-filter: blur(14px);
}

.platform-logo {
  width: 106px;
  height: 106px;
  object-fit: contain;
  display: block;
}

.portal-eyebrow {
  margin: 8px 0 0;
  color: #1771d9;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.user-portal-header h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.15;
  font-weight: 850;
  letter-spacing: -.045em;
  color: #132033;
}

.profile-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 28px;
  margin-top: 72px;
}

.profile-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 330px;
  border: 1px solid rgba(212, 226, 242, .78);
  border-radius: 30px;
  padding: 28px 24px 26px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.9), rgba(246,250,255,.74)),
    rgba(255,255,255,.72);
  color: #172033;
  box-shadow: 0 24px 70px rgba(32, 76, 132, .11);
  backdrop-filter: blur(18px);
  display: grid;
  grid-template-rows: 1fr auto;
  justify-items: center;
  align-items: center;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.profile-card::before {
  content: "";
  position: absolute;
  inset: -40% -25% auto;
  height: 190px;
  z-index: -1;
  background: radial-gradient(circle at 50% 0%, rgba(17, 87, 242, .12), transparent 66%);
}

.profile-card::after {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(145deg, rgba(255,255,255,.72), rgba(255,255,255,0));
  pointer-events: none;
}

.profile-card:hover {
  border-color: rgba(17, 113, 217, .24);
  box-shadow: 0 30px 86px rgba(32, 76, 132, .17);
  transform: translateY(-4px);
}

.profile-avatar {
  width: 168px;
  height: 168px;
  border-radius: 44px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 28% 22%, rgba(255,255,255,.28), transparent 28%),
    linear-gradient(135deg, #1666b1, #0f5fa8);
  color: #fff;
  font-size: 66px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 22px 46px rgba(15, 95, 168, .24);
}

.profile-icon {
  width: 114px;
  height: 114px;
  display: block;
  filter: drop-shadow(0 5px 12px rgba(0, 0, 0, .12));
}

.profile-icon-text {
  color: #fff;
  font-size: 80px;
  font-weight: 800;
  line-height: 1;
}

.profile-card.system-contract .profile-avatar {
  background:
    radial-gradient(circle at 28% 22%, rgba(255,255,255,.3), transparent 28%),
    linear-gradient(135deg, #10c995, #00a875);
  box-shadow: 0 22px 46px rgba(0, 168, 117, .24);
}

.profile-card.system-price-score .profile-avatar {
  background:
    radial-gradient(circle at 28% 22%, rgba(255,255,255,.28), transparent 28%),
    linear-gradient(135deg, #7768ff, #5455db);
  box-shadow: 0 22px 46px rgba(91, 92, 226, .24);
}

.profile-card.system-sgcc-radar .profile-avatar {
  background:
    radial-gradient(circle at 28% 22%, rgba(255,255,255,.28), transparent 28%),
    linear-gradient(135deg, #ff9f43, #f97316);
  box-shadow: 0 22px 46px rgba(249, 115, 22, .24);
}

.profile-card-name {
  margin-top: 4px;
  font-size: 23px;
  line-height: 1.25;
  font-weight: 820;
  letter-spacing: -.02em;
}

.user-portal-footer {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 34px;
  padding: 8px 10px 8px 16px;
  border: 1px solid rgba(214, 228, 242, .86);
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 14px 34px rgba(32, 76, 132, .09);
  color: #5d7189;
  font-size: 15px;
  font-weight: 760;
  backdrop-filter: blur(14px);
}

.footer-account {
  padding: 0 8px 0 2px;
}

.user-portal-footer button {
  border: 0;
  border-radius: 999px;
  padding: 9px 16px;
  background: linear-gradient(135deg, rgba(17, 87, 242, .1), rgba(16, 224, 173, .14));
  color: #24415f;
  box-shadow: none;
  font-weight: 820;
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: relative;
    height: auto;
  }
  .content {
    width: min(100% - 28px, 1240px);
  }
  .module-grid {
    grid-template-columns: 1fr;
  }
  .status-row,
  .status-meta,
  .module-form {
    grid-template-columns: 1fr;
  }
  .module-form button {
    grid-column: auto;
  }
  .profile-card-grid {
    grid-template-columns: 1fr;
    margin-top: 52px;
  }
  .profile-card {
    min-height: 250px;
  }
}

@media (max-width: 760px) {
  .login-page {
    width: min(100% - 28px, 1120px);
    padding: 40px 0;
  }
  .logo-row {
    margin-bottom: 36px;
  }
  .brand-logo-text {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    font-size: 32px;
  }
  .brand-logo {
    width: 64px;
    height: 64px;
    border-radius: 18px;
  }
  .brand-title h1 {
    font-size: 32px;
  }
  .brand-title p {
    font-size: 15px;
  }
  .login-card {
    padding: 38px 22px 34px;
    border-radius: 18px;
  }
  .tabs {
    gap: 32px;
    margin-bottom: 30px;
  }
  .tab {
    font-size: 21px;
  }
  .login-card input,
  .modal-dialog input {
    min-height: 56px;
    border-radius: 14px;
    font-size: 17px;
    padding: 0 18px;
  }
  .primary-login-button {
    min-height: 60px;
    border-radius: 14px;
    font-size: 19px;
  }
  .helper-row {
    font-size: 14px;
    flex-direction: column;
    align-items: center;
  }
  .modal-dialog {
    padding: 26px 20px;
    border-radius: 18px;
  }
  .user-portal {
    width: min(100% - 28px, 1060px);
    padding: 46px 0 34px;
  }
  .platform-logo-wrap {
    width: 100px;
    height: 100px;
    border-radius: 28px;
  }
  .platform-logo {
    width: 80px;
    height: 80px;
  }
  .user-portal-header h1 {
    font-size: 30px;
  }
  .portal-eyebrow {
    font-size: 11px;
  }
  .profile-card-grid {
    gap: 16px;
    margin-top: 36px;
  }
  .profile-card {
    min-height: 238px;
    border-radius: 24px;
    padding: 22px 18px;
  }
  .profile-card-name {
    font-size: 19px;
  }
  .profile-avatar {
    width: 126px;
    height: 126px;
    border-radius: 34px;
    font-size: 60px;
  }
  .profile-icon {
    width: 86px;
    height: 86px;
  }
  .profile-icon-text {
    font-size: 60px;
  }
  .user-portal-footer {
    width: 100%;
    justify-content: space-between;
  }
}

/* Enterprise UI consistency pass: restrained, reliable product surface. */
:root {
  --bg: #f4f7fb;
  --bg-2: #eef3f8;
  --panel: #ffffff;
  --panel-muted: #f8fafc;
  --ink: #111827;
  --muted: #526173;
  --line: #d8e2ee;
  --brand: #155eef;
  --brand-dark: #0f3e87;
  --brand-soft: #eef4ff;
  --accent: #0f8f73;
  --accent-soft: #eaf8f4;
  --purple: #5f55d6;
  --orange: #d97706;
  --danger: #b42318;
  --warn: #b7791f;
  --ok: #0f8f73;
  --sidebar: #ffffff;
  --sidebar-2: #f8fafc;
  --shadow: 0 10px 28px rgba(15, 35, 70, 0.08);
  --shadow-strong: 0 18px 42px rgba(15, 35, 70, 0.12);
  --radius-panel: 14px;
  --radius-control: 8px;
}

body,
.login-body,
.user-portal-body {
  background:
    linear-gradient(180deg, #f7f9fc 0%, #eef3f8 100%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
.button-like {
  min-height: 40px;
  border: 1px solid var(--brand);
  border-radius: var(--radius-control);
  background: var(--brand);
  color: #fff;
  box-shadow: none;
  font-weight: 760;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

button:hover {
  background: #0f4ec0;
  border-color: #0f4ec0;
}

button:focus-visible,
input:focus,
select:focus,
textarea:focus {
  outline: 0;
  border-color: rgba(21, 94, 239, .72);
  box-shadow: 0 0 0 3px rgba(21, 94, 239, .12);
}

button.secondary,
.ghost-button,
.text-button {
  background: #fff;
  color: var(--brand-dark);
  border: 1px solid var(--line);
  box-shadow: none;
}

button.secondary:hover,
.ghost-button:hover {
  border-color: rgba(21, 94, 239, .34);
  background: var(--brand-soft);
  color: var(--brand-dark);
}

input,
select,
textarea {
  border-radius: var(--radius-control);
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

input::placeholder,
textarea::placeholder {
  color: #7a8796;
}

.sidebar {
  background: var(--sidebar);
  color: var(--ink);
  border-right: 1px solid var(--line);
  box-shadow: none;
}

.brand {
  border-bottom-color: var(--line);
}

.brand-mark,
.brand-logo-text {
  border-radius: 12px;
  background: var(--brand);
  box-shadow: none;
}

.brand-logo {
  border-radius: 14px;
  box-shadow: none;
}

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

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

.side-nav a {
  border: 1px solid transparent;
  border-radius: 8px;
  color: #475569;
}

.side-nav span {
  display: none;
}

.side-nav a:hover,
.side-nav a.active {
  background: var(--brand-soft);
  border-color: rgba(21, 94, 239, .20);
  color: var(--brand-dark);
  box-shadow: none;
}

.sidebar-user {
  border-radius: 12px;
  background: var(--panel-muted);
  border: 1px solid var(--line);
  box-shadow: none;
}

.sidebar-user span,
.sidebar-user strong {
  color: var(--muted);
}

.sidebar-user strong {
  color: var(--ink);
}

.content {
  padding-top: 28px;
}

.hero,
.section-card,
.module-card,
.status-row,
.user-access-card,
.login-card,
.modal-dialog {
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero {
  background: #fff;
}

.eyebrow,
.portal-eyebrow {
  color: var(--brand-dark);
  letter-spacing: .04em;
  text-transform: none;
}

.hero h1,
.user-portal-header h1 {
  color: var(--ink);
  letter-spacing: -.025em;
}

.module-card {
  min-height: 320px;
}

.module-card:hover,
.profile-card:hover,
.notice-card:hover {
  border-color: rgba(21, 94, 239, .28);
  box-shadow: var(--shadow-strong);
}

.accent-blue,
.accent-green,
.accent-purple,
.accent-orange {
  box-shadow: none;
}

.module-category,
.count-pill,
.state-dot,
.module-checks label {
  border: 1px solid var(--line);
  background: var(--panel-muted);
  color: #42526a;
}

.state-dot.online {
  background: var(--accent-soft);
  color: var(--accent);
}

.state-dot.offline,
.state-dot.error {
  background: #fff1f0;
  color: var(--danger);
}

.state-dot.unconfigured {
  background: #fff8e6;
  color: var(--warn);
}

.login-body {
  display: grid;
  place-items: center;
}

.login-page {
  padding: 58px 0;
}

.logo-row {
  margin-bottom: 42px;
}

.brand-title h1 {
  color: var(--ink);
  font-size: 38px;
  letter-spacing: -.02em;
}

.brand-title p {
  color: var(--muted);
}

.login-card {
  padding: 54px 64px 46px;
}

.tab {
  color: #64748b;
}

.tab.active {
  color: var(--ink);
}

.tab.active::after {
  height: 3px;
  background: var(--brand);
}

.login-card input,
.modal-dialog input {
  min-height: 54px;
  border-radius: var(--radius-control);
  font-size: 17px;
}

.primary-login-button {
  min-height: 56px;
  border-radius: var(--radius-control);
  background: var(--brand);
  border-color: var(--brand);
  font-size: 18px;
}

.helper-row span:first-child,
.text-button {
  color: var(--brand-dark);
}

.text-button {
  min-height: 0;
  border-color: transparent;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.text-button:hover {
  border-color: transparent;
  background: transparent;
  color: #0f4ec0;
}

.modal {
  background: rgba(15, 23, 42, .42);
}

.close-button {
  border-radius: var(--radius-control);
}

.user-portal-body {
  overflow-x: hidden;
}

.user-portal-body::before {
  opacity: .36;
  background-image:
    linear-gradient(rgba(21, 94, 239, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 94, 239, .028) 1px, transparent 1px);
}

.portal-bg-a,
.portal-bg-b,
.portal-bg-c {
  display: none;
}

.user-portal {
  width: min(1160px, calc(100vw - 56px));
  padding-top: 46px;
}

.platform-logo-wrap {
  width: 126px;
  height: 126px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: none;
}

.platform-logo {
  width: 100px;
  height: 100px;
}

.profile-card-grid {
  gap: 22px;
  margin-top: 58px;
}

.profile-card {
  min-height: 300px;
  border-radius: 16px;
  border-color: var(--line);
  background: #fff;
  box-shadow: var(--shadow);
  backdrop-filter: none;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.profile-card::before,
.profile-card::after {
  display: none;
}

.profile-card:hover {
  transform: translateY(-2px);
}

.profile-avatar {
  width: 154px;
  height: 154px;
  border-radius: 22px;
  background: #f0f6ff;
  box-shadow: none;
}

.profile-card.system-contract .profile-avatar,
.profile-card.system-price-score .profile-avatar,
.profile-card.system-sgcc-radar .profile-avatar {
  box-shadow: none;
}

.profile-card.system-contract .profile-avatar {
  background: #edf9f5;
}

.profile-card.system-price-score .profile-avatar {
  background: #f2f1ff;
}

.profile-card.system-sgcc-radar .profile-avatar {
  background: #fff6ed;
}

.profile-icon {
  width: 106px;
  height: 106px;
  filter: none;
}

.profile-card-name {
  color: var(--ink);
  font-size: 22px;
  letter-spacing: -.01em;
}

.user-portal-footer {
  border-radius: 12px;
  background: #fff;
  border-color: var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: none;
}

.user-portal-footer button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--brand-dark);
}

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

@media (max-width: 760px) {
  .login-card {
    padding: 34px 22px 30px;
    border-radius: 14px;
  }

  .platform-logo-wrap {
    width: 96px;
    height: 96px;
    border-radius: 20px;
  }

  .platform-logo {
    width: 76px;
    height: 76px;
  }

  .profile-card {
    min-height: 222px;
    border-radius: 14px;
  }

  .profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 18px;
  }

  .profile-icon {
    width: 82px;
    height: 82px;
  }
}

/* Industrial enterprise UI pass: for SGCC manufacturing customers. */
:root {
  --bg: #e9eef4;
  --bg-2: #f2f5f8;
  --panel: #ffffff;
  --panel-muted: #f7f9fb;
  --ink: #111827;
  --muted: #435266;
  --line: #c6d0dc;
  --brand: #183b63;
  --brand-dark: #0d253f;
  --brand-soft: #e7eef7;
  --accent: #245f9f;
  --accent-soft: #eaf2fb;
  --purple: #4f46a3;
  --orange: #b45309;
  --danger: #b42318;
  --warn: #a16207;
  --ok: #0f766e;
  --sidebar: #0d253f;
  --sidebar-2: #183b63;
  --shadow: 0 4px 14px rgba(13, 37, 63, 0.08);
  --shadow-strong: 0 10px 24px rgba(13, 37, 63, 0.14);
  --radius-panel: 10px;
  --radius-control: 7px;
}

body,
.login-body,
.user-portal-body {
  background:
    linear-gradient(180deg, #f4f6f9 0%, #e7edf4 100%);
  color: var(--ink);
}

button,
.primary-login-button,
.button-like {
  border-color: var(--brand);
  border-radius: var(--radius-control);
  background: var(--brand);
  color: #fff;
  box-shadow: none;
}

button:hover,
.primary-login-button:hover {
  border-color: var(--brand-dark);
  background: var(--brand-dark);
}

button.secondary,
.ghost-button,
.user-portal-footer button {
  color: var(--brand);
  background: #fff;
  border-color: var(--line);
}

button.secondary:hover,
.ghost-button:hover,
.user-portal-footer button:hover {
  border-color: #9fb0c3;
  background: #eef3f8;
  color: var(--brand-dark);
}

.text-button,
.text-button:hover {
  min-height: 0;
  border-color: transparent;
  background: transparent;
  color: var(--brand);
}

input,
select,
textarea,
.login-card input,
.modal-dialog input {
  border-radius: var(--radius-control);
  border-color: var(--line);
}

button:focus-visible,
input:focus,
select:focus,
textarea:focus {
  border-color: rgba(36, 95, 159, .76);
  box-shadow: 0 0 0 3px rgba(36, 95, 159, .14);
}

.sidebar {
  background: linear-gradient(180deg, var(--sidebar), #102b49 55%, var(--sidebar-2));
  color: #d8e2ee;
  border-right: 1px solid #071b31;
}

.brand {
  border-bottom-color: rgba(216, 226, 238, .16);
}

.brand strong {
  color: #fff;
}

.brand span {
  color: #a9b8c8;
}

.brand-mark,
.brand-logo-text {
  background: #244c7a;
  color: #fff;
}

.side-nav a {
  color: #c6d3e2;
  border-color: transparent;
}

.side-nav a:hover,
.side-nav a.active {
  background: rgba(255, 255, 255, .10);
  border-color: rgba(255, 255, 255, .14);
  color: #fff;
}

.sidebar-user {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .14);
}

.sidebar-user span {
  color: #a9b8c8;
}

.sidebar-user strong {
  color: #fff;
}

.content {
  padding-top: 30px;
}

.hero,
.section-card,
.module-card,
.status-row,
.user-access-card,
.login-card,
.modal-dialog,
.profile-card,
.user-portal-footer {
  border-color: var(--line);
  border-radius: var(--radius-panel);
  background: #fff;
  box-shadow: var(--shadow);
}

.hero,
.login-card {
  border-top: 3px solid var(--brand);
}

.hero h1,
.user-portal-header h1,
.brand-title h1 {
  color: #0f172a;
  letter-spacing: -.018em;
}

.eyebrow,
.portal-eyebrow {
  color: var(--brand);
  font-weight: 780;
}

.module-card,
.profile-card {
  border-width: 1px;
}

.module-card:hover,
.profile-card:hover {
  border-color: #9fb0c3;
  box-shadow: var(--shadow-strong);
  transform: translateY(-1px);
}

.state-dot,
.module-category,
.count-pill,
.module-checks label {
  background: #f7f9fb;
  border-color: var(--line);
  color: #334155;
}

.state-dot.online {
  background: #ecfdf5;
  color: var(--ok);
}

.platform-logo-wrap {
  border-radius: 18px;
  border-color: #b9c5d3;
  box-shadow: var(--shadow);
}

.profile-card-grid {
  gap: 20px;
}

.profile-card {
  min-height: 292px;
  padding: 26px 22px 24px;
}

.profile-avatar {
  width: 148px;
  height: 148px;
  border-radius: 16px;
  border: 1px solid #c4ceda;
  background: #eef3f8;
}

.profile-card.system-contract .profile-avatar,
.profile-card.system-price-score .profile-avatar,
.profile-card.system-sgcc-radar .profile-avatar {
  background: #eef3f8;
}

.profile-icon {
  width: 100px;
  height: 100px;
}

.profile-card-name {
  font-size: 21px;
  font-weight: 820;
}

.user-portal-footer {
  border-radius: 10px;
  padding: 8px 10px 8px 14px;
}

/* Portal entry cards are buttons, but should not inherit the global button hover fill. */
button.profile-card,
button.profile-card:hover,
button.profile-card:focus-visible {
  background: #fff;
  color: var(--ink);
}

button.profile-card:hover {
  border-color: #9fb0c3;
  box-shadow: var(--shadow-strong);
  transform: translateY(-1px);
}

button.profile-card:hover .profile-card-name,
button.profile-card:focus-visible .profile-card-name {
  color: var(--ink);
}

button.profile-card:focus-visible {
  outline: 3px solid rgba(36, 95, 159, .18);
  outline-offset: 3px;
}

/* Mobile WebView adaptation: workbench portal and admin shell. */
@media (max-width: 640px) {
  html,
  body {
    width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
  }

  input,
  select,
  textarea,
  button {
    font-size: 16px;
  }

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

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: auto;
    gap: 12px;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(7, 27, 49, .18);
  }

  .brand {
    gap: 10px;
    padding: 0 0 10px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    font-size: 18px;
  }

  .brand strong {
    font-size: 16px;
  }

  .brand span {
    font-size: 11px;
  }

  .side-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }

  .side-nav a {
    flex: 0 0 auto;
    min-width: 116px;
    min-height: 42px;
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    scroll-snap-align: start;
  }

  .side-nav a span {
    display: none;
  }

  .side-nav a em {
    font-size: 13px;
  }

  .sidebar-user {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px 10px;
    padding: 10px 12px;
  }

  .sidebar-user span {
    grid-column: 1 / -1;
    font-size: 11px;
  }

  .sidebar-user strong {
    min-width: 0;
    font-size: 16px;
  }

  .sidebar-user button {
    min-height: 36px;
    padding: 8px 12px;
  }

  .content {
    width: 100%;
    padding: 14px 12px 28px;
  }

  .hero,
  .section-card {
    padding: 16px;
    border-radius: 10px;
  }

  .hero {
    gap: 14px;
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 24px;
  }

  .hero p,
  .section-head p {
    font-size: 13px;
    line-height: 1.5;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .module-grid,
  .status-list,
  .user-access-list,
  .module-form {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .module-card,
  .status-row,
  .user-access-card {
    padding: 14px;
    border-radius: 10px;
  }

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

  .module-card-actions,
  .hero-actions {
    width: 100%;
  }

  .module-card-actions button,
  .hero-actions button,
  .module-form button {
    width: 100%;
    min-height: 44px;
  }

  .user-portal {
    width: min(100% - 24px, 1180px);
    padding: 28px 0 24px;
  }

  .user-portal-header {
    gap: 9px;
  }

  .platform-logo-wrap {
    width: 86px;
    height: 86px;
    border-radius: 18px;
  }

  .platform-logo {
    width: 68px;
    height: 68px;
  }

  .portal-eyebrow {
    margin-top: 2px;
    font-size: 10px;
  }

  .user-portal-header h1 {
    font-size: clamp(28px, 8vw, 36px);
    letter-spacing: -.03em;
  }

  .profile-card-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 24px;
  }

  .profile-card {
    min-height: 136px;
    grid-template-columns: 76px minmax(0, 1fr);
    grid-template-rows: 1fr;
    justify-items: stretch;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    text-align: left;
  }

  .profile-avatar {
    width: 76px;
    height: 76px;
    border-radius: 12px;
  }

  .profile-icon {
    width: 50px;
    height: 50px;
  }

  .profile-icon-text {
    font-size: 42px;
  }

  .profile-card-name {
    margin: 0;
    font-size: 19px;
  }

  .user-portal-footer {
    width: 100%;
    justify-content: space-between;
    margin-top: 18px;
    border-radius: 10px;
  }
}

@media (max-width: 380px) {
  .profile-card {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
  }

  .profile-avatar {
    width: 64px;
    height: 64px;
  }

  .profile-icon {
    width: 42px;
    height: 42px;
  }

  .profile-card-name {
    font-size: 17px;
  }
}

@media (max-width: 1000px) {
  .app-shell,
  .sidebar,
  .content,
  .hero,
  .section-card,
  .module-grid,
  .status-list,
  .user-access-list,
  .user-portal,
  .profile-card-grid,
  .profile-card {
    min-width: 0;
    max-width: 100%;
  }

  .sidebar,
  .content {
    width: 100%;
  }

  .app-shell {
    align-content: start;
  }
}

/* Mobile workbench: remove the four module category chips to reduce visual noise. */
@media (max-width: 640px) {
  .module-card .module-category {
    display: none !important;
  }

  .module-card .module-top {
    justify-content: flex-end;
  }
}

/* Platform tablet/phone adaptation, final override. */
@media (min-width: 641px) and (max-width: 1180px) {
  html,
  body {
    width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
  }

  .user-portal-body,
  .login-body {
    min-height: 100dvh;
  }

  .app-shell {
    grid-template-columns: 1fr;
    min-height: 100dvh;
  }

  .user-portal {
    width: min(100% - 48px, 920px);
    min-height: 100dvh;
    padding: max(32px, env(safe-area-inset-top)) 0 calc(28px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    align-items: center;
  }

  .user-portal-header {
    align-self: end;
    gap: 10px;
  }

  .platform-logo-wrap {
    width: 96px;
    height: 96px;
    border-radius: 18px;
  }

  .platform-logo {
    width: 76px;
    height: 76px;
  }

  .user-portal-header h1 {
    font-size: 34px;
    line-height: 1.18;
    letter-spacing: -.02em;
  }

  .profile-card-grid {
    align-self: center;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
    margin-top: 30px;
  }

  .profile-card {
    min-height: 208px;
    padding: 22px 18px;
    border-radius: 14px;
  }

  .profile-avatar {
    width: 104px;
    height: 104px;
    border-radius: 14px;
  }

  .profile-icon {
    width: 70px;
    height: 70px;
  }

  .profile-card-name {
    font-size: 19px;
  }

  .user-portal-footer {
    justify-self: center;
    margin-top: 24px;
  }

  .login-page {
    min-height: 100dvh;
    width: min(100% - 48px, 560px);
    padding: max(40px, env(safe-area-inset-top)) 0 calc(32px + env(safe-area-inset-bottom));
    display: grid;
    align-content: center;
  }

  .logo-row {
    margin-bottom: 26px;
  }

  .login-card {
    padding: 34px 30px 30px;
  }

  .content {
    width: min(100% - 32px, 980px);
    padding: 22px 0 34px;
  }

  .module-grid,
  .status-list,
  .user-access-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .module-form button {
    grid-column: 1 / -1;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: auto;
    display: grid;
    grid-template-columns: minmax(220px, .9fr) minmax(0, 2fr) auto;
    align-items: center;
    gap: 14px;
    padding: max(14px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) 14px max(18px, env(safe-area-inset-left));
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    min-width: 0;
    padding: 0;
    border-bottom: 0;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    font-size: 19px;
  }

  .side-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .side-nav a {
    flex: 0 0 auto;
    min-width: 132px;
    min-height: 44px;
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 10px 12px;
  }

  .side-nav a span {
    display: none;
  }

  .sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 0;
    padding: 8px 10px 8px 12px;
    border-radius: 999px;
  }

  .sidebar-user span {
    display: none;
  }

  .sidebar-user strong {
    max-width: 132px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sidebar-user button {
    min-height: 36px;
    padding: 7px 11px;
  }
}

@media (min-width: 641px) and (max-width: 820px) {
  .sidebar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .side-nav {
    grid-column: 1 / -1;
    order: 3;
  }

  .content {
    width: min(100% - 24px, 760px);
    padding: 18px 0 30px;
  }
}

@media (min-width: 980px) and (max-width: 1180px) and (orientation: landscape) {
  .user-portal {
    width: min(100% - 56px, 1120px);
  }

  .profile-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
  }

  .profile-card {
    min-height: 190px;
    padding: 18px 14px;
  }

  .profile-avatar {
    width: 96px;
    height: 96px;
  }

  .profile-icon {
    width: 64px;
    height: 64px;
  }

  .profile-card-name {
    font-size: 17px;
    line-height: 1.24;
  }
}

@media (min-width: 641px) and (max-width: 979px) {
  .profile-card-grid > .profile-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .user-portal-body,
  .login-body {
    min-height: 100dvh;
  }

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

  .user-portal-body {
    background: linear-gradient(180deg, #f5f8fc 0%, #e9eef4 100%);
  }

  .user-portal-body::before {
    background-size: 32px 32px;
    opacity: .25;
  }

  .user-portal {
    width: calc(100% - 24px);
    min-height: 100dvh;
    padding: max(16px, env(safe-area-inset-top)) 0 calc(16px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    align-content: stretch;
  }

  .user-portal-header {
    gap: 6px;
    align-self: end;
    padding-top: 2px;
  }

  .platform-logo-wrap {
    width: 62px;
    height: 62px;
    border-radius: 14px;
  }

  .platform-logo {
    width: 50px;
    height: 50px;
  }

  .portal-eyebrow {
    display: none;
  }

  .user-portal-header h1 {
    font-size: 25px;
    line-height: 1.18;
    letter-spacing: -.018em;
  }

  .profile-card-grid {
    align-self: center;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 18px;
  }

  .profile-card {
    min-height: 92px;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    text-align: left;
    touch-action: manipulation;
  }

  .profile-avatar {
    width: 58px;
    height: 58px;
    border-radius: 10px;
  }

  .profile-icon {
    width: 38px;
    height: 38px;
  }

  .profile-icon-text {
    font-size: 34px;
  }

  .profile-card-name {
    margin: 0;
    font-size: 17px;
    line-height: 1.2;
  }

  .user-portal-footer {
    width: 100%;
    min-height: 46px;
    margin-top: 14px;
    padding: 6px 7px 6px 12px;
    border-radius: 10px;
    justify-content: space-between;
  }

  .footer-account {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .user-portal-footer button {
    min-height: 34px;
    padding: 6px 10px;
  }

  .login-page {
    width: calc(100% - 24px);
    min-height: 100dvh;
    padding: max(18px, env(safe-area-inset-top)) 0 calc(18px + env(safe-area-inset-bottom));
    display: grid;
    align-content: center;
  }

  .logo-row {
    justify-content: center;
    gap: 12px;
    margin-bottom: 18px;
  }

  .brand-logo {
    width: 54px;
    height: 54px;
    border-radius: 12px;
  }

  .brand-title h1 {
    font-size: 24px;
  }

  .brand-title p {
    font-size: 14px;
  }

  .login-card {
    padding: 24px 18px 22px;
    border-radius: 12px;
  }

  .tabs {
    margin-bottom: 20px;
  }

  .tab {
    font-size: 18px;
  }

  .login-card input,
  .modal-dialog input {
    min-height: 50px;
    border-radius: 10px;
  }

  .primary-login-button {
    min-height: 52px;
    border-radius: 10px;
  }
}
