/* ASTER Tech Ops shell v1 — visual shell only. Voice, auth and Brain transports stay untouched. */

.app-shell {
  width: min(100%, 820px);
  grid-template-rows: auto minmax(0, 1fr) auto auto;
}

.topbar {
  min-height: 56px;
  padding-bottom: 8px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.status {
  min-height: 28px;
  padding: 0 9px;
  border-color: rgb(var(--presence-primary-rgb) / 0.14);
  background: rgba(3, 5, 11, 0.34);
  font-size: 10px;
}

.presence-stack {
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
}

.presence-state {
  display: none;
}

.core-stage {
  min-height: 0;
}

.core-frame {
  width: min(94vw, 100%);
}

.conversation {
  max-height: min(24dvh, 210px);
  margin-top: 0;
  padding: 6px 2px;
}

.conversation > .message-system:first-child {
  display: none;
}

.interaction-dock {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px 52px;
  align-items: end;
  gap: 8px;
  padding-top: 4px;
}

.dock-write,
.dock-control,
.more-menu {
  min-width: 0;
}

.dock-write {
  display: grid;
  gap: 5px;
}

.dock-label {
  display: block;
  color: rgba(210, 213, 230, 0.46);
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 0.13em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.dock-write > .dock-label {
  padding-left: 12px;
  text-align: left;
}

.interaction-dock .composer {
  margin: 0;
  gap: 6px;
  padding: 5px;
  border-color: rgba(255, 255, 255, 0.065);
  border-radius: 18px;
  background: rgba(4, 7, 14, 0.82);
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.interaction-dock .composer textarea {
  min-height: 44px;
  max-height: 112px;
  padding: 11px 10px;
  font-size: 16px;
  line-height: 1.35;
}

.interaction-dock .send-button {
  width: 44px;
  height: 44px;
  align-self: end;
  border-radius: 14px;
  box-shadow: 0 7px 18px rgb(var(--presence-primary-rgb) / 0.12);
}

.interaction-dock .attach-button {
  width: 42px;
  height: 44px;
  align-self: end;
  border-radius: 14px;
}

.dock-control {
  display: grid;
  justify-items: center;
  gap: 5px;
}

.interaction-dock .mic-button {
  width: 44px;
  height: 44px;
  border-color: rgb(var(--presence-primary-rgb) / 0.22);
  background:
    radial-gradient(circle, rgba(17, 27, 61, 0.64) 0 42%, rgba(3, 5, 11, 0.97) 72%),
    #03050b;
  box-shadow:
    0 0 0 1px rgba(255, 190, 112, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.28),
    0 0 16px rgb(var(--presence-primary-rgb) / 0.08);
}

.interaction-dock .mic-button::before {
  inset: -3px;
  opacity: 0.36;
}

.interaction-dock .mic-button[aria-pressed="true"]::before {
  opacity: 0.78;
}

.interaction-dock .mic-glyph {
  transform: scale(0.86);
}

.more-menu {
  position: relative;
  display: grid;
  justify-items: center;
}

.more-menu > summary {
  display: grid;
  justify-items: center;
  gap: 5px;
  width: 52px;
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.more-menu > summary::-webkit-details-marker {
  display: none;
}

.dock-more-glyph {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 50%;
  color: rgba(236, 238, 248, 0.74);
  background: rgba(4, 7, 14, 0.78);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.26);
  font-size: 16px;
  letter-spacing: 0.08em;
  line-height: 1;
}

.more-menu[open] .dock-more-glyph {
  border-color: rgba(141, 91, 255, 0.32);
  color: var(--aster-gold-light);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.3),
    0 0 18px rgba(141, 91, 255, 0.12);
}

.more-sheet {
  position: absolute;
  right: 0;
  bottom: calc(100% + 13px);
  z-index: 50;
  width: min(76vw, 276px);
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: linear-gradient(155deg, rgba(13, 18, 36, 0.985), rgba(3, 6, 14, 0.995) 68%);
  box-shadow:
    0 24px 72px rgba(0, 0, 0, 0.56),
    0 0 34px rgba(141, 91, 255, 0.07);
  backdrop-filter: blur(24px) saturate(1.08);
}

.more-sheet::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: -6px;
  width: 11px;
  height: 11px;
  transform: rotate(45deg);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #050914;
}

.more-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: #9e8cff;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.more-title {
  display: block;
  margin-bottom: 12px;
  color: #eef0f8;
  font-size: 15px;
  font-weight: 580;
}

.more-sheet .console-nav {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
}

.more-sheet .console-nav-button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  justify-items: start;
  gap: 9px;
  width: 100%;
  height: 43px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 12px;
  color: rgba(232, 234, 245, 0.78);
  background: rgba(255, 255, 255, 0.025);
  font-size: 13px;
  opacity: 1;
  cursor: pointer;
}

.more-sheet .console-nav-button:first-child,
.more-sheet .console-nav-button:nth-child(2),
.more-sheet .console-nav-button:nth-child(3) {
  color: rgba(232, 234, 245, 0.78);
}

.more-sheet .console-nav-button:active {
  transform: scale(0.985);
  background: rgba(255, 255, 255, 0.045);
}

.more-action-icon {
  display: grid;
  place-items: center;
  width: 28px;
  color: var(--presence-secondary);
  font-size: 15px;
}

.more-sheet .console-nav-button:nth-child(2) .more-action-icon {
  color: var(--aster-gold-light);
}

.more-sheet .console-nav-button:nth-child(3) .more-action-icon {
  color: #ae98ff;
}

.more-action-copy {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 420px) {
  .app-shell {
    padding-left: max(10px, env(safe-area-inset-left, 0px));
    padding-right: max(10px, env(safe-area-inset-right, 0px));
  }

  .topbar {
    min-height: 55px;
  }

  .brand-lockup {
    padding-top: 5px;
  }

  .interaction-dock {
    grid-template-columns: minmax(0, 1fr) 48px 48px;
    gap: 6px;
  }

  .more-menu > summary {
    width: 48px;
  }

  .dock-more-glyph,
  .interaction-dock .mic-button {
    width: 42px;
    height: 42px;
  }

  .dock-label {
    font-size: 7px;
  }

  .interaction-dock .composer textarea {
    padding-left: 8px;
    padding-right: 8px;
  }

  .more-sheet {
    right: -2px;
    width: min(82vw, 268px);
  }
}

@media (max-height: 760px) {
  .app-shell {
    grid-template-rows: auto minmax(0, 1fr) auto auto;
  }

  .conversation {
    max-height: min(20dvh, 150px);
    padding-top: 4px;
    padding-bottom: 4px;
  }
}

@media (min-width: 900px) and (min-height: 720px) {
  .app-shell {
    width: min(100%, 820px);
    grid-template-columns: minmax(0, 1fr);
    column-gap: 0;
  }

  .interaction-dock {
    padding-bottom: 2px;
  }
}
