/* ============================================
   STUDENT PORTAL - STUNNING & RESPONSIVE
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #0d6efd;
  --primary-dark: #0a58ca;
  --primary-light: #0d6efd20;
  --secondary: #6c757d;
  --success: #198754;
  --danger: #dc3545;
  --warning: #ffc107;
  --info: #0dcaf0;
  --dark: #1a1a2e;
  --light: #f8f9fa;
  --white: #ffffff;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-hero: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
  --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 2rem 4rem rgba(0, 0, 0, 0.2);
  --border-radius: 12px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--gray-100);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  line-height: 1.2;
}

/* ============================================
   AUTH PAGES - LOGIN & REGISTER
   ============================================ */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.auth-page::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 50%);
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.auth-container {
  width: 100%;
  max-width: 480px;
  position: relative;
  z-index: 1;
}

.auth-card {
  background: var(--white);
  border-radius: 24px;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-header {
  background: var(--gradient-primary);
  padding: 2.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.auth-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 50%);
}

.auth-header .logo {
  width: 80px;
  height: 80px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 1;
}

.auth-header .logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-header h1 {
  color: var(--white);
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.auth-header p {
  color: rgba(255,255,255,0.9);
  font-size: 0.95rem;
  position: relative;
  z-index: 1;
}

.auth-body {
  padding: 2.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--gray-700);
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  border: 2px solid var(--gray-200);
  border-radius: 12px;
  background: var(--gray-100);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.form-control::placeholder {
  color: var(--gray-400);
}

.input-icon {
  position: relative;
}

.input-icon i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
  font-size: 1.1rem;
}

.input-icon .form-control {
  padding-left: 2.75rem;
}

.btn-auth {
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Poppins', sans-serif;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-auth:active {
  transform: translateY(0);
}

.auth-footer {
  text-align: center;
  padding: 1.5rem 2rem 2rem;
  background: var(--gray-100);
}

.auth-footer p {
  color: var(--gray-600);
  font-size: 0.9rem;
}

.auth-footer a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.auth-footer a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.alert {
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.alert-danger {
  background: #f8d7da;
  color: #842029;
  border: 1px solid #f5c2c7;
}

.alert-success {
  background: #d1e7dd;
  color: #0f5132;
  border: 1px solid #badbcc;
}

/* ============================================
   PORTAL LAYOUT
   ============================================ */

.portal-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
}

.portal-header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 1rem 0;
}

.portal-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.portal-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
}

.portal-logo-icon {
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.2rem;
}

.portal-logo-text {
  color: var(--gray-800);
}

.portal-logo-text strong {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
}

.portal-logo-text span {
  font-size: 0.75rem;
  color: var(--gray-500);
}

.portal-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.portal-nav a {
  text-decoration: none;
  color: var(--gray-600);
  font-weight: 500;
  transition: var(--transition);
  padding: 0.5rem 1rem;
  border-radius: 8px;
}

.portal-nav a:hover,
.portal-nav a.active {
  color: var(--primary);
  background: var(--primary-light);
}

.portal-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-avatar {
  width: 45px;
  height: 45px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 600;
  font-size: 1.1rem;
}

.user-info {
  text-align: right;
}

.user-name {
  font-weight: 600;
  color: var(--gray-800);
  font-size: 0.9rem;
}

.user-role {
  font-size: 0.75rem;
  color: var(--gray-500);
}

.btn-logout {
  padding: 0.5rem 1.25rem;
  background: var(--danger);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-logout:hover {
  background: #bb2d3b;
  transform: translateY(-1px);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--gray-700);
}

/* ============================================
   DASHBOARD
   ============================================ */

.dashboard-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
}

.dashboard-sidebar {
  background: var(--white);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  height: fit-content;
  position: sticky;
  top: 100px;
}

.sidebar-menu {
  list-style: none;
}

.sidebar-menu li {
  margin-bottom: 0.5rem;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  text-decoration: none;
  color: var(--gray-600);
  border-radius: 12px;
  transition: var(--transition);
  font-weight: 500;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
  background: var(--primary-light);
  color: var(--primary);
}

.sidebar-menu a i {
  font-size: 1.1rem;
  width: 24px;
}

.dashboard-main {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.dashboard-welcome {
  background: var(--gradient-primary);
  border-radius: 20px;
  padding: 2.5rem;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.dashboard-welcome::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 50%);
}

.dashboard-welcome h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.dashboard-welcome p {
  opacity: 0.9;
  font-size: 1.1rem;
  position: relative;
  z-index: 1;
}

.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.dashboard-card {
  background: var(--white);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.dashboard-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.dashboard-card-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.dashboard-card-icon.primary {
  background: var(--primary-light);
  color: var(--primary);
}

.dashboard-card-icon.success {
  background: #d1e7dd;
  color: var(--success);
}

.dashboard-card-icon.warning {
  background: #fff3cd;
  color: var(--warning);
}

.dashboard-card-icon.info {
  background: #cff4fc;
  color: var(--info);
}

.dashboard-card h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-500);
  margin-bottom: 0.5rem;
}

.dashboard-card .value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-800);
}

.dashboard-card .status {
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.dashboard-card .status.success {
  color: var(--success);
}

.dashboard-card .status.pending {
  color: var(--warning);
}

/* ============================================
   FORMS & ADMISSION
   ============================================ */

.form-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}

