/**
 * GilGamez Mail Platform (GGZ-MAIL v5.0.0)
 * Modern Enterprise Webmail Workspace Styles
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ─────────────────────────────────────────────────────────────
   1. Top App Header
───────────────────────────────────────────────────────────── */
.app-header {
  height: var(--header-height);
  background-color: var(--bg-canvas);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 50;
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  width: var(--sidebar-width);
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.icon-btn:hover {
  background-color: var(--bg-card-hover);
  color: var(--text-primary);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-logo {
  width: 32px;
  height: 32px;
  display: block;
}

.brand-wordmark {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-primary);
}

.brand-sub {
  color: var(--accent-cyan);
  font-weight: 600;
}

/* Search Bar */
.search-container {
  flex: 1;
  max-width: 720px;
  margin: 0 24px;
}

.search-pill {
  display: flex;
  align-items: center;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 0 14px;
  height: 44px;
  transition: all 0.2s ease;
}

.search-pill:focus-within {
  background-color: var(--bg-surface);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px var(--accent-cyan-subtle);
}

.search-icon {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  margin-right: 10px;
}

.search-icon svg {
  width: 18px;
  height: 18px;
}

.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
}

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

.search-options-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  transition: color 0.15s;
}

.search-options-btn:hover {
  color: var(--text-primary);
}

.search-options-btn svg {
  width: 16px;
  height: 16px;
}

/* Header Right */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cmc-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-card);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
}

.cmc-link-btn:hover {
  background-color: var(--bg-card-hover);
  color: var(--accent-cyan);
  border-color: rgba(56, 189, 248, 0.3);
}

.cmc-link-btn .btn-icon svg {
  width: 15px;
  height: 15px;
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 10px 4px 4px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
}

.user-avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

.user-handle-text {
  font-size: 12.5px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ─────────────────────────────────────────────────────────────
   2. Workspace Layout
───────────────────────────────────────────────────────────── */
.app-layout {
  display: flex;
  flex: 1;
  height: calc(100vh - var(--header-height));
  overflow: hidden;
}

/* ─────────────────────────────────────────────────────────────
   3. Left Navigation Rail
───────────────────────────────────────────────────────────── */
.sidebar-rail {
  width: var(--sidebar-width);
  background-color: var(--bg-canvas);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 12px 8px;
  flex-shrink: 0;
  overflow-y: auto;
}

.compose-btn-wrapper {
  padding: 4px 8px 16px 8px;
}

.compose-pill-btn {
  width: 100%;
  height: 48px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  color: var(--text-highlight);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.compose-pill-btn:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.2);
  transform: translateY(-1px);
}

.compose-icon svg {
  width: 18px;
  height: 18px;
  color: var(--accent-cyan);
}

.compose-text {
  flex: 1;
  text-align: left;
}

.compose-shortcut-chip {
  font-size: 11px;
  background-color: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Nav Item List */
.nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.nav-item:hover {
  background-color: var(--bg-card-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background-color: var(--bg-active-tab);
  color: var(--accent-cyan);
  font-weight: 600;
}

.nav-icon {
  margin-right: 12px;
  display: flex;
  align-items: center;
}

.nav-icon svg {
  width: 17px;
  height: 17px;
}

.nav-label {
  flex: 1;
}

.nav-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-cyan);
  background-color: var(--accent-cyan-subtle);
  padding: 1px 7px;
  border-radius: 10px;
}

.sidebar-divider {
  height: 1px;
  background-color: var(--border-subtle);
  margin: 12px 8px;
}

.nav-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.add-label-icon-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
}

.add-label-icon-btn:hover {
  color: var(--text-primary);
}

.add-label-icon-btn svg {
  width: 14px;
  height: 14px;
}

.labels-container {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.label-dot-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 12px;
  display: inline-block;
}

/* Storage Widget */
.storage-widget {
  margin-top: auto;
  padding: 14px 12px 6px 12px;
  border-top: 1px solid var(--border-subtle);
}

.storage-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.storage-progress-track {
  height: 4px;
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

.storage-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #0284c7);
  border-radius: 2px;
}

