/* Professional Classic White Theme - Clean & Formal */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:wght@400;500;600;700&display=swap');

:root {
  /* Professional Color Palette */
  --primary-color: #1e293b;
  --primary-light: #334155;
  --secondary-color: #64748b;
  --accent-color: #0f172a;
  --success-color: #059669;
  --warning-color: #d97706;
  --danger-color: #dc2626;
  --info-color: #0284c7;
  
  /* Neutral Grays */
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  
  /* Background Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  
  /* Border Colors */
  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;
  --border-dark: #94a3b8;
  
  /* Typography */
  --font-primary: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  
  /* Spacing & Sizing */
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 12px;
  --border-radius-xl: 16px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Transitions */
  --transition-fast: 0.15s ease-in-out;
  --transition-medium: 0.3s ease-in-out;
  --transition-slow: 0.5s ease-in-out;
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-primary);
  background-color: var(--bg-secondary);
  color: var(--gray-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Professional Header */
header {
  background: var(--bg-primary);
  border-bottom: 2px solid var(--border-light);
  padding: 12px 0;
  position: relative;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-medium);
}

header:hover {
  box-shadow: var(--shadow-md);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: between;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
}

.brand {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: var(--font-weight-bold);
  color: var(--primary-color);
  text-decoration: none;
  position: relative;
}

.brand::after {
  content: '';
  position: relative;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width var(--transition-medium);
}

.brand:hover::after {
  width: 100%;
}

.topbar {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-left: auto;
}

/* Main Content */
main {
  flex: 1;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Professional Cards */
.card {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-medium);
  position: relative;
}

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

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.card-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: var(--font-weight-semibold);
  color: var(--primary-color);
}

/* Grid System */
.grid {
  display: grid;
  gap: 18px;
}

.grid.cols-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid.cols-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid.cols-4 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* Statistics Cards */
.stat {
  text-align: center;
  padding: 20px;
  background: var(--bg-tertiary);
  border-radius: var(--border-radius-md);
  border-left: 4px solid var(--primary-color);
  transition: all var(--transition-medium);
}

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

.stat-number {
  font-size: 36px;
  font-weight: var(--font-weight-extrabold);
  color: var(--primary-color);
  margin-bottom: 8px;
  display: block;
}

.stat-label {
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.muted {
  color: var(--gray-500);
  font-size: 14px;
}

/* Professional Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: var(--border-radius-md);
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-medium);
  position: relative;
  overflow: hidden;
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-primary);
  color: var(--gray-700);
  border-color: var(--border-medium);
}

.btn-secondary:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-dark);
}

.btn-success {
  background: var(--success-color);
  color: white;
}

.btn-success:hover {
  background: #047857;
}

.btn-danger {
  background: var(--danger-color);
  color: white;
}

.btn-danger:hover {
  background: #b91c1c;
}

.btn-info {
  background: var(--info-color);
  color: white;
}

.btn-info:hover {
  background: #0369a1;
}

.btn-ghost {
  background: transparent;
  color: var(--gray-600);
  border-color: var(--border-light);
}

.btn-ghost:hover {
  background: var(--bg-tertiary);
  color: var(--gray-800);
}

.btn.small {
  padding: 8px 16px;
  font-size: 12px;
}

.btn.large {
  padding: 16px 32px;
  font-size: 16px;
}

/* Form Elements */
.form-group {
  margin-bottom: 18px;
}

label {
  display: block;
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  color: var(--gray-700);
  margin-bottom: 8px;
}

.required {
  color: var(--danger-color);
  margin-left: 2px;
}

input, select, textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-medium);
  border-radius: var(--border-radius-md);
  font-family: var(--font-primary);
  font-size: 14px;
  background: var(--bg-primary);
  color: var(--gray-800);
  transition: all var(--transition-medium);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(30, 41, 59, 0.1);
}

input::placeholder, textarea::placeholder {
  color: var(--gray-400);
}

