/* ==========================================================================
   Bespoke Enterprise Design System - Components & Micro-Interactions
   ========================================================================== */

/* Vector SVG Icons Baseline */
.icon-svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.75;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  display: inline-block;
}
.icon-svg.sm { width: 14px; height: 14px; }
.icon-svg.md { width: 18px; height: 18px; }
.icon-svg.lg { width: 22px; height: 22px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 13px;
  font-family: inherit;
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  line-height: 1;
  user-select: none;
}
.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}
.btn:active:not(:disabled) {
  transform: scale(0.98) translateY(0);
}
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.btn > * {
  pointer-events: none;
}

.btn-primary {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(29, 78, 216, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #1d4ed8 0%, #1e40af 100%);
  box-shadow: 0 2px 5px rgba(29, 78, 216, 0.35);
}

.btn-secondary {
  background-color: var(--bg-surface);
  border-color: var(--border-default);
  color: var(--text-secondary);
  box-shadow: var(--shadow-subtle);
}
.btn-secondary:hover {
  background-color: var(--bg-surface-hover);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.btn-danger {
  background-color: var(--rose);
  color: #fff;
}
.btn-danger:hover {
  background-color: #dc2626;
}

.btn-icon {
  padding: 6px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}
.btn-icon:hover {
  background-color: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--border-default);
}
.btn-icon.active {
  background-color: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-border);
}

/* Primary Compose Button */
.btn-compose-prime {
  width: 100%;
  padding: 10px 16px;
  font-size: var(--text-sm);
  font-weight: 700;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-compose-prime:hover {
  background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}
.btn-compose-prime:active {
  transform: translateY(0);
}

/* Sidebar Navigation Items */
.nav-section-header {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-subtle);
  letter-spacing: 0.06em;
  padding: 14px 8px 6px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-transform: uppercase;
}

.nav-item-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 2px;
  transition: all var(--transition-fast);
}
.nav-item-link:hover {
  background-color: var(--bg-surface-hover);
  color: var(--text-primary);
}
.nav-item-link.active {
  background-color: #ffffff;
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 0 0 1px var(--border-default);
}

.nav-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-item-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface-active);
  color: var(--text-muted);
  font-feature-settings: "tnum" 1;
}
.nav-item-badge.badge-unread {
  background-color: var(--primary);
  color: #ffffff;
}

/* Universal Monogram Avatar */
.avatar-monogram {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  flex-shrink: 0 !important;
  user-select: none !important;
  line-height: 1 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1) !important;
}

.avatar-monogram.avatar-xs {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  font-size: 10px !important;
}

.avatar-monogram.avatar-sm {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  font-size: 13px !important;
}

.avatar-monogram.avatar-md {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  font-size: 16px !important;
}

.avatar-monogram.avatar-lg {
  width: 52px !important;
  height: 52px !important;
  min-width: 52px !important;
  min-height: 52px !important;
  font-size: 20px !important;
}

/* Message Row (3-Line High-Precision Card) */
.message-row-card {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  gap: 12px !important;
  position: relative !important;
  padding: 12px 18px 12px 16px !important;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  user-select: none;
  overflow: hidden;
  box-sizing: border-box !important;
  animation: fadeIn 0.2s var(--ease-smooth) both;
}
.message-row-card:hover {
  background-color: var(--bg-surface-hover);
  transform: translateX(-2px);
}
.message-row-card:active {
  transform: translateX(0);
}
.message-row-card.selected {
  background-color: var(--bg-surface-selected);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.08);
}
.message-row-card.selected::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 4px;
  background-color: var(--primary);
  border-top-left-radius: 3px;
  border-bottom-left-radius: 3px;
  z-index: 2;
  animation: slideInRight 0.2s var(--ease-out);
}

.message-row-card.unread {
  background-color: var(--bg-surface-unread);
}
.message-row-card.unread .msg-card-subject {
  font-weight: 700;
  color: var(--text-primary);
}
.message-row-card.unread .msg-card-sender {
  font-weight: 700;
  color: var(--primary);
}

.message-row-card .avatar-monogram,
.message-row-card .msg-card-avatar {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  max-width: 34px !important;
  max-height: 34px !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  flex: 0 0 34px !important;
  flex-shrink: 0 !important;
  box-shadow: var(--shadow-subtle);
  margin: 0 !important;
}

