: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);
}

/* Personal manual checklist */
.todo-panel {
  text-align: left;
  padding: 24px;
}

.user-portal .todo-panel {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: #fff;
  box-shadow: var(--shadow);
}

.admin-todo-panel {
  margin-bottom: 24px;
}

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

.todo-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.25;
  font-weight: 840;
  letter-spacing: -.012em;
}

.todo-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.todo-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 300px;
}

.todo-summary span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-muted);
  color: #334155;
  font-size: 13px;
  font-weight: 720;
}

.todo-summary strong {
  color: var(--brand);
  font-size: 15px;
}

.todo-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 108px 150px 150px 110px;
  gap: 10px;
  margin-bottom: 12px;
}

.todo-form input,
.todo-form select {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: #fff;
  color: var(--ink);
  font-size: 14px;
}

.todo-form button {
  min-height: 42px;
}

.todo-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.todo-empty {
  padding: 18px 16px;
  border: 1px dashed #b8c6d6;
  border-radius: var(--radius-panel);
  background: #f8fafc;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

.todo-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: #fff;
}

.todo-item.is-overdue {
  border-color: #e6b8b4;
  background: #fffafa;
}

.todo-item.is-done {
  background: #f7f9fb;
}

.todo-check {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid #a8b8ca;
  background: #fff;
  color: var(--ok);
  font-size: 20px;
  line-height: 1;
}

.todo-check:hover {
  border-color: var(--ok);
  background: #ecfdf5;
  color: var(--ok);
}

.todo-main {
  min-width: 0;
}

.todo-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.todo-title-row strong {
  min-width: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
  font-weight: 780;
  overflow-wrap: anywhere;
}

.todo-item.is-done .todo-title-row strong {
  color: #64748b;
  text-decoration: line-through;
}

.todo-priority {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 760;
}

.todo-priority.priority-high {
  border-color: #f3c7c2;
  background: #fff1f0;
  color: var(--danger);
}

.todo-priority.priority-low {
  border-color: #c6d0dc;
  background: #f1f5f9;
  color: #64748b;
}

.todo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.todo-overdue-text {
  color: var(--danger);
  font-weight: 760;
}

.todo-main p {
  margin: 6px 0 0;
  color: #526173;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.todo-delete {
  min-height: 34px;
  padding: 0 12px;
  border-color: #f0c7c2;
  background: #fff;
  color: var(--danger);
}

.todo-delete:hover {
  border-color: #e8aaa4;
  background: #fff1f0;
  color: var(--danger);
}

.todo-panel + .profile-card-grid {
  margin-top: 24px;
}

.admin-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.admin-overview-item {
  min-height: 132px;
  border: 1px solid rgba(133, 154, 181, 0.24);
  border-radius: 28px;
  padding: 22px;
  background:
    linear-gradient(140deg, rgba(255,255,255,0.96), rgba(239,245,251,0.82)),
    radial-gradient(circle at 18% 16%, rgba(15,118,110,0.12), transparent 30%);
  box-shadow: 0 18px 42px rgba(15, 31, 47, 0.08);
}

.admin-overview-item span {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.admin-overview-item strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.admin-overview-item em {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
}

.admin-policy-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  border: 1px solid rgba(15,118,110,0.2);
  border-radius: 22px;
  padding: 16px 18px;
  color: #0f3a5d;
  background: linear-gradient(135deg, rgba(236,253,245,0.92), rgba(240,249,255,0.92));
}

.module-policy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.module-policy label {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(133,154,181,0.28);
  border-radius: 16px;
  padding: 10px 12px;
  color: var(--muted);
  background: rgba(248,251,255,0.88);
  font-size: 13px;
  font-weight: 800;
}

.module-policy input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}

.admin-create-user-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(180px, 1fr) 140px 150px;
  gap: 12px;
  margin-bottom: 18px;
}

.admin-create-user-form input,
.admin-create-user-form select,
.admin-create-user-form button,
.user-role-row select {
  min-height: 46px;
  border: 1px solid rgba(133,154,181,0.35);
  border-radius: 16px;
  padding: 0 14px;
  color: var(--ink);
  background: rgba(255,255,255,0.94);
  font: inherit;
  font-weight: 800;
}

.admin-create-user-form button {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #0f766e);
  cursor: pointer;
}

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

.user-meta-grid span {
  border: 1px solid rgba(133,154,181,0.18);
  border-radius: 14px;
  padding: 10px 12px;
  color: var(--muted);
  background: rgba(248,251,255,0.86);
  font-size: 12px;
  font-weight: 800;
}

.user-meta-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 13px;
}

.user-role-row {
  margin-bottom: 12px;
}

.user-role-row label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 800;
}

.user-edit-grid {
  display: grid;
  grid-template-columns: minmax(160px, .8fr) minmax(160px, .8fr) minmax(220px, 1.1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.user-edit-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.user-edit-grid input,
.user-edit-grid select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 780;
}

.access-permanent {
  color: var(--ok) !important;
}

.access-limited {
  color: var(--warn) !important;
}

.access-expired {
  color: var(--danger) !important;
}

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

.audit-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(240px, 1.4fr) 180px;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(133,154,181,0.24);
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.92);
}

.audit-row strong {
  display: block;
  color: var(--ink);
}

.audit-row span,
.audit-row time {
  color: var(--muted);
  font-weight: 800;
}

.audit-row code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #475569;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.portal-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.portal-metric {
  min-height: 78px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 14px 36px rgba(32, 76, 132, .08);
  display: grid;
  align-content: center;
  gap: 4px;
}

.portal-metric strong {
  color: #132033;
  font-size: 28px;
  line-height: 1;
  font-weight: 900;
}

.portal-metric span {
  color: #5f6f84;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 780;
}

.portal-metric.metric-sgcc strong {
  color: #a16207;
}

