/* Shared cabinet styling based on the four supplied page mockups. */
#app {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
}

html[data-theme="dark"] #app {
  --bg: #11131a;
  --card: #25272f;
  --subtle: #2b2d35;
  --chip: #343741;
  --line: #575a65;
  --text: #f2f2f5;
  --muted: #b8b8c0;
  --primary: #4e86f7;
  --primary-dk: #3772e9;
  background: #11131a;
  color: var(--text);
  color-scheme: dark;
}

html[data-theme="dark"] #app::before {
  content: "";
  position: fixed;
  inset: -70px;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(7, 8, 11, .20), rgba(13, 14, 20, .12) 48%, rgba(7, 8, 11, .28)),
    url('/dashboard-atmosphere.jpg') center / cover no-repeat;
  filter: blur(36px) brightness(.96) saturate(.72);
}

#app .top {
  position: relative;
  top: auto;
  width: min(1540px, calc(100% - 48px));
  min-height: 72px;
  margin: 18px auto 10px;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, .27);
  border-radius: 24px;
  background: rgba(64, 66, 74, .68);
  box-shadow: inset 0 1px rgba(255,255,255,.17), 0 18px 45px rgba(0,0,0,.25);
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
}
html[data-theme="dark"] #app:has(.main-wrap) .top { background: rgba(64,66,74,.68); border-color: rgba(255,255,255,.27); }

#app .top .brand {
  flex: none;
  gap: 10px;
  color: #fff;
  font-size: 18px;
}
#app .top .brand img { width: 34px; height: 34px; }
#app .top .brand::after { content: 'EasyCore'; font-weight: 700; letter-spacing: -.025em; }
#app .top #tabs { gap: 4px; margin-left: clamp(10px, 3vw, 64px); }
#app .top .tab {
  min-height: 46px;
  padding: 8px clamp(12px, 1.5vw, 23px);
  border: 1px solid transparent;
  border-radius: 999px;
  color: #e9e8eb;
  font-size: 15px;
}
#app .top .tab:hover { background: rgba(255,255,255,.13); color: #fff; }
#app .top .tab.active {
  background: rgba(238,239,242,.24);
  border-color: rgba(255,255,255,.22);
  color: #fff;
  box-shadow: inset 0 1px rgba(255,255,255,.17);
}
#app .top .badge,
#app .top .icon-btn,
#app .top .fund-sel {
  border: 1px solid rgba(255,255,255,.19);
  background: rgba(27,29,37,.28);
  color: #f3f3f5;
}
#app .top .icon-btn:hover { background: rgba(255,255,255,.15); }
#app .top .icon-btn { border-radius: 11px; }
#app .top #logout { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 5px 8px; }
#app .top #logout svg { flex: none; }
#app .subtabs { margin-top: 6px; }
#app .subtabs .tab { border: 1px solid rgba(255,255,255,.2); background: rgba(38,40,48,.72); color: #e6e6eb; }
#app .subtabs .tab.active { background: rgba(255,255,255,.22); color: #fff; }

html[data-theme="dark"] #app .wrap:not(.full) { max-width: 1540px; }
html[data-theme="dark"] #app .wrap.cards.series-cards { max-width: 1540px; }
html[data-theme="dark"] #app .card,
html[data-theme="dark"] #app:has(.main-wrap) .card {
  border: 1px solid rgba(237,238,244,.23);
  border-radius: 21px;
  background: rgba(29,31,39,.88);
  color: var(--text);
  box-shadow: inset 0 1px rgba(255,255,255,.07), 0 20px 44px rgba(0,0,0,.22);
}
html[data-theme="dark"] #app:has(.main-wrap) .mo-side .card { background: rgba(40,42,50,.90); }
html[data-theme="dark"] #app .series-footer {
  background: rgba(255,255,255,.035);
  border-color: rgba(255,255,255,.13);
  border-radius: 0 0 20px 20px;
}
html[data-theme="dark"] #app .card h2,
html[data-theme="dark"] #app .series-title { letter-spacing: -.025em; }

