:root {
  font-family: Inter, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: #13233a;
  background: #071523;
  --navy: #071d31;
  --blue: #176fe8;
  --gold: #c39a49;
  --line: #dbe3ed;
  --muted: #718197;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background: #f3f6fa;
}
.platform-login[hidden],
.platform-app[hidden] {
  display: none !important;
}
button,
input,
select {
  font: inherit;
}
.platform-login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 1.05fr) minmax(420px, 0.95fr);
  background: #fff;
}
.login-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10vw;
  background:
    radial-gradient(circle at 70% 80%, #1a5aa2 0, transparent 33%),
    linear-gradient(145deg, #061528, #103b6f);
  color: #fff;
}
.platform-lockup {
  display: grid;
  grid-template-columns: 48px auto;
  grid-template-rows: 25px 17px;
  align-items: center;
  column-gap: 12px;
}
.vector-mark {
  grid-row: 1/3;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid #6da8e8;
  border-radius: 13px;
  background: linear-gradient(145deg, #1b72e9, #07182c);
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 12px 28px #00102066;
}
.platform-lockup b {
  letter-spacing: 0.22em;
  font-size: 17px;
}
.platform-lockup small {
  color: #80a2c8;
  letter-spacing: 0.2em;
  font-size: 8px;
}
.login-brand > p {
  margin: 100px 0 12px;
  color: #74b2f4;
  letter-spacing: 0.25em;
}
.login-brand h1 {
  margin: 0 0 30px;
  font-size: clamp(40px, 4vw, 64px);
  line-height: 1.05;
}
.login-brand h1 span {
  display: block;
  white-space: nowrap;
}
.login-brand > small {
  max-width: 550px;
  color: #b7c8dc;
  font-size: 15px;
  line-height: 1.8;
}
.platform-login form {
  width: min(520px, 82%);
  margin: auto;
  display: flex;
  flex-direction: column;
}
.platform-login form > small,
.platform-main header > span > small,
.tenant-directory header small,
.tenant-detail small {
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 0.22em;
}
.platform-login h2 {
  margin: 12px 0 4px;
  font-size: 36px;
}
.platform-login form > p {
  color: var(--muted);
  margin-bottom: 34px;
}

.platform-login .auth-portal-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 22px 0 24px;
  padding: 5px;
  border: 1px solid #dfe7f1;
  border-radius: 14px;
  background: #f3f6fa;
}

.platform-login .auth-portal-switch > a,
.platform-login .auth-portal-switch > span {
  position: relative;
  padding: 11px 12px;
  border-radius: 10px;
  color: #667386;
  text-decoration: none;
  transition: 160ms ease;
}

.platform-login .auth-portal-switch > span.active {
  background: #fff;
  color: #12223a;
  box-shadow: 0 6px 16px rgba(39, 70, 111, 0.11);
}

.platform-login .auth-portal-switch > a:hover {
  background: #e7effb;
  color: #076fde;
}

.platform-login .auth-portal-switch b,
.platform-login .auth-portal-switch small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-login .auth-portal-switch b {
  font-size: 12px;
}

.platform-login .auth-portal-switch small {
  margin-top: 3px;
  color: #929eae;
  font-size: 9px;
}

.platform-login .auth-portal-switch i {
  position: absolute;
  top: 50%;
  right: 8px;
  font-style: normal;
  transform: translateY(-50%);
}
.platform-login label,
.modal-form label {
  display: grid;
  gap: 8px;
  margin: 10px 0;
  color: #34445b;
  font-size: 13px;
  font-weight: 700;
}
.platform-login input,
.tenant-directory > input,
.modal-form input,
.modal-form select {
  height: 48px;
  padding: 0 14px;
  border: 1px solid #ccd7e5;
  border-radius: 10px;
  background: #fff;
  color: #13233a;
  outline: none;
  transition: 0.15s;
}
.platform-login input:focus,
.tenant-directory > input:focus,
.modal-form input:focus,
.modal-form select:focus {
  border-color: #4b8fe4;
  box-shadow: 0 0 0 3px #2980ed1c;
}
.platform-login form > button,
.tenant-directory header button,
.modal-form footer button.primary {
  height: 50px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #2581f1, #145bd1);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
.platform-login form > a {
  margin: 18px auto;
  color: #3971b4;
  text-decoration: none;
}
.form-error {
  padding: 12px;
  border-radius: 8px;
  background: #fff0f0;
  color: #a82b2b;
  font-size: 12px;
}
.platform-app {
  min-height: 100vh;
  grid-template-columns: 238px minmax(0, 1fr);
}
.platform-app:not([hidden]) {
  display: grid;
}
.platform-app > aside {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px 18px;
  background: linear-gradient(180deg, #0a2440, #061827);
  color: #fff;
}
.platform-app > aside .platform-lockup {
  margin: 0 8px 54px;
}
.platform-app nav {
  display: grid;
  gap: 8px;
}
.platform-app nav button {
  height: 54px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #9eb1c7;
  font-weight: 700;
  cursor: pointer;
}
.platform-app nav button i {
  width: 28px;
  font-size: 20px;
  font-style: normal;
}
.platform-app nav button.active {
  border-color: #2a6cb4;
  background: linear-gradient(100deg, #174d88, #0d3155);
  color: #fff;
  box-shadow: inset 3px 0 #5eb2ff;
}
.platform-app > aside footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 10px;
  color: #8fa5bc;
}
.platform-app > aside footer span {
  color: #e8f2fd;
  font-size: 12px;
}
.platform-app > aside footer span i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: #13ba88;
}
.platform-app > aside footer b {
  margin-top: 12px;
  color: #fff;
}
.platform-app > aside footer button {
  margin-top: 10px;
  border: 0;
  background: none;
  color: #7fa2c8;
  text-align: left;
  cursor: pointer;
}
.platform-main {
  min-width: 0;
}
.platform-main > header {
  min-height: 118px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 42px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.platform-main h1 {
  margin: 5px 0;
  font-size: 30px;
}
.platform-main header p {
  margin: 0;
  color: var(--muted);
}
.platform-main > header > button {
  padding: 11px 18px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: #37506f;
  cursor: pointer;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 24px 42px 0;
}
.metrics article {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
}
.metrics span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.metrics strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
}
.platform-grid {
  display: grid;
  grid-template-columns: minmax(340px, 36%) minmax(0, 64%);
  gap: 18px;
  padding: 18px 42px 42px;
}
.tenant-directory,
.tenant-detail {
  min-height: 620px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
  overflow: hidden;
}
.tenant-directory > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}
.tenant-directory h2,
.tenant-detail h2 {
  margin: 6px 0 0;
}
.tenant-directory header button {
  height: 40px;
  padding: 0 14px;
}
.tenant-directory > input {
  width: calc(100% - 48px);
  margin: 20px 24px;
}
.tenant-item {
  width: calc(100% - 24px);
  min-height: 78px;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  margin: 5px 12px;
  padding: 12px;
  border: 0;
  border-radius: 13px;
  background: #fff;
  color: #13233a;
  text-align: left;
  cursor: pointer;
}
.tenant-item:hover,
.tenant-item.active {
  background: #f1f6fc;
}
.tenant-item.active {
  box-shadow: inset 3px 0 var(--gold);
}
.tenant-item > i {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #102d50;
  color: #fff;
  font-style: normal;
  font-weight: 800;
}
.tenant-item span {
  min-width: 0;
}
.tenant-item b,
.tenant-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tenant-item small,
.tenant-item em {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}
.detail-head {
  display: flex;
  justify-content: space-between;
  padding: 28px;
  border-bottom: 1px solid var(--line);
}
.detail-head p {
  color: var(--muted);
  font-size: 12px;
}
.status {
  height: 28px;
  padding: 6px 12px;
  border-radius: 20px;
  background: #e4f7ef;
  color: #13805f;
  font-size: 10px;
  font-weight: 900;
}
.detail-actions {
  display: flex;
  gap: 10px;
  padding: 20px 28px;
}
.detail-actions button {
  height: 40px;
  padding: 0 14px;
  border: 1px solid #cdd9e7;
  border-radius: 9px;
  background: #fff;
  color: #315578;
  font-weight: 700;
  cursor: pointer;
}
.detail-actions button.primary {
  border-color: #246bd1;
  background: #176fe8;
  color: #fff;
}
.detail-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
.detail-section {
  margin: 0 28px 24px;
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
}
.detail-section > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding: 18px;
  background: #f7f9fc;
}
.detail-section h3 {
  margin: 4px 0 0;
}
.user-row,
.provider-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 0.8fr 0.8fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-top: 1px solid #e8edf4;
  font-size: 12px;
}
.user-row b,
.user-row small,
.provider-row b,
.provider-row small {
  display: block;
}
.user-row small,
.provider-row small {
  margin-top: 3px;
  color: var(--muted);
}
.role-pill {
  width: max-content;
  padding: 5px 9px;
  border-radius: 20px;
  background: #edf4fc;
  color: #316190;
  font-weight: 800;
}
.user-row button,
.provider-row button {
  padding: 7px 10px;
  border: 1px solid #d1dce9;
  border-radius: 7px;
  background: #fff;
  color: #315578;
  cursor: pointer;
}
.user-row button.danger-action {
  border-color: #efc4c4;
  color: #b4232d;
  background: #fff7f7;
}
.provider-empty-action {
  align-content: center;
  gap: 12px;
}
.provider-empty-action button {
  padding: 9px 14px;
  border: 1px solid #b9d2ef;
  border-radius: 8px;
  background: #f2f7fd;
  color: #1766bd;
  font-weight: 800;
  cursor: pointer;
}
.import-note {
  margin: 10px 0;
  padding: 11px 13px;
  border: 1px solid #dce5f0;
  border-radius: 9px;
  background: #f7f9fc;
  color: #68778b;
  font-size: 11px;
  line-height: 1.6;
}
.import-note code {
  color: #1e4f86;
}
.empty {
  display: grid;
  place-items: center;
  min-height: 180px;
  color: var(--muted);
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #071523b8;
  z-index: 20;
}
.modal-form {
  width: min(620px, 100%);
  max-height: 90vh;
  overflow: auto;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 30px 80px #0005;
}
.modal-form > header {
  padding: 24px 28px;
  border-bottom: 1px solid var(--line);
}
.modal-form h2 {
  margin: 4px 0;
}
.modal-form > div {
  padding: 18px 28px;
}
.modal-form footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 28px;
  border-top: 1px solid var(--line);
}
.modal-form footer button {
  height: 42px;
  padding: 0 18px;
  border: 1px solid #ccd7e5;
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
}
.modal-form footer button.primary {
  height: 42px;
}
.confirm {
  display: flex !important;
  grid-template-columns: auto 1fr !important;
  align-items: center;
}
.confirm input {
  width: 18px;
  height: 18px;
}
.toasts {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  display: grid;
  gap: 9px;
}
.toast {
  min-width: 280px;
  padding: 14px 18px;
  border-left: 4px solid #188b69;
  border-radius: 10px;
  background: #102942;
  color: #fff;
  box-shadow: 0 15px 40px #0004;
}
.toast.error {
  border-color: #dc3a3a;
  background: #632026;
}
.toast b,
.toast small {
  display: block;
}
.toast small {
  margin-top: 5px;
  color: #d5e2ef;
}
@media (max-width: 980px) {
  .platform-grid {
    grid-template-columns: 1fr;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .platform-login {
    grid-template-columns: 1fr;
  }
  .login-brand {
    display: none;
  }
}
@media (max-width: 720px) {
  .platform-app {
    grid-template-columns: 70px minmax(0, 1fr);
  }
  .platform-app > aside {
    padding: 18px 9px;
  }
  .platform-app > aside .platform-lockup {
    margin-inline: auto;
  }
  .platform-lockup b,
  .platform-lockup small,
  .platform-app nav button:not(.active)::after,
  .platform-app nav button {
    font-size: 0;
  }
  .platform-app nav button {
    justify-content: center;
    padding: 0;
  }
  .platform-app nav button i {
    font-size: 20px;
  }
  .platform-app > aside footer {
    display: none;
  }
  .platform-main > header,
  .metrics,
  .platform-grid {
    padding-left: 16px;
    padding-right: 16px;
  }
  .platform-main > header p {
    display: none;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
  .user-row,
  .provider-row {
    grid-template-columns: 1fr auto;
  }
  .user-row > :nth-child(2),
  .provider-row > :nth-child(2) {
    display: none;
  }
}
