@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');

:root {
  /* High-Tier Academic Theme Colors */
  --deep-navy: #0A192F;
  --medical-teal: #065F46;
  --teal-hover: #047857;
  --medical-white: #F1F5F9;
  --pure-white: #ffffff;
  --text-main: #334155;
  --text-light: #64748b;
  --border-color: #e2e8f0;
  --error: #ef4444;
  --success: #10b981;
  --burnished-gold: #B8860B;
  
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--medical-white);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  color: var(--deep-navy);
  font-weight: 700;
  margin-bottom: 1rem;
}

a {
  color: var(--medical-teal);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--teal-hover);
}

/* Layout Classes */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

.auth-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
}

/* Cards & Layering */
.card {
  background: var(--pure-white);
  border-radius: 12px;
  padding: 2rem;
  width: 100%;
  border: 1px solid var(--border-color);
}

/* Form Elements */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--deep-navy);
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--text-main);
  transition: all 0.2s ease;
  background-color: var(--pure-white);
}

.form-input:focus {
  outline: none;
  border-color: var(--medical-teal);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
  width: 100%;
  min-height: 44px;
}

.btn-primary {
  background-color: var(--medical-teal);
  color: white;
}

.btn-primary:hover {
  background-color: var(--teal-hover);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  background-color: var(--medical-white);
}

/* Utilities */
.text-center { text-align: center; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-4 { margin-top: 1rem; }

/* Dashboard Layout */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  background-color: var(--deep-navy);
  color: white;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.sidebar-logo h2 {
  color: white;
  font-size: 1.25rem;
  margin: 0;
}

.nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  transition: all 0.2s;
}

.nav-link:hover, .nav-link.active {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

.dashboard-content {
  flex: 1;
  padding: 2rem;
  background-color: var(--medical-white);
  overflow-y: auto;
}

/* Status Cards */
.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.status-card {
  background: var(--pure-white);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-left: 4px solid var(--burnished-gold);
}

.status-title {
  font-size: 0.875rem;
  color: var(--text-light);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--deep-navy);
  margin-top: 0.25rem;
}

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
}

.badge-pending { background-color: #fef3c7; color: #d97706; }
.badge-approved { background-color: #d1fae5; color: #059669; }
.badge-rejected { background-color: #fee2e2; color: #dc2626; }

/* File Upload */
.file-upload {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  background-color: #f8fafc;
  cursor: pointer;
  transition: border-color 0.2s;
}

.file-upload:hover {
  border-color: var(--medical-teal);
}

.file-upload input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* Table Styles */
.table-container {
  background: var(--pure-white);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

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

th, td {
  padding: 1rem 1.5rem;
  text-align: left;
}

th {
  background-color: #f8fafc;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-light);
  border-bottom: 1px solid var(--border-color);
}

td {
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.875rem;
}

tbody tr:hover {
  background-color: #f8fafc;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background-color: var(--border-color);
}

/* Action Buttons Grid */
.actions {
  display: flex;
  gap: 0.5rem;
}
.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  width: auto;
}

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

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

/* Spinner Overlay */
.spinner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s;
}

.spinner-overlay.active {
  opacity: 1;
  visibility: visible;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top-color: var(--medical-teal);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Toasts */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  padding: 1rem 1.5rem;
  border-radius: 8px;
  color: white;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  transform: translateX(120%);
  transition: transform 0.3s ease-out;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toast.show {
  transform: translateX(0);
}

.toast.error { background-color: var(--error); }
.toast.success { background-color: var(--success); }
.toast.info { background-color: var(--deep-navy); }

/* Mobile Reponsiveness */
@media (max-width: 768px) {
  .dashboard-layout {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    padding: 1rem;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  
  .sidebar-logo {
    margin-bottom: 0;
  }
  
  .nav-links {
    display: none; /* In a real app, implement a mobile menu toggle */
  }
  
  .dashboard-content {
    padding: 1rem;
  }
  
  .status-grid {
    grid-template-columns: 1fr;
  }
  
  .table-container {
    overflow-x: auto;
  }
}
