/* ===== VARIABLES & RESET ===== */
:root {
  /* Premium Color Palette - High Contrast */
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --secondary: #7e22ce;
  --secondary-dark: #6b21a8;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  
  /* Neutral Colors - High Contrast */
  --light: #ffffff;
  --light-gray: #f8fafc;
  --gray: #64748b;
  --dark: #1e293b;
  --darker: #0f172a;
  
  /* High Contrast Text Colors */
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #475569;
  
  /* Status Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #06b6d4;
  
  /* Premium Gradients */
  --gradient-primary: linear-gradient(135deg, var(--primary), var(--secondary));
  --gradient-accent: linear-gradient(135deg, var(--accent), var(--primary));
  --gradient-dark: linear-gradient(135deg, var(--dark), var(--darker));
  --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
  
  /* Enhanced Shadows */
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.15);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.18);
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 50%;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ===== LOADING SCREEN ===== */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  color: white;
}

.loading-content {
  text-align: center;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255,255,255,0.3);
  border-top: 4px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===== LAYOUT ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ===== PREMIUM HEADER ===== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  margin: var(--space-md) 0;
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: var(--space-md);
  z-index: 100;
  border: 1px solid rgba(255,255,255,0.2);
  transition: var(--transition-normal);
}

header:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-2px);
}

.header-left {
  display: flex;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.logo i {
  font-size: 2.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.logo-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
}

.header-nav ul {
  display: flex;
  list-style: none;
  gap: var(--space-md);
}

.nav-link {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  transition: var(--transition-normal);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background: rgba(37, 99, 235, 0.1);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.user-info {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--text-primary);
  font-weight: 500;
}

.user-info i {
  font-size: 1.2rem;
  color: var(--primary);
}

/* ===== PREMIUM BUTTONS ===== */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-md);
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-normal);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: var(--transition-normal);
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* ===== PAGES ===== */
.page {
  display: none;
  animation: fadeIn 0.5s ease;
}

.page.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.page-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: var(--space-sm);
}

.page-header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== PREMIUM HERO SECTION ===== */
.hero-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
  margin-bottom: var(--space-xl);
  padding: var(--space-xl) 0;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.hero-description {
  font-size: 1.2rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-lg);
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.hero-visual {
  display: grid;
  gap: var(--space-md);
}

.floating-card {
  background: white;
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
  transition: var(--transition-normal);
  animation: float 3s ease-in-out infinite;
  border: 1px solid rgba(255,255,255,0.2);
}

.floating-card:nth-child(2) {
  animation-delay: 1s;
}

.floating-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.floating-card i {
  font-size: 3rem;
  margin-bottom: var(--space-sm);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.floating-card h4 {
  font-size: 1.2rem;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.floating-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ===== PREMIUM FEATURES SECTION ===== */
.features-section {
  margin-bottom: var(--space-xl);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.section-header h3 {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.dosen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.dosen-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition-normal);
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.2);
}

.dosen-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.dosen-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.dosen-photo-container {
  position: relative;
  display: inline-block;
  margin-bottom: var(--space-md);
}

.dosen-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--light-gray);
  background: var(--light-gray);
  display: block;
  position: relative;
  z-index: 2;
}

.status-indicator {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 3px solid white;
}

.status-indicator.available {
  background: var(--success);
}

.status-indicator.busy {
  background: var(--danger);
}

.dosen-info h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.dosen-nip {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: var(--space-sm);
}

.dosen-specialization {
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: var(--space-sm);
}

