.avatar-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

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

.avatar-popup {
  background: var(--background);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 32px;
  max-width: 600px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 30px var(--hud-glow);
  animation: slideUp 0.3s ease;
}

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

.avatar-popup-header {
  text-align: center;
  margin-bottom: 24px;
}

.avatar-popup-header h2 {
  color: var(--foreground);
  font-size: 24px;
  margin: 0 0 8px 0;
}

.avatar-popup-header p {
  color: var(--muted-foreground);
  font-size: 14px;
  margin: 0;
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

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

.avatar-option {
  background: var(--glass-bg);
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.avatar-option:hover {
  background: var(--glass-bg-strong);
  border-color: rgba(14, 116, 144, 0.3);
}

.avatar-option.selected {
  background: rgba(14, 116, 144, 0.2);
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--hud-glow);
}

.avatar-image-container {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 12px;
  background: var(--glass-bg);
}

.avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
  font-size: 48px;
}

.avatar-selected-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 28px;
  height: 28px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  box-shadow: 0 2px 8px var(--hud-glow);
}

.avatar-info {
  text-align: center;
}

.avatar-name {
  display: block;
  color: var(--foreground);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.avatar-gender {
  display: block;
  color: var(--muted-foreground);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.avatar-popup-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.cancel-button,
.confirm-button {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.cancel-button {
  background: var(--glass-bg);
  color: var(--muted-foreground);
  border: 1px solid var(--glass-border);
}

.cancel-button:hover:not(:disabled) {
  background: var(--glass-bg-strong);
  color: var(--foreground);
}

.confirm-button {
  background: var(--primary);
  color: var(--foreground);
}

.confirm-button:hover:not(:disabled) {
  background: var(--primary-light);
  box-shadow: 0 4px 12px var(--hud-glow);
}

.cancel-button:disabled,
.confirm-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.avatar-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
}

.avatar-header {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.avatar-header h1 {
  font-size: 32px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 12px;
}

.avatar-header p {
  font-size: 16px;
  color: var(--muted-foreground);
  margin: 0;
}

.history-button {
  padding: 12px 24px;
  background-color: var(--primary);
  color: var(--foreground);
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.history-button:hover {
  background-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--hud-glow);
}

.history-button i {
  font-size: 16px;
}

.history-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  animation: fadeIn 0.3s ease;
}

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

.history-sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background: var(--background);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.4);
  transition: right 0.3s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--glass-border);
}

.history-sidebar.open {
  right: 0;
}

.history-header {
  padding: 20px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--glass-bg);
}

.history-header h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--foreground);
  margin: 0;
}

.close-button {
  background: none;
  border: none;
  color: var(--muted-foreground);
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-button:hover {
  color: var(--foreground);
  transform: scale(1.1);
}

.history-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.history-section-label {
  padding: 8px 0;
  margin-bottom: 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.8px;
  color: var(--muted-foreground);
  text-transform: uppercase;
}

.loading-text, .empty-text {
  text-align: center;
  color: var(--muted-foreground);
  font-size: 15px;
  padding: 40px 20px;
}

.history-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.history-item {
  padding: 16px;
  border-radius: 8px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--foreground);
}

.history-item:hover {
  border-color: var(--primary);
  background: var(--glass-bg-strong);
  transform: translateX(-4px);
  box-shadow: 0 2px 8px var(--hud-glow);
}

.history-item i {
  color: var(--primary);
  font-size: 16px;
}

.history-item.current {
  border-color: var(--primary);
  background: rgba(14, 116, 144, 0.2);
}

.current-badge {
  margin-left: auto;
  padding: 4px 8px;
  background: var(--primary);
  color: var(--foreground);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.questions-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.thank-you-message {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--foreground);
  padding: 24px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 16px var(--hud-glow);
  animation: slideDown 0.4s ease;
  margin-bottom: 8px;
}

.thank-you-message i {
  font-size: 32px;
  flex-shrink: 0;
}

.thank-you-message h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 4px 0;
}

.thank-you-message p {
  font-size: 14px;
  margin: 0;
  opacity: 0.95;
}

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

.question-card {
  background: var(--glass-bg);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  border: 1px solid var(--glass-border);
}

.question-card:hover {
  box-shadow: 0 4px 12px var(--hud-glow);
  transform: translateY(-2px);
}

.question-label {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 12px;
}

.question-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  font-size: 15px;
  color: var(--foreground);
  background: var(--glass-bg-strong);
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.question-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--hud-glow);
}

.question-input::placeholder {
  color: var(--muted-foreground);
}

.submit-button {
  width: 100%;
  padding: 16px 24px;
  background-color: var(--primary);
  color: var(--foreground);
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 16px;
}

.submit-button:hover {
  background-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--hud-glow);
}

.submit-button:active {
  transform: translateY(0);
}

@media (max-width: 768px) {
  .avatar-container {
    padding: 24px 16px;
  }

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

  .avatar-header h1 {
    font-size: 24px;
  }

  .avatar-header p {
    font-size: 14px;
  }

  .question-card {
    padding: 20px;
  }

  .question-label {
    font-size: 15px;
  }

  .question-input {
    font-size: 14px;
    padding: 12px 14px;
  }

  .history-sidebar {
    width: 100%;
    right: -100%;
  }

  .history-button {
    width: 100%;
    justify-content: center;
  }

  .thank-you-message {
    padding: 20px;
    flex-direction: column;
    text-align: center;
  }

  .thank-you-message i {
    font-size: 28px;
  }

  .thank-you-message h3 {
    font-size: 18px;
  }

  .thank-you-message p {
    font-size: 13px;
  }
}

