/* Dental Clinic Management System - Custom Styles */
/* =============================================== */

/* Base Styles */
:root {
  --dental-blue: #1E40AF;
  --dental-light: #3B82F6;
  --dental-dark: #1E3A8A;
  --dental-accent: #60A5FA;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #374151;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Loading animations */
@keyframes pulse-soft {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.pulse-soft {
  animation: pulse-soft 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Card Styles */
.card {
  @apply bg-white rounded-lg shadow-sm border border-gray-200;
}

.card-header {
  @apply px-6 py-4 border-b border-gray-200;
}

.card-body {
  @apply px-6 py-4;
}

.card-footer {
  @apply px-6 py-4 border-t border-gray-200 bg-gray-50;
}

/* Button Styles */
.btn {
  @apply inline-flex items-center justify-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-offset-2 transition-colors duration-200;
}

.btn-primary {
  @apply bg-blue-600 text-white hover:bg-blue-700 focus:ring-blue-500;
}

.btn-secondary {
  @apply bg-gray-600 text-white hover:bg-gray-700 focus:ring-gray-500;
}

.btn-success {
  @apply bg-green-600 text-white hover:bg-green-700 focus:ring-green-500;
}

.btn-warning {
  @apply bg-yellow-600 text-white hover:bg-yellow-700 focus:ring-yellow-500;
}

.btn-danger {
  @apply bg-red-600 text-white hover:bg-red-700 focus:ring-red-500;
}

.btn-outline {
  @apply bg-white text-gray-700 border-gray-300 hover:bg-gray-50 focus:ring-gray-500;
}

.btn-sm {
  @apply px-3 py-1.5 text-xs;
}

.btn-lg {
  @apply px-6 py-3 text-base;
}

.btn-disabled {
  @apply opacity-50 cursor-not-allowed;
}

/* Form Styles */
.form-group {
  @apply mb-4;
}

.form-label {
  @apply block text-sm font-medium text-gray-700 mb-1;
}

.form-label.required::after {
  content: ' *';
  @apply text-red-500;
}

.form-input {
  @apply block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent;
}

.form-input:invalid {
  @apply border-red-300 focus:ring-red-500;
}

.form-input[readonly] {
  @apply bg-gray-50 text-gray-500 cursor-not-allowed;
}

.form-select {
  @apply block w-full px-3 py-2 border border-gray-300 bg-white rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent;
}

.form-textarea {
  @apply block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent resize-vertical;
}

.form-error {
  @apply text-red-600 text-sm mt-1;
}

.form-help {
  @apply text-gray-500 text-sm mt-1;
}

/* Table Styles */
.table {
  @apply min-w-full divide-y divide-gray-200;
}

.table thead {
  @apply bg-gray-50;
}

.table th {
  @apply px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider;
}

.table td {
  @apply px-6 py-4 whitespace-nowrap text-sm text-gray-900;
}

.table tbody tr:hover {
  @apply bg-gray-50;
}

.table-striped tbody tr:nth-child(even) {
  @apply bg-gray-50;
}

/* Badge/Status Styles */
.badge {
  @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium;
}

.badge-primary {
  @apply bg-blue-100 text-blue-800;
}

.badge-success {
  @apply bg-green-100 text-green-800;
}

.badge-warning {
  @apply bg-yellow-100 text-yellow-800;
}

.badge-danger {
  @apply bg-red-100 text-red-800;
}

.badge-gray {
  @apply bg-gray-100 text-gray-800;
}

/* Status specific badges */
.status-scheduled {
  @apply bg-blue-100 text-blue-800;
}

.status-completed {
  @apply bg-green-100 text-green-800;
}

.status-cancelled {
  @apply bg-red-100 text-red-800;
}

.status-no-show {
  @apply bg-gray-100 text-gray-800;
}

.status-waiting {
  @apply bg-yellow-100 text-yellow-800;
}

.status-in-progress {
  @apply bg-indigo-100 text-indigo-800;
}

.status-paid {
  @apply bg-green-100 text-green-800;
}

.status-partial {
  @apply bg-yellow-100 text-yellow-800;
}

.status-pending {
  @apply bg-orange-100 text-orange-800;
}

.status-overdue {
  @apply bg-red-100 text-red-800;
}

/* Alert/Toast Styles */
.alert {
  @apply p-4 rounded-md border-l-4;
}

.alert-info {
  @apply bg-blue-50 border-blue-400 text-blue-700;
}

.alert-success {
  @apply bg-green-50 border-green-400 text-green-700;
}

.alert-warning {
  @apply bg-yellow-50 border-yellow-400 text-yellow-700;
}

.alert-danger {
  @apply bg-red-50 border-red-400 text-red-700;
}

/* Modal Styles */
.modal-backdrop {
  @apply fixed inset-0 bg-black bg-opacity-50 z-40;
}

.modal {
  @apply fixed inset-0 z-50 flex items-center justify-center p-4;
}

.modal-content {
  @apply bg-white rounded-lg shadow-xl max-w-md w-full max-h-screen overflow-y-auto;
}

.modal-header {
  @apply px-6 py-4 border-b border-gray-200;
}

.modal-body {
  @apply px-6 py-4;
}

.modal-footer {
  @apply px-6 py-4 border-t border-gray-200 bg-gray-50 flex justify-end space-x-2;
}

/* Sidebar Styles */
.sidebar-menu-item {
  @apply flex items-center px-2 py-2 text-sm font-medium rounded-md transition-colors duration-200;
}

.sidebar-menu-item.active {
  @apply bg-blue-100 text-blue-900 border-r-2 border-blue-600;
}

.sidebar-menu-item:not(.active) {
  @apply text-gray-600 hover:bg-gray-50 hover:text-gray-900;
}

.sidebar-menu-item i {
  @apply mr-3 text-lg w-5;
}

/* Stats Cards */
.stat-card {
  @apply bg-white overflow-hidden shadow rounded-lg;
}

.stat-card-body {
  @apply px-4 py-5 sm:p-6;
}

.stat-value {
  @apply text-2xl font-semibold text-gray-900;
}

.stat-label {
  @apply text-sm font-medium text-gray-500 truncate;
}

.stat-trend {
  @apply text-sm font-medium;
}

.stat-trend.up {
  @apply text-green-600;
}

.stat-trend.down {
  @apply text-red-600;
}

/* Patient Card */
.patient-card {
  @apply bg-white border border-gray-200 rounded-lg p-4 hover:shadow-md transition-shadow cursor-pointer;
}

.patient-card:hover {
  @apply shadow-md border-blue-300;
}

.patient-avatar {
  @apply w-12 h-12 bg-blue-100 rounded-full flex items-center justify-center text-blue-600 font-bold text-lg;
}

/* Appointment Time Slot */
.time-slot {
  @apply border border-gray-300 rounded-md p-3 text-center cursor-pointer transition-colors;
}

.time-slot:hover {
  @apply border-blue-400 bg-blue-50;
}

.time-slot.selected {
  @apply border-blue-600 bg-blue-100 text-blue-900;
}

.time-slot.disabled {
  @apply border-gray-200 bg-gray-100 text-gray-400 cursor-not-allowed;
}

/* Search and Filter */
.search-box {
  @apply relative;
}

.search-input {
  @apply pl-10 pr-4 py-2 w-full border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent;
}

.search-icon {
  @apply absolute left-3 top-2.5 text-gray-400;
}

.filter-badge {
  @apply inline-flex items-center px-3 py-1 rounded-full text-sm bg-blue-100 text-blue-800 mr-2 mb-2;
}

.filter-badge button {
  @apply ml-2 text-blue-600 hover:text-blue-800;
}

/* Responsive Design */
@media (max-width: 768px) {
  .sidebar {
    @apply hidden;
  }
  
  .main-content {
    @apply ml-0;
  }
  
  .mobile-menu-btn {
    @apply block md:hidden;
  }
  
  .table {
    @apply text-xs;
  }
  
  .table th,
  .table td {
    @apply px-3 py-2;
  }
  
  .card {
    @apply mx-2;
  }
}

/* Print Styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  .print-only {
    display: block !important;
  }
  
  body {
    @apply text-black bg-white;
  }
  
  .card {
    @apply shadow-none border border-gray-300;
  }
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
  /* Dark mode styles can be added here */
}

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

.fade-out {
  animation: fadeOut 0.3s ease-in-out;
}

.slide-in-right {
  animation: slideInRight 0.3s ease-in-out;
}

.slide-out-right {
  animation: slideOutRight 0.3s ease-in-out;
}

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

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

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes slideOutRight {
  from { transform: translateX(0); }
  to { transform: translateX(100%); }
}

/* Custom utilities */
.text-dental {
  color: var(--dental-blue);
}

.bg-dental {
  background-color: var(--dental-blue);
}

.border-dental {
  border-color: var(--dental-blue);
}

/* Focus styles for accessibility */
.focus-visible:focus {
  @apply outline-none ring-2 ring-offset-2 ring-blue-500;
}

/* Loading placeholder */
.skeleton {
  @apply animate-pulse bg-gray-200 rounded;
}

.skeleton-text {
  @apply h-4 bg-gray-200 rounded animate-pulse;
}

.skeleton-avatar {
  @apply h-12 w-12 bg-gray-200 rounded-full animate-pulse;
}