/* ============================================
   AnsAI — Workspace App CSS
   ============================================ */

.app-body {
  --bg-primary: #0d0f14;
  --bg-secondary: #11141a;
  --bg-card: rgba(255,255,255,0.045);
  --bg-card-hover: rgba(255,255,255,0.075);
  --glass-border: rgba(232,238,247,0.10);
  --text-primary: #eef3fb;
  --text-secondary: #9aa6b8;
  --text-muted: #697489;
  --accent: #2fb6a3;
  --accent-light: #7dd8cc;
  --accent-glow: rgba(47,182,163,0.18);
  --gradient-1: linear-gradient(135deg, #2fb6a3, #5f7cff);
  --gradient-2: linear-gradient(135deg, #2fb6a3, #8aa2ff);
  --gradient-3: linear-gradient(135deg, #5f7cff, #2fb6a3);
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-glow: 0 14px 34px rgba(47,182,163,0.14);
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-primary);
}

/* --- Sidebar --- */
.sidebar {
  width: 252px;
  background: #0f1218;
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.sidebar-overlay {
  display: none;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--glass-border);
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.sidebar-new-chat-btn {
  width: 100%;
  min-height: 40px;
  margin-bottom: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  font-size: 0.92rem;
  box-shadow: none;
}

.history-search-input {
  width: 100%;
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: var(--bg-card);
  color: var(--text-primary);
  font: inherit;
  font-size: 0.88rem;
  outline: none;
  box-sizing: border-box;
}

.history-search-input::placeholder {
  color: var(--text-muted);
}

.history-search-input:focus {
  border-color: var(--accent);
}

.nav-group-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding: 0 8px;
  letter-spacing: 1px;
}

.nav-item, .history-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  text-align: left;
}

.nav-item:hover, .history-item:hover {
  background: rgba(255,255,255,0.055);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(47, 182, 163, 0.12);
  color: #9ce4db;
  box-shadow: inset 2px 0 0 var(--accent);
}

.history-item {
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--glass-border);
  display: grid;
  gap: 10px;
}

.sidebar-upgrade-btn {
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: var(--radius-sm);
  background: rgba(47,182,163,0.12);
  border: 1px solid rgba(47,182,163,0.26);
  color: #b8f1eb;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.sidebar-upgrade-btn:hover {
  transform: translateY(-1px);
  background: rgba(47,182,163,0.18);
  box-shadow: 0 12px 28px rgba(47,182,163,0.12);
}

.sidebar-upgrade-btn:disabled {
  cursor: default;
  opacity: 0.72;
  transform: none;
  box-shadow: none;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.user-profile:hover {
  background: var(--bg-card-hover);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  font-size: 1.1rem;
}

.user-info {
  flex: 1;
  overflow: hidden;
}

.user-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-plan {
  font-size: 0.75rem;
  color: var(--accent-light);
}

.settings-icon {
  color: var(--text-muted);
}

/* --- Main Content --- */
.main-content {
  flex: 1;
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 14px 22px;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(13, 15, 20, 0.92);
  backdrop-filter: blur(12px);
  z-index: 10;
}

.mobile-sidebar-toggle {
  display: none;
}

.model-selector {
  min-width: 0;
}

.model-selector select {
  max-width: 100%;
  background-color: #151923;
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  padding: 8px 36px 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-locale);
  font-size: 0.9rem;
  font-weight: 600;
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%238888a0%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat, repeat;
  background-position: right .7em top 50%, 0 0;
  background-size: .65em auto, 100%;
}

.model-selector select:focus {
  outline: none;
  border-color: var(--accent);
}

.model-selector select.has-vip-lock {
  border-color: rgba(47,182,163,0.55);
}

.model-selector select option,
.model-selector select optgroup {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.model-selector select option:disabled {
  color: var(--text-muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.topbar-upgrade-btn {
  width: 116px;
  min-height: 36px;
  white-space: nowrap;
  border-radius: var(--radius-sm);
  background: #2fb6a3;
  color: #07110f;
  box-shadow: none;
  flex: 0 0 116px;
  padding-inline: 10px;
}

.reply-locale-select {
  width: 154px;
  min-width: 154px;
  background-color: #151923;
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  padding: 8px 32px 8px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-locale);
  font-size: 0.85rem;
  font-weight: 700;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%238888a0%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 9px auto;
}

.reply-locale-select:focus {
  border-color: rgba(47,182,163,0.55);
}

.reply-locale-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.btn-icon {
  font-size: 1rem;
  color: var(--text-secondary);
  transition: var(--transition);
}
.btn-icon:hover { color: var(--text-primary); }

.topbar-icon-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: rgba(255,255,255,0.035);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.topbar-icon-btn:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.16);
}

.topbar .btn { padding: 8px 16px; font-size: 0.85rem; }
.topbar #btnSignOut {
  width: 78px;
  min-width: 78px;
  flex: 0 0 78px;
}

.workspace-shell {
  --control-panel-width: clamp(292px, 28vw, 340px);
  --control-rail-width: 56px;
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--control-rail-width);
  transition: grid-template-columns 0.22s ease;
}

.workspace-shell:has(.assistant-control-panel:hover),
.workspace-shell:has(.assistant-control-panel:focus-within),
.control-panel-pinned .workspace-shell {
  grid-template-columns: minmax(0, 1fr) var(--control-panel-width);
}