.avatar-chat-container {
  position: fixed;
  top: 60px;
  left: 60px;
  right: 0;
  bottom: 0;
  display: flex;
}

.avatar-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: var(--background);
  overflow: hidden;
}

.team-management-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.team-management-iframe {
  width: 100%;
  height: 85vh;
  border: none;
  display: block;
  background: transparent;
}

@media (max-width: 768px) {
  .team-management-iframe {
    height: 75vh;
  }
}

/* React Dashboard - Dark Glassmorphism Theme */

:root {
    /* Dark theme colors (matching savvyspeak) */
    --background: hsl(200 20% 8%);
    --foreground: hsl(0 0% 100%);
    --primary: hsl(185 94% 27%);
    --primary-light: hsl(185 94% 35%);
    --primary-dark: hsl(185 94% 22%);
    --secondary: hsl(186 38% 49%);
    --accent: hsl(46 35% 56%);
    --muted: hsl(200 10% 20%);
    --muted-foreground: hsl(200 10% 70%);

    /* Glass effects */
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-bg-strong: rgba(255, 255, 255, 0.12);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-blur: 16px;
    --hud-glow: hsla(185, 94%, 27%, 0.5);

    /* Legacy compatibility mappings */
    --datadice-primary: hsl(185 94% 27%);
    --datadice-primary-light: hsl(185 94% 35%);
    --datadice-primary-dark: hsl(185 94% 22%);
    --datadice-secondary: hsl(186 38% 49%);
    --datadice-secondary-light: hsl(186 38% 55%);
    --datadice-secondary-dark: hsl(186 38% 40%);
    --datadice-accent: hsl(46 35% 56%);
    --datadice-accent-light: hsl(46 35% 65%);
    --datadice-accent-dark: hsl(46 35% 45%);

    /* UI colors - dark theme */
    --datadice-dark: hsl(0 0% 100%);
    --datadice-light: hsl(200 20% 12%);
    --datadice-white: hsl(200 20% 8%);
    --datadice-light-gray: rgba(255, 255, 255, 0.1);
    --datadice-medium-gray: rgba(255, 255, 255, 0.2);
    --datadice-dark-gray: rgba(255, 255, 255, 0.6);

    /* Feedback colors */
    --datadice-success: #22c55e;
    --datadice-success-light: rgba(34, 197, 94, 0.2);
    --datadice-warning: #f59e0b;
    --datadice-warning-light: rgba(245, 158, 11, 0.2);
    --datadice-danger: #ef4444;
    --datadice-danger-light: rgba(239, 68, 68, 0.2);
    --datadice-info: #3b82f6;
    --datadice-info-light: rgba(59, 130, 246, 0.2);

    /* Spacing, shadows, transitions */
    --radius-small: 4px;
    --radius-medium: 8px;
    --radius-large: 12px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --transition-fast: 0.2s ease-out;
    --transition-medium: 0.3s ease-out;
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.75rem;
    --space-xl: 2.5rem;
    --space-xxl: 4rem;

    /* Typography */
    --font-body: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-md: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.375rem;
    --font-size-xxl: 1.75rem;
    --font-size-xxxl: 2.25rem;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
}

/* ======= Base Styles ======= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--foreground);
    background-color: var(--background);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-display);
    font-weight: var(--font-weight-semibold);
}

#root {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.dashboard-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--background);
}

/* ======= Top Bar ======= */
.top-bar {
    height: 60px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--glass-border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
}

.top-bar-content {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--space-lg);
}

.logo-text {
    display: flex;
    align-items: baseline;
    font-family: 'Poppins', 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
}

.logo-savvy {
    color: #d5b34f;
}

.logo-speak {
    color: var(--foreground);
}

.user-email-topbar {
    font-size: var(--font-size-sm);
    color: var(--primary);
    font-weight: var(--font-weight-medium);
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.top-bar-icon {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-medium);
    transition: all var(--transition-fast);
    font-size: 16px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-bar-icon:hover {
    background-color: var(--glass-bg-strong);
    color: var(--foreground);
    border-color: var(--primary);
}

.user-info-topbar {
    position: relative;
}

.avatar-topbar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--foreground);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: var(--font-size-sm);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.avatar-topbar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 12px var(--hud-glow);
}

/* ======= Floating Sidebar Navigation ======= */
.sidebar-expanded {
    width: 64px;
    height: auto;
    max-height: calc(100vh - 100px);
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 16px;
    top: 80px;
    z-index: 1000;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-large);
    transition: all 0.3s ease;
    padding: var(--space-sm);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.sidebar-expanded.collapsed {
    width: 64px;
}

.sidebar-header-expanded {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-expanded.collapsed .sidebar-header-expanded {
    justify-content: center;
    padding: var(--space-md);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.app-title {
    font-family: var(--font-display);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--foreground);
}

.sidebar-toggle {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-medium);
    transition: all var(--transition-fast);
    position: relative;
}

.sidebar-toggle:hover {
    background-color: var(--glass-bg-strong);
    color: var(--foreground);
    border-color: var(--primary);
}

.sidebar-expanded.collapsed .sidebar-toggle {
    position: absolute;
    right: -19px;
    top: 13px;
    transform: none;
    background-color: var(--primary);
    color: var(--foreground);
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px var(--hud-glow);
    z-index: 1002;
}

.sidebar-expanded.collapsed .sidebar-toggle:hover {
    background-color: var(--primary-light);
    transform: scale(1.1);
}

.navigation-label {
    display: none;
}

