:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eef2f5;
  --surface-3: #f9fafb;
  --text: #1c2430;
  --muted: #697586;
  --line: #d9e0e8;
  --primary: #3158d4;
  --primary-2: #079992;
  --accent: #c47f18;
  --danger: #c24141;
  --success: #16875d;
  --warning: #b7791f;
  --radius: 8px;
  --shadow: 0 12px 30px rgba(31, 42, 55, .08);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(180deg, #ffffff 0, var(--bg) 260px),
    var(--bg);
  font-family: var(--font);
  font-size: 14px;
  letter-spacing: 0;
}

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

button {
  border: 0;
  cursor: pointer;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

p {
  color: var(--muted);
  line-height: 1.45;
}

label {
  display: grid;
  gap: 7px;
  color: #2f3a48;
  font-size: 12px;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  outline: none;
  padding: 10px 11px;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(49, 88, 212, .13);
}

.app {
  min-height: 100vh;
}

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

.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(620px, 1160px) 430px;
  gap: clamp(28px, 3vw, 56px);
  align-items: center;
  justify-content: center;
  padding: 54px clamp(36px, 4.2vw, 80px);
  color: #f8fbff;
  background:
    linear-gradient(90deg, rgba(26, 73, 151, .24), transparent 35%, rgba(3, 111, 111, .14) 100%),
    linear-gradient(180deg, #0a1628, #06101d 58%, #050d18),
    #06101d;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.login::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 72px 72px;
  pointer-events: none;
}

.login::after {
  content: "";
  position: fixed;
  z-index: 0;
  left: var(--pointer-x, 50vw);
  top: var(--pointer-y, 50vh);
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(61, 215, 203, .11), rgba(42, 111, 218, .045) 42%, transparent 72%);
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.login-brief {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 32px;
  width: 100%;
  max-width: 1050px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 13px;
}

.login-logo-row {
  display: flex;
  align-items: center;
  min-height: 112px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  font-weight: 900;
  box-shadow: 0 10px 28px rgba(49, 88, 212, .18);
}

.brand-mark img,
.tenant-logo-preview img,
.platform-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.brand-mark.has-logo {
  overflow: hidden;
  background: #111820;
}

.brand-mark.has-logo span {
  display: none;
}

.platform-logo {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--radius);
  background: #14191f;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .18);
}

.platform-logo-login {
  width: min(480px, 100%);
  height: 112px;
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.platform-logo.platform-logo-login img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.5);
}

.platform-logo-sidebar {
  width: 74px;
  height: 46px;
  flex: 0 0 74px;
}

.platform-logo.platform-logo-sidebar img {
  object-fit: cover;
  object-position: center;
  transform: scale(1.65);
}

.platform-logo img {
  object-position: center;
  object-fit: contain;
}

.brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-copy b {
  font-size: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-hero-copy {
  display: grid;
  gap: 17px;
}

.login-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: max-content;
  color: #75ded2;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.login-eyebrow i {
  width: 16px;
  height: 16px;
}

.hero-title {
  max-width: 720px;
  color: #f8fbff;
  font-size: 58px;
  line-height: 1.08;
  font-weight: 850;
}

.hero-title span {
  display: block;
  color: #67d9cc;
}

.hero-copy {
  max-width: 730px;
  color: #b7c4d6;
  font-size: 16px;
  line-height: 1.7;
}

.login-panel {
  display: grid;
  gap: 24px;
  width: 100%;
  padding: 34px 32px 24px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 16px;
  background: #f5f7fa;
  box-shadow: 0 26px 60px rgba(0, 0, 0, .34);
}

.login-panel-head {
  display: flex;
  align-items: center;
  gap: 13px;
}

.login-panel-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border: 1px solid #dbe6f7;
  border-radius: 10px;
  color: #2563eb;
  background: #eaf1fc;
}

.login-panel-mark i {
  width: 20px;
  height: 20px;
}

.login-panel h2 {
  color: #17202d;
  font-size: 24px;
  line-height: 1.1;
}

.login-panel p {
  margin-top: 10px;
  color: #647084;
}

