/* ==========================================================================
   Dashboard Workspace — COMPLETELY 100% Pitch Black (#000000)
   ========================================================================== */

.dashboard-body {
  background-color: #000000 !important;
  color: #edecec;
  min-height: 100vh;
  overflow: hidden;
}

.dashboard-layout {
  display: flex;
  height: 100vh;
  width: 100vw;
  background-color: #000000;
  overflow: hidden;
}

/* LEFT SIDEBAR */
.dash-sidebar {
  width: 270px;
  min-width: 270px;
  background-color: #000000;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  height: 100vh;
  user-select: none;
}

.dash-sidebar-header {
  height: 56px;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dash-brand-title {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.dash-plan-tag {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  background-color: rgba(245, 78, 0, 0.15);
  color: var(--color-theme-accent);
  border: 1px solid rgba(245, 78, 0, 0.3);
}

/* New Chat Button */
.dash-new-chat-wrap {
  padding: 1rem 1rem 0.5rem;
}

.btn-dash-new-chat {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.9rem;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  color: #edecec;
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-dash-new-chat:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.icon-plus {
  font-size: 1rem;
  line-height: 1;
}

.kbd-badge {
  margin-left: auto;
  font-size: 0.6875rem;
  color: rgba(237, 236, 236, 0.4);
  font-family: var(--font-mono);
}

/* Sidebar Scroll Area: scrollable when needed, keeps clean layout */
.dash-sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.75rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.dash-sidebar-scroll::-webkit-scrollbar {
  width: 4px;
}

.dash-sidebar-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.dash-sidebar-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.dash-sidebar-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

.dash-nav-section {
  display: flex;
  flex-direction: column;
}

.dash-nav-header,
.dash-nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  color: rgba(237, 236, 236, 0.7);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dash-nav-header:hover,
.dash-nav-item:hover {
  background-color: rgba(255, 255, 255, 0.04);
  color: #edecec;
}

.dash-nav-header.active,
.dash-nav-item.active {
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.08);
}

.dash-nav-header-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.dash-nav-header-right {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.chats-count-badge {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(237, 236, 236, 0.6);
  padding: 0.08rem 0.4rem;
  border-radius: 9999px;
  line-height: 1.2;
}

.dash-svg-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.dash-svg-chevron {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  color: rgba(237, 236, 236, 0.4);
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.dash-nav-header.collapsed .dash-svg-chevron {
  transform: rotate(-90deg);
}

.dash-svg-xs {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  margin-right: 0.3rem;
}

.dash-svg-lg {
  width: 38px;
  height: 38px;
  color: rgba(237, 236, 236, 0.5);
}

.empty-settings-icon-wrap {
  margin-bottom: 1rem;
}

/* Collapsible wrapper for Chats section */
.dash-chats-collapsible {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: max-height 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
  max-height: 500px;
  opacity: 1;
}

.dash-nav-section.collapsed .dash-chats-collapsible {
  max-height: 0 !important;
  opacity: 0;
  pointer-events: none;
  margin-bottom: 0;
}

/* Sub-Options under Chats (Scrollable: exactly 6 chats visible at once before scrolling) */
.dash-sub-menu {
  list-style: none;
  padding-left: 0.85rem;
  padding-right: 0.25rem;
  margin: 0.25rem 0 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  margin-left: 1.25rem;
  /* Exactly fits up to 6 chats (approx 34px each = 204px) and scrolls smoothly */
  max-height: 208px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.dash-sub-menu::-webkit-scrollbar {
  width: 4px;
}

.dash-sub-menu::-webkit-scrollbar-track {
  background: transparent;
}

.dash-sub-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.dash-sub-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.dash-chat-row {
  position: relative;
  display: flex;
  align-items: center;
  border-radius: var(--radius-xs);
  transition: background-color 0.15s ease;
  flex-shrink: 0;
  min-height: 32px;
}

.dash-chat-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-xs);
  color: rgba(237, 236, 236, 0.6);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.15s ease;
}

.dash-chat-item:hover {
  color: #edecec;
  background-color: rgba(255, 255, 255, 0.04);
}

.dash-chat-item.active {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.08);
  font-weight: 500;
}

.dash-chat-item--new {
  color: rgba(237, 236, 236, 0.45);
  font-style: italic;
}

.chat-item-bullet {
  color: rgba(237, 236, 236, 0.4);
  font-size: 1rem;
  line-height: 1;
}

.usage-badge-pill {
  font-size: 0.6875rem;
  font-family: var(--font-mono);
  color: #30d158;
  background-color: rgba(48, 209, 88, 0.1);
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
}

/* User Footer */
.dash-user-footer {
  padding: 0.85rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background-color: #000000;
}

.dash-user-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  flex: 1;
}

.dash-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.12);
  color: #edecec;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dash-user-name {
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-user-email {
  font-size: 0.6875rem;
  color: rgba(237, 236, 236, 0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-logout {
  background: transparent;
  border: none;
  color: rgba(237, 236, 236, 0.45);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  transition: color 0.15s ease;
}

.btn-logout:hover {
  color: #f87171;
}

/* MAIN DASHBOARD AREA */
.dash-main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: #000000;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

.dash-view {
  display: none;
  height: 100%;
  width: 100%;
  flex-direction: column;
  background-color: #000000;
}

.dash-view.active {
  display: flex;
}

/* Chat Header */
.dash-chat-header {
  height: 56px;
  padding: 0 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #000000;
}

.chat-title-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #30d158;
}

.active-chat-heading {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.chat-model-selector-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
}

/* Custom Sleek Model Selector Component */
.custom-model-selector {
  position: relative;
  display: inline-flex;
}

.custom-model-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #161510;
  color: #edecec;
  border: 1px solid rgba(237, 236, 236, 0.12);
  border-radius: 6px;
  padding: 0.35rem 0.65rem;
  font-size: 0.8125rem;
  font-family: var(--font-sans);
  outline: none;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.custom-model-trigger:hover {
  background-color: #201e18;
  border-color: rgba(237, 236, 236, 0.22);
}

.custom-model-trigger.open {
  background-color: #201e18;
  border-color: var(--color-theme-accent);
  box-shadow: 0 0 0 1px var(--color-theme-accent);
}

.custom-model-current-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.custom-model-current-name {
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #edecec;
}

.custom-model-badge {
  font-size: 0.625rem;
  font-family: var(--font-mono);
  font-weight: 600;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  text-transform: uppercase;
  background-color: rgba(237, 236, 236, 0.08);
  color: rgba(237, 236, 236, 0.7);
  letter-spacing: 0.02em;
}

.custom-model-badge--free {
  background-color: rgba(255, 255, 255, 0.08);
  color: #edecec;
}

.custom-model-badge--pro {
  background-color: rgba(245, 78, 0, 0.15);
  color: #f54e00;
}

.custom-model-badge--proplus {
  background-color: rgba(147, 51, 234, 0.18);
  color: #c084fc;
}

.custom-model-badge--ultra {
  background-color: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
}

.custom-model-chevron {
  width: 14px;
  height: 14px;
  opacity: 0.55;
  transition: transform 0.2s ease;
  margin-left: 0.15rem;
}

.custom-model-trigger.open .custom-model-chevron {
  transform: rotate(180deg);
}

/* Custom Dropdown Popover Menu */
.custom-model-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 290px;
  max-height: 380px;
  background-color: #12100b;
  border: 1px solid rgba(237, 236, 236, 0.14);
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.85);
  z-index: 1000;
  overflow-y: auto;
  padding: 0.4rem;
  display: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(237, 236, 236, 0.15) transparent;
}