.portal-metric.metric-contract strong {
  color: #0f766e;
}

.portal-metrics + .profile-card-grid {
  margin-top: 18px;
}

@media (max-width: 980px) {
  .admin-overview-grid,
  .user-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-create-user-form,
  .audit-row {
    grid-template-columns: 1fr;
  }

  .admin-policy-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .todo-head {
    display: grid;
    gap: 12px;
  }

  .todo-summary {
    min-width: 0;
    justify-content: flex-start;
  }

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

  .todo-form input[name="title"],
  .todo-form button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .admin-overview-grid,
  .user-meta-grid,
  .module-policy {
    grid-template-columns: 1fr;
  }

  .user-portal {
    display: block;
  }

  .user-portal .todo-panel {
    margin-top: 18px;
  }

  .todo-panel {
    padding: 16px;
    border-radius: 12px;
  }

  .todo-head h2 {
    font-size: 19px;
  }

  .todo-head p {
    font-size: 13px;
  }

  .todo-summary {
    gap: 6px;
  }

  .todo-summary span {
    min-height: 30px;
    padding: 5px 8px;
    font-size: 12px;
  }

  .todo-form {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .todo-form input[name="title"],
  .todo-form button {
    grid-column: auto;
  }

  .todo-item {
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    padding: 10px;
  }

  .todo-check {
    width: 30px;
    min-width: 30px;
    height: 30px;
    min-height: 30px;
  }

  .todo-delete {
    grid-column: 2;
    justify-self: start;
    min-height: 30px;
    margin-top: 2px;
  }
}

* {
  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 {
  box-sizing: border-box;
  width: min(980px, 100%);
  margin: 0 auto;
  border-radius: 24px;
  background: #fff;
  padding: 56px 58px 48px;
  box-shadow: 0 16px 42px rgba(24,24,27,.06);
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: start;
  justify-content: center;
}

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

.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;
}

.wecom-login-panel {
  display: grid;
  flex: 0 1 320px;
  gap: 16px;
  min-width: 0;
  border: 1px solid #d6efe4;
  border-radius: 20px;
  padding: 20px;
  background: #f7fffb;
}

.wecom-login-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.wecom-login-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #e8fff4;
}

.wecom-login-mark svg {
  width: 34px;
  height: 34px;
}

.wecom-login-head h2 {
  margin: 0;
  color: #10251b;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 860;
}

.wecom-login-head p {
  margin: 5px 0 0;
  color: #4e6b5d;
  font-size: 13px;
  line-height: 1.55;
}

.wecom-qr-box {
  display: grid;
  place-items: center;
  min-height: 282px;
  border: 1px dashed #9edfc2;
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
}

.wecom-qr-loading,
.wecom-login-status {
  color: #49695a;
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
  overflow-wrap: anywhere;
}

.wecom-official-qr {
  width: 100%;
  min-height: 282px;
  display: grid;
  place-items: center;
}

.wecom-mock-card {
  display: grid;
  justify-items: center;
  gap: 9px;
  padding: 22px;
  text-align: center;
}

.wecom-mock-card.is-error {
  color: #8a2d22;
}

.wecom-mock-logo {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 22px;
  color: #fff;
  background: #07c160;
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
}

.wecom-mock-card strong {
  color: #123423;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
}

.wecom-mock-card span {
  max-width: 26ch;
  color: #557366;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.wecom-login-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 14px;
  color: #fff;
  background: #07c160;
  text-decoration: none;
  font-weight: 860;
}

.wecom-login-link:hover,
.wecom-login-link:focus-visible {
  background: #06ad56;
  outline: none;
}

.wecom-login-status.error {
  color: #b84334;
}

.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;
}

.platform-logo-text {
  width: 100px;
  height: 100px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: var(--brand);
  color: #fff;
  font-size: 54px;
  line-height: 1;
  font-weight: 900;
}

.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.system-todo .profile-avatar {
  background:
    radial-gradient(circle at 28% 22%, rgba(255,255,255,.28), transparent 28%),
    linear-gradient(135deg, #183b63, #245f9f);
  box-shadow: 0 22px 46px rgba(24, 59, 99, .22);
}

.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;
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .login-panel {
    width: 100%;
  }
  .wecom-login-panel {
    padding: 16px;
    border-radius: 16px;
  }
  .wecom-qr-box,
  .wecom-official-qr {
    min-height: 250px;
  }
  .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;
  }
}

/* Smoothness layer: isolate heavy cards/lists and keep interaction feedback cheap. */
* {
  -webkit-tap-highlight-color: transparent;
}

button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}

.profile-card,
.module-policy,
.user-access-card,
.audit-row,
.todo-item,
.status-card,
.module-card {
  contain: layout paint style;
}

@supports (content-visibility: auto) {
  .profile-card,
  .module-policy,
  .user-access-card,
  .audit-row,
  .todo-item {
    content-visibility: auto;
    contain-intrinsic-size: 180px 900px;
  }
}

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