/* Search Input */
.search-container {
  position: relative;
  display: inline-block;
}

.search-input {
  padding-right: 45px;
  width: 300px;
}

.search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
}

/* Professional Table */
.table-responsive {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  background: var(--bg-tertiary);
  padding: 16px 20px;
  font-weight: var(--font-weight-semibold);
  color: var(--gray-700);
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid var(--border-light);
}

td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  color: var(--gray-600);
  font-size: 14px;
}

tr:hover {
  background: var(--bg-secondary);
}

tr:last-child td {
  border-bottom: none;
}

/* Professional Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--border-radius-xl);
  font-size: 12px;
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge.pending {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #f59e0b;
}

.badge.approved {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #059669;
}

.badge.rejected {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #dc2626;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  background: var(--bg-primary);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--border-light);
}

.modal-header {
  padding: 24px 32px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: var(--font-weight-semibold);
  color: var(--primary-color);
}

.modal-body {
  padding: 32px;
}

.modal-footer {
  padding: 24px 32px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-lg);
  min-width: 320px;
  position: relative;
  overflow: hidden;
  animation: slideIn 0.3s ease-out;
}

.toast::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.toast.success::before {
  background: var(--success-color);
}

.toast.error::before {
  background: var(--danger-color);
}

.toast.warning::before {
  background: var(--warning-color);
}

.toast.info::before {
  background: var(--info-color);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
}

.pagination .btn {
  min-width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--border-radius-md);
}

#pageInfo {
  padding: 0 16px;
  font-size: 14px;
  color: var(--gray-600);
}

/* Filter Section */
.filter-section {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-lg);
  padding: 20px;
  margin-bottom: 20px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.filter-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

/* Loading Spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-light);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

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

/* Utilities */
.hidden {
  display: none !important;
}

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

.text-left {
  text-align: left;
}

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

.font-display {
  font-family: var(--font-display);
}

.font-medium {
  font-weight: var(--font-weight-medium);
}

.font-semibold {
  font-weight: var(--font-weight-semibold);
}

.font-bold {
  font-weight: var(--font-weight-bold);
}

.text-primary {
  color: var(--primary-color);
}

.text-secondary {
  color: var(--secondary-color);
}

.text-success {
  color: var(--success-color);
}

.text-danger {
  color: var(--danger-color);
}

.text-warning {
  color: var(--warning-color);
}

.text-info {
  color: var(--info-color);
}

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

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

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

.border-bottom {
  border-bottom: 1px solid var(--border-light);
}

.shadow-sm {
  box-shadow: var(--shadow-sm);
}

.shadow-md {
  box-shadow: var(--shadow-md);
}

.shadow-lg {
  box-shadow: var(--shadow-lg);
}

.rounded {
  border-radius: var(--border-radius-md);
}

.rounded-lg {
  border-radius: var(--border-radius-lg);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .container {
    padding: 0 12px;
  }
}

@media (max-width: 768px) {
  .header-content {
    padding: 0 12px;
  }
  
  .brand {
    font-size: 22px;
  }
  
  .topbar {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  main {
    padding: 16px 0;
  }
  
  .card {
    padding: 16px;
  }
  
  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .grid.cols-3 {
    grid-template-columns: 1fr;
  }
  
  .grid.cols-2 {
    grid-template-columns: 1fr;
  }
  
  .filter-grid {
    grid-template-columns: 1fr;
  }
  
  .filter-actions {
    flex-direction: column;
  }
  
  .search-input {
    width: 100%;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
  
  .pagination {
    flex-wrap: wrap;
  }
  
  .toast-container {
    left: 16px;
    right: 16px;
  }
  
  .toast {
    min-width: unset;
  }
  
  .modal-content {
    margin: 20px;
    max-height: calc(100vh - 40px);
  }
  
  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .stat-number {
    font-size: 28px;
  }
  
  .card-title {
    font-size: 20px;
  }
  
  th, td {
    padding: 12px 16px;
  }
}