.chat-pane {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.assistant-control-panel {
  min-width: 0;
  min-height: 0;
  position: relative;
  padding: 16px 8px;
  border-left: 1px solid var(--glass-border);
  background: rgba(14, 14, 22, 0.78);
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: padding 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.assistant-control-panel:hover,
.assistant-control-panel:focus-within,
.control-panel-pinned .assistant-control-panel {
  padding: 24px 18px;
  background: rgba(14, 14, 22, 0.92);
  box-shadow: -18px 0 38px rgba(0, 0, 0, 0.2);
}

.assistant-control-panel > :not(.control-panel-pin) {
  opacity: 0;
  pointer-events: none;
  transform: translateX(10px);
  transition: opacity 0.16s ease, transform 0.18s ease;
}

.assistant-control-panel:hover > :not(.control-panel-pin),
.assistant-control-panel:focus-within > :not(.control-panel-pin),
.control-panel-pinned .assistant-control-panel > :not(.control-panel-pin) {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.control-panel-pin {
  width: 38px;
  height: 38px;
  margin: 0 auto 2px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.control-panel-pin:hover,
.control-panel-pin:focus-visible {
  color: var(--text-primary);
  border-color: var(--accent-light);
  background: rgba(108, 92, 231, 0.14);
  outline: none;
}

.control-panel-pin-icon {
  display: block;
  font-size: 1.55rem;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform 0.18s ease;
}

.control-panel-pinned .control-panel-pin-icon {
  transform: rotate(180deg);
}

/* --- Workspace Area --- */
.workspace-area {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 32px 40px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.empty-state {
  margin-top: clamp(48px, 10vh, 92px);
  text-align: center;
  width: 100%;
  max-width: 800px;
  min-height: 330px;
  animation: fadeInUp 0.6s ease-out;
}

.empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 64px;
  font-size: 3rem;
  margin-bottom: 16px;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.empty-state h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 40px;
  min-height: 40px;
}

.suggestion-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 84px;
  gap: 16px;
}

.suggestion-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  padding: 18px 20px;
  border-radius: var(--radius-md);
  text-align: left;
  transition: var(--transition);
  min-width: 0;
  height: 84px;
  overflow: hidden;
}

.suggestion-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(108, 92, 231, 0.4);
  transform: translateY(-2px);
}

.suggestion-card h4 {
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.25;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.suggestion-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* --- Input Area --- */
.input-area-wrapper {
  flex-shrink: 0;
  padding: 16px 40px 24px;
  width: 100%;
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  background: linear-gradient(180deg, rgba(10, 10, 15, 0.62), rgba(10, 10, 15, 0.96));
}

.writer-template-bar {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
  padding: 0 4px 12px;
  border-bottom: 1px solid var(--glass-border);
}

.assistant-control-panel .writer-template-bar {
  grid-template-columns: 1fr;
  align-items: start;
  gap: 12px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.writer-template-meta {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.writer-template-badge {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(108, 92, 231, 0.18);
  color: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  flex-shrink: 0;
}

.writer-template-copy {
  min-width: 0;
}

.writer-template-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.writer-template-hint {
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.writer-template-select {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  padding: 10px 36px 10px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-locale);
  font-size: 0.9rem;
  font-weight: 650;
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%238888a0%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C/svg%3E");
  background-repeat: no-repeat, repeat;
  background-position: right .7em top 50%, 0 0;
  background-size: .65em auto, 100%;
}

.writer-template-select:focus {
  outline: none;
  border-color: rgba(47,182,163,0.55);
}

.writer-template-select option,
.writer-template-select optgroup {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.context-control-bar,
.image-control-bar {
  width: 100%;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.assistant-control-panel .context-control-bar,
.assistant-control-panel .image-control-bar,
.assistant-control-panel .quota-panel {
  margin: 0;
}

.context-control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.context-control-copy {
  min-width: 0;
}

.context-control-title,
.image-control-title {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--text-primary);
}

.context-control-status {
  margin-top: 4px;
  font-size: 0.76rem;
  line-height: 1.4;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.context-control-actions,
.image-control-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.context-control-actions {
  flex-shrink: 0;
}

.assistant-control-panel .context-control-bar,
.assistant-control-panel .image-control-head {
  align-items: stretch;
  flex-direction: column;
}

.assistant-control-panel .context-control-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  width: 100%;
}

.context-control-actions .toggle-pill,
.image-control-head .toggle-pill {
  width: auto;
  min-height: 36px;
  padding: 8px 10px;
  flex-shrink: 0;
}

.context-scope-select,
.compact-select,
.compact-input {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: var(--font-locale);
  font-size: 0.82rem;
  outline: none;
}

.context-scope-select,
.compact-select {
  padding: 8px 32px 8px 10px;
}

.compact-input {
  padding: 8px 10px;
}

.context-scope-select:focus,
.compact-select:focus,
.compact-input:focus {
  border-color: var(--accent);
}

.image-control-bar {
  display: none;
}

.image-control-bar.is-visible {
  display: grid;
  gap: 10px;
}

.image-control-head {
  justify-content: space-between;
}

.image-control-grid {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(104px, 0.6fr) minmax(180px, 1.3fr);
  gap: 10px;
}

.assistant-control-panel .image-control-grid {
  grid-template-columns: 1fr;
}

.compact-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.quota-panel {
  width: 100%;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.quota-panel:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.quota-panel.is-collapsed {
  background: rgba(255, 255, 255, 0.025);
}

.quota-panel.quota-panel-warn {
  border-color: rgba(245, 158, 11, 0.45);
}

.quota-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 30px;
}

.quota-panel-copy {
  min-width: 0;
}

.quota-panel-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.quota-panel-subtitle {
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.assistant-control-panel .quota-panel-header {
  align-items: flex-start;
  flex-direction: column;
}

.assistant-control-panel .quota-panel-actions {
  width: 100%;
  justify-content: space-between;
}

.assistant-control-panel .quota-panel-subtitle {
  white-space: normal;
}

.assistant-control-panel .quota-grid {
  grid-template-columns: 1fr;
}

.quota-panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.quota-panel-reset {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.quota-toggle {
  width: 28px;
  height: 28px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.quota-toggle:hover {
  color: var(--text-primary);
  border-color: var(--accent-light);
}

.quota-toggle-icon {
  line-height: 1;
  transform: rotate(180deg);
  transition: transform 0.2s ease;
}

.quota-panel.is-collapsed .quota-toggle-icon {
  transform: rotate(0deg);
}

.quota-panel-body {
  overflow: hidden;
  max-height: 240px;
  opacity: 1;
  margin-top: 12px;
  transition: max-height 0.25s ease, opacity 0.2s ease, margin-top 0.2s ease;
}

.quota-panel.is-collapsed .quota-panel-body {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}

.quota-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.quota-item {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.18);
}

.quota-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.quota-item-head strong {
  color: var(--text-primary);
  font-size: 0.85rem;
  white-space: nowrap;
}

.quota-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.quota-bar-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: rgba(47,182,163,0.12);
  border: 1px solid rgba(47,182,163,0.25);
  transition: width 0.25s ease, background 0.25s ease;
}

.quota-item-note {
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.quota-status {
  margin-top: 10px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.quota-status.warning {
  color: #f87171;
}

.input-container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  transition: var(--transition);
}
.input-container:focus-within {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}

.attachment-summary {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.attachment-summary-label {
  font-weight: 600;
  color: var(--text-secondary);
}

.document-preview-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-bottom: 8px;
}

.document-preview-item {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.02);
}

.document-preview-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(108, 92, 231, 0.14);
  color: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.document-preview-copy {
  flex: 1;
  min-width: 0;
}

.document-preview-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.document-preview-meta {
  margin-top: 4px;
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.document-preview-remove {
  width: 24px;
  height: 24px;
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  flex-shrink: 0;
}

.document-preview-remove:hover {
  border-color: var(--accent-light);
  color: var(--text-primary);
}

.image-preview-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  padding-bottom: 0px;
}
.image-preview-item {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--glass-border);
}
.image-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.image-preview-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(0,0,0,0.6);
  color: white;
  border: none;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.attachment-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.attachment-btn {
  margin-right: 8px;
  margin-bottom: 2px;
}

.attachment-btn svg {
  display: block;
}

.voice-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  margin-bottom: 2px;
  transition: var(--transition);
  flex-shrink: 0;
}

.voice-btn:hover {
  color: var(--text-primary);
  border-color: var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
}

.voice-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: transparent;
  border-color: transparent;
}

.voice-btn.is-active {
  color: var(--accent-light);
  border-color: rgba(108, 92, 231, 0.45);
  background: rgba(108, 92, 231, 0.12);
}

.voice-btn[hidden],
.toggle-pill[hidden],
.settings-row[hidden] {
  display: none !important;
}

#chatInput {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-locale);
  font-size: 1rem;
  resize: none;
  padding: 10px 0;
  max-height: 200px;
  outline: none;
  line-height: 1.5;
}

#chatInput::placeholder {
  font-family: var(--font-locale);
}

.input-row {
  display: flex;
  align-items: flex-end;
  width: 100%;
}

.send-btn {
  background: var(--gradient-1);
  color: #9ce4db;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 12px;
  transition: var(--transition);
}

.send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px var(--accent-glow);
}