.sidebar-nav-expanded {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.nav-item-expanded {
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: 1px solid transparent;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-medium);
    position: relative;
}

.nav-item-expanded span {
    display: none;
}

.nav-item-expanded:hover {
    background-color: var(--glass-bg-strong);
    color: var(--foreground);
    border-color: var(--glass-border);
}

.nav-item-expanded.active {
    background-color: rgba(14, 116, 144, 0.25);
    color: var(--primary);
    border-color: var(--primary);
}

.nav-item-expanded i {
    font-size: 18px;
}

.nav-item-expanded[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--background);
    color: var(--foreground);
    padding: 8px 12px;
    border-radius: var(--radius-medium);
    font-size: var(--font-size-sm);
    white-space: nowrap;
    z-index: 1001;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.sidebar-footer-expanded,
.sidebar-footer-close,
.sidebar-footer-collapsed {
    display: none;
}

.sidebar-divider {
    height: 1px;
    background: var(--glass-border);
    margin: var(--space-xs) 0;
}

.user-info-expanded {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-medium);
    padding: var(--space-md);
    cursor: pointer;
    transition: all var(--transition-medium);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.user-info-expanded:hover {
    background: var(--glass-bg-strong);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.avatar-expanded {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--foreground);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.user-details-expanded {
    flex: 1;
    min-width: 0;
}

.user-name-expanded {
    color: var(--foreground);
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email-expanded {
    color: rgba(255, 255, 255, 0.6);
    font-size: var(--font-size-xs);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.main-content-expanded {
    flex: 1;
    margin-left: 0;
    margin-top: 60px;
    overflow-y: auto;
    min-height: calc(100vh - 60px);
    background: var(--background);
}

.main-content-expanded .container {
    position: relative;
}

.main-content-expanded.full-width {
    overflow: hidden;
}

.main-content-expanded.full-width .container {
    max-width: none;
    padding: 0;
    height: calc(100vh - 60px);
}

/* ======= Header & Navigation ======= */
.sticky-header {
    background-color: #F8F9FA;
    color: #333333;
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1030;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #E0E0E0;
}

.header-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333333;
    transition: opacity 0.2s ease;
}

.header-logo:hover {
    opacity: 0.9;
    text-decoration: none;
}

.logo-img {
    height: 38px !important;
    width: auto;
    max-height: 38px;
}

/* ======= User Info & Dropdown ======= */
.user-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    position: relative;
    cursor: pointer;
}

.user-details {
    text-align: right;
}

.user-name {
    font-weight: var(--font-weight-bold);
    color: #333333;
    font-size: var(--font-size-sm);
}

.user-email {
    font-size: var(--font-size-xs);
    color: #6c757d;
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--datadice-primary);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-weight-bold);
    font-size: 14px;
    border: 2px solid var(--datadice-light);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-fast);
}

.avatar:hover {
    transform: scale(1.05);
}

/* ======= NEW: User Dropdown ======= */
.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--background);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-large);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    min-width: 200px;
    z-index: 1000;
    margin-top: 0.5rem;
    overflow: hidden;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--foreground);
    font-size: var(--font-size-sm);
}

.dropdown-item:hover {
    background-color: var(--glass-bg-strong);
}

.dropdown-item.logout-item {
    border-top: 1px solid var(--glass-border);
    color: var(--datadice-danger);
}

.dropdown-item.logout-item:hover {
    background-color: var(--datadice-danger-light);
}

.dropdown-item i {
    width: 16px;
    text-align: center;
}

/* ======= Main Content ======= */
main {
    flex: 1;
    padding: 0.5rem 0 1rem 0;
    margin-top: 90px;
}

.container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* ======= Background Animation ======= */
.abstract-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(0, 154, 140, 0.3);
    border-radius: 50%;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

.data-viz {
    position: absolute;
    top: 20%;
    left: 10%;
    opacity: 0.1;
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 60px;
}

.bar {
    width: 6px;
    background: linear-gradient(to top, var(--datadice-primary), var(--datadice-accent));
    animation: pulse 2s infinite ease-in-out;
    border-radius: 2px 2px 0 0;
}

@keyframes pulse {
    0%, 100% { height: 10px; }
    50% { height: 50px; }
}

.wave-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    overflow: hidden;
}

.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100px;
    background: linear-gradient(90deg, transparent, rgba(0, 154, 140, 0.1), transparent);
    animation: wave 15s infinite linear;
}

.wave:nth-child(2) {
    animation-delay: -5s;
    animation-duration: 20s;
}

.wave:nth-child(3) {
    animation-delay: -10s;
    animation-duration: 25s;
}

@keyframes wave {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(0%); }
}

.orb {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 154, 140, 0.2), transparent);
    animation: float-orb 10s infinite ease-in-out;
}

.orb-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    right: 20%;
    animation-delay: 0s;
}

.orb-2 {
    width: 150px;
    height: 150px;
    bottom: 30%;
    left: 15%;
    animation-delay: -3s;
}

.orb-3 {
    width: 100px;
    height: 100px;
    top: 50%;
    right: 10%;
    animation-delay: -6s;
}

@keyframes float-orb {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.grid-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 154, 140, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 154, 140, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: grid-move 20s infinite linear;
}

@keyframes grid-move {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    opacity: 0.1;
    animation: rotate 20s infinite linear;
}

