/* ===== CSS VARIABLES ===== */
:root {
  --primary: #0078d4;
  --primary-hover: #106ebe;
  --secondary: #6b7280;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  
  --bg-base: #fafafa;
  --bg-elevated: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.7);
  --bg-overlay: rgba(0, 0, 0, 0.5);
  
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --text-inverse: #ffffff;
  
  --border-light: #e5e7eb;
  --border-medium: #d1d5db;
  
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --gradient-info: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  --gradient-warm: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --gradient-subtle: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.1);
  
  --blur-sm: 8px;
  --blur-md: 16px;
  --blur-lg: 24px;
  
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', 'Monaco', 'Cascadia Code', 'Courier New', monospace;
  
  --dock-height: 64px;
}

/* ===== GLOBAL STYLES ===== */
* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== LOGIN PAGE ===== */
.login-body {
  background: var(--gradient-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.login-card {
  background: var(--bg-glass);
  backdrop-filter: blur(var(--blur-lg));
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-glass);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-header {
  background: var(--gradient-primary);
  color: var(--text-inverse);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.login-form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.1);
}

.btn-login {
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--radius-full);
  padding: 14px 32px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all var(--transition-base);
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ===== UTILITY CLASSES ===== */
.icon-email { color: #14b8a6; }
.icon-ai { color: #facc15; }
.icon-profile { color: #ec4899; }
.icon-messages { color: #f97316; }
.icon-notes { color: #22c55e; }
.icon-documents { color: #3b82f6; }
.icon-calculator { color: #ef4444; }

.crypto-btc { color: #f7931a !important; }
.crypto-eth { color: #627eea !important; }
.crypto-sol { color: #9945ff !important; }
.crypto-sui { color: #4da2ff !important; }

/* ===== MODERN DESKTOP ===== */
.modern-desktop {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: var(--spacing-xl);
  padding-bottom: calc(var(--dock-height) + var(--spacing-xl));
}

.desktop-shortcuts {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--spacing-lg);
  justify-content: center;
  margin-bottom: var(--spacing-2xl);
  overflow-x: auto;
}

.desktop-shortcut {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-inverse);
  padding: var(--spacing-md);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(var(--blur-sm));
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.desktop-shortcut:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  color: var(--text-inverse);
}

.desktop-shortcut:active {
  transform: translateY(-2px);
}

.desktop-shortcut i {
  font-size: 32px;
  margin-bottom: var(--spacing-sm);
}

.desktop-shortcut .shortcut-label {
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  margin-top: var(--spacing-xs);
}

/* ===== MODERN DOCK ===== */
.modern-dock {
  position: fixed;
  bottom: var(--spacing-md);
  left: 50%;
  transform: translateX(-50%);
  height: var(--dock-height);
  background: var(--bg-glass);
  backdrop-filter: blur(var(--blur-lg));
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  z-index: 1050;
  display: flex;
  align-items: center;
  padding: 0 var(--spacing-md);
  gap: var(--spacing-sm);
}

.dock-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  cursor: pointer;
  color: var(--text-primary);
  background: transparent;
  border: none;
  position: relative;
}

.dock-item:hover {
  background: rgba(0, 0, 0, 0.05);
  transform: translateY(-4px);
}

.dock-item:active {
  transform: translateY(-2px);
}

.dock-item i {
  font-size: 24px;
}

.dock-separator {
  width: 1px;
  height: 32px;
  background: var(--border-light);
  margin: 0 var(--spacing-xs);
}

.dock-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--danger);
  color: white;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-elevated);
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-base);
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary);
}

/* ===== MODERN WIDGETS ===== */
.modern-widget {
  background: var(--bg-glass);
  backdrop-filter: blur(var(--blur-md));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-glass);
  overflow: hidden;
}

.widget-header {
  padding: var(--spacing-sm) var(--spacing-md);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.5);
}

.widget-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.widget-actions {
  display: flex;
  gap: var(--spacing-xs);
}

.widget-action-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.widget-action-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
}

.widget-content {
  padding: var(--spacing-md);
  max-height: 350px;
  overflow-y: auto;
}

/* ===== LAUNCHER MENU ===== */
.launcher-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(var(--blur-sm));
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn var(--transition-fast);
}