.msg-card-content {
  flex: 1 !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
}

.msg-card-line1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.msg-card-sender {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}

.unread-glow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
  display: none;
}
.message-row-card.unread .unread-glow-dot {
  display: inline-block;
}

.msg-card-date {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  font-feature-settings: "tnum" 1;
}

.msg-card-line2 {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-card-line3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 1px;
}

.msg-card-preview {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.msg-card-att-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  background-color: #ffffff;
  border: 1px solid var(--border-default);
  padding: 1px 5px;
  border-radius: var(--radius-xs);
  flex-shrink: 0;
}

/* Executive Reading Pane */
.reading-header-subject {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  line-height: 1.35;
}

.reading-meta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-app);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
}

.reading-sender-avatar-lg {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 700;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.reading-sender-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
}

.reading-sender-dept-chip {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background-color: var(--primary-light);
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  display: inline-block;
  margin-right: 6px;
}

.reading-recipients-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* Attachment Cards (Vector Glyphs) */
.attachment-tiles-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.attachment-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 8px 12px;
  min-width: 210px;
  max-width: 290px;
  box-shadow: var(--shadow-subtle);
  transition: all var(--transition-fast);
}
.attachment-tile:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.att-ext-badge {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.att-ext-pdf { background-color: #fee2e2; color: #b91c1c; }
.att-ext-xls, .att-ext-xlsx { background-color: #ecfdf5; color: #047857; }
.att-ext-doc, .att-ext-docx { background-color: #eff6ff; color: #1d4ed8; }
.att-ext-img, .att-ext-png, .att-ext-jpg { background-color: #fffbeb; color: #b45309; }
.att-ext-zip, .att-ext-rar { background-color: #f5f3ff; color: #6d28d9; }
.att-ext-other { background-color: #f1f5f9; color: #475569; }

.att-tile-meta {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
}

.att-tile-filename {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

/* Floating Dock Compose Modal */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(4px);
  z-index: var(--z-backdrop);
  display: none;
  align-items: center;
  justify-content: center;
}
.modal-backdrop.open {
  display: flex;
}

.compose-dock-card {
  width: 700px;
  max-width: 95vw;
  height: 620px;
  max-height: 92vh;
  background-color: #ffffff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-modal);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border-default);
  animation: modalPop 180ms var(--ease-out);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.97) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.compose-topbar {
  padding: 14px 20px;
  background-color: #f8fafc;
  border-bottom: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.compose-topbar-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Compose Fields */
.compose-fields-container {
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  border-bottom: 1px solid #f1f5f9;
}

.compose-row {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  border-bottom: 1px solid #f1f5f9;
  position: relative;
  gap: 12px;
}

.compose-row:last-child {
  border-bottom: none;
}

.compose-label {
  width: 56px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
  user-select: none;
}

.compose-input-chips {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 28px;
}

.compose-autocomplete-input {
  flex: 1;
  min-width: 160px;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text-primary);
  padding: 4px 0;
}

.compose-autocomplete-input::placeholder {
  color: #94a3b8;
  font-size: 12.5px;
}

.compose-subject-input {
  flex: 1;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  padding: 4px 0;
}

.compose-subject-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
  font-size: 13px;
}

#btn-toggle-cc {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

#btn-toggle-cc:hover {
  background-color: var(--bg-surface-hover);
  color: var(--primary);
}

/* Recipient Token Chips */
.recipient-chip, .recipient-token {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  animation: modalPop 140ms ease-out;
}

.recipient-chip-text {
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recipient-chip-remove, .recipient-token-remove {
  background: none;
  border: none;
  color: #60a5fa;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 0;
  line-height: 1;
  transition: color var(--transition-fast);
}

.recipient-chip-remove:hover, .recipient-token-remove:hover {
  color: #ef4444;
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  right: 76px;
  width: 320px;
  max-height: 220px;
  overflow-y: auto;
  background-color: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.12);
  z-index: 1000;
  display: none;
}

.autocomplete-item {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f8fafc;
  transition: background-color var(--transition-fast);
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover {
  background-color: #eff6ff;
}

.autocomplete-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

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

/* Compose Body */
.compose-body-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  background-color: #ffffff;
}

.compose-textarea {
  flex: 1;
  width: 100%;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  resize: none;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-primary);
  min-height: 180px;
}

.compose-textarea::placeholder {
  color: #94a3b8;
}

/* Compose Attachments Dropzone */
.compose-attachments-bar {
  padding: 0 20px 12px;
  background-color: #ffffff;
}

.dropzone-area {
  border: 1.5px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 10px 16px;
  background-color: #f8fafc;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.dropzone-area:hover, .dropzone-area.dragover {
  background-color: #eff6ff;
  border-color: var(--primary);
  color: var(--primary);
}

/* Compose Footer */
.compose-footer {
  padding: 12px 20px;
  background-color: #f8fafc;
  border-top: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Storage Meter Bar */
.storage-meter-box {
  margin-top: 8px;
  padding: 8px;
  background-color: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
}
.storage-progress-track {
  height: 4px;
  background-color: var(--border-default);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 4px;
}
.storage-progress-bar {
  width: 14%;
  height: 100%;
  background-color: var(--primary);
  border-radius: var(--radius-full);
}

/* ==============================================================================
   Modern Toast Notifications System
   ============================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast,
.toast-pill {
  pointer-events: auto;
  min-width: 260px;
  max-width: 440px;
  padding: 10px 16px;
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: var(--text-xs);
  font-weight: 500;
  line-height: 1.4;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.3s var(--ease-spring) both;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.toast-removing,
.toast-pill.toast-removing {
  animation: toastOut 0.25s var(--ease-smooth) forwards;
}

.toast-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.toast-text {
  flex: 1;
}

.toast-close-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  transition: color var(--transition-fast);
}
.toast-close-btn:hover {
  color: #ffffff;
}

.toast.toast-success,
.toast-pill.toast-success {
  background: linear-gradient(135deg, #065f46 0%, #047857 100%);
  border: 1px solid #10b981;
}

.toast.toast-error,
.toast-pill.toast-error {
  background: linear-gradient(135deg, #991b1b 0%, #b91c1c 100%);
  border: 1px solid #ef4444;
}

.toast.toast-info,
.toast-pill.toast-info {
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%);
  border: 1px solid #3b82f6;
}

.toast.toast-warning,
.toast-pill.toast-warning {
  background: linear-gradient(135deg, #92400e 0%, #b45309 100%);
  border: 1px solid #f59e0b;
}

/* ==============================================================================
   Skeleton Loading State for Messages & Data Lists
   ============================================================================== */
.skeleton-list-container {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.skeleton-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  animation: fadeIn 0.3s ease;
}

.skeleton-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  flex-shrink: 0;
}

.skeleton-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-line {
  height: 10px;
  border-radius: var(--radius-xs);
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-line.w-80 { width: 80%; }
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-40 { width: 40%; }
.skeleton-line.w-90 { width: 90%; }
.skeleton-line.w-30 { width: 30%; }

.skeleton-row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ==============================================================================
   Keyboard Shortcuts Cheatsheet Modal & Kbd Badges
   ============================================================================== */
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  color: var(--text-primary);
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-bottom: 2px solid #94a3b8;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  vertical-align: middle;
  user-select: none;
}

.shortcuts-modal-card {
  width: 680px;
  max-width: 94vw;
  max-height: 88vh;
  background: #ffffff;
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalPop 180ms var(--ease-out);
}

.shortcuts-modal-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fafbfc;
}

.shortcuts-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (max-width: 640px) {
  .shortcuts-modal-body {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }
}

.shortcuts-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 14px 16px;
}

.shortcuts-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 12px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.shortcuts-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shortcut-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
}

.shortcut-desc {
  color: var(--text-secondary);
  font-weight: 500;
}

.shortcut-keys {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.shortcut-or, .shortcut-then {
  font-size: 10.5px;
  color: var(--text-muted);
  padding: 0 2px;
}

.shortcuts-modal-footer {
  padding: 12px 22px;
  background: #f1f5f9;
  border-top: 1px solid var(--border-default);
  font-size: 11.5px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.message-row-card.keyboard-focused {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