.custom-model-menu.open {
  display: block;
  animation: modelMenuFadeIn 0.14s ease-out;
}

@keyframes modelMenuFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.custom-model-group-title {
  font-size: 0.65rem;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: rgba(237, 236, 236, 0.35);
  padding: 0.45rem 0.55rem 0.2rem 0.55rem;
  user-select: none;
}

.custom-model-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.6rem;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.12s ease;
  user-select: none;
}

.custom-model-item:hover {
  background-color: rgba(237, 236, 236, 0.07);
}

.custom-model-item.active {
  background-color: rgba(245, 78, 0, 0.12);
}

.custom-model-item.active .model-item-name {
  color: #ffffff;
  font-weight: 600;
}

.model-brand-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: block;
}

.model-item-name {
  flex: 1;
  font-size: 0.8125rem;
  color: #edecec;
  white-space: nowrap;
}

.model-item-check {
  width: 14px;
  height: 14px;
  color: #f54e00;
  display: none;
  flex-shrink: 0;
}

.custom-model-item.active .model-item-check {
  display: block;
}

/* Locked Model Styles — Grayed out, grayscale logo, lock icon */
.custom-model-item--locked {
  opacity: 0.38;
  cursor: not-allowed !important;
  background-color: transparent !important;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}

.custom-model-item--locked:hover {
  opacity: 0.6 !important;
  background-color: rgba(255, 255, 255, 0.04) !important;
}