.form-card {
  background: var(--white);
  border-radius: 24px;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.form-section {
  padding: 2rem;
  border-bottom: 1px solid var(--gray-200);
}

.form-section:last-child {
  border-bottom: none;
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.form-section-number {
  width: 45px;
  height: 45px;
  background: var(--gradient-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 1.2rem;
}

.form-section-title h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.25rem;
  color: var(--gray-800);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-row:last-child {
  margin-bottom: 0;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236c757d' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

.file-upload {
  border: 2px dashed var(--gray-300);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.file-upload:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.file-upload input {
  display: none;
}

.file-upload-icon {
  font-size: 3rem;
  color: var(--gray-400);
  margin-bottom: 1rem;
}

.file-upload p {
  color: var(--gray-600);
}

.file-upload span {
  color: var(--primary);
  font-weight: 500;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-item input {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
}

.form-actions {
  padding: 2rem;
  background: var(--gray-100);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.btn {
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Poppins', sans-serif;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-secondary {
  background: var(--gray-200);
  color: var(--gray-700);
  border: none;
}

.btn-secondary:hover {
  background: var(--gray-300);
}

.btn-success {
  background: var(--success);
  color: var(--white);
  border: none;
}

.btn-success:hover {
  background: #146c43;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(25, 135, 84, 0.4);
}

/* ============================================
   PAYMENT PAGE
   ============================================ */

.payment-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.payment-card {
  background: var(--white);
  border-radius: 24px;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.payment-header {
  background: var(--gradient-primary);
  padding: 2.5rem;
  text-align: center;
  color: var(--white);
}

.payment-header h2 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.payment-header p {
  opacity: 0.9;
}

.payment-details {
  padding: 2rem;
}

.bank-details {
  background: var(--gray-100);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.bank-details h4 {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  color: var(--gray-700);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bank-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.bank-info-item {
  background: var(--white);
  padding: 1rem;
  border-radius: 12px;
}

.bank-info-item label {
  font-size: 0.8rem;
  color: var(--gray-500);
  display: block;
  margin-bottom: 0.25rem;
}

.bank-info-item span {
  font-weight: 600;
  color: var(--gray-800);
  font-size: 1.1rem;
}

.amount-display {
  text-align: center;
  padding: 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  color: var(--white);
  margin-bottom: 2rem;
}

.amount-display label {
  font-size: 0.9rem;
  opacity: 0.9;
}

.amount-display .amount {
  font-size: 3rem;
  font-weight: 700;
  font-family: 'Playfair Display', serif;
}

.upload-section {
  padding: 2rem;
  background: var(--gray-100);
}

.payment-summary {
  padding: 2rem;
  background: var(--gray-100);
}

.payment-summary h4 {
  font-family: 'Poppins', sans-serif;
  margin-bottom: 1rem;
}

.summary-list {
  list-style: none;
}

.summary-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-200);
}

.summary-list li:last-child {
  border-bottom: none;
  font-weight: 600;
  font-size: 1.1rem;
}

/* ============================================
   SUCCESS PAGE
   ============================================ */

.success-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 2rem;
}

.success-card {
  background: var(--white);
  border-radius: 24px;
  box-shadow: var(--shadow-xl);
  padding: 3rem;
  text-align: center;
  max-width: 500px;
  animation: slideUp 0.6s ease-out;
}

.success-icon {
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  font-size: 3.5rem;
  color: var(--white);
  animation: scaleIn 0.5s ease-out 0.3s both;
}

@keyframes scaleIn {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

.success-card h2 {
  color: var(--gray-800);
  font-size: 2rem;
  margin-bottom: 1rem;
}

.success-card p {
  color: var(--gray-600);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.success-card .btn {
  margin-top: 1rem;
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .dashboard-sidebar {
    position: fixed;
    left: -300px;
    top: 0;
    height: 100vh;
    z-index: 1001;
    border-radius: 0;
    transition: var(--transition);
  }
  
  .dashboard-sidebar.active {
    left: 0;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
  }
  
  .sidebar-overlay.active {
    display: block;
  }
}

@media (max-width: 768px) {
  .auth-body {
    padding: 1.5rem;
  }
  
  .portal-header .container {
    padding: 0 1rem;
  }
  
  .portal-nav {
    display: none;
  }
  
  .portal-user .user-info {
    display: none;
  }
  
  .dashboard-content {
    padding: 1rem;
  }
  
  .dashboard-welcome {
    padding: 1.5rem;
  }
  
  .dashboard-welcome h2 {
    font-size: 1.5rem;
  }
  
  .form-page {
    padding: 1rem;
  }
  
  .form-section {
    padding: 1.5rem 1rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .form-actions .btn {
    width: 100%;
    justify-content: center;
  }
  
  .payment-page {
    padding: 1rem;
  }
  
  .payment-header,
  .payment-details,
  .upload-section {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .auth-page {
    padding: 1rem;
  }
  
  .auth-header {
    padding: 2rem 1.5rem;
  }
  
  .auth-header .logo {
    width: 60px;
    height: 60px;
  }
  
  .auth-header h1 {
    font-size: 1.5rem;
  }
  
  .dashboard-cards {
    grid-template-columns: 1fr;
  }
  
  .success-card {
    padding: 2rem 1.5rem;
  }
  
  .success-icon {
    width: 80px;
    height: 80px;
    font-size: 2.5rem;
  }
  
  .amount-display .amount {
    font-size: 2rem;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden { display: none; }
.visible { display: block; }

.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}