.form {
  display: grid;
  gap: 13px;
}

.login-panel-wrap {
  position: relative;
  z-index: 1;
  justify-self: start;
  width: min(430px, 100%);
}

.login-form {
  gap: 18px;
}

.login-form label {
  color: #3d4a5d;
}

.input-shell {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #d8e0ec;
  border-radius: 12px;
  background: #ffffff;
  padding: 0 12px;
  color: #8a9ab2;
}

.input-shell:focus-within {
  border-color: #2f75ef;
  box-shadow: 0 0 0 3px rgba(47, 117, 239, .14);
}

.input-shell input {
  min-height: 44px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.input-shell input:focus {
  border: 0;
  box-shadow: none;
}

.input-shell i {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}

.password-toggle {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  margin-right: -6px;
  border-radius: 7px;
  color: #8393aa;
  background: transparent;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  color: #2563eb;
  background: #edf3fd;
  outline: none;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.remember-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #536176;
  font-weight: 500;
}

.remember-row input {
  width: 16px;
  height: 16px;
  padding: 0;
}

.link-button,
.login-links button {
  padding: 0;
  background: transparent;
  color: #2563eb;
  font-size: 12px;
  transition: color .18s ease, transform .2s ease;
}

.login-submit {
  min-height: 48px;
  border-radius: 11px;
  box-shadow: 0 12px 22px rgba(37, 99, 235, .28);
  transition: box-shadow .2s ease, background .2s ease, transform .2s ease;
}

.login-submit:hover {
  background: #244fc8;
  box-shadow: 0 15px 30px rgba(37, 99, 235, .34);
}

.login-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 3px;
  color: #8390a3;
  font-size: 11px;
}

.login-links button {
  color: #66748a;
}

.login-benefits {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 18px 34px;
  max-width: 1000px;
}

.login-benefit {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.login-benefit > span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(138, 226, 211, .45);
  border-radius: 7px;
  background: rgba(255, 255, 255, .08);
  color: #8ae2d3;
}

.login-benefit i {
  width: 14px;
  height: 14px;
}

.login-benefit b,
.login-benefit small {
  display: block;
}

.login-benefit b {
  color: #ffffff;
  font-size: 14px;
}

.login-benefit small {
  margin-top: 5px;
  color: #a8b7ca;
  line-height: 1.45;
}

.login-pace {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.login-pace strong {
  color: #eef5ff;
  font-size: 14px;
}

.login-pace span {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  color: #8192aa;
  font-size: 12px;
}

.login-pace i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #4ecfc2;
}

.login-cursor-core,
.login-cursor-ring {
  position: fixed;
  z-index: 90;
  left: 0;
  top: 0;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  will-change: transform;
}

.login-cursor-core {
  width: 7px;
  height: 7px;
  background: #9df1e7;
  box-shadow: 0 0 18px rgba(103, 217, 204, .8);
}

.login-cursor-ring {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(137, 232, 221, .62);
  background: rgba(65, 214, 198, .06);
  transition: width .18s ease, height .18s ease, background .18s ease, border-color .18s ease, opacity .18s ease;
}

.login-cursor-core.visible,
.login-cursor-ring.visible {
  opacity: 1;
}

.login-cursor-ring.interactive {
  width: 48px;
  height: 48px;
  border-color: rgba(91, 218, 204, .82);
  background: rgba(65, 214, 198, .13);
}

.login-trail-layer {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.login-trail-mark {
  position: absolute;
  width: 18px;
  height: 5px;
  border-radius: 1px;
  background: linear-gradient(90deg, rgba(48, 102, 225, .8), rgba(58, 222, 207, .9));
  box-shadow: 0 0 14px rgba(58, 222, 207, .25);
  transform: translate(-50%, -50%) rotate(var(--trail-rotate));
  animation: loginTrail .72s ease-out forwards;
}

.login-modal {
  width: min(560px, calc(100vw - 28px));
  max-height: min(720px, calc(100vh - 36px));
  overflow: auto;
  padding: 34px;
  border: 1px solid #d9e2ee;
  border-radius: 14px;
  color: #1c2430;
  background: #f8fafc;
  box-shadow: 0 34px 90px rgba(0, 0, 0, .42);
}

.login-modal::backdrop {
  background: rgba(3, 10, 20, .76);
  backdrop-filter: blur(7px);
}

.login-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid #dce4ee;
  border-radius: 8px;
  color: #536176;
  background: #ffffff;
}