.send-btn.is-generating {
  background: linear-gradient(135deg, #ef4444, #f97316);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35);
}

.send-btn.is-generating:hover {
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45);
}

.disclaimer {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  max-width: 900px;
  margin: 12px auto 0;
}

/* Chat Bubbles (for when we add messages later) */
.message {
  width: 100%;
  max-width: 800px;
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}
.message.user { flex-direction: row-reverse; }
.msg-avatar { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; }
.msg-avatar.ai { background: var(--gradient-1); }
.msg-avatar.user { background: var(--bg-card); border: 1px solid var(--glass-border); }
.msg-content { padding: 16px 20px; border-radius: var(--radius-md); font-size: 0.95rem; line-height: 1.6; }
.message.user .msg-content { background: var(--bg-card); }
.message.ai .msg-content { background: transparent; }

/* Markdown Styles inside Chat Bubbles */
.msg-content p { margin-bottom: 12px; }
.msg-content p:last-child { margin-bottom: 0; }
.code-block-wrapper {
  background: #1e1e2e;
  border-radius: var(--radius-sm);
  margin: 12px 0;
  border: 1px solid var(--glass-border);
  overflow: hidden;
}
.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background: rgba(0,0,0,0.3);
  font-size: 0.8rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--glass-border);
}
.copy-btn {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}
.copy-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.msg-content pre {
  padding: 16px;
  overflow-x: auto;
  margin: 0;
  background: transparent;
  border: none;
}
.msg-content code {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 4px;
  border-radius: 4px;
}
.msg-content pre code {
  background: transparent;
  padding: 0;
}
.msg-content ul, .msg-content ol { margin: 12px 0 12px 24px; }
.msg-content li { margin-bottom: 6px; }
.msg-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 12px;
  margin: 12px 0;
  color: var(--text-muted);
}

@media (max-width: 1180px) {
  .workspace-shell {
    --control-panel-width: 292px;
  }
  .workspace-area {
    padding: 28px 28px 24px;
  }
  .input-area-wrapper {
    padding-inline: 28px;
  }
}