.shape-1 {
    width: 60px;
    height: 60px;
    background: var(--datadice-primary);
    top: 20%;
    left: 80%;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.shape-2 {
    width: 40px;
    height: 40px;
    background: var(--datadice-accent);
    top: 60%;
    right: 70%;
    border-radius: 50%;
}

.shape-3 {
    width: 50px;
    height: 50px;
    background: var(--datadice-secondary);
    bottom: 20%;
    left: 20%;
    transform: rotate(45deg);
}

.shape-4 {
    width: 80px;
    height: 30px;
    background: var(--datadice-primary-light);
    top: 40%;
    left: 60%;
    border-radius: 50px;
}

.shape-5 {
    width: 35px;
    height: 35px;
    background: var(--datadice-accent-dark);
    bottom: 40%;
    right: 30%;
    clip-path: polygon(50% 0%, 0% 50%, 50% 100%, 100% 50%);
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.data-flow {
    position: absolute;
    width: 100%;
    height: 100%;
}

.flow-line {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--datadice-primary), transparent);
    animation: flow 8s infinite ease-in-out;
}

.flow-line-1 {
    top: 30%;
    left: 0;
    width: 100%;
    animation-delay: 0s;
}

.flow-line-2 {
    top: 50%;
    left: 0;
    width: 100%;
    animation-delay: -2s;
}

.flow-line-3 {
    top: 70%;
    left: 0;
    width: 100%;
    animation-delay: -4s;
}

@keyframes flow {
    0%, 100% { opacity: 0; transform: translateX(-100%); }
    50% { opacity: 0.3; transform: translateX(0%); }
}

.pulse-container {
    position: absolute;
    width: 100%;
    height: 100%;
}

.pulse-circle {
    position: absolute;
    border: 2px solid var(--datadice-primary);
    border-radius: 50%;
    animation: pulse-ring 3s infinite ease-out;
}

.pulse-circle-1 {
    width: 100px;
    height: 100px;
    top: 25%;
    left: 25%;
}

.pulse-circle-2 {
    width: 150px;
    height: 150px;
    bottom: 25%;
    right: 25%;
    animation-delay: -1s;
}

.pulse-circle-3 {
    width: 80px;
    height: 80px;
    top: 60%;
    left: 60%;
    animation-delay: -2s;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* ======= Dashboard Content ======= */
.dashboard-content {
    padding: var(--space-lg);
}

.dashboard-section h1 {
    font-size: var(--font-size-xxxl);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-lg);
    color: var(--datadice-secondary);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.dashboard-section h1 i {
    color: var(--datadice-primary);
}

.section-description {
    font-size: var(--font-size-lg);
    color: var(--datadice-dark-gray);
    margin-bottom: var(--space-xl);
}

/* ======= NEW: Aufträge Cards ======= */
.auftraege-container {
    margin-top: var(--space-xl);
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: calc(-1 * var(--space-md));
    margin-left: calc(-1 * var(--space-md));
}

.col-lg-6,
.col-xl-4,
.col-md-3 {
    position: relative;
    width: 100%;
    padding-right: var(--space-md);
    padding-left: var(--space-md);
}

.col-xl-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
}

.col-lg-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

.col-md-3 {
    flex: 0 0 25%;
    max-width: 25%;
}

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

.auftraege-card {
    display: flex;
    align-items: center;
    padding: var(--space-lg);
    background-color: var(--datadice-white);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-medium);
    border-top: 3px solid var(--datadice-primary);
    cursor: pointer;
}

.auftraege-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
    color: inherit;
}

.card-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--datadice-primary), var(--datadice-primary-light));
    color: var(--datadice-white);
    border-radius: var(--radius-medium);
    margin-right: var(--space-lg);
}

.card-details h5 {
    margin: 0 0 var(--space-xs) 0;
    color: var(--datadice-primary);
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-lg);
}

.card-details p {
    margin: 0;
    color: var(--datadice-dark-gray);
    font-size: var(--font-size-sm);
}

/* ======= NEW: Statistics Cards ======= */
.auftraege-stats {
    margin-top: var(--space-xxl);
}

.stat-card {
    display: flex;
    align-items: center;
    padding: var(--space-lg);
    background-color: var(--datadice-white);
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--datadice-accent);
    transition: all var(--transition-medium);
}

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

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--datadice-accent), var(--datadice-accent-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: var(--space-md);
    font-size: 1.5rem;
}

.stat-info h3 {
    margin: 0;
    font-size: var(--font-size-xxl);
    font-weight: var(--font-weight-bold);
    color: var(--datadice-secondary);
}

.stat-info p {
    margin: 0;
    font-size: var(--font-size-sm);
    color: var(--datadice-dark-gray);
}

/* ======= Settings Page ======= */
.settings-content {
    padding: var(--space-lg);
    background-color: var(--datadice-light);
    min-height: calc(100vh - 90px);
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
}

.settings-header h1 {
    font-size: var(--font-size-xxxl);
    font-weight: var(--font-weight-bold);
    color: var(--datadice-secondary);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin: 0;
}

.settings-header h1 i {
    color: var(--datadice-primary);
}

.settings-sections {
    margin-top: var(--space-xl);
}

.settings-card {
    display: flex;
    align-items: center;
    padding: var(--space-lg);
    background-color: var(--datadice-white);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    color: var(--datadice-dark);
    transition: all var(--transition-medium);
    border: 1px solid var(--datadice-medium-gray);
    min-height: 140px;
    border-top: 3px solid var(--datadice-primary);
    cursor: pointer;
    position: relative;
}

.settings-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
    color: inherit;
}

.settings-card .card-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--datadice-primary), var(--datadice-primary-light));
    color: var(--datadice-white);
    border-radius: var(--radius-medium);
    margin-right: var(--space-lg);
}

.settings-card .card-details {
    flex: 1;
}