.login-modal-close:hover,
.login-modal-close:focus-visible {
  color: #1d4ed8;
  border-color: #aebfda;
  outline: none;
}

.login-modal-close i {
  width: 18px;
  height: 18px;
}

.login-modal-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 10px;
  color: #0f766e;
  background: #dcf5ef;
}

.login-modal-icon i {
  width: 22px;
  height: 22px;
}

.login-modal h2 {
  padding-right: 42px;
  font-size: 25px;
}

.login-modal-body {
  display: grid;
  gap: 18px;
  margin-top: 13px;
}

.login-modal-body p {
  color: #58667a;
  line-height: 1.65;
}

.login-modal-body section {
  display: grid;
  gap: 6px;
  padding-top: 15px;
  border-top: 1px solid #e0e6ee;
}

.login-modal-body h3 {
  font-size: 14px;
}

.login-modal-body a:not(.btn) {
  color: #1d4ed8;
  font-weight: 700;
}

.support-contact {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px;
  border: 1px solid #d9e2ee;
  border-radius: 10px;
  background: #ffffff;
}

.support-contact > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #2563eb;
  background: #eaf1fc;
}

.support-contact small,
.support-contact a {
  display: block;
}

.support-contact small {
  margin-bottom: 3px;
  color: #758297;
}

.modal-action {
  width: max-content;
  text-decoration: none;
}

@keyframes loginTrail {
  0% {
    opacity: .72;
    transform: translate(-50%, -50%) rotate(var(--trail-rotate)) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--trail-rotate)) scale(.25);
  }
}

@media (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .login-cursor-active,
  .login-cursor-active button,
  .login-cursor-active a,
  .login-cursor-active input {
    cursor: none;
  }
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 22px;
  padding: 18px;
  border-right: 1px solid var(--line);
  background: #ffffff;
}

.nav {
  display: grid;
  align-content: start;
  gap: 6px;
  overflow: auto;
}

.nav-btn {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border-radius: var(--radius);
  background: transparent;
  color: #526073;
  text-align: left;
  font-weight: 760;
}

.nav-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

.nav-btn.active {
  background: #e8eefc;
  color: var(--primary);
}

.nav-btn i,
.icon-btn i,
.btn i {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.sidebar-foot {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-3);
}

.sidebar-foot b,
.sidebar-foot small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(10px);
}

.page-title {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.page-title h1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 22px;
}

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

.content {
  min-width: 0;
  display: grid;
  gap: 18px;
  padding: 22px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(31, 42, 55, .05);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 15px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2,
.panel-head h3 {
  font-size: 16px;
}

.panel-body {
  padding: 15px;
}

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

.kpi {
  display: grid;
  gap: 7px;
  min-height: 108px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.kpi span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.kpi strong {
  font-size: 27px;
  line-height: 1;
}

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

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .42fr);
  gap: 14px;
  align-items: start;
}

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

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

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

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

.btn,
.icon-btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius);
  padding: 9px 12px;
  color: var(--text);
  background: var(--surface-2);
  font-weight: 780;
}

.btn.primary {
  color: #fff;
  background: var(--primary);
}

.btn.success {
  color: #fff;
  background: var(--success);
}

.btn.danger {
  color: #fff;
  background: var(--danger);
}

.btn.ghost {
  border: 1px solid var(--line);
  background: var(--surface);
}

.btn.compact {
  min-height: 32px;
  padding: 6px 8px;
  font-size: 12px;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.pill {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-3);
  color: #405066;
  font-size: 12px;
  font-weight: 780;
  white-space: nowrap;
}

.pill.ok {
  border-color: #b6dfce;
  background: #eaf8f1;
  color: #11694b;
}

