:root {
  --command-bg: #020b12;
  --command-panel: rgba(7, 24, 35, .88);
  --command-line: rgba(105, 179, 214, .18);
  --command-text: #e9f7ff;
  --command-muted: #7d9cab;
  --command-cyan: #30e3d2;
  --command-blue: #49a7ff;
}

.command-sidebar,
.command-top-code,
.command-clock { display: none; }

.app.command-mode {
  grid-template-columns: 246px minmax(0, 1fr) !important;
  color: var(--command-text);
  background:
    radial-gradient(circle at 40% -10%, rgba(25, 123, 160, .18), transparent 34%),
    radial-gradient(circle at 90% 34%, rgba(27, 107, 115, .1), transparent 28%),
    linear-gradient(145deg, #020a10, #03111a 50%, #020a11);
}

.app.command-mode::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .2;
  background-image:
    linear-gradient(rgba(64, 162, 198, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(64, 162, 198, .055) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000, transparent 92%);
}

.app.command-mode #moduleSidebar { display: none !important; }
.app.command-mode .command-sidebar {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 26px 18px 18px;
  border-right: 1px solid var(--command-line);
  background: linear-gradient(180deg, rgba(4, 17, 25, .98), rgba(3, 14, 21, .95));
  box-shadow: 18px 0 60px rgba(0, 0, 0, .18);
}

.app.command-mode .command-sidebar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--command-cyan), transparent);
  opacity: .7;
}

.command-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 6px 28px;
  border-bottom: 1px solid var(--command-line);
}

.command-brand-orbit {
  position: relative;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(48, 227, 210, .55);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(48, 227, 210, .2), rgba(9, 40, 52, .4));
  box-shadow: 0 0 28px rgba(48, 227, 210, .12);
}

.command-brand-orbit::before,
.command-brand-orbit::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(73, 167, 255, .35);
  border-radius: 50%;
}
.command-brand-orbit::before { inset: 5px -3px; transform: rotate(42deg); }
.command-brand-orbit::after { inset: -3px 7px; transform: rotate(-42deg); }
.command-brand-orbit span { font-size: 18px; font-weight: 900; text-shadow: 0 0 12px var(--command-cyan); }
.command-brand p { margin: 0 0 5px; color: var(--command-cyan) !important; font-size: 9px; font-weight: 800; letter-spacing: .18em; }
.command-brand strong { display: block; font-size: 20px; letter-spacing: -.04em; }
.command-brand small { display: block; margin-top: 3px; color: var(--command-muted); font-size: 10px; }

