:root {
  --e3i-navy-950: #071F4A;
  --e3i-navy-800: #17395C;
  --e3i-gold-700: #8F6A11;
  --e3i-gold-500: #D9A925;
  --e3i-paper: #F0F2EC;
  --e3i-surface: #FBFBF8;
  --e3i-line: #CFD6C6;
  --e3i-ink: #0E1A29;
  --e3i-ink-soft: #5C6672;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--e3i-ink);
  background: var(--e3i-paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html, body, #platformRoot { margin: 0; min-height: 100%; height: 100%; }
body { min-width: 320px; overflow: hidden; }

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

.platform-shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  height: 100vh;
  background: var(--e3i-paper);
}

.platform-sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 22px 16px 16px;
  color: #fff;
  background: linear-gradient(180deg, var(--e3i-navy-950) 0%, var(--e3i-navy-800) 100%);
  box-shadow: 12px 0 34px rgba(7, 31, 74, .08);
  z-index: 2;
}

.platform-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 8px 24px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.platform-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  padding: 5px;
  border-radius: 12px;
  background: #fff;
}

.platform-brand div { display: flex; flex-direction: column; min-width: 0; }
.platform-brand span {
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--e3i-gold-500);
}
.platform-brand strong { margin-top: 3px; font-size: 15px; line-height: 1.2; }

.sidebar-section-label {
  padding: 24px 10px 9px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.52);
}

.module-nav { display: grid; gap: 16px; overflow-y: auto; padding-top: 18px; }
.catalog-group h2 { margin: 0 10px 7px; color: #d7dce4; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.catalog-empty { margin: 5px 10px; color: #aeb8c6; font-size: 12px; }

.module-nav-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  padding: 12px 10px;
  color: rgba(255,255,255,.82);
  text-align: left;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.module-nav-item:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.08);
}
.module-nav-item:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.module-nav-item.is-locked { color: #d7dce4; cursor: not-allowed; opacity: .82; }
.module-nav-item.is-locked .module-nav-icon { color: #39475b; background: #d7dce4; }
.module-nav-item.is-locked small { color: #fff; }

.module-nav-item.is-active {
  color: #fff;
  background: rgba(217, 169, 37, .16);
  border-color: rgba(217, 169, 37, .34);
}

.module-nav-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  font-weight: 900;
  border-radius: 9px;
  color: var(--e3i-navy-950);
  background: var(--e3i-gold-500);
}

.module-nav-copy { display: flex; flex-direction: column; min-width: 0; }
.module-nav-copy strong { font-size: 13px; }
.module-nav-copy small {
  margin-top: 3px;
  overflow: hidden;
  font-size: 10px;
  line-height: 1.3;
  color: rgba(255,255,255,.56);
  text-overflow: ellipsis;
}

.platform-sidebar-footer {
  display: flex;
  flex-direction: column;
  margin-top: auto;
  padding: 16px 10px 4px;
  border-top: 1px solid rgba(255,255,255,.1);
}
.platform-sidebar-footer span { font-size: 11px; font-weight: 700; }
.platform-sidebar-footer small { margin-top: 2px; color: rgba(255,255,255,.5); }

.platform-main {
  display: grid;
  grid-template-rows: 72px minmax(0, 1fr);
  min-width: 0;
  height: 100vh;
}

.platform-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 24px;
  background: #fff;
  border-bottom: 1px solid var(--e3i-line);
}

.platform-topbar > div:first-child { min-width: 0; }
.platform-eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--e3i-ink-soft);
}
.platform-topbar h1 {
  margin: 3px 0 0;
  overflow: hidden;
  font-size: 19px;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.platform-name { font-size: 12px; font-weight: 800; color: var(--e3i-gold-700); white-space: nowrap; }

.module-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  margin: 14px;
  overflow: hidden;
  border: 1px solid var(--e3i-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(19, 43, 77, .08);
}

.module-frame { width: 100%; height: 100%; border: 0; background: #fff; }

.module-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 1;
  font-size: 13px;
  font-weight: 700;
  color: var(--e3i-ink-soft);
  background: var(--e3i-surface);
}
.module-loading.is-hidden { display: none; }

.platform-empty {
  display: grid;
  place-content: center;
  min-height: 100vh;
  padding: 32px;
  text-align: center;
}
.platform-empty h1 { margin: 0; color: var(--e3i-navy-950); }
.platform-empty p { color: var(--e3i-ink-soft); }
.catalog-welcome { display: grid; place-items: center; padding: 40px; text-align: center; }
.catalog-welcome > div { max-width: 620px; }
.catalog-welcome h2 { color: var(--e3i-navy-950); font-size: clamp(24px, 4vw, 42px); }
.catalog-welcome p { color: #495462; line-height: 1.6; }
.catalog-welcome a { display: inline-block; margin-top: 12px; padding: 12px 18px; border-radius: 8px; color: #fff; background: var(--e3i-navy-950); font-weight: 700; }

@media (max-width: 820px) {
  .platform-shell { grid-template-columns: 76px minmax(0, 1fr); }
  .platform-sidebar { padding: 16px 10px; }
  .platform-brand { justify-content: center; padding: 0 0 18px; }
  .platform-brand div, .sidebar-section-label, .module-nav-copy, .platform-sidebar-footer { display: none; }
  .module-nav-item { display: grid; grid-template-columns: 1fr; place-items: center; padding: 10px; }
  .platform-topbar { padding: 0 16px; }
  .platform-name { display: none; }
  .module-stage { margin: 8px; border-radius: 10px; }
}

@media (max-width: 520px) {
  .platform-shell { grid-template-columns: 58px minmax(0, 1fr); }
  .platform-sidebar { padding: 12px 7px; }
  .platform-brand img { width: 38px; height: 38px; }
  .module-nav-icon { width: 32px; height: 32px; }
  .platform-main { grid-template-rows: 62px minmax(0, 1fr); }
  .platform-topbar h1 { font-size: 16px; }
}