.custom-model-item--locked .model-brand-icon {
  filter: grayscale(1) opacity(0.55);
}

.custom-model-item--locked .model-item-name {
  color: rgba(237, 236, 236, 0.4);
}

.custom-model-item--locked .custom-model-badge {
  opacity: 0.5;
  background-color: rgba(255, 255, 255, 0.05);
  color: rgba(237, 236, 236, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.model-lock-icon {
  width: 13px;
  height: 13px;
  color: rgba(237, 236, 236, 0.45);
  margin-left: 0.25rem;
  flex-shrink: 0;
  display: inline-block;
}

/* Dark Floating Upgrade Toast */
.dash-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: #1a1812;
  border: 1px solid rgba(237, 236, 236, 0.18);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.9);
  border-radius: 8px;
  padding: 0.75rem 1.15rem;
  z-index: 9999;
  opacity: 0;
  transform: translateY(14px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.dash-toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.dash-toast-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: #edecec;
}

.dash-toast-lock {
  width: 16px;
  height: 16px;
  color: #f54e00;
  flex-shrink: 0;
}

.dash-toast-btn {
  background-color: var(--color-theme-accent);
  color: #ffffff;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.5rem;
  transition: opacity 0.15s ease;
  white-space: nowrap;
}

.dash-toast-btn:hover {
  opacity: 0.88;
}

/* Fallback hidden select */
.model-select-dropdown {
  display: none !important;
}

.btn-icon-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(237, 236, 236, 0.6);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-icon-ghost:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: #edecec;
}

/* Chat Stream Clean Empty State */
.chat-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: auto;
  text-align: center;
  padding: 3rem 1.5rem;
  max-width: 480px;
}

.empty-state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background-color: #161510;
  border: 1px solid rgba(237, 236, 236, 0.08);
  border-radius: 12px;
  margin-bottom: 1.25rem;
}

.empty-state-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #edecec;
  margin-bottom: 0.4rem;
  letter-spacing: -0.015em;
}

.empty-state-desc {
  font-size: 0.875rem;
  color: rgba(237, 236, 236, 0.5);
  line-height: 1.5;
}

/* Bottom prompt model pill with logo */
.prompt-model-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* Chat Stream */
.dash-chat-stream {
  flex: 1;
  overflow-y: auto;
  padding: 2.5rem 4rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background-color: #000000;
}

.chat-bubble {
  max-width: 820px;
  width: 100%;
  border-radius: var(--radius-md);
  padding: 1.35rem 1.65rem;
  line-height: 1.65;
  font-size: 0.9375rem;
}

.chat-bubble--assistant {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  align-self: flex-start;
}

.chat-bubble--user {
  background-color: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  align-self: flex-end;
}

.bubble-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  font-size: 0.75rem;
}

.bubble-sender {
  font-weight: 500;
  color: #edecec;
}

.bubble-model-tag {
  font-family: var(--font-mono);
  color: rgba(237, 236, 236, 0.4);
  font-size: 0.6875rem;
}

.bubble-time {
  color: rgba(237, 236, 236, 0.4);
  font-family: var(--font-mono);
}

.stream-text {
  font-size: 0.875rem;
  white-space: pre-wrap;
  line-height: 1.65;
  color: #edecec;
}

