* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  overflow-x: hidden;
  background: linear-gradient(to bottom, #f8fafc 0%, #f1f5f9 100%);
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark Mode Styles */
[data-theme="dark"] body {
  background: linear-gradient(to bottom, #1a1a2e 0%, #16213e 100%);
  color: #e2e8f0;
}

[data-theme="dark"] .navbar {
  background: linear-gradient(to right, #1e293b 0%, #334155 100%) !important;
  border-bottom-color: #475569 !important;
}

[data-theme="dark"] .card {
  background-color: #1e293b;
  color: #e2e8f0;
}

[data-theme="dark"] .modal-box {
  background-color: #1e293b;
  color: #e2e8f0;
}

[data-theme="dark"] .input,
[data-theme="dark"] .textarea,
[data-theme="dark"] .select {
  background-color: #334155;
  border-color: #475569;
  color: #e2e8f0;
}

[data-theme="dark"] .input:focus,
[data-theme="dark"] .textarea:focus,
[data-theme="dark"] .select:focus {
  border-color: #8b5cf6;
  background-color: #334155;
}

[data-theme="dark"] .table {
  color: #e2e8f0;
}

[data-theme="dark"] .table thead {
  background-color: #334155;
  color: #e2e8f0;
}

[data-theme="dark"] .table tbody tr {
  border-bottom-color: #475569;
}

[data-theme="dark"] .table tbody tr:hover {
  background-color: #334155;
}

[data-theme="dark"] .tabs-boxed {
  background-color: #334155 !important;
}

[data-theme="dark"] .tab {
  color: #94a3b8;
}

[data-theme="dark"] .tab-active {
  background-color: #8b5cf6 !important;
  color: white !important;
}

[data-theme="dark"] .alert {
  background-color: #1e293b;
  border-color: #475569;
}

[data-theme="dark"] .glass-effect {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(71, 85, 105, 0.3);
}

[data-theme="dark"] .service-card {
  background: linear-gradient(to bottom right, #1e293b, #334155);
}

[data-theme="dark"] .service-card:hover {
  background: linear-gradient(to bottom right, #334155, #475569);
  border-color: #8b5cf6;
}

[data-theme="dark"] ::-webkit-scrollbar-track {
  background: #1e293b;
}

[data-theme="dark"] .step-circle {
  background: #334155;
  border-color: #475569;
  color: #94a3b8;
}

[data-theme="dark"] .step.active .step-circle {
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  border-color: #8b5cf6;
  color: white;
}

[data-theme="dark"] .step.completed .step-circle {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: #10b981;
  color: white;
}

[data-theme="dark"] .step-label {
  color: #94a3b8;
}

[data-theme="dark"] .step.active .step-label {
  color: #a78bfa;
}

[data-theme="dark"] .step.completed .step-label {
  color: #34d399;
}

/* Additional Dark Mode Text Styles */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
  color: #f1f5f9;
}

[data-theme="dark"] p {
  color: #e2e8f0;
}

[data-theme="dark"] span {
  color: #e2e8f0;
}

[data-theme="dark"] li {
  color: #e2e8f0;
}

[data-theme="dark"] label {
  color: #e2e8f0;
}

[data-theme="dark"] .text-gray-500,
[data-theme="dark"] .text-gray-600,
[data-theme="dark"] .text-gray-700 {
  color: #cbd5e1 !important;
}

[data-theme="dark"] .badge-ghost {
  background-color: #334155;
  color: #e2e8f0;
}

[data-theme="dark"] .alert-warning {
  background-color: #451a03;
  border-color: #78350f;
  color: #fbbf24;
}

[data-theme="dark"] .alert-error {
  background-color: #450a0a;
  border-color: #7f1d1d;
  color: #fca5a5;
}

[data-theme="dark"] .alert-success {
  background-color: #052e16;
  border-color: #14532d;
  color: #86efac;
}

[data-theme="dark"] .alert-info {
  background-color: #0c4a6e;
  border-color: #075985;
  color: #7dd3fc;
}

[data-theme="dark"] .btn-outline {
  border-color: #475569;
  color: #e2e8f0;
}

[data-theme="dark"] .btn-outline:hover {
  background-color: #334155;
  border-color: #64748b;
}

[data-theme="dark"] .text-red-600 {
  color: #f87171 !important;
}

[data-theme="dark"] .border-purple-100 {
  border-color: #475569 !important;
}

[data-theme="dark"] .bg-purple-50 {
  background-color: #334155 !important;
}

[data-theme="dark"] .bg-orange-50 {
  background-color: #422006 !important;
}

[data-theme="dark"] .hover\:bg-purple-100:hover {
  background-color: #334155 !important;
}

[data-theme="dark"] .hover\:bg-orange-100:hover {
  background-color: #422006 !important;
}

[data-theme="dark"] .hover\:bg-red-100:hover {
  background-color: #450a0a !important;
}

/* Calendar Dark Mode Styles */
[data-theme="dark"] .bg-white {
  background-color: #1e293b !important;
}

[data-theme="dark"] .bg-gray-50 {
  background-color: #334155 !important;
}

[data-theme="dark"] .bg-gray-100 {
  background-color: #334155 !important;
}

[data-theme="dark"] .bg-gray-200 {
  background-color: #475569 !important;
}

[data-theme="dark"] .border-gray-200 {
  border-color: #475569 !important;
}

[data-theme="dark"] .border-gray-300 {
  border-color: #64748b !important;
}

[data-theme="dark"] .text-gray-400 {
  color: #94a3b8 !important;
}

[data-theme="dark"] .text-gray-800 {
  color: #e2e8f0 !important;
}

[data-theme="dark"] .text-gray-900 {
  color: #f1f5f9 !important;
}

[data-theme="dark"] .hover\:bg-gray-50:hover {
  background-color: #334155 !important;
}

[data-theme="dark"] .hover\:bg-gray-100:hover {
  background-color: #334155 !important;
}

[data-theme="dark"] .bg-blue-50 {
  background-color: #1e3a5f !important;
}

[data-theme="dark"] .bg-green-50 {
  background-color: #14532d !important;
}

/* Home Component Specific Dark Mode Styles */
[data-theme="dark"] .from-white {
  --tw-gradient-from: #1e293b !important;
}

[data-theme="dark"] .to-purple-50 {
  --tw-gradient-to: #2d1b4e !important;
}

[data-theme="dark"] .text-purple-900 {
  color: #e9d5ff !important;
}

[data-theme="dark"] .text-purple-600 {
  color: #c084fc !important;
}

[data-theme="dark"] .border-purple-100 {
  border-color: #475569 !important;
}

[data-theme="dark"] .bg-base-100 {
  background-color: #1e293b !important;
}

/* Admin Panel Dark Mode Specific Fixes */
[data-theme="dark"] .label-text {
  color: #e2e8f0 !important;
}

[data-theme="dark"] .label-text-alt {
  color: #cbd5e1 !important;
}

[data-theme="dark"] .dropdown-content {
  background-color: #1e293b;
  border: 1px solid #475569;
}

[data-theme="dark"] .dropdown-content li > * {
  color: #e2e8f0;
}

[data-theme="dark"] .dropdown-content li > *:hover {
  background-color: #334155;
}

[data-theme="dark"] .menu li > * {
  color: #e2e8f0;
}

[data-theme="dark"] .badge {
  color: #e2e8f0;
}

[data-theme="dark"] .badge-success {
  background-color: #14532d;
  color: #86efac;
  border-color: #166534;
}

[data-theme="dark"] .badge-warning {
  background-color: #78350f;
  color: #fbbf24;
  border-color: #92400e;
}

[data-theme="dark"] .badge-error {
  background-color: #7f1d1d;
  color: #fca5a5;
  border-color: #991b1b;
}

[data-theme="dark"] .badge-info {
  background-color: #075985;
  color: #7dd3fc;
  border-color: #0284c7;
}

[data-theme="dark"] .card-title {
  color: #f1f5f9;
}

[data-theme="dark"] th {
  color: #f1f5f9 !important;
  background-color: #334155;
}

[data-theme="dark"] td {
  color: #e2e8f0;
}

[data-theme="dark"] .font-mono {
  color: #cbd5e1;
}

[data-theme="dark"] .text-sm {
  color: #cbd5e1;
}

[data-theme="dark"] .text-xs {
  color: #cbd5e1;
}

[data-theme="dark"] .opacity-50 {
  color: #94a3b8 !important;
}

[data-theme="dark"] .opacity-70 {
  color: #cbd5e1 !important;
}

[data-theme="dark"] .opacity-80 {
  color: #e2e8f0 !important;
}

/* Settings page toggles and checkboxes */
[data-theme="dark"] .toggle {
  background-color: #475569;
}

[data-theme="dark"] .toggle:checked {
  background-color: #8b5cf6;
}

[data-theme="dark"] .checkbox {
  border-color: #64748b;
}

[data-theme="dark"] .checkbox:checked {
  background-color: #8b5cf6;
  border-color: #8b5cf6;
}

/* Enhanced Step Indicator */
.step-indicator {
  display: flex;
  justify-content: space-between;
  margin: 2.5rem 0;
  position: relative;
  padding: 0 1rem;
}

.step-indicator::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 10%;
  right: 10%;
  height: 3px;
  background: linear-gradient(to right, #e5e7eb 0%, #d1d5db 100%);
  z-index: 0;
  border-radius: 10px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
  z-index: 1;
}

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #9ca3af;
  margin-bottom: 0.75rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.step.active .step-circle {
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  border-color: #8b5cf6;
  color: white;
  transform: scale(1.15);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
}

.step.completed .step-circle {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: #10b981;
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.step-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b7280;
  text-align: center;
  transition: color 0.3s ease;
}

.step.active .step-label {
  color: #8b5cf6;
  font-weight: 700;
}

.step.completed .step-label {
  color: #10b981;
}

/* Animations */
.fade-in {
  animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.slide-in {
  animation: slideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Enhanced Gradients */
.hero-gradient {
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #ec4899 100%);
  position: relative;
  overflow: hidden;
}

.hero-gradient::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(5%, 5%) scale(1.05); }
}

.glass-effect {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Card Enhancements */
.card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  border-color: rgba(139, 92, 246, 0.2);
}

/* Button Enhancements */
.btn {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
  letter-spacing: 0.025em;
}

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

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

.btn-primary {
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
}

/* Input Enhancements */
.input, .textarea, .select {
  transition: all 0.3s ease;
  border: 2px solid #e5e7eb;
}

.input:focus, .textarea:focus, .select:focus {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
  outline: none;
}

/* Alert Enhancements */
.alert {
  animation: slideDown 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

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

/* Mobile Responsive Enhancements */
@media (max-width: 768px) {
  .step-indicator {
    padding: 0 0.5rem;
  }

  .step-circle {
    width: 32px;
    height: 32px;
    font-size: 0.875rem;
  }

  .step-label {
    font-size: 0.7rem;
  }

  .card {
    margin-bottom: 1rem;
  }
}

/* Desktop Enhancements */
@media (min-width: 1024px) {
  .container {
    max-width: 1280px;
  }

  .hero-banner {
    border-radius: 1.5rem;
  }
}

/* Admin Badge */
.admin-badge {
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

/* Loading Animation */
.loading-pulse {
  animation: pulse-loading 1.5s ease-in-out infinite;
}

@keyframes pulse-loading {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Service Cards */
.service-card {
  background: linear-gradient(to bottom right, #ffffff, #f8fafc);
  border: 2px solid transparent;
  transition: all 0.3s ease;
  text-align: left;
  width: 100%;
}

.service-card:hover {
  border-color: #8b5cf6;
  background: linear-gradient(to bottom right, #ffffff, #faf5ff);
  transform: translateY(-4px);
}

.service-card:active {
  transform: translateY(-2px);
}

/* Toast/Alert positioning */
.toast {
  z-index: 9999;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
}

/* ========== CRITICAL ACCESSIBILITY IMPROVEMENTS ========== */

/* Focus Visible Indicators (WCAG 2.1 AA) */
*:focus-visible {
  outline: 3px solid #7c3aed;
  outline-offset: 3px;
  border-radius: 4px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #7c3aed;
  outline-offset: 2px;
}

/* Skip Navigation Link */
.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 9999;
  padding: 1rem 1.5rem;
  background: #7c3aed;
  color: white;
  text-decoration: none;
  font-weight: 600;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
  transition: all 0.2s ease;
}

.skip-link:focus {
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  outline: 3px solid white;
  outline-offset: -6px;
}

/* Enhanced Button Contrast (WCAG AA Compliance) */
.btn-primary {
  background: #7c3aed;
  color: white;
  min-height: 44px;
  min-width: 44px;
  font-weight: 600;
}

.btn-primary:hover {
  background: #6d28d9;
}

.btn-secondary {
  background: #64748b;
  color: white;
  min-height: 44px;
  min-width: 44px;
}

.btn-secondary:hover {
  background: #475569;
}

/* Ensure minimum touch targets (44x44px WCAG) */
button,
.btn,
a.btn,
input[type="submit"],
input[type="button"] {
  min-height: 44px;
  min-width: 44px;
  padding: 0.625rem 1.25rem;
}

/* ========== LOADING STATES ========== */

/* Loading Spinner */
.spinner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.spinner-circle {
  width: 40px;
  height: 40px;
  border: 4px solid #e5e7eb;
  border-top-color: #7c3aed;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner-sm .spinner-circle {
  width: 24px;
  height: 24px;
  border-width: 3px;
}

.spinner-lg .spinner-circle {
  width: 56px;
  height: 56px;
  border-width: 5px;
}

/* Skeleton Loader */
.skeleton-loader {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
}

.skeleton-line {
  height: 1rem;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s ease-in-out infinite;
  border-radius: 0.25rem;
}

.skeleton-line.short {
  width: 60%;
}

.skeleton-line.medium {
  width: 80%;
}

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

/* Loading Button State */
.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-loading::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  margin-left: -10px;
  margin-top: -10px;
  border: 2px solid white;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ========== EMPTY STATES ========== */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  text-align: center;
  min-height: 300px;
}

.empty-icon {
  width: 80px;
  height: 80px;
  color: #cbd5e1;
  margin-bottom: 1.5rem;
}

.empty-state h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
  max-width: 400px;
}

[data-theme="dark"] .empty-state h3 {
  color: #f1f5f9;
}

[data-theme="dark"] .empty-state p {
  color: #cbd5e1;
}

[data-theme="dark"] .empty-icon {
  color: #64748b;
}

/* ========== TRUST INDICATORS ========== */

.trust-indicators {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.03) 0%, rgba(99, 102, 241, 0.03) 100%);
  border: 1px solid rgba(124, 58, 237, 0.1);
  border-radius: 12px;
  margin: 2rem auto;
  max-width: 900px;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: #4b5563;
  font-weight: 500;
}

.trust-badge svg {
  width: 24px;
  height: 24px;
  color: #7c3aed;
  flex-shrink: 0;
}

[data-theme="dark"] .trust-indicators {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
  border-color: rgba(124, 58, 237, 0.2);
}

[data-theme="dark"] .trust-badge {
  color: #cbd5e1;
}

/* ========== FORM VALIDATION ========== */

.error-message {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #dc2626;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  animation: slideDown 0.2s ease;
}

.error-message::before {
  content: '⚠';
  font-size: 1rem;
}

.success-message {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #10b981;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  animation: slideDown 0.2s ease;
}

.success-message::before {
  content: '✓';
  font-size: 1rem;
}

.input-error {
  border-color: #dc2626 !important;
  background-color: rgba(220, 38, 38, 0.05);
}

.input-success {
  border-color: #10b981 !important;
  background-color: rgba(16, 185, 129, 0.05);
}

[data-theme="dark"] .error-message {
  color: #fca5a5;
}

[data-theme="dark"] .success-message {
  color: #86efac;
}

[data-theme="dark"] .input-error {
  background-color: rgba(220, 38, 38, 0.1);
}

[data-theme="dark"] .input-success {
  background-color: rgba(16, 185, 129, 0.1);
}

/* ========== IMPROVED TYPOGRAPHY HIERARCHY ========== */

h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #111827;
}

h2 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: #1f2937;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.4;
  color: #374151;
}

h4 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.5;
  color: #4b5563;
}

p {
  line-height: 1.7;
  color: #4b5563;
}

/* ========== MOBILE OPTIMIZATIONS ========== */

@media (max-width: 768px) {
  .trust-indicators {
    gap: 1rem;
    padding: 1rem;
  }

  .trust-badge {
    font-size: 0.75rem;
  }

  .trust-badge svg {
    width: 20px;
    height: 20px;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  .empty-state {
    padding: 2rem 1rem;
    min-height: 250px;
  }

  .empty-icon {
    width: 60px;
    height: 60px;
  }
}
