@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Playfair+Display:wght@400;500;600;700;800;900&display=swap');

@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  --primary: #1e293b;        /* Clean slate gray */
  --secondary: #334155;      /* Medium slate */
  --tertiary: #64748b;       /* Light slate */
  --accent: #2563eb;         /* Professional blue */
  --accent-light: #3b82f6;   /* Lighter blue */
  --success: #059669;        /* Clean green */
  --background: #ffffff;     /* Pure white background */
  --surface: #ffffff;        /* White surfaces */
  --surface-alt: #f8fafc;    /* Very light gray */
  --text-primary: #0f172a;   /* Deep text */
  --text-secondary: #475569; /* Medium text */
  --text-muted: #64748b;     /* Light text */
  --border: #e2e8f0;         /* Subtle borders */
  --border-light: #f1f5f9;   /* Very light borders */
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

@layer base {
  html {
    font-family: 'Inter', system-ui, sans-serif;
    scroll-behavior: smooth;
  }
  
  body {
    @apply antialiased;
    background: linear-gradient(135deg, var(--background) 0%, #f7fafc 100%);
    color: var(--text-primary);
    line-height: 1.6;
  }
  
  * {
    @apply border-border;
  }
}

@layer components {
  /* Premium Header Styles */
  .premium-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    position: relative;
    overflow: hidden;
  }
  
  .premium-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(49, 130, 206, 0.1) 100%);
    pointer-events: none;
  }
  
  .premium-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--surface);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  .premium-subtitle {
    color: var(--accent-gold);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }
  
  /* Premium Button Styles */
  .btn-premium {
    @apply inline-flex items-center justify-center px-6 py-3 text-sm font-semibold rounded-lg transition-all duration-300 transform;
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-green) 100%);
    color: var(--surface);
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    background: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-blue) 100%);
  }
  
  .btn-premium:active {
    transform: translateY(0);
  }
  
  .btn-outline-premium {
    @apply inline-flex items-center justify-center px-4 py-2 text-sm font-medium rounded-lg transition-all duration-300;
    background: var(--surface);
    color: var(--primary);
    border: 2px solid var(--border);
    box-shadow: var(--shadow-light);
  }
  
  .btn-outline-premium:hover {
    background: var(--primary);
    color: var(--surface);
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
  }
  
  /* Premium Card Styles */
  .card-premium {
    background: var(--surface);
    border-radius: 16px;
    box-shadow: var(--shadow-large);
    border: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
  }
  
  .card-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-gold) 0%, var(--accent-blue) 50%, var(--accent-green) 100%);
  }
  
  .card-premium:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
  }
  
  /* Premium Docket Entry Styles */
  .docket-entry-premium {
    @apply transition-all duration-500 rounded-2xl p-8 relative;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
  }
  
  .docket-entry-premium::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(180deg, var(--accent-gold) 0%, var(--accent-blue) 50%, var(--accent-green) 100%);
  }
  
  .docket-entry-premium:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-large);
    border-color: var(--accent-blue);
  }
  
  /* Premium Badge Styles */
  .badge-premium {
    @apply inline-flex items-center px-4 py-2 rounded-full text-xs font-semibold;
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-blue) 100%);
    color: var(--surface);
    box-shadow: var(--shadow-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
  }
  
  .badge-status {
    @apply inline-flex items-center px-3 py-1 rounded-full text-xs font-medium;
    background: rgba(56, 161, 105, 0.1);
    color: var(--accent-green);
    border: 1px solid rgba(56, 161, 105, 0.2);
  }
  
  /* Premium Input Styles */
  .input-premium {
    @apply block w-full px-4 py-3 text-sm rounded-lg transition-all duration-300;
    background: var(--surface);
    border: 2px solid var(--border);
    color: var(--text-primary);
    box-shadow: var(--shadow-light);
  }
  
  .input-premium:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
  }
  
  .input-premium::placeholder {
    color: var(--text-muted);
  }
  
  /* Premium Typography */
  .heading-premium {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.025em;
  }
  
  .text-premium {
    color: var(--text-secondary);
    line-height: 1.7;
  }
  
  .text-muted-premium {
    color: var(--text-muted);
    font-size: 0.875rem;
  }
  
  /* Premium Document Styles */
  .document-card-premium {
    @apply rounded-xl p-6 transition-all duration-300;
    background: linear-gradient(135deg, var(--surface) 0%, rgba(250, 251, 252, 0.8) 100%);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-light);
  }
  
  .document-card-premium:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
    border-color: var(--accent-blue);
  }
  
  /* Premium Loading States */
  .loading-premium {
    @apply inline-block w-6 h-6 border-2 rounded-full animate-spin;
    border-color: var(--accent-blue);
    border-top-color: transparent;
  }
  
  /* Premium Animations */
  .fade-in-premium {
    animation: fadeInPremium 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .slide-up-premium {
    animation: slideUpPremium 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  @keyframes fadeInPremium {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  @keyframes slideUpPremium {
    from {
      opacity: 0;
      transform: translateY(30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* Premium Glassmorphism Effects */
  .glass-premium {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  }
}

@layer utilities {
  .text-balance {
    text-wrap: balance;
  }
  
  .scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  
  .scrollbar-hide::-webkit-scrollbar {
    display: none;
  }
}

/* PDF viewer styles */
.react-pdf__Page {
  @apply shadow-lg mb-4;
}

.react-pdf__Page__canvas {
  @apply max-w-full h-auto;
}

/* Custom scrollbar for document viewer */
.document-viewer::-webkit-scrollbar {
  width: 8px;
}

.document-viewer::-webkit-scrollbar-track {
  @apply bg-gray-100 rounded;
}

.document-viewer::-webkit-scrollbar-thumb {
  @apply bg-gray-400 rounded hover:bg-gray-500;
}

/* Animation classes */
.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

.slide-up {
  animation: slideUp 0.3s ease-out;
}

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

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

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  .print-break {
    page-break-before: always;
  }
}
