/* Aurora App Shell — global tool switcher (unified light theme) */

:root {
  --aurora-shell-h: 42px;
  --shell-bg: #ffffff;
  --shell-bg-to: #f8f6f1;
  --shell-text: #141418;
  --shell-muted: #6b6b73;
  --shell-border: rgba(20, 20, 24, 0.1);
  --shell-accent: #b8895a;
  --shell-accent-soft: rgba(184, 137, 90, 0.1);
  --shell-accent-border: rgba(184, 137, 90, 0.32);
}

.aurora-app-shell {
  position: relative;
  z-index: 9000;
  display: flex;
  align-items: center;
  height: var(--aurora-shell-h);
  flex-shrink: 0;
  padding: 0 0.65rem;
  gap: 0.5rem;
  border-bottom: 1px solid var(--shell-border);
  background: linear-gradient(180deg, var(--shell-bg) 0%, var(--shell-bg-to) 100%);
  box-shadow: 0 2px 16px -8px rgba(20, 20, 24, 0.08);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.aurora-app-shell::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 8%, rgba(184, 137, 90, 0.22) 50%, transparent 92%);
  pointer-events: none;
}

.aurora-shell-home {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  border: 1px solid var(--shell-border);
  background: rgba(20, 20, 24, 0.04);
  color: var(--shell-muted);
  font-size: 14px;
  text-decoration: none;
  transition: 0.16s ease;
  flex-shrink: 0;
}
.aurora-shell-home:hover {
  border-color: var(--shell-accent-border);
  color: var(--shell-accent);
  background: var(--shell-accent-soft);
}

.aurora-shell-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.1rem;
  padding-right: 0.65rem;
  margin-right: 0.15rem;
  border-right: 1px solid var(--shell-border);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--shell-text);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.aurora-shell-brand em {
  font-style: normal;
  color: var(--shell-accent);
}

.aurora-shell-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.aurora-shell-nav::-webkit-scrollbar { display: none; }

.aurora-shell-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 1.75rem;
  padding: 0 0.55rem;
  border-radius: 0.45rem;
  border: 1px solid transparent;
  background: transparent;
  color: var(--shell-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: 0.16s ease;
  flex-shrink: 0;
}
.aurora-shell-tab:hover {
  color: var(--shell-text);
  background: rgba(20, 20, 24, 0.04);
  border-color: var(--shell-border);
}
.aurora-shell-tab[data-active="true"] {
  color: var(--shell-accent);
  background: var(--shell-accent-soft);
  border-color: var(--shell-accent-border);
  box-shadow: 0 2px 12px -4px rgba(184, 137, 90, 0.25);
}
.aurora-shell-tab .ico {
  font-size: 11px;
  opacity: 0.85;
}

.aurora-shell-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  margin-left: auto;
}

.aurora-shell-user-cluster {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.aurora-lang-mount,
.aurora-tenant-mount,
#auroraTenantMount,
#auroraLangMount {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.aurora-shell-search {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 1.75rem;
  padding: 0 0.55rem;
  border-radius: 0.45rem;
  border: 1px solid var(--shell-border);
  background: rgba(20, 20, 24, 0.04);
  color: var(--shell-muted);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.16s ease;
}
.aurora-shell-search:hover {
  border-color: var(--shell-accent-border);
  color: var(--shell-accent);
  background: var(--shell-accent-soft);
}
.aurora-shell-search kbd {
  font-size: 9px;
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
  border: 1px solid var(--shell-border);
  background: #fff;
  color: var(--shell-muted);
}

body.aurora-has-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}
body.aurora-has-shell > .obsidian-shell,
body.aurora-has-shell > .studio-shell,
body.aurora-has-shell > .nova-shell,
body.aurora-has-shell > main,
body.aurora-has-shell > .flex.h-screen {
  flex: 1;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
}

body.aurora-has-shell.aurora-scroll-app {
  display: block;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
  padding-top: var(--aurora-shell-h);
}
body.aurora-has-shell.aurora-scroll-app .aurora-app-shell {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
}

/* PPT React shell uses same tokens via app-shell utility */
.aurora-app-shell.theme-light,
.aurora-app-shell.theme-noir {
  background: linear-gradient(180deg, var(--shell-bg) 0%, var(--shell-bg-to) 100%);
  border-bottom-color: var(--shell-border);
}
.aurora-app-shell.theme-light::after,
.aurora-app-shell.theme-noir::after {
  background: linear-gradient(90deg, transparent 8%, rgba(184, 137, 90, 0.22) 50%, transparent 92%);
}
.aurora-app-shell.theme-light .aurora-shell-tab[data-active="true"],
.aurora-app-shell.theme-noir .aurora-shell-tab[data-active="true"] {
  color: var(--shell-accent);
  background: var(--shell-accent-soft);
  border-color: var(--shell-accent-border);
}
.aurora-app-shell.theme-light .aurora-shell-home:hover,
.aurora-app-shell.theme-noir .aurora-shell-home:hover {
  border-color: var(--shell-accent-border);
  color: var(--shell-accent);
  background: var(--shell-accent-soft);
}

@media (max-width: 720px) {
  .aurora-shell-brand span.full { display: none; }
  .aurora-shell-tab .label { display: none; }
  .aurora-shell-tab { padding-inline: 0.45rem; }
}

body.aurora-has-shell .aurora-local-brand,
body.aurora-has-shell .aurora-local-brand-divider,
body.aurora-has-shell #auroraHubBtn,
body.aurora-has-shell .aurora-hub-trigger {
  display: none !important;
}

body.aurora-has-shell .obsidian-shell {
  padding-top: 0.35rem;
  gap: 0.5rem;
}

body.aurora-has-shell .studio-shell > header.glass-dark {
  margin-top: 0.35rem;
}

body.aurora-has-shell .nova-shell {
  padding-top: 0.35rem;
  gap: 0.5rem;
}

.aurora-local-tool-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 0.45rem;
  border: 1px solid var(--shell-border);
  background: rgba(20, 20, 24, 0.04);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--shell-muted);
  white-space: nowrap;
}
.aurora-local-tool-tag .name {
  color: var(--shell-text);
}

body.aurora-has-shell #proSyncWrap {
  display: inline-flex !important;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--shell-muted);
}