.status-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.status-badge.available {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.status-badge.busy {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.quick-appointment-btn {
  margin-top: var(--space-sm);
  width: 100%;
}

/* ===== PREMIUM STATS SECTION ===== */
.stats-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.stat-card {
  background: white;
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  transition: var(--transition-normal);
  border: 1px solid rgba(255,255,255,0.2);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.stat-card i {
  font-size: 2.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-content h3 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.stat-content p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== PREMIUM APPOINTMENTS PAGE ===== */
.appointments-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.filters-container {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.filter-group label {
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
}

.form-select {
  padding: 10px 16px;
  border: 2px solid var(--light-gray);
  border-radius: var(--radius-md);
  background: white;
  color: var(--text-primary);
  font-family: 'Poppins', sans-serif;
  min-width: 150px;
  transition: var(--transition-normal);
}

.form-select:focus {
  outline: none;
  border-color: var(--primary);
}

.appointments-container {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.2);
}

.appointments-list {
  min-height: 400px;
}

.appointment-item {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--light-gray);
  transition: var(--transition-normal);
}

.appointment-item:hover {
  background: var(--light);
}

.appointment-item:last-child {
  border-bottom: none;
}

.appointment-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-sm);
}

.appointment-meta {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  margin-bottom: var(--space-sm);
  flex-wrap: wrap;
}

.appointment-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.appointment-topic {
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: var(--space-sm);
}

.appointment-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* ===== PREMIUM ABOUT PAGE ===== */
.about-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.about-card {
  background: white;
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  text-align: center;
  transition: var(--transition-normal);
  border: 1px solid rgba(255,255,255,0.2);
}

.about-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.about-card i {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.about-card h4 {
  font-size: 1.3rem;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.about-card p {
  color: var(--text-muted);
  line-height: 1.6;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.team-member {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  text-align: center;
  transition: var(--transition-normal);
  border: 1px solid rgba(255,255,255,0.2);
}

.team-member:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.member-photo {
  margin-bottom: var(--space-md);
}

.member-photo img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--light-gray);
}

.member-info h4 {
  font-size: 1.2rem;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.member-nim {
  color: var(--primary);
  font-weight: 500;
  margin-bottom: var(--space-xs);
}

.member-role {
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.member-social {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
}

.member-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition-normal);
}

.member-social a:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

/* ===== PREMIUM MODALS ===== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease;
  border: 1px solid rgba(255,255,255,0.2);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--light-gray);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.modal-header h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-header p {
  color: var(--text-muted);
  margin-top: 4px;
}

.close-modal {
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-modal:hover {
  color: var(--danger);
}

.modal-body {
  padding: var(--space-lg);
}

/* ===== PREMIUM FORMS ===== */
.form-group {
  margin-bottom: var(--space-md);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-primary);
}

.input-with-icon {
  position: relative;
}

.input-with-icon i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  z-index: 1;
}

.input-with-icon input,
.input-with-icon select,
.input-with-icon textarea {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: 2px solid var(--light-gray);
  border-radius: var(--radius-md);
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  transition: var(--transition-normal);
  background: white;
  color: var(--text-primary);
}

.input-with-icon select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%23666' d='M2 0L0 2h4zm0 5L0 3h4z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  padding-right: 40px;
}

.input-with-icon select:focus {
  background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%232563eb' d='M2 0L0 2h4zm0 5L0 3h4z'/></svg>");
}

.input-with-icon textarea {
  padding-left: 16px;
  resize: vertical;
  min-height: 100px;
}

.input-with-icon input:focus,
.input-with-icon select:focus,
.input-with-icon textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-hint {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.form-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: flex-end;
  margin-top: var(--space-lg);
}

/* ===== PREMIUM APPOINTMENT DETAILS ===== */
.appointment-details {
  padding: var(--space-lg);
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--light-gray);
}

.detail-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.detail-item label {
  font-weight: 600;
  color: var(--text-primary);
  min-width: 100px;
}

.detail-item span {
  color: var(--text-secondary);
  text-align: right;
  flex: 1;
}

.modal-actions {
  padding: var(--space-lg);
  border-top: 1px solid var(--light-gray);
  display: flex;
  gap: var(--space-md);
  justify-content: flex-end;
}

/* ===== PREMIUM FOOTER ===== */
footer {
  background: var(--darker);
  color: white;
  margin-top: var(--space-xl);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-xl);
  padding: var(--space-xl) var(--space-md);
}

.footer-section h4 {
  font-size: 1.2rem;
  margin-bottom: var(--space-md);
  color: white;
}

.footer-section p {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin-bottom: var(--space-xs);
}

.footer-section i {
  margin-right: 8px;
  color: var(--primary-light);
}