.launcher-overlay.active {
  display: flex;
}

.launcher-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(var(--blur-lg));
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  padding: var(--spacing-xl);
}

.launcher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--spacing-md);
}

.launcher-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text-primary);
  transition: all var(--transition-fast);
  background: rgba(255, 255, 255, 0.5);
}

.launcher-item:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
}

.launcher-item i {
  font-size: 32px;
  margin-bottom: var(--spacing-sm);
}

.launcher-item-label {
  font-size: 13px;
  font-weight: 500;
  text-align: center;
}

/* ===== LIST ITEMS ===== */
.message-item, .notification-item { 
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  padding: var(--spacing-md) var(--spacing-lg);
  margin-bottom: var(--spacing-sm);
  border: 1px solid var(--border-light);
  transition: all var(--transition-fast);
  position: relative;
}

.message-item:hover, .notification-item:hover {
  background: var(--bg-base);
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

.unread-message {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.05) 0%, var(--bg-elevated) 100%);
  border-left: 3px solid var(--info);
}

.unread-message:hover {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.1) 0%, var(--bg-base) 100%);
}

.unread-message .fa-circle {
  font-size: 8px !important;
  animation: pulse-animation 2s ease-in-out infinite;
}

.notification-unread {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.05) 0%, var(--bg-elevated) 100%);
  border-left: 3px solid var(--warning);
}

.notification-type-client_assigned { border-left-color: var(--info); }
.notification-type-task_assigned,
.notification-type-client_completed { border-left-color: var(--success); }
.notification-type-system { border-left-color: var(--secondary); }
.notification-type-message,
.notification-type-dashboard_post { border-left-color: #6f42c1; }
.notification-type-call_logged { border-left-color: #17a2b8; }

/* ===== ANIMATIONS ===== */
@keyframes pulse-animation {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.2); }
}