.prompt-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.btn-prompt-chip {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.85rem;
  color: rgba(237, 236, 236, 0.8);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-prompt-chip:hover {
  background-color: rgba(255, 255, 255, 0.09);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

/* CIRCLED CHAT INPUT BAR (User Mandate) */
.dash-prompt-wrapper {
  padding: 1rem 4rem 1.75rem;
  background-color: #000000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.circled-prompt-bar {
  width: 100%;
  max-width: 860px;
  display: flex;
  align-items: flex-end;
  background-color: #080808;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 26px;
  padding: 0.45rem 0.6rem 0.45rem 1.15rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, border-radius 0.2s ease;
}

.circled-prompt-bar:focus-within {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08), 0 12px 40px rgba(0, 0, 0, 0.9);
}

.prompt-prefix-action {
  flex-shrink: 0;
  margin-right: 0.5rem;
  margin-bottom: 0.4rem;
}

.prompt-model-pill {
  font-size: 0.6875rem;
  font-family: var(--font-mono);
  background-color: rgba(255, 255, 255, 0.06);
  color: rgba(237, 236, 236, 0.6);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.circled-prompt-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #edecec;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  padding: 0.4rem 0.5rem;
  resize: none;
  min-height: 24px;
  max-height: 160px;
  line-height: 1.5;
  overflow-y: auto;
  scrollbar-width: thin;
}

.circled-prompt-input::placeholder {
  color: rgba(237, 236, 236, 0.35);
}

.circled-send-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: #edecec;
  color: #000000;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  margin-bottom: 0.1rem;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.circled-send-btn:hover {
  background-color: #ffffff;
  transform: scale(1.06);
}

.circled-send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.send-arrow-icon {
  width: 18px;
  height: 18px;
}

.prompt-hint-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  color: rgba(237, 236, 236, 0.35);
}

.prompt-hint-row kbd {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* USAGE & SETTINGS VIEWS */
.view-panel-header {
  padding: 2.5rem 4rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background-color: #000000;
}

.view-heading {
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.view-subheading {
  font-size: 0.875rem;
  color: rgba(237, 236, 236, 0.55);
}

.usage-grid {
  padding: 2.5rem 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 1100px;
}

.dash-card {
  background-color: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.75rem;
}

.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.dash-card-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(237, 236, 236, 0.75);
}

.usage-stat-val {
  font-size: 2.25rem;
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}

.usage-stat-unit {
  font-size: 0.95rem;
  color: rgba(237, 236, 236, 0.5);
  font-family: var(--font-sans);
}

.quota-progress-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.quota-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: rgba(237, 236, 236, 0.65);
}

.progress-track {
  width: 100%;
  height: 6px;
  background-color: rgba(255, 255, 255, 0.06);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background-color: #edecec;
  border-radius: 9999px;
}

/* EMPTY SETTINGS AREA (User Mandate: "empty settings AREA for now") */
.empty-settings-area {
  margin: 3rem 4rem;
  max-width: 900px;
  min-height: 420px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  background-color: #000000;
  text-align: center;
}

.empty-settings-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: 0.7;
}

.empty-tabs-preview {
  display: flex;
  gap: 0.5rem;
  margin-top: 2rem;
  padding: 0.25rem;
  background-color: #0d0d0d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
}

.preview-tab {
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  color: rgba(237, 236, 236, 0.4);
  border-radius: var(--radius-xs);
}

.preview-tab.active {
  background-color: rgba(255, 255, 255, 0.08);
  color: #edecec;
}

/* ==========================================================================
   SIDEBAR CHAT RENAME & DELETE ACTIONS
   ========================================================================== */
.dash-chat-row {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  border-radius: var(--radius-xs);
}

.dash-chat-row .dash-chat-item {
  padding-right: 3.4rem;
}

.chat-item-actions {
  position: absolute;
  right: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.15rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.14s ease;
}

.dash-chat-row:hover .chat-item-actions,
.dash-chat-row:focus-within .chat-item-actions {
  opacity: 1;
  pointer-events: auto;
}

.chat-action-btn {
  background: transparent;
  border: none;
  color: rgba(237, 236, 236, 0.5);
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.14s ease;
}