/* ChatGPT enterprise workspace sketch restoration */
.sketch-login-body {
  --sketch-blue: #1f74ee;
  --sketch-title: #10243f;
  --sketch-text: #536984;
  --sketch-muted: #70839b;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--sketch-title);
  background:
    radial-gradient(circle at 43% 47%, rgba(216, 230, 255, .72), transparent 31%),
    radial-gradient(circle at 8% 8%, rgba(226, 237, 255, .54), transparent 24%),
    #f8fbff;
  font-family: Inter, MiSans, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.sketch-decoration {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.sketch-decoration-main {
  position: absolute;
  left: 0;
  display: block;
  max-width: none;
  user-select: none;
}

.sketch-decoration-main {
  bottom: 0;
  width: min(60vw, 920px);
  opacity: .86;
  filter: saturate(.96) brightness(1.01);
  -webkit-mask-image: radial-gradient(ellipse 110% 108% at 0% 100%, #000 0%, #000 76%, rgba(0, 0, 0, .92) 86%, transparent 100%);
  mask-image: radial-gradient(ellipse 110% 108% at 0% 100%, #000 0%, #000 76%, rgba(0, 0, 0, .92) 86%, transparent 100%);
}

.sketch-language {
  position: fixed;
  top: 35px;
  right: 25px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid #dce4ef;
  border-radius: 13px;
  color: #31445e;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 3px 12px rgba(48, 74, 110, .035);
  backdrop-filter: blur(10px);
  font-size: 14px;
  font-weight: 560;
}

.sketch-language img {
  width: 18px;
  height: 18px;
}

.sketch-language-chevron {
  width: 15px !important;
  height: 15px !important;
}

.sketch-login-shell {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(520px, 604px);
  align-items: center;
  gap: 70px;
  width: min(1536px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 70px clamp(25px, 2.48vw, 38px) 84px clamp(42px, 4.56vw, 70px);
}

.sketch-intro {
  align-self: stretch;
  min-width: 0;
  padding-top: 108px;
}

.sketch-hero {
  margin-top: 0;
}

.sketch-hero h1,
.sketch-hero p {
  margin: 0;
}

.sketch-hero h1 {
  color: #10243f;
  font-size: 44px;
  line-height: 1.14;
  letter-spacing: -.028em;
  font-weight: 760;
  text-wrap: balance;
}

.sketch-hero-en {
  margin-top: 9px !important;
  color: var(--sketch-blue);
  font-size: 40px;
  line-height: 1.16;
  letter-spacing: -.025em;
  font-weight: 610;
}

.sketch-hero-summary {
  margin-top: 24px !important;
  color: #6f829a;
  font-size: 18px;
  line-height: 1.6;
  font-weight: 500;
}

.sketch-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px 26px;
  max-width: 640px;
  margin-top: 32px;
}

.sketch-feature {
  display: grid;
  grid-template-columns: 45px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.sketch-feature > span {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  border-radius: 13px;
  background: rgba(228, 239, 255, .88);
}

.sketch-feature img,
.sketch-capabilities img,
.sketch-sync-card img,
.sketch-help img,
.sso-loading-mark img,
.sso-unavailable-icon img {
  filter: invert(41%) sepia(96%) saturate(2152%) hue-rotate(202deg) brightness(98%) contrast(91%);
}

.sketch-feature img {
  width: 25px;
  height: 25px;
}

.sketch-feature h2,
.sketch-feature p {
  margin: 0;
}

.sketch-feature h2 {
  color: #1a2d48;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 650;
  white-space: nowrap;
}

.sketch-feature p {
  margin-top: 4px;
  color: #71849d;
  font-size: 12px;
  line-height: 1.45;
  white-space: nowrap;
}

.sketch-auth-card {
  display: flex;
  flex-direction: column;
  justify-self: end;
  width: 100%;
  min-height: 806px;
  padding: 60px 48px 42px;
  border: 1px solid #dce5f0;
  border-radius: 16px;
  background: rgba(255, 255, 255, .91);
  box-shadow: 0 16px 42px rgba(51, 79, 118, .09);
  backdrop-filter: blur(12px);
}

.sketch-auth-heading {
  text-align: center;
}

.sketch-auth-heading h2,
.sketch-auth-heading p {
  margin: 0;
}

.sketch-auth-heading h2 {
  color: #10243f;
  font-size: 26px;
  line-height: 1.3;
  letter-spacing: -.02em;
  font-weight: 740;
}

.sketch-auth-heading p {
  position: relative;
  margin-top: 7px;
  padding-bottom: 20px;
  color: #6f8299;
  font-size: 15px;
  line-height: 1.5;
}

.sketch-auth-heading p::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 34px;
  height: 3px;
  border-radius: 999px;
  background: var(--sketch-blue);
  transform: translateX(-50%);
}

.sketch-qr-frame {
  display: grid;
  place-items: center;
  width: 268px;
  min-height: 268px;
  margin: 25px auto 0;
  padding: 14px;
  border: 1px solid #e1e7ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(47, 70, 103, .08);
  overflow: hidden;
}

.sketch-qr-frame.is-unavailable {
  background: #f9fbfe;
  box-shadow: inset 0 0 0 1px rgba(231, 236, 243, .7), 0 8px 20px rgba(47, 70, 103, .05);
}

.sketch-qr-frame .sso-qr-loading,
.sketch-qr-frame .sso-unavailable {
  display: grid;
  justify-items: center;
  gap: 10px;
  color: #73839a;
  text-align: center;
}

.sketch-qr-frame .sso-loading-mark,
.sketch-qr-frame .sso-unavailable-icon {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: #f0f5fc;
}

.sketch-qr-frame .sso-loading-mark img,
.sketch-qr-frame .sso-unavailable-icon img {
  width: 32px;
  height: 32px;
}

.sketch-qr-frame .sso-qr-loading strong,
.sketch-qr-frame .sso-unavailable strong {
  color: #253750;
  font-size: 15px;
  font-weight: 650;
}

.sketch-qr-frame .sso-qr-loading > span:last-child,
.sketch-qr-frame .sso-unavailable > span:last-child {
  max-width: 22ch;
  font-size: 12px;
  line-height: 1.55;
}

.sketch-auth-card .wecom-official-qr {
  display: grid;
  place-items: center;
  width: 238px;
  min-height: 238px;
}

.sketch-auth-card .wecom-official-qr iframe {
  display: block;
  max-width: 100%;
  border: 0;
}

.sketch-auth-card .sso-status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.sketch-sync-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 78px;
  margin-top: 40px;
  border: 1px solid #cfe0fa;
  border-radius: 10px;
  padding: 14px 22px;
  color: #25415f;
  background: #f3f8ff;
  text-align: left;
}

.sketch-sync-card > img {
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
}

.sketch-sync-card strong,
.sketch-sync-card p {
  display: block;
  margin: 0;
}

.sketch-sync-card strong {
  font-size: 14px;
  line-height: 1.45;
  font-weight: 650;
}

.sketch-sync-card p {
  margin-top: 5px;
  color: #667b94;
  font-size: 13px;
}

.sketch-capabilities {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 31px;
}

.sketch-capabilities > div {
  min-width: 0;
  text-align: center;
}

.sketch-capabilities span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 9px;
  border-radius: 50%;
  background: #f1f6fd;
}

.sketch-capabilities img {
  width: 25px;
  height: 25px;
}

.sketch-capabilities strong,
.sketch-capabilities p {
  display: block;
  margin: 0;
}

.sketch-capabilities strong {
  color: #253b57;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 650;
  white-space: nowrap;
}

.sketch-capabilities p {
  margin-top: 5px;
  color: #71849c;
  font-size: 12px;
  line-height: 1.45;
  white-space: nowrap;
}

.sketch-help {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: auto 0 0;
  color: #718399;
  font-size: 13px;
  line-height: 1.5;
}

.sketch-help img {
  width: 17px;
  height: 17px;
  filter: invert(54%) sepia(13%) saturate(698%) hue-rotate(174deg) brightness(91%) contrast(88%);
}

.sketch-page-footer {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 4;
  color: #72859e;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  white-space: nowrap;
  transform: translateX(-50%);
}

@media (max-width: 1280px) {
  .sketch-login-shell {
    grid-template-columns: minmax(0, 1fr) minmax(480px, 550px);
    gap: 42px;
    padding-left: 48px;
  }

  .sketch-hero h1 { font-size: 38px; }
  .sketch-hero-en { font-size: 34px; }
  .sketch-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 480px; }
  .sketch-auth-card { min-height: 760px; padding: 42px 38px 36px; }
  .sketch-decoration-main { opacity: .76; }
}

@media (max-width: 980px) {
  .sketch-login-body { overflow-y: auto; }
  .sketch-decoration { display: none; }
  .sketch-language { position: absolute; top: 22px; right: 20px; }
  .sketch-login-shell {
    grid-template-columns: 1fr;
    gap: 46px;
    padding: 28px 24px 80px;
  }
  .sketch-intro,
  .sketch-auth-card { width: min(680px, 100%); margin: 0 auto; }
  .sketch-intro { padding-top: 76px; }
  .sketch-hero { margin-top: 0; }
  .sketch-feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: none; }
  .sketch-auth-card { justify-self: center; min-height: 760px; }
  .sketch-page-footer { position: absolute; bottom: 24px; }
}