.settings-card .card-details h5 {
    margin: 0 0 var(--space-xs) 0;
    color: var(--datadice-primary);
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-lg);
}

.settings-card .card-details p {
    margin: 0;
    color: var(--datadice-dark-gray);
    font-size: var(--font-size-sm);
}

.card-arrow {
    font-size: 1.2rem;
    color: var(--datadice-primary);
    margin-left: var(--space-md);
}

/* ======= Buttons ======= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-weight-medium);
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.625rem 1.25rem;
    font-size: var(--font-size-sm);
    line-height: 1.4;
    border-radius: var(--radius-small);
    transition: all var(--transition-medium);
    cursor: pointer;
    text-decoration: none;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.btn i {
    margin-right: 0.5rem;
    font-size: 0.9em;
}

.btn-secondary {
    color: var(--datadice-white);
    background-color: var(--datadice-secondary);
    border-color: var(--datadice-secondary);
}

.btn-secondary:hover {
    color: var(--datadice-white);
    background-color: var(--datadice-secondary-dark);
    border-color: var(--datadice-secondary-dark);
    box-shadow: 0 4px 10px rgba(51, 51, 51, 0.2);
}

/* ======= Loading & Error States ======= */
.loading-spinner {
    text-align: center;
    padding: var(--space-xxl);
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--background);
}

.loading-spinner i {
    font-size: 2rem;
    margin-bottom: var(--space-md);
    color: var(--primary);
    animation: spin 1s linear infinite;
}

.loading-spinner p {
    color: rgba(255, 255, 255, 0.6);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.alert {
    position: relative;
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-lg);
    border: 1px solid transparent;
    border-radius: var(--radius-small);
}

.alert-heading {
    margin-bottom: var(--space-sm);
}

.alert-warning {
    color: #856404;
    background-color: var(--datadice-warning-light);
    border-color: #ffeeba;
}

.alert-danger {
    color: #721c24;
    background-color: var(--datadice-danger-light);
    border-color: #f5c6cb;
}

.alert-info {
    color: #0c5460;
    background-color: var(--datadice-info-light);
    border-color: #bee5eb;
}

/* ======= Fade In Animation ======= */
.fade-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity var(--transition-medium), transform var(--transition-medium);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ======= Orders Design ======= */
.orders-tabs {
    display: flex;
    gap: 0;
    margin-bottom: var(--space-xl);
    border-bottom: 2px solid var(--datadice-light-gray);
}

.tab-button {
    background: none;
    border: none;
    padding: var(--space-md) var(--space-lg);
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-medium);
    color: var(--datadice-dark-gray);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all var(--transition-medium);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.tab-button:hover {
    color: var(--datadice-primary);
    background-color: var(--datadice-light);
}

.tab-button.active {
    color: var(--datadice-primary);
    border-bottom-color: var(--datadice-primary);
    background-color: transparent;
}

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

.order-card {
    display: flex;
    background-color: var(--datadice-white);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all var(--transition-medium);
    border: 1px solid var(--datadice-light-gray);
}

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

.order-border {
    width: 12px;
    flex-shrink: 0;
}

.order-content {
    flex: 1;
    padding: var(--space-lg);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-sm);
}

.order-header h3 {
    margin: 0;
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--datadice-dark);
}

.order-status {
    color: var(--datadice-medium-gray);
    font-size: var(--font-size-xl);
}

.order-company {
    margin: 0 0 var(--space-md) 0;
    color: var(--datadice-dark-gray);
    font-size: var(--font-size-md);
}

.order-contacts {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.contact-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-md);
}

.contact-row i {
    width: 16px;
    text-align: center;
}

.contact-row span {
    color: var(--datadice-dark);
}