.chat-action-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.chat-action-btn--delete:hover {
  background-color: rgba(248, 113, 113, 0.15);
  color: #f87171;
}

.chat-action-btn svg {
  width: 12px;
  height: 12px;
}

.chat-rename-input {
  width: 100%;
  background-color: #141418;
  border: 1px solid #f54e00;
  border-radius: 4px;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  padding: 0.2rem 0.45rem;
  outline: none;
}

/* ==========================================================================
   LIVE STREAMING MARKDOWN & CODE BLOCK ANIMATION
   ========================================================================== */
.md-stream-body {
  font-size: 0.92rem;
  line-height: 1.7;
  color: #edecec;
  word-break: break-word;
}

.md-stream-body p {
  margin: 0 0 0.85rem 0;
}

.md-stream-body p:last-child {
  margin-bottom: 0;
}

.md-stream-body h1,
.md-stream-body h2,
.md-stream-body h3,
.md-stream-body h4 {
  color: #ffffff;
  font-weight: 600;
  margin: 1.25rem 0 0.6rem 0;
  letter-spacing: -0.015em;
  line-height: 1.35;
}

.md-stream-body h1 { font-size: 1.35rem; }
.md-stream-body h2 { font-size: 1.18rem; }
.md-stream-body h3 { font-size: 1.04rem; }

.md-stream-body ul,
.md-stream-body ol {
  margin: 0.5rem 0 0.9rem 1.35rem;
  padding: 0;
}

.md-stream-body li {
  margin-bottom: 0.35rem;
}

.md-stream-body strong {
  color: #ffffff;
  font-weight: 600;
}

.md-stream-body em {
  font-style: italic;
}

.md-stream-body blockquote {
  border-left: 3px solid #f54e00;
  margin: 0.75rem 0;
  padding: 0.4rem 0 0.4rem 1rem;
  color: rgba(237, 236, 236, 0.75);
  background: rgba(245, 78, 0, 0.04);
  border-radius: 0 6px 6px 0;
}

.md-inline-code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  background-color: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ff8b55;
  padding: 0.14rem 0.4rem;
  border-radius: 4px;
}

/* Code Block Card with Live Streaming Animation */
.md-code-block {
  margin: 0.95rem 0;
  border-radius: 9px;
  background-color: #0b0b0e;
  border: 1px solid rgba(255, 255, 255, 0.11);
  overflow: hidden;
  position: relative;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  contain: content;
}

.md-code-block--streaming {
  border-color: rgba(245, 78, 0, 0.55);
  box-shadow: 0 0 22px rgba(245, 78, 0, 0.14);
}

.md-code-block--streaming::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #f54e00, #ff985a, transparent);
  animation: codeStreamSweep 1.6s linear infinite;
}

@keyframes codeStreamSweep {
  0% { transform: translateX(-30%); }
  100% { transform: translateX(50%); }
}

.md-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.9rem;
  background-color: #131318;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(237, 236, 236, 0.65);
}

.md-code-lang-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.md-code-lang {
  text-transform: lowercase;
  font-weight: 600;
  color: #edecec;
}

.md-code-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.65rem;
  color: #f54e00;
  background: rgba(245, 78, 0, 0.12);
  border: 1px solid rgba(245, 78, 0, 0.3);
  padding: 0.08rem 0.45rem;
  border-radius: 9999px;
}

.md-code-live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #f54e00;
  animation: livePulse 0.9s infinite ease-in-out;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

.md-code-copy-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(237, 236, 236, 0.75);
  font-family: var(--font-sans);
  font-size: 0.68rem;
  padding: 0.18rem 0.55rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.md-code-copy-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.md-code-pre {
  margin: 0;
  padding: 1rem 1.15rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
  color: #e5e7eb;
  white-space: pre;
  contain: inline-size;
}