@media (max-width: 640px) {
  .sketch-language { min-height: 38px; padding-inline: 12px; font-size: 12px; }
  .sketch-login-shell { padding: 22px 16px 82px; }
  .sketch-intro { padding-top: 58px; }
  .sketch-hero { margin-top: 0; }
  .sketch-hero h1 { font-size: 30px; }
  .sketch-hero-en { font-size: 25px; }
  .sketch-hero-summary { margin-top: 17px !important; font-size: 14px; }
  .sketch-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; margin-top: 28px; }
  .sketch-feature { grid-template-columns: 42px minmax(0, 1fr); gap: 9px; }
  .sketch-feature > span { width: 42px; height: 42px; }
  .sketch-feature h2 { font-size: 14px; }
  .sketch-feature p { max-width: 15ch; font-size: 11px; white-space: normal; }
  .sketch-auth-card { min-height: 690px; padding: 34px 20px 28px; border-radius: 14px; }
  .sketch-auth-heading h2 { font-size: 22px; }
  .sketch-auth-heading p { font-size: 13px; }
  .sketch-qr-frame { width: 236px; min-height: 236px; }
  .sketch-auth-card .wecom-official-qr { width: 206px; min-height: 206px; }
  .sketch-sync-card { margin-top: 28px; padding-inline: 14px; }
  .sketch-sync-card strong { font-size: 12px; }
  .sketch-sync-card p { font-size: 11px; }
  .sketch-capabilities { gap: 8px; margin-top: 26px; }
  .sketch-capabilities span { width: 42px; height: 42px; }
  .sketch-capabilities strong { font-size: 11px; }
  .sketch-capabilities p { font-size: 10px; white-space: normal; }
  .sketch-page-footer { width: calc(100% - 32px); font-size: 10px; white-space: normal; }
}

@media (max-height: 850px) and (min-width: 981px) {
  .sketch-login-shell { padding-block: 16px 32px; }
  .sketch-intro { padding-top: 62px; }
  .sketch-hero { margin-top: 0; }
  .sketch-hero h1 { font-size: 34px; }
  .sketch-hero-en { font-size: 30px; }
  .sketch-hero-summary { margin-top: 14px !important; font-size: 15px; }
  .sketch-feature-grid { gap-block: 18px; margin-top: 20px; }
  .sketch-auth-card { min-height: 650px; padding-block: 24px 22px; }
  .sketch-auth-heading h2 { font-size: 23px; }
  .sketch-qr-frame { width: 224px; min-height: 224px; margin-top: 17px; }
  .sketch-auth-card .wecom-official-qr { width: 194px; min-height: 194px; }
  .sketch-sync-card { min-height: 66px; margin-top: 22px; padding-block: 10px; }
  .sketch-capabilities { margin-top: 20px; }
  .sketch-capabilities span { width: 42px; height: 42px; }
  .sketch-help { margin-top: 20px; }
  .sketch-page-footer { bottom: 16px; }
}

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