/* Room identities from the rooms' own marks, shown as the compact logo chips in the mockups. */
html[data-theme="dark"] #app .room-btn:not(.logo) {
  border-radius: 999px;
  background: rgba(245,246,249,.10);
  border-color: rgba(255,255,255,.23);
  color: #f1f1f4;
}
html[data-theme="dark"] #app .room-btn:not(.logo).on {
  background: rgba(243,244,247,.27);
  border-color: rgba(255,255,255,.58);
  color: #fff;
}
#app .room-btn.logo {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 39px;
  padding: 5px 12px 5px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.23);
  background: rgba(245,246,249,.10);
  color: #f1f1f4;
  box-shadow: inset 0 1px rgba(255,255,255,.06);
}
#app .room-btn.logo:hover { background: rgba(245,246,249,.20); border-color: rgba(255,255,255,.43); }
#app .room-btn.logo.on,
#app .lc .room-btn.logo.on {
  border-color: rgba(255,255,255,.58);
  background: rgba(243,244,247,.27);
  color: #fff;
  box-shadow: inset 0 1px rgba(255,255,255,.16), 0 0 0 1px rgba(255,255,255,.12);
}
#app .room-btn.logo .room-logo {
  display: block;
  width: 25px;
  height: 25px;
  object-fit: contain;
  border-radius: 50%;
  background: rgba(8,10,17,.64);
  padding: 3px;
}
#app .room-btn.logo .room-logo.dark { background: rgba(8,10,17,.82); }
#app .room-btn.logo .room-label { font-size: 12px; font-weight: 600; line-height: 1; }
#app .room-btn.logo .room-tag { position: static; font-size: 9px; }
html[data-theme="dark"] #app .ls-rooms .ls-room-chip {
  min-height: 37px;
  padding: 5px 11px 5px 6px;
  background: rgba(245,246,249,.10);
  border-color: rgba(255,255,255,.23);
  color: #f1f1f4;
}
html[data-theme="dark"] #app .ls-rooms .ls-room-chip.on {
  background: rgba(243,244,247,.27);
  border-color: rgba(255,255,255,.58);
  color: #fff;
}
#app .ls-room-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 50%;
  padding: 3px;
  background: rgba(8,10,17,.72);
}

html[data-theme="light"] #app .top {
  background: rgba(255,255,255,.94);
  border-color: #d7dde7;
  box-shadow: inset 0 1px #fff, 0 12px 34px rgba(32,42,66,.10);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
html[data-theme="light"] #app .top .brand,
html[data-theme="light"] #app .top .brand::after { color: #1f2a3c; }
html[data-theme="light"] #app .top .tab { color: #526073; }
html[data-theme="light"] #app .top .tab:hover { background: #edf2fa; color: #173b71; }
html[data-theme="light"] #app .top .tab.active {
  background: #e7efff;
  border-color: #bed3fa;
  color: #1954a8;
  box-shadow: none;
}
html[data-theme="light"] #app .top .badge,
html[data-theme="light"] #app .top .icon-btn,
html[data-theme="light"] #app .top .fund-sel {
  background: #f7f9fc;
  border-color: #d9e1ec;
  color: #28344a;
}
html[data-theme="light"] #app .top .icon-btn:hover { background: #e7efff; }
html[data-theme="light"] #app .subtabs .tab { background: #fff; border-color: #d9e1ec; color: #526073; }
html[data-theme="light"] #app .subtabs .tab.active { background: #e7efff; border-color: #bed3fa; color: #1954a8; }
html[data-theme="light"] #app .room-btn.logo {
  color: #252833;
  background: rgba(77,80,92,.10);
  border-color: rgba(64,67,78,.22);
}
html[data-theme="light"] #app .room-btn.logo.on,
html[data-theme="light"] #app .lc .room-btn.logo.on {
  color: #19202c;
  background: rgba(95,103,126,.21);
  border-color: rgba(67,75,96,.53);
}
html[data-theme="light"] #app .ls-rooms .ls-room-chip.on { background: #dce0e8; border-color: #a1a7b4; color: #252833; }

@media (max-width: 1100px) {
  #app .top { flex-wrap: wrap; gap: 7px; }
  #app .top #tabs { order: 10; width: 100%; margin-left: 0; overflow-x: auto; scrollbar-width: none; }
  #app .top #tabs::-webkit-scrollbar { display: none; }
  #app .top .grow { flex: 1; }
}
@media (max-width: 700px) {
  #app .top { width: calc(100% - 16px); margin: 8px auto 4px; padding: 8px 10px; border-radius: 17px; }
  #app .top .brand { flex: none; font-size: 15px; }
  #app .top .brand img { width: 29px; height: 29px; }
  #app .top .tab { min-height: 39px; font-size: 13px; padding: 7px 13px; }
  #app .top #tabs { order: 10; }
  #app .top > .grow { display: block; }
  #app .top #tabsRight { width: auto; }
  html[data-theme="dark"] #app .wrap.cards.series-cards { padding: 12px; }
}