@media (max-width: 980px) {
  .workspace-shell {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
  }
  .workspace-shell:has(.assistant-control-panel:hover),
  .workspace-shell:has(.assistant-control-panel:focus-within),
  .control-panel-pinned .workspace-shell {
    grid-template-columns: 1fr;
  }
  .assistant-control-panel {
    max-height: 34vh;
    padding: 14px 16px;
    border-left: 0;
    border-top: 1px solid var(--glass-border);
  }
  .assistant-control-panel > :not(.control-panel-pin) {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
  .control-panel-pin {
    display: none;
  }
  .assistant-control-panel .writer-template-bar,
  .assistant-control-panel .context-control-bar,
  .assistant-control-panel .image-control-bar,
  .assistant-control-panel .quota-panel {
    padding: 12px;
  }
}

@media (max-width: 768px) {
  .app-body {
    height: 100dvh;
  }
  .mobile-sidebar-toggle {
    display: inline-flex;
    flex: 0 0 36px;
  }
  .topbar {
    align-items: stretch;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 16px;
  }
  .topbar-left {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    width: 100%;
    gap: 10px;
  }
  .model-selector { width: 100%; }
  .model-selector select { width: 100%; }
  .topbar-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    width: 100%;
    gap: 8px;
  }
  .reply-locale-select {
    width: 100%;
    min-width: 0;
  }
  .topbar-upgrade-btn {
    width: 100%;
    flex-basis: auto;
  }
  .btn-icon {
    width: 36px;
    min-width: 36px;
    height: 36px;
  }
  .topbar .btn {
    white-space: nowrap;
    padding-inline: 12px;
  }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(86vw, 304px);
    transform: translateX(-100%);
    z-index: 1100;
    box-shadow: 18px 0 44px rgba(0,0,0,0.42);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay {
    position: fixed;
    inset: 0;
    display: block;
    opacity: 0;
    pointer-events: none;
    background: rgba(0,0,0,0.52);
    backdrop-filter: blur(4px);
    transition: opacity 0.18s ease;
    z-index: 1090;
  }
  .sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }
  .workspace-area { padding: 20px; }
  .empty-state { min-height: 360px; }
  .suggestion-grid { grid-template-columns: 1fr; }
  .input-area-wrapper { padding: 14px 20px 20px; }
  .writer-template-bar { grid-template-columns: 1fr; }
  .context-control-bar,
  .image-control-head {
    align-items: stretch;
    flex-direction: column;
  }
  .context-control-actions {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    width: 100%;
  }
  .image-control-grid {
    grid-template-columns: 1fr;
  }
  .quota-panel-header { flex-direction: column; }
  .quota-panel-actions { width: 100%; justify-content: space-between; }
  .quota-panel-subtitle { white-space: normal; }
  .quota-grid { grid-template-columns: 1fr; }
}