/* 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-todo .profile-avatar {
  background: #eef3f8;
  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-card.system-todo .profile-avatar {
  background: #eef3f8;
}

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

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

.todo-module-portal {
  max-width: 960px;
  text-align: left;
}

.todo-module-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.todo-module-header h1 {
  margin: 0;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.2;
  font-weight: 850;
}

.todo-back-button {
  min-height: 38px;
  padding: 8px 12px;
}

.todo-module-panel {
  margin-top: 0 !important;
}

.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;
  }
}

/* Final mobile overrides for the personal checklist. Keep after legacy phone portal rules. */
@media (max-width: 640px) {
  .user-portal {
    display: block;
  }

  .user-portal .todo-panel {
    margin-top: 18px;
  }

  .todo-panel + .profile-card-grid {
    margin-top: 16px;
  }

  .portal-metrics {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-top: 14px;
  }

  .portal-metric {
    min-height: 62px;
    padding: 10px 8px;
    border-radius: 14px;
    text-align: center;
  }

  .portal-metric strong {
    font-size: 22px;
  }

  .portal-metric span {
    font-size: 12px;
  }
}

/* iPad portal final pass: keep the 13" desktop home structure on 11" iPad.
   Do not collapse the four business modules into the narrow phone/tablet 2x2 layout. */
@media (min-width: 761px) and (max-width: 1180px) {
  .user-portal {
    width: min(calc(100% - 44px), 1120px);
    min-height: auto;
    padding: max(30px, env(safe-area-inset-top)) 0 calc(30px + env(safe-area-inset-bottom));
    display: block;
  }

  .user-portal-header {
    gap: 8px;
    margin-bottom: 18px;
  }

  .platform-logo-wrap {
    width: clamp(82px, 8.8vw, 104px);
    height: clamp(82px, 8.8vw, 104px);
    border-radius: 18px;
  }

  .platform-logo {
    width: clamp(64px, 6.8vw, 82px);
    height: clamp(64px, 6.8vw, 82px);
  }

  .user-portal-header h1 {
    font-size: clamp(30px, 3.2vw, 38px);
    line-height: 1.16;
  }

  .user-portal .todo-panel {
    margin-top: 18px;
    padding: 18px 20px;
  }

  .todo-head {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
  }

  .todo-form {
    grid-template-columns: minmax(220px, 1.45fr) 92px minmax(132px, .85fr) minmax(124px, .8fr) 104px;
    gap: 8px;
    margin-bottom: 8px;
  }

  .todo-form input[name="title"],
  .todo-form button {
    grid-column: auto;
  }

  .todo-list {
    margin-top: 8px;
  }

  .todo-empty {
    padding: 14px 16px;
  }

  .portal-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
  }

  .portal-metric {
    min-height: 64px;
    padding: 12px 14px;
    border-radius: 12px;
  }

  .portal-metric strong {
    font-size: 24px;
  }

  .portal-metric span {
    font-size: 13px;
  }

  .profile-card-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: clamp(10px, 1.4vw, 16px);
    width: 100%;
    margin-top: 16px;
  }

  .profile-card-grid > .profile-card:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .profile-card {
    min-height: clamp(172px, 19vw, 224px);
    grid-template-rows: auto auto;
    justify-items: center;
    align-content: center;
    gap: 12px;
    padding: 16px 10px 14px;
    border-radius: 12px;
    text-align: center;
  }

  .profile-avatar {
    width: clamp(72px, 8.7vw, 102px);
    height: clamp(72px, 8.7vw, 102px);
    border-radius: 13px;
  }

  .profile-icon {
    width: clamp(50px, 5.9vw, 68px);
    height: clamp(50px, 5.9vw, 68px);
  }

  .profile-card-name {
    margin-top: 0;
    font-size: clamp(16px, 1.75vw, 20px);
    line-height: 1.22;
  }

  .todo-module-portal {
    width: min(calc(100% - 44px), 900px);
  }

  .user-portal-footer {
    margin-top: 18px;
  }
}

/* Admin console final shell override.
   The user portal has several tablet/mobile rules; keep the admin console from
   inheriting those narrow card/home layouts so the sidebar labels never wrap
   into one or two Chinese characters per line. */
body:not(.user-portal-body):not(.login-body) .app-shell {
  grid-template-columns: clamp(260px, 18vw, 300px) minmax(0, 1fr);
  min-height: 100vh;
}

body:not(.user-portal-body):not(.login-body) .sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 24px 18px;
  border-right: 1px solid rgba(255, 255, 255, .08);
  border-bottom: 0;
}

body:not(.user-portal-body):not(.login-body) .brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

body:not(.user-portal-body):not(.login-body) .brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  font-size: 28px;
  flex: 0 0 auto;
}

body:not(.user-portal-body):not(.login-body) .brand strong {
  font-size: 18px;
  line-height: 1.2;
  white-space: nowrap;
}

body:not(.user-portal-body):not(.login-body) .brand span {
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
}

body:not(.user-portal-body):not(.login-body) .side-nav {
  display: grid;
  gap: 8px;
  overflow: visible;
  padding: 0;
}

body:not(.user-portal-body):not(.login-body) .side-nav a {
  min-width: 0;
  min-height: 48px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  justify-items: stretch;
  gap: 10px;
  padding: 12px 13px;
  text-align: left;
  scroll-snap-align: none;
}

body:not(.user-portal-body):not(.login-body) .side-nav a span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  font-size: 12px;
  line-height: 1;
  background: rgba(255, 255, 255, .08);
}

body:not(.user-portal-body):not(.login-body) .side-nav a em {
  min-width: 0;
  max-width: 100%;
  display: block;
  overflow: hidden;
  color: inherit;
  font-size: 15px;
  line-height: 1.2;
  font-style: normal;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: keep-all;
}

body:not(.user-portal-body):not(.login-body) .sidebar-user {
  margin-top: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  align-items: stretch;
  padding: 16px 18px;
  border-radius: 18px;
}

