/* BioStudio AI — Start menu (Windows 11) + toasts */

.start-menu {
  position: absolute;
  left: 50%;
  bottom: calc(var(--taskbar-h) + 12px);
  transform: translateX(-50%) translateY(14px);
  width: min(640px, 94vw);
  max-height: 76vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 26px 14px;
  background: var(--flyout-bg);
  backdrop-filter: blur(45px) saturate(1.6);
  -webkit-backdrop-filter: blur(45px) saturate(1.6);
  border: 1px solid var(--flyout-border);
  border-radius: 16px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
  color: var(--ink);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 9500;
}
.start-menu.visible { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }

.start-account-section {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}
.start-account-section .start-tile { padding: 12px 4px 10px; }
.start-account-section .start-tile-icon .icon { width: 28px; height: 28px; }

.start-categorized {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: auto;
  max-height: 48vh;
}
.start-cat-block { display: flex; flex-direction: column; gap: 6px; }
.start-cat-grid { grid-template-columns: repeat(6, 1fr); }
.start-cat-list { display: flex; flex-direction: column; gap: 2px; }

.start-all { display: flex; flex-direction: column; overflow: auto; max-height: 52vh; gap: 16px; }

.start-searchbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 22px;
  color: var(--ink-soft);
}
.start-searchbar .icon { width: 16px; height: 16px; }
.start-search {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 11px 0;
  font-size: 13.5px;
  color: var(--ink);
}

.start-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.start-section-title { font-size: 13px; font-weight: 600; }
.start-allapps, .start-back {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  padding: 6px 12px;
  border-radius: 16px;
  background: var(--tile-bg);
}
.start-allapps:hover, .start-back:hover { background: var(--tile-hover); }
.start-back .icon.flip { transform: rotate(180deg); }

.start-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  overflow: auto;
}
.start-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 6px 12px;
  border-radius: 8px;
  color: var(--ink);
  transition: background 0.1s ease;
}
.start-tile:hover { background: var(--tile-hover); }
.start-tile-icon { position: relative; }
.start-tile-icon .icon { width: 32px; height: 32px; }
.start-tile-notif-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  align-items: center;
  justify-content: center;
  line-height: 16px;
  pointer-events: none;
  z-index: 2;
}
.start-tile-name {
  font-size: 11.5px;
  text-align: center;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}


.start-all-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--ink);
  text-align: left;
}
.start-all-row:hover { background: var(--tile-hover); }
.start-all-row .icon { width: 24px; height: 24px; }
.start-all-icon { position: relative; display: inline-flex; flex-shrink: 0; }
.start-all-icon .start-tile-notif-badge { top: -6px; right: -10px; }

.start-recommended {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.start-rec {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 8px;
  text-align: left;
  color: var(--ink);
}
.start-rec:hover { background: var(--tile-hover); }
.start-rec .icon { width: 26px; height: 26px; }
.start-rec-name { font-size: 12.5px; font-weight: 500; }
.start-rec-sub { font-size: 11px; color: var(--ink-soft); }

.start-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--ink-soft);
  font-size: 13px;
  padding: 28px;
}

.start-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--flyout-border);
  margin-top: 4px;
  padding-top: 12px;
}
.start-footer-left {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}
.start-user { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; cursor: pointer; border-radius: 8px; padding: 4px 8px 4px 4px; margin: -4px 0 -4px -4px; }
.start-signout {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
.start-signout:hover { background: var(--tile-hover); color: var(--ink); }
.start-user:hover { background: var(--tile-hover); }
.start-user-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--tile-bg);
  font-size: 16px;
}
.start-power {
  width: 38px; height: 38px;
  border-radius: 8px;
  display: grid; place-items: center;
  color: var(--ink);
}
.start-power:hover { background: var(--tile-hover); }

/* Toasts */
.toast-layer {
  position: absolute;
  right: 14px;
  bottom: calc(var(--taskbar-h) + 14px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9600;
}
.toast {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  width: 340px;
  padding: 14px;
  background: var(--flyout-bg);
  backdrop-filter: blur(30px) saturate(1.5);
  -webkit-backdrop-filter: blur(30px) saturate(1.5);
  border: 1px solid var(--flyout-border);
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
  color: var(--ink);
  cursor: pointer;
  transform: translateX(130%);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.toast.show { transform: translateX(0); }
.toast.sticky {
  border-left: 3px solid var(--accent);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.38);
}
.toast.chat {
  border-left: 3px solid var(--accent);
}
.toast-icon { color: var(--accent); flex-shrink: 0; }
.toast-icon .icon { width: 22px; height: 22px; }
.toast-body { flex: 1; min-width: 0; }
.toast-title { font-size: 13px; font-weight: 700; }
.toast-message { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; white-space: pre-wrap; }
.toast-close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  margin: -4px -4px 0 0;
}
.toast-close:hover { background: rgba(128, 128, 128, 0.18); color: var(--ink); }
.toast-group-toggle {
  display: block;
  margin-top: 6px;
  padding: 0;
  border: none;
  background: none;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.toast-group-toggle:hover { text-decoration: underline; }
.toast-group-list {
  margin-top: 8px;
  max-height: 140px;
  overflow-y: auto;
  border-top: 1px solid var(--flyout-border);
  padding-top: 6px;
}
.toast-group-item {
  font-size: 12px;
  color: var(--ink-soft);
  padding: 3px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

:root {
  --input-bg: rgba(255, 255, 255, 0.7);
  --input-border: rgba(0, 0, 0, 0.1);
}
.dark {
  --input-bg: rgba(255, 255, 255, 0.06);
  --input-border: rgba(255, 255, 255, 0.12);
}