@keyframes slideInRight {
  from { transform: translateX(400px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== BADGES ===== */
.badge-modern {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  transition: all var(--transition-fast);
}

.client-type-lead {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  border: 1px solid #fbbf24;
}

.client-type-co_empl {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e40af;
  border: 1px solid #60a5fa;
}

.client-type-co_ceo {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #065f46;
  border: 1px solid #34d399;
}

/* Client status */
.client-status-unassigned {
  background: linear-gradient(135deg, #e2e3e5 0%, #d6d8db 100%);
  color: #383d41;
  border: 1px solid #6c757d;
}

.client-status-in_progress {
  background: linear-gradient(135deg, #d1ecf1 0%, #b8daff 100%);
  color: #004085;
  border: 1px solid #17a2b8;
}

.client-status-completed {
  background: var(--gradient-green);
  color: #155724;
  border: 1px solid #28a745;
}

/* Role badges */
.role-badge-super_admin {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: #ffffff;
  border: 2px solid #ffc107;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.role-badge-admin {
  background: linear-gradient(135deg, #fd7e14 0%, #e8590c 100%);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.role-badge-manager {
  background: linear-gradient(135deg, #28a745 0%, #218838 100%);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.role-badge-staff {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Call status badges */
.call-status-completed {
  background: linear-gradient(135deg, #51cf66, #2b8a3e);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

.call-status-connected {
  background: linear-gradient(135deg, #4dabf7, #1c7ed6);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

.call-status-failed {
  background: linear-gradient(135deg, #ff6b6b, #c92a2a);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

.call-status-no_answer,
.call-status-busy {
  background: linear-gradient(135deg, #ffd43b, #fab005);
  color: #2d3436;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

/* ===== REUSABLE AVATARS ===== */
.avatar-base {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--gradient-purple);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.client-avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 14px;
  margin-right: 8px;
}

.user-avatar-large {
  width: 48px;
  height: 48px;
  font-size: 20px;
  margin-right: 12px;
}

.profile-avatar-large {
  width: 120px;
  height: 120px;
  font-size: 48px;
  margin: 0 auto 20px;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.sender-avatar,
.recipient-avatar {
  width: 48px;
  height: 48px;
  font-size: 20px;
  margin-right: 16px;
}

.recipient-avatar {
  width: 32px;
  height: 32px;
  font-size: 14px;
  margin-right: 10px;
}

/* Online indicator */
.online-indicator,
.online-indicator-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #28a745;
  margin-right: 6px;
  box-shadow: 0 0 4px rgba(40, 167, 69, 0.5);
  animation: pulse-animation 2s ease-in-out infinite;
}

/* ===== REUSABLE TIMELINE ===== */
.timeline-base {
  position: relative;
  padding-left: 30px;
  margin-left: 12px;
  border-left: 3px solid #dee2e6;
}

.timeline-item {
  position: relative;
  padding: 12px;
  margin-bottom: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  transition: var(--transition-base);
}

.timeline-item:hover {
  background: #e9ecef;
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -34px;
  top: 12px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #2196f3;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Apply to specific timelines */
.call-history-timeline,
.assignment-history-timeline,
.activity-timeline {
  position: relative;
  padding-left: 30px;
}

.call-history-timeline::before,
.assignment-history-timeline::before,
.activity-timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #667eea, #e0e0e0);
}

.call-history-item,
.assignment-history-item,
.activity-item {
  position: relative;
  padding: 16px;
  margin-bottom: 16px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  transition: var(--transition-base);
}

.call-history-item:hover,
.assignment-history-item:hover,
.activity-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

.call-history-item::before,
.assignment-history-item::before,
.activity-item::before {
  content: '';
  position: absolute;
  left: -26px;
  top: 20px;
  width: 12px;
  height: 12px;
  background: #667eea;
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #e0e0e0;
}

.call-history-item { border-left: 3px solid #17a2b8; }
.call-history-item::before { background: #17a2b8; }

.assignment-history-item { border-left: 3px solid #2196f3; }
.assignment-history-item::before { background: #2196f3; }

.activity-item-call::before { background: #28a745; }
.activity-item-login::before { background: #17a2b8; }

/* ===== MESSAGES COMPOSE ===== */
.recipient-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 6px;
  min-height: 42px;
  align-items: center;
}

.recipient-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--gradient-blue);
  border: 1px solid #2196f3;
  border-radius: 20px;
  font-size: 14px;
  color: #1976d2;
  transition: var(--transition-base);
}

.recipient-chip:hover {
  background: linear-gradient(135deg, #bbdefb 0%, #90caf9 100%);
  transform: scale(1.05);
}

.recipient-chip .remove-chip {
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  line-height: 1;
  color: #1976d2;
  transition: color 0.2s ease;
}

.recipient-chip .remove-chip:hover {
  color: #d32f2f;
}

.recipient-list {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 8px;
}

.recipient-list-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.recipient-list-item:hover {
  background: #f8f9fa;
}

.recipient-list-item input[type="checkbox"] {
  margin-right: 10px;
  cursor: pointer;
  width: 18px;
  height: 18px;
}

.recipient-list-item label {
  cursor: pointer;
  margin: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.recipient-search {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 2px solid #dee2e6;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.recipient-search:focus {
  border-color: #2196f3;
  outline: none;
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

/* Form validation */
.form-control.is-valid-live {
  border-color: #28a745;
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid-live {
  border-color: #dc3545;
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.char-count {
  font-weight: 600;
  transition: color 0.3s ease;
}

.char-count.count-good { color: #28a745; }
.char-count.count-warning { color: #ffc107; }
.char-count.count-danger { color: #dc3545; }

/* ===== MESSAGE VIEW ===== */
.message-view-card {
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  border: 1px solid #e9ecef;
  transition: box-shadow 0.3s ease;
}

.message-view-card:hover {
  box-shadow: var(--shadow-lg);
}

.message-view-card .card-header {
  background: var(--gradient-gray);
  border-bottom: 2px solid #dee2e6;
  padding: 20px;
}

.message-content {
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  padding: 20px;
}

.message-quote {
  border-left: 4px solid #dee2e6;
  padding-left: 16px;
  margin-left: 8px;
  font-style: italic;
  color: #6c757d;
  background: #f8f9fa;
  padding: 12px 12px 12px 16px;
  border-radius: 4px;
  margin-top: 16px;
}

.message-sidebar-sticky {
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e0 #f8f9fa;
}

.recipient-status-read {
  color: #28a745;
  font-weight: 600;
}

.recipient-status-unread {
  color: #6c757d;
  font-weight: 400;
}

.conversation-thread {
  position: relative;
  padding-left: 24px;
  margin-left: 12px;
  border-left: 3px solid #dee2e6;
}

.conversation-thread::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #2196f3;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.thread-message-item {
  padding: 12px;
  margin-bottom: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 3px solid #2196f3;
  transition: var(--transition-base);
}

.thread-message-item:hover {
  background: #e9ecef;
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

/* ===== NOTES ===== */
.notes-sidebar,
.notes-editor {
  height: calc(100vh - 180px);
  border-radius: 8px;
}

.notes-sidebar {
  box-shadow: var(--shadow-md);
  max-height: calc(100vh - 150px);
  overflow: hidden;
}

.notes-list {
  max-height: calc(100vh - 350px);
  overflow-y: auto;
}

.note-list-item {
  background: #ffffff;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 8px;
  border-left: 4px solid #dee2e6;
  cursor: pointer;
  transition: var(--transition-base);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.note-list-item:hover {
  background: #f8f9fa;
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.note-list-item.note-active {
  background: var(--gradient-blue);
  border-left: 4px solid #2196f3;
  box-shadow: 0 3px 10px rgba(33, 150, 243, 0.15);
}

.note-type-note { border-left-color: #ffc107; }
.note-type-todo { border-left-color: #28a745; }

.note-list-item.note-active.note-type-note {
  background: var(--gradient-yellow);
  border-left-color: #ffc107;
}

.note-list-item.note-active.note-type-todo {
  background: var(--gradient-green);
  border-left-color: #28a745;
}

.todo-items {
  max-height: 400px;
  overflow-y: auto;
}

.todo-item {
  background: #f8f9fa;
  padding: 8px;
  border-radius: 4px;
  border: 1px solid #dee2e6;
}

.todo-item input[type="checkbox"] {
  cursor: pointer;
}

/* ===== WALLET MANAGEMENT ===== */
.wallet-card {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 0;
  margin-bottom: 16px;
  transition: var(--transition-base);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.wallet-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.wallet-card-fresh { border-left: 4px solid #28a745; }
.wallet-card-used { border-left: 4px solid #6c757d; }

.wallet-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--gradient-gray);
  border-bottom: 1px solid #e0e0e0;
}

.wallet-card-header i {
  font-size: 20px;
  color: #667eea;
}

.wallet-card-body {
  padding: 16px;
}

.wallet-address {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  word-break: break-all;
  background: #f8f9fa;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #e9ecef;
  margin-bottom: 12px;
  color: #495057;
  font-weight: 500;
}

.wallet-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.wallet-meta small {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.wallet-card-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: #fafbfc;
  border-top: 1px solid #e0e0e0;
  justify-content: flex-end;
}

.wallet-card-actions .btn {
  flex: 0 1 auto;
  min-width: 80px;
}

/* ===== DOCUMENT LIBRARY ===== */
.document-card {
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
  height: 100%;
  overflow: hidden;
}

.document-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: #2196f3;
}

.document-card-icon {
  text-align: center;
  padding: 20px;
  font-size: 48px;
}

.file-type-pdf .document-card-icon { color: #dc3545; }
.file-type-word .document-card-icon { color: #2b579a; }
.file-type-excel .document-card-icon { color: #217346; }
.file-type-image .document-card-icon { color: #6f42c1; }
.file-type-code .document-card-icon { color: #fd7e14; }
.file-type-archive .document-card-icon { color: #6c757d; }
.file-type-text .document-card-icon { color: #17a2b8; }
.file-type-other .document-card-icon { color: #6c757d; }

.document-card-body {
  padding: 16px;
}

.document-card-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-card-description {
  font-size: 13px;
  color: #6c757d;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.document-card-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: #fafbfc;
  border-top: 1px solid #e0e0e0;
  justify-content: space-between;
}

/* ===== CALCULATOR ===== */
.calculator-container {
  max-width: 360px;
  margin: 0 auto;
  background: var(--gradient-purple);
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.calculator-titlebar {
  color: white;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
}

.calculator-display {
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  padding: 24px 16px;
  text-align: right;
  font-size: 36px;
  font-weight: 600;
  color: #2d3436;
  margin-bottom: 16px;
  min-height: 70px;
  word-wrap: break-word;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
}

.calculator-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.calc-btn {
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 8px;
  padding: 20px;
  font-size: 20px;
  font-weight: 600;
  color: #2d3436;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.calc-btn:hover {
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.calc-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.calc-btn.operator {
  background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
  color: white;
}

.calc-btn.operator:hover {
  background: linear-gradient(135deg, #ffe5b4 0%, #1f6391 100%);
}

.calc-btn.clear {
  background: linear-gradient(135deg, #ff6b6b 0%, #c92a2a 100%);
  color: white;
}

.calc-btn.clear:hover {
  background: linear-gradient(135deg, #ff7979 0%, #d63031 100%);
}

.calc-btn.equals {
  background: linear-gradient(135deg, #51cf66 0%, #2b8a3e 100%);
  color: white;
}

.calc-btn.equals:hover {
  background: linear-gradient(135deg, #63e478 0%, #37b24d 100%);
}

.calc-btn.zero {
  grid-column: span 2;
}

.calculator-info {
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
  padding: 12px;
  border-radius: 8px;
  font-size: 12px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ===== CLIENT LIST ===== */
.client-table-container {
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.table tbody tr {
  transition: var(--transition-base);
}

.table tbody tr:hover {
  background-color: #f8f9fa;
  transform: scale(1.01);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

/* ===== UNIVERSAL ENHANCEMENTS ===== */
.btn {
  transition: var(--transition-base);
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.empty-state-enhanced {
  text-align: center;
  padding: 60px 20px;
  color: #6c757d;
}

.empty-state-enhanced i {
  font-size: 80px;
  opacity: 0.3;
  margin-bottom: 24px;
  display: block;
}

.empty-state-enhanced h5 {
  font-size: 24px;
  margin-bottom: 12px;
  color: #495057;
}

.empty-state-enhanced p {
  font-size: 16px;
  margin-bottom: 24px;
}

.timestamp-natural {
  color: #6c757d;
  font-size: 14px;
  font-weight: 500;
}

.copy-btn {
  cursor: pointer;
  color: #6c757d;
  transition: color 0.3s ease;
}

.copy-btn:hover {
  color: #2196f3;
}

/* ===== FOCUS STATES ===== */
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ===== PAGE HEADERS ===== */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-xl);
  padding: var(--spacing-lg) 0;
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

.page-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.page-actions {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

/* ===== BOOTSTRAP OVERRIDES ===== */
.btn {
  border-radius: var(--radius-md);
  padding: 10px 20px;
  font-weight: 500;
  transition: all var(--transition-fast);
  border: none;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg-base) 100%);
  border-bottom: 1px solid var(--border-light);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: var(--spacing-lg);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.1);
}

.table {
  border-radius: var(--radius-md);
  overflow: hidden;
}

.table thead th {
  background: var(--bg-base);
  border-bottom: 2px solid var(--border-medium);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.table tbody tr {
  transition: all var(--transition-fast);
}

.table tbody tr:hover {
  background: var(--bg-base);
  transform: scale(1.01);
}

.badge {
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-weight: 600;
  font-size: 12px;
}

.alert {
  border-radius: var(--radius-lg);
  border: none;
  box-shadow: var(--shadow-sm);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .modern-dock {
    width: calc(100% - 32px);
    padding: 0 var(--spacing-sm);
    gap: var(--spacing-xs);
  }

  .dock-item {
    width: 40px;
    height: 40px;
  }

  .dock-item i {
    font-size: 20px;
  }

  .desktop-shortcuts {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-title {
    font-size: 24px;
  }

  .modern-desktop > .container-fluid {
    padding: 10px;
  }
}