/* ─────────────────────────────────────────────────────────────
   4. Main Content Pane
───────────────────────────────────────────────────────────── */
.content-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-canvas);
  overflow: hidden;
}

/* Action Toolbar */
.workspace-toolbar {
  height: 46px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
  background-color: var(--bg-canvas);
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.select-dropdown-container {
  display: flex;
  align-items: center;
}

.custom-checkbox {
  appearance: none;
  width: 17px;
  height: 17px;
  border: 1.5px solid var(--border-strong);
  border-radius: 3px;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.custom-checkbox:checked {
  background-color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.custom-checkbox:checked::after {
  content: '';
  width: 4px;
  height: 8px;
  border: solid #000;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.dropdown-caret svg {
  width: 13px;
  height: 13px;
}

.toolbar-icon-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 7px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.toolbar-icon-btn:hover {
  background-color: var(--bg-card-hover);
  color: var(--text-primary);
}

.toolbar-icon-btn svg {
  width: 16px;
  height: 16px;
}

.toolbar-actions-group {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding-left: 8px;
  border-left: 1px solid var(--border-subtle);
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination-info {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-right: 6px;
}

/* Category Tabs */
.category-tabs-bar {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  background-color: var(--bg-canvas);
  flex-shrink: 0;
}

.category-tab {
  flex: 1;
  max-width: 250px;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}

.category-tab:hover {
  background-color: var(--bg-card-hover);
  color: var(--text-primary);
}

.category-tab.active {
  color: var(--accent-cyan);
  border-bottom-color: var(--accent-cyan);
  background-color: var(--bg-active-tab);
  font-weight: 600;
}

.category-tab .tab-icon svg {
  width: 17px;
  height: 17px;
}

/* Thread List View */
.thread-list-container {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.threads-table {
  display: flex;
  flex-direction: column;
}

/* Conversation Row */
.thread-row {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background-color 0.1s ease;
  position: relative;
  font-size: 13.5px;
}

.thread-row:hover {
  background-color: var(--bg-card);
  box-shadow: inset 1px 0 0 #38bdf8;
}

.thread-row.unread {
  background-color: rgba(255, 255, 255, 0.02);
}

.thread-row.unread .thread-sender {
  font-weight: 700;
  color: #ffffff;
}

.thread-row.unread .thread-subject {
  font-weight: 600;
  color: #ffffff;
}

.row-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 14px;
}

.star-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 3px;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}

.star-btn:hover {
  color: var(--accent-gold);
}

.star-btn.starred svg {
  fill: var(--accent-gold);
  stroke: var(--accent-gold);
}

.star-btn svg {
  width: 16px;
  height: 16px;
}

.thread-sender {
  width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-secondary);
  font-size: 13.5px;
  flex-shrink: 0;
}

.thread-summary-col {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  white-space: nowrap;
  padding-right: 16px;
}

.thread-subject {
  color: var(--text-primary);
  font-size: 13.5px;
}

.thread-snippet {
  color: var(--text-muted);
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thread-tag-chip {
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 4px;
  background-color: var(--accent-cyan-subtle);
  color: var(--accent-cyan);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.thread-meta-col {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}

.thread-att-icon svg {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

.thread-timestamp {
  font-size: 12px;
  color: var(--text-muted);
  width: 65px;
  text-align: right;
}

/* Row Hover Actions Bar */
.row-hover-actions {
  display: none;
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 2px 4px;
  gap: 2px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.thread-row:hover .row-hover-actions {
  display: flex;
}

/* ─────────────────────────────────────────────────────────────
   5. Empty State
───────────────────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 60px 20px;
  text-align: center;
}

.empty-icon-box {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--accent-cyan);
}

.empty-icon-box svg {
  width: 28px;
  height: 28px;
}

.empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.empty-subtitle {
  font-size: 13.5px;
  color: var(--text-muted);
}

/* ─────────────────────────────────────────────────────────────
   6. Thread Detail View
───────────────────────────────────────────────────────────── */
.thread-detail-container {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 0 24px 60px 24px;
}

.thread-view-header {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}

.thread-view-actions-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.thread-category-indicator {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--accent-cyan);
  background-color: var(--accent-cyan-subtle);
  padding: 2px 8px;
  border-radius: 4px;
}

.thread-subject-header {
  margin-bottom: 24px;
}

.thread-subject-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-highlight);
  line-height: 1.4;
}

/* Message Card */
.message-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
}

.msg-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.msg-sender-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.msg-sender-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.msg-sender-email {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-left: 6px;
}

.msg-to-line {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.msg-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dkim-verified-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--accent-green);
  background-color: rgba(16, 185, 129, 0.1);
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
}

.dkim-verified-pill svg {
  width: 12px;
  height: 12px;
}

.msg-date {
  font-size: 12px;
  color: var(--text-muted);
}

.msg-body-content {
  font-size: 14px;
  line-height: 1.6;
  color: #e4e4e7;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Attachment Deck */
.attachment-deck {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.attachment-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-primary);
  font-size: 13px;
  transition: all 0.15s ease;
}

.attachment-tile:hover {
  border-color: var(--accent-cyan);
  background-color: var(--bg-card-hover);
}

.attachment-tile svg {
  width: 16px;
  height: 16px;
  color: var(--accent-cyan);
}

.att-size {
  font-size: 11px;
  color: var(--text-muted);
}

/* Inline Quick Reply */
.inline-reply-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 12px;
}

