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

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #141414;
  --bg-card-hover: #1a1a1a;
  --text-primary: #ffffff;
  --text-secondary: #c0c0c0;
  --gold: #c8a45e;
  --gold-gradient: linear-gradient(135deg, #c8a45e 0%, #d4af37 50%, #b8942e 100%);
  --transition: 0.3s ease;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
}

.portal-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background-color: var(--bg-secondary);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  margin-bottom: 40px;
}

.sidebar-logo img {
  height: 30px;
  border-radius: 4px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 8px;
  transition: all var(--transition);
}

.nav-item:hover, .nav-item.active {
  background: rgba(200, 164, 94, 0.1);
  color: var(--gold);
}

.nav-item svg {
  width: 18px;
  height: 18px;
}

.logout-btn {
  margin-top: auto;
  color: #ff4757;
}

.logout-btn:hover {
  background: rgba(255, 71, 87, 0.1);
  color: #ff4757;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 40px;
  overflow-y: auto;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.page-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 600;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gold-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--bg-primary);
}

/* Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 24px;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Login Specific */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg-primary);
}

.login-card {
  background: var(--bg-card);
  padding: 40px;
  border-radius: 16px;
  width: 100%;
  max-width: 400px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
}

.login-logo {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 8px;
}

.login-subtitle {
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 0.9rem;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-body);
}

.form-group input:focus {
  outline: none;
  border-color: var(--gold);
}

.btn-login {
  width: 100%;
  padding: 14px;
  background: var(--gold-gradient);
  color: var(--bg-primary);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 10px;
}

.btn-login:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.error-message {
  color: #ff4757;
  font-size: 0.85rem;
  margin-top: 12px;
  display: none;
}
/* File Cards */
.file-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--bg-primary);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-bottom: 12px;
  transition: all var(--transition);
}
.file-card:hover {
  border-color: var(--gold);
}
.file-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.file-icon {
  width: 40px;
  height: 40px;
  background: rgba(200, 164, 94, 0.1);
  color: var(--gold);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.file-details h4 {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 4px;
}
.file-details p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.file-actions {
  display: flex;
  gap: 8px;
}
.btn-icon {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: all var(--transition);
}
.btn-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}
.btn-icon.delete:hover {
  background: rgba(255, 71, 87, 0.1);
  color: #ff4757;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
}
.modal-overlay.active {
  display: flex;
}
.modal-content {
  background: var(--bg-card);
  width: 90%;
  max-width: 500px;
  border-radius: 16px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
}
.modal-close:hover {
  color: var(--text-primary);
}

/* Upload Zone */
.upload-zone {
  border: 2px dashed rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  margin-bottom: 24px;
  cursor: pointer;
  transition: all var(--transition);
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--gold);
  background: rgba(200, 164, 94, 0.05);
}
.upload-icon {
  color: var(--gold);
  margin-bottom: 12px;
}
.upload-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.btn-primary {
  padding: 10px 20px;
  background: var(--gold-gradient);
  color: var(--bg-primary);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-primary:hover {
  opacity: 0.9;
}

/* =========================================
   STUDENT DETAILS & TABS
   ========================================= */
.student-detail-section {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.student-header {
  background: var(--bg-card);
  padding: 32px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.student-header-info h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.student-header-info p {
  color: var(--gold);
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-outline {
  padding: 10px 20px;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(200, 164, 94, 0.05);
}

/* Tabs */
.tabs-nav {
  display: flex;
  gap: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 32px;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-weight: 500;
  padding: 0 0 16px 0;
  cursor: pointer;
  position: relative;
  transition: color var(--transition);
}

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

.tab-btn.active {
  color: var(--gold);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gold-gradient);
  border-radius: 2px 2px 0 0;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.4s ease forwards;
}

/* =========================================
   WEEKLY SCHEDULE GRID (AGENDA)
   ========================================= */
.weekly-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.day-column {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), border-color var(--transition);
}

.day-column:hover {
  transform: translateY(-4px);
  border-color: rgba(200, 164, 94, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.day-header {
  background: rgba(255, 255, 255, 0.02);
  padding: 16px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.day-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--gold);
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

.day-date {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.day-content {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 200px;
}

/* Workout & Diet Cards inside Agenda */
.agenda-card {
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 12px;
  font-size: 0.85rem;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
}

.agenda-card:hover {
  background: rgba(255, 255, 255, 0.05);
}

.agenda-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  border-radius: 3px 0 0 3px;
}

.agenda-card.workout::before {
  background: #ff4757;
}

.agenda-card.diet::before {
  background: #2ed573;
}

.agenda-card-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.agenda-card-desc {
  color: var(--text-secondary);
  font-size: 0.75rem;
  line-height: 1.4;
}

.add-agenda-btn {
  margin-top: auto;
  width: 100%;
  padding: 8px;
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.85rem;
}

.add-agenda-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(200, 164, 94, 0.05);
}

@media (max-width: 1200px) {
  .weekly-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