/* --- Pricing Modal --- */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 1240px;
  width: 95%;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  transform: translateY(20px);
  transition: var(--transition);
}
#pricingModal .modal-content {
  max-width: 1160px;
  padding: 30px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.012)),
    #0f1014;
  border-color: rgba(255,255,255,0.10);
  box-shadow: 0 24px 80px rgba(0,0,0,0.58);
}
#pricingModal.modal-overlay {
  align-items: flex-start;
  overflow-y: auto;
  padding: 32px 20px;
}
.modal-overlay.active .modal-content {
  transform: translateY(0);
}
.close-modal {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
}
.close-modal:hover { color: #fff; }

.modal-title {
  text-align: center;
  font-size: 1.55rem;
  line-height: 1.25;
  margin-bottom: 8px;
}
.modal-subtitle {
  text-align: center;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

.pricing-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}
.pricing-card {
  min-width: 0;
  min-height: 520px;
  background: #15161a;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: var(--transition);
  overflow: hidden;
}
.pricing-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: rgba(255, 255, 255, 0.10);
}
.pricing-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 14px 34px rgba(0,0,0,0.26);
}
.pricing-card.pro-tier {
  background: #171821;
  border-color: rgba(116, 105, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(116,105,255,0.10), 0 18px 44px rgba(0,0,0,0.28);
}
.pricing-card.pro-tier::before,
.pricing-card.is-current::before {
  background: linear-gradient(90deg, #7c6cff, #23c6d9, #22c55e);
}
.pricing-card.is-current {
  border-color: rgba(35,198,217,0.56);
}
.pricing-card.is-locked {
  opacity: 0.92;
}
.popular-badge {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(124,108,255,0.16);
  border: 1px solid rgba(124,108,255,0.45);
  color: white;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  z-index: 2;
}
.tier-name {
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
  margin: 18px 0 12px;
}
.tier-price {
  font-size: 2.55rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
  line-height: 1;
}
.tier-price .currency {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 400;
}
.tier-desc {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  min-height: 40px;
  margin-bottom: 20px;
}
.tier-features {
  list-style: none;
  margin-bottom: 18px;
  padding: 0;
  flex: 1 1 auto;
}
.tier-features li {
  margin-bottom: 10px;
  font-size: 0.86rem;
  color: rgba(236, 240, 255, 0.76);
  line-height: 1.45;
}
.membership-billing-panel {
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 12px;
}
.cdk-hint {
  color: rgba(236, 240, 255, 0.62);
  font-size: 0.72rem;
  font-weight: 760;
  line-height: 1.5;
  margin-bottom: 8px;
  text-align: left;
  text-transform: uppercase;
}
.billing-methods-preview {
  display: none;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-start;
  margin: 8px 0 12px;
}
.billing-method-pill {
  min-height: 24px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.045);
  color: rgba(236, 240, 255, 0.78);
  font-size: 0.72rem;
  line-height: 1.1;
  white-space: nowrap;
}
.billing-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.billing-route-btn {
  width: 100%;
  min-height: 66px;
  padding: 10px 8px;
  border-radius: 8px;
  border: 1px solid rgba(232,238,247,0.12);
  background: rgba(255,255,255,0.04);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  transition: var(--transition);
  font-weight: 700;
  user-select: none;
}
.billing-route-btn.route-subscription {
  background: rgba(95,124,255,0.08);
}
.billing-route-btn.route-wechat {
  border-color: rgba(47,182,163,0.30);
  background: rgba(47,182,163,0.09);
}
.billing-route-btn.route-topup {
  border-color: rgba(125,216,204,0.34);
  background: linear-gradient(180deg, rgba(125,216,204,0.14), rgba(255,255,255,0.045));
}
.billing-route-btn:hover,
.billing-route-btn.is-selected {
  border-color: rgba(125,216,204,0.62);
  background: rgba(47,182,163,0.16);
  box-shadow: 0 0 0 3px rgba(47,182,163,0.08);
  filter: none;
}
.billing-route-btn:disabled,
.billing-route-btn.is-disabled {
  cursor: default;
  opacity: 0.72;
  filter: grayscale(0.2);
}
.billing-route-btn span {
  font-size: 0.82rem;
  font-weight: 760;
  letter-spacing: 0;
  white-space: nowrap;
}
.billing-route-btn small {
  display: block;
  color: rgba(236,240,255,0.66);
  font-size: 0.68rem;
  line-height: 1.3;
  font-weight: 500;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.billing-note {
  margin-top: 9px;
  color: rgba(236, 240, 255, 0.50);
  font-size: 0.70rem;
  line-height: 1.45;
  text-align: left;
}
.billing-note.is-error {
  color: #ffb4b4;
}
.billing-note.is-success {
  color: #9ce4db;
}
.topup-billing-panel {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(232,238,247,0.10);
  border-radius: 8px;
  background: rgba(255,255,255,0.035);
}
.topup-billing-panel[hidden] {
  display: none;
}
.topup-billing-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.topup-billing-title {
  margin: 0 0 5px;
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.25;
  letter-spacing: 0;
}
.topup-billing-subtitle {
  margin: 0;
  color: rgba(236,240,255,0.62);
  font-size: 0.82rem;
  line-height: 1.45;
}
.topup-billing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

@media (max-width: 1180px) {
  .pricing-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pricing-card {
    min-height: 500px;
  }
}

@media (max-width: 680px) {
  .modal-content {
    padding: 24px 18px;
  }

  .pricing-cards {
    grid-template-columns: 1fr;
  }

  .pricing-card {
    min-height: auto;
  }
}
.auth-helper-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -6px;
}
.auth-link-btn {
  border: 0;
  background: transparent;
  color: var(--accent-light);
  font: inherit;
  font-size: 0.84rem;
  cursor: pointer;
  padding: 2px 0;
}
.auth-link-btn:hover {
  color: var(--text-primary);
  text-decoration: underline;
}
.oauth-login-btn {
  width: 100%;
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.96);
  color: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.oauth-login-btn:hover {
  border-color: rgba(255,255,255,0.9);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.22);
}
.oauth-login-btn:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}
.oauth-google-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #4285f4;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(17,24,39,0.12);
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.78rem;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--glass-border);
}
.auth-email-otp-group {
  margin-bottom: 4px;
}
.auth-otp-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.auth-otp-row input {
  flex: 1;
  min-width: 0;
}
.auth-otp-btn {
  min-height: 48px;
  padding: 12px 16px;
  white-space: nowrap;
}
.auth-captcha-shell {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.03);
}
.auth-turnstile {
  min-height: 66px;
}
.auth-turnstile > div {
  margin: 0 auto;
}
.auth-captcha-help {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-align: center;
}
.auth-status,
.auth-error {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.85rem;
  line-height: 1.5;
}
.auth-status[hidden],
.auth-error:empty {
  display: none;
}
.auth-status {
  border: 1px solid rgba(110, 231, 183, 0.18);
  border-left: 3px solid rgba(52, 211, 153, 0.9);
  background: linear-gradient(135deg, rgba(18, 28, 24, 0.96), rgba(12, 18, 22, 0.92));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
  color: #d8fbe8;
  text-align: left;
}
@media (max-width: 560px) {
  .auth-otp-row {
    flex-direction: column;
    align-items: stretch;
  }

  .auth-otp-btn {
    width: 100%;
  }
}
.auth-error {
  border: 1px solid rgba(248, 113, 113, 0.24);
  background: rgba(127, 29, 29, 0.16);
  color: #ffb4b4;
}
.checkout-email-modal {
  z-index: 1200;
}
.checkout-email-dialog {
  width: min(440px, calc(100vw - 32px));
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  background: rgba(18,18,28,0.98);
  box-shadow: 0 24px 70px rgba(0,0,0,0.55);
  padding: 28px;
  position: relative;
}
.checkout-email-dialog h3 {
  font-size: 1.18rem;
  margin: 0 0 8px;
}
.checkout-email-dialog p {
  color: var(--text-secondary);
  font-size: 0.86rem;
  line-height: 1.7;
  margin: 0 0 18px;
}
.checkout-email-label {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 0.84rem;
  white-space: nowrap;
}
.required-dot {
  color: #ef4444;
  font-weight: 700;
}
.checkout-email-input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
  padding: 10px 12px;
  outline: none;
  margin-top: 8px;
}
.checkout-email-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108,92,231,0.16);
}
.checkout-email-error {
  min-height: 18px;
  margin-top: 8px;
  color: #f87171;
  font-size: 0.78rem;
  line-height: 1.4;
}
.checkout-email-modal.has-error .checkout-email-input {
  border-color: #ef4444;
}
.checkout-email-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}
.checkout-email-actions .btn {
  min-width: 96px;
  border-radius: 8px;
}
.pricing-secure-note {
  margin: 16px 0 18px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(125,216,204,0.20);
  background: linear-gradient(135deg, rgba(47,182,163,0.14), rgba(95,124,255,0.08));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.pricing-secure-note-title {
  display: block;
  color: #d9faf5;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.pricing-secure-note-body {
  margin: 6px 0 0;
  color: rgba(236,240,255,0.76);
  font-size: 0.78rem;
  line-height: 1.6;
}
.checkout-redirect-overlay {
  z-index: 1300;
}
.checkout-redirect-dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 28px;
  border-radius: 16px;
  border: 1px solid rgba(232,238,247,0.12);
  background: rgba(15,18,24,0.98);
  box-shadow: 0 28px 80px rgba(0,0,0,0.52);
  text-align: center;
}
.checkout-redirect-spinner {
  width: 42px;
  height: 42px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.10);
  border-top-color: var(--accent-light);
  animation: checkout-redirect-spin 0.9s linear infinite;
}
.checkout-redirect-title {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.08rem;
  font-weight: 800;
}
.checkout-redirect-body {
  margin: 10px 0 0;
  color: rgba(236,240,255,0.72);
  font-size: 0.88rem;
  line-height: 1.65;
}
.billing-return-banner {
  margin: 16px 24px 0;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(125,216,204,0.18);
  border-left: 4px solid rgba(125,216,204,0.78);
  background: linear-gradient(135deg, rgba(20,35,31,0.98), rgba(15,20,31,0.94));
  box-shadow: 0 18px 40px rgba(0,0,0,0.22);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.billing-return-banner[hidden] {
  display: none;
}
.billing-return-banner.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.billing-return-banner-copy {
  min-width: 0;
}
.billing-return-banner-title {
  display: block;
  color: #dbfaf4;
  font-size: 0.95rem;
  font-weight: 800;
}
.billing-return-banner-body {
  margin: 6px 0 0;
  color: rgba(236,240,255,0.74);
  font-size: 0.84rem;
  line-height: 1.6;
}
.billing-return-banner-close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: rgba(236,240,255,0.72);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
  flex: 0 0 auto;
}
.billing-return-banner-close:hover {
  background: rgba(255,255,255,0.12);
  color: var(--text-primary);
  transform: translateY(-1px);
}
@keyframes checkout-redirect-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (max-width: 680px) {
  .pricing-secure-note {
    margin-bottom: 16px;
  }

  .checkout-redirect-dialog {
    padding: 24px 20px;
  }

  .billing-return-banner {
    margin: 12px 16px 0;
    padding: 14px 15px;
  }
}
.msg-content img { max-width: 100%; border-radius: 8px; margin: 8px 0; display: block; }