.reply-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.reply-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.reply-shortcut-hint {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.reply-textarea {
  width: 100%;
  min-height: 90px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px;
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  resize: vertical;
}

.reply-textarea:focus {
  border-color: var(--accent-cyan);
}

.reply-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.reply-send-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--accent-cyan);
  color: #000;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.reply-send-btn:hover {
  opacity: 0.9;
}

.reply-send-btn svg {
  width: 14px;
  height: 14px;
}

/* ─────────────────────────────────────────────────────────────
   7. Docked Bottom-Right Compose Modal
───────────────────────────────────────────────────────────── */
.compose-docked-modal {
  position: fixed;
  bottom: 0;
  right: 24px;
  width: 580px;
  height: 520px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-bottom: none;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.compose-header {
  height: 44px;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
}

.compose-header-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.compose-window-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.window-control-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  border-radius: var(--radius-sm);
}

.window-control-btn:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.08);
}

.window-control-btn svg {
  width: 14px;
  height: 14px;
}

.compose-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.compose-field-row {
  display: flex;
  align-items: center;
  height: 38px;
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 14px;
}

.field-label {
  width: 60px;
  font-size: 13px;
  color: var(--text-muted);
}

.field-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
}

.compose-textarea-wrapper {
  flex: 1;
  padding: 12px 14px;
}

.compose-textarea {
  width: 100%;
  height: 100%;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 13.5px;
  font-family: inherit;
  resize: none;
}

.compose-bottom-toolbar {
  height: 52px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  background-color: var(--bg-surface);
}

.compose-send-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background-color: var(--accent-cyan);
  color: #000;
  border: none;
  padding: 7px 18px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.compose-send-btn:hover {
  opacity: 0.9;
}

.compose-send-btn svg {
  width: 14px;
  height: 14px;
}

.compose-formatting-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.compose-tool-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
}

.compose-tool-btn:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.08);
}

.compose-tool-btn svg {
  width: 16px;
  height: 16px;
}

/* ─────────────────────────────────────────────────────────────
   8. Command Palette
───────────────────────────────────────────────────────────── */
.command-palette-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
}

.command-palette-box {
  width: 580px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.palette-search-wrapper {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.palette-search-icon svg {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  margin-right: 12px;
}

.palette-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
}

.palette-esc-badge {
  font-size: 11px;
  background-color: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.palette-results-list {
  max-height: 320px;
  overflow-y: auto;
  padding: 8px;
}

.palette-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13.5px;
  cursor: pointer;
}

.palette-item:hover, .palette-item.active {
  background-color: var(--bg-card-hover);
  color: var(--text-primary);
}
