@charset "UTF-8";
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
:root {
  --font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", Segoe UI Symbol, "Noto Color Emoji";
  --font-family-mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
  --primary-color: #ff6600;
  --primary-hover: #e65c00;
  --primary-dark: #cc5200;
  --primary-rgb: 255, 102, 0;
  --primary-gradient: linear-gradient(135deg, #ff6600 0%, #ff8533 100%);
  --secondary-color: #6b7280;
  --secondary-hover: #4b5563;
  --secondary-dark: #374151;
  --success-color: #10b981;
  --success-hover: #059669;
  --success-dark: #047857;
  --success-rgb: 16, 185, 129;
  --success-gradient: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  --warning-color: #f59e0b;
  --warning-hover: #d97706;
  --warning-dark: #b45309;
  --warning-rgb: 245, 158, 11;
  --warning-gradient: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  --danger-color: #ef4444;
  --danger-hover: #dc2626;
  --danger-dark: #b91c1c;
  --danger-rgb: 239, 68, 68;
  --danger-gradient: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
  --info-color: #3b82f6;
  --info-hover: #2563eb;
  --info-dark: #1d4ed8;
  --info-rgb: 59, 130, 246;
  --info-gradient: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
  --bg-body: #f8fafc;
  --bg-primary: #ffffff;
  --bg-secondary: #f1f5f9;
  --bg-hover: #f8fafc;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  --border-dark: #cbd5e1;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-width: 80px;
  --sidebar-width-expanded: 240px;
  --header-height: 64px;
  --container-max-width: 1200px;
}

.theme-dark {
  --bg-body: #0b1220;
  --bg-primary: #0f172a;
  --bg-secondary: #111827;
  --bg-hover: #0b1220;
  --bg-card: #0f172a;
  --bg-sidebar: #0f172a;
  --text-primary: #e5e7eb;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --border-color: #1f2937;
  --border-light: #111827;
  --border-dark: #374151;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.35), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.35);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.45), 0 8px 10px -6px rgb(0 0 0 / 0.4);
}

.theme-light {
  --bg-body: #f8fafc;
  --bg-primary: #ffffff;
  --bg-secondary: #f1f5f9;
  --bg-hover: #f1f5f9;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  --border-dark: #cbd5e1;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.06);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.05);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.04);
}

.theme-auto {
  --bg-body: #f8fafc;
  --bg-primary: #ffffff;
  --bg-secondary: #f1f5f9;
  --bg-hover: #f1f5f9;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  --border-dark: #cbd5e1;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.06);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.05);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.04);
}

@media (prefers-color-scheme: dark) {
  .theme-auto {
    --bg-body: #0b1220;
    --bg-primary: #0f172a;
    --bg-secondary: #111827;
    --bg-hover: #0b1220;
    --bg-card: #0f172a;
    --bg-sidebar: #0f172a;
    --text-primary: #e5e7eb;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-light: #64748b;
    --border-color: #1f2937;
    --border-light: #111827;
    --border-dark: #374151;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.35), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.35);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.45), 0 8px 10px -6px rgb(0 0 0 / 0.4);
  }
}
.settings-section {
  max-width: 400px;
  margin: 0 auto;
  background: var(--bg-secondary);
  padding: 32px 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.settings-section h3 {
  margin-bottom: 16px;
  text-align: center;
  color: var(--text-primary);
}
.settings-section label {
  font-weight: 600;
  margin-bottom: 4px;
  display: block;
  color: var(--text-primary);
}
.settings-section input {
  margin-bottom: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  font-family: var(--font-family);
  font-size: 16px;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: var(--transition);
}
.settings-section input:focus {
  border: 1.5px solid var(--primary-color);
  outline: none;
}
.settings-section .add-order {
  width: 100%;
  margin-top: 10px;
  margin-bottom: 0;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px;
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.settings-section .add-order:hover {
  background: var(--primary-hover);
}
.settings-section .add-order--small {
  width: auto;
  min-width: 120px;
  margin: 0;
  padding: 10px 22px;
  font-size: 15px;
}
.settings-section .flash {
  margin-top: 16px;
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 15px;
  text-align: center;
}
.settings-section .flash.error {
  background: rgba(var(--danger-rgb), 0.1);
  color: var(--danger-color);
  border: 1px solid rgba(var(--danger-rgb), 0.3);
}
.settings-section .flash.success {
  background: rgba(var(--success-rgb), 0.1);
  color: var(--success-color);
  border: 1px solid rgba(var(--success-rgb), 0.3);
}
.settings-section .flash.warning {
  background: rgba(var(--warning-rgb), 0.1);
  color: var(--warning-color);
  border: 1px solid rgba(var(--warning-rgb), 0.3);
}

#tg-step-phone, #tg-step-code, #tg-step-password {
  margin-bottom: 0;
}

.settings-menu {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  border-bottom: 1.5px solid var(--border-color);
  padding-bottom: 8px;
}

.settings-tab {
  background: none;
  border: none;
  font-family: var(--font-family);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 20px 8px 0;
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  transition: var(--transition);
}

.settings-tab.active {
  color: var(--primary-color);
  border-bottom: 2.5px solid var(--primary-color);
}

.settings-accounts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

#tg-accounts-list {
  margin-bottom: 24px;
}

.tg-account-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
}

.tg-account-phone {
  font-weight: 600;
  color: var(--text-primary);
}

.tg-account-session {
  font-size: 13px;
  color: var(--text-muted);
}

.tg-service-toggle {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  outline: none;
  margin-right: 12px;
}
.tg-service-toggle .toggle-switch {
  width: 38px;
  height: 22px;
  background: var(--border-color);
  border-radius: 12px;
  position: relative;
  transition: var(--transition);
  margin-right: 8px;
}
.tg-service-toggle .toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: var(--bg-primary);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.tg-service-toggle.active .toggle-switch {
  background: var(--success-color);
}
.tg-service-toggle.active .toggle-knob {
  left: 18px;
  background: var(--success-color);
}
.tg-service-toggle.inactive .toggle-switch {
  background: var(--border-color);
}
.tg-service-toggle.inactive .toggle-knob {
  left: 2px;
  background: var(--bg-primary);
}

.tg-account-delete {
  background: none;
  border: none;
  color: var(--danger-color);
  font-size: 1.2em;
  cursor: pointer;
  margin-left: 10px;
  transition: var(--transition);
}
.tg-account-delete:hover {
  color: var(--danger-hover);
}

.modal-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: var(--bg-primary);
  border-radius: 12px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  animation: modalSlideIn 0.3s ease-out;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--border-color);
}
.modal-header h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}
.modal-close:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
}

.auth-methods {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.auth-method {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  flex: 1;
  padding: 20px 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-primary);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}
.auth-method:hover {
  border-color: var(--primary-color);
  background: var(--bg-secondary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.auth-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.auth-method h4 {
  margin: 0 0 4px 0;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
}

.auth-method p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.4;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
:root {
  --font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", Segoe UI Symbol, "Noto Color Emoji";
  --font-family-mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
  --primary-color: #ff6600;
  --primary-hover: #e65c00;
  --primary-dark: #cc5200;
  --primary-rgb: 255, 102, 0;
  --primary-gradient: linear-gradient(135deg, #ff6600 0%, #ff8533 100%);
  --secondary-color: #6b7280;
  --secondary-hover: #4b5563;
  --secondary-dark: #374151;
  --success-color: #10b981;
  --success-hover: #059669;
  --success-dark: #047857;
  --success-rgb: 16, 185, 129;
  --success-gradient: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  --warning-color: #f59e0b;
  --warning-hover: #d97706;
  --warning-dark: #b45309;
  --warning-rgb: 245, 158, 11;
  --warning-gradient: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  --danger-color: #ef4444;
  --danger-hover: #dc2626;
  --danger-dark: #b91c1c;
  --danger-rgb: 239, 68, 68;
  --danger-gradient: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
  --info-color: #3b82f6;
  --info-hover: #2563eb;
  --info-dark: #1d4ed8;
  --info-rgb: 59, 130, 246;
  --info-gradient: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
  --bg-body: #f8fafc;
  --bg-primary: #ffffff;
  --bg-secondary: #f1f5f9;
  --bg-hover: #f8fafc;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  --border-dark: #cbd5e1;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-width: 80px;
  --sidebar-width-expanded: 240px;
  --header-height: 64px;
  --container-max-width: 1200px;
}

.theme-dark {
  --bg-body: #0b1220;
  --bg-primary: #0f172a;
  --bg-secondary: #111827;
  --bg-hover: #0b1220;
  --bg-card: #0f172a;
  --bg-sidebar: #0f172a;
  --text-primary: #e5e7eb;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --border-color: #1f2937;
  --border-light: #111827;
  --border-dark: #374151;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.35), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.35);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.45), 0 8px 10px -6px rgb(0 0 0 / 0.4);
}

.theme-light {
  --bg-body: #f8fafc;
  --bg-primary: #ffffff;
  --bg-secondary: #f1f5f9;
  --bg-hover: #f1f5f9;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  --border-dark: #cbd5e1;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.06);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.05);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.04);
}

.theme-auto {
  --bg-body: #f8fafc;
  --bg-primary: #ffffff;
  --bg-secondary: #f1f5f9;
  --bg-hover: #f1f5f9;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  --border-dark: #cbd5e1;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.06);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.05);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.04);
}

@media (prefers-color-scheme: dark) {
  .theme-auto {
    --bg-body: #0b1220;
    --bg-primary: #0f172a;
    --bg-secondary: #111827;
    --bg-hover: #0b1220;
    --bg-card: #0f172a;
    --bg-sidebar: #0f172a;
    --text-primary: #e5e7eb;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-light: #64748b;
    --border-color: #1f2937;
    --border-light: #111827;
    --border-dark: #374151;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.35), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.35);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.45), 0 8px 10px -6px rgb(0 0 0 / 0.4);
  }
}
.settings-section {
  max-width: 400px;
  margin: 0 auto;
  background: var(--bg-secondary);
  padding: 32px 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.settings-section h3 {
  margin-bottom: 16px;
  text-align: center;
  color: var(--text-primary);
}
.settings-section label {
  font-weight: 600;
  margin-bottom: 4px;
  display: block;
  color: var(--text-primary);
}
.settings-section input {
  margin-bottom: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  font-family: var(--font-family);
  font-size: 16px;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: var(--transition);
}
.settings-section input:focus {
  border: 1.5px solid var(--primary-color);
  outline: none;
}
.settings-section .add-order {
  width: 100%;
  margin-top: 10px;
  margin-bottom: 0;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px;
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.settings-section .add-order:hover {
  background: var(--primary-hover);
}
.settings-section .add-order--small {
  width: auto;
  min-width: 120px;
  margin: 0;
  padding: 10px 22px;
  font-size: 15px;
}
.settings-section .flash {
  margin-top: 16px;
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 15px;
  text-align: center;
}
.settings-section .flash.error {
  background: rgba(var(--danger-rgb), 0.1);
  color: var(--danger-color);
  border: 1px solid rgba(var(--danger-rgb), 0.3);
}
.settings-section .flash.success {
  background: rgba(var(--success-rgb), 0.1);
  color: var(--success-color);
  border: 1px solid rgba(var(--success-rgb), 0.3);
}
.settings-section .flash.warning {
  background: rgba(var(--warning-rgb), 0.1);
  color: var(--warning-color);
  border: 1px solid rgba(var(--warning-rgb), 0.3);
}

#tg-step-phone, #tg-step-code, #tg-step-password {
  margin-bottom: 0;
}

.settings-menu {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  border-bottom: 1.5px solid var(--border-color);
  padding-bottom: 8px;
}

.settings-tab {
  background: none;
  border: none;
  font-family: var(--font-family);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 20px 8px 0;
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  transition: var(--transition);
}

.settings-tab.active {
  color: var(--primary-color);
  border-bottom: 2.5px solid var(--primary-color);
}

.settings-accounts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

#tg-accounts-list {
  margin-bottom: 24px;
}

.tg-account-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
}

.tg-account-phone {
  font-weight: 600;
  color: var(--text-primary);
}

.tg-account-session {
  font-size: 13px;
  color: var(--text-muted);
}

.tg-service-toggle {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  outline: none;
  margin-right: 12px;
}
.tg-service-toggle .toggle-switch {
  width: 38px;
  height: 22px;
  background: var(--border-color);
  border-radius: 12px;
  position: relative;
  transition: var(--transition);
  margin-right: 8px;
}
.tg-service-toggle .toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: var(--bg-primary);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.tg-service-toggle.active .toggle-switch {
  background: var(--success-color);
}
.tg-service-toggle.active .toggle-knob {
  left: 18px;
  background: var(--success-color);
}
.tg-service-toggle.inactive .toggle-switch {
  background: var(--border-color);
}
.tg-service-toggle.inactive .toggle-knob {
  left: 2px;
  background: var(--bg-primary);
}

.tg-account-delete {
  background: none;
  border: none;
  color: var(--danger-color);
  font-size: 1.2em;
  cursor: pointer;
  margin-left: 10px;
  transition: var(--transition);
}
.tg-account-delete:hover {
  color: var(--danger-hover);
}

.modal-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: var(--bg-primary);
  border-radius: 12px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  animation: modalSlideIn 0.3s ease-out;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--border-color);
}
.modal-header h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}
.modal-close:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
}

.auth-methods {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.auth-method {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  flex: 1;
  padding: 20px 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-primary);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}
.auth-method:hover {
  border-color: var(--primary-color);
  background: var(--bg-secondary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.auth-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.auth-method h4 {
  margin: 0 0 4px 0;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
}

.auth-method p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.4;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

@media (max-width: 768px) {
  body {
    font-size: 15px;
  }
}
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.5em;
  color: var(--text-primary);
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.75rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.125rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}
a:hover {
  color: var(--primary-hover);
}

ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.25rem;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}
.btn.btn-primary {
  background: var(--primary-color);
  color: white;
  border-color: transparent;
}
.btn.btn-primary:hover:not(:disabled) {
  filter: brightness(0.95);
  transform: translateY(-1px);
}
.btn.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}
.btn.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--border-color);
}
.btn.btn-secondary:hover:not(:disabled) {
  filter: brightness(0.95);
  transform: translateY(-1px);
}
.btn.btn-secondary:active:not(:disabled) {
  transform: translateY(0);
}
.btn.btn-success {
  background: var(--success-color);
  color: white;
  border-color: transparent;
}
.btn.btn-success:hover:not(:disabled) {
  filter: brightness(0.95);
  transform: translateY(-1px);
}
.btn.btn-success:active:not(:disabled) {
  transform: translateY(0);
}
.btn.btn-warning {
  background: var(--warning-color);
  color: white;
  border-color: transparent;
}
.btn.btn-warning:hover:not(:disabled) {
  filter: brightness(0.95);
  transform: translateY(-1px);
}
.btn.btn-warning:active:not(:disabled) {
  transform: translateY(0);
}
.btn.btn-danger {
  background: var(--danger-color);
  color: white;
  border-color: transparent;
}
.btn.btn-danger:hover:not(:disabled) {
  filter: brightness(0.95);
  transform: translateY(-1px);
}
.btn.btn-danger:active:not(:disabled) {
  transform: translateY(0);
}
.btn.btn-info {
  background: var(--info-color);
  color: white;
  border-color: transparent;
}
.btn.btn-info:hover:not(:disabled) {
  filter: brightness(0.95);
  transform: translateY(-1px);
}
.btn.btn-info:active:not(:disabled) {
  transform: translateY(0);
}
.btn.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}
.btn.btn-lg {
  padding: 12px 24px;
  font-size: 16px;
}
.btn.btn-outline-primary {
  background: transparent;
  color: var(--primary-color);
  border-color: var(--primary-color);
}
.btn.btn-outline-primary:hover:not(:disabled) {
  filter: brightness(0.95);
  transform: translateY(-1px);
}
.btn.btn-outline-primary:active:not(:disabled) {
  transform: translateY(0);
}
.btn.btn-outline-primary:hover {
  background: var(--primary-color);
  color: white;
}
.btn.btn-outline-secondary {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-color);
}
.btn.btn-outline-secondary:hover:not(:disabled) {
  filter: brightness(0.95);
  transform: translateY(-1px);
}
.btn.btn-outline-secondary:active:not(:disabled) {
  transform: translateY(0);
}
.btn.btn-outline-secondary:hover {
  background: var(--bg-secondary);
}
.btn.btn-outline-success {
  background: transparent;
  color: var(--success-color);
  border-color: var(--success-color);
}
.btn.btn-outline-success:hover:not(:disabled) {
  filter: brightness(0.95);
  transform: translateY(-1px);
}
.btn.btn-outline-success:active:not(:disabled) {
  transform: translateY(0);
}
.btn.btn-outline-success:hover {
  background: var(--success-color);
  color: white;
}
.btn.btn-outline-warning {
  background: transparent;
  color: var(--warning-color);
  border-color: var(--warning-color);
}
.btn.btn-outline-warning:hover:not(:disabled) {
  filter: brightness(0.95);
  transform: translateY(-1px);
}
.btn.btn-outline-warning:active:not(:disabled) {
  transform: translateY(0);
}
.btn.btn-outline-warning:hover {
  background: var(--warning-color);
  color: white;
}
.btn.btn-outline-danger {
  background: transparent;
  color: var(--danger-color);
  border-color: var(--danger-color);
}
.btn.btn-outline-danger:hover:not(:disabled) {
  filter: brightness(0.95);
  transform: translateY(-1px);
}
.btn.btn-outline-danger:active:not(:disabled) {
  transform: translateY(0);
}
.btn.btn-outline-danger:hover {
  background: var(--danger-color);
  color: white;
}
.btn.btn-outline-info {
  background: transparent;
  color: var(--info-color);
  border-color: var(--info-color);
}
.btn.btn-outline-info:hover:not(:disabled) {
  filter: brightness(0.95);
  transform: translateY(-1px);
}
.btn.btn-outline-info:active:not(:disabled) {
  transform: translateY(0);
}
.btn.btn-outline-info:hover {
  background: var(--info-color);
  color: white;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}
.form-control::placeholder {
  color: var(--text-muted);
}
.form-control:disabled {
  background: var(--bg-secondary);
  color: var(--text-muted);
  cursor: not-allowed;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-group {
  margin-bottom: 1rem;
}

.form-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.form-check input[type=checkbox],
.form-check input[type=radio] {
  width: auto;
  margin: 0;
}
.form-check label {
  margin: 0;
  cursor: pointer;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.card {
  padding: 1.5rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}
.card-header h3, .card-header h4, .card-header h5, .card-header h6 {
  margin: 0;
}

.card-footer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.table th {
  background: var(--bg-secondary);
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}
.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
}
.table td:last-child {
  border-bottom: none;
}
.table tbody tr:hover {
  background: var(--bg-hover);
}

@media (max-width: 768px) {
  .table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
}
.alert {
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  border: 1px solid transparent;
}
.alert.alert-success {
  background: rgba(var(--success-rgb), 0.1);
  color: var(--success-color);
  border-color: rgba(var(--success-rgb), 0.2);
}
.alert.alert-warning {
  background: rgba(var(--warning-rgb), 0.1);
  color: var(--warning-color);
  border-color: rgba(var(--warning-rgb), 0.2);
}
.alert.alert-danger {
  background: rgba(var(--danger-rgb), 0.1);
  color: var(--danger-color);
  border-color: rgba(var(--danger-rgb), 0.2);
}
.alert.alert-info {
  background: rgba(var(--info-rgb), 0.1);
  color: var(--info-color);
  border-color: rgba(var(--info-rgb), 0.2);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
}
.badge.badge-primary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  background: rgba(var(--primary-color), 0.1);
  color: var(--primary-color);
  border: 1px solid rgba(var(--primary-color), 0.2);
}
.badge.badge-success {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  background: rgba(var(--success-color), 0.1);
  color: var(--success-color);
  border: 1px solid rgba(var(--success-color), 0.2);
}
.badge.badge-warning {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  background: rgba(var(--warning-color), 0.1);
  color: var(--warning-color);
  border: 1px solid rgba(var(--warning-color), 0.2);
}
.badge.badge-danger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  background: rgba(var(--danger-color), 0.1);
  color: var(--danger-color);
  border: 1px solid rgba(var(--danger-color), 0.2);
}
.badge.badge-info {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  background: rgba(var(--info-color), 0.1);
  color: var(--info-color);
  border: 1px solid rgba(var(--info-color), 0.2);
}

.m-0 {
  margin: 0 !important;
}

.m-1 {
  margin: 0.25rem !important;
}

.m-2 {
  margin: 0.5rem !important;
}

.m-3 {
  margin: 1rem !important;
}

.m-4 {
  margin: 1.5rem !important;
}

.m-5 {
  margin: 3rem !important;
}

.mt-0 {
  margin-top: 0 !important;
}

.mt-1 {
  margin-top: 0.25rem !important;
}

.mt-2 {
  margin-top: 0.5rem !important;
}

.mt-3 {
  margin-top: 1rem !important;
}

.mt-4 {
  margin-top: 1.5rem !important;
}

.mt-5 {
  margin-top: 3rem !important;
}

.mb-0 {
  margin-bottom: 0 !important;
}

.mb-1 {
  margin-bottom: 0.25rem !important;
}

.mb-2 {
  margin-bottom: 0.5rem !important;
}

.mb-3 {
  margin-bottom: 1rem !important;
}

.mb-4 {
  margin-bottom: 1.5rem !important;
}

.mb-5 {
  margin-bottom: 3rem !important;
}

.p-0 {
  padding: 0 !important;
}

.p-1 {
  padding: 0.25rem !important;
}

.p-2 {
  padding: 0.5rem !important;
}

.p-3 {
  padding: 1rem !important;
}

.p-4 {
  padding: 1.5rem !important;
}

.p-5 {
  padding: 3rem !important;
}

.pt-0 {
  padding-top: 0 !important;
}

.pt-1 {
  padding-top: 0.25rem !important;
}

.pt-2 {
  padding-top: 0.5rem !important;
}

.pt-3 {
  padding-top: 1rem !important;
}

.pt-4 {
  padding-top: 1.5rem !important;
}

.pt-5 {
  padding-top: 3rem !important;
}

.pb-0 {
  padding-bottom: 0 !important;
}

.pb-1 {
  padding-bottom: 0.25rem !important;
}

.pb-2 {
  padding-bottom: 0.5rem !important;
}

.pb-3 {
  padding-bottom: 1rem !important;
}

.pb-4 {
  padding-bottom: 1.5rem !important;
}

.pb-5 {
  padding-bottom: 3rem !important;
}

.text-center {
  text-align: center !important;
}

.text-left {
  text-align: left !important;
}

.text-right {
  text-align: right !important;
}

.text-primary {
  color: var(--primary-color) !important;
}

.text-success {
  color: var(--success-color) !important;
}

.text-warning {
  color: var(--warning-color) !important;
}

.text-danger {
  color: var(--danger-color) !important;
}

.text-info {
  color: var(--info-color) !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.d-none {
  display: none !important;
}

.d-block {
  display: block !important;
}

.d-inline {
  display: inline !important;
}

.d-inline-block {
  display: inline-block !important;
}

.d-flex {
  display: flex !important;
}

.d-inline-flex {
  display: inline-flex !important;
}

.justify-content-center {
  justify-content: center !important;
}

.justify-content-start {
  justify-content: flex-start !important;
}

.justify-content-end {
  justify-content: flex-end !important;
}

.justify-content-between {
  justify-content: space-between !important;
}

.justify-content-around {
  justify-content: space-around !important;
}

.align-items-center {
  align-items: center !important;
}

.align-items-start {
  align-items: flex-start !important;
}

.align-items-end {
  align-items: flex-end !important;
}

.align-items-stretch {
  align-items: stretch !important;
}

.flex-column {
  flex-direction: column !important;
}

.flex-row {
  flex-direction: row !important;
}

.position-relative {
  position: relative !important;
}

.position-absolute {
  position: absolute !important;
}

.position-fixed {
  position: fixed !important;
}

.position-sticky {
  position: sticky !important;
}

.w-100 {
  width: 100% !important;
}

.w-75 {
  width: 75% !important;
}

.w-50 {
  width: 50% !important;
}

.w-25 {
  width: 25% !important;
}

.w-auto {
  width: auto !important;
}

.h-100 {
  height: 100% !important;
}

.h-75 {
  height: 75% !important;
}

.h-50 {
  height: 50% !important;
}

.h-25 {
  height: 25% !important;
}

.h-auto {
  height: auto !important;
}

.border {
  border: 1px solid var(--border-color) !important;
}

.border-0 {
  border: 0 !important;
}

.border-top {
  border-top: 1px solid var(--border-color) !important;
}

.border-bottom {
  border-bottom: 1px solid var(--border-color) !important;
}

.border-left {
  border-left: 1px solid var(--border-color) !important;
}

.border-right {
  border-right: 1px solid var(--border-color) !important;
}

.rounded {
  border-radius: var(--radius-md) !important;
}

.rounded-sm {
  border-radius: var(--radius-sm) !important;
}

.rounded-lg {
  border-radius: var(--radius-lg) !important;
}

.rounded-xl {
  border-radius: var(--radius-xl) !important;
}

.rounded-circle {
  border-radius: 50% !important;
}

.shadow-sm {
  box-shadow: var(--shadow-sm) !important;
}

.shadow {
  box-shadow: var(--shadow-md) !important;
}

.shadow-lg {
  box-shadow: var(--shadow-lg) !important;
}

.shadow-xl {
  box-shadow: var(--shadow-xl) !important;
}

.shadow-none {
  box-shadow: none !important;
}

.overflow-auto {
  overflow: auto !important;
}

.overflow-hidden {
  overflow: hidden !important;
}

.overflow-visible {
  overflow: visible !important;
}

.overflow-scroll {
  overflow: scroll !important;
}

.cursor-pointer {
  cursor: pointer !important;
}

.cursor-default {
  cursor: default !important;
}

.cursor-not-allowed {
  cursor: not-allowed !important;
}

.user-select-none {
  user-select: none !important;
}

.user-select-auto {
  user-select: auto !important;
}

.user-select-all {
  user-select: all !important;
}

.visible {
  visibility: visible !important;
}

.invisible {
  visibility: hidden !important;
}

.z-0 {
  z-index: 0 !important;
}

.z-10 {
  z-index: 10 !important;
}

.z-20 {
  z-index: 20 !important;
}

.z-30 {
  z-index: 30 !important;
}

.z-40 {
  z-index: 40 !important;
}

.z-50 {
  z-index: 50 !important;
}

.z-auto {
  z-index: auto !important;
}

.transition {
  transition: var(--transition) !important;
}

.transition-fast {
  transition: var(--transition-fast) !important;
}

.transition-none {
  transition: none !important;
}

.simple-header {
  background: white;
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
}
.simple-header .header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.simple-header .header-content .logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.simple-header .header-content .logo .logo-img {
  width: 32px;
  height: 32px;
}
.simple-header .header-content .logo .logo-text {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-color);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
.sidebar {
  width: var(--sidebar-width, 80px);
  background: var(--bg-sidebar, #ffffff);
  border-right: 1px solid var(--border-color, #e2e8f0);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: fixed;
  height: 100vh;
  z-index: 100;
  padding: 16px 0;
  box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1));
  transition: transform var(--transition, all 0.2s ease), width var(--transition, all 0.2s ease);
}
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .sidebar.mobile-open .sidebar-label {
    opacity: 1 !important;
    transform: translateX(0) !important;
    visibility: visible !important;
  }
  .sidebar.mobile-open a.icon,
  .sidebar.mobile-open .sidebar-dropdown-toggle,
  .sidebar.mobile-open .sidebar-footer a.icon,
  .sidebar.mobile-open .settings-link {
    width: 100% !important;
    min-width: 48px !important;
    padding: 0 16px !important;
    justify-content: flex-start !important;
    gap: 12px !important;
  }
  .sidebar .sidebar-label {
    opacity: 1 !important;
    transform: translateX(0) !important;
    visibility: visible !important;
  }
  .sidebar a.icon {
    width: 100% !important;
    min-width: auto !important;
    padding: 12px 16px !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    margin-left: 0 !important;
  }
  .sidebar .sidebar-dropdown-toggle {
    width: 100% !important;
    min-width: auto !important;
    padding: 12px 16px !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    margin-left: 0 !important;
  }
  .sidebar .sidebar-footer a.icon,
  .sidebar .settings-link {
    width: 100% !important;
    min-width: auto !important;
    padding: 12px 16px !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    margin-left: 0 !important;
  }
}
.sidebar:hover {
  width: var(--sidebar-width-expanded, 240px);
}
.sidebar:hover .sidebar-label {
  opacity: 1 !important;
  transform: translateX(0) !important;
  visibility: visible !important;
}
.sidebar:hover a.icon {
  width: auto !important;
  min-width: 48px !important;
  padding: 0 16px !important;
  justify-content: flex-start !important;
  gap: 12px !important;
}
.sidebar:hover .sidebar-dropdown-toggle {
  width: auto !important;
  min-width: 48px !important;
  padding: 0 16px !important;
  justify-content: flex-start !important;
  gap: 12px !important;
}
.sidebar:hover .sidebar-footer a.icon,
.sidebar:hover .settings-link {
  width: auto !important;
  min-width: 48px !important;
  padding: 0 16px !important;
  justify-content: flex-start !important;
  gap: 12px !important;
}
.sidebar .sidebar-header {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0 16px;
  margin-bottom: 24px;
  justify-content: center;
}
.sidebar .sidebar-header .logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  object-fit: cover;
}
.sidebar .sidebar-nav {
  display: flex;
  flex-direction: column;
  width: 100%;
  flex: 1;
  gap: 8px;
  padding: 0 8px;
  align-items: flex-start;
}
@media (max-width: 768px) {
  .sidebar .sidebar-nav {
    padding: 0 16px;
    gap: 4px;
  }
}
.sidebar a.icon {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  margin-left: 30px;
}
.sidebar a.icon:hover {
  background: var(--bg-hover);
  color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.sidebar a.icon.active {
  background: var(--primary-gradient);
  color: white;
  box-shadow: var(--shadow-md);
}
.sidebar a.icon.active::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  background: var(--primary-color);
  border-radius: 0 2px 2px 0;
}
.sidebar a.icon.active .sidebar-label {
  color: white;
  font-weight: 600;
}
@media (max-width: 768px) {
  .sidebar a.icon.active::before {
    left: 0;
    width: 4px;
    height: 100%;
    border-radius: 0 2px 2px 0;
  }
}
.sidebar a.icon i, .sidebar a.icon .svg-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  flex-shrink: 0;
}
.sidebar a.icon .sidebar-label {
  opacity: 0;
  transform: translateX(-10px);
  visibility: hidden;
  transition: var(--transition);
  font-weight: 500;
  white-space: nowrap;
  color: inherit;
  font-size: 14px;
  line-height: 1.2;
}
.sidebar .sidebar-dropdown {
  width: 100%;
  position: relative;
}
@media (max-width: 768px) {
  .sidebar .sidebar-dropdown {
    margin-left: 0;
  }
}
.sidebar .sidebar-dropdown .sidebar-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  margin-left: 30px;
}
.sidebar .sidebar-dropdown .sidebar-dropdown-toggle:hover {
  background: var(--bg-hover);
  color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.sidebar .sidebar-dropdown .sidebar-dropdown-toggle.active {
  background: var(--primary-gradient);
  color: white;
  box-shadow: var(--shadow-md);
}
.sidebar .sidebar-dropdown .sidebar-dropdown-toggle.active::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  background: var(--primary-color);
  border-radius: 0 2px 2px 0;
}
.sidebar .sidebar-dropdown .sidebar-dropdown-toggle.active .sidebar-label {
  color: white;
  font-weight: 600;
}
@media (max-width: 768px) {
  .sidebar .sidebar-dropdown .sidebar-dropdown-toggle.active::before {
    left: 0;
    width: 4px;
    height: 100%;
    border-radius: 0 2px 2px 0;
  }
}
.sidebar .sidebar-dropdown .sidebar-dropdown-toggle i, .sidebar .sidebar-dropdown .sidebar-dropdown-toggle .svg-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  flex-shrink: 0;
}
.sidebar .sidebar-dropdown .sidebar-dropdown-toggle .sidebar-label {
  opacity: 0;
  transform: translateX(-10px);
  visibility: hidden;
  transition: var(--transition);
  font-weight: 500;
  white-space: nowrap;
  color: inherit;
  font-size: 14px;
  line-height: 1.2;
}
.sidebar .sidebar-dropdown .sidebar-dropdown-toggle {
  width: 100%;
  justify-content: flex-start;
}
.sidebar .sidebar-dropdown .sidebar-dropdown-toggle::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  margin-left: 4px;
  transition: var(--transition);
}
.sidebar .sidebar-dropdown .sidebar-dropdown-toggle.active::after {
  transform: rotate(180deg);
}
.sidebar .sidebar-dropdown .sidebar-dropdown-menu {
  position: absolute;
  left: 100%;
  top: 0;
  width: 200px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-10px);
  transition: var(--transition);
  z-index: 200;
}
@media (max-width: 768px) {
  .sidebar .sidebar-dropdown .sidebar-dropdown-menu {
    position: static;
    left: auto;
    top: auto;
    width: 100%;
    box-shadow: none;
    border: none;
    border-top: 1px solid var(--border-color);
    border-radius: 0;
    margin-top: 8px;
    background: var(--bg-secondary);
  }
}
.sidebar .sidebar-dropdown .sidebar-dropdown-menu .sidebar-dropdown-title {
  padding: 12px 16px;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}
@media (max-width: 768px) {
  .sidebar .sidebar-dropdown .sidebar-dropdown-menu .sidebar-dropdown-title {
    padding: 12px 24px;
    font-size: 15px;
  }
}
.sidebar .sidebar-dropdown .sidebar-dropdown-menu .sidebar-subitem {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  font-size: 14px;
}
.sidebar .sidebar-dropdown .sidebar-dropdown-menu .sidebar-subitem:hover {
  background: var(--bg-hover);
  color: var(--primary-color);
}
.sidebar .sidebar-dropdown .sidebar-dropdown-menu .sidebar-subitem i {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
}
@media (max-width: 768px) {
  .sidebar .sidebar-dropdown .sidebar-dropdown-menu .sidebar-subitem {
    padding: 12px 24px;
    font-size: 15px;
  }
}
.sidebar .sidebar-dropdown:hover .sidebar-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}
@media (max-width: 768px) {
  .sidebar .sidebar-dropdown.active .sidebar-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
  }
}
.sidebar .sidebar-footer {
  width: 100%;
  padding: 16px 8px 0;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
  align-items: flex-start;
}
@media (max-width: 768px) {
  .sidebar .sidebar-footer {
    padding: 16px 16px 0;
  }
}
.sidebar .sidebar-footer a.icon {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  margin-left: 30px;
}
.sidebar .sidebar-footer a.icon:hover {
  background: var(--bg-hover);
  color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.sidebar .sidebar-footer a.icon.active {
  background: var(--primary-gradient);
  color: white;
  box-shadow: var(--shadow-md);
}
.sidebar .sidebar-footer a.icon.active::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  background: var(--primary-color);
  border-radius: 0 2px 2px 0;
}
.sidebar .sidebar-footer a.icon.active .sidebar-label {
  color: white;
  font-weight: 600;
}
@media (max-width: 768px) {
  .sidebar .sidebar-footer a.icon.active::before {
    left: 0;
    width: 4px;
    height: 100%;
    border-radius: 0 2px 2px 0;
  }
}
.sidebar .sidebar-footer a.icon i, .sidebar .sidebar-footer a.icon .svg-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  flex-shrink: 0;
}
.sidebar .sidebar-footer a.icon .sidebar-label {
  opacity: 0;
  transform: translateX(-10px);
  visibility: hidden;
  transition: var(--transition);
  font-weight: 500;
  white-space: nowrap;
  color: inherit;
  font-size: 14px;
  line-height: 1.2;
}
.sidebar .sidebar-footer a.icon {
  width: 100%;
  justify-content: flex-start;
  color: var(--text-muted);
}
.sidebar .sidebar-footer a.icon:hover {
  color: var(--danger-color);
  background: rgba(var(--danger-rgb), 0.1);
}
.sidebar .settings-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  margin-left: 30px;
}
.sidebar .settings-link:hover {
  background: var(--bg-hover);
  color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.sidebar .settings-link.active {
  background: var(--primary-gradient);
  color: white;
  box-shadow: var(--shadow-md);
}
.sidebar .settings-link.active::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  background: var(--primary-color);
  border-radius: 0 2px 2px 0;
}
.sidebar .settings-link.active .sidebar-label {
  color: white;
  font-weight: 600;
}
@media (max-width: 768px) {
  .sidebar .settings-link.active::before {
    left: 0;
    width: 4px;
    height: 100%;
    border-radius: 0 2px 2px 0;
  }
}
.sidebar .settings-link i, .sidebar .settings-link .svg-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  flex-shrink: 0;
}
.sidebar .settings-link .sidebar-label {
  opacity: 0;
  transform: translateX(-10px);
  visibility: hidden;
  transition: var(--transition);
  font-weight: 500;
  white-space: nowrap;
  color: inherit;
  font-size: 14px;
  line-height: 1.2;
}
.sidebar .settings-link {
  width: 100%;
  justify-content: flex-start;
  color: var(--text-muted);
}
.sidebar .settings-link:hover {
  color: var(--info-color);
  background: rgba(var(--info-rgb), 0.1);
}
@media (max-width: 768px) {
  .sidebar .settings-link {
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .sidebar .sidebar-header {
    padding: 0 16px;
    margin-bottom: 16px;
  }
  .sidebar:hover {
    width: 280px;
  }
  .sidebar:hover .sidebar-label {
    opacity: 1 !important;
    transform: translateX(0) !important;
    visibility: visible !important;
  }
  .sidebar .sidebar-dropdown .sidebar-dropdown-menu {
    display: none;
    position: static;
    left: auto;
    top: auto;
    width: 100%;
    border: 0;
    box-shadow: none;
    transform: none;
    opacity: 1;
    visibility: visible;
    padding: 4px 0 8px 48px;
    background: transparent;
  }
  .sidebar .sidebar-dropdown.open .sidebar-dropdown-menu {
    display: block;
  }
}
.sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.sidebar-toggle:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.sidebar-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}
.sidebar-toggle {
  background: var(--bg-primary);
  color: var(--text-primary);
  border-color: var(--border-color);
}
.sidebar-toggle:hover:not(:disabled) {
  filter: brightness(0.95);
  transform: translateY(-1px);
}
.sidebar-toggle:active:not(:disabled) {
  transform: translateY(0);
}
.sidebar-toggle {
  position: relative;
  z-index: 150;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (min-width: 1025px) {
  .sidebar-toggle {
    display: none;
  }
}
.sidebar-toggle i {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sidebar-toggle:hover {
  background: var(--bg-hover);
  box-shadow: var(--shadow-md);
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}
.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}
@media (min-width: 1025px) {
  .sidebar-overlay {
    display: none;
  }
}

body.sidebar-open {
  overflow: hidden;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
.crm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}
@media (max-width: 768px) {
  .crm-header {
    padding: 0 12px;
    height: 56px;
  }
  .crm-header .search-container {
    display: none;
  }
  .crm-header .header-right {
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .crm-header .header-right::-webkit-scrollbar {
    display: none;
  }
}
.crm-header .header-left {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  flex: 1;
}
.crm-header .header-right {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  min-width: 0;
}
.crm-header .header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.crm-header .header-action-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
}
.crm-header .header-action-btn:hover {
  background: var(--bg-hover);
}
.crm-header .header-action-btn .notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger-color);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}
.crm-header .user-menu {
  position: relative;
}
.crm-header .user-menu-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border: none;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
}
.crm-header .user-menu-btn:hover {
  background: var(--bg-hover);
}
.crm-header .user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
}
.crm-header .user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.crm-header .user-info {
  text-align: left;
}
.crm-header .user-info .user-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
}
.crm-header .user-info .user-role {
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.crm-header .user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
}
.crm-header .user-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.crm-header .dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
}
.crm-header .dropdown-item:hover {
  background: var(--bg-hover);
}
.crm-header .dropdown-item i {
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.crm-header .dropdown-item .svg-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.crm-header .dropdown-item .svg-icon svg {
  width: 100%;
  height: 100%;
}
.crm-header .dropdown-divider {
  height: 1px;
  background: var(--border-light);
  margin: 8px 0;
}
.crm-header .search-container {
  position: relative;
  max-width: 400px;
  width: 100%;
}
.crm-header .search-container .search-box {
  position: relative;
  width: 100%;
}
.crm-header .search-container .search-box .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
  pointer-events: none;
}
.crm-header .search-container .search-box .search-input {
  width: 100%;
  padding: 8px 12px 8px 40px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  font-size: 14px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  transition: var(--transition);
}
.crm-header .search-container .search-box .search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: var(--bg-primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}
.crm-header .search-container .search-box .search-input::placeholder {
  color: var(--text-muted);
}
.crm-header .notifications {
  position: relative;
}
.crm-header .notifications .notification-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.crm-header .notifications .notification-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.crm-header .notifications .notification-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}
.crm-header .notifications .notification-btn {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.crm-header .notifications .notification-btn:hover:not(:disabled) {
  filter: brightness(0.95);
  transform: translateY(-1px);
}
.crm-header .notifications .notification-btn:active:not(:disabled) {
  transform: translateY(0);
}
.crm-header .notifications .notification-btn {
  position: relative;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
}
.crm-header .notifications .notification-btn:hover {
  background: var(--bg-hover);
  color: var(--primary-color);
}
.crm-header .notifications .notification-btn i {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.crm-header .notifications .notification-btn .notification-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  background: var(--danger-color);
  color: white;
  border-radius: 50%;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}
.crm-header .notifications .notification-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 320px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
  z-index: 100;
  max-height: 400px;
  overflow-y: auto;
}
.crm-header .notifications .notification-dropdown::-webkit-scrollbar {
  width: 6px;
}
.crm-header .notifications .notification-dropdown::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 3px;
}
.crm-header .notifications .notification-dropdown::-webkit-scrollbar-thumb {
  background: var(--border-dark);
  border-radius: 3px;
}
.crm-header .notifications .notification-dropdown::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}
.crm-header .notifications .notification-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.crm-header .notifications .notification-dropdown .notification-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
}
.crm-header .notifications .notification-dropdown .notification-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}
.crm-header .notifications .notification-dropdown .notification-header .mark-all-read {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.crm-header .notifications .notification-dropdown .notification-header .mark-all-read:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.crm-header .notifications .notification-dropdown .notification-header .mark-all-read:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}
.crm-header .notifications .notification-dropdown .notification-header .mark-all-read {
  background: transparent;
  color: var(--primary-color);
  border-color: transparent;
}
.crm-header .notifications .notification-dropdown .notification-header .mark-all-read:hover:not(:disabled) {
  filter: brightness(0.95);
  transform: translateY(-1px);
}
.crm-header .notifications .notification-dropdown .notification-header .mark-all-read:active:not(:disabled) {
  transform: translateY(0);
}
.crm-header .notifications .notification-dropdown .notification-header .mark-all-read {
  padding: 4px 8px;
  font-size: 12px;
}
.crm-header .notifications .notification-dropdown .notification-list .notification-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
  cursor: pointer;
}
.crm-header .notifications .notification-dropdown .notification-list .notification-item:hover {
  background: var(--bg-hover);
}
.crm-header .notifications .notification-dropdown .notification-list .notification-item:last-child {
  border-bottom: none;
}
.crm-header .notifications .notification-dropdown .notification-list .notification-item.unread {
  background: rgba(var(--primary-rgb), 0.05);
}
.crm-header .notifications .notification-dropdown .notification-list .notification-item.unread::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary-color);
}
.crm-header .notifications .notification-dropdown .notification-list .notification-item .notification-content {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}
.crm-header .notifications .notification-dropdown .notification-list .notification-item .notification-content .notification-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12.8px;
  color: white;
  background: var(--primary-gradient);
  flex-shrink: 0;
}
.crm-header .notifications .notification-dropdown .notification-list .notification-item .notification-content .notification-text {
  flex: 1;
  min-width: 0;
}
.crm-header .notifications .notification-dropdown .notification-list .notification-item .notification-content .notification-text .notification-title {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.crm-header .notifications .notification-dropdown .notification-list .notification-item .notification-content .notification-text .notification-message {
  font-size: 13px;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.crm-header .notifications .notification-dropdown .notification-list .notification-item .notification-content .notification-text .notification-time {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}
.crm-header .notifications .notification-dropdown .notification-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  text-align: center;
}
.crm-header .notifications .notification-dropdown .notification-footer a {
  color: var(--primary-color);
  font-size: 14px;
  font-weight: 500;
}
.crm-header .notifications .notification-dropdown .notification-footer a:hover {
  text-decoration: underline;
}
.crm-header .user-profile {
  position: relative;
}
.crm-header .user-profile .profile-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-primary);
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
}
.crm-header .user-profile .profile-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-dark);
}
.crm-header .user-profile .profile-btn .user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12.8px;
  color: white;
  background: var(--primary-gradient);
  font-size: 14px;
}
.crm-header .user-profile .profile-btn .user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.crm-header .user-profile .profile-btn .user-info .user-name {
  font-weight: 500;
  font-size: 14px;
  color: var(--text-primary);
}
.crm-header .user-profile .profile-btn .user-info .user-role {
  font-size: 12px;
  color: var(--text-muted);
}
.crm-header .user-profile .profile-btn .dropdown-arrow {
  width: 12px;
  height: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: var(--transition);
}
.crm-header .user-profile .profile-btn.active .dropdown-arrow {
  transform: rotate(180deg);
}
.crm-header .user-profile .profile-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 240px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
  z-index: 100;
}
.crm-header .user-profile .profile-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.crm-header .user-profile .profile-dropdown .profile-header {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}
.crm-header .user-profile .profile-dropdown .profile-header .profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 25.6px;
  color: white;
  background: var(--primary-gradient);
  margin: 0 auto 12px;
  font-size: 24px;
}
.crm-header .user-profile .profile-dropdown .profile-header .profile-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.crm-header .user-profile .profile-dropdown .profile-header .profile-email {
  font-size: 13px;
  color: var(--text-muted);
}
.crm-header .user-profile .profile-dropdown .profile-menu {
  padding: 8px 0;
}
.crm-header .user-profile .profile-dropdown .profile-menu .profile-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  font-size: 14px;
}
.crm-header .user-profile .profile-dropdown .profile-menu .profile-menu-item:hover {
  background: var(--bg-hover);
  color: var(--primary-color);
}
.crm-header .user-profile .profile-dropdown .profile-menu .profile-menu-item i {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
}
.crm-header .user-profile .profile-dropdown .profile-menu .profile-menu-item.danger {
  color: var(--danger-color);
}
.crm-header .user-profile .profile-dropdown .profile-menu .profile-menu-item.danger:hover {
  background: rgba(var(--danger-rgb), 0.1);
}
.crm-header .user-profile .profile-dropdown .profile-menu .profile-menu-item.danger i {
  color: var(--danger-color);
}
@media (max-width: 768px) {
  .crm-header {
    padding: 0 12px;
  }
  .crm-header .search-container {
    display: none;
  }
  .crm-header .user-profile .profile-btn .user-info {
    display: none;
  }
  .crm-header .header-actions {
    gap: 6px;
  }
  .crm-header .user-menu-btn {
    padding: 6px 8px;
    gap: 8px;
  }
  .crm-header .user-menu-btn .user-info {
    display: none;
  }
  .crm-header .user-dropdown {
    right: -8px;
    min-width: 180px;
  }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .crm-header .search-container {
    max-width: 300px;
  }
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}
@media (max-width: 768px) {
  .page-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }
}
.page-header .header-left {
  display: flex;
  flex-direction: row;
  gap: 12px;
  justify-content: flex-start;
  min-height: 60px;
}
.page-header .header-left h1 {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.page-header .header-left h1:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.page-header .header-left h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  padding: 5px;
  line-height: 1.2;
  border: none;
  box-shadow: none;
}
@media (max-width: 768px) {
  .page-header .header-left h1 {
    font-size: 1.5rem;
    padding: 3px;
  }
}
.page-header .header-left h1[contenteditable=true] {
  cursor: text;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  transition: var(--transition);
}
.page-header .header-left h1[contenteditable=true]:hover {
  border-color: var(--border-color);
  background-color: var(--bg-secondary);
}
.page-header .header-left h1[contenteditable=true]:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: var(--bg-primary);
  box-shadow: 0 0 0 0.2rem rgba(var(--primary-rgb), 0.25);
}
.page-header .header-left .page-subtitle {
  margin: 0.25rem 0 0 0;
  padding: 0 5px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 400;
}
.page-header .header-left .page-subtitle[contenteditable=true] {
  cursor: text;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  transition: var(--transition);
}
.page-header .header-left .page-subtitle[contenteditable=true]:hover {
  border-color: var(--border-color);
  background-color: var(--bg-secondary);
}
.page-header .header-left .page-subtitle[contenteditable=true]:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: var(--bg-primary);
  box-shadow: 0 0 0 0.2rem rgba(var(--primary-rgb), 0.25);
}
.page-header .header-right {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}
@media (max-width: 768px) {
  .page-header .header-right {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
@media (max-width: 768px) {
  .section-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
}
.section-header .section-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}
.section-header .section-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}
.card-header h3, .card-header h4, .card-header h5 {
  margin: 0;
  color: var(--text-primary);
  font-weight: 600;
}
.card-header .header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
}

.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.form-group .form-control,
.form-group .form-select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: var(--transition);
}
.form-group .form-control:focus,
.form-group .form-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}
.form-group .form-control::placeholder,
.form-group .form-select::placeholder {
  color: var(--text-muted);
}
.form-group .form-control:disabled,
.form-group .form-select:disabled {
  background: var(--bg-secondary);
  color: var(--text-muted);
  cursor: not-allowed;
}
.form-group .form-control.form-control-sm,
.form-group .form-select.form-control-sm {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}
.form-group .form-control.form-control-lg,
.form-group .form-select.form-control-lg {
  padding: 0.75rem 1rem;
  font-size: 1rem;
}
.form-group .form-control.inline,
.form-group .form-select.inline {
  width: auto !important;
  display: inline-block !important;
}
.form-group .form-control.inline-number,
.form-group .form-select.inline-number {
  width: 120px !important;
  text-align: right;
}
.form-group .form-control.inline-select,
.form-group .form-select.inline-select {
  min-width: 150px;
}
.form-group .field-error {
  color: var(--danger-color);
  font-size: 0.75rem;
  margin-top: 0.25rem;
}
.form-group .form-help {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  font-style: italic;
}

.form-grid {
  display: grid;
  gap: 1.5rem;
}
.form-grid.form-grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.form-grid.form-grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.form-row {
  display: grid;
  gap: 1rem;
}
.form-row.form-row-2 {
  grid-template-columns: 1fr 1fr;
}
.form-row.form-row-3 {
  grid-template-columns: 1fr 1fr 1fr;
}
@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}
@media (max-width: 768px) {
  .form-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
}
.form-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.form-actions .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.form-actions .btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}
.form-actions .btn.btn-primary {
  background: var(--primary-color);
  color: white;
  border-color: transparent;
}
.form-actions .btn.btn-primary:hover:not(:disabled) {
  filter: brightness(0.95);
  transform: translateY(-1px);
}
.form-actions .btn.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}
.form-actions .btn.btn-secondary {
  background: var(--secondary-color);
  color: white;
  border-color: transparent;
}
.form-actions .btn.btn-secondary:hover:not(:disabled) {
  filter: brightness(0.95);
  transform: translateY(-1px);
}
.form-actions .btn.btn-secondary:active:not(:disabled) {
  transform: translateY(0);
}
.form-actions .btn.btn-outline-primary {
  background: transparent;
  color: var(--primary-color);
  border-color: var(--primary-color);
}
.form-actions .btn.btn-outline-primary:hover:not(:disabled) {
  filter: brightness(0.95);
  transform: translateY(-1px);
}
.form-actions .btn.btn-outline-primary:active:not(:disabled) {
  transform: translateY(0);
}
.form-actions .btn.btn-outline-primary:hover {
  background: var(--primary-color);
  color: white;
}
.form-actions .btn.btn-outline-secondary {
  background: transparent;
  color: var(--secondary-color);
  border-color: var(--secondary-color);
}
.form-actions .btn.btn-outline-secondary:hover:not(:disabled) {
  filter: brightness(0.95);
  transform: translateY(-1px);
}
.form-actions .btn.btn-outline-secondary:active:not(:disabled) {
  transform: translateY(0);
}
.form-actions .btn.btn-outline-secondary:hover {
  background: var(--secondary-color);
  color: white;
}

.form-control.is-valid,
.form-select.is-valid {
  border-color: var(--success-color);
}
.form-control.is-valid:focus,
.form-select.is-valid:focus {
  border-color: var(--success-color);
  box-shadow: 0 0 0 0.2rem rgba(var(--success-rgb), 0.25);
}

.form-control.is-invalid,
.form-select.is-invalid {
  border-color: var(--danger-color);
}
.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
  border-color: var(--danger-color);
  box-shadow: 0 0 0 0.2rem rgba(var(--danger-rgb), 0.25);
}

.form-loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}
.form-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.notfound-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: 2rem;
  background: #ffffff;
  color: #333;
}
.notfound-container img {
  max-width: 300px;
  height: auto;
  margin-bottom: 2rem;
  border-radius: 15px;
  box-shadow: none;
}
.notfound-container .notfound-title {
  font-size: 6rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: none;
  color: #ff6600;
}
.notfound-container .notfound-desc {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  opacity: 1;
  max-width: 500px;
  line-height: 1.6;
  color: #666;
}
.notfound-container .notfound-home {
  display: inline-block;
  padding: 1rem 2rem;
  background: #ff6600;
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: none;
}
.notfound-container .notfound-home:hover {
  transform: translateY(-2px);
  box-shadow: none;
  background: #ee5a24;
}
.notfound-container .notfound-home:active {
  transform: translateY(0);
}

@media (max-width: 768px) {
  .notfound-container {
    padding: 1rem;
  }
  .notfound-container img {
    max-width: 250px;
  }
  .notfound-container .notfound-title {
    font-size: 4rem;
  }
  .notfound-container .notfound-desc {
    font-size: 1.2rem;
  }
  .notfound-container .notfound-home {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
  }
}
.custom-modal {
  display: none;
  position: fixed;
  z-index: 1050;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
}
.custom-modal.show {
  display: flex;
}
.custom-modal .custom-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.custom-modal .custom-modal-dialog {
  position: relative;
  width: 90%;
  max-width: 500px;
  margin: auto;
  z-index: 1051;
}
.custom-modal .custom-modal-content {
  background-color: #fefefe;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  position: relative;
  animation: fadeIn 0.3s ease-out;
}
.custom-modal .custom-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
  margin-bottom: 15px;
}
.custom-modal .custom-modal-header .custom-modal-title {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
}
.custom-modal .custom-modal-header .custom-modal-close {
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s ease;
  background: none;
  border: none;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.custom-modal .custom-modal-header .custom-modal-close:hover, .custom-modal .custom-modal-header .custom-modal-close:focus {
  color: #333;
  text-decoration: none;
}
.custom-modal .custom-modal-body {
  padding: 10px 0;
  color: #555;
  line-height: 1.6;
}
.custom-modal .custom-modal-footer {
  border-top: 1px solid #eee;
  padding-top: 15px;
  margin-top: 15px;
  text-align: right;
}
.custom-modal .custom-modal-footer button {
  padding: 8px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.2s ease;
}
.custom-modal .custom-modal-footer button.btn-primary {
  background-color: #007bff;
  color: white;
}
.custom-modal .custom-modal-footer button.btn-primary:hover {
  background-color: #0056b3;
}
.custom-modal .custom-modal-footer button.btn-secondary {
  background-color: #6c757d;
  color: white;
  margin-right: 10px;
}
.custom-modal .custom-modal-footer button.btn-secondary:hover {
  background-color: #5a6268;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.modal {
  z-index: 1050 !important;
}
.modal.fade .modal-dialog {
  transition: transform 0.3s ease-out;
  transform: translate(0, -50px);
}
.modal.show .modal-dialog {
  transform: none;
}

.modal-backdrop {
  z-index: 1040 !important;
  background-color: var(--bs-backdrop-bg) !important;
  opacity: 0.5;
}
.modal-backdrop.fade {
  opacity: 0;
}
.modal-backdrop.show {
  opacity: 0.5;
}

.modal-dialog {
  z-index: 1051 !important;
}

.modal-content {
  z-index: 1052 !important;
}

body.modal-open {
  overflow: hidden !important;
}

.readonly-field {
  background-color: #f8f9fa !important;
  color: #6c757d !important;
  cursor: not-allowed !important;
  border-color: #e9ecef !important;
}
.readonly-field:focus {
  border-color: #e9ecef !important;
  box-shadow: none !important;
}

.status-badge {
  border: none !important;
  border-radius: 8px !important;
  padding: 8px 12px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
}

.status-open {
  background: #e3f2fd !important;
  color: #1565c0 !important;
}

.status-in_progress {
  background: #fff3e0 !important;
  color: #ef6c00 !important;
}

.status-completed {
  background: #e8f5e8 !important;
  color: #2e7d32 !important;
}

.status-cancelled {
  background: #ffebee !important;
  color: #c62828 !important;
}

.priority-low {
  background: #f5f5f5 !important;
  color: #424242 !important;
}

.priority-medium {
  background: #fff8e1 !important;
  color: #f57f17 !important;
}

.priority-high {
  background: #ffe0b2 !important;
  color: #e65100 !important;
}

.priority-urgent {
  background: #ffcdd2 !important;
  color: #b71c1c !important;
}

.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}
.progress-fill.progress-open {
  width: 0%;
  background: #6c757d;
}
.progress-fill.progress-in_progress {
  width: 50%;
  background: linear-gradient(90deg, #ffc107, #fd7e14);
}
.progress-fill.progress-completed {
  width: 100%;
  background: linear-gradient(90deg, #28a745, #20c997);
}
.progress-fill.progress-cancelled {
  width: 0%;
  background: #6c757d;
}

.progress-text-open {
  color: #6c757d;
}

.progress-text-in_progress {
  color: #fd7e14;
}

.progress-text-completed {
  color: #28a745;
}

.progress-text-cancelled {
  color: #6c757d;
}

.notification-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 400px;
  max-height: 500px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}
@media (max-width: 768px) {
  .notification-dropdown {
    width: 320px;
    right: -10px;
  }
}
@media (max-width: 480px) {
  .notification-dropdown {
    width: 280px;
    right: -20px;
  }
}
.notification-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.notification-dropdown .notification-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.notification-dropdown .notification-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}
.notification-dropdown .notification-header .notification-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}
.notification-dropdown .notification-header .notification-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.notification-dropdown .notification-header .notification-actions button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.notification-dropdown .notification-header .notification-actions button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}
.notification-dropdown .notification-header .notification-actions button {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  transition: var(--transition);
}
.notification-dropdown .notification-header .notification-actions button:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-color);
}
.notification-dropdown .notification-header .notification-actions button i {
  font-size: 14px;
}
.notification-dropdown .notification-list {
  max-height: 350px;
  overflow-y: auto;
}
.notification-dropdown .notification-list::-webkit-scrollbar {
  width: 6px;
}
.notification-dropdown .notification-list::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 3px;
}
.notification-dropdown .notification-list::-webkit-scrollbar-thumb {
  background: var(--border-dark);
  border-radius: 3px;
}
.notification-dropdown .notification-list::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}
.notification-dropdown .notification-list .notification-loading,
.notification-dropdown .notification-list .notification-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 40px 20px;
  color: var(--text-secondary);
  text-align: center;
}
.notification-dropdown .notification-list .notification-loading i,
.notification-dropdown .notification-list .notification-empty i {
  font-size: 2rem;
  margin-bottom: 12px;
  opacity: 0.5;
}
.notification-dropdown .notification-list .notification-loading p,
.notification-dropdown .notification-list .notification-empty p {
  margin: 0;
  font-size: 0.9rem;
}
.notification-dropdown .notification-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
  cursor: pointer;
}
.notification-dropdown .notification-item:last-child {
  border-bottom: none;
}
.notification-dropdown .notification-item:hover {
  background: var(--bg-hover);
}
.notification-dropdown .notification-item.unread {
  background: var(--bg-highlight);
  border-left: 3px solid var(--primary-color);
}
.notification-dropdown .notification-item.unread:hover {
  background: var(--bg-hover);
}
.notification-dropdown .notification-item.read {
  opacity: 0.8;
}
.notification-dropdown .notification-item.new-notification {
  animation: slideInNotification 0.3s ease-out;
}
.notification-dropdown .notification-item .notification-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}
.notification-dropdown .notification-item .notification-icon i {
  font-size: 1.125rem;
}
.notification-dropdown .notification-item.notification-info .notification-icon {
  background: var(--info-bg);
  color: var(--info-color);
}
.notification-dropdown .notification-item.notification-warning .notification-icon {
  background: var(--warning-bg);
  color: var(--warning-color);
}
.notification-dropdown .notification-item.notification-success .notification-icon {
  background: var(--success-bg);
  color: var(--success-color);
}
.notification-dropdown .notification-item.notification-error .notification-icon {
  background: var(--error-bg);
  color: var(--error-color);
}
.notification-dropdown .notification-item .notification-content {
  flex: 1;
  min-width: 0;
}
.notification-dropdown .notification-item .notification-content .notification-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notification-dropdown .notification-item .notification-content .notification-message {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notification-dropdown .notification-item .notification-content .notification-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}
.notification-dropdown .notification-item .notification-content .notification-meta .notification-time {
  color: var(--text-muted);
}
.notification-dropdown .notification-item .notification-content .notification-meta .notification-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}
.notification-dropdown .notification-item .notification-content .notification-meta .notification-link:hover {
  text-decoration: underline;
}
.notification-dropdown .notification-item .notification-actions {
  display: flex;
  align-items: center;
  justify-content: center;
}
.notification-dropdown .notification-item .notification-actions .delete-notification-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.notification-dropdown .notification-item .notification-actions .delete-notification-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.notification-dropdown .notification-item .notification-actions .delete-notification-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}
.notification-dropdown .notification-item .notification-actions .delete-notification-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  border: none;
  opacity: 0;
  transition: var(--transition);
}
.notification-dropdown .notification-item .notification-actions .delete-notification-btn:hover {
  background: var(--error-bg);
  color: var(--error-color);
}
.notification-dropdown .notification-item .notification-actions .delete-notification-btn i {
  font-size: 12px;
}
.notification-dropdown .notification-item:hover .delete-notification-btn {
  opacity: 1;
}
.notification-dropdown .notification-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-light);
  background: var(--bg-secondary);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  text-align: center;
}
.notification-dropdown .notification-footer .view-all-notifications {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}
.notification-dropdown .notification-footer .view-all-notifications:hover {
  text-decoration: underline;
}

.notification-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 18px;
  height: 18px;
  background: var(--error-color);
  color: white;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  display: none;
}
.notification-badge.show {
  display: flex;
}
.notification-badge.pulse {
  animation: pulse 1s ease-in-out;
}

.notification-settings-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.notification-settings-modal .modal-content {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}
.notification-settings-modal .modal-content .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--border-light);
}
.notification-settings-modal .modal-content .modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}
.notification-settings-modal .modal-content .modal-header .close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.notification-settings-modal .modal-content .modal-header .close-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.notification-settings-modal .modal-content .modal-header .close-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}
.notification-settings-modal .modal-content .modal-header .close-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  font-size: 1.25rem;
  line-height: 1;
}
.notification-settings-modal .modal-content .modal-header .close-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.notification-settings-modal .modal-content .modal-body {
  padding: 20px;
}
.notification-settings-modal .modal-content .modal-body .setting-group {
  margin-bottom: 20px;
}
.notification-settings-modal .modal-content .modal-body .setting-group:last-child {
  margin-bottom: 0;
}
.notification-settings-modal .modal-content .modal-body .setting-group label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
}
.notification-settings-modal .modal-content .modal-body .setting-group label input[type=checkbox] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
}
.notification-settings-modal .modal-content .modal-body .setting-group:has(input[type=range]) label {
  display: block;
  margin-bottom: 8px;
}
.notification-settings-modal .modal-content .modal-body .setting-group:has(input[type=range]) .volume-control {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  align-items: center;
}
.notification-settings-modal .modal-content .modal-body .setting-group:has(input[type=range]) .volume-control input[type=range] {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--border-light);
  outline: none;
  -webkit-appearance: none;
}
.notification-settings-modal .modal-content .modal-body .setting-group:has(input[type=range]) .volume-control input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
}
.notification-settings-modal .modal-content .modal-body .setting-group:has(input[type=range]) .volume-control input[type=range]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  border: none;
}
.notification-settings-modal .modal-content .modal-body .setting-group:has(input[type=range]) .volume-control #volume-value {
  min-width: 40px;
  text-align: right;
  font-weight: 500;
  color: var(--text-secondary);
}
.notification-settings-modal .modal-content .modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px;
  border-top: 1px solid var(--border-light);
}
.notification-settings-modal .modal-content .modal-footer .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.notification-settings-modal .modal-content .modal-footer .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.notification-settings-modal .modal-content .modal-footer .btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}
.notification-settings-modal .modal-content .modal-footer .btn {
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: var(--transition);
}
.notification-settings-modal .modal-content .modal-footer .btn.btn-primary {
  background: var(--primary-color);
  color: white;
  border: 1px solid var(--primary-color);
}
.notification-settings-modal .modal-content .modal-footer .btn.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}
.notification-settings-modal .modal-content .modal-footer .btn.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}
.notification-settings-modal .modal-content .modal-footer .btn.btn-secondary:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 16px 20px;
  z-index: 9999;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
@media (max-width: 768px) {
  .toast {
    right: 10px;
    left: 10px;
    transform: translateY(-100%);
  }
}
.toast.show {
  transform: translateX(0);
}
@media (max-width: 768px) {
  .toast.show {
    transform: translateY(0);
  }
}
.toast .toast-content {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  align-items: center;
}
.toast .toast-content i {
  font-size: 1.125rem;
}
.toast .toast-content span {
  color: var(--text-primary);
  font-size: 0.9rem;
}
.toast.toast-success {
  border-left: 4px solid var(--success-color);
}
.toast.toast-success .toast-content i {
  color: var(--success-color);
}
.toast.toast-error {
  border-left: 4px solid var(--error-color);
}
.toast.toast-error .toast-content i {
  color: var(--error-color);
}
.toast.toast-warning {
  border-left: 4px solid var(--warning-color);
}
.toast.toast-warning .toast-content i {
  color: var(--warning-color);
}
.toast.toast-info {
  border-left: 4px solid var(--info-color);
}
.toast.toast-info .toast-content i {
  color: var(--info-color);
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes slideInNotification {
  0% {
    opacity: 0;
    transform: translateX(-20px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
.socket-status {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--error-color);
  z-index: 1000;
  transition: background-color 0.3s ease;
}
.socket-status.connected {
  background: var(--success-color);
}
.socket-status.connecting {
  background: var(--warning-color);
  animation: pulse 1s infinite;
}

@media (max-width: 768px) {
  .notification-dropdown .notification-item {
    padding: 12px 16px;
  }
  .notification-dropdown .notification-item .notification-icon {
    width: 32px;
    height: 32px;
  }
  .notification-dropdown .notification-item .notification-icon i {
    font-size: 1rem;
  }
  .notification-dropdown .notification-item .notification-content .notification-title {
    font-size: 0.85rem;
  }
  .notification-dropdown .notification-item .notification-content .notification-message {
    font-size: 0.8rem;
  }
  .notification-dropdown .notification-item .notification-content .notification-meta {
    font-size: 0.75rem;
  }
  .notification-settings-modal .modal-content {
    width: 95%;
    margin: 20px;
  }
}
@media (max-width: 480px) {
  .notification-dropdown .notification-header {
    padding: 12px 16px;
  }
  .notification-dropdown .notification-header h3 {
    font-size: 0.9rem;
  }
  .notification-dropdown .notification-header .notification-actions button {
    width: 28px;
    height: 28px;
  }
  .notification-dropdown .notification-header .notification-actions button i {
    font-size: 12px;
  }
  .notification-dropdown .notification-item {
    padding: 10px 14px;
    gap: 10px;
  }
  .notification-dropdown .notification-item .notification-icon {
    width: 28px;
    height: 28px;
  }
  .notification-dropdown .notification-item .notification-icon i {
    font-size: 0.9rem;
  }
  .notification-dropdown .notification-footer {
    padding: 10px 16px;
  }
  .notification-dropdown .notification-footer .view-all-notifications {
    font-size: 0.85rem;
  }
  .socket-status {
    bottom: 10px;
    right: 10px;
    width: 10px;
    height: 10px;
  }
}
/* Стилі AI Assistant Widget */
.assistant-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

.assistant-button {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.assistant-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.assistant-panel {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 400px;
  height: 80vh;
  background: white;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 1000;
  border: 2px solid #ff6b35;
  border-bottom: none;
}
.assistant-panel .chat-container {
  display: flex;
  flex-direction: column;
  height: 86%;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(60, 47, 36, 0.07);
  border: 1px solid #e0dcd8;
  overflow: hidden;
  margin-left: 0px;
}

.assistant-header {
  background: white;
  color: #1e293b;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  border-bottom: 1px solid #e2e8f0;
}

.assistant-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
}

.assistant-header .ai-icon {
  width: 40px;
  height: 40px;
  background: #ff6b35;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  font-weight: bold;
}

.assistant-header .status {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.assistant-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.history-button {
  background: none;
  border: none;
  color: #64748b;
  font-size: 18px;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.history-button:hover {
  background: #f1f5f9;
  color: #475569;
}

.close-button {
  background: none;
  border: none;
  color: #64748b;
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.close-button:hover {
  background: #f1f5f9;
  color: #475569;
}

.search-box {
  padding: 15px 20px;
}

.search-box input {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid #e2e8f0;
  border-radius: 25px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

.search-box input:focus {
  border-color: #667eea;
}

.assistant-tabs {
  display: flex;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.tab-button {
  flex: 1;
  padding: 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  color: #64748b;
  transition: all 0.2s ease;
  border-bottom: 2px solid transparent;
}

.tab-button.active {
  color: #667eea;
  border-bottom-color: #667eea;
  background: white;
}

.tab-button:hover {
  background: #f1f5f9;
}

.tab-content {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.tab-content.active {
  display: block;
}

.chat-container {
  display: flex;
  flex-direction: column;
  height: 100vw;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(60, 47, 36, 0.07);
  border: 1px solid #e0dcd8;
  overflow: hidden;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  padding-bottom: 10px;
}

.message {
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
  animation: messageSlide 0.3s ease;
}

.message.user {
  align-items: flex-end;
}

.message.assistant {
  align-items: flex-start;
}

.message-content {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
}

.message.user .message-content {
  background: #ff6b35;
  color: white;
  border-bottom-right-radius: 6px;
}

.message.assistant .message-content {
  background: #f8fafc;
  color: #334155;
  border-bottom-left-radius: 6px;
  border: 1px solid #e2e8f0;
}

.message-time {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
  margin-left: 16px;
  margin-right: 16px;
}

.chat-input-container {
  border-top: 1px solid #e2e8f0;
  padding: 16px 20px;
  background: white;
  flex-shrink: 0;
}

/* Область превью файлов */
.file-preview-area {
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.file-preview-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.file-preview-icon {
  font-size: 24px;
  color: #64748b;
}

.file-preview-info {
  flex: 1;
  min-width: 0;
}

.file-preview-name {
  font-size: 14px;
  font-weight: 500;
  color: #1e293b;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-preview-size {
  font-size: 12px;
  color: #64748b;
}

.file-preview-actions {
  display: flex;
  gap: 8px;
}

.file-action-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s ease;
}

.download-btn {
  background: #3b82f6;
  color: white;
}

.download-btn:hover {
  background: #2563eb;
  transform: scale(1.05);
}

.delete-btn {
  background: #ef4444;
  color: white;
}

.delete-btn:hover {
  background: #dc2626;
  transform: scale(1.05);
}

.chat-input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  position: relative;
}

.chat-input-field {
  flex: 1;
  font-size: 15px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  transition: all 0.2s ease;
  outline: none;
  font-family: inherit;
  resize: none;
  min-height: 20px;
  max-height: 120px;
  line-height: 1.4;
}

.chat-input-field:focus {
  border-color: #ff6b35;
  background: white;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.send-button {
  width: 40px;
  height: 40px;
  background: #ff6b35;
  border: none;
  color: white;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.send-button:hover {
  background: #e55a2b;
  transform: scale(1.05);
}

.file-upload-button {
  width: 40px;
  height: 40px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  color: #64748b;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-upload-button:hover {
  background: #e2e8f0;
  color: #475569;
  transform: scale(1.05);
}

.quick-templates {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.template-button {
  padding: 6px 12px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 15px;
  font-size: 12px;
  cursor: pointer;
  color: #475569;
  transition: all 0.2s ease;
}

.template-button:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.ideas-header, .plan-header, .reminders-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.add-idea-btn, .add-milestone-btn, .add-reminder-btn {
  padding: 6px 12px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 15px;
  font-size: 12px;
  cursor: pointer;
  color: #475569;
  transition: all 0.2s ease;
}

.add-idea-btn:hover, .add-milestone-btn:hover, .add-reminder-btn:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.ideas-list, .plan-board, .reminders-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.idea-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.idea-card:hover {
  border-color: #667eea;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.idea-title {
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 8px;
  font-size: 14px;
}

.idea-description {
  color: #64748b;
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 10px;
}

.idea-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.idea-tag {
  background: #f1f5f9;
  color: #475569;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  border: 1px solid #e2e8f0;
}

.plan-item {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
  color: #334155;
}

.reminder-item {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.reminder-text {
  font-size: 13px;
  color: #334155;
  flex: 1;
}

.reminder-time {
  font-size: 12px;
}

.reminder-actions {
  display: flex;
  gap: 5px;
}

.reminder-action {
  padding: 4px 8px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 11px;
  cursor: pointer;
  color: #475569;
}

/* Інтерактивні форми */
.ai-form {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  margin: 15px 0;
}

.ai-form-header {
  margin-bottom: 20px;
}

.ai-form-header h4 {
  margin: 0 0 8px 0;
  color: #1e293b;
  font-size: 16px;
  font-weight: 600;
}

.ai-form-header p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.4;
}

.ai-form-fields {
  margin-bottom: 20px;
}

.ai-form-field {
  margin-bottom: 15px;
}

.ai-form-field label {
  display: block;
  font-size: 13px;
  color: #64748b;
  margin-bottom: 6px;
  font-weight: 500;
}

.ai-form-field input,
.ai-form-field select,
.ai-form-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
  background: white;
}

.ai-form-field textarea {
  min-height: 80px;
  resize: vertical;
}

.ai-form-field input:focus,
.ai-form-field select:focus,
.ai-form-field textarea:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.ai-form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.btn-primary {
  padding: 10px 20px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: #5a67d8;
  transform: translateY(-1px);
}

.btn-secondary {
  padding: 10px 20px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

/* Приклади AI */
.ai-examples {
  margin-top: 15px;
  padding: 15px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.ai-examples p {
  margin: 0 0 10px 0;
  font-weight: 600;
  color: #1e293b;
  font-size: 13px;
}

.ai-examples ul {
  margin: 0;
  padding-left: 20px;
}

.ai-examples li {
  margin-bottom: 8px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.4;
}

.ai-examples li:last-child {
  margin-bottom: 0;
}

/* Кнопки вибору */
.choice-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0;
}

.choice-btn {
  padding: 6px 12px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 15px;
  font-size: 12px;
  cursor: pointer;
  color: #475569;
  transition: all 0.2s ease;
}

.choice-btn:hover {
  background: #e2e8f0;
  border-color: #667eea;
}

.choice-btn.selected {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

/* Адаптивність */
@media (max-width: 768px) {
  .assistant-panel {
    width: 100vw;
    height: 100vh;
    bottom: 0;
    right: 0;
    border-radius: 0;
  }
  .assistant-button {
    bottom: 20px;
    right: 20px;
    position: fixed;
  }
  .chat-container {
    height: calc(100vh - 120px);
    border-radius: 0;
  }
  .chat-messages {
    padding: 15px;
  }
  .chat-input-container {
    padding: 15px;
  }
  .ai-form {
    margin: 10px 0;
    padding: 15px;
  }
  .ai-form-actions {
    flex-direction: column;
  }
  .btn-primary,
  .btn-secondary {
    width: 100%;
    text-align: center;
  }
}
/* Анімації */
.assistant-panel {
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes messageSlide {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* Завантаження */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 12px;
}

.loading {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 8px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
/* Сообщения загрузки */
.message.loading .message-content {
  display: flex;
  align-items: center;
  color: #64748b;
  font-style: italic;
}

.message.loading .message-content span {
  margin-left: 0;
}

/* Убираем все лишние анимации для загрузки */
.message.loading .message-content * {
  animation: none !important;
}

/* AI Actions */
.ai-actions {
  margin-top: 10px;
  padding: 10px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.ai-actions div {
  margin-bottom: 5px;
  font-size: 12px;
}

.ai-actions div:last-child {
  margin-bottom: 0;
}

/* Форма подтверждения AI */
.ai-confirmation-form {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 16px;
  margin: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.confirmation-header {
  margin-bottom: 16px;
}

.confirmation-header h4 {
  margin: 0 0 8px 0;
  color: #495057;
  font-size: 14px;
  font-weight: 600;
}

.confirmation-preview {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
  color: #495057;
  line-height: 1.4;
}

.confirmation-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.confirmation-actions button {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.confirmation-actions .btn-primary {
  background: #667eea;
  color: white;
}

.confirmation-actions .btn-primary:hover {
  background: #5a6fd8;
}

.confirmation-actions .btn-secondary {
  background: #6c757d;
  color: white;
}

.confirmation-actions .btn-secondary:hover {
  background: #5a6268;
}

/* Кнопка загрузки файлов */
.file-upload-button {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 8px 12px;
  margin-right: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 16px;
  display: inline-block;
  min-width: 40px;
  text-align: center;
  line-height: 1;
}

.file-upload-button:hover {
  background: #e9ecef;
  border-color: #dee2e6;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.file-upload-button:active {
  background: #dee2e6;
  transform: translateY(0);
}

/* Индикатор загрузки файла */
.file-upload-progress {
  background: #e9ecef;
  border-radius: 4px;
  height: 4px;
  margin: 8px 0;
  overflow: hidden;
}

.file-upload-progress-bar {
  background: #667eea;
  height: 100%;
  width: 0%;
  transition: width 0.3s ease;
}

/* Сообщение о файле */
.message-file {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 12px;
  margin: 8px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.message-file-icon {
  font-size: 20px;
}

.message-file-info {
  flex: 1;
}

.message-file-name {
  font-weight: 500;
  color: #495057;
  margin-bottom: 4px;
}

.message-file-size {
  font-size: 12px;
  color: #6c757d;
}

/* Стили для предложений клиентов */
.client-suggestion {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  margin: 8px 0;
  background: #f8fafc;
  transition: all 0.2s ease;
}

.client-suggestion:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.client-suggestion h5 {
  margin: 0 0 8px 0;
  color: #1e293b;
  font-size: 16px;
  font-weight: 600;
}

.client-suggestion p {
  margin: 4px 0;
  color: #64748b;
  font-size: 14px;
}

.client-suggestion h6 {
  margin: 0 0 8px 0;
  color: #475569;
  font-size: 14px;
  font-weight: 500;
}

.client-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.client-actions .btn-primary {
  margin: 4px;
  padding: 6px 12px;
  font-size: 12px;
  background: #3b82f6;
  border: none;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.client-actions .btn-primary:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.client-actions .btn-primary:active {
  transform: translateY(0);
}

/* Улучшенные стили для кнопок */
.btn-primary {
  background: #3b82f6;
  border: none;
  border-radius: 8px;
  color: white;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-block;
  text-decoration: none;
  text-align: center;
}

.btn-primary:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

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

.btn-secondary {
  background: #6b7280;
  border: none;
  border-radius: 8px;
  color: white;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-block;
  text-decoration: none;
  text-align: center;
}

.btn-secondary:hover {
  background: #4b5563;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(107, 114, 128, 0.3);
}

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

/* Стили для извлеченных данных */
.extracted-section {
  margin: 16px 0;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 4px solid #3b82f6;
}

.extracted-section h5 {
  margin: 0 0 8px 0;
  color: #1e293b;
  font-size: 14px;
  font-weight: 600;
}

.extracted-section ul {
  margin: 8px 0;
  padding-left: 20px;
}

.extracted-section li {
  margin: 4px 0;
  color: #475569;
  font-size: 14px;
}

.extracted-section p {
  margin: 8px 0 0 0;
  color: #1e293b;
  font-weight: 500;
}

/* Стили для предложений действий */
.action-suggestions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0;
}

.action-suggestion-btn {
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-suggestion-btn:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

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

.action-suggestion-btn::before {
  content: "⚡";
  font-size: 16px;
}

/* Улучшенные стили для сообщений */
.message.assistant .message-content h4 {
  margin: 0 0 16px 0;
  color: #1e293b;
  font-size: 16px;
  font-weight: 600;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 8px;
}

.message.assistant .message-content h5 {
  margin: 16px 0 8px 0;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
}

/* Анимации для новых элементов */
.extracted-section {
  animation: slideInUp 0.3s ease-out;
}

.action-suggestion-btn {
  animation: fadeInLeft 0.3s ease-out;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* Стили для сообщений с файлами */
.message-file {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 12px;
  background: #f1f5f9;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.file-icon {
  font-size: 16px;
  color: #64748b;
}

.file-name {
  font-weight: 500;
  color: #1e293b;
  font-size: 14px;
}

.file-size {
  color: #64748b;
  font-size: 12px;
}

/* Улучшенные стили для кнопки загрузки файлов */
.file-upload-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  min-width: 40px;
  text-align: center;
  line-height: 1;
}

.file-upload-button:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #475569;
}

.file-upload-button:active {
  transform: scale(0.98);
}

/* Индикатор загрузки файла */
.file-upload-progress {
  margin-top: 8px;
  padding: 8px;
  background: #f0f9ff;
  border-radius: 6px;
  border: 1px solid #bae6fd;
}

.file-upload-progress-bar {
  width: 100%;
  height: 4px;
  background: #e0f2fe;
  border-radius: 2px;
  overflow: hidden;
}

.file-upload-progress-bar::before {
  content: "";
  display: block;
  height: 100%;
  background: #0284c7;
  animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
  0% {
    width: 0%;
  }
  50% {
    width: 70%;
  }
  100% {
    width: 100%;
  }
}
/* Стили для preview секций в форме подтверждения */
.preview-section {
  margin: 16px 0;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.preview-section h4 {
  margin: 0 0 12px 0;
  color: #1e293b;
  font-size: 16px;
  font-weight: 600;
  border-bottom: 2px solid #3b82f6;
  padding-bottom: 8px;
}

.preview-section p {
  margin: 8px 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.5;
}

.preview-section strong {
  color: #1e293b;
  font-weight: 600;
}

/* Улучшенные стили для формы подтверждения */
.ai-confirmation-form {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  padding: 24px;
  margin: 16px 0;
  border: 1px solid #e2e8f0;
}

.confirmation-header {
  text-align: center;
  margin-bottom: 20px;
}

.confirmation-header h3 {
  margin: 0;
  color: #1e293b;
  font-size: 18px;
  font-weight: 600;
}

.confirmation-preview {
  background: #f8fafc;
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
  border: 1px solid #e2e8f0;
}

.confirmation-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
}

.confirmation-actions button {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-size: 14px;
}

.confirmation-actions .btn-primary {
  background: #3b82f6;
  color: white;
}

.confirmation-actions .btn-primary:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.confirmation-actions .btn-secondary {
  background: #6b7280;
  color: white;
}

.confirmation-actions .btn-secondary:hover {
  background: #4b5563;
  transform: translateY(-1px);
}

/* Стили для drag & drop зоны */
.file-drop-zone {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(59, 130, 246, 0.1);
  border: 3px dashed #3b82f6;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(4px);
}

.drop-zone-content {
  text-align: center;
  color: #1e293b;
}

.drop-zone-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.drop-zone-text {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.drop-zone-hint {
  font-size: 14px;
  color: #64748b;
}

/* Стили для сообщений с файлами */
.message-file {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.message-file .file-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.message-file .file-icon {
  font-size: 24px;
}

.message-file .file-details {
  flex: 1;
}

.message-file .file-name {
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
}

.message-file .file-size {
  font-size: 12px;
  color: #64748b;
}

.message-file .file-actions {
  display: flex;
  gap: 8px;
}

.message-file .btn-upload-file,
.message-file .btn-remove-file {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.message-file .btn-upload-file {
  background: #3b82f6;
  color: white;
}

.message-file .btn-upload-file:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

.message-file .btn-remove-file {
  background: #ef4444;
  color: white;
}

.message-file .btn-remove-file:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

/* Стили для drag over состояния */
.chat-container.drag-over {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
.dashboard-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.dashboard-layout .dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
}
@media (max-width: 768px) {
  .dashboard-layout .dashboard-header {
    padding: 12px 16px;
  }
}
.dashboard-layout .dashboard-content {
  flex: 1;
  padding: 24px;
}
@media (max-width: 768px) {
  .dashboard-layout .dashboard-content {
    padding: 16px;
  }
}
.dashboard-layout .dashboard-sidebar {
  width: 280px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
}
@media (max-width: 768px) {
  .dashboard-layout .dashboard-sidebar {
    display: none;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
.auth-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg-body);
}
.auth-layout .auth-container {
  width: 100%;
  max-width: 400px;
  padding: 24px;
}
@media (max-width: 768px) {
  .auth-layout .auth-container {
    padding: 16px;
  }
}
.auth-layout .auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.auth-layout .auth-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.auth-layout .auth-card {
  padding: 32px;
}
@media (max-width: 768px) {
  .auth-layout .auth-card {
    padding: 24px;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
.public-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.public-layout .public-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
}
@media (max-width: 768px) {
  .public-layout .public-header {
    padding: 12px 16px;
  }
}
.public-layout .public-content {
  flex: 1;
}
.public-layout .public-footer {
  padding: 24px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-muted);
}
@media (max-width: 768px) {
  .public-layout .public-footer {
    padding: 16px;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
.tasks-container {
  background: #f8f9fa;
  min-height: 100vh;
}
.tasks-container .page-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
@media (max-width: 768px) {
  .tasks-container .page-header-content {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }
}
.tasks-container .header-left {
  display: flex;
  flex-direction: row !important;
  gap: 12px;
  justify-content: flex-start;
}

.page-header {
  margin-bottom: 32px;
  background: white;
  border-radius: 4px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
@media (max-width: 768px) {
  .page-header {
    margin-bottom: 24px;
    padding: 16px;
    border-radius: 12px;
  }
}

.header-actions {
  display: flex;
  gap: 12px;
}

.filters-section {
  background: white;
  border-radius: 4px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
@media (max-width: 768px) {
  .filters-section {
    padding: 16px;
    border-radius: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 300px;
}
@media (max-width: 768px) {
  .search-box {
    min-width: auto;
  }
}
.search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  font-size: 16px;
}
.search-box .search-input {
  width: 100%;
  padding: 12px 12px 12px 40px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  background: var(--bg-primary);
  color: var(--text-primary);
}
.search-box .search-input::placeholder {
  color: var(--text-muted);
}
@media (max-width: 768px) {
  .search-box .search-input {
    padding: 14px 12px 14px 40px;
    font-size: 16px;
  }
}
.search-box .search-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.filter-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-select {
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  min-width: 150px;
  background: var(--bg-primary);
  color: var(--text-primary);
}
.filter-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.tasks-content {
  background: white;
  border-radius: 4px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
@media (max-width: 768px) {
  .tasks-content {
    padding: 16px;
    border-radius: 12px;
  }
}

.table-container {
  overflow-x: auto;
}
@media (max-width: 768px) {
  .table-container {
    overflow-x: visible;
  }
}

.tasks-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}
@media (max-width: 768px) {
  .tasks-table {
    display: block;
    margin-top: 12px;
  }
}
.tasks-table th, .tasks-table td {
  padding: 16px;
  text-align: left;
}
@media (max-width: 768px) {
  .tasks-table th, .tasks-table td {
    padding: 12px 8px;
  }
}
.tasks-table tr {
  border-bottom: 1px solid #e9ecef;
}
@media (max-width: 768px) {
  .tasks-table tr {
    display: block;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 12px;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
}
.tasks-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #495057;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
@media (max-width: 768px) {
  .tasks-table th {
    display: none;
  }
}
.tasks-table td {
  vertical-align: middle;
}
@media (max-width: 768px) {
  .tasks-table td {
    display: block;
    border: none;
    padding: 8px 0;
  }
  .tasks-table td:before {
    content: attr(data-label) ": ";
    font-weight: 600;
    color: #495057;
    margin-right: 8px;
  }
}
.tasks-table .task-row {
  transition: background-color 0.2s ease;
}
.tasks-table .task-row:hover {
  background: #f8f9fa;
}
@media (max-width: 768px) {
  .tasks-table .task-row:hover {
    background: white;
  }
}

.task-cell .task-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.task-cell .task-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}
.task-cell .task-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.task-cell .avatar-placeholder {
  width: 100%;
  height: 100%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
}
.task-cell .task-details {
  flex: 1;
}
.task-cell .task-name {
  font-weight: 600;
  color: #212529;
  margin-bottom: 4px;
  font-size: 14px;
  transition: color 0.2s ease;
}
.task-cell .task-name:hover {
  color: #007bff;
}
.task-cell .task-position {
  color: #6c757d;
  font-size: 12px;
}

.status-cell .status-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.status-cell .status-badge.status-open {
  background: rgba(0, 123, 255, 0.1);
  color: #007bff;
  border: 1px solid rgba(0, 123, 255, 0.3);
}
.status-cell .status-badge.status-in_progress {
  background: rgba(255, 193, 7, 0.1);
  color: #ffc107;
  border: 1px solid rgba(255, 193, 7, 0.3);
}
.status-cell .status-badge.status-completed {
  background: rgba(40, 167, 69, 0.1);
  color: #28a745;
  border: 1px solid rgba(40, 167, 69, 0.3);
}
.status-cell .status-badge.status-cancelled {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
  border: 1px solid rgba(220, 53, 69, 0.3);
}
.status-cell .status-badge.status-low {
  background: rgba(108, 117, 125, 0.1);
  color: #6c757d;
  border: 1px solid rgba(108, 117, 125, 0.3);
}
.status-cell .status-badge.status-medium {
  background: rgba(255, 193, 7, 0.1);
  color: #ffc107;
  border: 1px solid rgba(255, 193, 7, 0.3);
}
.status-cell .status-badge.status-high {
  background: rgba(255, 69, 0, 0.1);
  color: #ff4500;
  border: 1px solid rgba(255, 69, 0, 0.3);
}
.status-cell .status-badge.status-urgent {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
  border: 1px solid rgba(220, 53, 69, 0.3);
}

.company-cell .company-info .company-name {
  font-weight: 600;
  color: #212529;
  font-size: 14px;
}
.company-cell .no-company {
  color: #6c757d;
  font-style: italic;
  font-size: 12px;
}

.manager-cell .manager-info {
  display: flex;
  align-items: center;
  gap: 8px;
}
.manager-cell .manager-avatar .avatar-placeholder-small {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
}
.manager-cell .no-manager {
  color: #6c757d;
  font-style: italic;
  font-size: 12px;
}

.orders-cell .orders-info .orders-count {
  font-size: 12px;
  color: #6c757d;
  margin-bottom: 2px;
}
.orders-cell .orders-info .orders-amount {
  font-weight: 600;
  color: #212529;
  font-size: 14px;
}

.last-contact-cell {
  font-size: 14px;
  color: #495057;
}
.last-contact-cell .deadline-green {
  color: #055c05 !important;
}
.last-contact-cell .deadline-orange {
  color: #ff8800 !important;
}
.last-contact-cell .deadline-gray {
  color: #666666 !important;
}
.last-contact-cell .deadline-red {
  color: #ff0000 !important;
}

.deadline-bg-green {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
}

.deadline-bg-orange {
  background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%) !important;
}

.deadline-bg-gray {
  background: linear-gradient(135deg, #6c757d 0%, #495057 100%) !important;
}

.deadline-bg-red {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
}

.actions-cell .dropdown {
  position: relative;
}
.actions-cell .btn-icon {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #6c757d;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
}
.actions-cell .btn-icon:hover {
  background: #f8f9fa;
  color: #495057;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}
.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal .modal-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  width: 600px;
}
.modal .modal-content .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #dee2e6;
}
.modal .modal-content .modal-header h3 {
  margin: 0;
  color: #212529;
  font-size: 1.25rem;
}
.modal .modal-content .modal-header .close-modal {
  font-size: 1.5rem;
  cursor: pointer;
  color: #6c757d;
  transition: color 0.2s ease;
}
.modal .modal-content .modal-header .close-modal:hover {
  color: #212529;
}
.modal .modal-content .modal-body {
  padding: 1.5rem;
}

.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-weight: 600;
  color: #212529;
  margin-bottom: 8px;
  font-size: 14px;
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  font-size: 14px;
  background: white;
  color: #212529;
  transition: all 0.2s ease;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}
.form-group input::placeholder, .form-group textarea::placeholder, .form-group select::placeholder {
  color: #6c757d;
}
.form-group textarea {
  resize: vertical;
  min-height: 100px;
}
.form-group select {
  cursor: pointer;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #dee2e6;
}
@media (max-width: 768px) {
  .form-actions {
    flex-direction: column;
  }
  .form-actions .btn {
    width: 100%;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.btn.btn-primary {
  background: #007bff;
  color: white;
}
.btn.btn-primary:hover {
  background: #0056b3;
}
.btn.btn-sm {
  padding: 8px 16px;
  font-size: 12px;
}
.btn.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
}

.assignee-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.assignee-row .assignee-select-wrapper {
  flex: 1;
}
.assignee-row .assignee-cost-wrapper {
  flex: 1;
}
.assignee-row .assignee-select {
  width: 100%;
}
.assignee-row .assignee-cost {
  width: 100%;
}

.profit-display {
  padding: 12px 16px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  text-align: center;
}

.form-error {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(220, 53, 69, 0.1);
  border: 1px solid rgba(220, 53, 69, 0.3);
  border-radius: 8px;
  color: #dc3545;
  margin-bottom: 16px;
  font-size: 14px;
}

@media (max-width: 768px) {
  .tasks-container {
    padding: 16px;
  }
  .page-header {
    padding: 16px;
  }
  .filters-section {
    flex-direction: column;
    align-items: stretch;
  }
  .filters-section .search-box {
    min-width: auto;
  }
  .filters-section .filter-controls {
    justify-content: stretch;
  }
  .filters-section .filter-controls .filter-select {
    flex: 1;
  }
  .tasks-content {
    padding: 16px;
  }
  .table-container {
    overflow-x: auto;
  }
  .table-container .tasks-table {
    min-width: 800px;
  }
}
.task-detail-content {
  background: white;
  border-radius: 4px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 24px;
}

.task-main-info {
  margin-bottom: 32px;
}

.task-header {
  margin-bottom: 16px;
}

.task-title-section h2 {
  margin: 0 0 16px 0;
  color: #212529;
  font-size: 28px;
  font-weight: 600;
}

.task-badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.task-description p {
  margin: 0;
  color: #495057;
  font-size: 16px;
  line-height: 1.6;
}

.task-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.info-card .info-label {
  font-size: 12px;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.info-card .info-content {
  display: flex;
  align-items: center;
  gap: 12px;
}
.info-card .avatar-placeholder-small {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}
.info-card .assignee-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.info-card .icon-users,
.info-card .icon-fileText,
.info-card .icon-calendar {
  width: 32px;
  height: 32px;
  color: #6c757d;
  display: flex;
  align-items: center;
  justify-content: center;
}
.info-card .info-text {
  font-weight: 600;
  color: #212529;
  font-size: 14px;
}

.task-meta {
  display: flex;
  gap: 32px;
  padding-top: 24px;
  border-top: 1px solid #e9ecef;
}
.task-meta .meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.task-meta .meta-label {
  font-size: 12px;
  color: #6c757d;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.task-meta .meta-value {
  font-size: 14px;
  color: #495057;
  font-weight: 500;
}

.task-detail-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 24px;
  margin-top: 24px;
}

.publication-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: 16px;
}
.publication-controls .btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  padding: 8px 12px;
}
.publication-controls .btn .icon-lock,
.publication-controls .btn .icon-unlock,
.publication-controls .btn .icon-link,
.publication-controls .btn .icon-external-link {
  width: 16px;
  height: 16px;
}

.task-content-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.task-content-card {
  background: white;
  border-radius: 4px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}
.task-content-card .card-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e9ecef;
}
.task-content-card .card-header .header-content-wrapper {
  display: flex;
  align-items: center;
  flex-direction: row;
  width: 100%;
  flex-wrap: nowrap;
  justify-content: space-between;
}
.task-content-card .card-header .header-content-wrapper h3 {
  margin: 0;
  color: #212529;
  font-size: 18px;
  font-weight: 600;
}
.task-content-card .card-header .header-content-wrapper .header-right-content {
  display: flex;
  align-items: center;
  gap: 24px;
}
.task-content-card .card-header .header-content-wrapper .header-right-content .task-progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 120px;
}
.task-content-card .card-header .header-content-wrapper .header-right-content .task-progress .progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #6c757d;
}
.task-content-card .card-header .header-content-wrapper .header-right-content .task-progress .progress-info .progress-label {
  font-weight: 500;
}
.task-content-card .card-header .header-content-wrapper .header-right-content .task-progress .progress-info .progress-percentage {
  font-weight: 600;
  color: #495057;
}
.task-content-card .card-header .header-content-wrapper .header-right-content .task-progress .progress-bar {
  width: 100%;
  height: 6px;
  background: #e9ecef;
  border-radius: 3px;
  overflow: hidden;
}
.task-content-card .card-header .header-content-wrapper .header-right-content .task-progress .progress-bar .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #28a745, #20c997);
  border-radius: 3px;
  transition: width 0.3s ease;
}
.task-content-card .card-header .header-content-wrapper .header-right-content .task-progress .progress-bar .progress-fill[style*="0%"] {
  background: #6c757d;
}
.task-content-card .card-header .header-content-wrapper .header-right-content .task-progress .progress-bar .progress-fill[style*="50%"] {
  background: linear-gradient(90deg, #ffc107, #fd7e14);
}
.task-content-card .card-header .header-content-wrapper .header-right-content .task-progress .progress-bar .progress-fill[style*="100%"] {
  background: linear-gradient(90deg, #28a745, #20c997);
}
.task-content-card .card-header .header-content-wrapper .header-right-content .last-editor-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}
.task-content-card .card-header .header-content-wrapper .header-right-content .last-editor-info .editor-avatar {
  width: 32px;
  height: 32px;
  background: #007bff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
}
.task-content-card .card-header .header-content-wrapper .header-right-content .last-editor-info .editor-avatar .icon-user {
  width: 16px;
  height: 16px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E") no-repeat center;
  mask-size: contain;
}
.task-content-card .card-header .header-content-wrapper .header-right-content .last-editor-info .editor-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.task-content-card .card-header .header-content-wrapper .header-right-content .last-editor-info .editor-details .editor-name {
  font-size: 14px;
  font-weight: 600;
  color: #212529;
  line-height: 1.2;
}
.task-content-card .card-header .header-content-wrapper .header-right-content .last-editor-info .editor-details .last-edit-time {
  font-size: 11px;
  color: #6c757d;
  line-height: 1.2;
}

.task-content-body {
  padding: 24px;
}

.editor-content {
  min-height: 200px;
  line-height: 1.6;
  color: #495057;
}

.no-content {
  text-align: center;
  color: #6c757d;
  padding: 40px 20px;
}

.comments-section {
  background: white;
  border-radius: 4px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.comments-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e9ecef;
}
.comments-header h3 {
  margin: 0;
  color: #212529;
  font-size: 18px;
  font-weight: 600;
}

.comments-list {
  padding: 24px;
  max-height: 600px;
  overflow-y: auto;
}

.sidebar-tabs {
  display: flex;
  border-bottom: 1px solid #e9ecef;
}

.tab-button {
  flex: 1;
  padding: 16px 20px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  color: #6c757d;
  transition: all 0.2s ease;
}
.tab-button:hover {
  background: #f8f9fa;
  color: #495057;
}
.tab-button.active {
  color: #007bff;
  border-bottom: 2px solid #007bff;
}
.tab-button .comment-count {
  background: #e9ecef;
  color: #6c757d;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
}

.tab-content {
  display: none;
  padding: 24px;
}
.tab-content.active {
  display: block;
}

.task-info-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.info-section h4 {
  margin: 0 0 12px 0;
  color: #212529;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  border-radius: 8px;
}

.assignees-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.assignee-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
}

.assignee-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.assignee-info .assignee-name {
  font-weight: 600;
  color: #212529;
  font-size: 14px;
}
.assignee-info .assignee-cost {
  color: #6c757d;
  font-size: 12px;
}

.no-assignee {
  color: #6c757d;
  font-style: italic;
  font-size: 14px;
}

.related-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.related-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 6px;
  font-size: 14px;
  color: #495057;
}

.cost-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cost-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cost-item .cost-label {
  color: #6c757d;
  font-size: 14px;
}
.cost-item .cost-value {
  font-weight: 600;
  color: #212529;
  font-size: 14px;
}
.cost-item .cost-value.text-success {
  color: #28a745;
}
.cost-item .cost-value.text-danger {
  color: #dc3545;
}

.no-cost {
  color: #6c757d;
  font-style: italic;
  font-size: 14px;
}

.attachments-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.upload-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.file-input {
  padding: 8px 12px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  font-size: 14px;
}

.no-comments-message {
  text-align: center;
  padding: 40px 20px;
  color: #6c757d;
}
.no-comments-message .icon-messageCircle {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  opacity: 0.5;
}
.no-comments-message p {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 500;
}
.no-comments-message small {
  font-size: 12px;
  opacity: 0.8;
}

.sidebar-comments-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.reply-form {
  margin-top: 12px;
  padding: 12px;
  background: white;
  border-radius: 6px;
  border: 1px solid #dee2e6;
}
.reply-form .reply-form-content .reply-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 13px;
  resize: vertical;
  min-height: 60px;
  margin-bottom: 8px;
}
.reply-form .reply-form-content .reply-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}
.reply-form .reply-form-content .reply-form-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.reply-form .reply-form-content .reply-form-actions .btn {
  padding: 6px 12px;
  font-size: 12px;
}

.text-highlight {
  background: #fff3cd;
  border-radius: 2px;
  padding: 1px 2px;
  animation: highlightFade 3s ease-out;
}

@keyframes highlightFade {
  0% {
    background: #fff3cd;
  }
  70% {
    background: #fff3cd;
  }
  100% {
    background: transparent;
  }
}
.editorjs-container {
  min-height: 300px;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  background: #fff;
}
.editorjs-container .codex-editor {
  padding: 16px;
  border: none;
  box-shadow: none;
}
.editorjs-container .codex-editor__redactor {
  padding-bottom: 100px;
}
.editorjs-container .ce-block__content {
  max-width: 100%;
  margin: 0;
}
.editorjs-container .ce-toolbar__content {
  max-width: 100%;
}
.editorjs-container .ce-code__textarea {
  font-family: "Courier New", monospace;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  padding: 12px;
}
.editorjs-container .ce-table__cell {
  border: 1px solid #dee2e6;
  padding: 8px;
}
.editorjs-container .ce-table__add-row, .editorjs-container .ce-table__add-column {
  background: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
}
.editorjs-container .ce-table__add-row:hover, .editorjs-container .ce-table__add-column:hover {
  background: #0056b3;
}

.editor-content {
  min-height: 200px;
  padding: 16px;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  background: #fff;
  line-height: 1.6;
}
.editor-content .no-content {
  color: #6c757d;
  font-style: italic;
  text-align: center;
  padding: 40px 20px;
}
.editor-content p, .editor-content h1, .editor-content h2, .editor-content h3, .editor-content h4, .editor-content h5, .editor-content h6 {
  margin-bottom: 12px;
}
.editor-content p:last-child, .editor-content h1:last-child, .editor-content h2:last-child, .editor-content h3:last-child, .editor-content h4:last-child, .editor-content h5:last-child, .editor-content h6:last-child {
  margin-bottom: 0;
}
.editor-content ul, .editor-content ol {
  margin-bottom: 12px;
  padding-left: 20px;
}
.editor-content ul li, .editor-content ol li {
  margin-bottom: 4px;
  line-height: 1.5;
}
.editor-content ul {
  list-style-type: disc;
}
.editor-content ol {
  list-style-type: decimal;
}
.editor-content blockquote {
  border-left: 4px solid #007bff;
  padding-left: 16px;
  margin: 16px 0;
  font-style: italic;
  color: #495057;
}
.editor-content blockquote cite {
  display: block;
  font-size: 14px;
  color: #6c757d;
  margin-top: 8px;
}
.editor-content .checklist {
  list-style: none;
  padding-left: 0;
}
.editor-content .checklist li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.editor-content .checklist li input[type=checkbox] {
  margin: 0;
}
.editor-content .image-caption {
  text-align: center;
  font-style: italic;
  color: #6c757d;
  margin-top: 8px;
  font-size: 14px;
}
.editor-content .embed-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  margin: 16px 0;
}
.editor-content .embed-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.editor-content pre {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 5px;
  overflow-x: auto;
  border: 1px solid #e9ecef;
  margin: 16px 0;
}
.editor-content pre code {
  font-family: "Courier New", monospace;
  font-size: 14px;
}
.editor-content table {
  width: 100%;
  margin: 16px 0;
  border-collapse: collapse;
}
.editor-content table th, .editor-content table td {
  padding: 8px;
  border: 1px solid #dee2e6;
  text-align: left;
}
.editor-content table th {
  background-color: #f8f9fa;
  font-weight: 600;
}
.editor-content hr {
  border: none;
  border-top: 2px solid #e9ecef;
  margin: 24px 0;
}

@media (max-width: 1200px) {
  .task-detail-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .task-sidebar {
    position: static;
  }
}
.comment-box .comment-box-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-weight: 600;
  color: #495057;
  font-size: 14px;
}
.comment-box .comment-input {
  width: 100%;
  padding: 12px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  font-size: 14px;
  resize: vertical;
  min-height: 80px;
  margin-bottom: 12px;
}
.comment-box .comment-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}
.comment-box .comment-box-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.comment-form-container {
  margin-bottom: 20px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}
.comment-form-container .comment-form .form-group {
  margin-bottom: 12px;
}
.comment-form-container .comment-form .form-group textarea {
  resize: vertical;
  min-height: 80px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  padding: 12px;
  font-size: 14px;
}
.comment-form-container .comment-form .form-group textarea:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
.comment-form-container .comment-form button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
}

.comments-list .comment-item {
  padding: 16px 0;
  border-bottom: 1px solid #e9ecef;
}
.comments-list .comment-item:last-child {
  border-bottom: none;
}
.comments-list .comment-item .d-flex {
  margin-bottom: 8px;
}
.comments-list .comment-item .d-flex strong {
  font-weight: 600;
  color: #212529;
}
.comments-list .comment-item .d-flex small {
  color: #6c757d;
}
.comments-list .comment-item p {
  margin: 0;
  color: #495057;
  line-height: 1.5;
}

.ce-comment-block {
  position: relative;
  padding: 10px;
  border: 1px solid #ccc;
}

.comment-text {
  min-height: 80px;
  border: 1px solid #ddd;
  padding: 5px;
}

.comment-add-btn {
  margin-top: 5px;
}

.comment-list {
  margin-top: 10px;
  max-height: 100px;
  overflow-y: auto;
  border-top: 1px solid #eee;
  padding-top: 5px;
}

.comment-item {
  font-size: 12px;
  padding: 3px;
  cursor: pointer;
}

.comment-popup {
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  padding: 10px;
  border: 1px solid #ccc;
  z-index: 1000;
}

.comment-popup textarea {
  width: 200px;
  height: 80px;
}

.comment-popup button {
  margin: 5px;
}

.highlight {
  animation: highlightAnim 2s;
}

@keyframes highlightAnim {
  0% {
    background: yellow;
  }
  100% {
    background: transparent;
  }
}
.inline-comment {
  background-color: rgba(255, 235, 59, 0.3);
  cursor: pointer;
}

.comment-popup {
  background: white;
  border: 1px solid #ccc;
  padding: 8px;
  border-radius: 4px;
  z-index: 1000;
}

.searchable-select-container {
  position: relative;
  width: 100%;
}
.searchable-select-container.active .searchable-select-dropdown {
  display: block !important;
}
.searchable-select-container .searchable-select-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}
.searchable-select-container .searchable-select-input:focus {
  outline: none;
  border-color: #007bff;
}
.searchable-select-container .searchable-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  max-height: 200px;
  overflow-y: auto;
}
.searchable-select-container .searchable-select-dropdown .searchable-select-option {
  padding: 8px 12px;
  cursor: pointer;
}
.searchable-select-container .searchable-select-dropdown .searchable-select-option:hover {
  background-color: #f8f9fa;
}
.searchable-select-container .searchable-select-dropdown .searchable-select-option.no-results {
  color: #6c757d;
  font-style: italic;
  cursor: default;
}
.searchable-select-container .searchable-select-dropdown .searchable-select-option.no-results:hover {
  background-color: transparent;
}
.searchable-select-container .selected-option-display {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  font-size: 14px;
}
.searchable-select-container .selected-option-display:hover {
  border-color: #007bff;
}

.inline-edit {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 2px 6px;
  border-radius: 6px;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.inline-edit:hover {
  background: rgba(0, 0, 0, 0.04);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.inline-edit__btn {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="black"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a1.003 1.003 0 0 0 0-1.42l-2.34-2.34a1.003 1.003 0 0 0-1.42 0l-1.83 1.83 3.75 3.75 1.84-1.82z"/></svg>') center/16px 16px no-repeat;
  opacity: 0.5;
}

.inline-edit:hover .inline-edit__btn {
  opacity: 0.85;
}

.inline-edit__input, .inline-edit__textarea, .inline-edit__select, .inline-edit__date {
  font: inherit;
  color: inherit;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 6px 8px;
  background: #fff;
  outline: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.inline-edit__textarea {
  min-width: 420px;
  min-height: 90px;
}

.inline-edit--saving {
  opacity: 0.6;
  pointer-events: none;
}

/* ====== Все селекторы в неймспейсе .task-content-card, чтобы не били Bootstrap и main.css ====== */
.task-content-card .cdx-comment {
  position: relative;
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 4px;
  padding: 2px 6px;
  cursor: pointer;
  display: inline-block;
  margin: 0 2px;
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.task-content-card .codex-editor path {
  stroke: currentColor;
}

.task-content-card .cdx-comment:hover {
  background-color: #ffeaa7;
  border-color: #fdcb6e;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.task-content-card .cdx-comment.resolved {
  background-color: #d4edda;
  border-color: #c3e6cb;
  opacity: 0.8;
}

.task-content-card .cdx-comment.resolved::after {
  content: "✓";
  position: absolute;
  top: -5px;
  right: -5px;
  background: #28a745;
  color: white;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.task-content-card .cdx-comment::before {
  content: "";
  position: absolute;
  top: -8px;
  left: -8px;
  background: #ff9800;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.2s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 30 30' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z'/%3E%3Cpath d='M7 11h10'/%3E%3Cpath d='M7 15h6'/%3E%3Cpath d='M7 7h8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
}

.task-content-card .cdx-comment:hover::before {
  opacity: 1;
}

/* ====== Попап ====== */
.task-content-card .comment-popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #ffffff;
  padding: 20px;
  border: 1px solid #ff9800;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  width: 360px;
}

.task-content-card .comment-popup h3 {
  margin: 0 0 10px;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.task-content-card .comment-popup textarea {
  width: 100%;
  min-height: 100px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  resize: vertical;
}

.task-content-card .comment-popup .comment-popup-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.task-content-card .comment-popup .btn-save {
  background: #ff9800;
  color: white;
  padding: 8px 14px;
  border: none;
  border-radius: 3px;
  font-size: 14px;
  cursor: pointer;
}

.task-content-card .comment-popup .btn-save:hover {
  background: #fb8c00;
}

.task-content-card .comment-popup .btn-cancel {
  background: transparent;
  color: #555;
  padding: 8px 12px;
  border: none;
  font-size: 14px;
  cursor: pointer;
}

.task-content-card .comment-popup .btn-cancel:hover {
  text-decoration: underline;
}

/* Удалили глобальное .comment-popup button { background: blue } чтобы не красить все кнопки */
/* ====== Сайдбар с комментариями ====== */
.task-content-card .comments-sidebar {
  padding: 15px;
  max-height: 80vh;
  overflow-y: auto;
}

.task-content-card .sidebar-comment-item {
  margin-bottom: 15px;
  padding: 12px;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  background: #f8f9fa;
  transition: all 0.2s ease;
  cursor: pointer;
}

.task-content-card .sidebar-comment-item:hover {
  background: #e9ecef;
  border-color: #dee2e6;
}

.task-content-card .sidebar-comment-item.resolved {
  background: #d4edda;
  border-color: #c3e6cb;
  opacity: 0.85;
}

.task-content-card .comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.task-content-card .comment-author {
  font-weight: bold;
  color: #495057;
  font-size: 14px;
}

.task-content-card .comment-time {
  font-size: 12px;
  color: #6c757d;
}

.task-content-card .comment-fragment {
  font-size: 12px;
  color: #6c757d;
  margin-bottom: 6px;
  font-style: italic;
}

.task-content-card .comment-text {
  color: #495057;
  margin-bottom: 8px;
  line-height: 1.4;
}

.task-content-card .comment-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.task-content-card .comment-reply {
  margin-bottom: 8px;
  padding: 8px;
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  font-size: 13px;
}

/* Подсветка найденного фрагмента */
.task-content-card .comment-highlight {
  background-color: #fff9c4;
  transition: background-color 0.3s;
  animation: commentPulse 1.5s ease-in-out 1;
}

@keyframes commentPulse {
  0% {
    background-color: #fff9c4;
  }
  50% {
    background-color: #ffeb3b;
  }
  100% {
    background-color: #fff9c4;
  }
}
/* Сужение ширины контента Editor.js под макет */
.task-content-card .ce-toolbar__content {
  max-width: 1050px !important;
}

.task-content-card .ce-block__content {
  max-width: 1050px !important;
}

/* Аккуратные скроллбары только в правой колонке */
.task-content-card .comments-sidebar::-webkit-scrollbar {
  width: 3px;
}

.task-content-card .comments-sidebar::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 1.5px;
}

.task-content-card .comments-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.25);
}

.task-content-card .comments-sidebar {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.public-task-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}
@media (max-width: 768px) {
  .public-task-container {
    padding: 16px;
  }
}

.public-task-header {
  text-align: center;
  margin-bottom: 40px;
  padding: 30px 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px;
}
@media (max-width: 768px) {
  .public-task-header {
    padding: 20px 0;
    margin-bottom: 24px;
  }
}
.public-task-header .header-title h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  font-weight: 700;
}
@media (max-width: 768px) {
  .public-task-header .header-title h1 {
    font-size: 2rem;
  }
}
.public-task-header .header-title .page-subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
  margin: 0;
}
@media (max-width: 768px) {
  .public-task-header .header-title .page-subtitle {
    font-size: 1rem;
  }
}

.public-task-content {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}
@media (max-width: 768px) {
  .public-task-content {
    padding: 20px;
    border-radius: 8px;
  }
}

.no-content {
  text-align: center;
  color: #6c757d;
  padding: 40px 20px;
  font-style: italic;
}
.no-content p {
  margin: 0;
  font-size: 1.1rem;
}

@media (max-width: 768px) {
  .task-content-card .card-header {
    padding: 16px 20px;
  }
  .task-content-card .card-header .header-content-wrapper {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }
  .task-content-card .card-header .header-content-wrapper .header-right-content {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }
  .task-content-card .card-header .header-content-wrapper .header-right-content .task-progress {
    min-width: auto;
  }
  .task-content-card .card-header .header-content-wrapper .header-right-content .task-progress .progress-info {
    font-size: 11px;
  }
  .task-content-card .card-header .header-content-wrapper .header-right-content .last-editor-info {
    justify-content: center;
    padding: 12px;
  }
  .task-content-card .card-header .header-content-wrapper .header-right-content .last-editor-info .editor-avatar {
    width: 28px;
    height: 28px;
  }
  .task-content-card .card-header .header-content-wrapper .header-right-content .last-editor-info .editor-avatar .icon-user {
    width: 14px;
    height: 14px;
  }
  .task-content-card .card-header .header-content-wrapper .header-right-content .last-editor-info .editor-details .editor-name {
    font-size: 13px;
    text-align: center;
  }
  .task-content-card .card-header .header-content-wrapper .header-right-content .last-editor-info .editor-details .last-edit-time {
    font-size: 10px;
    text-align: center;
  }
}
@media (min-width: 768px) and (max-width: 1024px) {
  .task-content-card .card-header .header-content-wrapper .header-right-content {
    gap: 16px;
  }
  .task-content-card .card-header .header-content-wrapper .header-right-content .task-progress {
    min-width: 100px;
  }
  .task-content-card .card-header .header-content-wrapper .header-right-content .last-editor-info {
    padding: 6px 10px;
  }
  .task-content-card .card-header .header-content-wrapper .header-right-content .last-editor-info .editor-details .editor-name {
    font-size: 13px;
  }
  .task-content-card .card-header .header-content-wrapper .header-right-content .last-editor-info .editor-details .last-edit-time {
    font-size: 10px;
  }
}
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
.comments-sidebar {
  padding: 16px;
  max-height: 80vh;
  overflow-y: auto;
}
.comments-sidebar::-webkit-scrollbar {
  width: 4px;
}
.comments-sidebar::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 2px;
}
.comments-sidebar::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 2px;
}
.comments-sidebar::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.sidebar-comments-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-comment-item {
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 16px;
  transition: all 0.2s ease;
  cursor: pointer;
}
.sidebar-comment-item:hover {
  border-color: #007bff;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
  transform: translateY(-1px);
}
.sidebar-comment-item.resolved {
  background: #f8fff9;
  border-color: #28a745;
}
.sidebar-comment-item.resolved::before {
  content: "✓";
  position: absolute;
  top: -8px;
  right: -8px;
  background: #28a745;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f3f4;
}

.comment-author {
  font-weight: 600;
  color: #2c3e50;
  font-size: 14px;
}

.comment-time {
  font-size: 12px;
  color: #6c757d;
  font-weight: 500;
}

.comment-fragment {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #856404;
  font-style: italic;
  position: relative;
}
.comment-fragment::before {
  content: '"';
  font-size: 16px;
  color: #856404;
  margin-right: 4px;
}
.comment-fragment::after {
  content: '"';
  font-size: 16px;
  color: #856404;
  margin-left: 4px;
}

.comment-text {
  color: #495057;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 16px;
  word-wrap: break-word;
}

.comment-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.comment-actions .btn {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}
.comment-actions .btn.btn-outline-success {
  color: #28a745;
  border-color: #28a745;
  background: transparent;
}
.comment-actions .btn.btn-outline-success:hover {
  background: #28a745;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}
.comment-actions .btn.btn-outline-success.done {
  background: #28a745;
  color: white;
}
.comment-actions .btn.btn-outline-secondary {
  color: #6c757d;
  border-color: #6c757d;
  background: transparent;
}
.comment-actions .btn.btn-outline-secondary:hover {
  background: #6c757d;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(108, 117, 125, 0.2);
}
.comment-actions .btn.btn-outline-danger {
  color: #dc3545;
  border-color: #dc3545;
  background: transparent;
}
.comment-actions .btn.btn-outline-danger:hover {
  background: #dc3545;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
}

@media (max-width: 768px) {
  .comments-sidebar {
    padding: 12px;
  }
  .sidebar-comment-item {
    padding: 12px;
  }
  .sidebar-comment-item .comment-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .sidebar-comment-item .comment-actions {
    flex-direction: column;
  }
  .sidebar-comment-item .comment-actions .btn {
    width: 100%;
    justify-content: center;
  }
}
@keyframes commentSlideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.sidebar-comment-item {
  animation: commentSlideIn 0.3s ease-out;
}

.comments-sidebar:empty::after {
  content: "Нет комментариев";
  display: block;
  text-align: center;
  color: #6c757d;
  font-style: italic;
  padding: 40px 20px;
  font-size: 14px;
}

.reviews-section {
  margin-top: 24px;
}

.reviews-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}
.reviews-card .card-header {
  background: #f8f9fa;
  padding: 16px 20px;
  border-bottom: 1px solid #e9ecef;
}
.reviews-card .card-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}
.reviews-card .card-body {
  padding: 20px;
}

.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.review-item {
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 16px;
  background: #f8f9fa;
}

.review-header {
  margin-bottom: 12px;
}

.review-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.review-url {
  font-size: 14px;
  color: #007bff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.review-url:hover {
  text-decoration: underline;
}

.review-screenshot {
  margin-top: 12px;
}

.screenshot-image {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid #dee2e6;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.screenshot-image:hover {
  transform: scale(1.02);
}

.reviews-sidebar {
  padding: 16px;
}

.sidebar-reviews-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-review-item {
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 12px;
  background: #f8f9fa;
}
.sidebar-review-item .review-header {
  margin-bottom: 8px;
}
.sidebar-review-item .review-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar-review-item .review-date {
  font-size: 12px;
  color: #6c757d;
  font-weight: 500;
}
.sidebar-review-item .review-url {
  font-size: 12px;
  color: #007bff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}
.sidebar-review-item .review-url:hover {
  text-decoration: underline;
}
.sidebar-review-item .review-screenshot {
  margin-top: 8px;
}

.sidebar-screenshot-image {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid #dee2e6;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.sidebar-screenshot-image:hover {
  transform: scale(1.02);
}

.review-url-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.review-url-popup-content {
  background: white;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  max-width: 400px;
  width: 90%;
}
.review-url-popup-content h3 {
  margin: 0 0 16px 0;
  color: #333;
}
.review-url-popup-content p {
  margin: 0 0 16px 0;
  color: #666;
}
.review-url-popup-content input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 16px;
}

.review-url-popup-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}
.review-url-popup-actions button {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}
.review-url-popup-actions button.btn-orange {
  background: #ff6600;
  color: white;
}
.review-url-popup-actions button.btn-outline-secondary {
  background: transparent;
  color: #666;
  border: 1px solid #ddd;
}

.screenshot-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  cursor: pointer;
}
.screenshot-modal img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.mark {
  padding: 0 0.15em;
  border-radius: 2px;
}
.mark.mark-yellow {
  background: #fff3b0;
}
.mark.mark-green {
  background: #c8f7c5;
}
.mark.mark-pink {
  background: #ffd6e7;
}

.ce-inline-toolbar .cm-btn {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ce-inline-toolbar .cm-btn[data-color=yellow] {
  background: #fff3b0;
}
.ce-inline-toolbar .cm-btn[data-color=green] {
  background: #c8f7c5;
}
.ce-inline-toolbar .cm-btn[data-color=pink] {
  background: #ffd6e7;
}

.notification .notification-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.notification .notification-content .notification-message {
  flex: 1;
  margin-right: 10px;
}
.notification .notification-content .notification-close {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.notification .notification-content .notification-close:hover {
  opacity: 0.8;
}

.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 30px;
  padding: 20px 0;
  border-top: 1px solid #e9ecef;
}
.pagination-container .pagination-info {
  color: #6c757d;
  font-size: 14px;
}
.pagination-container .pagination-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}
.pagination-container .pagination-controls .btn {
  min-width: 40px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.pagination-container .pagination-controls .btn.btn-primary {
  background: #007bff;
  border-color: #007bff;
  color: white;
}
.pagination-container .pagination-controls .pagination-ellipsis {
  padding: 8px 12px;
  color: #6c757d;
  font-size: 14px;
}

.payments-info .payment-item:hover,
.info-grid .info-item:hover {
  background: transparent;
  transform: none;
  box-shadow: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
.clients-container {
  background: #f8f9fa;
  min-height: 100vh;
}
.clients-container .page-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
@media (max-width: 768px) {
  .clients-container .page-header-content {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }
}
.clients-container .header-left {
  display: flex;
  align-items: flex-start !important;
  flex-direction: column;
  gap: 0px !important;
}

.page-header {
  margin-bottom: 32px;
  background: var(--bg-primary);
  border-radius: 4px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
@media (max-width: 768px) {
  .page-header {
    margin-bottom: 24px;
    padding: 16px;
    border-radius: 12px;
  }
}

.header-actions {
  display: flex;
  gap: 12px;
}

.filters-section {
  background: var(--bg-primary);
  border-radius: 4px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
@media (max-width: 768px) {
  .filters-section {
    padding: 16px;
    border-radius: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 300px;
}
.search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  font-size: 16px;
}
.search-box .search-input {
  width: 100%;
  padding: 12px 12px 12px 40px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  background: var(--bg-primary);
  color: var(--text-primary);
}
.search-box .search-input::placeholder {
  color: var(--text-muted);
}
.search-box .search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.filter-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-select {
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  min-width: 150px;
  background: var(--bg-primary);
  color: var(--text-primary);
}
.filter-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.clients-content {
  background: var(--bg-primary);
  border-radius: 4px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.table-container {
  overflow-x: auto;
}

.clients-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}
.clients-table th, .clients-table td {
  padding: 16px;
  text-align: left;
}
.clients-table tr {
  border-bottom: 1px solid #e9ecef;
}
.clients-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #495057;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.clients-table td {
  vertical-align: middle;
}
.clients-table .client-row {
  transition: background-color 0.2s ease;
}
.clients-table .client-row:hover {
  background: #f8f9fa;
}

.client-cell .client-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.client-cell .client-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}
.client-cell .client-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.client-cell .avatar-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
}
.client-cell .client-details {
  flex: 1;
}
.client-cell .client-name {
  font-weight: 600;
  color: #212529;
  margin-bottom: 4px;
}
.client-cell .client-position {
  font-size: 12px;
  color: #6c757d;
}

.contacts-cell .contact-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.contacts-cell .contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.contacts-cell .contact-item i {
  color: #6c757d;
  font-size: 12px;
}
.contacts-cell .contact-item span {
  color: #495057;
}

.company-cell .company-info .company-name {
  font-weight: 600;
  color: #212529;
  margin-bottom: 4px;
}
.company-cell .company-info .tax-id {
  font-size: 12px;
  color: #6c757d;
}
.company-cell .no-company {
  color: #6c757d;
  font-style: italic;
}

.status-cell .status-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.status-cell .status-active {
  background: #d4edda;
  color: #155724;
}
.status-cell .status-inactive {
  background: #f8d7da;
  color: #721c24;
}
.status-cell .status-lead {
  background: #fff3cd;
  color: #856404;
}
.status-cell .status-potential {
  background: #d1ecf1;
  color: #0c5460;
}

.manager-cell .manager-info {
  display: flex;
  align-items: center;
  gap: 8px;
}
.manager-cell .manager-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  overflow: hidden;
}
.manager-cell .manager-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.manager-cell .avatar-placeholder-small {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 10px;
}
.manager-cell .no-manager {
  color: #6c757d;
  font-style: italic;
}

.orders-cell .orders-info .orders-count {
  font-weight: 600;
  color: #212529;
  margin-bottom: 4px;
}
.orders-cell .orders-info .orders-amount {
  font-size: 14px;
  color: #28a745;
  font-weight: 600;
}

.last-contact-cell,
.created-at-cell {
  font-size: 14px;
  color: #6c757d;
}

.actions-cell .dropdown {
  position: relative;
}
.actions-cell .btn-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e9ecef;
}

.pagination-info {
  color: #6c757d;
  font-size: 14px;
}

.pagination-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}
.pagination-controls .btn {
  padding: 8px 12px;
  font-size: 14px;
}
.pagination-controls .pagination-ellipsis {
  color: #6c757d;
  padding: 8px 12px;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}
.modal .modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 0;
  border-radius: 4px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal .modal-header {
  padding: 24px 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal .modal-header h3 {
  margin: 0;
  color: #212529;
  font-size: 20px;
  font-weight: 600;
}
.modal .modal-header .close-modal {
  font-size: 24px;
  cursor: pointer;
  color: #6c757d;
}
.modal .modal-header .close-modal:hover {
  color: #212529;
}
.modal form {
  padding: 24px;
}
.modal .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.modal .form-group {
  display: flex;
  flex-direction: column;
}
.modal .form-group label {
  margin-bottom: 8px;
  font-weight: 600;
  color: #495057;
  font-size: 14px;
}
.modal .form-group input, .modal .form-group select, .modal .form-group textarea {
  padding: 12px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  font-size: 14px;
}
.modal .form-group input:focus, .modal .form-group select:focus, .modal .form-group textarea:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}
.modal .form-group textarea {
  resize: vertical;
  min-height: 80px;
}
.modal .form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e9ecef;
}

@media (max-width: 768px) {
  .clients-container {
    padding: 16px;
  }
  .filters-section {
    flex-direction: column;
    align-items: stretch;
  }
  .filters-section .search-box {
    min-width: auto;
  }
  .clients-table {
    font-size: 12px;
  }
  .clients-table th, .clients-table td {
    padding: 8px;
  }
  .modal .form-row {
    grid-template-columns: 1fr;
  }
}
.manager-select {
  position: relative;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: white;
  font-size: 14px;
  transition: border-color 0.2s ease;
}
.manager-select:focus {
  outline: none;
  border-color: #2196f3;
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}
.manager-select option {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.manager-select option::before {
  content: "";
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f0f0f0;
  display: inline-block;
  margin-right: 8px;
}

.manager-select-wrapper {
  position: relative;
}
.manager-select-wrapper .manager-select-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: white;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.manager-select-wrapper .manager-select-input:focus {
  outline: none;
  border-color: #2196f3;
  box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}
.manager-select-wrapper .manager-select-input .selected-managers {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.manager-select-wrapper .manager-select-input .selected-managers .manager-tag {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  background: #e3f2fd;
  border-radius: 12px;
  font-size: 11px;
  color: #1976d2;
}
.manager-select-wrapper .manager-select-input .selected-managers .manager-tag .manager-avatar-small {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #1976d2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: white;
}
.manager-select-wrapper .manager-select-input .selected-managers .manager-tag .manager-avatar-small img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.manager-select-wrapper .manager-select-input .selected-managers .manager-tag .remove-manager {
  cursor: pointer;
  font-weight: bold;
  margin-left: 2px;
}
.manager-select-wrapper .manager-select-input .selected-managers .manager-tag .remove-manager:hover {
  color: #d32f2f;
}
.manager-select-wrapper .manager-select-input .selected-managers .no-managers {
  color: #666;
  font-style: italic;
  font-size: 13px;
}
.manager-select-wrapper .manager-select-input .dropdown-arrow {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}
.manager-select-wrapper .manager-select-input.open .dropdown-arrow {
  transform: rotate(180deg);
}
.manager-select-wrapper .manager-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  max-height: 300px;
  overflow-y: auto;
  display: none;
  margin-top: 4px;
}
.manager-select-wrapper .manager-dropdown.open {
  display: block !important;
}
.manager-select-wrapper .manager-dropdown .search-input {
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-bottom: 1px solid #e0e0e0;
  font-size: 13px;
}
.manager-select-wrapper .manager-dropdown .search-input:focus {
  outline: none;
}
.manager-select-wrapper .manager-dropdown .manager-option {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.manager-select-wrapper .manager-dropdown .manager-option:hover {
  background-color: #f5f5f5;
}
.manager-select-wrapper .manager-dropdown .manager-option .manager-checkbox {
  flex-shrink: 0;
}
.manager-select-wrapper .manager-dropdown .manager-option .manager-checkbox input[type=checkbox] {
  display: none;
}
.manager-select-wrapper .manager-dropdown .manager-option .manager-checkbox label {
  width: 16px;
  height: 16px;
  border: 2px solid #ddd;
  border-radius: 3px;
  display: block;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}
.manager-select-wrapper .manager-dropdown .manager-option .manager-checkbox label:hover {
  border-color: #2196f3;
}
.manager-select-wrapper .manager-dropdown .manager-option .manager-checkbox input[type=checkbox]:checked + label {
  background-color: #2196f3;
  border-color: #2196f3;
}
.manager-select-wrapper .manager-dropdown .manager-option .manager-checkbox input[type=checkbox]:checked + label::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 10px;
  font-weight: bold;
}
.manager-select-wrapper .manager-dropdown .manager-option .manager-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  color: #666;
  flex-shrink: 0;
}
.manager-select-wrapper .manager-dropdown .manager-option .manager-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.manager-select-wrapper .manager-dropdown .manager-option .manager-info {
  flex: 1;
}
.manager-select-wrapper .manager-dropdown .manager-option .manager-info .manager-name {
  font-weight: 500;
  color: #333;
  font-size: 13px;
  margin-bottom: 2px;
}
.manager-select-wrapper .manager-dropdown .manager-option .manager-info .manager-email {
  font-size: 11px;
  color: #666;
}
.manager-select-wrapper .manager-dropdown .no-results {
  padding: 16px;
  text-align: center;
  color: #666;
  font-style: italic;
}

.form-error {
  background: #ffebee;
  border: 1px solid #f44336;
  border-radius: 8px;
  padding: 12px 16px;
  margin: 16px 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #d32f2f;
  font-size: 14px;
}
.form-error i {
  color: #f44336;
  font-size: 16px;
  flex-shrink: 0;
}
.form-error span {
  flex: 1;
}

.progress-container {
  padding: 20px 24px 0;
  margin-bottom: 20px;
}
.progress-container .progress-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}
.progress-container .progress-text #progressPercent {
  font-weight: 600;
  color: var(--primary-color);
}
.progress-container .progress-bar {
  width: 100%;
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  margin-bottom: 20px;
  overflow: hidden;
}
.progress-container .progress-bar .progress-fill {
  height: 100%;
  background: var(--primary-color);
  border-radius: 2px;
  transition: width 0.3s ease;
  width: 33.33%;
}
.progress-container .step-indicators {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.progress-container .step-indicators .step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: #666;
  position: relative;
  transition: all 0.3s ease;
}
.progress-container .step-indicators .step-circle.active {
  background: var(--primary-color);
  color: white;
}
.progress-container .step-indicators .step-circle.completed {
  background: var(--primary-color);
  color: white;
}
.progress-container .step-indicators .step-circle.completed .icon-check {
  display: block !important;
}
.progress-container .step-indicators .step-circle.completed span {
  display: none;
}
.progress-container .step-indicators .step-circle .icon-check {
  width: 16px;
  height: 16px;
}
.progress-container .step-indicators .step-line {
  width: 40px;
  height: 2px;
  background: #e0e0e0;
  transition: background 0.3s ease;
}
.progress-container .step-indicators .step-line.completed {
  background: var(--primary-color);
}

.form-step {
  padding: 0 20px;
}
.form-step .step-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e0e0e0;
}
.form-step .step-header i {
  width: 20px;
  height: 20px;
  color: var(--primary-color);
}
.form-step .step-header h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}
.form-step .form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.form-step .form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}
.form-step .form-group {
  margin-bottom: 16px;
}
.form-step .form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--text-primary);
  font-size: 13px;
}
.form-step .form-group input, .form-step .form-group select, .form-step .form-group textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  transition: border-color 0.3s ease;
}
.form-step .form-group input:focus, .form-step .form-group select:focus, .form-step .form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(255, 102, 0, 0.1);
}
.form-step .form-group input.error, .form-step .form-group select.error, .form-step .form-group textarea.error {
  border-color: #f44336;
}
.form-step .form-group input::placeholder, .form-step .form-group select::placeholder, .form-step .form-group textarea::placeholder {
  color: #999;
  font-size: 13px;
}
.form-step .form-group .input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.form-step .form-group .input-wrapper input, .form-step .form-group .input-wrapper select, .form-step .form-group .input-wrapper textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  transition: border-color 0.3s ease;
}
.form-step .form-group .input-wrapper input:focus, .form-step .form-group .input-wrapper select:focus, .form-step .form-group .input-wrapper textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(255, 102, 0, 0.1);
}
.form-step .form-group .input-wrapper input.error, .form-step .form-group .input-wrapper select.error, .form-step .form-group .input-wrapper textarea.error {
  border-color: #f44336;
}
.form-step .form-group .input-wrapper i {
  position: absolute;
  left: 10px;
  color: #666;
  width: 14px;
  height: 14px;
  pointer-events: none;
}
.form-step .form-group .input-wrapper input {
  padding-left: 32px;
}
.form-step .form-group .input-wrapper .icon-more-vertical {
  position: absolute;
  right: 10px;
  left: auto;
  cursor: pointer;
  color: #999;
}
.form-step .form-group .input-wrapper .icon-more-vertical:hover {
  color: var(--primary-color);
}
.form-step .form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-top: 1px solid #e0e0e0;
  margin-top: 20px;
}
.form-actions .btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}
.form-actions .btn.btn-outline {
  background: white;
  color: var(--text-primary);
  border: 1px solid #ddd;
}
.form-actions .btn.btn-outline:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}
.form-actions .btn.btn-primary {
  background: var(--primary-color);
  color: white;
}
.form-actions .btn.btn-primary:hover {
  background: #e65100;
}

.client-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.client-modal.active {
  opacity: 1;
  visibility: visible;
}
.client-modal .modal-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}
.modal.active .client-modal .modal-content {
  transform: translateY(0);
}
.client-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e0e0e0;
}
.client-modal .modal-header h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--primary-color);
  margin: 0;
}
.client-modal .modal-header .close-modal {
  font-size: 24px;
  color: #999;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}
.client-modal .modal-header .close-modal:hover {
  background: #f5f5f5;
  color: #666;
}
.client-modal .progress-container {
  padding: 0 24px 16px;
}
.client-modal .progress-container .progress-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.client-modal .progress-container .progress-text .step-text {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}
.client-modal .progress-container .progress-text .step-percentage {
  font-size: 14px;
  color: var(--primary-color);
  font-weight: 600;
}
.client-modal .progress-container .progress-bar {
  width: 100%;
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  margin-bottom: 16px;
  overflow: hidden;
}
.client-modal .progress-container .progress-bar .progress-fill {
  height: 100%;
  background: var(--primary-color);
  border-radius: 2px;
  transition: width 0.3s ease;
  width: 33.33%;
}
.client-modal .progress-container .step-indicators {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.client-modal .progress-container .step-indicators .step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: #999;
  background: white;
  position: relative;
  transition: all 0.3s ease;
}
.client-modal .progress-container .step-indicators .step-circle.active {
  border-color: var(--primary-color);
  background: var(--primary-color);
  color: white;
}
.client-modal .progress-container .step-indicators .step-circle.completed {
  border-color: var(--primary-color);
  background: var(--primary-color);
  color: white;
}
.client-modal .progress-container .step-indicators .step-circle.completed i {
  display: block !important;
}
.client-modal .progress-container .step-indicators .step-circle.completed span {
  display: none;
}
.client-modal .progress-container .step-indicators .step-circle i {
  width: 16px;
  height: 16px;
  color: white;
}
.client-modal .progress-container .step-indicators .step-line {
  flex: 1;
  height: 2px;
  background: #e0e0e0;
  margin: 0 8px;
}
.client-modal .progress-container .step-indicators .step-line.active {
  background: var(--primary-color);
}
.client-modal .form-error {
  margin: 0 24px 16px;
  padding: 12px 16px;
  background: #ffebee;
  border: 1px solid #ffcdd2;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #c62828;
  font-size: 14px;
}
.client-modal .form-error i {
  width: 16px;
  height: 16px;
  color: #c62828;
  flex-shrink: 0;
}
.client-modal .form-actions {
  display: flex;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid #e0e0e0;
  background: #fafafa;
}
.client-modal .form-actions button {
  flex: 1;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}
.client-modal .form-actions button.btn-cancel {
  background: #f5f5f5;
  color: #666;
}
.client-modal .form-actions button.btn-cancel:hover {
  background: #e0e0e0;
}
.client-modal .form-actions button.btn-next, .client-modal .form-actions button.btn-submit {
  background: var(--primary-color);
  color: white;
}
.client-modal .form-actions button.btn-next:hover, .client-modal .form-actions button.btn-submit:hover {
  background: #e65100;
}
.client-modal .form-actions button.btn-next:disabled, .client-modal .form-actions button.btn-submit:disabled {
  background: #ccc;
  cursor: not-allowed;
}

#clientModal .modal-content {
  width: 50vw !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
.deals-container {
  padding: 1.5rem;
}
.deals-container .page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}
.deals-container .page-header .page-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}
.deals-container .page-header .page-header-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.deals-container .page-filters {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.deals-container .page-filters .search-box {
  position: relative;
  min-width: 300px;
}
.deals-container .page-filters .search-box .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}
.deals-container .page-filters .search-box .search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.9rem;
  background: var(--bg-primary);
  color: var(--text-primary);
}
.deals-container .page-filters .search-box .search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
}
.deals-container .page-filters .search-box .search-input::placeholder {
  color: var(--text-muted);
}
.deals-container .page-filters .filter-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.deals-container .page-filters .filter-controls select {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
}
.deals-container .page-filters .filter-controls select:focus {
  outline: none;
  border-color: var(--primary-color);
}
.deals-container .svg-icon {
  width: 16px;
  height: 16px;
  color: currentColor;
  flex-shrink: 0;
}
.deals-container .svg-icon svg {
  width: 100%;
  height: 100%;
}
.deals-container .btn-icon .svg-icon {
  width: 18px;
  height: 18px;
}
.deals-container .search-icon {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}
.deals-container .view-toggle .btn .svg-icon {
  width: 18px;
  height: 18px;
  margin-right: 8px;
}
.deals-container .header-actions .btn .svg-icon {
  width: 18px;
  height: 18px;
  margin-right: 8px;
}
.deals-container .info-row .svg-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  margin-right: 8px;
}
.deals-container .deals-grid.list-view .table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-color);
  overflow: hidden;
}
.deals-container .deals-grid.list-view .table-container .deals-table {
  width: 100%;
  border-collapse: collapse;
}
.deals-container .deals-grid.list-view .table-container .deals-table thead {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}
.deals-container .deals-grid.list-view .table-container .deals-table thead th {
  padding: 16px;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
  border-bottom: 1px solid var(--border-color);
}
.deals-container .deals-grid.list-view .table-container .deals-table tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.2s ease;
}
.deals-container .deals-grid.list-view .table-container .deals-table tbody tr:hover {
  background: var(--bg-hover);
}
.deals-container .deals-grid.list-view .table-container .deals-table tbody tr:last-child {
  border-bottom: none;
}
.deals-container .deals-grid.list-view .table-container .deals-table tbody td {
  padding: 16px;
  vertical-align: top;
}
.deals-container .deals-grid.list-view .table-container .deal-cell .deal-info .deal-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  font-size: 16px;
}
.deals-container .deals-grid.list-view .table-container .deal-cell .deal-info .deal-description {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.4;
}
.deals-container .deals-grid.list-view .table-container .client-cell .client-info .client-name {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.deals-container .deals-grid.list-view .table-container .client-cell .client-info .client-contact {
  color: var(--text-muted);
  font-size: 13px;
}
.deals-container .deals-grid.list-view .table-container .client-cell .no-client {
  color: var(--text-muted);
  font-style: italic;
}
.deals-container .deals-grid.list-view .table-container .status-cell .status-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.deals-container .deals-grid.list-view .table-container .status-cell .status-badge.status-new {
  background: #e3f2fd;
  color: #1976d2;
}
.deals-container .deals-grid.list-view .table-container .status-cell .status-badge.status-in_progress {
  background: #fff3e0;
  color: #f57c00;
}
.deals-container .deals-grid.list-view .table-container .status-cell .status-badge.status-negotiations {
  background: #f3e5f5;
  color: #7b1fa2;
}
.deals-container .deals-grid.list-view .table-container .status-cell .status-badge.status-won {
  background: #e8f5e8;
  color: #388e3c;
}
.deals-container .deals-grid.list-view .table-container .status-cell .status-badge.status-completed {
  background: #e0f2f1;
  color: #00796b;
}
.deals-container .deals-grid.list-view .table-container .status-cell .status-badge.status-cancelled {
  background: #ffebee;
  color: #d32f2f;
}
.deals-container .deals-grid.list-view .table-container .amount-cell .amount-info .amount {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 2px;
}
.deals-container .deals-grid.list-view .table-container .amount-cell .amount-info .currency {
  font-size: 13px;
  color: var(--text-muted);
}
.deals-container .deals-grid.list-view .table-container .amount-cell .no-amount {
  color: var(--text-muted);
  font-style: italic;
}
.deals-container .deals-grid.list-view .table-container .manager-cell .manager-info {
  display: flex;
  align-items: center;
  gap: 8px;
}
.deals-container .deals-grid.list-view .table-container .manager-cell .manager-info .manager-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
}
.deals-container .deals-grid.list-view .table-container .manager-cell .manager-info .manager-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.deals-container .deals-grid.list-view .table-container .manager-cell .manager-info .manager-avatar .avatar-placeholder-small {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}
.deals-container .deals-grid.list-view .table-container .manager-cell .manager-info span {
  color: var(--text-primary);
  font-size: 14px;
}
.deals-container .deals-grid.list-view .table-container .manager-cell .no-manager {
  color: var(--text-muted);
  font-style: italic;
}
.deals-container .deals-grid.list-view .table-container .deadline-cell span {
  color: var(--text-primary);
  font-size: 14px;
}
.deals-container .deals-grid.list-view .table-container .deadline-cell .no-deadline {
  color: var(--text-muted);
  font-style: italic;
}
.deals-container .deals-grid.list-view .table-container .tasks-cell .tasks-info .tasks-count {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
  font-size: 14px;
}
.deals-container .deals-grid.list-view .table-container .tasks-cell .tasks-info .tasks-progress .progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 4px;
}
.deals-container .deals-grid.list-view .table-container .tasks-cell .tasks-info .tasks-progress .progress-bar .progress-fill {
  height: 100%;
  background: var(--primary-color);
  border-radius: 3px;
  transition: width 0.3s ease;
}
.deals-container .deals-grid.list-view .table-container .tasks-cell .tasks-info .tasks-progress .progress-text {
  font-size: 12px;
  color: var(--text-muted);
}
.deals-container .deals-grid.list-view .table-container .created-at-cell span {
  color: var(--text-primary);
  font-size: 14px;
}
.deals-container .deals-grid.list-view .table-container .actions-cell .dropdown {
  position: relative;
}
.deals-container .deals-grid.list-view .table-container .actions-cell .dropdown .btn-icon {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: white;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.deals-container .deals-grid.list-view .table-container .actions-cell .dropdown .btn-icon:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.deals-container .deals-grid.list-view .table-container .actions-cell .dropdown .btn-icon .svg-icon {
  width: 16px;
  height: 16px;
}
.deals-container .deals-grid.list-view .table-container .actions-cell .dropdown .dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1000;
  min-width: 200px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 8px 0;
  margin-top: 4px;
}
.deals-container .deals-grid.list-view .table-container .actions-cell .dropdown .dropdown-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  transition: background-color 0.2s ease;
}
.deals-container .deals-grid.list-view .table-container .actions-cell .dropdown .dropdown-menu .dropdown-item:hover {
  background: var(--bg-hover);
}
.deals-container .deals-grid.list-view .table-container .actions-cell .dropdown .dropdown-menu .dropdown-item .svg-icon {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
}
.deals-container .deals-grid.list-view .table-container .actions-cell .dropdown .dropdown-menu .dropdown-item.text-danger {
  color: #dc3545;
}
.deals-container .deals-grid.list-view .table-container .actions-cell .dropdown .dropdown-menu .dropdown-item.text-danger .svg-icon {
  color: #dc3545;
}
.deals-container .deals-grid.list-view .table-container .actions-cell .dropdown .dropdown-menu .dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 8px 0;
}
.deals-container .deals-grid.grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
}
.deals-container .deals-grid.grid-view .deal-card {
  background: var(--bg-primary);
  border-radius: 4px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}
.deals-container .deals-grid.grid-view .deal-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}
.deals-container .deals-grid.grid-view .deal-card .deal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.deals-container .deals-grid.grid-view .deal-card .deal-header .deal-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  flex: 1;
  margin-right: 1rem;
}
.deals-container .deals-grid.grid-view .deal-card .deal-header .deal-actions {
  display: flex;
  gap: 0.5rem;
}
.deals-container .deals-grid.grid-view .deal-card .deal-header .deal-actions .btn-icon {
  padding: 0.5rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.deals-container .deals-grid.grid-view .deal-card .deal-header .deal-actions .btn-icon:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}
.deals-container .deals-grid.grid-view .deal-card .deal-status {
  margin-bottom: 1rem;
}
.deals-container .deals-grid.grid-view .deal-card .deal-status .status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
}
.deals-container .deals-grid.grid-view .deal-card .deal-status .status-badge.status-new {
  background: #e3f2fd;
  color: #1976d2;
}
.deals-container .deals-grid.grid-view .deal-card .deal-status .status-badge.status-in_progress {
  background: #fff3e0;
  color: #f57c00;
}
.deals-container .deals-grid.grid-view .deal-card .deal-status .status-badge.status-negotiations {
  background: #f3e5f5;
  color: #7b1fa2;
}
.deals-container .deals-grid.grid-view .deal-card .deal-status .status-badge.status-won {
  background: #e8f5e8;
  color: #388e3c;
}
.deals-container .deals-grid.grid-view .deal-card .deal-status .status-badge.status-completed {
  background: #e0f2f1;
  color: #00796b;
}
.deals-container .deals-grid.grid-view .deal-card .deal-status .status-badge.status-cancelled {
  background: #ffebee;
  color: #d32f2f;
}
.deals-container .deals-grid.grid-view .deal-card .deal-info {
  margin-bottom: 1.5rem;
}
.deals-container .deals-grid.grid-view .deal-card .deal-info .info-row {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
}
.deals-container .deals-grid.grid-view .deal-card .deal-info .info-row .info-label {
  font-weight: 500;
  color: var(--text-secondary);
  min-width: 80px;
  margin-right: 0.5rem;
}
.deals-container .deals-grid.grid-view .deal-card .deal-info .info-row .info-value {
  color: var(--text-primary);
  flex: 1;
}
.deals-container .deals-grid.grid-view .deal-card .deal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.deals-container .deals-grid.grid-view .deal-card .deal-footer .deal-amount .amount {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-color);
}
.deals-container .deals-grid.grid-view .deal-card .deal-footer .deal-amount .currency {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-left: 0.25rem;
}
.deals-container .deals-grid.grid-view .deal-card .deal-footer .deal-amount .no-amount {
  color: var(--text-muted);
  font-style: italic;
}
.deals-container .deals-grid.grid-view .deal-card .deal-footer .deal-probability .probability {
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
}
.deals-container .kanban-board {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding-bottom: 1rem;
}
.deals-container .kanban-board .kanban-column {
  min-width: 300px;
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.deals-container .kanban-board .kanban-column.drag-over {
  border-color: #2196f3;
  background: rgba(33, 150, 243, 0.02);
  box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
  transform: scale(1.01);
}
.deals-container .kanban-board .kanban-column .kanban-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.deals-container .kanban-board .kanban-column .kanban-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}
.deals-container .kanban-board .kanban-column .kanban-header .deal-count {
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}
.deals-container .kanban-board .kanban-column .kanban-content {
  padding: 1rem;
  min-height: 200px;
  transition: all 0.2s ease;
}
.deals-container .kanban-board .kanban-column .kanban-content.drag-over {
  background: rgba(33, 150, 243, 0.1);
  border: 2px dashed #2196f3;
  transform: scale(1.02);
}
.deals-container .kanban-board .kanban-column .kanban-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  cursor: grab;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  animation: cardAppear 0.3s ease-out;
}
.deals-container .kanban-board .kanban-column .kanban-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}
.deals-container .kanban-board .kanban-column .kanban-card:active {
  cursor: grabbing;
}
.deals-container .kanban-board .kanban-column .kanban-card.dragging {
  opacity: 0.7;
  transform: rotate(3deg) scale(1.05);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  border-color: #2196f3;
  background: rgba(33, 150, 243, 0.05);
  transition: all 0.1s ease;
}
.deals-container .kanban-board .kanban-column .kanban-card.drag-over {
  border-color: #2196f3;
  background: rgba(33, 150, 243, 0.05);
  box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.3);
}
.deals-container .kanban-board .kanban-column .kanban-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}
.deals-container .kanban-board .kanban-column .kanban-card .card-header h4 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  flex: 1;
  margin-right: 0.5rem;
}
.deals-container .kanban-board .kanban-column .kanban-card .card-header .card-actions .btn-icon {
  padding: 0.25rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.deals-container .kanban-board .kanban-column .kanban-card .card-header .card-actions .btn-icon:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}
.deals-container .kanban-board .kanban-column .kanban-card .card-info .company {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}
.deals-container .kanban-board .kanban-column .kanban-card .card-info .amount {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}
.deals-container .kanban-board .kanban-column .kanban-card .card-info .deadline {
  font-size: 0.8rem;
  color: var(--text-muted);
}
@keyframes cardAppear {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.btn.btn-primary {
  background: var(--primary-color);
  color: white;
}
.btn.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}
.btn.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--primary-color);
}

@media (max-width: 1200px) {
  .deals-container .deals-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}
@media (max-width: 768px) {
  .deals-container {
    padding: 1rem;
  }
  .deals-container .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  .deals-container .page-header .page-header-content {
    justify-content: space-between;
  }
  .deals-container .page-filters {
    flex-direction: column;
    align-items: stretch;
  }
  .deals-container .page-filters .search-box {
    min-width: auto;
  }
  .deals-container .page-filters .filter-controls {
    justify-content: space-between;
    flex-wrap: wrap;
  }
  .deals-container .deals-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .deals-container .deals-grid.list-view .table-container {
    overflow-x: auto;
  }
  .deals-container .deals-grid.list-view .table-container .deals-table {
    min-width: 800px;
  }
  .deals-container .deals-grid.list-view .deal-card {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  .deals-container .deals-grid.list-view .deal-card .deal-header {
    min-width: auto;
  }
  .deals-container .deals-grid.list-view .deal-card .deal-info {
    flex-direction: column;
    gap: 0.5rem;
  }
  .deals-container .deals-grid.list-view .deal-card .deal-info .info-row {
    min-width: auto;
    justify-content: space-between;
  }
  .deals-container .deals-grid.list-view .deal-card .deal-footer {
    margin-left: 0;
    text-align: left;
    min-width: auto;
  }
  .deals-container .deals-grid .deal-card {
    padding: 1rem;
  }
  .deals-container .deals-grid .deal-card .deal-header .deal-actions {
    opacity: 1;
  }
  .deals-container .deals-grid .deal-card .deal-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.header-actions .view-toggle {
  display: flex;
  gap: 0.25rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 0.25rem;
}
.header-actions .view-toggle .btn {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}
.header-actions .view-toggle .btn.active {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.header-actions .view-toggle .btn:hover:not(.active) {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.header-actions .view-toggle .btn .svg-icon {
  width: 18px;
  height: 18px;
  margin-right: 8px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
.calendar-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  border: 1px solid #f0f0f0;
}

.calendar-header {
  padding: 20px;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
}

.calendar-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.calendar-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.calendar-filters {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-group label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.filter-group select {
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  background: white;
}

.event-type-toggle {
  display: flex;
  gap: 5px;
}

.event-type-btn {
  padding: 6px 12px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.event-type-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.quick-add-btn {
  padding: 8px 16px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease;
}
.quick-add-btn:hover {
  background: var(--primary-dark);
}

.calendar-body {
  padding: 20px;
}

.fc {
  font-family: inherit;
}
.fc .fc-toolbar {
  margin-bottom: 20px !important;
}
.fc .fc-toolbar .fc-toolbar-title {
  font-size: 1.25rem !important;
  font-weight: 600 !important;
  color: var(--text-primary) !important;
}
.fc .fc-toolbar .fc-button {
  background: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  font-weight: 500 !important;
  padding: 8px 16px !important;
}
.fc .fc-toolbar .fc-button:hover {
  background: var(--primary-hover) !important;
  border-color: var(--primary-dark) !important;
}
.fc .fc-toolbar .fc-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
}
.fc .fc-today-button.fc-button.fc-button-primary {
  cursor: pointer !important;
  color: #fff !important;
}
.fc .fc-dayGridMonth-button.fc-button.fc-button-primary {
  cursor: pointer !important;
  color: #000 !important;
  border: 1px solid var(--primary-color) !important;
  margin-right: 5px;
  background-color: var(--bg-primary) !important;
}
.fc .fc-dayGridMonth-button.fc-button.fc-button-primary.fc-button-active {
  background: var(--primary-color) !important;
  color: #fff !important;
}
.fc .fc-timeGridWeek-button.fc-button.fc-button-primary {
  cursor: pointer !important;
  color: #000 !important;
  border: 1px solid var(--primary-color) !important;
  margin-right: 5px;
  background-color: var(--bg-primary) !important;
}
.fc .fc-timeGridWeek-button.fc-button.fc-button-primary.fc-button-active {
  background: var(--primary-color) !important;
  color: #fff !important;
}
.fc .fc-timeGridDay-button.fc-button.fc-button-primary {
  cursor: pointer !important;
  color: #000 !important;
  border: 1px solid var(--primary-color) !important;
  background-color: var(--bg-primary) !important;
}
.fc .fc-timeGridDay-button.fc-button.fc-button-primary.fc-button-active {
  background: var(--primary-color) !important;
  color: #fff !important;
}
.fc .fc-prev-button {
  margin-right: 5px;
}
.fc .fc-col-header-cell {
  text-align: left !important;
  padding: 12px 8px !important;
}
.fc .fc-col-header-cell .fc-col-header-cell-cushion {
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  color: var(--text-primary) !important;
}
.fc .fc-daygrid-day-number {
  font-weight: 300 !important;
  font-size: 1rem !important;
}
.fc .fc-daygrid-day-number.has-events {
  font-weight: 600 !important;
}
.fc .fc-daygrid-day {
  cursor: pointer;
  position: relative;
  border: 1px solid #f8f9fa !important;
}
.fc .fc-daygrid-day:hover {
  background-color: #fafafa;
}
.fc .fc-daygrid-day .quick-add-day-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
  opacity: 0;
  line-height: 1;
}
.fc .fc-daygrid-day .quick-add-day-btn:hover {
  opacity: 1 !important;
  transform: scale(1.1);
  background: var(--primary-dark);
}
.fc .fc-daygrid-day:hover .quick-add-day-btn {
  display: flex;
}
.fc .fc-daygrid-day.fc-day-today .quick-add-day-btn {
  display: none;
}
.fc .fc-event,
.fc .fc-daygrid-event,
.fc .fc-daygrid-dot-event,
.fc .fc-daygrid-event-harness a {
  border-radius: 4px !important;
  border: none !important;
  font-size: 0.85rem !important;
  padding: 4px 8px !important;
  margin: 1px 0 !important;
  cursor: pointer !important;
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  min-height: 24px !important;
}
.fc .fc-event:hover,
.fc .fc-daygrid-event:hover,
.fc .fc-daygrid-dot-event:hover,
.fc .fc-daygrid-event-harness a:hover {
  opacity: 0.8;
}
.fc .fc-event .fc-event-title,
.fc .fc-daygrid-event .fc-event-title,
.fc .fc-daygrid-dot-event .fc-event-title,
.fc .fc-daygrid-event-harness a .fc-event-title {
  font-weight: 500 !important;
  color: white !important;
}
.fc .fc-event .fc-event-time,
.fc .fc-daygrid-event .fc-event-time,
.fc .fc-daygrid-dot-event .fc-event-time,
.fc .fc-daygrid-event-harness a .fc-event-time {
  display: none !important;
}
.fc .fc-event .fc-daygrid-event-dot,
.fc .fc-daygrid-event .fc-daygrid-event-dot,
.fc .fc-daygrid-dot-event .fc-daygrid-event-dot,
.fc .fc-daygrid-event-harness a .fc-daygrid-event-dot {
  display: none !important;
}
.fc .fc-event::before,
.fc .fc-daygrid-event::before,
.fc .fc-daygrid-dot-event::before,
.fc .fc-daygrid-event-harness a::before {
  content: "";
  width: 12px;
  height: 12px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
}
.fc .fc-event.task-event,
.fc .fc-daygrid-event.task-event,
.fc .fc-daygrid-dot-event.task-event,
.fc .fc-daygrid-event-harness a.task-event {
  background-color: #28a745 !important;
}
.fc .fc-event.task-event::before,
.fc .fc-daygrid-event.task-event::before,
.fc .fc-daygrid-dot-event.task-event::before,
.fc .fc-daygrid-event-harness a.task-event::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
}
.fc .fc-event.meeting-event,
.fc .fc-daygrid-event.meeting-event,
.fc .fc-daygrid-dot-event.meeting-event,
.fc .fc-daygrid-event-harness a.meeting-event {
  background-color: #000000 !important;
}
.fc .fc-event.meeting-event::before,
.fc .fc-daygrid-event.meeting-event::before,
.fc .fc-daygrid-dot-event.meeting-event::before,
.fc .fc-daygrid-event-harness a.meeting-event::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E");
}
.fc .fc-event.deadline-event,
.fc .fc-daygrid-event.deadline-event,
.fc .fc-daygrid-dot-event.deadline-event,
.fc .fc-daygrid-event-harness a.deadline-event {
  background-color: #dc3545 !important;
}
.fc .fc-event.deadline-event::before,
.fc .fc-daygrid-event.deadline-event::before,
.fc .fc-daygrid-dot-event.deadline-event::before,
.fc .fc-daygrid-event-harness a.deadline-event::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E");
}
.fc .fc-event.reminder-event,
.fc .fc-daygrid-event.reminder-event,
.fc .fc-daygrid-dot-event.reminder-event,
.fc .fc-daygrid-event-harness a.reminder-event {
  background-color: #ffc107 !important;
}
.fc .fc-event.reminder-event::before,
.fc .fc-daygrid-event.reminder-event::before,
.fc .fc-daygrid-dot-event.reminder-event::before,
.fc .fc-daygrid-event-harness a.reminder-event::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z'/%3E%3C/svg%3E");
}
.fc .fc-event.call-event,
.fc .fc-daygrid-event.call-event,
.fc .fc-daygrid-dot-event.call-event,
.fc .fc-daygrid-event-harness a.call-event {
  background-color: #17a2b8 !important;
}
.fc .fc-event.call-event::before,
.fc .fc-daygrid-event.call-event::before,
.fc .fc-daygrid-dot-event.call-event::before,
.fc .fc-daygrid-event-harness a.call-event::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z'/%3E%3C/svg%3E");
}
.fc .fc-daygrid-day-events {
  margin: 2px 0 !important;
}
.fc .fc-daygrid-event-harness {
  margin: 1px 0 !important;
}
.fc .fc-daygrid-event-harness-abs {
  position: static !important;
  visibility: visible !important;
}
.fc .fc-daygrid-event-harness-abs a {
  position: static !important;
  display: block !important;
}
.fc .fc-daygrid-more-link {
  background: var(--primary-color) !important;
  color: white !important;
  border-radius: 12px !important;
  padding: 2px 6px !important;
  font-size: 0.7rem !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 2px !important;
  cursor: pointer !important;
}
.fc .fc-daygrid-more-link:hover {
  background: var(--primary-dark) !important;
  text-decoration: none !important;
}
.fc .fc-daygrid-more-link::after {
  content: "▼";
  font-size: 0.6rem;
  margin-left: 2px;
}

.event-detail-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}
.event-detail-modal .event-detail-content {
  background-color: white;
  margin: 2% auto;
  padding: 0;
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}
.event-detail-modal .event-detail-header {
  padding: 20px 24px 16px 24px;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  align-items: center;
  justify-content: space-between;
  align-items: flex-start;
}
.event-detail-modal .event-detail-header .event-detail-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.event-detail-modal .event-detail-header .event-type-badge {
  background: #fd7e14;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}
.event-detail-modal .event-detail-header .event-time {
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.event-detail-modal .event-detail-header .event-detail-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-size: 24px;
  color: #999;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}
.event-detail-modal .event-detail-header .event-detail-close:hover {
  background: #f8f9fa;
  color: var(--text-primary);
}
.event-detail-modal .event-detail-body {
  padding: 24px;
}
.event-detail-modal .event-detail-body .event-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px 0;
  line-height: 1.3;
}
.event-detail-modal .event-detail-body .event-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 16px 0;
}
.event-detail-modal .event-detail-body .event-location {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 24px;
}
.event-detail-modal .event-detail-body .event-location i {
  color: #6c757d;
}
.event-detail-modal .event-detail-body .event-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
.event-detail-modal .event-detail-body .event-info-section {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 16px;
}
.event-detail-modal .event-detail-body .event-info-section h4 {
  margin: 0 0 12px 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.event-detail-modal .event-detail-body .event-info-section .client-info,
.event-detail-modal .event-detail-body .event-info-section .deal-info,
.event-detail-modal .event-detail-body .event-info-section .task-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.event-detail-modal .event-detail-body .event-info-section .client-avatar,
.event-detail-modal .event-detail-body .event-info-section .deal-avatar,
.event-detail-modal .event-detail-body .event-info-section .task-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
}
.event-detail-modal .event-detail-body .event-info-section .client-details,
.event-detail-modal .event-detail-body .event-info-section .deal-details,
.event-detail-modal .event-detail-body .event-info-section .task-details {
  flex: 1;
}
.event-detail-modal .event-detail-body .event-info-section .client-name,
.event-detail-modal .event-detail-body .event-info-section .deal-title,
.event-detail-modal .event-detail-body .event-info-section .task-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.event-detail-modal .event-detail-body .event-info-section .client-company,
.event-detail-modal .event-detail-body .event-info-section .deal-amount,
.event-detail-modal .event-detail-body .event-info-section .task-assignee {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.event-detail-modal .event-detail-body .event-info-section .event-info-actions {
  margin-top: 12px;
}
.event-detail-modal .event-detail-body .event-info-section .event-info-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s ease;
}
.event-detail-modal .event-detail-body .event-info-section .event-info-btn:hover {
  background: var(--primary-dark);
  text-decoration: none;
  color: white;
}
.event-detail-modal .event-detail-body .ai-recommendations {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
}
.event-detail-modal .event-detail-body .ai-recommendations h4 {
  margin: 0 0 12px 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.event-detail-modal .event-detail-body .ai-recommendations h4 i {
  color: #fd7e14;
}
.event-detail-modal .event-detail-body .ai-recommendations ul {
  margin: 0;
  padding-left: 20px;
}
.event-detail-modal .event-detail-body .ai-recommendations li {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 6px;
}
.event-detail-modal .event-detail-body .recent-messages {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 16px;
}
.event-detail-modal .event-detail-body .recent-messages h4 {
  margin: 0 0 16px 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.event-detail-modal .event-detail-body .recent-messages h4 i {
  color: #6c757d;
}
.event-detail-modal .event-detail-body .recent-messages .message-item {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e9ecef;
}
.event-detail-modal .event-detail-body .recent-messages .message-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.event-detail-modal .event-detail-body .recent-messages .message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.event-detail-modal .event-detail-body .recent-messages .message-content {
  flex: 1;
}
.event-detail-modal .event-detail-body .recent-messages .message-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.event-detail-modal .event-detail-body .recent-messages .message-author {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.85rem;
}
.event-detail-modal .event-detail-body .recent-messages .message-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.event-detail-modal .event-detail-body .recent-messages .message-source {
  background: #e9ecef;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 0.7rem;
}
.event-detail-modal .event-detail-body .recent-messages .message-time {
  color: var(--text-secondary);
}
.event-detail-modal .event-detail-body .recent-messages .message-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.4;
}

.legend {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}
.legend .legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.legend .legend-color {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.fc-popover {
  background: white !important;
  border: 1px solid #ddd !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  padding: 10px !important;
  max-width: 300px !important;
  max-height: 400px !important;
  overflow-y: auto !important;
}
.fc-popover .fc-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px !important;
  padding-bottom: 8px !important;
  border-bottom: 1px solid #eee !important;
}
.fc-popover .fc-popover-header .fc-popover-title {
  font-weight: 600 !important;
  color: var(--text-primary) !important;
  font-size: 0.9rem !important;
}
.fc-popover .fc-popover-header .fc-popover-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-size: 18px !important;
  color: #999 !important;
  width: 20px !important;
  height: 20px !important;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fc-popover .fc-popover-header .fc-popover-close:hover {
  color: var(--text-primary) !important;
}
.fc-popover .fc-popover-body {
  padding: 0 !important;
}
.fc-popover .fc-popover-body .fc-event {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 0 !important;
  border-bottom: 1px solid #f5f5f5 !important;
  cursor: pointer !important;
  transition: background 0.2s ease;
  border: none !important;
  background: transparent !important;
  color: var(--text-primary) !important;
}
.fc-popover .fc-popover-body .fc-event:last-child {
  border-bottom: none !important;
}
.fc-popover .fc-popover-body .fc-event:hover {
  background: #f8f9fa !important;
}
.fc-popover .fc-popover-body .fc-event .fc-event-title {
  font-weight: 500 !important;
  font-size: 0.85rem !important;
  color: var(--text-primary) !important;
  margin-bottom: 2px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.fc-popover .fc-popover-body .fc-event .fc-event-time {
  font-size: 0.75rem !important;
  color: var(--text-secondary) !important;
}
.fc-popover .fc-popover-add-event {
  margin-top: 10px !important;
  padding-top: 10px !important;
  border-top: 1px solid #eee !important;
}
.fc-popover .fc-popover-add-event .fc-popover-add-btn {
  width: 100% !important;
  padding: 6px 12px !important;
  background: var(--primary-color) !important;
  color: white !important;
  border: none !important;
  border-radius: 4px !important;
  font-size: 0.8rem !important;
  cursor: pointer !important;
  transition: background 0.2s ease;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
}
.fc-popover .fc-popover-add-event .fc-popover-add-btn:hover {
  background: var(--primary-dark) !important;
}
.fc-popover .fc-popover-add-event .fc-popover-add-btn i {
  font-size: 0.7rem !important;
}

@media (max-width: 768px) {
  .calendar-header {
    flex-direction: column;
    align-items: stretch;
  }
  .calendar-controls {
    justify-content: space-between;
  }
  .calendar-filters {
    justify-content: center;
  }
  .fc .fc-toolbar {
    flex-direction: column;
    gap: 10px;
  }
  .fc .fc-toolbar-chunk {
    display: flex;
    justify-content: center;
  }
  .fc-popover {
    max-width: 280px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }
  .event-detail-modal .event-detail-content {
    margin: 5% auto;
    width: 95%;
    max-height: 95vh;
  }
  .event-detail-modal .event-info-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .event-detail-modal .event-detail-header {
    padding: 16px 20px 12px 20px;
  }
  .event-detail-modal .event-detail-body {
    padding: 20px;
  }
  .event-detail-modal .event-title {
    font-size: 1.25rem;
  }
}
.fc-daygrid-day-top {
  display: flex !important;
  flex-direction: row !important;
}

.fc-daygrid-day-number {
  color: #000000 !important;
  text-decoration: none;
}

.event-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal .modal-content {
  background: white;
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.modal .modal-content .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #eee;
}
.modal .modal-content .modal-header h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
}
.modal .modal-content .modal-header .close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal .modal-content .modal-header .close:hover {
  color: var(--text-primary);
}
.modal .modal-content .modal-body {
  padding: 24px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.search-dropdown {
  position: relative;
}
.search-dropdown input[type=text] {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
}
.search-dropdown input[type=text]:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}
.search-dropdown .dropdown-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 4px 4px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.search-dropdown .dropdown-list.show {
  display: block;
}
.search-dropdown .dropdown-list .dropdown-item {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f5f5f5;
}
.search-dropdown .dropdown-list .dropdown-item:last-child {
  border-bottom: none;
}
.search-dropdown .dropdown-list .dropdown-item:hover {
  background: #f8f9fa;
}
.search-dropdown .dropdown-list .dropdown-item .item-title {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.search-dropdown .dropdown-list .dropdown-item .item-subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.event-type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}
.event-type-card:hover {
  border-color: var(--primary-color);
  background: #f8f9fa;
  transform: translateY(-2px);
}
.event-type-card.selected {
  border-color: var(--primary-color);
  background: var(--primary-color);
  color: white;
}
.event-type-card.selected .event-type-icon {
  color: white;
}
.event-type-card.selected .event-type-title,
.event-type-card.selected .event-type-description {
  color: white;
}
.event-type-card .event-type-icon {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 12px;
  transition: color 0.2s ease;
}
.event-type-card .event-type-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 4px;
  transition: color 0.2s ease;
}
.event-type-card .event-type-description {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.3;
  transition: color 0.2s ease;
}

.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-primary);
}
.form-group input[type=text],
.form-group input[type=date],
.form-group input[type=time],
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.9rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: border 0.2s ease;
}
.form-group input[type=text]::placeholder,
.form-group input[type=date]::placeholder,
.form-group input[type=time]::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}
.form-group input[type=text]:focus,
.form-group input[type=date]:focus,
.form-group input[type=time]:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.25);
}
.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}
.form-actions .btn {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}
.form-actions .btn.btn-primary {
  background: var(--primary-color);
  color: white;
}
.form-actions .btn.btn-primary:hover {
  background: var(--primary-hover);
}
.form-actions .btn.btn-secondary {
  background: #6c757d;
  color: white;
}
.form-actions .btn.btn-secondary:hover {
  background: #5a6268;
}

#quick-add-modal .modal-content {
  max-width: 50vw !important;
}

.search-dropdown .dropdown-list .dropdown-header {
  padding: 8px 12px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.search-dropdown .dropdown-list .dropdown-separator {
  padding: 8px 12px;
  text-align: center;
  border-bottom: 1px solid #e9ecef;
  font-size: 0.75rem;
  color: #6c757d;
  background: #f8f9fa;
}

.search-dropdown .dropdown-list .dropdown-loading {
  padding: 12px;
  text-align: center;
  color: #6c757d;
  font-style: italic;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
.users-container {
  background: #f8f9fa;
  min-height: 100vh;
}
.users-container .page-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.users-container .header-left {
  display: flex;
  align-items: flex-start !important;
  flex-direction: column;
  gap: 0px !important;
}

.page-header {
  margin-bottom: 32px;
  background: white;
  border-radius: 4px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.page-subtitle {
  margin: 0;
  color: #6c757d;
  font-size: 16px;
}

.header-actions {
  display: flex;
  gap: 12px;
}

.users-content {
  background: white;
  border-radius: 4px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.table-container {
  overflow-x: auto;
}

.users-table {
  width: 100%;
  border-collapse: collapse;
}
.users-table th, .users-table td {
  padding: 16px;
  text-align: left;
}
.users-table tr {
  border-bottom: 1px solid #e9ecef;
}
.users-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #495057;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.users-table td {
  vertical-align: middle;
}
.users-table .user-row {
  transition: background-color 0.2s ease;
}
.users-table .user-row:hover {
  background: #f8f9fa;
}
.users-table .user-row.inactive-user {
  background: #f2dcdc;
}
.users-table .user-row.inactive-user:hover {
  background: #f0d0d0;
}
.users-table .user-row.inactive-user .user-name {
  color: #6c757d;
}
.users-table .user-row.inactive-user .user-position {
  color: #adb5bd;
}

.user-cell .user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.user-cell .user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}
.user-cell .user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.user-cell .avatar-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
}
.user-cell .user-details {
  flex: 1;
}
.user-cell .user-name {
  font-weight: 600;
  color: #212529;
  margin-bottom: 4px;
}
.user-cell .user-position {
  font-size: 12px;
  color: #6c757d;
}

.contacts-cell .contact-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.contacts-cell .contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.contacts-cell .contact-item div {
  color: #6c757d;
  font-size: 12px;
}
.contacts-cell .contact-item span {
  color: #495057;
}

.role-cell .role-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.role-cell .role-admin {
  background: #d4edda;
  color: #155724;
}
.role-cell .role-user {
  background: #e2e3e5;
  color: #383d41;
}
.role-cell .role-custom {
  background: #d1ecf1;
  color: #0c5460;
}

.status-cell .status-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
}
.status-cell .status-indicator.active {
  background: #28a745;
}
.status-cell .status-indicator.inactive {
  background: #dc3545;
}
.status-cell .status-text {
  font-size: 14px;
  font-weight: 500;
}

.last-login-cell,
.created-at-cell {
  font-size: 14px;
  color: #6c757d;
}

.actions-cell .dropdown {
  position: relative;
}
.actions-cell .btn-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.actions-cell .btn-icon:hover {
  background: transparent;
  transform: none;
  box-shadow: none;
}

@media (max-width: 768px) {
  .users-container {
    padding: 16px;
  }
  .users-table {
    font-size: 12px;
  }
  .users-table th, .users-table td {
    padding: 8px;
  }
}
.dropdown-item {
  display: flex;
  gap: 5px;
}

a.dropdown-item:active {
  background-color: var(--primary-color);
  color: white;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
/* Review Layout */
.review-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.review-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: #fff;
  border-bottom: 1px solid #eee;
  z-index: 10;
}

.review-title {
  font-size: 1.2rem;
  font-weight: 600;
}

.review-resolutions .res-btn {
  margin-left: 8px;
  padding: 6px 16px;
  border: 1px solid #ddd;
  background: #f8f8f8;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
}

.review-main-row {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
}

.review-center {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: #fafbfc;
  position: relative;
}

.review-frame-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eaeaea;
}

#review-iframe {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  width: 100%;
  height: 80vh;
  min-height: 400px;
  max-width: 100%;
  z-index: 1;
}

#review-canvas {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  z-index: 2;
}

.review-toolbar {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  z-index: 20;
}

.tool-btn, .mode-btn {
  background: #f5f5f5;
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.tool-btn.active, .mode-btn.active {
  background: #e0e7ff;
}

#tool-color {
  margin-left: 8px;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
}

.toolbar-mode-switch {
  margin-left: 16px;
  display: flex;
  gap: 4px;
}

.review-right {
  width: 340px;
  background: #fff;
  border-left: 1px solid #eee;
  display: flex;
  flex-direction: column;
  padding: 0 0 0 0;
  min-width: 260px;
  max-width: 400px;
}

.review-endpoints, .review-comments {
  padding: 18px 18px 0 18px;
}

.endpoints-title, .comments-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
}

#endpoints-list, #comments-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

#endpoints-list li, #comments-list li {
  padding: 8px 0;
  border-bottom: 1px solid #f2f2f2;
  font-size: 0.98rem;
  cursor: pointer;
}

#endpoints-list li.active, #comments-list li.active {
  background: #f0f4ff;
}

@media (max-width: 900px) {
  .review-right {
    display: none;
  }
  .review-toolbar {
    left: 10px;
    right: 10px;
    transform: none;
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
/* ===== Auth Header Styles ===== */
.auth-header {
  background: var(--bg-primary, #ffffff);
  border-bottom: 1px solid var(--border-color, #e0e0e0);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.auth-header .header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.auth-header .header-left .logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-primary, #333);
}
.auth-header .header-left .logo-link .logo {
  width: 32px;
  height: 32px;
  margin-right: 0.5rem;
}
.auth-header .header-left .logo-link .logo-text {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color, #007bff);
}
.auth-header .header-right .auth-nav {
  display: flex;
  gap: 1rem;
}
.auth-header .header-right .auth-nav .nav-link {
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: var(--text-secondary, #666);
  border-radius: 4px;
  transition: all 0.2s ease;
}
.auth-header .header-right .auth-nav .nav-link:hover {
  background: var(--bg-hover, #f5f5f5);
  color: var(--text-primary, #333);
}

/* ===== Login/Auth Page Styles ===== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-body, #f8f4f1);
}
.auth-page a {
  text-decoration: none;
  color: var(--info-color, #3b2f24);
}
.auth-page a:hover {
  text-decoration: underline;
  color: var(--info-hover, #3b2f24);
}
.auth-page .company-logo {
  width: 100%;
}
.auth-page .auth-form {
  margin-top: 20px;
  width: 100%;
}
.auth-page .auth-form .form-group button {
  width: 30%;
}

.auth-container {
  background: var(--bg-primary, #fff);
  padding: 40px 32px 32px 32px;
  border-radius: var(--radius-lg, 12px);
  box-shadow: var(--shadow-md, 0 4px 6px rgba(0, 0, 0, 0.1));
  width: 100%;
  max-width: 370px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auth-logo {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

.auth-container h2 {
  margin-bottom: 18px;
  color: var(--text-primary, #3b2f24);
  font-weight: 600;
  font-size: 1.6rem;
}

.auth-container input[type=text],
.auth-container input[type=password],
.auth-container input[type=email] {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: var(--radius-md, 8px);
  border: 1px solid var(--border-color, #e0dcd8);
  font-size: 1rem;
  background: var(--bg-secondary, #f8f9fa);
  color: var(--text-primary, #3b2f24);
  transition: var(--transition, all 0.2s ease);
}

.auth-container input[type=text]:focus,
.auth-container input[type=password]:focus,
.auth-container input[type=email]:focus {
  border: 1.5px solid var(--primary-color, #f26722);
  outline: none;
}

.auth-container button[type=submit] {
  width: 100%;
  background: var(--primary-color, #f26722);
  color: #fff;
  border: none;
  border-radius: var(--radius-md, 8px);
  padding: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 18px;
  transition: var(--transition, all 0.2s ease);
}

.auth-container button[type=submit]:hover {
  background: var(--primary-hover, #d35400);
}

.auth-divider {
  width: 100%;
  text-align: center;
  margin: 18px 0 10px 0;
  position: relative;
}

.auth-divider span {
  background: var(--bg-primary, #fff);
  color: var(--text-muted, #888);
  padding: 0 12px;
  position: relative;
  z-index: 1;
  font-size: 0.95rem;
}

.auth-divider:before {
  content: "";
  display: block;
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--border-color, #e0dcd8);
  z-index: 0;
}

.google-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: #fff;
  color: #222 !important;
  border: 1.5px solid #e0dcd8;
  border-radius: var(--radius-md, 8px);
  padding: 10px 0;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: background 0.2s, box-shadow 0.2s;
  text-decoration: none;
}

.google-login-btn:hover {
  background: #f1f3f4;
  box-shadow: 0 2px 8px rgba(66, 133, 244, 0.08);
}

.flash {
  width: 100%;
  margin-bottom: 14px;
  padding: 10px 0;
  border-radius: var(--radius-md, 8px);
  background: rgba(231, 76, 60, 0.08);
  color: var(--danger-color, #e74c3c);
  text-align: center;
  font-size: 0.98rem;
}

.switch {
  margin-top: 10px;
  color: var(--text-secondary, #6c757d);
  font-size: 0.97rem;
}

.switch a {
  color: var(--primary-color, #f26722);
  text-decoration: none;
  font-weight: 500;
  margin-left: 4px;
}

.switch a:hover {
  text-decoration: underline;
  color: var(--primary-hover, #f26722);
}

/* ===== Setup Tenant Styles ===== */
.setup-tenant-container {
  max-width: 600px !important;
  padding: 40px 40px 32px 40px !important;
}

.setup-subtitle {
  text-align: center;
  color: var(--text-secondary, #6c757d);
  margin-bottom: 24px;
  font-size: 1rem;
}

.success-flash {
  background: rgba(40, 167, 69, 0.1) !important;
  color: var(--success-color, #28a745) !important;
  border: 1px solid rgba(40, 167, 69, 0.2);
}

.setup-form {
  width: 100%;
}

.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  width: 100%;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary, #3b2f24);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-md, 8px);
  border: 1px solid var(--border-color, #e0dcd8);
  font-size: 1rem;
  background: var(--bg-secondary, #f8f9fa);
  color: var(--text-primary, #3b2f24);
  transition: var(--transition, all 0.2s ease);
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  border: 1.5px solid var(--primary-color, #f26722);
  outline: none;
  background: var(--bg-primary, #fff);
}

.form-group textarea {
  resize: vertical;
  min-height: 60px;
}

.submit-btn {
  width: 100%;
  background: var(--primary-color, #f26722);
  color: #fff;
  border: none;
  border-radius: var(--radius-md, 8px);
  padding: 14px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: var(--transition, all 0.2s ease);
}

.submit-btn:hover {
  background: var(--primary-hover, #d35400);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(242, 103, 34, 0.3);
}

@media (max-width: 768px) {
  .setup-tenant-container {
    max-width: 95vw !important;
    padding: 32px 20px 24px 20px !important;
  }
  .form-row {
    flex-direction: column;
    gap: 12px;
  }
  .form-group {
    width: 100%;
  }
}
@media (max-width: 500px) {
  .auth-container {
    padding: 28px 8px 18px 8px;
    max-width: 98vw;
  }
  .auth-logo {
    width: 60px;
    height: 60px;
  }
  .setup-tenant-container {
    padding: 24px 16px 20px 16px !important;
  }
}
/* ===== Join Tenant Styles ===== */
.join-tenant-container {
  max-width: 500px !important;
  padding: 40px 40px 32px 40px !important;
}

.join-subtitle {
  text-align: center;
  color: var(--text-secondary, #6c757d);
  margin-bottom: 24px;
  font-size: 1rem;
}

.info-box {
  background: var(--bg-secondary, #f8f9fa);
  border: 1px solid var(--border-color, #e0dcd8);
  border-radius: var(--radius-md, 8px);
  padding: 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.info-box.success {
  background: #d4edda;
  border-color: #c3e6cb;
}
.info-box.success .info-content h4 {
  color: #155724;
}
.info-box.success .info-content p {
  color: #155724;
}

.info-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.info-content h4 {
  margin: 0 0 8px 0;
  color: var(--text-primary, #3b2f24);
  font-size: 1rem;
  font-weight: 600;
}

.info-content p {
  margin: 0;
  color: var(--text-secondary, #6c757d);
  font-size: 0.9rem;
  line-height: 1.4;
}

.join-form {
  width: 100%;
}

.join-form .form-group {
  margin-bottom: 20px;
}

.join-form .form-group label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary, #3b2f24);
  margin-bottom: 8px;
  display: block;
}

.join-form .form-group input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md, 8px);
  border: 1px solid var(--border-color, #e0dcd8);
  font-size: 1rem;
  background: var(--bg-secondary, #f8f9fa);
  color: var(--text-primary, #3b2f24);
  transition: var(--transition, all 0.2s ease);
  font-family: inherit;
}

.join-form .form-group input:focus {
  border: 1.5px solid var(--primary-color, #f26722);
  outline: none;
  background: var(--bg-primary, #fff);
}

.join-form .form-group input[readonly] {
  background: #e9ecef;
  color: #6c757d;
  cursor: not-allowed;
}

.join-form .submit-btn {
  width: 100%;
  background: var(--primary-color, #f26722);
  color: #fff;
  border: none;
  border-radius: var(--radius-md, 8px);
  padding: 14px 20px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition, all 0.2s ease);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.join-form .submit-btn:hover {
  background: var(--primary-hover, #d35400);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(242, 103, 34, 0.3);
}

.btn-icon {
  font-size: 1.2rem;
  transition: transform 0.2s ease;
}

.join-form .submit-btn:hover .btn-icon {
  transform: translateX(2px);
}

@media (max-width: 768px) {
  .join-tenant-container {
    max-width: 95vw !important;
    padding: 32px 20px 24px 20px !important;
  }
  .info-box {
    padding: 16px;
    gap: 10px;
  }
}
@media (max-width: 500px) {
  .join-tenant-container {
    padding: 24px 16px 20px 16px !important;
  }
  .info-box {
    padding: 14px;
    gap: 8px;
  }
  .info-content h4 {
    font-size: 0.95rem;
  }
  .info-content p {
    font-size: 0.85rem;
  }
}
.widget-root .widget-dialogs-container, .widget-root .widget-settings-container {
  background: #fff;
  border-radius: 12px;
  padding: 32px 24px;
  margin: 24px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.widget-root .widget-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}
.widget-root .widget-table th, .widget-root .widget-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #f2f2f2;
}
.widget-root .widget-table th {
  background: #faf7f3;
  color: #ff6600;
  font-weight: 600;
}
.widget-root .widget-table tr:last-child td {
  border-bottom: none;
}
.widget-root .widget-btn {
  display: inline-block;
  padding: 7px 18px;
  border-radius: 6px;
  border: none;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}
.widget-root .widget-btn.widget-btn-primary {
  background: #ff6600;
  color: #fff;
}
.widget-root .widget-btn.widget-btn-primary:hover {
  background: #e65c00;
}
.widget-root .widget-btn.widget-btn-secondary {
  background: #f2f2f2;
  color: #ff6600;
}
.widget-root .widget-btn.widget-btn-secondary:hover {
  background: #ffe5d0;
}
.widget-root .type-chip {
  background: #f2f2f2;
  color: #ff6600;
  border: none;
  border-radius: 20px;
  padding: 6px 18px;
  margin-right: 8px;
  font-size: 15px;
  cursor: pointer;
}
.widget-root .type-chip.active {
  background: #ff6600;
  color: #fff;
}
.widget-root .widget-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f2f2f2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.widget-root .widget-status {
  font-size: 14px;
  font-weight: 600;
}
.widget-root .widget-status.online {
  color: #27ae60;
}
.widget-root .widget-status.offline {
  color: #aaa;
}
.widget-root .chat-container {
  display: flex;
  gap: 32px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  margin: 24px 0;
  padding: 0;
}
.widget-root .chat-main {
  flex: 1 1 0;
  padding: 32px 24px 0 24px;
}
.widget-root .chat-header {
  display: flex;
  align-items: center;
  margin-bottom: 18px;
}
.widget-root .chat-avatar-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #f2f2f2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-right: 16px;
}
.widget-root .chat-details h3 {
  margin: 0 0 2px 0;
  font-size: 20px;
  font-weight: 600;
}
.widget-root .messages-container {
  min-height: 220px;
  max-height: 420px;
  overflow-y: auto;
  margin-bottom: 18px;
  background: #faf7f3;
  border-radius: 8px;
  padding: 16px 12px;
}
.widget-root .message {
  margin-bottom: 12px;
  display: flex;
}
.widget-root .message.message-incoming .message-content {
  background: #fff;
  color: #222;
  border-left: 4px solid #ff6600;
}
.widget-root .message.message-outgoing .message-content {
  background: #ff6600;
  color: #fff;
  border-right: 4px solid #ff6600;
  margin-left: auto;
}
.widget-root .message-content {
  padding: 10px 16px;
  border-radius: 8px;
  min-width: 80px;
  max-width: 70%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
  position: relative;
}
.widget-root .message-time {
  font-size: 12px;
  color: #888;
  margin-top: 4px;
}
.widget-root .chat-input-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.widget-root #chatInput {
  width: 100%;
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid #eee;
  padding: 10px 14px;
  font-size: 15px;
  resize: vertical;
}
.widget-root .send-button {
  align-self: flex-end;
  background: #ff6600;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 7px 18px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.2s;
}
.widget-root .send-button:hover {
  background: #e65c00;
}
.widget-root .widget-settings-form {
  max-width: 480px;
  margin: 0 auto;
  background: #faf7f3;
  border-radius: 10px;
  padding: 32px 24px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}
.widget-root .form-group {
  margin-bottom: 18px;
}
.widget-root .form-group label {
  font-weight: 500;
  margin-bottom: 6px;
  display: block;
}
.widget-root .form-control {
  width: 100%;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #eee;
  font-size: 15px;
  background: #fff;
}

.widget-settings-flex {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.widget-settings-panel {
  flex: 0 0 340px;
  min-width: 300px;
}

.widget-preview-panel {
  flex: 1 1 0;
  min-width: 320px;
  background: #faf7f3;
  border-radius: 12px;
  padding: 32px 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.icon-picker {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

.icon-option {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f2f2f2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #ff6600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border 0.15s;
}

.icon-option.selected, .icon-option:hover {
  border: 2px solid #ff6600;
  background: #ffe5d0;
}

.color-preview {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid #ccc;
  display: inline-block;
  margin-left: 8px;
  vertical-align: middle;
}

.crazy-widget-btn {
  transition: box-shadow 0.2s, background 0.2s;
}

@keyframes crazy-pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.12);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes crazy-shake {
  0%, 100% {
    transform: translateX(0);
  }
  20%, 60% {
    transform: translateX(-6px);
  }
  40%, 80% {
    transform: translateX(6px);
  }
}
.crazy-anim-pulse {
  animation: crazy-pulse 1.2s infinite;
}

.crazy-anim-shake {
  animation: crazy-shake 0.7s infinite;
}

.crazy-widget-chat {
  position: fixed;
  right: 112px;
  bottom: 32px;
  width: 340px;
  max-width: 96vw;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 4px 32px rgba(60, 47, 36, 0.18);
  z-index: 100000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.crazy-widget-chat-header {
  background: #ff6600;
  color: #fff;
  padding: 16px 20px;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.crazy-widget-chat-messages {
  flex: 1 1 0;
  padding: 18px 16px;
  overflow-y: auto;
  background: #faf7f3;
}

.crazy-widget-chat-input {
  display: flex;
  border-top: 1px solid #eee;
  background: #fff;
}

.crazy-widget-chat-input textarea {
  flex: 1 1 0;
  border: none;
  padding: 12px 14px;
  font-size: 15px;
  border-radius: 0;
  resize: none;
  background: #fff;
}

.crazy-widget-chat-input button {
  background: #ff6600;
  color: #fff;
  border: none;
  padding: 0 22px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 0 0 16px 0;
  transition: background 0.18s;
}

.crazy-widget-chat-input button:hover {
  background: #e65c00;
}

.crazy-widget-chat-message {
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
}

.crazy-widget-chat-message.visitor {
  align-items: flex-end;
}

.crazy-widget-chat-message.operator {
  align-items: flex-start;
}

.crazy-widget-chat-bubble {
  padding: 10px 16px;
  border-radius: 14px;
  background: #ff6600;
  color: #fff;
  font-size: 15px;
  max-width: 80%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  margin-bottom: 2px;
}

.crazy-widget-chat-message.operator .crazy-widget-chat-bubble {
  background: #f2f2f2;
  color: #222;
}

.crazy-widget-chat-time {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
  text-align: right;
}

.operator-visitor-page {
  color: #888;
  font-size: 12px;
  margin-left: 4px;
  word-break: break-all;
}

.operator-unread-indicator {
  display: inline-block;
  background: #ff6600;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border-radius: 50%;
  min-width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  margin-left: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
/* Tenant Success Page Styles */
.success-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  padding: 20px;
}

.auth-container.join-tenant-container .company-logo {
  width: 100%;
  margin-bottom: 20px;
  border-radius: 10px;
}

.success-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  padding: 40px;
  max-width: 600px;
  width: 100%;
  text-align: center;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #ff6600 0%, #ff8533 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 30px;
  font-size: 40px;
  color: white;
}

.success-title {
  color: #2c3e50;
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 20px;
}

.subdomain-section {
  background: #f8f9fa;
  border-radius: 15px;
  padding: 25px;
  margin: 30px 0;
  border: 2px solid #e9ecef;
}

.subdomain-link {
  background: white;
  border: 2px solid #dee2e6;
  border-radius: 10px;
  padding: 5px 8px;
  font-family: "Courier New", monospace;
  font-size: 16px;
  color: #495057;
  margin-bottom: 15px;
  word-break: break-all;
}

.copy-button {
  background: linear-gradient(135deg, #ff6600 0%, #ff8533 100%);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}
.copy-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 102, 0, 0.3);
}
.copy-button:active {
  transform: translateY(0);
}

.email-section {
  background: #e8f5e8;
  border-radius: 15px;
  padding: 25px;
  margin: 30px 0;
  border: 2px solid #d4edda;
}

.email-image {
  max-width: 200px;
  height: auto;
  margin: 15px 0;
}

.btn-primary {
  background: linear-gradient(135deg, #ff6600 0%, #ff8533 100%);
  color: white;
  text-decoration: none;
  padding: 15px 30px;
  border-radius: 10px;
  font-weight: 600;
  display: inline-block;
  margin: 0 10px;
  transition: all 0.3s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 102, 0, 0.3);
  color: white;
}

.copy-feedback {
  color: #28a745;
  font-weight: 600;
  margin-top: 10px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.copy-feedback.show {
  opacity: 1;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
.profile-page .profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.profile-page .profile-avatar-placeholder {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b35, #f7931e);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
  font-weight: bold;
  border: 4px solid #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  position: relative;
}
.profile-page .profile-avatar-placeholder .camera-icon {
  position: absolute;
  bottom: 5px;
  right: 5px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 14px;
}
.profile-page .card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  margin-bottom: 24px;
}
.profile-page .card-title {
  color: #333;
  font-weight: 600;
  margin-bottom: 20px;
}
.profile-page .form-label {
  font-weight: 500;
  color: #555;
  margin-bottom: 8px;
}
.profile-page .form-control-plaintext {
  color: #333;
  font-weight: 500;
  padding: 0;
  border: none;
  background: transparent;
}
.profile-page .btn-primary {
  background: linear-gradient(135deg, #ff6b35, #f7931e);
  border: none;
  border-radius: 8px;
  font-weight: 500;
  padding: 10px 20px;
  transition: all 0.3s ease;
}
.profile-page .btn-primary:hover {
  background: linear-gradient(135deg, #e55a2b, #e0851a);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}
.profile-page .btn-outline-primary {
  border: 2px solid #ff6b35;
  color: #ff6b35;
  border-radius: 8px;
  font-weight: 500;
  padding: 8px 16px;
  transition: all 0.3s ease;
}
.profile-page .btn-outline-primary:hover {
  background: #ff6b35;
  border-color: #ff6b35;
  color: white;
}
.profile-page .badge {
  border-radius: 6px;
  font-weight: 500;
  padding: 6px 12px;
}
.profile-page .badge.bg-primary {
  background: linear-gradient(135deg, #ff6b35, #f7931e) !important;
}
.profile-page .badge.bg-secondary {
  background: #6c757d !important;
}
.profile-page .page-title {
  color: #333;
  font-weight: 700;
  margin: 10px 0;
}
.profile-page .breadcrumb-item a {
  color: #ff6b35;
  text-decoration: none;
}
.profile-page .breadcrumb-item a:hover {
  color: #e55a2b;
}
.profile-page .company-logo {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.profile-page .info-section {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}
.profile-page .info-label {
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 4px;
}
.profile-page .info-value {
  font-weight: 500;
  color: #333;
}
.profile-page .subdomain-link {
  color: #ff6b35;
  text-decoration: none;
  font-weight: 500;
}
.profile-page .subdomain-link:hover {
  color: #e55a2b;
  text-decoration: underline;
}
.profile-page .spinner-border.text-primary {
  color: #ff6b35 !important;
}
.profile-page .notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  pointer-events: none;
}
.profile-page .notification {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  border: 1px solid #e9ecef;
  padding: 16px 20px;
  margin-bottom: 12px;
  width: 400px;
  right: 306px !important;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transform: translateX(100%);
  animation: notificationSlideIn 0.4s ease-out forwards;
  left: 0;
}
.profile-page .notification::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}
.profile-page .notification.notification-success {
  border-left-color: #28a745;
}
.profile-page .notification.notification-success::before {
  background: #28a745;
}
.profile-page .notification.notification-success .notification-icon {
  color: #28a745;
}
.profile-page .notification.notification-error {
  border-left-color: #dc3545;
}
.profile-page .notification.notification-error::before {
  background: #dc3545;
}
.profile-page .notification.notification-error .notification-icon {
  color: #dc3545;
}
.profile-page .notification.notification-warning {
  border-left-color: #ffc107;
}
.profile-page .notification.notification-warning::before {
  background: #ffc107;
}
.profile-page .notification.notification-warning .notification-icon {
  color: #ffc107;
}
.profile-page .notification.notification-info {
  border-left-color: #17a2b8;
}
.profile-page .notification.notification-info::before {
  background: #17a2b8;
}
.profile-page .notification.notification-info .notification-icon {
  color: #17a2b8;
}
.profile-page .notification-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}
.profile-page .notification-content {
  flex: 1;
}
.profile-page .notification-title {
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
  font-size: 0.875rem;
}
.profile-page .notification-message {
  color: #666;
  font-size: 0.8rem;
  line-height: 1.4;
}
.profile-page .notification-close {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  font-size: 1rem;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.profile-page .notification-close:hover {
  background: #f8f9fa;
  color: #333;
}
@keyframes notificationSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes notificationSlideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}
.profile-page .notification.hiding {
  animation: notificationSlideOut 0.4s ease-in forwards;
}

.dashboard-container {
  padding: 24px;
  max-width: var(--container-max-width);
  margin: 0 auto;
  width: 100%;
}
@media (max-width: 768px) {
  .dashboard-container {
    padding: 16px;
  }
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}
@media (max-width: 768px) {
  .page-header {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
    margin-bottom: 24px;
  }
}
.page-header .page-title h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
@media (max-width: 768px) {
  .page-header .page-title h1 {
    font-size: 1.5rem;
  }
}
.page-header .page-title .page-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
}
@media (max-width: 768px) {
  .page-header .page-title .page-subtitle {
    font-size: 0.875rem;
  }
}
.page-header .page-actions {
  display: flex;
  gap: 12px;
}
@media (max-width: 768px) {
  .page-header .page-actions {
    flex-direction: column;
    gap: 8px;
  }
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 24px;
  }
}

.stats-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 24px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.stats-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary-gradient);
}
.stats-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}
@media (max-width: 768px) {
  .stats-card {
    padding: 16px;
    border-radius: var(--radius-lg);
  }
  .stats-card:hover {
    transform: translateY(-2px);
  }
}

.stats-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--primary-gradient);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
}
@media (max-width: 768px) {
  .stats-card-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
  }
}
.stats-card-icon i {
  font-size: 1.25rem;
  color: white;
}
@media (max-width: 768px) {
  .stats-card-icon i {
    font-size: 1rem;
  }
}

.stats-card-content .stats-card-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
@media (max-width: 768px) {
  .stats-card-content .stats-card-value {
    font-size: 1.5rem;
  }
}
.stats-card-content .stats-card-label {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 12px;
}
.stats-card-content .stats-card-change {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 500;
}
.stats-card-content .stats-card-change.stats-card-change-positive {
  color: var(--success-color);
}
.stats-card-content .stats-card-change.stats-card-change-negative {
  color: var(--danger-color);
}
.stats-card-content .stats-card-change i {
  font-size: 0.75rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}
@media (min-width: 769px) and (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}
@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.dashboard-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: var(--transition);
}
.dashboard-card:hover {
  box-shadow: var(--shadow-md);
}
@media (max-width: 768px) {
  .dashboard-card {
    border-radius: var(--radius-lg);
  }
}

.dashboard-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-secondary);
}
@media (max-width: 768px) {
  .dashboard-card-header {
    padding: 16px;
  }
}
.dashboard-card-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}
@media (max-width: 768px) {
  .dashboard-card-header h3 {
    font-size: 1rem;
  }
}
.dashboard-card-header .dashboard-card-link {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
}
.dashboard-card-header .dashboard-card-link:hover {
  text-decoration: underline;
}

.dashboard-card-content {
  padding: 24px;
}
@media (max-width: 768px) {
  .dashboard-card-content {
    padding: 16px;
  }
}

.activities-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
@media (max-width: 768px) {
  .activities-list {
    gap: 12px;
  }
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-lg);
  transition: var(--transition);
}
.activity-item:hover {
  background: var(--bg-hover);
}
@media (max-width: 768px) {
  .activity-item {
    padding: 10px;
    gap: 10px;
  }
}

.activity-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  color: var(--primary-color);
  font-size: 0.875rem;
}
@media (max-width: 768px) {
  .activity-icon {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
  }
}

.activity-content {
  flex: 1;
}
.activity-content .activity-title {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
  font-size: 0.875rem;
}
@media (max-width: 768px) {
  .activity-content .activity-title {
    font-size: 0.8rem;
  }
}
.activity-content .activity-time {
  color: var(--text-secondary);
  font-size: 0.75rem;
}
@media (max-width: 768px) {
  .activity-content .activity-time {
    font-size: 0.7rem;
  }
}

.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left var(--transition);
}
.sidebar:hover + .main-wrapper, .sidebar.hover-active + .main-wrapper {
  margin-left: var(--sidebar-width-expanded);
}
.main-wrapper.expanded {
  margin-left: 80px;
}
@media (max-width: 768px) {
  .main-wrapper {
    margin-left: 0;
  }
  .sidebar:hover + .main-wrapper, .sidebar.hover-active + .main-wrapper {
    margin-left: 0;
  }
  .main-wrapper.expanded {
    margin-left: 0;
  }
}

/**
 * Стили для системы оплат
 * Основаны на дизайне сделок
 */
:root {
  --font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", Segoe UI Symbol, "Noto Color Emoji";
  --font-family-mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
  --primary-color: #ff6600;
  --primary-hover: #e65c00;
  --primary-dark: #cc5200;
  --primary-rgb: 255, 102, 0;
  --primary-gradient: linear-gradient(135deg, #ff6600 0%, #ff8533 100%);
  --secondary-color: #6b7280;
  --secondary-hover: #4b5563;
  --secondary-dark: #374151;
  --success-color: #10b981;
  --success-hover: #059669;
  --success-dark: #047857;
  --success-rgb: 16, 185, 129;
  --success-gradient: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  --warning-color: #f59e0b;
  --warning-hover: #d97706;
  --warning-dark: #b45309;
  --warning-rgb: 245, 158, 11;
  --warning-gradient: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  --danger-color: #ef4444;
  --danger-hover: #dc2626;
  --danger-dark: #b91c1c;
  --danger-rgb: 239, 68, 68;
  --danger-gradient: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
  --info-color: #3b82f6;
  --info-hover: #2563eb;
  --info-dark: #1d4ed8;
  --info-rgb: 59, 130, 246;
  --info-gradient: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
  --bg-body: #f8fafc;
  --bg-primary: #ffffff;
  --bg-secondary: #f1f5f9;
  --bg-hover: #f8fafc;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  --border-dark: #cbd5e1;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-width: 80px;
  --sidebar-width-expanded: 240px;
  --header-height: 64px;
  --container-max-width: 1200px;
}

.theme-dark {
  --bg-body: #0b1220;
  --bg-primary: #0f172a;
  --bg-secondary: #111827;
  --bg-hover: #0b1220;
  --bg-card: #0f172a;
  --bg-sidebar: #0f172a;
  --text-primary: #e5e7eb;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --border-color: #1f2937;
  --border-light: #111827;
  --border-dark: #374151;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.35), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.35);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.45), 0 8px 10px -6px rgb(0 0 0 / 0.4);
}

.theme-light {
  --bg-body: #f8fafc;
  --bg-primary: #ffffff;
  --bg-secondary: #f1f5f9;
  --bg-hover: #f1f5f9;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  --border-dark: #cbd5e1;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.06);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.05);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.04);
}

.theme-auto {
  --bg-body: #f8fafc;
  --bg-primary: #ffffff;
  --bg-secondary: #f1f5f9;
  --bg-hover: #f1f5f9;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  --border-dark: #cbd5e1;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.06);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.05);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.04);
}

@media (prefers-color-scheme: dark) {
  .theme-auto {
    --bg-body: #0b1220;
    --bg-primary: #0f172a;
    --bg-secondary: #111827;
    --bg-hover: #0b1220;
    --bg-card: #0f172a;
    --bg-sidebar: #0f172a;
    --text-primary: #e5e7eb;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-light: #64748b;
    --border-color: #1f2937;
    --border-light: #111827;
    --border-dark: #374151;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.35), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.35);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.45), 0 8px 10px -6px rgb(0 0 0 / 0.4);
  }
}
.settings-section {
  max-width: 400px;
  margin: 0 auto;
  background: var(--bg-secondary);
  padding: 32px 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.settings-section h3 {
  margin-bottom: 16px;
  text-align: center;
  color: var(--text-primary);
}
.settings-section label {
  font-weight: 600;
  margin-bottom: 4px;
  display: block;
  color: var(--text-primary);
}
.settings-section input {
  margin-bottom: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  font-family: var(--font-family);
  font-size: 16px;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: var(--transition);
}
.settings-section input:focus {
  border: 1.5px solid var(--primary-color);
  outline: none;
}
.settings-section .add-order {
  width: 100%;
  margin-top: 10px;
  margin-bottom: 0;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px;
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.settings-section .add-order:hover {
  background: var(--primary-hover);
}
.settings-section .add-order--small {
  width: auto;
  min-width: 120px;
  margin: 0;
  padding: 10px 22px;
  font-size: 15px;
}
.settings-section .flash {
  margin-top: 16px;
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 15px;
  text-align: center;
}
.settings-section .flash.error {
  background: rgba(var(--danger-rgb), 0.1);
  color: var(--danger-color);
  border: 1px solid rgba(var(--danger-rgb), 0.3);
}
.settings-section .flash.success {
  background: rgba(var(--success-rgb), 0.1);
  color: var(--success-color);
  border: 1px solid rgba(var(--success-rgb), 0.3);
}
.settings-section .flash.warning {
  background: rgba(var(--warning-rgb), 0.1);
  color: var(--warning-color);
  border: 1px solid rgba(var(--warning-rgb), 0.3);
}

#tg-step-phone, #tg-step-code, #tg-step-password {
  margin-bottom: 0;
}

.settings-menu {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  border-bottom: 1.5px solid var(--border-color);
  padding-bottom: 8px;
}

.settings-tab {
  background: none;
  border: none;
  font-family: var(--font-family);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 20px 8px 0;
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  transition: var(--transition);
}

.settings-tab.active {
  color: var(--primary-color);
  border-bottom: 2.5px solid var(--primary-color);
}

.settings-accounts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

#tg-accounts-list {
  margin-bottom: 24px;
}

.tg-account-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
}

.tg-account-phone {
  font-weight: 600;
  color: var(--text-primary);
}

.tg-account-session {
  font-size: 13px;
  color: var(--text-muted);
}

.tg-service-toggle {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  outline: none;
  margin-right: 12px;
}
.tg-service-toggle .toggle-switch {
  width: 38px;
  height: 22px;
  background: var(--border-color);
  border-radius: 12px;
  position: relative;
  transition: var(--transition);
  margin-right: 8px;
}
.tg-service-toggle .toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: var(--bg-primary);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.tg-service-toggle.active .toggle-switch {
  background: var(--success-color);
}
.tg-service-toggle.active .toggle-knob {
  left: 18px;
  background: var(--success-color);
}
.tg-service-toggle.inactive .toggle-switch {
  background: var(--border-color);
}
.tg-service-toggle.inactive .toggle-knob {
  left: 2px;
  background: var(--bg-primary);
}

.tg-account-delete {
  background: none;
  border: none;
  color: var(--danger-color);
  font-size: 1.2em;
  cursor: pointer;
  margin-left: 10px;
  transition: var(--transition);
}
.tg-account-delete:hover {
  color: var(--danger-hover);
}

.modal-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: var(--bg-primary);
  border-radius: 12px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  animation: modalSlideIn 0.3s ease-out;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--border-color);
}
.modal-header h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}
.modal-close:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
}

.auth-methods {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.auth-method {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  flex: 1;
  padding: 20px 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-primary);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}
.auth-method:hover {
  border-color: var(--primary-color);
  background: var(--bg-secondary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.auth-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.auth-method h4 {
  margin: 0 0 4px 0;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
}

.auth-method p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.4;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
:root {
  --payment-income-color: #10b981;
  --payment-expense-color: #ef4444;
  --payment-pending-color: #f59e0b;
  --payment-completed-color: #10b981;
  --payment-cancelled-color: #6b7280;
}

.payments-container {
  max-width: 1400px;
  margin: 0 auto;
}

.payments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}
.payments-header .header-left h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
}
.payments-header .header-left .subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin: 0;
}
.payments-header .header-right .btn {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.payments-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.payments-stats .stat-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}
.payments-stats .stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.payments-stats .stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: white;
}
.payments-stats .stat-card .stat-content .stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}
.payments-stats .stat-card .stat-content .stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}
.payments-stats .stat-card.income .stat-icon {
  background: var(--payment-income-color);
}
.payments-stats .stat-card.expense .stat-icon {
  background: var(--payment-expense-color);
}
.payments-stats .stat-card.balance .stat-icon {
  background: var(--primary-color);
}
.payments-stats .stat-card.pending .stat-icon {
  background: var(--payment-pending-color);
}

.payments-filters {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}
.payments-filters .filters-form {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: end;
}
.payments-filters .filters-form .filter-group {
  display: flex;
  flex-direction: column;
  min-width: 150px;
}
.payments-filters .filters-form .filter-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.payments-filters .filters-form .filter-group select, .payments-filters .filters-form .filter-group input {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.875rem;
  background: var(--bg-primary);
  color: var(--text-primary);
}
.payments-filters .filters-form .filter-group select:focus, .payments-filters .filters-form .filter-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}
.payments-filters .filters-form .btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.payments-table-container {
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}
.payments-table-container .payments-table {
  width: 100%;
  border-collapse: collapse;
}
.payments-table-container .payments-table th, .payments-table-container .payments-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}
.payments-table-container .payments-table th {
  background: var(--bg-secondary);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.payments-table-container .payments-table th.sortable {
  cursor: pointer;
  user-select: none;
}
.payments-table-container .payments-table th.sortable:hover {
  background: var(--bg-secondary-dark);
}
.payments-table-container .payments-table th.sortable.sort-asc::after {
  content: " ▲";
  color: var(--primary-color);
}
.payments-table-container .payments-table th.sortable.sort-desc::after {
  content: " ▼";
  color: var(--primary-color);
}
.payments-table-container .payments-table td {
  color: var(--text-primary);
  font-size: 0.875rem;
}
.payments-table-container .payments-table tbody tr {
  transition: background-color 0.2s ease;
}
.payments-table-container .payments-table tbody tr:hover {
  background: var(--bg-hover);
}
.payments-table-container .payments-table tbody tr:last-child td {
  border-bottom: none;
}
.payments-table-container .payments-table .payment-title {
  font-weight: 600;
}
.payments-table-container .payments-table .payment-title a {
  color: var(--primary-color);
  text-decoration: none;
}
.payments-table-container .payments-table .payment-title a:hover {
  text-decoration: underline;
}
.payments-table-container .payments-table .payment-type .type-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.payments-table-container .payments-table .payment-type .type-badge.income {
  background: rgba(var(--payment-income-color), 0.1);
  color: var(--payment-income-color);
}
.payments-table-container .payments-table .payment-type .type-badge.expense {
  background: rgba(var(--payment-expense-color), 0.1);
  color: var(--payment-expense-color);
}
.payments-table-container .payments-table .payment-amount {
  font-weight: 600;
  font-family: "Monaco", "Menlo", monospace;
}
.payments-table-container .payments-table .payment-amount .amount.income {
  color: var(--payment-income-color);
}
.payments-table-container .payments-table .payment-amount .amount.expense {
  color: var(--payment-expense-color);
}
.payments-table-container .payments-table .payment-status .status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.payments-table-container .payments-table .payment-status .status-badge.pending {
  background: rgba(var(--payment-pending-color), 0.1);
  color: var(--payment-pending-color);
}
.payments-table-container .payments-table .payment-status .status-badge.completed {
  background: rgba(var(--payment-completed-color), 0.1);
  color: var(--payment-completed-color);
}
.payments-table-container .payments-table .payment-status .status-badge.cancelled {
  background: rgba(var(--payment-cancelled-color), 0.1);
  color: var(--payment-cancelled-color);
}
.payments-table-container .payments-table .payment-participants .participant {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}
.payments-table-container .payments-table .payment-participants .participant:last-child {
  margin-bottom: 0;
}
.payments-table-container .payments-table .payment-participants .participant.client {
  color: var(--primary-color);
}
.payments-table-container .payments-table .payment-participants .participant.payer {
  color: var(--payment-expense-color);
}
.payments-table-container .payments-table .payment-participants .participant.recipient {
  color: var(--payment-income-color);
}
.payments-table-container .payments-table .payment-actions .action-buttons {
  display: flex;
  gap: 0.5rem;
}
.payments-table-container .payments-table .payment-actions .action-buttons .btn {
  padding: 0.375rem;
  font-size: 0.75rem;
  min-width: auto;
}

.no-payments .empty-state {
  text-align: center;
  padding: 3rem 1rem;
}
.no-payments .empty-state i {
  font-size: 3rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}
.no-payments .empty-state h3 {
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
}
.no-payments .empty-state p {
  color: var(--text-secondary);
  margin: 0 0 1.5rem 0;
}

.payment-form-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}
.payment-form-container .form-header {
  text-align: center;
  margin-bottom: 2rem;
}
.payment-form-container .form-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
}
.payment-form-container .form-header .subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin: 0;
}
.payment-form-container .payment-form {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}
.payment-form-container .payment-form .form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.payment-form-container .payment-form .form-section h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}
.payment-form-container .payment-form .form-group {
  margin-bottom: 1.5rem;
}
.payment-form-container .payment-form .form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.payment-form-container .payment-form .form-group input, .payment-form-container .payment-form .form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.875rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: all 0.2s ease;
}
.payment-form-container .payment-form .form-group input:focus, .payment-form-container .payment-form .form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}
.payment-form-container .payment-form .form-group input.error, .payment-form-container .payment-form .form-group select.error {
  border-color: var(--payment-expense-color);
  box-shadow: 0 0 0 3px rgba(var(--payment-expense-color), 0.1);
}
.payment-form-container .payment-form .form-group .field-error {
  color: var(--payment-expense-color);
  font-size: 0.75rem;
  margin-top: 0.25rem;
}
.payment-form-container .payment-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.payment-form-container .payment-form .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}
.modal .modal-content {
  background-color: var(--bg-card);
  margin: 15% auto;
  padding: 0;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}
.modal .modal-content .modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal .modal-content .modal-header h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
}
.modal .modal-content .modal-header .close {
  color: var(--text-secondary);
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
}
.modal .modal-content .modal-header .close:hover {
  color: var(--text-primary);
}
.modal .modal-content .modal-body {
  padding: 1.5rem;
  color: var(--text-primary);
}
.modal .modal-content .modal-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

.notification {
  position: fixed;
  top: 2rem;
  right: 2rem;
  background: var(--bg-card);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  z-index: 1001;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
.notification.show {
  transform: translateX(0);
}
.notification .notification-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
}
.notification .notification-content i {
  font-size: 1.125rem;
}
.notification .notification-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.notification .notification-close:hover {
  color: var(--text-primary);
}
.notification.notification-error {
  border-left: 4px solid var(--payment-expense-color);
}
.notification.notification-error .notification-content i {
  color: var(--payment-expense-color);
}
.notification.notification-success {
  border-left: 4px solid var(--payment-completed-color);
}
.notification.notification-success .notification-content i {
  color: var(--payment-completed-color);
}

.payment-detail-container {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  gap: 1rem;
}
.detail-header .header-left .btn-outline {
  margin-bottom: 1rem;
}
.detail-header .header-left h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
}
.detail-header .header-left .payment-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.detail-header .header-right {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}

.detail-content .detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
@media (max-width: 1024px) {
  .detail-content .detail-grid {
    grid-template-columns: 1fr;
  }
}

.detail-section {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}
.detail-section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 1.5rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border-color);
}

.info-grid {
  display: grid;
  gap: 1rem;
}
.info-grid .info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: var(--bg-secondary);
  border-radius: 8px;
}
.info-grid .info-item label {
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 120px;
}
.info-grid .info-item span {
  font-weight: 500;
  color: var(--text-primary);
}

.participants-grid {
  display: grid;
  gap: 1rem;
}
.participants-grid .participant-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}
.participants-grid .participant-card .participant-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
}
.participants-grid .participant-card .participant-icon.payer {
  background: var(--payment-expense-color);
}
.participants-grid .participant-card .participant-icon.recipient {
  background: var(--payment-income-color);
}
.participants-grid .participant-card .participant-icon.client {
  background: #3b82f6;
}
.participants-grid .participant-card .participant-icon.contractor {
  background: #8b5cf6;
}
.participants-grid .participant-card .participant-info {
  flex: 1;
}
.participants-grid .participant-card .participant-info label {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}
.participants-grid .participant-card .participant-info span {
  font-weight: 500;
  color: var(--text-primary);
}

.links-grid {
  display: grid;
  gap: 1rem;
}
.links-grid .link-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}
.links-grid .link-card .link-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
}
.links-grid .link-card .link-icon.deal {
  background: #10b981;
}
.links-grid .link-card .link-icon.task {
  background: #f59e0b;
}
.links-grid .link-card .link-icon.payout {
  background: #8b5cf6;
}
.links-grid .link-card .link-info {
  flex: 1;
}
.links-grid .link-card .link-info label {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}
.links-grid .link-card .link-info a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}
.links-grid .link-card .link-info a:hover {
  text-decoration: underline;
}
.links-grid .link-card .link-info .deal-amount {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.history-list {
  display: grid;
  gap: 1rem;
}
.history-list .history-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}
.history-list .history-item .history-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.875rem;
}
.history-list .history-item .history-icon.created {
  background: #10b981;
}
.history-list .history-item .history-icon.updated {
  background: #3b82f6;
}
.history-list .history-item .history-icon.completed {
  background: #f59e0b;
}
.history-list .history-item .history-info {
  flex: 1;
}
.history-list .history-item .history-info .history-action {
  display: block;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}
.history-list .history-item .history-info .history-date {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.payment-form-container .form-header {
  margin-bottom: 2rem;
}
.payment-form-container .form-header .header-left .btn-outline {
  margin-bottom: 1rem;
}
.payment-form-container .form-header .header-left h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
}
.payment-form-container .form-header .header-left .subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin: 0;
}

.form-help {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  font-style: italic;
}

@media (max-width: 768px) {
  .payments-container {
    padding: 1rem;
  }
  .payments-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  .payments-stats {
    grid-template-columns: 1fr;
  }
  .payments-filters .filters-form {
    flex-direction: column;
    align-items: stretch;
  }
  .payments-filters .filters-form .filter-group {
    min-width: auto;
  }
  .payments-table {
    font-size: 0.75rem;
  }
  .payments-table th, .payments-table td {
    padding: 0.5rem;
  }
  .payments-table .payment-participants .participant {
    font-size: 0.625rem;
  }
  .payment-form-container {
    padding: 1rem;
  }
  .payment-form-container .payment-form {
    padding: 1.5rem;
  }
  .payment-form-container .payment-form .form-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .payment-form-container .payment-form .form-row {
    grid-template-columns: 1fr;
  }
  .modal .modal-content {
    margin: 10% auto;
    width: 95%;
  }
  .payment-detail-container {
    padding: 1rem;
  }
  .payment-detail-container .detail-header {
    flex-direction: column;
    text-align: center;
  }
  .payment-detail-container .detail-header .header-right {
    justify-content: center;
    flex-wrap: wrap;
  }
  .payment-detail-container .detail-content .detail-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .payment-detail-container .detail-section {
    padding: 1rem;
  }
  .payment-detail-container .detail-section h3 {
    font-size: 1.125rem;
  }
  .payment-detail-container .info-grid .info-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .payment-detail-container .info-grid .info-item label {
    min-width: auto;
  }
  .payment-detail-container .participants-grid .participant-card,
  .payment-detail-container .links-grid .link-card,
  .payment-detail-container .history-list .history-item {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
  .payment-detail-container .participants-grid .participant-card .participant-icon,
  .payment-detail-container .participants-grid .participant-card .link-icon,
  .payment-detail-container .participants-grid .participant-card .history-icon,
  .payment-detail-container .links-grid .link-card .participant-icon,
  .payment-detail-container .links-grid .link-card .link-icon,
  .payment-detail-container .links-grid .link-card .history-icon,
  .payment-detail-container .history-list .history-item .participant-icon,
  .payment-detail-container .history-list .history-item .link-icon,
  .payment-detail-container .history-list .history-item .history-icon {
    margin: 0 auto;
  }
}
.notifications-page {
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
}
@media (max-width: 768px) {
  .notifications-page {
    padding: 16px;
  }
}

.page-header {
  margin-bottom: 24px;
}
.page-header .header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.page-header .header-content h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}
.page-header .header-content .header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}
@media (max-width: 768px) {
  .page-header .header-content .header-actions {
    flex-direction: column;
    gap: 8px;
  }
}

.notifications-container {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.notifications-filters {
  padding: 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}
@media (max-width: 768px) {
  .notifications-filters {
    flex-direction: column;
    gap: 16px;
  }
}
.notifications-filters .filter-group {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  align-items: center;
}
.notifications-filters .filter-group .filter-label {
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
}
.notifications-filters .filter-group .filter-select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: var(--transition);
}
.notifications-filters .filter-group .filter-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}
.notifications-filters .filter-group .filter-select::placeholder {
  color: var(--text-muted);
}
.notifications-filters .filter-group .filter-select:disabled {
  background: var(--bg-secondary);
  color: var(--text-muted);
  cursor: not-allowed;
}
.notifications-filters .filter-group .filter-select {
  min-width: 160px;
  padding: 8px 12px;
  font-size: 14px;
}

.notifications-list {
  min-height: 200px;
}
.notifications-list .loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 16px;
}
.notifications-list .loading-spinner i {
  margin-right: 12px;
  font-size: 20px;
}
.notifications-list .error-message {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--error-color);
  font-size: 16px;
}
.notifications-list .error-message i {
  margin-right: 12px;
  font-size: 20px;
}

.notification-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}
.notification-item:last-child {
  border-bottom: none;
}
.notification-item:hover {
  background: var(--bg-hover);
}
.notification-item.unread {
  background: rgba(var(--primary-rgb), 0.02);
  border-left: 4px solid var(--primary-color);
}
.notification-item.unread .notification-title {
  font-weight: 600;
}
.notification-item.read {
  opacity: 0.8;
}
.notification-item.warning .notification-icon {
  color: var(--warning-color);
}
.notification-item.info .notification-icon {
  color: var(--info-color);
}
.notification-item.success .notification-icon {
  color: var(--success-color);
}
.notification-item.error .notification-icon {
  color: var(--error-color);
}
.notification-item .notification-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.notification-item .notification-content {
  flex: 1;
  min-width: 0;
}
.notification-item .notification-content .notification-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.notification-item .notification-content .notification-header .notification-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notification-item .notification-content .notification-header .notification-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-shrink: 0;
}
.notification-item .notification-content .notification-header .notification-actions .btn-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.notification-item .notification-content .notification-header .notification-actions .btn-icon:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.notification-item .notification-content .notification-header .notification-actions .btn-icon.mark-read-btn:hover {
  color: var(--success-color);
}
.notification-item .notification-content .notification-header .notification-actions .btn-icon.delete-btn:hover {
  color: var(--error-color);
}
.notification-item .notification-content .notification-message {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 12px 0;
}
.notification-item .notification-content .notification-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  font-size: 12px;
}
.notification-item .notification-content .notification-meta .notification-time {
  color: var(--text-muted);
}
.notification-item .notification-content .notification-meta .notification-link {
  color: var(--primary-color);
  text-decoration: none;
}
.notification-item .notification-content .notification-meta .notification-link:hover {
  text-decoration: underline;
}

.notifications-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px;
  border-top: 1px solid var(--border-light);
}
.notifications-pagination .pagination-info {
  color: var(--text-muted);
  font-size: 14px;
}

.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 60px 20px;
  text-align: center;
}
.empty-state .empty-icon {
  width: 80px;
  height: 80px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 40px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.empty-state h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}
.empty-state p {
  color: var(--text-muted);
  font-size: 16px;
  margin: 0;
  max-width: 400px;
}

#notificationSettingsModal .modal-content {
  max-width: 500px;
}
#notificationSettingsModal .setting-group {
  margin-bottom: 20px;
}
#notificationSettingsModal .setting-group .setting-label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
}
#notificationSettingsModal .setting-group .setting-label input[type=checkbox] {
  width: 18px;
  height: 18px;
}
#notificationSettingsModal .setting-group .notification-types {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
#notificationSettingsModal .setting-group .notification-types .type-checkbox {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
}
#notificationSettingsModal .setting-group .notification-types .type-checkbox input[type=checkbox] {
  width: 16px;
  height: 16px;
}

@media (max-width: 768px) {
  .notifications-page .page-header .header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .notifications-page .page-header .header-content .header-actions {
    width: 100%;
  }
  .notifications-page .page-header .header-content .header-actions .btn {
    flex: 1;
  }
  .notification-item {
    padding: 16px;
  }
  .notification-item .notification-content .notification-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .notification-item .notification-content .notification-header .notification-actions {
    align-self: flex-end;
  }
}
.analytics-layout {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: 24px;
  margin: 0 auto;
  align-content: flex-start;
  flex-direction: row;
}
@media (max-width: 768px) {
  .analytics-layout {
    display: flex;
    flex-direction: column;
    padding: 16px;
    gap: 16px;
  }
}

.filters-sidebar {
  width: 320px;
  flex-shrink: 0;
}
@media (max-width: 768px) {
  .filters-sidebar {
    width: 100%;
  }
}
.filters-sidebar .filters-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.filters-sidebar .filters-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.filters-sidebar .filters-card {
  padding: 20px;
  position: sticky;
  top: 24px;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-color);
}
@media (max-width: 768px) {
  .filters-sidebar .filters-card {
    padding: 16px;
    position: static;
    border-radius: var(--radius-md);
  }
}
.filters-sidebar .filters-card .filters-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.filters-sidebar .filters-card .filters-form .filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
}
.filters-sidebar .filters-card .filters-form .filter-group:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.filters-sidebar .filters-card .filters-form .filter-group:first-child {
  padding-top: 0;
}
.filters-sidebar .filters-card .filters-form .filter-group .filter-label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}
.filters-sidebar .filters-card .filters-form .filter-group .filter-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: var(--transition);
}
.filters-sidebar .filters-card .filters-form .filter-group .filter-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}
.filters-sidebar .filters-card .filters-form .filter-group .filter-input::placeholder {
  color: var(--text-muted);
}
.filters-sidebar .filters-card .filters-form .filter-group .filter-input:disabled {
  background: var(--bg-secondary);
  color: var(--text-muted);
  cursor: not-allowed;
}
.filters-sidebar .filters-card .filters-form .filter-group .filter-input {
  width: 100%;
  min-height: 36px;
  padding: 8px 12px;
  font-size: 13px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: all 0.2s ease;
}
.filters-sidebar .filters-card .filters-form .filter-group .filter-input:hover {
  border-color: var(--primary-color);
}
.filters-sidebar .filters-card .filters-form .filter-group .filter-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.1);
}
.filters-sidebar .filters-card .filters-form .filter-group .date-inputs {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  align-items: center;
}
@media (max-width: 768px) {
  .filters-sidebar .filters-card .filters-form .filter-group .date-inputs {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
}
.filters-sidebar .filters-card .filters-form .filter-group .date-inputs .date-separator {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 14px;
  user-select: none;
}
@media (max-width: 768px) {
  .filters-sidebar .filters-card .filters-form .filter-group .date-inputs .date-separator {
    display: none;
  }
}
.filters-sidebar .filters-card .filters-form .filter-group .filter-select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: var(--transition);
}
.filters-sidebar .filters-card .filters-form .filter-group .filter-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}
.filters-sidebar .filters-card .filters-form .filter-group .filter-select::placeholder {
  color: var(--text-muted);
}
.filters-sidebar .filters-card .filters-form .filter-group .filter-select:disabled {
  background: var(--bg-secondary);
  color: var(--text-muted);
  cursor: not-allowed;
}
.filters-sidebar .filters-card .filters-form .filter-group .filter-select {
  width: 100%;
  min-height: 36px;
  padding: 8px 12px;
  font-size: 13px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}
.filters-sidebar .filters-card .filters-form .filter-group .filter-select:hover {
  border-color: var(--primary-color);
}
.filters-sidebar .filters-card .filters-form .filter-group .filter-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.1);
}
.filters-sidebar .filters-card .filters-form .filter-group .filter-select option {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  padding: 8px;
}
.filters-sidebar .filters-card .filters-form .filter-group .filter-select[multiple] {
  min-height: 80px;
  max-height: 120px;
}
.filters-sidebar .filters-card .filters-form .filter-group .filter-select[multiple] option {
  padding: 6px 8px;
  margin: 2px 0;
  border-radius: var(--radius-sm);
}
.filters-sidebar .filters-card .filters-form .filter-group .filter-select[multiple] option:checked {
  background-color: var(--primary-color);
  color: white;
}
.filters-sidebar .filters-card .filters-form .filter-group .filter-select[multiple] option:hover {
  background-color: var(--bg-secondary);
}
.filters-sidebar .filters-card .filters-form .filter-group .filter-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.filters-sidebar .filters-card .filters-form .filter-group .filter-checkboxes .checkbox-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 4px 0;
  cursor: pointer;
  transition: all 0.2s ease;
}
.filters-sidebar .filters-card .filters-form .filter-group .filter-checkboxes .checkbox-item:hover {
  background-color: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  margin: 0 -8px;
}
.filters-sidebar .filters-card .filters-form .filter-group .filter-checkboxes .checkbox-item input[type=checkbox] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary-color);
  cursor: pointer;
}
.filters-sidebar .filters-card .filters-form .filter-group .filter-checkboxes .checkbox-item label {
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
}
.filters-sidebar .filters-card .filters-form .filter-group .quick-dates {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}
.filters-sidebar .filters-card .filters-form .filter-group .quick-dates .quick-date-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.filters-sidebar .filters-card .filters-form .filter-group .quick-dates .quick-date-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.filters-sidebar .filters-card .filters-form .filter-group .quick-dates .quick-date-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}
.filters-sidebar .filters-card .filters-form .filter-group .quick-dates .quick-date-btn {
  padding: 8px 16px;
  font-size: 12px;
  border-radius: var(--radius-md);
  min-width: 70px;
  font-weight: 500;
  transition: all 0.2s ease;
}
.filters-sidebar .filters-card .filters-form .filter-group .quick-dates .quick-date-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.filters-sidebar .filters-card .filters-form .filter-group .quick-dates .quick-date-btn.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  box-shadow: 0 2px 8px rgba(var(--primary-color-rgb), 0.3);
}
.filters-sidebar .filters-card .filters-form .filter-group .reset-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.filters-sidebar .filters-card .filters-form .filter-group .reset-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.filters-sidebar .filters-card .filters-form .filter-group .reset-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}
.filters-sidebar .filters-card .filters-form .filter-group .reset-btn {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--border-color);
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  width: 100%;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}
.filters-sidebar .filters-card .filters-form .filter-group .reset-btn:hover {
  background-color: var(--border-color);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.filters-sidebar .filters-card .filters-form .filter-group .reset-btn:active {
  transform: translateY(0);
}

.content-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
@media (max-width: 768px) {
  .content-main {
    gap: 16px;
  }
}
.content-main .kpi-card,
.content-main .chart-card {
  transition: all 0.3s ease;
}
.content-main .kpi-card:hover,
.content-main .chart-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.kpi-section .kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
@media (max-width: 768px) {
  .kpi-section .kpi-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
.kpi-section .kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.kpi-section .kpi-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.kpi-section .kpi-card {
  padding: 24px;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-color);
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}
@media (max-width: 768px) {
  .kpi-section .kpi-card {
    padding: 16px;
    border-radius: var(--radius-md);
  }
}
.kpi-section .kpi-card .kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.kpi-section .kpi-card .kpi-header .kpi-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.kpi-section .kpi-card .kpi-header .kpi-icon {
  width: 24px;
  height: 24px;
  opacity: 0.6;
}
.kpi-section .kpi-card .kpi-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.kpi-section .kpi-card .kpi-description {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}
.kpi-section .kpi-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}
.kpi-section .kpi-title {
  margin: 0 0 12px 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.kpi-section .kpi-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.kpi-section .kpi-subtitle {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.charts-section .chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.charts-section .chart-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.charts-section .chart-card {
  padding: 24px;
  margin-bottom: 24px;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-color);
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}
@media (max-width: 768px) {
  .charts-section .chart-card {
    padding: 16px;
    margin-bottom: 16px;
    border-radius: var(--radius-md);
  }
}
.charts-section .chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}
.charts-section .chart-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.charts-section .chart-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}
.charts-section .chart-container {
  height: 400px;
  margin-bottom: 20px;
}
@media (max-width: 768px) {
  .charts-section .chart-container {
    height: 300px;
  }
}
.charts-section .chart-info {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  padding: 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
@media (max-width: 768px) {
  .charts-section .chart-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
  }
}
.charts-section .info-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 16px;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  min-width: 120px;
}
@media (max-width: 768px) {
  .charts-section .info-item {
    min-width: auto;
    padding: 10px 12px;
  }
}
.charts-section .info-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.charts-section .info-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.overdue-list {
  margin-top: 20px;
}
.overdue-list h4 {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}
.overdue-list .overdue-task-item,
.overdue-list .contractor-item {
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin-bottom: 8px;
  transition: all 0.2s ease;
}
.overdue-list .overdue-task-item:hover,
.overdue-list .contractor-item:hover {
  background: var(--bg-primary);
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.overdue-list .overdue-task-item:last-child,
.overdue-list .contractor-item:last-child {
  margin-bottom: 0;
}
.overdue-list .task-title,
.overdue-list .contractor-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.overdue-list .task-overdue,
.overdue-list .contractor-amount,
.overdue-list .contractor-count {
  font-size: 13px;
  color: var(--text-muted);
}
.overdue-list .no-data {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-style: italic;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-color);
}

.top-contractors {
  margin-top: 20px;
}
.top-contractors h4 {
  margin: 0 0 16px 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.contractors-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contractor-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.contractor-name {
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
}

.contractor-amount {
  font-weight: 600;
  color: var(--success-color);
  margin: 0 16px;
}

.contractor-count {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.productivity-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}
@media (max-width: 768px) {
  .productivity-metrics {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.metric-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.metric-value {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.tables-section .tables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
}
@media (max-width: 768px) {
  .tables-section .tables-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
.tables-section .table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.tables-section .table-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.tables-section .table-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}
@media (max-width: 768px) {
  .tables-section .table-header {
    padding: 16px;
  }
}
.tables-section .table-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}
.tables-section .table-container {
  overflow-x: auto;
}
.tables-section .data-table {
  width: 100%;
  border-collapse: collapse;
}
.tables-section .data-table th,
.tables-section .data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}
@media (max-width: 768px) {
  .tables-section .data-table th,
  .tables-section .data-table td {
    padding: 8px 12px;
  }
}
.tables-section .data-table th {
  background: var(--bg-secondary);
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.tables-section .data-table td {
  font-size: 0.875rem;
  color: var(--text-primary);
}
.tables-section .data-table tbody tr:hover {
  background: var(--bg-hover);
}

.loading-spinner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.spinner-content {
  background: var(--bg-primary);
  padding: 32px;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-xl);
}
@media (max-width: 768px) {
  .spinner-content {
    padding: 24px;
  }
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--bg-secondary);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
.spinner-content p {
  margin: 0;
  color: var(--text-primary);
  font-weight: 500;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}
.btn.btn-sm {
  padding: 6px 12px;
  font-size: 0.75rem;
}
.btn.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border-color: var(--primary-color);
}
.btn.btn-outline:hover:not(:disabled) {
  filter: brightness(0.95);
  transform: translateY(-1px);
}
.btn.btn-outline:active:not(:disabled) {
  transform: translateY(0);
}
.btn.btn-outline:hover {
  background: var(--primary-color);
  color: white;
  border-color: transparent;
}
.btn.btn-outline:hover:hover:not(:disabled) {
  filter: brightness(0.95);
  transform: translateY(-1px);
}
.btn.btn-outline:hover:active:not(:disabled) {
  transform: translateY(0);
}

@media (max-width: 768px) {
  .analytics-layout {
    padding: 16px;
    gap: 16px;
  }
  .filters-sidebar {
    order: 2;
  }
  .filters-sidebar .filters-card {
    position: static;
    margin-bottom: 16px;
  }
  .content-main {
    order: 1;
    gap: 16px;
  }
  .kpi-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .chart-container {
    height: 250px;
  }
  .chart-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .chart-info .info-item {
    min-width: auto;
    width: 100%;
  }
  .quick-dates {
    justify-content: center;
  }
  .quick-dates .quick-date-btn {
    flex: 1;
    min-width: auto;
    text-align: center;
  }
}
.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--text-muted);
}
.loading-state .loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border-color);
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 12px;
}
.loading-state .loading-text {
  font-size: 14px;
  font-weight: 500;
}

.error-state {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--error-color);
  background: var(--error-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--error-border);
}
.error-state .error-icon {
  width: 24px;
  height: 24px;
  margin-right: 12px;
}
.error-state .error-text {
  font-size: 14px;
  font-weight: 500;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
.kpi-card,
.chart-card {
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.export-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.export-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.export-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}
.export-btn {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}
.export-btn:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.task-info-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}
.task-info-card .info-section {
  padding: 0.75rem;
  border-bottom: 1px solid #f1f3f4;
}
.task-info-card .info-section:last-child {
  border-bottom: none;
}
.task-info-card .info-section h4 {
  font-size: 0.75rem;
  font-weight: 600;
  color: #5f6368;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid #e8eaed;
  position: relative;
}
.task-info-card .info-section h4::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 20px;
  height: 1px;
  background: linear-gradient(90deg, #4285f4, #34a853);
  border-radius: 0.5px;
}

.task-sidebar .tab-content {
  padding: 0;
}

.status-badges {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.status-badges select {
  min-width: 120px;
  padding: 0.375rem 0.5rem;
  border: 1px solid #dadce0;
  border-radius: 6px;
  background: #fff;
  font-size: 0.8rem;
  font-weight: 500;
  color: #3c4043;
  transition: all 0.2s ease;
}
.status-badges select:focus {
  outline: none;
  border-color: #4285f4;
  box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.1);
}
.status-badges select:hover {
  border-color: #b8b9bc;
}

.task-sidebar .status-badges .status-badge,
.task-info-card .status-badges .status-badge {
  margin-bottom: 8px;
}
.task-sidebar .status-badges .status-badge.status-open,
.task-info-card .status-badges .status-badge.status-open {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}
.task-sidebar .status-badges .status-badge.status-in_progress,
.task-info-card .status-badges .status-badge.status-in_progress {
  background: linear-gradient(135deg, #ffc107, #e0a800);
  color: white;
  border: none;
  box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}
.task-sidebar .status-badges .status-badge.status-completed,
.task-info-card .status-badges .status-badge.status-completed {
  background: linear-gradient(135deg, #28a745, #1e7e34);
  color: white;
  border: none;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}
.task-sidebar .status-badges .status-badge.status-cancelled,
.task-info-card .status-badges .status-badge.status-cancelled {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: white;
  border: none;
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}
.task-sidebar .status-badges .status-badge.priority-low,
.task-info-card .status-badges .status-badge.priority-low {
  background: linear-gradient(135deg, #6c757d, #495057);
  color: white;
  border: none;
  box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}
.task-sidebar .status-badges .status-badge.priority-medium,
.task-info-card .status-badges .status-badge.priority-medium {
  background: linear-gradient(135deg, #ffc107, #e0a800);
  color: white;
  border: none;
  box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}
.task-sidebar .status-badges .status-badge.priority-high,
.task-info-card .status-badges .status-badge.priority-high {
  background: linear-gradient(135deg, #ff4500, #cc3700);
  color: white;
  border: none;
  box-shadow: 0 2px 8px rgba(255, 69, 0, 0.3);
}
.task-sidebar .status-badges .status-badge.priority-urgent,
.task-info-card .status-badges .status-badge.priority-urgent {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: white;
  border: none;
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.info-grid .info-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.375rem 0;
  border-bottom: 1px solid #f1f3f4;
  transition: all 0.2s ease;
}
.info-grid .info-item:hover {
  background: #f8f9fa;
}
.info-grid .info-item .info-label {
  font-size: 0.8rem;
  color: #5f6368;
  font-weight: 500;
  min-width: 80px;
}
.info-grid .info-item .info-value {
  font-size: 0.8rem;
  color: #202124;
  font-weight: 500;
}
.info-grid .info-item input, .info-grid .info-item select {
  min-width: 120px;
  padding: 0.25rem 0.5rem;
  border: 1px solid #dadce0;
  border-radius: 4px;
  background: #fff;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}
.info-grid .info-item input:focus, .info-grid .info-item select:focus {
  outline: none;
  border-color: #4285f4;
  box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.1);
}
.info-grid .info-item input:hover, .info-grid .info-item select:hover {
  border-color: #b8b9bc;
}

.client-deal-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.client-deal-info .info-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.375rem 0;
  border-bottom: 1px solid #f1f3f4;
  transition: all 0.2s ease;
}
.client-deal-info .info-item:hover {
  background: #f8f9fa;
}
.client-deal-info .info-item .info-label {
  font-size: 0.8rem;
  color: #5f6368;
  font-weight: 500;
  min-width: 60px;
}
.client-deal-info .info-item select {
  min-width: 140px;
  padding: 0.25rem 0.5rem;
  border: 1px solid #dadce0;
  border-radius: 4px;
  background: #fff;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}
.client-deal-info .info-item select:focus {
  outline: none;
  border-color: #4285f4;
  box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.1);
}
.client-deal-info .info-item select:hover {
  border-color: #b8b9bc;
}

.cost-info .cost-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0;
  border-bottom: 1px solid #f1f3f4;
  transition: all 0.2s ease;
}
.cost-info .cost-item:hover {
  background: #f8f9fa;
}
.cost-info .cost-item .cost-label {
  font-size: 0.8rem;
  color: #5f6368;
  font-weight: 500;
  min-width: 70px;
}
.cost-info .cost-item input {
  width: 100px;
  padding: 0.25rem 0.5rem;
  border: 1px solid #dadce0;
  border-radius: 4px;
  background: #fff;
  font-size: 0.8rem;
  text-align: right;
  transition: all 0.2s ease;
}
.cost-info .cost-item input:focus {
  outline: none;
  border-color: #4285f4;
  box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.1);
}
.cost-info .cost-item input:hover {
  border-color: #b8b9bc;
}
.cost-info .cost-item select {
  min-width: 80px;
  padding: 0.25rem 0.5rem;
  border: 1px solid #dadce0;
  border-radius: 4px;
  background: #fff;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}
.cost-info .cost-item select:focus {
  outline: none;
  border-color: #4285f4;
  box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.1);
}
.cost-info .cost-item select:hover {
  border-color: #b8b9bc;
}

.payments-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.payments-info .payment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.375rem 0;
  border-bottom: 1px solid #f1f3f4;
}
.payments-info .payment-item:hover {
  background: transparent;
}
.payments-info .payment-item .payment-label {
  font-size: 0.8rem;
  color: #5f6368;
  font-weight: 500;
  min-width: 80px;
}
.payments-info .payment-item select {
  min-width: 120px;
  padding: 0.25rem 0.5rem;
  border: 1px solid #dadce0;
  border-radius: 4px;
  background: #fff;
  font-size: 0.8rem;
}
.payments-info .payment-item select:focus {
  outline: none;
  border-color: #4285f4;
  box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.1);
}
.payments-info .payment-item select:hover {
  border-color: #dadce0;
}

.custom-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.custom-fields .custom-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.375rem 0;
  border-bottom: 1px solid #f1f3f4;
}
.custom-fields .custom-field:hover {
  background: transparent;
}
.custom-fields .custom-field .custom-label {
  font-size: 0.8rem;
  color: #5f6368;
  font-weight: 500;
  min-width: 80px;
}
.custom-fields .custom-field input, .custom-fields .custom-field select, .custom-fields .custom-field textarea {
  padding: 0.25rem 0.5rem;
  border: 1px solid #dadce0;
  border-radius: 4px;
  background: #fff;
  font-size: 0.8rem;
}
.custom-fields .custom-field input:focus, .custom-fields .custom-field select:focus, .custom-fields .custom-field textarea:focus {
  outline: none;
  border-color: #4285f4;
  box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.1);
}
.custom-fields .custom-field input:hover, .custom-fields .custom-field select:hover, .custom-fields .custom-field textarea:hover {
  border-color: #dadce0;
}
.custom-fields .custom-field textarea {
  min-height: 40px;
  resize: vertical;
  width: 150px;
}
.custom-fields .custom-field input[type=text] {
  width: 150px;
}
.custom-fields .custom-field input[type=number] {
  width: 70px;
  text-align: center;
}
.custom-fields .custom-field .progress-percent {
  margin-left: 0.5rem;
  font-size: 0.75rem;
  color: #5f6368;
  font-weight: 500;
}

.attachments-list {
  margin-bottom: 1rem;
}

.upload-form {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
.upload-form .file-input {
  flex: 1;
  padding: 0.5rem;
  border: 2px dashed #dadce0;
  border-radius: 8px;
  background: #f8f9fa;
  cursor: pointer;
  transition: all 0.2s ease;
}
.upload-form .file-input:hover {
  border-color: #4285f4;
  background: #f1f3f4;
}
.upload-form .btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  background: linear-gradient(135deg, #4285f4, #34a853);
  color: white;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.upload-form .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

@media (max-width: 768px) {
  .task-info-card .info-section {
    padding: 1rem;
  }
  .info-item, .client-deal-info .info-item, .cost-info .cost-item,
  .payments-info .payment-item, .custom-fields .custom-field {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  .info-item .info-label, .info-item .cost-label, .info-item .payment-label, .info-item .custom-label, .client-deal-info .info-item .info-label, .client-deal-info .info-item .cost-label, .client-deal-info .info-item .payment-label, .client-deal-info .info-item .custom-label, .cost-info .cost-item .info-label, .cost-info .cost-item .cost-label, .cost-info .cost-item .payment-label, .cost-info .cost-item .custom-label,
  .payments-info .payment-item .info-label,
  .payments-info .payment-item .cost-label,
  .payments-info .payment-item .payment-label,
  .payments-info .payment-item .custom-label, .custom-fields .custom-field .info-label, .custom-fields .custom-field .cost-label, .custom-fields .custom-field .payment-label, .custom-fields .custom-field .custom-label {
    min-width: auto;
  }
  .info-item input, .info-item select, .info-item textarea, .client-deal-info .info-item input, .client-deal-info .info-item select, .client-deal-info .info-item textarea, .cost-info .cost-item input, .cost-info .cost-item select, .cost-info .cost-item textarea,
  .payments-info .payment-item input,
  .payments-info .payment-item select,
  .payments-info .payment-item textarea, .custom-fields .custom-field input, .custom-fields .custom-field select, .custom-fields .custom-field textarea {
    min-width: auto;
    width: 100%;
  }
  .status-badges {
    flex-direction: column;
    gap: 0.5rem;
  }
  .status-badges select {
    min-width: auto;
    width: 100%;
  }
}
.inline-select {
  display: inline-block;
  width: auto;
}

.inline-number {
  display: inline-block;
  width: auto;
}

.is-new-task .info-section {
  background: #f8f9fa;
  border-radius: 6px;
  padding: 1rem;
  border: 1px solid #e9ecef;
}

.payments-info .payment-item:hover,
.custom-fields .custom-field:hover {
  background: transparent;
  transform: none;
  box-shadow: none;
}

.task-sidebar .status-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.task-sidebar .status-badges select.status-badge {
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.task-sidebar .status-badges select.status-badge.status-open {
  background: #007bff;
  color: white;
}
.task-sidebar .status-badges select.status-badge.status-in_progress {
  background: #ffc107;
  color: white;
}
.task-sidebar .status-badges select.status-badge.status-completed {
  background: #28a745;
  color: white;
}
.task-sidebar .status-badges select.status-badge.status-cancelled {
  background: #dc3545;
  color: white;
}
.task-sidebar .status-badges select.status-badge.priority-low {
  background: #6c757d;
  color: white;
}
.task-sidebar .status-badges select.status-badge.priority-medium {
  background: #ffc107;
  color: white;
}
.task-sidebar .status-badges select.status-badge.priority-high {
  background: #fd7e14;
  color: white;
}
.task-sidebar .status-badges select.status-badge.priority-urgent {
  background: #dc3545;
  color: white;
}

.task-sidebar .info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.task-sidebar .info-grid .info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  border-radius: 8px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  flex-direction: row;
}
.task-sidebar .info-grid .info-item .info-label {
  color: #6c757d;
  font-size: 14px;
  font-weight: 500;
}
.task-sidebar .info-grid .info-item .info-value {
  color: #212529;
  font-weight: 600;
  font-size: 14px;
}
.task-sidebar .info-grid .info-item input, .task-sidebar .info-grid .info-item select {
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 14px;
}
.task-sidebar .info-grid .info-item input:focus, .task-sidebar .info-grid .info-item select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.user-info-block {
  display: flex;
  gap: 12px;
}
.user-info-block .user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.user-info-block .user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.user-info-block .user-avatar .avatar-placeholder {
  width: 100%;
  height: 100%;
  background: #007bff;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
  border-radius: 50%;
}
.user-info-block .user-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.user-info-block .user-details .user-name {
  font-weight: 600;
  font-size: 14px;
  color: #212529;
  line-height: 1.2;
}
.user-info-block .user-details .update-info {
  font-size: 11px;
  color: #6c757d;
  line-height: 1.2;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.section-header h4 {
  margin: 0;
}
.section-header .btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}
.section-header .btn .icon-plus {
  width: 14px;
  height: 14px;
}

.payments-list {
  margin-top: 1rem;
}
.payments-list h5 {
  margin-bottom: 0.75rem;
  color: #495057;
  font-size: 1rem;
  font-weight: 600;
}

.payment-item-card {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
}
.payment-item-card:last-child {
  margin-bottom: 0;
}

.payment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.payment-header .payment-title {
  font-weight: 600;
  color: #212529;
  font-size: 14px;
}
.payment-header .payment-amount {
  font-weight: 700;
  font-size: 14px;
}
.payment-header .payment-amount.income {
  color: #28a745;
}
.payment-header .payment-amount.expense {
  color: #dc3545;
}

.payment-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.payment-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.payment-info .payment-label {
  color: #6c757d;
  font-weight: 500;
  min-width: 80px;
}
.payment-info .payment-value {
  color: #212529;
}
.payment-info .payment-status {
  min-width: 120px;
  font-size: 11px;
}

.payment-item-card {
  position: relative;
}
.payment-item-card .payment-actions {
  position: absolute;
  top: 12px;
  right: 12px;
}
.payment-item-card .payment-actions .payment-delete-btn {
  padding: 4px 8px;
  border-radius: 4px;
}
.payment-item-card .payment-actions .payment-delete-btn .svg-icon {
  width: 14px;
  height: 14px;
}
.payment-item-card .payment-status-btn {
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}
.payment-item-card .payment-status-btn:hover {
  opacity: 0.8;
}
.payment-item-card .payment-status-btn.btn-success {
  background-color: #28a745;
  color: white;
}
.payment-item-card .payment-status-btn.btn-secondary {
  background-color: #6c757d;
  color: white;
}

.header-modules {
  display: flex;
  gap: 10px;
  margin-right: 15px;
}

.header-module {
  position: relative;
}

.header-module .header-action-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}
.header-module .header-action-btn .svg-icon {
  width: 20px;
  height: 20px;
  color: currentColor;
}

.header-module .header-action-btn:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.header-module .header-action-btn:active {
  transform: translateY(0);
}

.search-icon {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.dropdown-item .svg-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  margin-right: 8px;
  flex-shrink: 0;
}

.user-menu-btn .svg-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  margin-left: 8px;
  flex-shrink: 0;
}

.module-content {
  position: absolute;
  top: 100%;
  right: 0;
  width: 350px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  margin-top: 8px;
  overflow: hidden;
}

.todo-content .todo-input {
  display: flex;
  gap: 8px;
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-card);
}
.todo-content .todo-input input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  background: var(--bg-input);
  color: var(--text-primary);
}
.todo-content .todo-input input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.1);
}
.todo-content .todo-input button {
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  background: var(--primary-color);
  color: white;
  cursor: pointer;
  transition: background 0.2s;
}
.todo-content .todo-input button:hover {
  background: var(--primary-color-dark);
}
.todo-content .todo-list {
  max-height: 300px;
  overflow-y: auto;
  padding: 8px;
}
.todo-content .todo-list .todo-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 4px;
  transition: background 0.2s;
}
.todo-content .todo-list .todo-item:hover {
  background: var(--bg-hover);
}
.todo-content .todo-list .todo-item .todo-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
}
.todo-content .todo-list .todo-item .todo-text {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
}
.todo-content .todo-list .todo-item .todo-text.completed {
  text-decoration: line-through;
  color: var(--text-muted);
}
.todo-content .todo-list .todo-item .todo-delete {
  padding: 4px 8px;
  border: none;
  border-radius: 4px;
  background: var(--danger-color);
  color: white;
  cursor: pointer;
  font-size: 12px;
}
.todo-content .todo-list .todo-item .todo-delete:hover {
  background: var(--danger-color-dark);
}

.recent-content .recent-list {
  max-height: 400px;
  overflow-y: auto;
  padding: 8px;
}
.recent-content .recent-list .recent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 4px;
  transition: all 0.2s;
  cursor: pointer;
}
.recent-content .recent-list .recent-item:hover {
  background: var(--bg-hover);
  transform: translateX(2px);
}
.recent-content .recent-list .recent-item .recent-icon {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.recent-content .recent-list .recent-item .recent-icon .svg-icon {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
}
.recent-content .recent-list .recent-item .recent-info {
  flex: 1;
  min-width: 0;
}
.recent-content .recent-list .recent-item .recent-info .recent-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.recent-content .recent-list .recent-item .recent-info .recent-time {
  font-size: 12px;
  color: var(--text-muted);
}

.todo-empty, .recent-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-style: italic;
}

.todo-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--danger-color);
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  line-height: 1.2;
}

@media (max-width: 768px) {
  .header-modules {
    margin-right: 10px;
    gap: 8px;
  }
  .module-content {
    width: 300px;
    right: -50px;
  }
}
.entity-builder-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}
.entity-builder-container .page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border-color);
}
.entity-builder-container .page-header h2 {
  margin: 0;
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-primary);
}
.entity-builder-container .page-header .btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 500;
}
.entity-builder-container .entities-list-section {
  margin-bottom: 40px;
}
.entity-builder-container .entities-list-section h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}
.entity-builder-container .entities-list-section .mt-4 {
  margin-top: 2rem;
}
.entity-builder-container .entities-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 20px;
}
.entity-builder-container .entities-list .entity-card {
  background: var(--bg-primary);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}
.entity-builder-container .entities-list .entity-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}
.entity-builder-container .entities-list .entity-card.standard-entity {
  border-left: 4px solid var(--success-color);
}
.entity-builder-container .entities-list .entity-card.standard-entity .entity-header .entity-name .badge {
  background: var(--success-color);
}
.entity-builder-container .entities-list .entity-card.custom-entity {
  border-left: 4px solid var(--info-color);
}
.entity-builder-container .entities-list .entity-card.custom-entity .entity-header .entity-name .badge {
  background: var(--info-color);
}
.entity-builder-container .entities-list .entity-card .entity-header {
  padding: 20px;
  display: flex;
  gap: 20px;
}
.entity-builder-container .entities-list .entity-card .entity-header .entity-icon {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  background: var(--primary-gradient);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}
.entity-builder-container .entities-list .entity-card .entity-header .entity-icon i {
  font-size: 2rem;
}
.entity-builder-container .entities-list .entity-card .entity-header .entity-icon svg {
  width: 32px;
  height: 32px;
  color: white;
}
.entity-builder-container .entities-list .entity-card .entity-header .entity-info {
  flex: 1;
}
.entity-builder-container .entities-list .entity-card .entity-header .entity-info .entity-name {
  margin: 0 0 10px 0;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}
.entity-builder-container .entities-list .entity-card .entity-header .entity-info .entity-name .badge {
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 12px;
  color: white;
  font-weight: 500;
}
.entity-builder-container .entities-list .entity-card .entity-header .entity-info .entity-description {
  color: var(--text-secondary);
  margin-bottom: 15px;
  line-height: 1.5;
}
.entity-builder-container .entities-list .entity-card .entity-header .entity-info .entity-stats {
  display: flex;
  gap: 15px;
}
.entity-builder-container .entities-list .entity-card .entity-header .entity-info .entity-stats .stat {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.entity-builder-container .entities-list .entity-card .entity-header .entity-info .entity-stats .stat i {
  color: var(--info-color);
}
.entity-builder-container .entities-list .entity-card .entity-actions {
  padding: 20px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.entity-builder-container .entities-list .entity-card .entity-actions .btn {
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
}
.entity-builder-container .empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 2px dashed var(--border-color);
}
.entity-builder-container .empty-state::before {
  content: "📋";
  font-size: 3rem;
  display: block;
  margin-bottom: 20px;
}

.modal .modal-header.bg-gradient-primary {
  background: var(--primary-gradient);
  border-bottom: none;
}
.modal .modal-header.bg-gradient-primary .modal-title {
  font-weight: 600;
  font-size: 1.25rem;
}
.modal .modal-body {
  padding: 1.5rem;
}
.modal .modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
}
.modal .modal-footer .btn.btn-primary {
  background: var(--primary-color) !important;
  color: white !important;
  border-color: var(--primary-color) !important;
}
.modal .modal-footer .btn.btn-primary:hover {
  background: var(--primary-hover) !important;
  border-color: var(--primary-hover) !important;
}
.modal .modal-footer .btn.btn-secondary {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}
.modal .modal-footer .btn.btn-secondary:hover {
  background: var(--border-color) !important;
}

.form-section .form-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
  display: flex;
  align-items: center;
}
.form-section .form-section-title i {
  color: var(--text-muted);
}

.icon-selector-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.icon-selector-wrapper .icon-preview-current {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  background: var(--bg-secondary);
  color: var(--text-muted);
  transition: all 0.2s ease;
}
.icon-selector-wrapper .icon-preview-current:hover {
  border-color: var(--border-dark);
  background: var(--bg-hover);
}
.icon-selector-wrapper .icon-preview-current i {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.icon-selector-wrapper .icon-preview-current span {
  font-size: 0.75rem;
  text-align: center;
  line-height: 1.2;
}
.icon-selector-wrapper .icon-preview-current.has-icon {
  border-style: solid;
  border-color: var(--success-color);
  background: var(--bg-secondary);
}
.icon-selector-wrapper .icon-preview-current.has-icon svg {
  width: 48px;
  height: 48px;
  color: var(--success-color);
}

.menu-position-options .form-check {
  margin-right: 1.5rem;
}
.menu-position-options .form-check .form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}
.menu-position-options .form-check .form-check-label {
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
}
.menu-position-options .form-check .form-check-label i {
  color: var(--text-muted);
}

.icon-search-section .input-group .input-group-text {
  background: var(--bg-secondary);
  border-color: var(--border-color);
  color: var(--text-muted);
}
.icon-search-section .input-group .form-control {
  border-color: var(--border-color);
}
.icon-search-section .input-group .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(var(--primary-rgb), 0.25);
}
.icon-search-section .input-group .btn {
  border-color: var(--border-color);
}
.icon-search-section .input-group .btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-dark);
}

.icon-categories .btn-group .btn {
  border-radius: 6px;
  margin-right: 0.5rem;
  font-weight: 500;
}
.icon-categories .btn-group .btn:not(:last-child) {
  margin-right: 0.5rem;
}
.icon-categories .btn-group .btn-check:checked + .btn {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.icons-container {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-secondary);
}
.icons-container .no-icons-found {
  padding: 2rem;
}
.icons-container .no-icons-found i {
  color: var(--text-light);
}
.icons-container .no-icons-found h6 {
  color: var(--text-muted);
  margin-top: 1rem;
}
.icons-container .no-icons-found p {
  color: var(--text-light);
  margin-bottom: 0;
}

.icons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.75rem;
  padding: 1rem;
  background: var(--bg-primary);
  border-radius: 8px;
  margin: 1rem;
}

.icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--bg-primary);
}
.icon-item:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.15);
}
.icon-item.selected {
  border-color: var(--success-color);
  background-color: var(--bg-secondary);
  box-shadow: 0 0 0 3px rgba(var(--success-rgb), 0.25);
}
.icon-item.selected .icon-name {
  color: var(--success-color);
  font-weight: 600;
}

.icon-preview {
  width: 32px;
  height: 32px;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.icon-preview svg {
  width: 100%;
  height: 100%;
  color: var(--text-primary);
}

.icon-name {
  font-size: 0.75rem;
  text-align: center;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-label {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-control, .form-select {
  border-radius: 8px;
  border: 2px solid var(--border-color);
  padding: 12px 15px;
  transition: all 0.3s ease;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(var(--primary-rgb), 0.25);
}
.form-control.form-control-lg, .form-select.form-control-lg {
  padding: 15px 18px;
  font-size: 1.1rem;
}

.form-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 5px;
}

.btn.btn-outline-primary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}
.btn.btn-outline-primary:hover {
  background: var(--primary-color);
  color: white;
}
.btn.btn-outline-danger {
  background: transparent;
  color: var(--danger-color);
  border: 2px solid var(--danger-color);
}
.btn.btn-outline-danger:hover {
  background: var(--danger-color);
  color: white;
}
.btn.btn-lg {
  padding: 12px 24px;
  font-size: 1.1rem;
}

@media (max-width: 768px) {
  .entity-builder-container {
    padding: 15px;
  }
  .entity-builder-container .page-header {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }
  .entity-builder-container .page-header h2 {
    font-size: 1.5rem;
  }
  .entity-builder-container .entities-list {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .entity-builder-container .entities-list .entity-card .entity-header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  .entity-builder-container .entities-list .entity-card .entity-header .entity-icon {
    align-self: center;
  }
  .entity-builder-container .entities-list .entity-card .entity-actions {
    flex-direction: column;
    gap: 10px;
  }
  .entity-builder-container .entities-list .entity-card .entity-actions .btn {
    width: 100%;
  }
  .icon-selector-wrapper {
    flex-direction: column;
    align-items: stretch;
  }
  .icon-selector-wrapper .icon-preview-current {
    width: 100%;
    height: 60px;
    flex-direction: row;
  }
  .icon-selector-wrapper .icon-preview-current i {
    font-size: 1.5rem;
    margin-bottom: 0;
    margin-right: 0.5rem;
  }
  .icons-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
    padding: 0.75rem;
    margin: 0.75rem;
  }
  .icon-item {
    padding: 0.5rem;
  }
  .icon-preview {
    width: 24px;
    height: 24px;
  }
  .icon-name {
    font-size: 0.7rem;
  }
  .icon-categories .btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
  }
  .icon-categories .btn-group .btn {
    flex: 1;
    min-width: 80px;
    margin-right: 0;
  }
}
@media (max-width: 480px) {
  .entity-builder-container {
    padding: 10px;
  }
  .entity-builder-container .page-header h2 {
    font-size: 1.3rem;
  }
  .entity-builder-container .entities-list .entity-card .entity-header {
    padding: 15px;
  }
  .entity-builder-container .entities-list .entity-card .entity-header .entity-icon {
    width: 50px;
    height: 50px;
  }
  .entity-builder-container .entities-list .entity-card .entity-header .entity-icon i {
    font-size: 1.5rem;
  }
  .entity-builder-container .entities-list .entity-card .entity-actions {
    padding: 15px;
  }
}
.entity-detail-page {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 24px;
}
@media (max-width: 768px) {
  .entity-detail-page {
    padding: 16px;
  }
}

.entity-detail-container {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.page-header {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}
@media (max-width: 768px) {
  .page-header {
    padding: 16px;
    margin-bottom: 16px;
  }
}
.page-header .page-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  align-items: flex-start;
}
@media (max-width: 768px) {
  .page-header .page-header-content {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }
}
.page-header .header-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.page-header .header-left h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}
@media (max-width: 768px) {
  .page-header .header-left h1 {
    font-size: 24px;
  }
}
.page-header .header-left h1 .svg-icon {
  width: 24px;
  height: 24px;
  color: var(--primary-color);
}
.page-header .header-left .page-subtitle {
  margin: 0;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.5;
}
.page-header .header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}
@media (max-width: 768px) {
  .page-header .header-actions {
    justify-content: stretch;
  }
  .page-header .header-actions .btn {
    flex: 1;
  }
}

.entity-info-section,
.entity-fields-section,
.entity-triggers-section,
.entity-records-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.entity-info-section:hover,
.entity-fields-section:hover,
.entity-triggers-section:hover,
.entity-records-section:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.entity-info-section,
.entity-fields-section,
.entity-triggers-section,
.entity-records-section {
  margin-bottom: 24px;
}
@media (max-width: 768px) {
  .entity-info-section,
  .entity-fields-section,
  .entity-triggers-section,
  .entity-records-section {
    margin-bottom: 16px;
  }
}
.entity-info-section .section-header,
.entity-fields-section .section-header,
.entity-triggers-section .section-header,
.entity-records-section .section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
@media (max-width: 768px) {
  .entity-info-section .section-header,
  .entity-fields-section .section-header,
  .entity-triggers-section .section-header,
  .entity-records-section .section-header {
    padding: 16px;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
}
.entity-info-section .section-header h3,
.entity-fields-section .section-header h3,
.entity-triggers-section .section-header h3,
.entity-records-section .section-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}
.entity-info-section .section-header .btn,
.entity-fields-section .section-header .btn,
.entity-triggers-section .section-header .btn,
.entity-records-section .section-header .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.entity-info-section .section-header .btn:disabled,
.entity-fields-section .section-header .btn:disabled,
.entity-triggers-section .section-header .btn:disabled,
.entity-records-section .section-header .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.entity-info-section .section-header .btn:focus,
.entity-fields-section .section-header .btn:focus,
.entity-triggers-section .section-header .btn:focus,
.entity-records-section .section-header .btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}
.entity-info-section .section-header .btn,
.entity-fields-section .section-header .btn,
.entity-triggers-section .section-header .btn,
.entity-records-section .section-header .btn {
  background: var(--success-color);
  color: white;
  border-color: transparent;
}
.entity-info-section .section-header .btn:hover:not(:disabled),
.entity-fields-section .section-header .btn:hover:not(:disabled),
.entity-triggers-section .section-header .btn:hover:not(:disabled),
.entity-records-section .section-header .btn:hover:not(:disabled) {
  filter: brightness(0.95);
  transform: translateY(-1px);
}
.entity-info-section .section-header .btn:active:not(:disabled),
.entity-fields-section .section-header .btn:active:not(:disabled),
.entity-triggers-section .section-header .btn:active:not(:disabled),
.entity-records-section .section-header .btn:active:not(:disabled) {
  transform: translateY(0);
}
.entity-info-section .section-header .btn,
.entity-fields-section .section-header .btn,
.entity-triggers-section .section-header .btn,
.entity-records-section .section-header .btn {
  font-size: 14px;
  padding: 8px 16px;
}
.entity-info-section .section-header .btn .svg-icon,
.entity-fields-section .section-header .btn .svg-icon,
.entity-triggers-section .section-header .btn .svg-icon,
.entity-records-section .section-header .btn .svg-icon {
  width: 16px;
  height: 16px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
@media (max-width: 768px) {
  .info-grid {
    padding: 16px;
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
.info-grid .info-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.info-grid .info-item label {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.info-grid .info-item .value {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
}
.info-grid .info-item .value .svg-icon {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  color: var(--primary-color);
}

.fields-list,
.triggers-list,
.records-list {
  padding: 24px;
}
@media (max-width: 768px) {
  .fields-list,
  .triggers-list,
  .records-list {
    padding: 16px;
  }
}
.fields-list .empty-state,
.triggers-list .empty-state,
.records-list .empty-state {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  padding: 40px 20px;
}

.field-item,
.trigger-item,
.record-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.field-item:hover,
.trigger-item:hover,
.record-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.field-item,
.trigger-item,
.record-item {
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border-light);
}
.field-item:last-child,
.trigger-item:last-child,
.record-item:last-child {
  margin-bottom: 0;
}
.field-item .field-info,
.field-item .trigger-info,
.field-item .record-info,
.trigger-item .field-info,
.trigger-item .trigger-info,
.trigger-item .record-info,
.record-item .field-info,
.record-item .trigger-info,
.record-item .record-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  align-items: flex-start;
}
@media (max-width: 768px) {
  .field-item .field-info,
  .field-item .trigger-info,
  .field-item .record-info,
  .trigger-item .field-info,
  .trigger-item .trigger-info,
  .trigger-item .record-info,
  .record-item .field-info,
  .record-item .trigger-info,
  .record-item .record-info {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
}
.field-item .field-info .field-name,
.field-item .field-info .trigger-name,
.field-item .field-info .record-name,
.field-item .trigger-info .field-name,
.field-item .trigger-info .trigger-name,
.field-item .trigger-info .record-name,
.field-item .record-info .field-name,
.field-item .record-info .trigger-name,
.field-item .record-info .record-name,
.trigger-item .field-info .field-name,
.trigger-item .field-info .trigger-name,
.trigger-item .field-info .record-name,
.trigger-item .trigger-info .field-name,
.trigger-item .trigger-info .trigger-name,
.trigger-item .trigger-info .record-name,
.trigger-item .record-info .field-name,
.trigger-item .record-info .trigger-name,
.trigger-item .record-info .record-name,
.record-item .field-info .field-name,
.record-item .field-info .trigger-name,
.record-item .field-info .record-name,
.record-item .trigger-info .field-name,
.record-item .trigger-info .trigger-name,
.record-item .trigger-info .record-name,
.record-item .record-info .field-name,
.record-item .record-info .trigger-name,
.record-item .record-info .record-name {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.field-item .field-info .field-name strong,
.field-item .field-info .trigger-name strong,
.field-item .field-info .record-name strong,
.field-item .trigger-info .field-name strong,
.field-item .trigger-info .trigger-name strong,
.field-item .trigger-info .record-name strong,
.field-item .record-info .field-name strong,
.field-item .record-info .trigger-name strong,
.field-item .record-info .record-name strong,
.trigger-item .field-info .field-name strong,
.trigger-item .field-info .trigger-name strong,
.trigger-item .field-info .record-name strong,
.trigger-item .trigger-info .field-name strong,
.trigger-item .trigger-info .trigger-name strong,
.trigger-item .trigger-info .record-name strong,
.trigger-item .record-info .field-name strong,
.trigger-item .record-info .trigger-name strong,
.trigger-item .record-info .record-name strong,
.record-item .field-info .field-name strong,
.record-item .field-info .trigger-name strong,
.record-item .field-info .record-name strong,
.record-item .trigger-info .field-name strong,
.record-item .trigger-info .trigger-name strong,
.record-item .trigger-info .record-name strong,
.record-item .record-info .field-name strong,
.record-item .record-info .trigger-name strong,
.record-item .record-info .record-name strong {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
}
.field-item .field-info .field-name .field-type,
.field-item .field-info .field-name .trigger-type,
.field-item .field-info .field-name .trigger-action,
.field-item .field-info .trigger-name .field-type,
.field-item .field-info .trigger-name .trigger-type,
.field-item .field-info .trigger-name .trigger-action,
.field-item .field-info .record-name .field-type,
.field-item .field-info .record-name .trigger-type,
.field-item .field-info .record-name .trigger-action,
.field-item .trigger-info .field-name .field-type,
.field-item .trigger-info .field-name .trigger-type,
.field-item .trigger-info .field-name .trigger-action,
.field-item .trigger-info .trigger-name .field-type,
.field-item .trigger-info .trigger-name .trigger-type,
.field-item .trigger-info .trigger-name .trigger-action,
.field-item .trigger-info .record-name .field-type,
.field-item .trigger-info .record-name .trigger-type,
.field-item .trigger-info .record-name .trigger-action,
.field-item .record-info .field-name .field-type,
.field-item .record-info .field-name .trigger-type,
.field-item .record-info .field-name .trigger-action,
.field-item .record-info .trigger-name .field-type,
.field-item .record-info .trigger-name .trigger-type,
.field-item .record-info .trigger-name .trigger-action,
.field-item .record-info .record-name .field-type,
.field-item .record-info .record-name .trigger-type,
.field-item .record-info .record-name .trigger-action,
.trigger-item .field-info .field-name .field-type,
.trigger-item .field-info .field-name .trigger-type,
.trigger-item .field-info .field-name .trigger-action,
.trigger-item .field-info .trigger-name .field-type,
.trigger-item .field-info .trigger-name .trigger-type,
.trigger-item .field-info .trigger-name .trigger-action,
.trigger-item .field-info .record-name .field-type,
.trigger-item .field-info .record-name .trigger-type,
.trigger-item .field-info .record-name .trigger-action,
.trigger-item .trigger-info .field-name .field-type,
.trigger-item .trigger-info .field-name .trigger-type,
.trigger-item .trigger-info .field-name .trigger-action,
.trigger-item .trigger-info .trigger-name .field-type,
.trigger-item .trigger-info .trigger-name .trigger-type,
.trigger-item .trigger-info .trigger-name .trigger-action,
.trigger-item .trigger-info .record-name .field-type,
.trigger-item .trigger-info .record-name .trigger-type,
.trigger-item .trigger-info .record-name .trigger-action,
.trigger-item .record-info .field-name .field-type,
.trigger-item .record-info .field-name .trigger-type,
.trigger-item .record-info .field-name .trigger-action,
.trigger-item .record-info .trigger-name .field-type,
.trigger-item .record-info .trigger-name .trigger-type,
.trigger-item .record-info .trigger-name .trigger-action,
.trigger-item .record-info .record-name .field-type,
.trigger-item .record-info .record-name .trigger-type,
.trigger-item .record-info .record-name .trigger-action,
.record-item .field-info .field-name .field-type,
.record-item .field-info .field-name .trigger-type,
.record-item .field-info .field-name .trigger-action,
.record-item .field-info .trigger-name .field-type,
.record-item .field-info .trigger-name .trigger-type,
.record-item .field-info .trigger-name .trigger-action,
.record-item .field-info .record-name .field-type,
.record-item .field-info .record-name .trigger-type,
.record-item .field-info .record-name .trigger-action,
.record-item .trigger-info .field-name .field-type,
.record-item .trigger-info .field-name .trigger-type,
.record-item .trigger-info .field-name .trigger-action,
.record-item .trigger-info .trigger-name .field-type,
.record-item .trigger-info .trigger-name .trigger-type,
.record-item .trigger-info .trigger-name .trigger-action,
.record-item .trigger-info .record-name .field-type,
.record-item .trigger-info .record-name .trigger-type,
.record-item .trigger-info .record-name .trigger-action,
.record-item .record-info .field-name .field-type,
.record-item .record-info .field-name .trigger-type,
.record-item .record-info .field-name .trigger-action,
.record-item .record-info .trigger-name .field-type,
.record-item .record-info .trigger-name .trigger-type,
.record-item .record-info .trigger-name .trigger-action,
.record-item .record-info .record-name .field-type,
.record-item .record-info .record-name .trigger-type,
.record-item .record-info .record-name .trigger-action {
  color: var(--text-secondary);
  font-size: 12px;
  background: var(--bg-secondary);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  display: inline-block;
}
.field-item .field-info .field-actions,
.field-item .field-info .trigger-actions,
.field-item .field-info .record-actions,
.field-item .trigger-info .field-actions,
.field-item .trigger-info .trigger-actions,
.field-item .trigger-info .record-actions,
.field-item .record-info .field-actions,
.field-item .record-info .trigger-actions,
.field-item .record-info .record-actions,
.trigger-item .field-info .field-actions,
.trigger-item .field-info .trigger-actions,
.trigger-item .field-info .record-actions,
.trigger-item .trigger-info .field-actions,
.trigger-item .trigger-info .trigger-actions,
.trigger-item .trigger-info .record-actions,
.trigger-item .record-info .field-actions,
.trigger-item .record-info .trigger-actions,
.trigger-item .record-info .record-actions,
.record-item .field-info .field-actions,
.record-item .field-info .trigger-actions,
.record-item .field-info .record-actions,
.record-item .trigger-info .field-actions,
.record-item .trigger-info .trigger-actions,
.record-item .trigger-info .record-actions,
.record-item .record-info .field-actions,
.record-item .record-info .trigger-actions,
.record-item .record-info .record-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}
@media (max-width: 768px) {
  .field-item .field-info .field-actions,
  .field-item .field-info .trigger-actions,
  .field-item .field-info .record-actions,
  .field-item .trigger-info .field-actions,
  .field-item .trigger-info .trigger-actions,
  .field-item .trigger-info .record-actions,
  .field-item .record-info .field-actions,
  .field-item .record-info .trigger-actions,
  .field-item .record-info .record-actions,
  .trigger-item .field-info .field-actions,
  .trigger-item .field-info .trigger-actions,
  .trigger-item .field-info .record-actions,
  .trigger-item .trigger-info .field-actions,
  .trigger-item .trigger-info .trigger-actions,
  .trigger-item .trigger-info .record-actions,
  .trigger-item .record-info .field-actions,
  .trigger-item .record-info .trigger-actions,
  .trigger-item .record-info .record-actions,
  .record-item .field-info .field-actions,
  .record-item .field-info .trigger-actions,
  .record-item .field-info .record-actions,
  .record-item .trigger-info .field-actions,
  .record-item .trigger-info .trigger-actions,
  .record-item .trigger-info .record-actions,
  .record-item .record-info .field-actions,
  .record-item .record-info .trigger-actions,
  .record-item .record-info .record-actions {
    justify-content: stretch;
  }
  .field-item .field-info .field-actions .btn,
  .field-item .field-info .trigger-actions .btn,
  .field-item .field-info .record-actions .btn,
  .field-item .trigger-info .field-actions .btn,
  .field-item .trigger-info .trigger-actions .btn,
  .field-item .trigger-info .record-actions .btn,
  .field-item .record-info .field-actions .btn,
  .field-item .record-info .trigger-actions .btn,
  .field-item .record-info .record-actions .btn,
  .trigger-item .field-info .field-actions .btn,
  .trigger-item .field-info .trigger-actions .btn,
  .trigger-item .field-info .record-actions .btn,
  .trigger-item .trigger-info .field-actions .btn,
  .trigger-item .trigger-info .trigger-actions .btn,
  .trigger-item .trigger-info .record-actions .btn,
  .trigger-item .record-info .field-actions .btn,
  .trigger-item .record-info .trigger-actions .btn,
  .trigger-item .record-info .record-actions .btn,
  .record-item .field-info .field-actions .btn,
  .record-item .field-info .trigger-actions .btn,
  .record-item .field-info .record-actions .btn,
  .record-item .trigger-info .field-actions .btn,
  .record-item .trigger-info .trigger-actions .btn,
  .record-item .trigger-info .record-actions .btn,
  .record-item .record-info .field-actions .btn,
  .record-item .record-info .trigger-actions .btn,
  .record-item .record-info .record-actions .btn {
    flex: 1;
  }
}
.field-item .field-info .field-actions .btn,
.field-item .field-info .trigger-actions .btn,
.field-item .field-info .record-actions .btn,
.field-item .trigger-info .field-actions .btn,
.field-item .trigger-info .trigger-actions .btn,
.field-item .trigger-info .record-actions .btn,
.field-item .record-info .field-actions .btn,
.field-item .record-info .trigger-actions .btn,
.field-item .record-info .record-actions .btn,
.trigger-item .field-info .field-actions .btn,
.trigger-item .field-info .trigger-actions .btn,
.trigger-item .field-info .record-actions .btn,
.trigger-item .trigger-info .field-actions .btn,
.trigger-item .trigger-info .trigger-actions .btn,
.trigger-item .trigger-info .record-actions .btn,
.trigger-item .record-info .field-actions .btn,
.trigger-item .record-info .trigger-actions .btn,
.trigger-item .record-info .record-actions .btn,
.record-item .field-info .field-actions .btn,
.record-item .field-info .trigger-actions .btn,
.record-item .field-info .record-actions .btn,
.record-item .trigger-info .field-actions .btn,
.record-item .trigger-info .trigger-actions .btn,
.record-item .trigger-info .record-actions .btn,
.record-item .record-info .field-actions .btn,
.record-item .record-info .trigger-actions .btn,
.record-item .record-info .record-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.field-item .field-info .field-actions .btn:disabled,
.field-item .field-info .trigger-actions .btn:disabled,
.field-item .field-info .record-actions .btn:disabled,
.field-item .trigger-info .field-actions .btn:disabled,
.field-item .trigger-info .trigger-actions .btn:disabled,
.field-item .trigger-info .record-actions .btn:disabled,
.field-item .record-info .field-actions .btn:disabled,
.field-item .record-info .trigger-actions .btn:disabled,
.field-item .record-info .record-actions .btn:disabled,
.trigger-item .field-info .field-actions .btn:disabled,
.trigger-item .field-info .trigger-actions .btn:disabled,
.trigger-item .field-info .record-actions .btn:disabled,
.trigger-item .trigger-info .field-actions .btn:disabled,
.trigger-item .trigger-info .trigger-actions .btn:disabled,
.trigger-item .trigger-info .record-actions .btn:disabled,
.trigger-item .record-info .field-actions .btn:disabled,
.trigger-item .record-info .trigger-actions .btn:disabled,
.trigger-item .record-info .record-actions .btn:disabled,
.record-item .field-info .field-actions .btn:disabled,
.record-item .field-info .trigger-actions .btn:disabled,
.record-item .field-info .record-actions .btn:disabled,
.record-item .trigger-info .field-actions .btn:disabled,
.record-item .trigger-info .trigger-actions .btn:disabled,
.record-item .trigger-info .record-actions .btn:disabled,
.record-item .record-info .field-actions .btn:disabled,
.record-item .record-info .trigger-actions .btn:disabled,
.record-item .record-info .record-actions .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.field-item .field-info .field-actions .btn:focus,
.field-item .field-info .trigger-actions .btn:focus,
.field-item .field-info .record-actions .btn:focus,
.field-item .trigger-info .field-actions .btn:focus,
.field-item .trigger-info .trigger-actions .btn:focus,
.field-item .trigger-info .record-actions .btn:focus,
.field-item .record-info .field-actions .btn:focus,
.field-item .record-info .trigger-actions .btn:focus,
.field-item .record-info .record-actions .btn:focus,
.trigger-item .field-info .field-actions .btn:focus,
.trigger-item .field-info .trigger-actions .btn:focus,
.trigger-item .field-info .record-actions .btn:focus,
.trigger-item .trigger-info .field-actions .btn:focus,
.trigger-item .trigger-info .trigger-actions .btn:focus,
.trigger-item .trigger-info .record-actions .btn:focus,
.trigger-item .record-info .field-actions .btn:focus,
.trigger-item .record-info .trigger-actions .btn:focus,
.trigger-item .record-info .record-actions .btn:focus,
.record-item .field-info .field-actions .btn:focus,
.record-item .field-info .trigger-actions .btn:focus,
.record-item .field-info .record-actions .btn:focus,
.record-item .trigger-info .field-actions .btn:focus,
.record-item .trigger-info .trigger-actions .btn:focus,
.record-item .trigger-info .record-actions .btn:focus,
.record-item .record-info .field-actions .btn:focus,
.record-item .record-info .trigger-actions .btn:focus,
.record-item .record-info .record-actions .btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}
.field-item .field-info .field-actions .btn,
.field-item .field-info .trigger-actions .btn,
.field-item .field-info .record-actions .btn,
.field-item .trigger-info .field-actions .btn,
.field-item .trigger-info .trigger-actions .btn,
.field-item .trigger-info .record-actions .btn,
.field-item .record-info .field-actions .btn,
.field-item .record-info .trigger-actions .btn,
.field-item .record-info .record-actions .btn,
.trigger-item .field-info .field-actions .btn,
.trigger-item .field-info .trigger-actions .btn,
.trigger-item .field-info .record-actions .btn,
.trigger-item .trigger-info .field-actions .btn,
.trigger-item .trigger-info .trigger-actions .btn,
.trigger-item .trigger-info .record-actions .btn,
.trigger-item .record-info .field-actions .btn,
.trigger-item .record-info .trigger-actions .btn,
.trigger-item .record-info .record-actions .btn,
.record-item .field-info .field-actions .btn,
.record-item .field-info .trigger-actions .btn,
.record-item .field-info .record-actions .btn,
.record-item .trigger-info .field-actions .btn,
.record-item .trigger-info .trigger-actions .btn,
.record-item .trigger-info .record-actions .btn,
.record-item .record-info .field-actions .btn,
.record-item .record-info .trigger-actions .btn,
.record-item .record-info .record-actions .btn {
  font-size: 12px;
  padding: 6px 12px;
}
.field-item .field-info .field-actions .btn.btn-outline-primary,
.field-item .field-info .trigger-actions .btn.btn-outline-primary,
.field-item .field-info .record-actions .btn.btn-outline-primary,
.field-item .trigger-info .field-actions .btn.btn-outline-primary,
.field-item .trigger-info .trigger-actions .btn.btn-outline-primary,
.field-item .trigger-info .record-actions .btn.btn-outline-primary,
.field-item .record-info .field-actions .btn.btn-outline-primary,
.field-item .record-info .trigger-actions .btn.btn-outline-primary,
.field-item .record-info .record-actions .btn.btn-outline-primary,
.trigger-item .field-info .field-actions .btn.btn-outline-primary,
.trigger-item .field-info .trigger-actions .btn.btn-outline-primary,
.trigger-item .field-info .record-actions .btn.btn-outline-primary,
.trigger-item .trigger-info .field-actions .btn.btn-outline-primary,
.trigger-item .trigger-info .trigger-actions .btn.btn-outline-primary,
.trigger-item .trigger-info .record-actions .btn.btn-outline-primary,
.trigger-item .record-info .field-actions .btn.btn-outline-primary,
.trigger-item .record-info .trigger-actions .btn.btn-outline-primary,
.trigger-item .record-info .record-actions .btn.btn-outline-primary,
.record-item .field-info .field-actions .btn.btn-outline-primary,
.record-item .field-info .trigger-actions .btn.btn-outline-primary,
.record-item .field-info .record-actions .btn.btn-outline-primary,
.record-item .trigger-info .field-actions .btn.btn-outline-primary,
.record-item .trigger-info .trigger-actions .btn.btn-outline-primary,
.record-item .trigger-info .record-actions .btn.btn-outline-primary,
.record-item .record-info .field-actions .btn.btn-outline-primary,
.record-item .record-info .trigger-actions .btn.btn-outline-primary,
.record-item .record-info .record-actions .btn.btn-outline-primary {
  background: transparent;
  color: var(--info-color);
  border-color: var(--info-color);
}
.field-item .field-info .field-actions .btn.btn-outline-primary:hover:not(:disabled),
.field-item .field-info .trigger-actions .btn.btn-outline-primary:hover:not(:disabled),
.field-item .field-info .record-actions .btn.btn-outline-primary:hover:not(:disabled),
.field-item .trigger-info .field-actions .btn.btn-outline-primary:hover:not(:disabled),
.field-item .trigger-info .trigger-actions .btn.btn-outline-primary:hover:not(:disabled),
.field-item .trigger-info .record-actions .btn.btn-outline-primary:hover:not(:disabled),
.field-item .record-info .field-actions .btn.btn-outline-primary:hover:not(:disabled),
.field-item .record-info .trigger-actions .btn.btn-outline-primary:hover:not(:disabled),
.field-item .record-info .record-actions .btn.btn-outline-primary:hover:not(:disabled),
.trigger-item .field-info .field-actions .btn.btn-outline-primary:hover:not(:disabled),
.trigger-item .field-info .trigger-actions .btn.btn-outline-primary:hover:not(:disabled),
.trigger-item .field-info .record-actions .btn.btn-outline-primary:hover:not(:disabled),
.trigger-item .trigger-info .field-actions .btn.btn-outline-primary:hover:not(:disabled),
.trigger-item .trigger-info .trigger-actions .btn.btn-outline-primary:hover:not(:disabled),
.trigger-item .trigger-info .record-actions .btn.btn-outline-primary:hover:not(:disabled),
.trigger-item .record-info .field-actions .btn.btn-outline-primary:hover:not(:disabled),
.trigger-item .record-info .trigger-actions .btn.btn-outline-primary:hover:not(:disabled),
.trigger-item .record-info .record-actions .btn.btn-outline-primary:hover:not(:disabled),
.record-item .field-info .field-actions .btn.btn-outline-primary:hover:not(:disabled),
.record-item .field-info .trigger-actions .btn.btn-outline-primary:hover:not(:disabled),
.record-item .field-info .record-actions .btn.btn-outline-primary:hover:not(:disabled),
.record-item .trigger-info .field-actions .btn.btn-outline-primary:hover:not(:disabled),
.record-item .trigger-info .trigger-actions .btn.btn-outline-primary:hover:not(:disabled),
.record-item .trigger-info .record-actions .btn.btn-outline-primary:hover:not(:disabled),
.record-item .record-info .field-actions .btn.btn-outline-primary:hover:not(:disabled),
.record-item .record-info .trigger-actions .btn.btn-outline-primary:hover:not(:disabled),
.record-item .record-info .record-actions .btn.btn-outline-primary:hover:not(:disabled) {
  filter: brightness(0.95);
  transform: translateY(-1px);
}
.field-item .field-info .field-actions .btn.btn-outline-primary:active:not(:disabled),
.field-item .field-info .trigger-actions .btn.btn-outline-primary:active:not(:disabled),
.field-item .field-info .record-actions .btn.btn-outline-primary:active:not(:disabled),
.field-item .trigger-info .field-actions .btn.btn-outline-primary:active:not(:disabled),
.field-item .trigger-info .trigger-actions .btn.btn-outline-primary:active:not(:disabled),
.field-item .trigger-info .record-actions .btn.btn-outline-primary:active:not(:disabled),
.field-item .record-info .field-actions .btn.btn-outline-primary:active:not(:disabled),
.field-item .record-info .trigger-actions .btn.btn-outline-primary:active:not(:disabled),
.field-item .record-info .record-actions .btn.btn-outline-primary:active:not(:disabled),
.trigger-item .field-info .field-actions .btn.btn-outline-primary:active:not(:disabled),
.trigger-item .field-info .trigger-actions .btn.btn-outline-primary:active:not(:disabled),
.trigger-item .field-info .record-actions .btn.btn-outline-primary:active:not(:disabled),
.trigger-item .trigger-info .field-actions .btn.btn-outline-primary:active:not(:disabled),
.trigger-item .trigger-info .trigger-actions .btn.btn-outline-primary:active:not(:disabled),
.trigger-item .trigger-info .record-actions .btn.btn-outline-primary:active:not(:disabled),
.trigger-item .record-info .field-actions .btn.btn-outline-primary:active:not(:disabled),
.trigger-item .record-info .trigger-actions .btn.btn-outline-primary:active:not(:disabled),
.trigger-item .record-info .record-actions .btn.btn-outline-primary:active:not(:disabled),
.record-item .field-info .field-actions .btn.btn-outline-primary:active:not(:disabled),
.record-item .field-info .trigger-actions .btn.btn-outline-primary:active:not(:disabled),
.record-item .field-info .record-actions .btn.btn-outline-primary:active:not(:disabled),
.record-item .trigger-info .field-actions .btn.btn-outline-primary:active:not(:disabled),
.record-item .trigger-info .trigger-actions .btn.btn-outline-primary:active:not(:disabled),
.record-item .trigger-info .record-actions .btn.btn-outline-primary:active:not(:disabled),
.record-item .record-info .field-actions .btn.btn-outline-primary:active:not(:disabled),
.record-item .record-info .trigger-actions .btn.btn-outline-primary:active:not(:disabled),
.record-item .record-info .record-actions .btn.btn-outline-primary:active:not(:disabled) {
  transform: translateY(0);
}
.field-item .field-info .field-actions .btn.btn-outline-danger,
.field-item .field-info .trigger-actions .btn.btn-outline-danger,
.field-item .field-info .record-actions .btn.btn-outline-danger,
.field-item .trigger-info .field-actions .btn.btn-outline-danger,
.field-item .trigger-info .trigger-actions .btn.btn-outline-danger,
.field-item .trigger-info .record-actions .btn.btn-outline-danger,
.field-item .record-info .field-actions .btn.btn-outline-danger,
.field-item .record-info .trigger-actions .btn.btn-outline-danger,
.field-item .record-info .record-actions .btn.btn-outline-danger,
.trigger-item .field-info .field-actions .btn.btn-outline-danger,
.trigger-item .field-info .trigger-actions .btn.btn-outline-danger,
.trigger-item .field-info .record-actions .btn.btn-outline-danger,
.trigger-item .trigger-info .field-actions .btn.btn-outline-danger,
.trigger-item .trigger-info .trigger-actions .btn.btn-outline-danger,
.trigger-item .trigger-info .record-actions .btn.btn-outline-danger,
.trigger-item .record-info .field-actions .btn.btn-outline-danger,
.trigger-item .record-info .trigger-actions .btn.btn-outline-danger,
.trigger-item .record-info .record-actions .btn.btn-outline-danger,
.record-item .field-info .field-actions .btn.btn-outline-danger,
.record-item .field-info .trigger-actions .btn.btn-outline-danger,
.record-item .field-info .record-actions .btn.btn-outline-danger,
.record-item .trigger-info .field-actions .btn.btn-outline-danger,
.record-item .trigger-info .trigger-actions .btn.btn-outline-danger,
.record-item .trigger-info .record-actions .btn.btn-outline-danger,
.record-item .record-info .field-actions .btn.btn-outline-danger,
.record-item .record-info .trigger-actions .btn.btn-outline-danger,
.record-item .record-info .record-actions .btn.btn-outline-danger {
  background: transparent;
  color: var(--danger-color);
  border-color: var(--danger-color);
}
.field-item .field-info .field-actions .btn.btn-outline-danger:hover:not(:disabled),
.field-item .field-info .trigger-actions .btn.btn-outline-danger:hover:not(:disabled),
.field-item .field-info .record-actions .btn.btn-outline-danger:hover:not(:disabled),
.field-item .trigger-info .field-actions .btn.btn-outline-danger:hover:not(:disabled),
.field-item .trigger-info .trigger-actions .btn.btn-outline-danger:hover:not(:disabled),
.field-item .trigger-info .record-actions .btn.btn-outline-danger:hover:not(:disabled),
.field-item .record-info .field-actions .btn.btn-outline-danger:hover:not(:disabled),
.field-item .record-info .trigger-actions .btn.btn-outline-danger:hover:not(:disabled),
.field-item .record-info .record-actions .btn.btn-outline-danger:hover:not(:disabled),
.trigger-item .field-info .field-actions .btn.btn-outline-danger:hover:not(:disabled),
.trigger-item .field-info .trigger-actions .btn.btn-outline-danger:hover:not(:disabled),
.trigger-item .field-info .record-actions .btn.btn-outline-danger:hover:not(:disabled),
.trigger-item .trigger-info .field-actions .btn.btn-outline-danger:hover:not(:disabled),
.trigger-item .trigger-info .trigger-actions .btn.btn-outline-danger:hover:not(:disabled),
.trigger-item .trigger-info .record-actions .btn.btn-outline-danger:hover:not(:disabled),
.trigger-item .record-info .field-actions .btn.btn-outline-danger:hover:not(:disabled),
.trigger-item .record-info .trigger-actions .btn.btn-outline-danger:hover:not(:disabled),
.trigger-item .record-info .record-actions .btn.btn-outline-danger:hover:not(:disabled),
.record-item .field-info .field-actions .btn.btn-outline-danger:hover:not(:disabled),
.record-item .field-info .trigger-actions .btn.btn-outline-danger:hover:not(:disabled),
.record-item .field-info .record-actions .btn.btn-outline-danger:hover:not(:disabled),
.record-item .trigger-info .field-actions .btn.btn-outline-danger:hover:not(:disabled),
.record-item .trigger-info .trigger-actions .btn.btn-outline-danger:hover:not(:disabled),
.record-item .trigger-info .record-actions .btn.btn-outline-danger:hover:not(:disabled),
.record-item .record-info .field-actions .btn.btn-outline-danger:hover:not(:disabled),
.record-item .record-info .trigger-actions .btn.btn-outline-danger:hover:not(:disabled),
.record-item .record-info .record-actions .btn.btn-outline-danger:hover:not(:disabled) {
  filter: brightness(0.95);
  transform: translateY(-1px);
}
.field-item .field-info .field-actions .btn.btn-outline-danger:active:not(:disabled),
.field-item .field-info .trigger-actions .btn.btn-outline-danger:active:not(:disabled),
.field-item .field-info .record-actions .btn.btn-outline-danger:active:not(:disabled),
.field-item .trigger-info .field-actions .btn.btn-outline-danger:active:not(:disabled),
.field-item .trigger-info .trigger-actions .btn.btn-outline-danger:active:not(:disabled),
.field-item .trigger-info .record-actions .btn.btn-outline-danger:active:not(:disabled),
.field-item .record-info .field-actions .btn.btn-outline-danger:active:not(:disabled),
.field-item .record-info .trigger-actions .btn.btn-outline-danger:active:not(:disabled),
.field-item .record-info .record-actions .btn.btn-outline-danger:active:not(:disabled),
.trigger-item .field-info .field-actions .btn.btn-outline-danger:active:not(:disabled),
.trigger-item .field-info .trigger-actions .btn.btn-outline-danger:active:not(:disabled),
.trigger-item .field-info .record-actions .btn.btn-outline-danger:active:not(:disabled),
.trigger-item .trigger-info .field-actions .btn.btn-outline-danger:active:not(:disabled),
.trigger-item .trigger-info .trigger-actions .btn.btn-outline-danger:active:not(:disabled),
.trigger-item .trigger-info .record-actions .btn.btn-outline-danger:active:not(:disabled),
.trigger-item .record-info .field-actions .btn.btn-outline-danger:active:not(:disabled),
.trigger-item .record-info .trigger-actions .btn.btn-outline-danger:active:not(:disabled),
.trigger-item .record-info .record-actions .btn.btn-outline-danger:active:not(:disabled),
.record-item .field-info .field-actions .btn.btn-outline-danger:active:not(:disabled),
.record-item .field-info .trigger-actions .btn.btn-outline-danger:active:not(:disabled),
.record-item .field-info .record-actions .btn.btn-outline-danger:active:not(:disabled),
.record-item .trigger-info .field-actions .btn.btn-outline-danger:active:not(:disabled),
.record-item .trigger-info .trigger-actions .btn.btn-outline-danger:active:not(:disabled),
.record-item .trigger-info .record-actions .btn.btn-outline-danger:active:not(:disabled),
.record-item .record-info .field-actions .btn.btn-outline-danger:active:not(:disabled),
.record-item .record-info .trigger-actions .btn.btn-outline-danger:active:not(:disabled),
.record-item .record-info .record-actions .btn.btn-outline-danger:active:not(:disabled) {
  transform: translateY(0);
}

.modal .modal-dialog {
  max-width: 600px;
  margin: 1.75rem auto;
}
.modal .modal-dialog.modal-lg {
  max-width: 800px;
}
.modal .modal-dialog.modal-xl {
  max-width: 1140px;
}
.modal .modal-content {
  max-width: 100% !important;
  max-height: 90vh !important;
  width: 100% !important;
  overflow-y: auto;
  position: relative;
}
.modal .modal-header {
  border-bottom: 1px solid var(--border-light);
  padding: 20px 24px;
}
.modal .modal-header .modal-title {
  margin: 0;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
}
.modal .modal-header .btn-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal .modal-header .btn-close:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
}
.modal .modal-header .btn-close::before, .modal .modal-header .btn-close::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 2px;
  background: currentColor;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
}
.modal .modal-header .btn-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}
.modal .modal-body {
  padding: 24px;
}
.modal .modal-body .form-label {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: block;
}
.modal .modal-body .form-control,
.modal .modal-body .form-select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: var(--transition);
}
.modal .modal-body .form-control:focus,
.modal .modal-body .form-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}
.modal .modal-body .form-control::placeholder,
.modal .modal-body .form-select::placeholder {
  color: var(--text-muted);
}
.modal .modal-body .form-control:disabled,
.modal .modal-body .form-select:disabled {
  background: var(--bg-secondary);
  color: var(--text-muted);
  cursor: not-allowed;
}
.modal .modal-body .form-control,
.modal .modal-body .form-select {
  margin-bottom: 16px;
}
.modal .modal-body .form-check {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 16px;
}
.modal .modal-body .form-check .form-check-input {
  margin: 0;
}
.modal .modal-body .form-check .form-check-label {
  margin: 0;
  color: var(--text-primary);
  font-size: 14px;
}
.modal .modal-body .input-group {
  display: flex;
  gap: 8px;
}
.modal .modal-body .input-group .form-control {
  flex: 1;
  margin-bottom: 0;
}
.modal .modal-body .input-group .btn {
  white-space: nowrap;
}
.modal .modal-body .form-text {
  color: var(--text-secondary);
  font-size: 12px;
  margin-top: 4px;
}
.modal .modal-footer {
  border-top: 1px solid var(--border-light);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}
.modal .modal-footer .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.modal .modal-footer .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.modal .modal-footer .btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}
.modal .modal-footer .btn {
  min-width: 100px;
}
.modal .modal-footer .btn.btn-primary {
  background: var(--primary-color);
  color: white;
  border-color: transparent;
}
.modal .modal-footer .btn.btn-primary:hover:not(:disabled) {
  filter: brightness(0.95);
  transform: translateY(-1px);
}
.modal .modal-footer .btn.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}
.modal .modal-footer .btn.btn-primary:hover {
  background: var(--primary-hover) !important;
  color: white !important;
}
.modal .modal-footer .btn.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--border-color);
}
.modal .modal-footer .btn.btn-secondary:hover:not(:disabled) {
  filter: brightness(0.95);
  transform: translateY(-1px);
}
.modal .modal-footer .btn.btn-secondary:active:not(:disabled) {
  transform: translateY(0);
}
.modal .modal-footer .btn.btn-secondary:hover {
  background: var(--border-color) !important;
  color: var(--text-primary) !important;
}

.standard-entity-info {
  background: var(--info-color);
  color: white;
  padding: 16px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}
.standard-entity-info h4 {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
}
.standard-entity-info p {
  margin: 0;
  font-size: 14px;
  opacity: 0.9;
}

.icon-input-section .icon-preview {
  margin-top: 12px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  text-align: center;
}
.icon-input-section .icon-preview .svg-icon {
  width: 32px;
  height: 32px;
  color: var(--primary-color);
  margin: 0 auto 8px;
  display: block;
}
.icon-input-section .icon-preview .preview-text {
  font-size: 12px;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .entity-detail-page {
    padding: 16px;
  }
  .page-header {
    padding: 16px;
  }
  .page-header .page-header-content {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }
  .page-header .header-actions {
    justify-content: stretch;
  }
  .page-header .header-actions .btn {
    flex: 1;
  }
  .info-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }
  .section-header {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  .field-actions,
  .trigger-actions,
  .record-actions {
    justify-content: stretch;
  }
  .field-actions .btn,
  .trigger-actions .btn,
  .record-actions .btn {
    flex: 1;
  }
}
.entity-sections {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-card {
  background: white;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
}
.section-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-header .section-actions {
  display: flex;
  gap: 8px;
}

.section-content {
  padding: 24px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.info-item label {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.875rem;
}
.info-item span {
  color: var(--text-primary);
  font-size: 1rem;
}

.field-item, .trigger-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  margin-bottom: 8px;
  background: var(--bg-secondary);
}
.field-item .field-info, .field-item .trigger-info, .trigger-item .field-info, .trigger-item .trigger-info {
  display: flex;
  align-items: center;
  gap: 8px;
}
.field-item .field-actions, .field-item .trigger-actions, .trigger-item .field-actions, .trigger-item .trigger-actions {
  display: flex;
  gap: 8px;
}

.badge {
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 4px;
}
.badge.bg-secondary {
  background-color: var(--secondary-color) !important;
}
.badge.bg-warning {
  background-color: var(--warning-color) !important;
  color: white !important;
}
.badge.bg-info {
  background-color: var(--info-color) !important;
  color: white !important;
}
.badge.bg-success {
  background-color: var(--success-color) !important;
  color: white !important;
}

.table-container {
  background: white;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.table-container .entity-records-table {
  width: 100%;
  border-collapse: collapse;
}
.table-container .entity-records-table th {
  background: var(--bg-secondary);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}
.table-container .entity-records-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--bg-secondary);
  vertical-align: top;
}
.table-container .entity-records-table tbody tr:hover {
  background: var(--bg-secondary);
}
.table-container .record-data {
  max-width: 300px;
}
.table-container .json-data {
  background: var(--bg-secondary);
  padding: 8px;
  border-radius: 4px;
  font-size: 12px;
  font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 100px;
  overflow-y: auto;
  margin: 0;
}
.table-container .record-actions {
  display: flex;
  gap: 8px;
}
.table-container .record-actions .btn {
  padding: 6px 8px;
  font-size: 12px;
}

.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding: 20px;
  background: white;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}
.pagination-container .pagination-info {
  color: var(--text-secondary);
  font-size: 14px;
}
.pagination-container .pagination-controls {
  display: flex;
  gap: 8px;
}
.pagination-container .pagination-controls .btn {
  padding: 8px 12px;
  font-size: 14px;
}

.modal-content {
  border-radius: 8px;
  border: none;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-header {
  border-bottom: 1px solid var(--border-color);
  padding: 20px 24px;
}

.modal-title {
  font-weight: 600;
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  border-top: 1px solid var(--border-color);
  padding: 20px 24px;
}

.form-label {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: block;
}

.form-control {
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
  transition: border-color 0.2s;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-select {
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
  background: white;
  transition: border-color 0.2s;
}
.form-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-text {
  color: var(--text-secondary);
  font-size: 12px;
  margin-top: 4px;
}

.icon-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}
.icon-preview svg {
  width: 16px;
  height: 16px;
}

.dropdown-menu {
  max-height: 300px;
  overflow-y: auto;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
}
.dropdown-item:hover {
  background: var(--bg-secondary);
}

.loading {
  opacity: 0.6;
  pointer-events: none;
}
.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--bg-secondary);
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}
.empty-state i {
  font-size: 3rem;
  margin-bottom: 20px;
  opacity: 0.5;
}
.empty-state h3 {
  margin: 0 0 10px 0;
  color: var(--text-primary);
}
.empty-state p {
  margin: 0;
  font-size: 16px;
}

@media (max-width: 768px) {
  .entity-detail-container {
    padding: 15px;
  }
  .page-header {
    flex-direction: column;
    gap: 20px;
  }
  .header-actions {
    width: 100%;
    justify-content: stretch;
  }
  .header-actions .btn {
    flex: 1;
    justify-content: center;
  }
  .filters-section {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
  }
  .filters-section .search-box {
    max-width: none;
  }
  .filters-section .filter-controls {
    justify-content: stretch;
  }
  .filters-section .filter-controls .filter-select {
    flex: 1;
  }
  .pagination-container {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  .table-container {
    overflow-x: auto;
  }
  .table-container .entity-records-table {
    min-width: 600px;
  }
}
.entity-records-container {
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}
.page-header .header-left {
  flex: 1;
}
.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 10px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.page-header .page-subtitle {
  color: var(--text-secondary);
  font-size: 16px;
  margin: 0;
}
.page-header .header-actions {
  display: flex;
  gap: 12px;
}

.filters-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding: 20px;
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}
.filters-section .search-box {
  position: relative;
  flex: 1;
  max-width: 400px;
}
.filters-section .search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}
.filters-section .search-box .search-input {
  width: 100%;
  padding: 10px 12px 10px 40px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s;
}
.filters-section .search-box .search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.filters-section .filter-controls {
  display: flex;
  gap: 12px;
}
.filters-section .filter-controls .filter-select {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-width: 120px;
}

.table-container {
  background: var(--bg-primary);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.table-container .entity-records-table {
  width: 100%;
  border-collapse: collapse;
}
.table-container .entity-records-table th {
  background: var(--bg-secondary);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}
.table-container .entity-records-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--bg-secondary);
  vertical-align: top;
}
.table-container .entity-records-table tbody tr:hover {
  background: var(--bg-secondary);
}
.table-container .record-data {
  max-width: 300px;
}
.table-container .json-data {
  background: var(--bg-secondary);
  padding: 8px;
  border-radius: 4px;
  font-size: 12px;
  font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 100px;
  overflow-y: auto;
  margin: 0;
}
.table-container .record-actions {
  display: flex;
  gap: 8px;
}
.table-container .record-actions .btn {
  padding: 6px 8px;
  font-size: 12px;
}

.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding: 20px;
  background: var(--bg-primary);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}
.pagination-container .pagination-info {
  color: var(--text-secondary);
  font-size: 14px;
}
.pagination-container .pagination-controls {
  display: flex;
  gap: 8px;
}
.pagination-container .pagination-controls .btn {
  padding: 8px 12px;
  font-size: 14px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}
.empty-state i {
  font-size: 3rem;
  margin-bottom: 20px;
  opacity: 0.5;
}
.empty-state h3 {
  margin: 0 0 10px 0;
  color: var(--text-primary);
}
.empty-state p {
  margin: 0 0 20px 0;
  font-size: 16px;
}

.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 14px;
}
.loading-spinner i {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
.modal .modal-dialog {
  max-width: 600px;
  margin: 1.75rem auto;
}
.modal .modal-dialog.modal-lg {
  max-width: 800px;
}
.modal .modal-dialog.modal-xl {
  max-width: 1140px;
}
.modal .modal-content {
  max-width: 100% !important;
  max-height: 90vh !important;
  width: 100% !important;
  overflow-y: auto;
  position: relative;
  border-radius: 8px;
  border: none;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.modal .modal-header {
  border-bottom: 1px solid var(--border-color);
  padding: 20px 24px;
}
.modal .modal-header .modal-title {
  font-weight: 600;
  color: var(--text-primary);
}
.modal .modal-header .btn-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal .modal-header .btn-close:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
}
.modal .modal-header .btn-close::before, .modal .modal-header .btn-close::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 2px;
  background: currentColor;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
}
.modal .modal-header .btn-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}
.modal .modal-body {
  padding: 24px;
}
.modal .modal-footer {
  border-top: 1px solid var(--border-color);
  padding: 20px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
.modal .modal-footer .btn {
  min-width: 100px;
}
.modal .modal-footer .btn.btn-primary {
  background: var(--primary-color) !important;
  color: white !important;
  border-color: var(--primary-color) !important;
}
.modal .modal-footer .btn.btn-primary:hover {
  background: var(--primary-hover) !important;
  border-color: var(--primary-hover) !important;
}
.modal .modal-footer .btn.btn-secondary {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}
.modal .modal-footer .btn.btn-secondary:hover {
  background: var(--border-color) !important;
}

.form-label {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: block;
}

.form-control {
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
  transition: border-color 0.2s;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-text {
  color: var(--text-secondary);
  font-size: 12px;
  margin-top: 4px;
}

.record-view {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.record-view .record-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: 6px;
}
.record-view .record-info .info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.record-view .record-info .info-item label {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.875rem;
}
.record-view .record-info .info-item span {
  color: var(--text-primary);
  font-size: 1rem;
}
.record-view .record-data-view {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.record-view .record-data-view label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
}
.record-view .record-data-view .json-data {
  background: var(--bg-secondary);
  padding: 16px;
  border-radius: 6px;
  font-size: 13px;
  max-height: 300px;
  overflow-y: auto;
}

@media (max-width: 768px) {
  .entity-records-container {
    padding: 15px;
  }
  .page-header {
    flex-direction: column;
    gap: 20px;
  }
  .header-actions {
    width: 100%;
    justify-content: stretch;
  }
  .header-actions .btn {
    flex: 1;
    justify-content: center;
  }
  .filters-section {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
  }
  .filters-section .search-box {
    max-width: none;
  }
  .filters-section .filter-controls {
    justify-content: stretch;
  }
  .filters-section .filter-controls .filter-select {
    flex: 1;
  }
  .pagination-container {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  .table-container {
    overflow-x: auto;
  }
  .table-container .entity-records-table {
    min-width: 600px;
  }
  .table-container .record-data {
    max-width: 200px;
  }
  .table-container .json-data {
    font-size: 11px;
    max-height: 80px;
  }
}
.alert {
  padding: 12px 16px;
  border-radius: 6px;
  border: 1px solid transparent;
  margin-bottom: 16px;
}
.alert.alert-success {
  background-color: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success-text);
}
.alert.alert-danger {
  background-color: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger-text);
}
.alert.alert-info {
  background-color: var(--info-bg);
  border-color: var(--info-border);
  color: var(--info-text);
}
.alert.alert-dismissible {
  padding-right: 40px;
  position: relative;
}
.alert.alert-dismissible .btn-close {
  position: absolute;
  top: 0;
  right: 0;
  padding: 12px 16px;
  color: inherit;
}

.sidebar-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}
.sidebar-section .sidebar-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding: 0 1rem;
  letter-spacing: 0.5px;
}
.sidebar-section .icon {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: var(--text-color);
  text-decoration: none;
  border-radius: 0.5rem;
  margin: 0.25rem 0.5rem;
  transition: all 0.2s ease;
}
.sidebar-section .icon:hover {
  background-color: var(--bg-hover);
  color: var(--primary-color);
  text-decoration: none;
}
.sidebar-section .icon:active {
  background-color: var(--bg-active);
}
.sidebar-section .icon .svg-icon {
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.75rem;
  flex-shrink: 0;
}
.sidebar-section .icon .svg-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}
.sidebar-section .icon .sidebar-label {
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 768px) {
  .sidebar-section .icon {
    padding: 0.5rem 0.75rem;
    margin: 0.125rem 0.25rem;
  }
  .sidebar-section .icon .svg-icon {
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
  }
  .sidebar-section .icon .sidebar-label {
    font-size: 0.8rem;
  }
}
.entity-content .deals-container {
  padding: 24px;
}
.entity-content .deals-container .page-header {
  margin-bottom: 24px;
}
.entity-content .deals-container .page-header .page-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.entity-content .deals-container .page-header .page-header-content h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
}
.entity-content .deals-container .page-header .page-header-content .header-actions {
  display: flex;
  gap: 12px;
}
.entity-content .deals-container .page-header .page-header-content .header-actions .btn {
  display: flex;
  align-items: center;
  gap: 8px;
}
.entity-content .deals-container .page-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}
.entity-content .deals-container .page-filters .search-box {
  position: relative;
  flex: 1;
  max-width: 400px;
}
.entity-content .deals-container .page-filters .search-box .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 16px;
  height: 16px;
}
.entity-content .deals-container .page-filters .search-box .search-input {
  width: 100%;
  padding: 8px 12px 8px 40px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-primary);
}
.entity-content .deals-container .page-filters .search-box .search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.2);
}
.entity-content .deals-container .page-filters .filter-controls {
  display: flex;
  gap: 12px;
  align-items: center;
}
.entity-content .deals-container .deals-grid .table-container {
  background: var(--bg-primary);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  overflow: hidden;
}
.entity-content .deals-container .deals-grid .table-container .deals-table {
  width: 100%;
  border-collapse: collapse;
}
.entity-content .deals-container .deals-grid .table-container .deals-table th {
  background: var(--bg-tertiary);
  padding: 16px;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
}
.entity-content .deals-container .deals-grid .table-container .deals-table td {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
}
.entity-content .deals-container .deals-grid .table-container .deals-table .deal-row {
  transition: background-color 0.2s ease;
}
.entity-content .deals-container .deals-grid .table-container .deals-table .deal-row:hover {
  background-color: var(--bg-hover);
}
.entity-content .deals-container .deals-grid .table-container .deals-table .deal-row:last-child td {
  border-bottom: none;
}
.entity-content .deals-container .deals-grid .table-container .deals-table .deal-cell .deal-info .deal-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.entity-content .deals-container .deals-grid .table-container .deals-table .client-cell .client-info .client-name {
  font-weight: 500;
  color: var(--text-primary);
}
.entity-content .deals-container .deals-grid .table-container .deals-table .client-cell .no-client {
  color: var(--text-muted);
  font-style: italic;
}
.entity-content .deals-container .deals-grid .table-container .deals-table .actions-cell .dropdown .btn-icon {
  padding: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 4px;
  transition: all 0.2s ease;
}
.entity-content .deals-container .deals-grid .table-container .deals-table .actions-cell .dropdown .btn-icon:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.entity-content .deals-container .deals-grid .table-container .deals-table .actions-cell .dropdown .dropdown-menu {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.entity-content .deals-container .deals-grid .table-container .deals-table .actions-cell .dropdown .dropdown-menu .dropdown-item {
  color: var(--text-primary);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.entity-content .deals-container .deals-grid .table-container .deals-table .actions-cell .dropdown .dropdown-menu .dropdown-item:hover {
  background: var(--bg-hover);
}
.entity-content .deals-container .deals-grid .table-container .deals-table .actions-cell .dropdown .dropdown-menu .dropdown-item.text-danger:hover {
  background: var(--danger-color);
  color: white;
}
.entity-content .deals-container .empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.entity-content .deals-container .empty-state .svg-icon {
  margin-bottom: 16px;
  opacity: 0.5;
}
.entity-content .deals-container .empty-state p {
  margin-bottom: 24px;
  font-size: 1.1rem;
}

.modal-content {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
}
.modal-content .modal-header {
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
}
.modal-content .modal-header .modal-title {
  color: var(--text-primary);
  font-weight: 600;
}
.modal-content .modal-header .btn-close {
  filter: invert(1);
}
.modal-content .modal-body {
  background: var(--bg-primary);
  color: var(--text-primary);
}
.modal-content .modal-body .form-label {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.modal-content .modal-body .form-control, .modal-content .modal-body .form-select {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}
.modal-content .modal-body .form-control:focus, .modal-content .modal-body .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.2);
}
.modal-content .modal-body .form-control:readonly, .modal-content .modal-body .form-select:readonly {
  background: var(--bg-tertiary);
  color: var(--text-muted);
}
.modal-content .modal-body .form-text {
  color: var(--text-muted);
  font-size: 0.875rem;
}
.modal-content .modal-body .form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}
.modal-content .modal-footer {
  background: var(--bg-tertiary);
  border-top: 1px solid var(--border-color);
}

@media (max-width: 768px) {
  .entity-content .deals-container {
    padding: 16px;
  }
  .entity-content .deals-container .page-header .page-header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .entity-content .deals-container .page-header .page-header-content .header-actions {
    width: 100%;
    justify-content: stretch;
  }
  .entity-content .deals-container .page-header .page-header-content .header-actions .btn {
    flex: 1;
    justify-content: center;
  }
  .entity-content .deals-container .page-filters {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }
  .entity-content .deals-container .page-filters .search-box {
    max-width: none;
  }
  .entity-content .deals-container .page-filters .filter-controls {
    justify-content: stretch;
  }
  .entity-content .deals-container .page-filters .filter-controls .btn {
    flex: 1;
    justify-content: center;
  }
  .entity-content .deals-container .deals-grid .table-container {
    overflow-x: auto;
  }
  .entity-content .deals-container .deals-grid .table-container .deals-table {
    min-width: 800px;
  }
  .entity-content .deals-container .deals-grid .table-container .deals-table th, .entity-content .deals-container .deals-grid .table-container .deals-table td {
    padding: 12px 8px;
    font-size: 0.875rem;
  }
}
.app-container {
  display: flex;
  min-height: 100vh;
}

.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg-body);
}
@media (max-width: 768px) {
  .main-wrapper {
    margin-left: 0;
  }
}

.main-content {
  flex: 1;
  padding: 24px;
  width: 100%;
}
@media (max-width: 768px) {
  .main-content {
    padding: 16px;
  }
}

.page-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
@media (max-width: 768px) {
  .page-container {
    gap: 16px;
  }
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}
@media (max-width: 768px) {
  .page-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }
}
.page-header .page-title {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
}
@media (max-width: 768px) {
  .page-header .page-title {
    font-size: 1.5rem;
  }
}
.page-header .page-subtitle {
  margin: 8px 0 0 0;
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 400;
}
.page-header .page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}
@media (max-width: 768px) {
  .page-header .page-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
}

.page-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.page-section:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.page-section {
  padding: 24px;
}
@media (max-width: 768px) {
  .page-section {
    padding: 16px;
  }
}
.page-section .section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
@media (max-width: 768px) {
  .page-section .section-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
}
.page-section .section-header .section-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}
.page-section .section-header .section-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
@media (max-width: 768px) {
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
  }
}

.table-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (max-width: 768px) {
  .table-grid {
    gap: 16px;
  }
}

.page-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  color: var(--text-muted);
  font-size: 1.125rem;
}

.page-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  display: flex;
  flex-direction: column;
  min-height: 400px;
  text-align: center;
  color: var(--text-muted);
}
.page-empty .empty-icon {
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: 16px;
  opacity: 0.5;
}
.page-empty .empty-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-secondary);
}
.page-empty .empty-message {
  font-size: 1rem;
  margin-bottom: 24px;
}
.page-empty .empty-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}
@media (max-width: 768px) {
  .page-empty .empty-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .hide-tablet {
    display: none !important;
  }
}
@media (min-width: 1025px) {
  .hide-desktop {
    display: none !important;
  }
}
.scroll-container {
  overflow-y: auto;
}
.scroll-container::-webkit-scrollbar {
  width: 6px;
}
.scroll-container::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 3px;
}
.scroll-container::-webkit-scrollbar-thumb {
  background: var(--border-dark);
  border-radius: 3px;
}
.scroll-container::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.scroll-horizontal {
  overflow-x: auto;
}
.scroll-horizontal::-webkit-scrollbar {
  width: 6px;
}
.scroll-horizontal::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 3px;
}
.scroll-horizontal::-webkit-scrollbar-thumb {
  background: var(--border-dark);
  border-radius: 3px;
}
.scroll-horizontal::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}
.scroll-horizontal::-webkit-scrollbar {
  height: 6px;
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

.animate-slide-in-right {
  animation: slideInRight 0.3s ease-out;
}

.animate-slide-in-left {
  animation: slideInLeft 0.3s ease-out;
}

.loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}
.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.theme-dark {
  background-color: var(--bg-body);
  color: var(--text-primary);
}
.theme-dark .crm-header {
  background: var(--bg-primary);
  border-bottom-color: var(--border-color);
}
.theme-dark .main-wrapper {
  background: var(--bg-body);
}
.theme-dark .page-container,
.theme-dark .settings-container {
  background: var(--bg-body);
}
.theme-dark .card,
.theme-dark .settings-section {
  background: var(--bg-primary);
  border-color: var(--border-color);
  color: var(--text-primary);
}
.theme-dark .search-input,
.theme-dark .filter-input,
.theme-dark .ai-task-date,
.theme-dark .form-control,
.theme-dark input[type=text],
.theme-dark input[type=email],
.theme-dark input[type=password],
.theme-dark input[type=date],
.theme-dark input[type=time],
.theme-dark textarea,
.theme-dark select {
  background: var(--bg-primary);
  border-color: var(--border-color);
  color: var(--text-primary);
}
.theme-dark .search-input::placeholder,
.theme-dark .filter-input::placeholder,
.theme-dark .ai-task-date::placeholder,
.theme-dark .form-control::placeholder,
.theme-dark input[type=text]::placeholder,
.theme-dark input[type=email]::placeholder,
.theme-dark input[type=password]::placeholder,
.theme-dark input[type=date]::placeholder,
.theme-dark input[type=time]::placeholder,
.theme-dark textarea::placeholder,
.theme-dark select::placeholder {
  color: var(--text-muted);
}
.theme-dark .search-input:focus,
.theme-dark .filter-input:focus,
.theme-dark .ai-task-date:focus,
.theme-dark .form-control:focus,
.theme-dark input[type=text]:focus,
.theme-dark input[type=email]:focus,
.theme-dark input[type=password]:focus,
.theme-dark input[type=date]:focus,
.theme-dark input[type=time]:focus,
.theme-dark textarea:focus,
.theme-dark select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}
.theme-dark .table {
  color: var(--text-primary);
}
.theme-dark .table th {
  background: var(--bg-secondary);
  border-color: var(--border-color);
  color: var(--text-primary);
}
.theme-dark .table td {
  border-color: var(--border-color);
}
.theme-dark .dropdown-menu {
  background: var(--bg-primary);
  border-color: var(--border-color);
}
.theme-dark .dropdown-menu .dropdown-item {
  color: var(--text-primary);
}
.theme-dark .dropdown-menu .dropdown-item:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}
.theme-dark .notification {
  background: var(--bg-primary);
  border-color: var(--border-color);
  color: var(--text-primary);
}
.theme-dark .modal-content {
  background: var(--bg-primary);
  border-color: var(--border-color);
  color: var(--text-primary);
}
.theme-dark .modal-header {
  border-bottom-color: var(--border-color);
}
.theme-dark .modal-footer {
  border-top-color: var(--border-color);
}

@media print {
  .no-print {
    display: none !important;
  }
  .print-only {
    display: block !important;
  }
  .app-container {
    display: block;
  }
  .sidebar,
  .crm-header {
    display: none;
  }
  .main-wrapper {
    margin-left: 0;
  }
}
.date-range-filter {
  display: flex;
  align-items: center;
  gap: 8px;
}
.date-range-filter .filter-date {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-width: 140px;
}
.date-range-filter .filter-date::placeholder {
  color: var(--text-muted);
}
.date-range-filter .filter-date:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.1);
}
.date-range-filter .date-separator {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 16px;
}