think {
    display: block;
    margin: 15px 0;
    padding: 15px 20px;
    background: rgba(139, 92, 246, 0.05);
    border-left: 4px solid #8b5cf6;
    border-radius: 0 8px 8px 0;
    color: #9ca3af;
    font-size: 0.95em;
    line-height: 1.6;
    font-style: italic;
    white-space: pre-wrap;
    position: relative;
    overflow-x: auto;
}
think::before {
    content: 'AI is thinking...';
    font-weight: 600;
    color: #8b5cf6;
    white-space: pre;
    font-style: normal;
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 1.05em;
    letter-spacing: 0.5px;
}
.msg-content p + think {
    margin-top: 20px;
}
think + p {
    margin-top: 20px;
}

.ai-think-box {
    margin: 15px 0;
    background: rgba(255, 255, 255, 0.03);
    border-left: 4px solid var(--accent);
    border-radius: 6px;
    overflow: hidden;
}
.ai-think-box summary {
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    color: var(--accent);
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    list-style: none;
}
.ai-think-box summary::-webkit-details-marker {
    display: none;
}
.ai-think-box .think-content {
    padding: 16px;
    color: #9ca3af;
    font-size: 0.9em;
    line-height: 1.6;
    white-space: pre-wrap;
    font-style: italic;
}

.user-profile { cursor: pointer; transition: background 0.2s; }
.user-profile:hover { background: rgba(255,255,255,0.05); }

/* --- Settings Modal --- */
.settings-modal-content {
  max-width: 860px;
}

.settings-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-right: 28px;
}

.settings-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--gradient-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.settings-header-copy {
  min-width: 0;
  flex: 1;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.settings-panel {
  padding: 16px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.03);
}

.settings-panel-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.settings-account-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.settings-account-copy {
  min-width: 0;
  flex: 1;
}