.footer-bottom {
  text-align: center;
  padding: var(--space-md);
  border-top: 1px solid rgba(255,255,255,0.1);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-sm);
  }
  
  header {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }
  
  .header-nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .hero-section {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-title {
    font-size: 2.2rem;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .appointments-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filters-container {
    justify-content: center;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .modal-content {
    margin: var(--space-md);
  }
  
  .dosen-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  :root {
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
  }
  
  .hero-title {
    font-size: 1.8rem;
  }
  
  .page-header h2 {
    font-size: 2rem;
  }
  
  .btn-lg {
    padding: 12px 24px;
  }
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* ===== ALERTS AND NOTIFICATIONS ===== */
.custom-alert {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  color: white;
  font-weight: 500;
  z-index: 10000;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  animation: slideInRight 0.3s ease;
  max-width: 400px;
}

.alert-success {
  background: var(--success);
}

.alert-error {
  background: var(--danger);
}

.alert-info {
  background: var(--info);
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

/* ===== ROLE BADGES ===== */
.role-badge {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.role-badge.student {
  background: rgba(6, 182, 212, 0.2);
  color: var(--info);
}

.role-badge.dosen {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
}

.role-badge.admin {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

/* ===== STATUS BADGES ===== */
.status-badge.pending {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-badge.confirmed {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-badge.completed {
  background: rgba(6, 182, 212, 0.1);
  color: var(--info);
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-badge.canceled {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ===== LOADING STATES ===== */
.loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.no-appointments, .no-data {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

.no-appointments i, .no-data i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }
.mt-5 { margin-top: var(--space-xl); }

.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space-md); }
.mb-4 { margin-bottom: var(--space-lg); }
.mb-5 { margin-bottom: var(--space-xl); }

.hidden { display: none; }
.flex { display: flex; }
.grid { display: grid; }

/* ===== GLASS EFFECT ===== */
.glass-effect {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===== PULSE ANIMATION ===== */
.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

/* ===== REJECTION NOTE STYLES ===== */
.rejection-note {
  background: rgba(239, 68, 68, 0.1);
  border-left: 4px solid var(--danger);
  padding: var(--space-md);
  margin: var(--space-md) 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.rejection-note h5 {
  color: var(--danger);
  margin-bottom: var(--space-xs);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.rejection-note p {
  color: var(--dark);
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* ===== MODAL TEXTAREA STYLES ===== */
.modal-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--light-gray);
  border-radius: var(--radius-md);
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  transition: all 0.3s ease;
  resize: vertical;
  min-height: 100px;
}

.modal-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ===== PHOTO STYLES ===== */
.dosen-photo img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.member-photo img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--light-gray);
  display: block;
}

/* ===== ADMIN DASHBOARD ENHANCEMENTS ===== */
.admin-section {
    margin-bottom: var(--space-xl);
    padding: var(--space-lg);
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.admin-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
    gap: var(--space-md);
}

/* Dosen Availability Styles */
.dosen-availability-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dosen-availability-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary);
    transition: var(--transition-normal);
}

.dosen-availability-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.dosen-info h4 {
    margin: 0 0 0.5rem 0;
    color: var(--dark);
    font-size: 1.1rem;
}

.dosen-email {
    color: var(--gray);
    font-size: 0.9rem;
    margin: 0.25rem 0;
}

.dosen-specialization {
    color: var(--primary);
    font-weight: 500;
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

.availability-status {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--light-gray);
    border-radius: 8px;
}

.current-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-indicator.available {
    background: var(--success);
}

.status-indicator.busy {
    background: var(--danger);
}

.status-indicator.unknown {
    background: var(--warning);
}

.status-text {
    font-weight: 600;
}

.status-text.available {
    color: var(--success);
}

.status-text.busy {
    color: var(--danger);
}

.status-text.unknown {
    color: var(--warning);
}

.last-updated {
    color: var(--gray);
    font-size: 0.85rem;
}

.availability-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.availability-actions .btn {
    flex: 1;
    min-width: 100px;
    justify-content: center;
}

.availability-notes {
    background: var(--light);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--info);
    margin-top: 2rem;
}

.availability-notes h4 {
    margin-top: 0;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.availability-notes ul {
    margin-bottom: 0;
    padding-left: 1.5rem;
}

.availability-notes li {
    margin-bottom: 0.5rem;
    line-height: 1.4;
    color: var(--text-secondary);
}

.loading-state {
    text-align: center;
    padding: 3rem;
    color: var(--gray);
}

/* Admin Alerts */
.admin-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    min-width: 300px;
    max-width: 500px;
    animation: slideInRight 0.3s ease;
}

.admin-alert-content {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-left: 4px solid var(--success);
}

.admin-alert-error .admin-alert-content {
    border-left-color: var(--danger);
}

.admin-alert-success .admin-alert-content {
    border-left-color: var(--success);
}

.admin-alert-close {
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 0.25rem;
    margin-left: auto;
}

.admin-alert-close:hover {
    color: var(--dark);
}

/* Mobile Responsive Improvements */
@media (max-width: 768px) {
    .admin-dashboard {
        padding: 10px 0;
    }
    
    .admin-section {
        padding: var(--space-md);
        margin-bottom: var(--space-lg);
    }
    
    .dosen-availability-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .dosen-availability-card {
        padding: 1rem;
    }
    
    .availability-actions {
        flex-direction: column;
    }
    
    .availability-actions .btn {
        width: 100%;
        min-width: auto;
    }
    
    .current-status {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .admin-alert {
        left: 10px;
        right: 10px;
        top: 10px;
        min-width: auto;
    }
    
    .admin-alert-content {
        padding: 0.75rem 1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .dosen-section {
        padding: 15px;
    }
    
    .appointment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .appointment-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .admin-actions .btn {
        width: 100%;
    }
    
    .availability-notes {
        padding: 1rem;
    }
    
    .availability-notes ul {
        padding-left: 1rem;
    }
    
    .page-header h2 {
        font-size: 1.8rem;
    }
    
    .page-header h3 {
        font-size: 1.5rem;
    }
}

/* Touch-friendly improvements for mobile */
@media (hover: none) and (pointer: coarse) {
    .btn {
        padding: 14px 20px;
        min-height: 44px;
    }
    
    .nav-link {
        padding: 12px 16px;
    }
    
    .form-select,
    .input-with-icon input,
    .input-with-icon select,
    .input-with-icon textarea {
        padding: 14px 16px 14px 44px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .modal-content {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .dosen-availability-card {
        border: 2px solid var(--primary);
    }
    
    .status-indicator {
        border: 1px solid var(--dark);
    }
    
    .admin-alert-content {
        border: 2px solid;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .dosen-availability-card,
    .btn,
    .stat-card,
    .floating-card {
        transition: none;
    }
    
    .loading-spinner {
        animation: none;
    }
}

/* ===== ADMIN BUTTON STYLES ===== */
#admin-main-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--light-gray);
    border-radius: var(--radius-md);
    align-items: center;
}

#admin-main-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

#admin-main-actions .btn-success {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

#admin-main-actions .btn-success:hover {
    background: #0da271;
    transform: translateY(-2px);
}

#admin-main-actions .btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

#admin-main-actions .btn-danger {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
}

#admin-main-actions .btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

/* ===== ADMIN CONTAINER STYLES ===== */
.admin-dashboard {
    padding: 2rem 0;
}

.admin-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0,0,0,0.05);
}

.section-header h3 {
    color: var(--dark);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* ===== ADMIN DATA TABLE STYLES ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.data-table thead {
    background: var(--light-gray);
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--dark);
    border-bottom: 2px solid var(--primary);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--light-gray);
}

.data-table tr:hover {
    background: rgba(37, 99, 235, 0.02);
}

/* ===== LOCATION GRID STYLES ===== */
.location-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.location-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid var(--light-gray);
    transition: all 0.3s ease;
}

.location-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.location-card.active-mapping {
    border-left: 4px solid var(--success);
}

.location-card.inactive-mapping {
    border-left: 4px solid var(--danger);
    opacity: 0.7;
}

.location-card.empty-mapping {
    border-left: 4px solid var(--warning);
}

/* ===== BUTTON GROUP STYLES ===== */
.btn-group {
    display: flex;
    gap: 0.25rem;
}

.btn-group .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* ===== RESPONSIVE ADMIN STYLES ===== */
@media (max-width: 768px) {
    #admin-main-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    #admin-main-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .location-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-section {
        padding: 1rem;
    }
}