/* Syntax Highlighting Tokens inside Code Blocks */
.tok-kw { color: #ff7b72; font-weight: 500; }
.tok-str { color: #a5d6ff; }
.tok-num { color: #79c0ff; }
.tok-cmt { color: #8b949e; font-style: italic; }
.tok-fn { color: #d2a8ff; }

/* Live Streaming Cursor */
.stream-cursor {
  display: inline-block;
  width: 7px;
  height: 15px;
  background-color: #f54e00;
  vertical-align: text-bottom;
  margin-left: 2px;
  border-radius: 1px;
  animation: streamCursorBlink 0.75s infinite;
}

@keyframes streamCursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.15; }
}

.context-summary-banner {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 0.45rem 0.8rem;
  border-radius: 6px;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Model Meta Context / Max Tokens Pill in Dropdown */
.custom-model-meta-pill {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: rgba(237, 236, 236, 0.5);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.08rem 0.4rem;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Reasoning Level Toggle (Mistral Large 4) */
.reasoning-toggle-group {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background-color: #161510;
  border: 1px solid rgba(237, 236, 236, 0.12);
  border-radius: 6px;
  padding: 0.2rem 0.3rem 0.2rem 0.55rem;
  font-size: 0.75rem;
  user-select: none;
}

.reasoning-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: rgba(237, 236, 236, 0.7);
  font-weight: 500;
  font-size: 0.72rem;
}

.reasoning-icon {
  width: 13px;
  height: 13px;
  color: #f7d046;
}

.reasoning-segmented {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 4px;
  padding: 2px;
  gap: 2px;
}

.reasoning-seg-btn {
  background: transparent;
  border: none;
  color: rgba(237, 236, 236, 0.55);
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.18rem 0.5rem;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.reasoning-seg-btn:hover {
  color: #edecec;
}

.reasoning-seg-btn.active {
  background: linear-gradient(135deg, #f54e00, #ea3326);
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(245, 78, 0, 0.35);
}

/* Prompt Bar Quick Reasoning Pill */
.prompt-prefix-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.prompt-reasoning-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(245, 78, 0, 0.12);
  border: 1px solid rgba(245, 78, 0, 0.32);
  color: #edecec;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  padding: 0.28rem 0.6rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.prompt-reasoning-pill:hover {
  background: rgba(245, 78, 0, 0.22);
  border-color: rgba(245, 78, 0, 0.55);
}

.prompt-reasoning-pill strong {
  color: #ff985a;
  font-weight: 600;
}

.reasoning-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f7d046;
  box-shadow: 0 0 6px #f7d046;
}

/* Live Reasoning Thought Stream Box */
.reasoning-thought-box {
  margin-bottom: 0.85rem;
  border: 1px solid rgba(247, 208, 70, 0.22);
  background: rgba(247, 208, 70, 0.04);
  border-radius: 8px;
  overflow: hidden;
}

.reasoning-thought-summary {
  padding: 0.45rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #f7d046;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  user-select: none;
  list-style: none;
}

.reasoning-thought-summary::-webkit-details-marker {
  display: none;
}

.reasoning-thought-body {
  padding: 0.65rem 0.95rem;
  border-top: 1px solid rgba(247, 208, 70, 0.14);
  font-size: 0.8rem;
  line-height: 1.55;
  color: rgba(237, 236, 236, 0.68);
  font-family: var(--font-sans);
  white-space: pre-wrap;
}

/* Stop Generating Button inside Prompt Bar */
.circled-stop-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #f54e00;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
  margin-right: 0.25rem;
  box-shadow: 0 0 14px rgba(245, 78, 0, 0.4);
}

.circled-stop-btn:hover {
  background-color: #ff6826;
  transform: scale(1.06);
}

.stop-square-icon {
  width: 10px;
  height: 10px;
  background-color: #ffffff;
  border-radius: 2px;
}

/* Usage Logs View */
.usage-logs-container {
  padding: 1.5rem 2rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow-y: auto;
  max-width: 1200px;
}

.usage-logs-stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.usage-stat-box {
  background-color: #121216;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.usage-stat-box-label {
  font-size: 0.72rem;
  color: rgba(237, 236, 236, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}

.usage-stat-box-val {
  font-size: 1.35rem;
  font-weight: 600;
  color: #edecec;
  font-family: var(--font-mono);
}

.usage-logs-table-wrap {
  background-color: #121216;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
}

.usage-logs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  text-align: left;
}

.usage-logs-table th {
  padding: 0.75rem 1rem;
  background-color: #18181f;
  color: rgba(237, 236, 236, 0.6);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.usage-logs-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #edecec;
}

.usage-logs-table tr:last-child td {
  border-bottom: none;
}

.usage-logs-table tr:hover td {
  background-color: rgba(255, 255, 255, 0.02);
}

.usage-logs-ip {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #a5d6ff;
  background: rgba(165, 214, 255, 0.08);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.usage-logs-badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.6875rem;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-weight: 500;
}

.usage-logs-badge-status--completed {
  background: rgba(48, 209, 88, 0.12);
  color: #30d158;
  border: 1px solid rgba(48, 209, 88, 0.25);
}

.usage-logs-badge-status--stopped {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.usage-logs-empty {
  text-align: center;
  padding: 3rem 1rem !important;
  color: rgba(237, 236, 236, 0.45);
}

/* ==========================================================================
   ADMIN PANEL STYLES
   ========================================================================== */
#viewAdmin {
  overflow-y: auto;
  overflow-x: hidden;
  height: 100%;
  max-height: 100vh;
  padding-bottom: 3.5rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

#viewAdmin::-webkit-scrollbar {
  width: 6px;
}

#viewAdmin::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.dash-nav-item--admin {
  color: #c084fc;
}

.dash-nav-item--admin:hover {
  background-color: rgba(147, 51, 234, 0.12) !important;
  color: #e9d5ff !important;
}

.dash-nav-item--admin.active {
  background-color: rgba(147, 51, 234, 0.22) !important;
  color: #ffffff !important;
  border-color: rgba(147, 51, 234, 0.35) !important;
}

.admin-panel-container {
  padding: 1.5rem 2rem 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  overflow-y: auto;
  max-width: 1300px;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.admin-stat-card {
  background-color: #121216;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.admin-stat-label {
  font-size: 0.72rem;
  color: rgba(237, 236, 236, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}

.admin-stat-value {
  font-size: 1.35rem;
  font-weight: 600;
  color: #edecec;
  font-family: var(--font-mono);
}

.admin-section-block {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.admin-section-header {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.admin-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
}

.admin-section-desc {
  font-size: 0.75rem;
  color: rgba(237, 236, 236, 0.5);
}

.admin-table-wrap {
  background-color: #121216;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  text-align: left;
}

.admin-table th {
  padding: 0.75rem 1rem;
  background-color: #18181f;
  color: rgba(237, 236, 236, 0.6);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.admin-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #edecec;
  vertical-align: middle;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover td {
  background-color: rgba(255, 255, 255, 0.02);
}

.admin-table-empty {
  text-align: center;
  padding: 3rem 1rem !important;
  color: rgba(237, 236, 236, 0.45);
}

.admin-role-badge {
  font-size: 0.6875rem;
  font-family: var(--font-mono);
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
}

.admin-role-badge--admin {
  background: rgba(147, 51, 234, 0.2);
  color: #c084fc;
  border: 1px solid rgba(147, 51, 234, 0.4);
}

.admin-role-badge--user {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(237, 236, 236, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-plan-select {
  background: #1c1c24;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #edecec;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

.admin-plan-select:focus {
  border-color: #9333ea;
}

.admin-btn-action {
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  cursor: pointer;
  border: none;
  font-weight: 500;
  transition: all 0.15s ease;
}

.admin-btn-action--suspend {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.admin-btn-action--suspend:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

.admin-btn-action--unsuspend {
  background: rgba(48, 209, 88, 0.15);
  color: #30d158;
  border: 1px solid rgba(48, 209, 88, 0.35);
}

.admin-btn-action--unsuspend:hover {
  background: rgba(48, 209, 88, 0.25);
  color: #86efac;
}

.admin-ip-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.18rem 0.5rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.admin-ip-badge--masked {
  background: rgba(165, 214, 255, 0.08);
  color: #a5d6ff;
  border: 1px solid rgba(165, 214, 255, 0.2);
}

.admin-ip-badge--revealed {
  background: rgba(147, 51, 234, 0.18);
  color: #e9d5ff;
  border: 1px solid rgba(147, 51, 234, 0.45);
  font-weight: 600;
}