.settings-account-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-account-meta {
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-plan-badge {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(108, 92, 231, 0.16);
  color: var(--accent-light);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.settings-row {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.settings-row:last-of-type {
  margin-bottom: 10px;
}

.settings-row label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.settings-select {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  padding: 10px 36px 10px 14px;
  border-radius: 8px;
  font-family: var(--font-locale);
  font-size: 0.9rem;
  font-weight: 600;
  appearance: none;
  outline: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%238888a0%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 9px auto;
}

.settings-select:focus {
  border-color: var(--accent);
}

.settings-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.settings-action-btn {
  min-height: 40px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  font-size: 0.86rem;
  font-weight: 600;
  transition: var(--transition);
}

.settings-action-btn:hover {
  border-color: var(--accent-light);
  background: rgba(108, 92, 231, 0.12);
}

.settings-action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.settings-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  transition: var(--transition);
}

.toggle-pill:hover {
  border-color: var(--accent-light);
  background: rgba(108, 92, 231, 0.08);
}

.toggle-pill:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.toggle-pill.is-active,
.toggle-pill.is-on {
  border-color: rgba(108, 92, 231, 0.45);
  background: rgba(108, 92, 231, 0.14);
}

.toggle-track {
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  position: relative;
  flex-shrink: 0;
}

.toggle-pill.is-active .toggle-track,
.toggle-pill.is-on .toggle-track {
  background: rgba(108, 92, 231, 0.55);
}

.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}

.toggle-pill.is-active .toggle-thumb,
.toggle-pill.is-on .toggle-thumb {
  transform: translateX(14px);
}

.toggle-text {
  font-size: 0.88rem;
  font-weight: 600;
}

@media (max-width: 768px) {
  .settings-modal-content { padding: 24px; }
  .settings-header { align-items: flex-start; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-action-grid { grid-template-columns: 1fr; }
}

/* ============ ENTERPRISE WORKBENCH REFRESH ============ */
.app-body {
  --bg-primary: #0b0d12;
  --bg-secondary: #10131a;
  --bg-card: rgba(232, 238, 247, 0.055);
  --bg-card-hover: rgba(232, 238, 247, 0.085);
  --glass-border: rgba(232, 238, 247, 0.11);
  --text-primary: #edf3fb;
  --text-secondary: #a3adbd;
  --text-muted: #697386;
  --accent: #2fb6a3;
  --accent-light: #8ce3d9;
  --accent-glow: rgba(47, 182, 163, 0.18);
  --gradient-1: linear-gradient(135deg, #2fb6a3 0%, #5f7cff 100%);
  --shadow-glow: 0 18px 42px rgba(47, 182, 163, 0.14);
  background: #0b0d12;
}

.app-body .nav-logo {
  font-size: 1.18rem;
  letter-spacing: 0;
}

.app-body .nav-logo .logo-icon,
.app-body .avatar,
.app-body .settings-avatar {
  background: #10201f;
  border: 1px solid rgba(125, 216, 204, 0.28);
  color: #aaf0e8;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.sidebar {
  width: 268px;
  background: linear-gradient(180deg, #0b0d12 0%, #0e1117 100%);
  border-right-color: rgba(232,238,247,0.09);
}

.sidebar-header {
  padding: 18px 18px 16px;
  border-bottom-color: rgba(232,238,247,0.08);
}

.sidebar-new-chat-btn {
  min-height: 42px;
  gap: 8px;
  background: linear-gradient(135deg, #2fb6a3, #5f7cff);
  color: #07110f;
  font-weight: 850;
}

.nav-group-title {
  color: #6f7b8e;
  letter-spacing: 0.08em;
}

.nav-item,
.history-item {
  min-height: 40px;
  border: 1px solid transparent;
}

.nav-item .icon {
  width: 31px;
  height: 24px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(232,238,247,0.055);
  color: #8fa0b8;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0;
}

.nav-item:hover,
.history-item:hover {
  background: rgba(232,238,247,0.06);
  border-color: rgba(232,238,247,0.08);
}

.nav-item.active {
  background: rgba(47,182,163,0.12);
  border-color: rgba(47,182,163,0.20);
  box-shadow: inset 2px 0 0 #2fb6a3;
}

.nav-item.active .icon {
  background: rgba(47,182,163,0.18);
  color: #aaf0e8;
}

.main-content {
  background: #0d1016;
  isolation: isolate;
}

.main-content::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(rgba(232,238,247,0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232,238,247,0.026) 1px, transparent 1px),
    linear-gradient(180deg, rgba(95,124,255,0.08), rgba(13,16,22,0) 28%);
  background-size: 44px 44px, 44px 44px, 100% 100%;
}

.topbar {
  min-height: 68px;
  padding: 12px 22px;
  background: rgba(11,13,18,0.88);
  border-bottom-color: rgba(232,238,247,0.09);
}

.topbar-left {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 18px;
}

.workspace-heading {
  min-width: 144px;
  display: grid;
  gap: 1px;
}

.workspace-heading span {
  color: #657187;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workspace-heading strong {
  color: #edf3fb;
  font-size: 0.98rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.model-selector select,
.reply-locale-select,
.context-scope-select,
.compact-select,
.compact-input,
.writer-template-select,
.settings-select {
  background-color: #121722;
  border-color: rgba(232,238,247,0.11);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
}

.model-selector select:focus,
.reply-locale-select:focus,
.context-scope-select:focus,
.compact-select:focus,
.compact-input:focus,
.writer-template-select:focus,
.settings-select:focus {
  border-color: rgba(125,216,204,0.62);
  box-shadow: 0 0 0 3px rgba(47,182,163,0.10);
}

.topbar-upgrade-btn {
  background: #2fb6a3;
  color: #061311;
  box-shadow: none;
}

.workspace-shell {
  --control-panel-width: clamp(310px, 25vw, 360px);
  grid-template-columns: minmax(0, 1fr) var(--control-panel-width);
  position: relative;
  z-index: 1;
}

.workspace-shell:has(.assistant-control-panel:hover),
.workspace-shell:has(.assistant-control-panel:focus-within),
.control-panel-pinned .workspace-shell {
  grid-template-columns: minmax(0, 1fr) var(--control-panel-width);
}

.assistant-control-panel {
  padding: 22px 18px;
  background: rgba(12,15,21,0.86);
  border-left-color: rgba(232,238,247,0.09);
  box-shadow: -18px 0 42px rgba(0,0,0,0.18);
}

.assistant-control-panel:hover,
.assistant-control-panel:focus-within,
.control-panel-pinned .assistant-control-panel {
  padding: 22px 18px;
  background: rgba(12,15,21,0.92);
}

.assistant-control-panel > :not(.control-panel-pin),
.assistant-control-panel:hover > :not(.control-panel-pin),
.assistant-control-panel:focus-within > :not(.control-panel-pin),
.control-panel-pinned .assistant-control-panel > :not(.control-panel-pin) {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.control-panel-pin {
  display: none;
}

.assistant-control-panel .writer-template-bar,
.assistant-control-panel .context-control-bar,
.assistant-control-panel .image-control-bar,
.assistant-control-panel .quota-panel,
.quota-item {
  background: rgba(232,238,247,0.045);
  border-color: rgba(232,238,247,0.10);
  border-radius: 10px;
}

.toggle-pill:hover,
.toggle-pill.is-active,
.toggle-pill.is-on {
  border-color: rgba(47,182,163,0.38);
  background: rgba(47,182,163,0.12);
}

.toggle-pill.is-active .toggle-track,
.toggle-pill.is-on .toggle-track {
  background: rgba(47,182,163,0.72);
}

.workspace-area {
  padding: clamp(32px, 5vh, 58px) clamp(34px, 5vw, 64px) 30px;
}

.empty-state {
  width: min(1080px, 100%);
  max-width: 1080px;
  margin-top: clamp(18px, 7vh, 74px);
  text-align: left;
}

.empty-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 22px;
  border-radius: 12px;
  border: 1px solid rgba(125,216,204,0.28);
  background: rgba(47,182,163,0.12);
  color: #aaf0e8;
  -webkit-text-fill-color: currentColor;
  font-size: 1.08rem;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.empty-state h2 {
  max-width: 760px;
  margin-bottom: 26px;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.05;
  font-weight: 860;
  letter-spacing: 0;
}

.suggestion-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: auto;
  gap: 12px;
}

.suggestion-card {
  height: auto;
  min-height: 132px;
  padding: 18px;
  border-radius: 10px;
  background: rgba(232,238,247,0.052);
  border-color: rgba(232,238,247,0.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
}

.suggestion-card:hover {
  background: rgba(47,182,163,0.10);
  border-color: rgba(125,216,204,0.34);
  transform: translateY(-2px);
}

.suggestion-card h4 {
  font-size: 0.96rem;
  line-height: 1.3;
  margin-bottom: 9px;
}

.suggestion-card p {
  color: #8793a6;
}

.input-area-wrapper {
  padding: 18px clamp(34px, 5vw, 64px) 24px;
  background: linear-gradient(180deg, rgba(13,16,22,0.2), rgba(11,13,18,0.96));
  border-top-color: rgba(232,238,247,0.07);
}

.input-container {
  max-width: 1080px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(17,21,30,0.94);
  border-color: rgba(232,238,247,0.12);
  box-shadow: 0 18px 48px rgba(0,0,0,0.24), inset 0 1px 0 rgba(255,255,255,0.035);
}

.input-container:focus-within {
  border-color: rgba(125,216,204,0.58);
  box-shadow: 0 18px 50px rgba(0,0,0,0.28), 0 0 0 3px rgba(47,182,163,0.10);
}

.attachment-btn,
.voice-btn,
.btn-icon,
.quota-toggle {
  border-radius: 8px;
  color: #7f8ba0;
}

.attachment-btn:hover,
.voice-btn:hover,
.btn-icon:hover,
.quota-toggle:hover {
  color: #edf3fb;
  background: rgba(232,238,247,0.065);
  border-color: rgba(232,238,247,0.12);
}

.voice-btn.is-active {
  color: #aaf0e8;
  border-color: rgba(47,182,163,0.38);
  background: rgba(47,182,163,0.12);
}

.send-btn {
  background: #2fb6a3;
  color: #061311;
  box-shadow: none;
}

.send-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(47,182,163,0.22);
}

.message {
  max-width: 900px;
}

.msg-avatar.ai {
  background: #10201f;
  color: #aaf0e8;
  border: 1px solid rgba(125,216,204,0.24);
}

.message.user .msg-content {
  background: rgba(47,182,163,0.10);
  border: 1px solid rgba(47,182,163,0.16);
}

.message.ai .msg-content {
  background: rgba(232,238,247,0.038);
  border: 1px solid rgba(232,238,247,0.08);
}

#pricingModal .modal-content {
  background: #0d1016;
  border-color: rgba(232,238,247,0.11);
}

.pricing-card {
  background: rgba(232,238,247,0.045);
  border-color: rgba(232,238,247,0.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
}

.pricing-card.pro-tier {
  background: rgba(47,182,163,0.075);
  border-color: rgba(47,182,163,0.36);
  box-shadow: 0 18px 42px rgba(0,0,0,0.24);
}

.pricing-card.pro-tier::before,
.pricing-card.is-current::before {
  background: linear-gradient(90deg, #2fb6a3, #5f7cff);
}

.popular-badge {
  background: #2fb6a3;
  border-color: rgba(125,216,204,0.42);
  color: #061311;
}

@media (max-width: 1180px) {
  .workspace-shell,
  .workspace-shell:has(.assistant-control-panel:hover),
  .workspace-shell:has(.assistant-control-panel:focus-within),
  .control-panel-pinned .workspace-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .assistant-control-panel {
    display: flex;
    max-height: min(34vh, 270px);
    padding: 14px 16px;
    border-left: 0;
    border-top: 1px solid rgba(232,238,247,0.09);
    overflow-x: hidden;
    overflow-y: auto;
  }

  .suggestion-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .topbar {
    min-height: auto;
    align-items: flex-start;
  }

  .topbar-left {
    width: 100%;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
  }

  .workspace-heading {
    min-width: 0;
  }

  .model-selector {
    grid-column: 1 / -1;
  }

  .suggestion-grid {
    grid-template-columns: 1fr;
  }

  .suggestion-card {
    min-height: 112px;
  }
}

/* ============ DISTINCTIVE WORKBENCH SYSTEM ============ */
.app-body .logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: block;
}

.app-body .nav-logo .logo-icon {
  display: none;
}

.app-body .gradient-text {
  color: #8ce3d9;
  -webkit-text-fill-color: currentColor;
}

.main-content::before {
  background:
    linear-gradient(90deg, rgba(232,238,247,0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(13,16,22,0.2), rgba(13,16,22,0) 28%);
  background-size: 72px 100%, 100% 100%;
}

.sidebar-new-chat-btn,
.topbar-upgrade-btn,
.send-btn {
  background: #eef3fb;
  color: #0b0d12;
}

.sidebar-new-chat-btn:hover,
.topbar-upgrade-btn:hover,
.send-btn:hover {
  box-shadow: 0 12px 30px rgba(238,243,251,0.12);
}

.workspace-heading span {
  color: #8ce3d9;
}

.workspace-heading strong {
  font-weight: 840;
}

.empty-state {
  position: relative;
  max-width: 980px;
}

.empty-state::before {
  content: "CONTEXT WORKBENCH";
  display: block;
  margin-bottom: 14px;
  color: #667386;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 760;
  letter-spacing: 0.12em;
}

.empty-icon {
  width: 48px;
  height: 48px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.empty-icon img {
  width: 48px;
  height: 48px;
  display: block;
}

.empty-state h2 {
  max-width: 840px;
  margin-bottom: 30px;
  font-size: clamp(2rem, 4.5vw, 4.3rem);
  line-height: 0.98;
}

.suggestion-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: rgba(232,238,247,0.10);
  border: 1px solid rgba(232,238,247,0.10);
  border-radius: 12px;
  overflow: hidden;
}

.suggestion-card {
  min-height: 154px;
  border: 0;
  border-radius: 0;
  background: #10141c;
  box-shadow: none;
}

.suggestion-card:hover {
  background: #121923;
  transform: none;
}

.suggestion-card h4 {
  font-size: 1rem;
}

.suggestion-card p {
  color: #8f9bad;
}

.assistant-control-panel .context-control-bar,
.assistant-control-panel .image-control-bar,
.assistant-control-panel .quota-panel,
.input-container,
.pricing-card {
  border-radius: 10px;
  background: #10141c;
}

.input-container {
  box-shadow: none;
}

.input-container:focus-within {
  box-shadow: 0 0 0 3px rgba(140,227,217,0.09);
}

.billing-route-btn,
.billing-method-pill,
.quota-item {
  border-radius: 7px;
}

@media (max-width: 1180px) {
  .suggestion-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .suggestion-grid {
    grid-template-columns: 1fr;
  }
}
