/* Clean Dashboard Styles - No Scroll, Viewport Fitted */

/* CSS Variables for minimal but colorful theming */
:root {
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary-color: #06b6d4;
  --accent-color: #f59e0b;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  
  --background-color: #f8fafc;
  --surface-color: #ffffff;
  --card-background: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border-color: #e2e8f0;
  --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-large: 0 10px 25px rgba(0, 0, 0, 0.1);
  
  --border-radius: 12px;
  --border-radius-lg: 16px;
  --border-radius-xl: 20px;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
}

/* Dark theme variables */
[data-theme="dark"] {
  --background-color: #0f172a;
  --surface-color: #1e293b;
  --card-background: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-large: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Clean Dashboard Container - Fits viewport exactly */
.clean-dashboard {
  height: 100%;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #eef2ff 100%);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Services Section - Takes full available space */
.services-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Services Grid - Fits all cards in viewport */
.services-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  overflow: hidden;
  align-content: start;
}

/* Service Cards - Optimized for viewport fitting */
.service-card {
  background: var(--card-background);
  border-radius: var(--border-radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-medium);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 120px;
  max-height: 120px;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(25, 118, 210, 0.05) 100%);
  opacity: 0;
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-large);
}

.service-card:hover::before {
  opacity: 1;
}

/* Service Icon - Compact design */
.service-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: white;
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

/* Service Icon Colors - Minimal but Colorful */
.service-icon.profile {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.service-icon.advising {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.service-icon.grades {
  background: linear-gradient(135deg, #10b981, #059669);
}

.service-icon.payments {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.service-icon.attendance {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.service-icon.evaluation {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.service-icon.degree {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.service-icon.services {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.service-icon.coursedrop {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.service-icon.sms {
  background: linear-gradient(135deg, #10b981, #059669);
}

.service-icon.guides {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

/* Service Content - Compact text */
.service-content {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.service-content h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.25rem 0;
  line-height: 1.2;
}

.service-content p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Service Badge - Compact */
.service-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 3;
}

.badge {
  background: var(--success-color);
  color: white;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge.urgent {
  background: var(--error-color);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Responsive Design - Optimized for viewport fitting */
@media (max-width: 1200px) {
  .clean-dashboard {
    padding: 1.25rem;
  }
  
  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.875rem;
  }
  
  .service-card {
    padding: 1rem;
    min-height: 110px;
    max-height: 110px;
  }
  
  .service-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }
  
  .service-content h3 {
    font-size: 0.9rem;
  }
  
  .service-content p {
    font-size: 0.75rem;
  }
}

@media (max-width: 768px) {
  .clean-dashboard {
    padding: 1rem;
  }
  
  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
  }
  
  .service-card {
    padding: 0.875rem;
    min-height: 100px;
    max-height: 100px;
  }
  
  .service-icon {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }
  
  .service-content h3 {
    font-size: 0.85rem;
  }
  
  .service-content p {
    font-size: 0.7rem;
    -webkit-line-clamp: 1;
  }
}

@media (max-width: 480px) {
  .clean-dashboard {
    padding: 0.75rem;
  }
  
  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.5rem;
  }
  
  .service-card {
    padding: 0.75rem;
    min-height: 90px;
    max-height: 90px;
  }
  
  .service-icon {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
    margin-bottom: 0.375rem;
  }
  
  .service-content h3 {
    font-size: 0.8rem;
  }
  
  .service-content p {
    font-size: 0.65rem;
  }
}

/* Extra small devices */
@media (max-width: 360px) {
  .clean-dashboard {
    padding: 0.5rem;
  }
  
  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.375rem;
  }
  
  .service-card {
    padding: 0.625rem;
    min-height: 80px;
    max-height: 80px;
  }
  
  .service-icon {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
  }
  
  .service-content h3 {
    font-size: 0.75rem;
  }
  
  .service-content p {
    font-size: 0.6rem;
  }
}

/* Animation for page load */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.service-card {
  animation: fadeInUp 0.4s ease-out;
}

/* Staggered animation delays */
.service-card:nth-child(1) { animation-delay: 0.05s; }
.service-card:nth-child(2) { animation-delay: 0.1s; }
.service-card:nth-child(3) { animation-delay: 0.15s; }
.service-card:nth-child(4) { animation-delay: 0.2s; }
.service-card:nth-child(5) { animation-delay: 0.25s; }
.service-card:nth-child(6) { animation-delay: 0.3s; }
.service-card:nth-child(7) { animation-delay: 0.35s; }
.service-card:nth-child(8) { animation-delay: 0.4s; }
.service-card:nth-child(9) { animation-delay: 0.45s; }
.service-card:nth-child(10) { animation-delay: 0.5s; }
.service-card:nth-child(11) { animation-delay: 0.55s; }

/* Hover effects for better interactivity */
.service-card:hover .service-icon {
  transform: scale(1.1) rotate(5deg);
}

/* Focus states for accessibility */
.service-card:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Loading state */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid var(--primary-color);
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Ensure no scrollbars appear */
.clean-dashboard,
.services-section,
.services-grid {
  overflow: hidden !important;
}

/* Mobile responsive adjustments for main container */
@media (max-width: 768px) {
  .clean-dashboard {
    padding: 0.75rem;
  }
}

@media (max-width: 480px) {
  .clean-dashboard {
    padding: 0.5rem;
  }
}