.command-nav { display: grid; gap: 8px; margin-top: 26px; }
.app.command-mode .command-nav-item {
  position: relative;
  min-height: 66px !important;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px !important;
  overflow: hidden;
  border: 1px solid transparent !important;
  border-radius: 12px !important;
  color: #7893a0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: left;
}
.app.command-mode .command-nav-item::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 2px; background: var(--command-cyan); transform: scaleY(0); transition: transform .2s ease; }
.app.command-mode .command-nav-item:hover { color: #dff8ff !important; border-color: rgba(73, 167, 255, .2) !important; background: rgba(73, 167, 255, .05) !important; transform: translateX(2px); }
.app.command-mode .command-nav-item.active { color: #ecffff !important; border-color: rgba(48, 227, 210, .3) !important; background: linear-gradient(90deg, rgba(48, 227, 210, .13), rgba(73, 167, 255, .04)) !important; }
.app.command-mode .command-nav-item.active::before { transform: scaleY(1); }
.command-nav-item > span { color: var(--command-cyan); font-size: 10px; font-weight: 800; }
.command-nav-item b, .command-nav-item small { display: block; }
.command-nav-item b { font-size: 13px; }
.command-nav-item small { margin-top: 4px; color: #54717f; font-size: 8px; letter-spacing: .12em; }

.command-system-card { margin-top: auto; padding: 14px; border: 1px solid var(--command-line); border-radius: 13px; background: linear-gradient(145deg, rgba(8, 31, 44, .76), rgba(5, 21, 31, .6)); }
.command-system-card > div:first-child { display: flex; justify-content: space-between; color: #91acb8; font-size: 10px; }
.command-system-card > div:first-child b { color: var(--command-cyan); font-size: 9px; }
.command-pulse { display: flex; align-items: center; gap: 3px; height: 35px; margin: 7px 0 5px; }
.command-pulse i { display: block; width: 3px; height: 8px; border-radius: 3px; background: var(--command-cyan); opacity: .3; animation: command-bars 1.5s ease-in-out infinite; }
.command-pulse i:nth-child(2n) { height: 18px; animation-delay: .12s; }.command-pulse i:nth-child(3n) { height: 28px; animation-delay: .24s; }.command-pulse i:nth-child(5n) { height: 13px; animation-delay: .36s; }
.command-system-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.command-system-card dl div { padding-top: 9px; border-top: 1px solid var(--command-line); }
.command-system-card dt { font-size: 15px; font-weight: 800; }.command-system-card dd { margin: 2px 0 0; color: var(--command-muted); font-size: 9px; }
.command-live { display: flex; align-items: center; gap: 9px; margin-top: 12px; padding: 11px 7px 0; color: #8aa5b1; }
.command-live > span { width: 7px; height: 7px; border-radius: 50%; background: var(--command-cyan); box-shadow: 0 0 0 4px rgba(48,227,210,.1), 0 0 14px var(--command-cyan); animation: command-live 1.8s ease-in-out infinite; }
.command-live b, .command-live small { display: block; }.command-live b { font-size: 9px; letter-spacing: .15em; }.command-live small { margin-top: 3px; font-size: 9px; }

.app.command-mode > main { position: relative; z-index: 2; min-width: 0; padding: 0 28px 18px !important; overflow: auto; }
.app.command-mode > main > .topbar {
  min-height: 94px;
  display: flex;
  align-items: center;
  margin: 0 0 22px !important;
  padding: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--command-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.app.command-mode .command-top-code { display: block; margin-bottom: 5px; color: var(--command-cyan); font-size: 9px; font-weight: 800; letter-spacing: .2em; }
.app.command-mode #pageTitle { margin: 0 0 4px; font-size: 24px; letter-spacing: -.04em; }
.app.command-mode #pageSubtitle { color: var(--command-muted) !important; font-size: 11px; }
.app.command-mode .command-clock { display: grid; min-width: 118px; margin-right: 4px; text-align: right; }
.command-clock b { font-family: Consolas, monospace; color: #dffeff; font-size: 18px; letter-spacing: .06em; }
.command-clock span { margin-top: 2px; color: var(--command-muted); font-size: 9px; }
.app.command-mode .user-actions { flex-wrap: nowrap; gap: 8px; }
.app.command-mode .user-actions button {
  min-height: 38px !important;
  height: 38px !important;
  border: 1px solid #1c4153 !important;
  border-radius: 9px !important;
  color: #bdd4df !important;
  background: linear-gradient(180deg, rgba(13, 39, 54, .88), rgba(7, 27, 39, .88)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025) !important;
  padding: 0 13px !important;
  font-size: 11px;
}
.app.command-mode .user-actions button:hover { color: white !important; border-color: rgba(48, 227, 210, .65) !important; background: linear-gradient(180deg, rgba(17, 58, 72, .95), rgba(8, 36, 49, .95)) !important; transform: translateY(-1px); }
.app.command-mode #currentUserBadge { min-height: 38px; display: inline-flex; align-items: center; border: 1px solid rgba(48,227,210,.25); border-radius: 9px; color: #dff; background: rgba(8,32,44,.78); font-size: 10px; }

.command-home-view { padding: 0; }
.command-hero { position: relative; display: grid; grid-template-columns: minmax(360px, 1.15fr) minmax(280px, .72fr) minmax(160px, .42fr); gap: 28px; min-height: 306px; padding: 28px 30px; overflow: hidden; border: 1px solid rgba(83, 175, 204, .22); border-radius: 18px; background: linear-gradient(115deg, rgba(7, 28, 40, .96), rgba(5, 22, 32, .82) 56%, rgba(6, 27, 37, .94)); box-shadow: 0 26px 70px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.02); scroll-margin-top: 10px; }
.command-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 49.8%, rgba(48,227,210,.035) 50%, transparent 50.2%), linear-gradient(transparent 49.8%, rgba(48,227,210,.025) 50%, transparent 50.2%); background-size: 90px 90px; pointer-events: none; }
.command-hero::after { content: ""; position: absolute; inset: 0 24px auto; height: 1px; background: linear-gradient(90deg, transparent, var(--command-cyan), transparent); opacity: .55; }
.command-hero-copy { position: relative; z-index: 2; align-self: center; }
.command-section-code { display: flex; align-items: center; gap: 9px; color: #618b9d; font-size: 9px; font-weight: 800; letter-spacing: .16em; }.command-section-code span { color: var(--command-cyan); }
.command-hero-copy h2 { margin: 17px 0 13px; color: var(--command-text); font-size: clamp(28px, 2.35vw, 42px); line-height: 1.13; letter-spacing: -.055em; }
.command-hero-copy h2 em { color: transparent; background: linear-gradient(90deg, #e8ffff, #52eadc 55%, #68baff); -webkit-background-clip: text; background-clip: text; font-style: normal; }
.command-hero-copy > p { max-width: 610px; color: #89a7b5 !important; font-size: 12px; line-height: 1.8; }
.command-hero-actions { display: flex; align-items: center; gap: 13px; margin-top: 22px; }
.app.command-mode .command-primary { min-width: 166px; min-height: 42px !important; display: flex; align-items: center; justify-content: space-between; padding: 0 7px 0 15px !important; border: 1px solid rgba(48,227,210,.8) !important; border-radius: 10px !important; color: #041316 !important; background: linear-gradient(135deg, #35e5d4, #4abcf5) !important; box-shadow: 0 10px 28px rgba(48,227,210,.16) !important; font-size: 11px; }
.command-primary b { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 7px; background: rgba(1,19,23,.16); font-size: 15px; }
.command-access-note { color: #698896; font-size: 9px; }

.command-core { position: relative; align-self: center; justify-self: center; width: 260px; height: 260px; display: grid; place-items: center; }
.command-core::before { content: ""; position: absolute; inset: 32px; border-radius: 50%; background: radial-gradient(circle, rgba(48,227,210,.15), transparent 64%); filter: blur(5px); }
.command-orbit { position: absolute; border: 1px solid rgba(73,167,255,.16); border-radius: 50%; animation: command-spin 18s linear infinite; }.command-orbit::after { content: ""; position: absolute; inset: 9%; border: 1px dashed rgba(48,227,210,.1); border-radius: inherit; }
.command-orbit-outer { inset: 2px; }.command-orbit-inner { inset: 36px; animation-duration: 12s; animation-direction: reverse; }
.command-orbit i { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--command-cyan); box-shadow: 0 0 13px var(--command-cyan); }.command-orbit i:nth-child(1) { top: 15%; left: 16%; }.command-orbit i:nth-child(2) { right: -3px; top: 48%; }.command-orbit i:nth-child(3) { left: 27%; bottom: 2%; }.command-orbit-inner i:nth-child(1) { left: 48%; top: -4px; background: var(--command-blue); }.command-orbit-inner i:nth-child(2) { left: 7%; bottom: 18%; }
.command-core-ring { position: relative; z-index: 2; width: 126px; height: 126px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid rgba(48,227,210,.58); border-radius: 50%; background: radial-gradient(circle at 50% 40%, rgba(29,93,103,.7), rgba(4,24,32,.92) 70%); box-shadow: 0 0 0 8px rgba(48,227,210,.035), 0 0 42px rgba(48,227,210,.15), inset 0 0 28px rgba(48,227,210,.08); }
.command-core-ring span { color: var(--command-cyan); font-size: 7px; font-weight: 900; letter-spacing: .13em; }.command-core-ring strong { margin: 4px 0 1px; font: 700 30px/1 Consolas, monospace; }.command-core-ring small { color: #8ba9b5; font-size: 8px; }
.command-node { position: absolute; z-index: 3; min-width: 38px; padding: 4px 6px; border: 1px solid rgba(73,167,255,.25); border-radius: 5px; color: #93c9de; background: rgba(5,28,40,.94); font-size: 8px; text-align: center; }.command-node.node-one { left: 7px; top: 61px; }.command-node.node-two { right: -3px; top: 86px; }.command-node.node-three { right: 24px; bottom: 31px; }.command-node.node-four { left: 8px; bottom: 55px; }

.command-metrics { position: relative; z-index: 2; display: grid; align-content: center; gap: 9px; scroll-margin-top: 110px; }
.command-metrics article { position: relative; padding: 13px 14px; overflow: hidden; border: 1px solid rgba(91,158,187,.17); border-radius: 11px; background: rgba(7,27,39,.68); }.command-metrics article::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 2px; background: linear-gradient(transparent, var(--command-cyan), transparent); }
.command-metrics span, .command-metrics strong, .command-metrics small { display: block; }.command-metrics span { color: #7898a7; font-size: 9px; }.command-metrics strong { margin: 3px 0; font: 700 21px/1.2 Consolas, monospace; }.command-metrics small { color: #698592; font-size: 8px; }

.command-modules { padding: 25px 0 0; scroll-margin-top: 10px; }
.command-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 14px; padding: 0 3px; }.command-section-head h2 { margin: 8px 0 2px; color: var(--command-text); font-size: 21px; letter-spacing: -.04em; }.command-section-head p { color: var(--command-muted) !important; font-size: 10px; }
.command-matrix-status { padding: 8px 11px; border: 1px solid var(--command-line); border-radius: 9px; color: #b7d2de; background: rgba(6,24,35,.62); font-size: 9px; }
.app.command-mode .command-module-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.app.command-mode .command-module-card { --accent: #49a7ff; --accent-rgb: 73,167,255; position: relative; min-height: 174px; display: flex; flex-direction: column; gap: 0; padding: 15px !important; overflow: hidden; border: 1px solid rgba(var(--accent-rgb),.2) !important; border-radius: 14px !important; background: linear-gradient(145deg, rgba(var(--accent-rgb),.055), rgba(5,23,33,.9) 54%, rgba(4,18,27,.96)) !important; box-shadow: 0 13px 34px rgba(0,0,0,.16) !important; }
.app.command-mode .command-module-card::before { content: ""; position: absolute; inset: 0 0 auto; width: auto; height: 1px; border-radius: 0; background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb),.72), transparent); opacity: .55; }.app.command-mode .command-module-card::after { content: ""; position: absolute; width: 125px; height: 125px; right: -60px; bottom: -67px; border: 1px solid rgba(var(--accent-rgb),.18); border-radius: 50%; background: none; box-shadow: 0 0 0 16px rgba(var(--accent-rgb),.025), 0 0 0 35px rgba(var(--accent-rgb),.012); }
.app.command-mode .command-module-card:hover { transform: translateY(-4px); border-color: rgba(var(--accent-rgb),.52) !important; box-shadow: 0 18px 44px rgba(0,0,0,.24), 0 0 28px rgba(var(--accent-rgb),.06) !important; }
.command-module-card.accent-cyan { --accent:#30e3d2;--accent-rgb:48,227,210 }.command-module-card.accent-blue { --accent:#49a7ff;--accent-rgb:73,167,255 }.command-module-card.accent-violet { --accent:#8c7bff;--accent-rgb:140,123,255 }.command-module-card.accent-amber { --accent:#ffb84c;--accent-rgb:255,184,76 }.command-module-card.accent-green { --accent:#44d69a;--accent-rgb:68,214,154 }.command-module-card.accent-pink { --accent:#ef7fb7;--accent-rgb:239,127,183 }.command-module-card.accent-slate { --accent:#6c8498;--accent-rgb:108,132,152 }
.app.command-mode .command-module-card.featured { grid-column: span 2; display: grid; grid-template-columns: 72px minmax(0,1fr) auto; grid-template-rows: auto 1fr auto; gap: 12px 17px; background: linear-gradient(125deg, rgba(var(--accent-rgb),.13), rgba(7,30,41,.96) 42%, rgba(5,22,32,.96)) !important; }
.module-card-head { position: relative; z-index: 2; display: flex; justify-content: space-between; color: #638595; font: 700 8px Consolas, monospace; letter-spacing: .1em; }.featured .module-card-head { grid-column: 1 / -1; }.module-access-state { padding: 3px 7px; border-radius: 999px; color: var(--accent); background: rgba(var(--accent-rgb),.08); font: 800 8px "Segoe UI", sans-serif; letter-spacing: 0; }.module-access-state::before { content: ""; display: inline-block; width: 4px; height: 4px; margin-right: 5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; vertical-align: middle; }
.app.command-mode .module-mark { position: relative; z-index: 2; width: 48px; height: 48px; display: grid; place-items: center; margin: 16px 0 13px; border: 1px solid rgba(var(--accent-rgb),.45) !important; border-radius: 13px !important; color: var(--accent) !important; background: radial-gradient(circle, rgba(var(--accent-rgb),.18), rgba(var(--accent-rgb),.04)) !important; box-shadow: inset 0 0 18px rgba(var(--accent-rgb),.08), 0 0 22px rgba(var(--accent-rgb),.05) !important; font-size: 17px; }.module-mark i { position: absolute; inset: -5px; border: 1px solid rgba(var(--accent-rgb),.13); border-radius: 17px; transform: rotate(10deg); }.featured .module-mark { grid-column: 1; grid-row: 2; width: 68px !important; height: 68px !important; margin: 0 !important; }
.module-copy { position: relative; z-index: 2; }.module-copy h3 { margin: 0 0 7px; color: var(--command-text); font-size: 15px; }.module-copy p { min-height: 32px; color: #7f9daa !important; font-size: 9px; line-height: 1.65; }.featured .module-copy { grid-column: 2; grid-row: 2; align-self: center; }.featured .module-copy h3 { font-size: 19px; }.featured .module-copy p { max-width: 500px; min-height: 0; font-size: 10px; }
.app.command-mode .module-card-foot { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(var(--accent-rgb),.1); color: #6f8c99; font-size: 8px; }.featured .module-card-foot { grid-column: 2 / 4; grid-row: 3; }.app.command-mode .module-card-foot > span { color: #7895a2; }
.app.command-mode .round-enter { width: 31px; min-height: 31px !important; height: 31px !important; padding: 0 !important; border: 1px solid rgba(var(--accent-rgb),.34) !important; border-radius: 9px !important; color: var(--accent) !important; background: rgba(var(--accent-rgb),.06) !important; box-shadow: none !important; }.app.command-mode .command-module-card.authorized:hover .round-enter { color: #041417 !important; background: var(--accent) !important; transform: translateX(2px); }
.app.command-mode .module-enter { min-width: 112px; min-height: 41px !important; height: 41px !important; display: flex; align-items: center; justify-content: space-between; padding: 0 7px 0 13px !important; border: 1px solid rgba(var(--accent-rgb),.62) !important; border-radius: 9px !important; color: #041519 !important; background: linear-gradient(135deg, var(--accent), #56bfff) !important; box-shadow: 0 10px 24px rgba(var(--accent-rgb),.12) !important; font-size: 9px; }.module-enter b { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 6px; background: rgba(2,20,22,.14); font-size: 13px; }
.app.command-mode .command-module-card.locked { filter: saturate(.72); }.app.command-mode .command-module-card.locked .module-access-state { color: #93a9b3; }.app.command-mode .command-module-card.locked button:disabled { color: #748b95 !important; background: rgba(78,105,119,.08) !important; border-color: rgba(121,154,169,.2) !important; opacity: 1; }.app.command-mode .command-module-card.reserved { opacity: .64; filter: saturate(.45); }.app.command-mode .command-module-card.reserved:hover { transform: none; border-color: rgba(var(--accent-rgb),.2) !important; }
.command-footer { display: flex; justify-content: space-between; margin-top: 17px; padding: 13px 2px 0; border-top: 1px solid rgba(82,142,169,.1); color: #46616d; font: 7px Consolas, monospace; letter-spacing: .1em; }

@keyframes command-spin { to { transform: rotate(360deg); } }
@keyframes command-live { 50% { opacity: .45; box-shadow: 0 0 0 7px rgba(48,227,210,0), 0 0 7px var(--command-cyan); } }
@keyframes command-bars { 50% { transform: scaleY(.42); opacity: .7; } }

@media (max-width: 1380px) {
  .app.command-mode { grid-template-columns: 220px minmax(0,1fr) !important; }
  .app.command-mode > main { padding-inline: 20px !important; }
  .command-hero { grid-template-columns: minmax(330px,1.1fr) minmax(230px,.62fr) minmax(145px,.38fr); gap: 17px; }
  .command-core { transform: scale(.86); }
  .app.command-mode .user-actions button { padding-inline: 9px !important; }
}

@media (max-width: 980px) {
  .app.command-mode { display: block; min-height: 100vh; height: auto; }
  .app.command-mode .command-sidebar { display: none; }
  .app.command-mode > main { min-height: 100vh; padding: 0 14px 18px !important; }
  .app.command-mode > main > .topbar { align-items: flex-start; padding: 14px 0 !important; }
  .app.command-mode .user-actions { width: 100%; flex-wrap: wrap; justify-content: flex-start; }
  .app.command-mode .command-clock { display: none; }
  .command-hero { grid-template-columns: 1fr; padding: 22px; }
  .command-core { display: none; }
  .command-metrics { grid-template-columns: repeat(3,1fr); }
  .app.command-mode .command-module-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 640px) {
  .command-metrics, .app.command-mode .command-module-grid { grid-template-columns: 1fr; }
  .app.command-mode .command-module-card.featured { grid-column: auto; display: flex; }
  .featured .module-card-head, .featured .module-mark, .featured .module-copy, .featured .module-card-foot { grid-column: auto; grid-row: auto; }
  .command-section-head { align-items: flex-start; flex-direction: column; }
}

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