body:not(.user-portal-body):not(.login-body) .sidebar-user span {
  display: block;
  grid-column: auto;
  font-size: 13px;
}

body:not(.user-portal-body):not(.login-body) .sidebar-user strong {
  max-width: 100%;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.user-portal-body):not(.login-body) .sidebar-user button {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
}

@media (max-width: 760px) {
  body:not(.user-portal-body):not(.login-body) .app-shell {
    grid-template-columns: 1fr;
  }

  body:not(.user-portal-body):not(.login-body) .sidebar {
    height: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 12px max(12px, env(safe-area-inset-left));
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
  }

  body:not(.user-portal-body):not(.login-body) .brand {
    padding: 0;
    border-bottom: 0;
  }

  body:not(.user-portal-body):not(.login-body) .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 22px;
  }

  body:not(.user-portal-body):not(.login-body) .side-nav {
    grid-column: 1 / -1;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 3px;
    -webkit-overflow-scrolling: touch;
  }

  body:not(.user-portal-body):not(.login-body) .side-nav a {
    flex: 0 0 auto;
    min-width: 90px;
    min-height: 42px;
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 9px 12px;
    text-align: center;
  }

  body:not(.user-portal-body):not(.login-body) .side-nav a span {
    display: none;
  }

  body:not(.user-portal-body):not(.login-body) .side-nav a em {
    font-size: 12.5px;
  }

  body:not(.user-portal-body):not(.login-body) .sidebar-user {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 999px;
  }

  body:not(.user-portal-body):not(.login-body) .sidebar-user span {
    display: none;
  }

  body:not(.user-portal-body):not(.login-body) .sidebar-user strong {
    max-width: 118px;
  }

  body:not(.user-portal-body):not(.login-body) .sidebar-user button {
    width: auto;
    min-height: 34px;
    padding: 7px 10px;
  }
}

.footer-account-group {
  min-width: 0;
  display: inline-grid;
  grid-auto-flow: column;
  align-items: baseline;
  gap: 8px;
}

.footer-access {
  max-width: 150px;
  overflow: hidden;
  color: #5f6f84;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.footer-access.access-limited {
  color: #a16207 !important;
}

.footer-access.access-expired {
  color: var(--danger) !important;
}

.footer-access.access-permanent {
  color: var(--ok) !important;
}

@media (max-width: 980px) {
  .user-edit-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .footer-account-group {
    grid-auto-flow: row;
    justify-items: start;
    gap: 1px;
  }

  .footer-access {
    max-width: 180px;
  }
}

/* OA product login v2 */
.login-body {
  min-height: 100vh;
  margin: 0;
  color: #111827;
  background: #f4f7fb;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.login-page {
  display: grid;
  grid-template-columns: minmax(360px, 0.92fr) minmax(380px, 0.58fr);
  gap: 28px;
  align-items: stretch;
  min-height: 100vh;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 32px;
}

.login-page .logo-row {
  display: grid;
  align-content: end;
  justify-items: start;
  min-width: 0;
  min-height: calc(100vh - 64px);
  border: 1px solid #0a1a30;
  border-radius: 18px;
  padding: 34px;
  color: #fff;
  background: #0d2340;
}

.login-page .brand-logo-text {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  color: #fff;
  background: #1f5fbf;
  font-size: 30px;
  font-weight: 900;
}

.login-page .brand-title h1 {
  margin: 0;
  color: #fff;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 920;
}

.login-page .brand-title p {
  max-width: 56ch;
  margin: 10px 0 0;
  color: #b8d2f4;
  font-size: 15px;
  line-height: 1.7;
}

.login-page .brand-title p::after {
  content: " · 部门工作台 / 待办审批 / 企业微信 / 审计追踪";
}

.login-card {
  display: grid;
  align-content: center;
  min-width: 0;
  border: 1px solid #d8e0ea;
  border-radius: 18px;
  padding: 28px;
  background: #fff;
  box-shadow: none;
}

.login-panel {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.login-card .tabs {
  margin-bottom: 18px;
}

.login-card .tab {
  width: auto;
  min-height: 34px;
  border: 1px solid #d8e0ea;
  border-radius: 999px;
  padding: 0 13px;
  color: #164a98;
  background: #eaf2ff;
  font-size: 13px;
  font-weight: 860;
}

.login-card form {
  display: grid;
  gap: 14px;
}

.login-card label {
  display: grid;
  gap: 7px;
  color: #374151;
  font-size: 13px;
  font-weight: 860;
}

.login-card input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cdd7e5;
  border-radius: 12px;
  padding: 10px 12px;
  color: #111827;
  background: #fff;
  font: inherit;
  font-size: 14px;
}

.login-card input::placeholder {
  color: #4b5563;
}

.login-card input:focus {
  border-color: #1f5fbf;
  outline: none;
  box-shadow: 0 0 0 3px rgba(31, 95, 191, 0.12);
}

.primary-login-button {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: #1f5fbf;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.helper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #4b5563;
  font-size: 13px;
}

.text-button {
  color: #164a98;
  font-weight: 860;
}

.modal-dialog {
  border: 1px solid #d8e0ea;
  border-radius: 16px;
  box-shadow: none;
}