.phone-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.phone-number {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.phone-toggle-btn {
    background: none;
    border: none;
    color: var(--datadice-primary);
    cursor: pointer;
    padding: var(--space-xs);
    border-radius: 50%;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.phone-toggle-btn:hover {
    background-color: var(--datadice-light);
    transform: scale(1.1);
}

.phone-label {
    font-size: var(--font-size-xs);
    color: var(--datadice-dark-gray);
    font-weight: var(--font-weight-medium);
    min-width: 50px;
    display: inline-block;
}

.whatsapp-row {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.whatsapp-info-btn {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    transition: all 0.2s ease;
}

.whatsapp-info-btn:hover {
    background-color: #e9ecef;
    color: #007bff;
    transform: scale(1.1);
}

.whatsapp-info-popup {
    position: absolute;
    top: 30px;
    left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    min-width: 250px;
}

.whatsapp-info-content {
    padding: 12px;
}

.whatsapp-info-content p {
    margin: 4px 0;
    font-size: 14px;
}

.whatsapp-info-content strong {
    color: #25d366;
}

/* ======= Settings Page Design ======= */
.settings-page {
    background-color: white;
    min-height: 100vh;
    padding: 40px;
}

.settings-container {
    max-width: 1200px;
    margin: 0 auto;
}

.settings-header {
    margin-bottom: 40px;
}

.settings-header h1 {
    font-size: 2rem;
    font-weight: 500;
    color: #333;
    margin: 0 0 8px 0;
}

.settings-header p {
    font-size: 1rem;
    color: #666;
    margin: 0;
}

.language-selector {
    position: relative;
    max-width: 200px;
}

.language-dropdown {
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    min-width: 150px;
}

.language-dropdown:hover {
    border-color: #c3c7cb;
}

.language-dropdown.active {
    border-color: var(--datadice-primary);
}

.dropdown-value {
    font-size: 1rem;
    color: #333;
    font-weight: 500;
}

.dropdown-arrow {
    color: #666;
    transition: transform 0.2s ease;
}

.dropdown-arrow.open {
    transform: rotate(180deg);
}

.language-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    margin-top: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    overflow: hidden;
}

.dropdown-item {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 1rem;
    color: #333;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

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

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.dropdown-item.selected {
    background-color: var(--datadice-primary);
    color: white;
}

.dropdown-item.selected:hover {
    background-color: var(--datadice-primary-dark);
}

/* ======= Compact Order Cards ======= */
.order-card-compact {
    background: white;
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-sm);
    margin-bottom: 5px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    min-height: 80px;
    border: 2px solid transparent;
}

.order-card-compact.accepted {
    border-color: #28a745;
    box-shadow: 0 0 8px rgba(40, 167, 69, 0.3);
}

.order-card-compact.completing {
    background-color: #d4edda !important;
    animation: flashGreen 0.5s ease-in-out;
}

@keyframes flashGreen {
    0% { background-color: white; }
    50% { background-color: #d4edda; }
    100% { background-color: #d4edda; }
}

/* Next Order Anchor Highlighting */
.order-card-compact.next-order-anchor {
    border: 3px solid #009A8C !important;
    box-shadow: 0 4px 16px rgba(0, 154, 140, 0.4), 0 0 0 4px rgba(0, 154, 140, 0.1);
    background: linear-gradient(to right, rgba(0, 154, 140, 0.05), white);
    position: relative;
}

.order-card-compact.next-order-anchor::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(180deg, #009A8C 0%, #1AB5A6 100%);
}

.order-content-compact {
    flex: 1;
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.order-main-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.order-title-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.order-title-section h3 {
    margin: 0;
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--datadice-dark);
}

.complete-btn {
    background-color: var(--datadice-primary);
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: var(--radius-small);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.complete-btn:hover {
    background-color: var(--datadice-primary-dark);
    transform: translateY(-1px);
}

.complete-btn-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 var(--space-md);
}

.complete-btn-center {
    background-color: var(--datadice-primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-small);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.complete-btn-center:hover {
    background-color: var(--datadice-primary-dark);
    transform: translateY(-1px);
}

.accept-btn {
    background-color: white;
    color: var(--datadice-dark);
    border: 2px solid #666;
    padding: 8px 16px;
    border-radius: var(--radius-small);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    height: auto;
    margin-right: 8px;
}

.accept-btn:hover {
    background-color: #f5f5f5;
    border-color: #999;
    transform: translateY(-1px);
}

.accept-btn.accepted {
    background-color: #cce7ff;
    border-color: #007bff;
    color: #007bff;
}

.accept-btn.accepted:hover:not(.disabled) {
    background-color: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.accept-btn.disabled,
.accept-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed !important;
    background-color: #e9ecef;
    border-color: #adb5bd;
    color: #6c757d;
}

.accept-btn.disabled:hover,
.accept-btn:disabled:hover {
    transform: none;
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.reactivate-btn-center {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-small);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.reactivate-btn-center:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
}

.add-note-btn {
    background: none;
    color: #1d2e3c;
    border: none;
    padding: 8px 12px;
    border-radius: var(--radius-small);
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    margin-right: var(--space-sm);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-note-btn:hover {
    color: #0f1a24;
    transform: translateY(-1px);
}

/* Modal Styles */
.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.modal-content {
    background: white;
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    z-index: 100000;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--datadice-light-gray);
    background-color: #dddddd;
}

.modal-header h3 {
    margin: 0;
    font-size: var(--font-size-xl);
    color: var(--datadice-dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--datadice-dark-gray);
    padding: 4px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background-color: var(--datadice-light-gray);
    color: var(--datadice-dark);
}

.modal-body {
    padding: var(--space-lg);
}

.modal-body .form-group {
    margin-bottom: var(--space-lg);
}

.modal-body .form-group:last-child {
    margin-bottom: 0;
}

.modal-body label {
    display: block;
    font-weight: var(--font-weight-medium);
    color: var(--datadice-dark);
    margin-bottom: var(--space-sm);
    font-size: var(--font-size-sm);
}

.category-dropdown {
    width: 100%;
    padding: var(--space-md);
    border: 1px solid var(--datadice-medium-gray);
    border-radius: var(--radius-medium);
    font-size: var(--font-size-md);
    background-color: white;
    cursor: pointer;
    transition: border-color var(--transition-fast);
}

.category-dropdown:focus {
    outline: none;
    border-color: var(--datadice-primary);
}

.notes-textarea {
    width: 100%;
    padding: var(--space-md);
    border: 1px solid var(--datadice-medium-gray);
    border-radius: var(--radius-medium);
    font-size: var(--font-size-md);
    font-family: var(--font-body);
    resize: vertical;
    min-height: 100px;
    transition: border-color var(--transition-fast);
}

.notes-textarea:focus {
    outline: none;
    border-color: var(--datadice-primary);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-md);
    padding: var(--space-lg);
    border-top: 1px solid var(--datadice-light-gray);
}

.btn-cancel {
    padding: var(--space-md) var(--space-lg);
    background-color: var(--datadice-light-gray);
    color: var(--datadice-dark);
    border: none;
    border-radius: var(--radius-medium);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-cancel:hover {
    background-color: var(--datadice-medium-gray);
}

.btn-save {
    padding: var(--space-md) var(--space-lg);
    background-color: var(--datadice-primary);
    color: white;
    border: none;
    border-radius: var(--radius-medium);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-save:hover {
    background-color: var(--datadice-primary-dark);
}

.order-details-row {
    display: flex;
    align-items: center;
}

/* New horizontal order layout */
.order-main-layout {
    display: grid;
    grid-template-columns: 300px 200px 150px 180px 1fr;
    align-items: center;
    width: 100%;
    gap: var(--space-md);
}

.order-title-company {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.order-title-company h3 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-dates {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.date-item {
    font-size: var(--font-size-sm);
    color: var(--datadice-dark-gray);
    white-space: nowrap;
}

.order-contacts-columns {
    display: flex;
    gap: var(--space-lg);
    justify-self: end;
    align-items: flex-start;
}

.contact-column {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}

.contact-item-horizontal {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    font-size: var(--font-size-sm);
    white-space: nowrap;
}

.contact-item-horizontal i {
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.contact-item-horizontal span {
    color: var(--datadice-dark);
    font-weight: var(--font-weight-medium);
}
.contact-item-email {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    font-size: var(--font-size-sm);
    white-space: nowrap;
    overflow: hidden;
    max-width: 180px;
}
.contact-item-email i {
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}
.contact-item-email span {
    color: var(--datadice-dark);
    font-weight: var(--font-weight-medium);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.contact-item-tel2 {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    font-size: var(--font-size-sm);
    white-space: nowrap;
}
.contact-item-tel2 i {
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}
.contact-item-tel2 span {
    color: var(--datadice-dark);
    font-weight: var(--font-weight-medium);
}

.contact-row-horizontal {
    display: flex;
    gap: var(--space-md);
    justify-content: flex-end;
}

.phone-icon-with-number {
    display: inline-flex;
    align-items: baseline;
    position: relative;
}

.phone-icon-with-number i {
    order: 1;
}

.phone-icon-with-number sup {
    font-size: 10px;
    color: #28a745;
    font-weight: bold;
    margin-left: 2px;
    order: 2;
}

.company-name {
    font-size: var(--font-size-md);
    color: var(--datadice-dark-gray);
    font-weight: var(--font-weight-medium);
    min-width: 200px;
    flex-shrink: 0;
}

/* Filter Section */
.filter-section {
    margin-bottom: var(--space-xl);
    background: white;
    border-radius: var(--radius-medium);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.filter-toggle-btn {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background: var(--datadice-primary);
    color: white;
    border: none;
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    transition: background-color var(--transition-fast);
}

.filter-toggle-btn:hover {
    background: var(--datadice-primary-dark);
}

.filter-panel {
    padding: var(--space-lg);
    background: #f8f9fa;
    border-top: 1px solid #e1e5e9;
}

.filter-row {
    display: flex;
    gap: var(--space-lg);
    margin-bottom: var(--space-md);
    align-items: end;
    flex-wrap: wrap;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    min-width: 200px;
    flex: 1;
}

.filter-group label {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--datadice-dark);
}

.filter-group input {
    padding: var(--space-sm) var(--space-md);
    border: 2px solid #e1e5e9;
    border-radius: var(--radius-small);
    font-size: var(--font-size-sm);
    transition: border-color var(--transition-fast);
}

.filter-group input:focus {
    outline: none;
    border-color: var(--datadice-primary);
}

.filter-actions {
    display: flex;
    gap: var(--space-sm);
    align-items: end;
}

.filter-apply-btn {
    background: var(--datadice-primary);
    color: white;
    border: none;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-small);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: background-color var(--transition-fast);
    white-space: nowrap;
}

.filter-apply-btn:hover {
    background: var(--datadice-primary-dark);
}

.filter-clear-btn {
    background: white;
    color: var(--datadice-dark);
    border: 2px solid #e1e5e9;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-small);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.filter-clear-btn:hover {
    border-color: #ccc;
    background: #f8f9fa;
}

.filter-toggle-btn-small {
    background: white;
    color: var(--datadice-dark);
    border: 2px solid #666;
    padding: 8px 16px;
    border-radius: var(--radius-small);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    white-space: nowrap;
    height: auto;
}

.filter-toggle-btn-small:hover {
    border-color: #333;
    background: #f8f9fa;
}

.filter-panel-standalone {
    padding: var(--space-lg);
    background: white;
    border-radius: var(--radius-medium);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: var(--space-xl);
}

.contact-info-inline {
    display: grid;
    grid-template-columns: 180px 180px 1fr;
    gap: var(--space-sm);
    align-items: center;
}

.phone-section,
.whatsapp-section,
.email-section {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    position: relative;
    white-space: nowrap;
}

.phone-label {
    font-size: var(--font-size-xs);
    color: var(--datadice-dark-gray);
    font-weight: var(--font-weight-medium);
    min-width: 50px;
    display: inline-block;
}

.phone-number {
    font-size: var(--font-size-sm);
    color: var(--datadice-dark);
}

.phone-toggle-btn-inline,
.whatsapp-info-btn-inline {
    background: none;
    border: none;
    color: var(--datadice-primary);
    cursor: pointer;
    padding: 2px;
    border-radius: 50%;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.phone-toggle-btn-inline:hover,
.whatsapp-info-btn-inline:hover {
    background-color: var(--datadice-light);
    transform: scale(1.1);
}

/* Vertical contact layout */
.contact-info-vertical {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    font-size: var(--font-size-sm);
}

.contact-item i {
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.contact-item span {
    color: var(--datadice-dark);
    font-weight: var(--font-weight-medium);
}

.contact-item-row {
    display: flex;
    gap: 16px;
}

/* ======= Responsive Design ======= */
@media (max-width: 1200px) {
    .col-xl-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 992px) {
    .col-lg-6,
    .col-xl-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .auftraege-card,
    .settings-card {
        flex-direction: column;
        text-align: center;
    }
    
    .card-icon {
        margin-right: 0;
        margin-bottom: var(--space-md);
    }
    
    .card-arrow {
        margin-left: 0;
        margin-top: var(--space-md);
    }
}

/* ======= Language Settings ======= */
.language-selector .language-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.language-selector .language-buttons .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: var(--radius-medium);
    border: 1px solid;
    transition: all var(--transition-fast);
    text-decoration: none;
    cursor: pointer;
}

.language-selector .language-buttons .btn-primary {
    background-color: var(--datadice-primary);
    border-color: var(--datadice-primary);
    color: white;
    font-weight: var(--font-weight-medium);
}

.language-selector .language-buttons .btn-outline-primary {
    background-color: white;
    border-color: var(--datadice-primary);
    color: var(--datadice-dark);
    font-weight: var(--font-weight-medium);
}

.language-selector .language-buttons .btn-outline-primary:hover {
    background-color: var(--datadice-primary);
    border-color: var(--datadice-primary);
    color: white;
}

@media (max-width: 768px) {
    .sticky-header {
        flex-direction: column;
        text-align: center;
        padding: var(--space-md);
    }
    
    .user-info {
        margin-top: var(--space-md);
    }
    
    .settings-header {
        flex-direction: column;
        gap: var(--space-md);
        align-items: flex-start;
    }
    
    .language-selector .language-buttons {
        justify-content: center;
    }
    
    .col-md-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ======= New Settings Page Styles ======= */
.settings-page {
    padding: 0;
    background-color: #fafafa;
    min-height: 100vh;
}

.settings-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.settings-header {
    margin-bottom: 40px;
}

.settings-header h1 {
    font-size: 32px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 8px 0;
}

.settings-header p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.settings-section {
    background: white;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.settings-section h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 24px 0;
}

.personal-info-section {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 24px;
    background: #fafafa;
}

.form-group {
    margin-bottom: 24px;
}

.form-group:last-of-type {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input[readonly] {
    background: #f9fafb;
    color: #6b7280;
}

.form-hint {
    font-size: 12px;
    color: #6b7280;
    margin: 4px 0 0 0;
}

.email-input-group {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.email-input-group input {
    flex: 1;
}

.save-btn {
    padding: 12px 20px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.save-btn:hover:not(:disabled) {
    background: #2563eb;
}

.save-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.save-changes-btn {
    padding: 12px 24px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 16px;
}

.save-changes-btn:hover:not(:disabled) {
    background: #2563eb;
}

.save-changes-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.language-setting {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.language-label-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.language-label-group label {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.language-status {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #10b981;
    font-size: 14px;
}

.language-status i {
    font-size: 16px;
}

.language-selector {
    position: relative;
    min-width: 160px;
}

.language-dropdown {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.language-dropdown:hover {
    border-color: #9ca3af;
}

.language-dropdown.active {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.dropdown-value {
    font-size: 14px;
    color: #1a1a1a;
}

.dropdown-arrow {
    font-size: 12px;
    color: #6b7280;
    transition: transform 0.2s;
}

.dropdown-arrow.open {
    transform: rotate(180deg);
}

.language-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    overflow: hidden;
}

.dropdown-item {
    padding: 12px 16px;
    font-size: 14px;
    color: #1a1a1a;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f3f4f6;
}

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

.dropdown-item:hover {
    background-color: #f9fafb;
}

.dropdown-item.selected {
    background-color: #eff6ff;
    color: #3b82f6;
    font-weight: 500;
}

@media (max-width: 768px) {
    .settings-container {
        padding: 20px 16px;
    }
    
    .settings-section {
        padding: 24px 20px;
    }
    
    .language-setting {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .language-selector {
        width: 100%;
        min-width: unset;
    }
    
    .email-input-group {
        flex-direction: column;
        gap: 12px;
    }
    
    .save-btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .container {
        padding: var(--space-sm);
    }

    .dashboard-content,
    .settings-content {
        padding: var(--space-md);
    }

    .dashboard-section h1,
    .settings-header h1 {
        font-size: var(--font-size-xxl);
        flex-direction: column;
        text-align: center;
    }
}

.avatar-controls-label {
    display: none;
}

.avatar-controls {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.avatar-controls-loading {
    color: rgba(255, 255, 255, 0.5);
    font-size: var(--font-size-xs);
    text-align: center;
    padding: var(--space-sm);
}

.avatar-control-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-medium);
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.avatar-control-btn span {
    display: none;
}

.avatar-control-btn:hover {
    background: var(--glass-bg-strong);
    border-color: var(--glass-border);
    color: var(--foreground);
}

.avatar-control-btn.active {
    background: rgba(14, 116, 144, 0.25);
    border-color: var(--primary);
    color: var(--primary);
}

.avatar-control-btn.active:hover {
    background: rgba(14, 116, 144, 0.35);
}

.avatar-control-btn i {
    font-size: 18px;
}

.avatar-control-btn[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--background);
    color: var(--foreground);
    padding: 8px 12px;
    border-radius: var(--radius-medium);
    font-size: var(--font-size-sm);
    white-space: nowrap;
    z-index: 1001;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.avatar-controls-divider {
    height: 1px;
    background: var(--glass-border);
    margin: var(--space-xs) 0;
}

.avatar-control-btn.restart-btn {
    color: #f87171;
}

.avatar-control-btn.restart-btn:hover {
    background: rgba(248, 113, 113, 0.15);
    border-color: rgba(248, 113, 113, 0.5);
}
