:root {
  --du-bg-primary: 13, 13, 17;
  --du-bg-secondary: 18, 18, 23;
  --du-bg-tertiary: 23, 23, 27;
  --du-bg-card: 22, 21, 26;

  --du-text-primary: 249, 250, 251;
  --du-text-secondary: 209, 213, 219;
  --du-text-muted: 156, 163, 175;

  --du-border-color: 43, 43, 51;
  --du-divider-color: 32, 32, 40;

  --du-accent: 124, 58, 237;
  --du-accent-hover: 109, 40, 217;

  --du-success: 34, 197, 94;
  --du-warning: 250, 204, 21;
  --du-danger: 220, 53, 69;
  --du-info: 56, 189, 248;
}

[data-theme='light'] {
  --du-bg-primary: 248, 250, 252;
  --du-bg-secondary: 241, 245, 249;
  --du-bg-tertiary: 226, 232, 240;
  --du-bg-card: 255, 255, 255;

  --du-text-primary: 18, 18, 23;
  --du-text-secondary: 71, 85, 105;
  --du-text-muted: 148, 163, 184;

  --du-border-color: 203, 213, 225;
  --du-divider-color: 226, 232, 240;
}

.du-input,
.du-textarea,
.du-btn-primary,
.du-btn-secondary,
.du-btn-ghost {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.du-input.is-invalid,
.du-textarea.is-invalid,
select.du-input.is-invalid {
  border-color: rgb(220 53 69);
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2);
}

.du-input.is-valid,
.du-textarea.is-valid,
select.du-input.is-valid {
  border-color: rgb(34 197 94);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.form-field-hint {
  font-size: 0.75rem;
  color: rgb(var(--du-text-muted));
}

button.is-loading,
.du-btn-primary.is-loading,
.du-btn-secondary.is-loading {
  pointer-events: none;
  opacity: 0.7;
}

/* Page Loader */
#page-loader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgb(13, 13, 17);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.3s ease;
}

#page-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.loader-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 1.5rem;
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  box-shadow: 0 20px 60px rgba(124, 58, 237, 0.4);
  animation: pulse-glow 2s ease-in-out infinite;
}

.loader-logo svg {
  width: 40px;
  height: 40px;
  color: white;
}

.loader-spinner {
  width: 60px;
  height: 60px;
  border: 3px solid rgba(124, 58, 237, 0.1);
  border-top-color: #7c3aed;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loader-text {
  font-size: 0.875rem;
  color: rgb(156, 163, 175);
  font-weight: 500;
  letter-spacing: 0.05em;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 20px 60px rgba(124, 58, 237, 0.4);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 20px 80px rgba(124, 58, 237, 0.6);
    transform: scale(1.05);
  }
}

/* Enhanced Select Dropdown Styling - Universal Browser Support */

a {    
  color: rgba(var(--du-text-primary),var(--tw-text-opacity,1)) !important;
}

/* Base select styling with dark color scheme */
select.du-input,
select {
  color-scheme: dark;
  background-color: rgb(18, 18, 23);
  color: rgb(249, 250, 251);
}

/* Chrome, Edge, Safari, and all other browsers */
select.du-input option,
select option {
  background-color: rgb(26, 26, 31);
  color: rgb(255, 255, 255);
  padding: 12px;
  font-weight: 500;
}

/* Hover state for options */
select.du-input option:hover,
select option:hover {
  background-color: rgb(124, 58, 237);
  background: rgb(124, 58, 237);
  color: rgb(255, 255, 255);
  font-weight: 600;
}

/* Checked/selected state */
select.du-input option:checked,
select option:checked {
  background-color: rgb(109, 40, 217);
  background: linear-gradient(0deg, rgb(109, 40, 217), rgb(109, 40, 217));
  color: rgb(255, 255, 255);
  font-weight: 700;
}

/* Focus state for better accessibility */
select.du-input option:focus,
select option:focus {
  background-color: rgb(124, 58, 237);
  color: rgb(255, 255, 255);
  outline: none;
}

/* Firefox specific overrides */
@-moz-document url-prefix() {
  select.du-input option,
  select option {
    background-color: rgb(26, 26, 31);
    color: rgb(255, 255, 255);
  }

  select.du-input option:hover,
  select option:hover {
    background-color: rgb(124, 58, 237);
    color: rgb(255, 255, 255);
  }

  select.du-input option:checked,
  select option:checked {
    background-color: rgb(109, 40, 217);
    color: rgb(255, 255, 255);
    font-weight: 700;
  }
}

/* Disabled options */
select.du-input option:disabled,
select option:disabled {
  background-color: rgb(23, 23, 27);
  color: rgb(100, 100, 110);
  opacity: 0.6;
}

/* Windows High Contrast Mode Support */
@media (prefers-contrast: high) {
  select.du-input option:hover,
  select.du-input option:focus,
  select option:hover,
  select option:focus {
    background-color: rgb(124, 58, 237);
    color: rgb(255, 255, 255);
    outline: 2px solid rgb(255, 255, 255);
  }
}

/* FullCalendar Custom Styling */
/* Override text colors in calendar to use du-text-primary instead of du-accent */
.fc .fc-toolbar-title {
  color: rgb(var(--du-text-primary));
}

.fc .fc-col-header-cell-cushion {
  color: rgb(var(--du-text-primary));
}

.fc .fc-daygrid-day-number {
  color: rgb(var(--du-text-primary));
}

.fc .fc-button {
  color: rgb(var(--du-text-primary));
}

.fc .fc-button-primary {
  color: rgb(var(--du-text-primary));
}

.fc .fc-button-primary:hover {
  color: rgb(var(--du-text-primary));
}

.fc .fc-button-primary:disabled {
  color: rgb(var(--du-text-primary));
}

.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
  color: rgb(var(--du-text-primary));
}

.fc .fc-timegrid-slot-label {
  color: rgb(var(--du-text-primary));
}

.fc .fc-list-day-text,
.fc .fc-list-day-side-text {
  color: rgb(var(--du-text-primary));
}

.fc .fc-popover-title {
  color: rgb(var(--du-text-primary));
}

.fc .fc-more-popover .fc-popover-body {
  color: rgb(var(--du-text-primary));
}

.fc .fc-daygrid-more-link {
  color: rgb(var(--du-text-primary));
}