@media (max-width: 860px) {
  .login-page {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .login-page .logo-row {
    min-height: 240px;
  }
}

/* Enterprise Workspace login */
.workspace-login-body {
  --workspace-primary: #1677ff;
  --workspace-primary-dark: #0958d9;
  --workspace-title: #1f2937;
  --workspace-body: #4b5563;
  --workspace-secondary: #667085;
  --workspace-border: #e8eaf0;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--workspace-title);
  background: #f6f8fb;
  font-family: Inter, MiSans, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.workspace-symbols {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.workspace-symbols symbol,
.workspace-feature svg,
.floating-business-icon,
.sso-capabilities svg,
.sso-loading-mark svg,
.sso-unavailable-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.workspace-backdrop {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.workspace-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: .72;
  animation: workspace-drift 16s ease-in-out infinite alternate;
}

.glow-one {
  top: -18%;
  left: -9%;
  width: 540px;
  height: 540px;
  background: radial-gradient(circle, rgba(22, 119, 255, .13), rgba(22, 119, 255, 0) 68%);
}

.glow-two {
  right: -9%;
  bottom: -24%;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, rgba(80, 145, 255, .11), rgba(80, 145, 255, 0) 70%);
  animation-delay: -6s;
}

.floating-business-icon {
  position: absolute;
  width: 54px;
  height: 54px;
  padding: 14px;
  border: 1px solid rgba(22, 119, 255, .10);
  border-radius: 16px;
  color: rgba(22, 119, 255, .20);
  background: rgba(255, 255, 255, .48);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(31, 41, 55, .025);
  animation: workspace-float 9s ease-in-out infinite;
}

.floating-contract { top: 10%; left: 47%; transform: rotate(7deg); }
.floating-quote { top: 72%; left: 4%; transform: rotate(-8deg); animation-delay: -3s; }
.floating-folder { right: 3%; bottom: 8%; transform: rotate(6deg); animation-delay: -5s; }
.floating-approval { top: 8%; right: 4%; transform: rotate(-5deg); animation-delay: -7s; }

.workspace-login {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 55fr) minmax(440px, 45fr);
  align-items: center;
  gap: clamp(48px, 6vw, 104px);
  width: min(1600px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(48px, env(safe-area-inset-top)) clamp(32px, 5.55vw, 80px) max(48px, env(safe-area-inset-bottom));
}

.workspace-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  max-width: 760px;
}

.workspace-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(52px, 8vh, 92px);
}

.workspace-brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, #4096ff, #0958d9);
  box-shadow: 0 6px 14px rgba(22, 119, 255, .18);
  font-size: 20px;
  font-weight: 800;
}

.workspace-brand div:last-child {
  display: grid;
  gap: 2px;
}

.workspace-brand strong {
  color: var(--workspace-title);
  font-size: 18px;
  line-height: 1.2;
  font-weight: 650;
}

.workspace-brand span {
  color: var(--workspace-secondary);
  font-size: 12px;
  letter-spacing: .025em;
}

.workspace-message h1 {
  margin: 0;
  color: var(--workspace-title);
  font-size: 40px;
  line-height: 1.16;
  letter-spacing: -.025em;
  font-weight: 760;
  text-wrap: balance;
}

.workspace-subtitle {
  margin: 12px 0 0;
  color: var(--workspace-primary);
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -.02em;
  font-weight: 560;
}

.workspace-description {
  max-width: 650px;
  margin: 24px 0 0;
  color: var(--workspace-secondary);
  font-size: 16px;
  line-height: 1.8;
  text-wrap: pretty;
}

.workspace-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 22px;
  margin-top: clamp(42px, 6.5vh, 70px);
}

.workspace-feature {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  margin: 0;
  padding: 14px 12px;
  border-radius: 14px;
  transition: transform 180ms cubic-bezier(.22, 1, .36, 1), background-color 180ms ease, box-shadow 180ms ease;
}

.workspace-feature:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, .76);
  box-shadow: 0 6px 14px rgba(31, 41, 55, .04);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 14px;
  color: var(--workspace-primary);
  background: #eaf3ff;
}

.feature-icon svg {
  width: 21px;
  height: 21px;
}

.workspace-feature h2,
.workspace-feature p {
  margin: 0;
}

.workspace-feature h2 {
  color: var(--workspace-title);
  font-size: 15px;
  line-height: 1.35;
  font-weight: 650;
}

.workspace-feature p {
  margin-top: 3px;
  color: var(--workspace-secondary);
  font-size: 13px;
  line-height: 1.45;
}

.workspace-auth {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.sso-card {
  width: min(520px, 100%);
  padding: clamp(32px, 3.3vw, 48px);
  border-radius: 24px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 20px 60px rgba(15, 23, 42, .08);
}

.sso-card-heading {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sso-wecom-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 14px;
  background: #f0fbf5;
}

.sso-wecom-mark svg {
  width: 34px;
  height: 34px;
}

.sso-card-heading h2,
.sso-card-heading p {
  margin: 0;
}

.sso-card-heading h2 {
  color: var(--workspace-title);
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: -.015em;
  font-weight: 720;
}

.sso-card-heading p {
  margin-top: 5px;
  color: var(--workspace-secondary);
  font-size: 14px;
  line-height: 1.5;
}

.sso-qr-stage {
  display: grid;
  justify-items: center;
  margin-top: 30px;
  text-align: center;
}

.sso-qr-frame {
  display: grid;
  place-items: center;
  width: 252px;
  min-height: 252px;
  padding: 16px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, .08);
  animation: qr-breathe 3.8s ease-in-out infinite;
  overflow: hidden;
}

.sso-qr-loading,
.sso-unavailable {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--workspace-secondary);
}

.sso-loading-mark,
.sso-unavailable-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  color: var(--workspace-primary);
  background: #edf5ff;
}

.sso-loading-mark svg,
.sso-unavailable-icon svg {
  width: 27px;
  height: 27px;
}

.sso-qr-loading strong,
.sso-unavailable strong {
  color: var(--workspace-title);
  font-size: 15px;
  font-weight: 650;
}

.sso-qr-loading span:last-child,
.sso-unavailable span:last-child {
  max-width: 22ch;
  font-size: 12px;
  line-height: 1.55;
}

.sso-qr-frame.is-unavailable {
  background: #f8fafc;
  box-shadow: inset 0 0 0 1px var(--workspace-border);
  animation: none;
}

.sso-unavailable-icon {
  color: #86909c;
  background: #eef1f5;
}