.pill.warn {
  border-color: #ead3a1;
  background: #fff7e6;
  color: #8a5a11;
}

.pill.off {
  color: #7b8494;
  background: #f0f2f5;
}

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

.module-card {
  display: grid;
  gap: 9px;
  min-height: 126px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-3);
}

.module-card.clickable {
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.module-card.clickable:hover,
.module-card.clickable:focus-visible {
  border-color: rgba(54, 92, 216, .42);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
  outline: none;
  transform: translateY(-1px);
}

.module-card.off {
  opacity: .64;
}

.module-card.disabled {
  cursor: not-allowed;
}

.module-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex: 0 0 44px;
}

.switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #c5cbd4;
  transition: .16s ease;
}

.switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: .16s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
}

.switch input:checked + span {
  background: var(--primary-2);
}

.switch input:checked + span::after {
  transform: translateX(20px);
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  table-layout: auto;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: normal;
  overflow-wrap: anywhere;
}

th {
  background: var(--surface-2);
  color: #526073;
  font-size: 11px;
  text-transform: uppercase;
}

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

.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.bar-list {
  display: grid;
  gap: 11px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(130px, .32fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.bar-fill {
  height: 100%;
  width: var(--w);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
}

.timeline {
  display: grid;
  gap: 8px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-3);
}

.timeline-item b,
.timeline-item small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty {
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.tenant-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

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

.tenant-card-head > div:not(.tenant-logo-preview) {
  min-width: 0;
}

.tenant-card h3 {
  font-size: 16px;
}

.tenant-logo-preview {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #eff4fb, #ffffff);
  color: var(--primary);
  font-size: 18px;
  font-weight: 900;
}

.tenant-logo-preview.has-logo {
  background: #111820;
}

.tenant-logo-preview img {
  object-fit: cover;
}

.tenant-brand-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(31, 42, 55, .05);
}

.tenant-brand-panel > div:not(.tenant-logo-preview) {
  min-width: 0;
  flex: 1 1 auto;
}

.tenant-brand-panel h2 {
  font-size: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-form {
  display: grid;
  gap: 9px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-3);
}

.brand-form .btn {
  justify-self: start;
}

.table-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.table-brand .brand-mark {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border-radius: 7px;
  font-size: 12px;
}

.table-brand b,
.table-brand small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

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

.toolbar input,
.toolbar select {
  width: auto;
  min-width: 180px;
}

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

.blueprint-item {
  display: grid;
  gap: 5px;
  padding: 11px;
  border-left: 4px solid var(--primary-2);
  background: var(--surface-3);
}

.code-token {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 5px;
  background: #ecf1f7;
  color: #243244;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  max-width: min(460px, calc(100vw - 28px));
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #1f2937;
  color: #fff;
  font-weight: 760;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .25);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: .18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

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

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  .login {
    grid-template-columns: 1fr;
    padding: 42px 28px;
  }

  .login-brief {
    max-width: none;
  }

  .login-panel-wrap {
    justify-self: stretch;
    width: min(520px, 100%);
  }
}

@media (max-width: 920px) {
  .login {
    grid-template-columns: 1fr;
    padding: 42px 24px;
  }

  .login-brief {
    gap: 28px;
  }

  .login-panel-wrap {
    justify-self: stretch;
  }

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

  .sidebar {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .login,
  .content {
    padding: 14px;
  }

  .hero-title {
    font-size: 36px;
  }

  .platform-logo-login {
    width: min(310px, 100%);
    height: 84px;
  }

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

  .login-panel {
    padding: 28px 18px 22px;
  }

  .login-options {
    align-items: flex-start;
    flex-direction: column;
  }

  .login-links {
    align-items: flex-start;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .login-modal {
    padding: 28px 22px;
  }

  .kpi-grid,
  .module-grid,
  .form-grid,
  .form-grid.two,
  .form-grid.four,
  .nav {
    grid-template-columns: 1fr;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .tenant-brand-panel,
  .tenant-card-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .bar-row,
  .timeline-item {
    grid-template-columns: 1fr;
  }
}