.wecom-official-qr {
  display: grid;
  place-items: center;
  width: 220px;
  min-height: 220px;
}

.wecom-official-qr iframe {
  display: block;
  max-width: 100%;
  border: 0;
}

.sso-scan-title {
  margin-top: 18px;
  color: var(--workspace-title);
  font-size: 15px;
  font-weight: 650;
}

.sso-qr-stage > p {
  margin: 6px 0 0;
  color: var(--workspace-secondary);
  font-size: 13px;
}

.sso-status {
  min-height: 20px;
  margin-top: 8px;
  color: var(--workspace-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.sso-status.is-ready { color: #15803d; }
.sso-status.is-notice { color: #667085; }

.sso-sync-card {
  margin-top: 24px;
  padding: 18px 20px;
  border-radius: 16px;
  color: #164a98;
  background: #eef6ff;
}

.sso-sync-card > strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
}

.sso-sync-card ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.sso-sync-card li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #315f95;
  font-size: 13px;
  font-weight: 560;
}

.sso-sync-card li span {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: #fff;
  background: var(--workspace-primary);
  font-size: 11px;
  font-weight: 800;
}

.sso-capabilities {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.sso-capabilities > div {
  min-width: 0;
  padding: 4px 3px;
  text-align: center;
}

.sso-capabilities span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin: 0 auto 9px;
  border-radius: 12px;
  color: var(--workspace-primary);
  background: #f0f6ff;
}

.sso-capabilities svg {
  width: 19px;
  height: 19px;
}

.sso-capabilities strong,
.sso-capabilities p {
  display: block;
  margin: 0;
}

.sso-capabilities strong {
  color: var(--workspace-title);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 650;
}

.sso-capabilities p {
  margin-top: 3px;
  color: var(--workspace-secondary);
  font-size: 11px;
  line-height: 1.4;
}

.sso-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--workspace-border);
}

.sso-footer p,
.sso-footer span {
  margin: 0;
  color: var(--workspace-secondary);
  font-size: 11px;
  line-height: 1.5;
}

.sso-footer strong {
  color: var(--workspace-body);
  font-weight: 650;
}

@keyframes workspace-drift {
  to { transform: translate3d(34px, 20px, 0) scale(1.05); }
}

@keyframes workspace-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}

@keyframes qr-breathe {
  0%, 100% { box-shadow: 0 8px 28px rgba(15, 23, 42, .07), 0 0 0 0 rgba(22, 119, 255, 0); }
  50% { box-shadow: 0 10px 30px rgba(15, 23, 42, .09), 0 0 0 5px rgba(22, 119, 255, .035); }
}

@media (max-width: 1180px) {
  .workspace-login {
    grid-template-columns: minmax(0, 1fr) minmax(400px, .82fr);
    gap: 42px;
    padding-inline: 40px;
  }

  .workspace-brand { margin-bottom: 52px; }
  .workspace-feature-grid { margin-top: 42px; }
  .workspace-message h1 { font-size: 36px; }
  .workspace-subtitle { font-size: 28px; }
  .sso-card { padding: 34px; }
}

@media (max-width: 920px) {
  .workspace-login {
    grid-template-columns: 1fr;
    gap: 52px;
    padding: 36px 28px 52px;
  }

  .workspace-intro,
  .workspace-auth {
    width: min(680px, 100%);
    margin: 0 auto;
  }

  .workspace-brand { margin-bottom: 48px; }
  .workspace-auth { justify-content: center; }
  .sso-card { width: min(560px, 100%); }
  .floating-contract { left: 82%; }
}

@media (max-width: 600px) {
  .workspace-login {
    gap: 38px;
    padding: 24px 16px 36px;
  }

  .workspace-brand { margin-bottom: 38px; }
  .workspace-message h1 { font-size: 30px; }
  .workspace-subtitle { font-size: 23px; }
  .workspace-description { margin-top: 18px; font-size: 14px; }
  .workspace-feature-grid { grid-template-columns: 1fr; gap: 2px; margin-top: 30px; }
  .workspace-feature { padding: 11px 8px; }
  .sso-card { padding: 26px 20px; border-radius: 20px; }
  .sso-card-heading h2 { font-size: 21px; }
  .sso-qr-frame { width: 230px; min-height: 230px; }
  .wecom-official-qr { width: 200px; min-height: 200px; }
  .sso-sync-card { padding: 16px; }
  .sso-capabilities { grid-template-columns: 1fr; gap: 13px; }
  .sso-capabilities > div { display: grid; grid-template-columns: 38px 1fr; grid-template-rows: auto auto; column-gap: 11px; text-align: left; }
  .sso-capabilities span { grid-row: 1 / 3; margin: 0; }
  .sso-capabilities strong { align-self: end; }
  .sso-capabilities p { align-self: start; }
  .sso-footer { align-items: flex-start; flex-direction: column; gap: 5px; }
  .floating-business-icon { display: none; }
}

@media (max-height: 820px) and (min-width: 921px) {
  .workspace-login { padding-block: 16px; }
  .workspace-brand { margin-bottom: 28px; }
  .workspace-feature-grid { margin-top: 24px; }
  .workspace-feature { padding-block: 8px; }
  .sso-card { padding-block: 22px; }
  .sso-qr-stage { margin-top: 16px; }
  .sso-qr-frame { width: 210px; min-height: 210px; padding: 12px; }
  .wecom-official-qr { width: 186px; min-height: 186px; }
  .sso-scan-title { margin-top: 12px; }
  .sso-sync-card,
  .sso-capabilities { margin-top: 14px; }
  .sso-sync-card { padding-block: 14px; }
  .sso-footer { margin-top: 16px; padding-top: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .workspace-glow,
  .floating-business-icon,
  .sso-qr-frame {
    animation: none;
  }

  .workspace-feature {
    transition-duration: 0ms;
  }
}
