/* Admin Styles */

/* Custom Font for Certificate */
@font-face {
  font-family: 'KaushanScript';
  src: url('../fonts/KaushanScript-Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

:root {
  --sidebar-width: 280px;
  --sidebar-collapsed-width: 80px;
  --header-height: 70px;
  --primary-color: #667eea;
  --secondary-color: #764ba2;
  --text-dark: #2c3e50;
  --text-light: #7f8c8d;
  --bg-light: #f8f9fa;
  --border-color: #e9ecef;
  --transition-speed: 0.3s;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-light);
  min-height: 100vh;
  color: var(--text-dark);
}

/* Admin Container with Sidebar */
.admin-container {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* Sidebar Styles */
.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  color: white;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  transition: width var(--transition-speed) ease, transform var(--transition-speed) ease;
  z-index: 1000;
  box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

.sidebar.mobile-hidden {
  transform: translateX(-100%);
}

.sidebar-header {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  position: relative;
}

.sidebar-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  flex-shrink: 0;
}

.sidebar-title {
  font-size: 1.2rem;
  font-weight: 600;
  white-space: nowrap;
  transition: opacity var(--transition-speed) ease;
}

.sidebar.collapsed .sidebar-title {
  opacity: 0;
  position: absolute;
}

.sidebar-toggle {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-speed) ease;
}

.sidebar-toggle:hover {
  background: rgba(255,255,255,0.2);
}

.sidebar.collapsed .sidebar-toggle {
  right: 50%;
  transform: translate(50%, -50%);
}

/* Sidebar Navigation */
.sidebar-nav {
  flex: 1;
  padding: 20px 10px;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 15px;
  margin-bottom: 5px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  border-radius: 8px;
  transition: all var(--transition-speed) ease;
  position: relative;
  white-space: nowrap;
}

.nav-item i {
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.nav-text {
  transition: opacity var(--transition-speed) ease;
}

.sidebar.collapsed .nav-text {
  opacity: 0;
  position: absolute;
}

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

.nav-item.active {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
}

.nav-badge {
  margin-left: auto;
  background: rgba(255,255,255,0.2);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  transition: opacity var(--transition-speed) ease;
}

.nav-badge.warning {
  background: #f39c12;
  color: white;
}

.sidebar.collapsed .nav-badge {
  opacity: 0;
  position: absolute;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
}

.user-info i {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.user-email-sidebar {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity var(--transition-speed) ease;
}

.sidebar.collapsed .user-email-sidebar {
  opacity: 0;
  position: absolute;
}

.logout-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  color: #e74c3c;
  text-decoration: none;
  border-radius: 8px;
  transition: background var(--transition-speed) ease;
}

.logout-link:hover {
  background: rgba(231, 76, 60, 0.1);
}

/* Main Wrapper */
.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left var(--transition-speed) ease;
}

.sidebar.collapsed + .main-wrapper {
  margin-left: var(--sidebar-collapsed-width);
}

/* Top Header */
.top-header {
  height: var(--header-height);
  background: white;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 30px;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-dark);
  cursor: pointer;
  padding: 5px;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-dark);
  flex: 1;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.user-email-top {
  font-size: 0.9rem;
  color: var(--text-light);
}

.logout-button-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #e74c3c;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: background var(--transition-speed) ease;
}

.logout-button-top:hover {
  background: #c0392b;
}

/* Admin Main Content */
.admin-main {
  flex: 1;
  padding: 30px;
}

/* Login Page */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.login-box {
  background: white;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 400px;
}

.login-box h1 {
  color: #2c3e50;
  margin-bottom: 5px;
  text-align: center;
}

.login-box .subtitle {
  color: #7f8c8d;
  text-align: center;
  margin-bottom: 30px;
}

.login-box .form-group {
  margin-bottom: 20px;
}

.login-box label {
  display: block;
  margin-bottom: 5px;
  color: #2c3e50;
  font-weight: 600;
}

.login-box input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.login-box input:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

.error-message {
  color: #e74c3c;
  font-size: 0.9rem;
  margin-bottom: 15px;
  display: none;
  padding: 10px;
  background-color: #fadbd8;
  border-radius: 4px;
}

.login-button {
  width: 100%;
  padding: 12px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.login-button:hover:not(:disabled) {
  background-color: #2980b9;
}

.login-button:disabled {
  background-color: #95a5a6;
  cursor: not-allowed;
}

.back-link {
  text-align: center;
  margin-top: 20px;
}

.back-link a {
  color: #3498db;
  text-decoration: none;
}

.back-link a:hover {
  text-decoration: underline;
}

/* Admin Container */
.admin-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Admin Header - Legacy (kept for compatibility) */
.admin-header {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: white;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.admin-header h1 {
  font-size: 1.8rem;
}

.admin-branding {
  display: flex;
  align-items: center;
  gap: 15px;
}

.admin-logo {
  width: 50px;
  height: 50px;
}

.admin-subtitle {
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
}

/* Content Sections */
.content-section {
  display: none;
  animation: fadeIn 0.3s ease;
}

.content-section.active {
  display: block;
}

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

.section-header {
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 5px;
}

.section-subtitle {
  font-size: 0.95rem;
  color: var(--text-light);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

/* Action Buttons */
.action-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  text-decoration: none;
}

.action-button.primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
}

.action-button.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.action-button.secondary {
  background: white;
  color: var(--text-dark);
  border: 1px solid var(--border-color);
}

.action-button.secondary:hover {
  background: var(--bg-light);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.user-email {
  font-size: 0.9rem;
  opacity: 0.9;
}

.logout-button, .back-button, .edit-button, .save-button, .cancel-button {
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.logout-button {
  background-color: #e74c3c;
}

.logout-button:hover {
  background-color: #c0392b;
}

.back-button {
  background-color: #3498db;
}

.back-button:hover {
  background-color: #2980b9;
}

.edit-button {
  background-color: #f39c12;
}

.edit-button:hover {
  background-color: #e67e22;
}

.save-button {
  background-color: #27ae60;
}

.save-button:hover:not(:disabled) {
  background-color: #229954;
}

.save-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.cancel-button {
  background-color: #95a5a6;
}

.cancel-button:hover {
  background-color: #7f8c8d;
}

.upload-photo-button {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.upload-photo-button:hover {
  background-color: #2980b9;
}

.upload-photo-button i {
  font-size: 1rem;
}

/* Admin Main */
.admin-main {
  flex: 1;
  padding: 40px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* Dashboard Section */
.dashboard-section {
  margin-bottom: 40px;
}

.dashboard-title {
  color: var(--text-dark);
  font-size: 1.8rem;
  margin-bottom: 25px;
  font-weight: 600;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 30px;
}

.dashboard-card {
  background: white;
  border-radius: 16px;
  padding: 25px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.04);
  display: flex;
  gap: 20px;
  align-items: center;
  transition: all var(--transition-speed) ease;
  border: 1px solid transparent;
}

.dashboard-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  border-color: var(--border-color);
}

.card-icon {
  width: 70px;
  height: 70px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card-icon i {
  font-size: 2rem;
  color: white;
}

.card-content {
  flex: 1;
  min-width: 0;
}

.card-content h3 {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 600;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 5px;
  line-height: 1;
}

.card-label {
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 500;
}

/* Ending Soon Section */
.ending-soon-section {
  background: white;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.collapsible-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.collapse-toggle {
  background: transparent;
  border: none;
  color: #2c3e50;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}

.collapse-toggle:hover {
  background: #f0f0f0;
}

.collapse-toggle i {
  transition: transform 0.3s ease;
}

.collapse-toggle.collapsed i {
  transform: rotate(180deg);
}

.collapsible-content {
  max-height: 1000px;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  opacity: 1;
}

.collapsible-content.collapsed {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}

.ending-soon-section h3 {
  color: #2c3e50;
  font-size: 1.3rem;
  margin-bottom: 0;
  font-weight: 600;
}

.ending-soon-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

.ending-soon-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: linear-gradient(135deg, #fff5e6 0%, #fff 100%);
  border-left: 4px solid #f39c12;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.ending-soon-card:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(243, 156, 18, 0.15);
}

.ending-soon-info h4 {
  color: #2c3e50;
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.ending-soon-info p {
  color: #7f8c8d;
  font-size: 0.95rem;
  margin: 3px 0;
}

.contact-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ending-soon-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

/* session */
.session-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 50px;
}
.session-card {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  padding: 14px 16px;
  min-height: 110px;
}

.session-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.1);
}
#sessionSection .collapsible-header {
  margin-bottom: 24px;
}




.days-badge {
  background: #f39c12;
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 1rem;
}

.days-badge.urgent {
  background: #e74c3c;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.end-date {
  color: #7f8c8d;
  font-size: 0.85rem;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 20px;
}

.panel-header h2 {
  color: #2c3e50;
  font-size: 1.8rem;
}

.header-right-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 0 15px;
  transition: all 0.3s ease;
  min-width: 300px;
}

.search-box:focus-within {
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.search-box i.fa-search {
  color: #95a5a6;
  margin-right: 10px;
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 0;
  font-size: 0.95rem;
  color: #2c3e50;
  background: transparent;
}

.search-box input::placeholder {
  color: #bdc3c7;
}

.clear-search {
  background: none;
  border: none;
  color: #95a5a6;
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  margin-left: 5px;
}

.clear-search:hover {
  color: #e74c3c;
}

.pagination-controls-top {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  padding: 8px 15px;
  border-radius: 8px;
  border: 2px solid #e0e0e0;
}

.items-per-page-label {
  color: #7f8c8d;
  font-size: 0.9rem;
  font-weight: 600;
}

.items-per-page-select {
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 0.9rem;
  color: #2c3e50;
  cursor: pointer;
  background: white;
  outline: none;
}

.items-per-page-select:focus {
  border-color: #3498db;
}

.per-page-text {
  color: #7f8c8d;
  font-size: 0.9rem;
}

.total-count {
  color: #7f8c8d;
  font-size: 1.1rem;
  white-space: nowrap;
  background: white;
  padding: 10px 20px;
  border-radius: 8px;
  border: 2px solid #e0e0e0;
}

.total-count span {
  font-weight: bold;
  color: #3498db;
}

/* Pagination Styles */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 25px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
}

.pagination-btn {
  padding: 10px 16px;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  color: #2c3e50;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-btn:hover:not(:disabled) {
  background: #3498db;
  color: white;
  border-color: #3498db;
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-numbers {
  display: flex;
  gap: 8px;
  align-items: center;
}

.page-btn {
  width: 40px;
  height: 40px;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  color: #2c3e50;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-btn:hover {
  background: #ecf0f1;
  border-color: #bdc3c7;
}

.page-btn.active {
  background: #3498db;
  color: white;
  border-color: #3498db;
}

.page-ellipsis {
  color: #95a5a6;
  padding: 0 5px;
  font-weight: bold;
}

/* Loading Spinner */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}

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

.loading-spinner p {
  margin-top: 20px;
  color: #7f8c8d;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #7f8c8d;
  font-size: 1.1rem;
}

/* Table */
.table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  overflow-x: auto;
}

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

.applications-table thead {
  background-color: #34495e;
  color: white;
}

.applications-table th {
  padding: 15px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}

.applications-table td {
  padding: 15px;
  border-bottom: 1px solid #ecf0f1;
}

.applications-table tbody tr:hover {
  background-color: #f8f9fa;
}

.action-buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.view-button {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.3s ease;
}

.view-button:hover {
  background-color: #2980b9;
}

.delete-button {
  background-color: #e74c3c;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.3s ease;
}

.delete-button:hover {
  background-color: #c0392b;
}

/* Detail Content */
.detail-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  padding: 30px;
}

.detail-section {
  margin-bottom: 40px;
}

.detail-section:last-child {
  margin-bottom: 0;
}

.section-title {
  color: #2c3e50;
  font-size: 1.5rem;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #3498db;
}

/* OLD DETAIL PAGE STYLES - DEPRECATED (Now using inline styles in template) */
/*
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.detail-item {
  display: flex;
  flex-direction: column;
}

.detail-item.full-width {
  grid-column: 1 / -1;
}

.detail-item label {
  font-weight: 600;
  color: #7f8c8d;
  font-size: 0.9rem;
  margin-bottom: 5px;
}

.detail-item span {
  color: #2c3e50;
  font-size: 1rem;
}

.detail-content.edit-mode {
  border: 3px solid #f39c12;
  position: relative;
}

.detail-content.edit-mode::before {
  content: "EDIT MODE";
  position: absolute;
  top: -15px;
  right: 20px;
  background: #f39c12;
  color: white;
  padding: 5px 15px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: bold;
  letter-spacing: 1px;
  z-index: 10;
}

.edit-input, .edit-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 2px solid #3498db;
  border-radius: 4px;
  font-size: 1rem;
  color: #2c3e50;
  background: #f0f8ff;
  transition: all 0.3s ease;
  font-family: Arial, sans-serif;
}

.edit-input:focus, .edit-textarea:focus {
  outline: none;
  border-color: #2980b9;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.edit-textarea {
  min-height: 100px;
  resize: vertical;
}

.edit-input[type="number"] {
  max-width: 200px;
}

.edit-input[type="date"] {
  max-width: 200px;
}
*/

/* Responsive Design */
@media (max-width: 768) {
  .admin-header {
    flex-direction: column;
    gap: 15px;
    padding: 20px;
  }
  
  .header-actions {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }
  
  .logout-button, .back-button {
    width: 100%;
  }
  
  .admin-main {
    padding: 20px;
  }
  
  .panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .table-container {
    overflow-x: scroll;
  }
  
  .applications-table {
    min-width: 800px;
  }
  
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

/* Admin Branding */
.admin-branding {
  display: flex;
  align-items: center;
  gap: 15px;
}

.admin-logo {
  height: 50px;
  width: auto;
  object-fit: contain;
}

.admin-subtitle {
  font-size: 0.9rem;
  opacity: 0.9;
  font-weight: normal;
  margin-top: 2px;
}

/* Login Branding */
.login-branding {
  display: flex;
  justify-content: center;   
  align-items: center;       
  margin-bottom: 10px;
}

.login-logo {
  height: 110px;             
  width: auto;
  object-fit: contain;
}

/* Back links (Login Page) – shared across Admin / Staff login */
.back-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  padding: 0 10px;
}

.back-links .back-left,
.back-links .back-right {
  color: #3498db;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
}

.back-links a:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .back-links {
    align-items: stretch;
    text-align: center;
    /* font-size: 10px; */
  }
  .back-links .back-left,
  .back-links .back-right {
    font-size: 13px;
  }
}




/* Admin Footer */
.admin-footer {
  text-align: center;
  padding: 15px;
  background-color: #2c3e50;
  color: white;
  font-size: 0.9rem;
  margin-top: auto;
}

/* Login Footer */
.login-footer {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
  font-size: 0.9rem;
  color: #666;
}

.developer-badge {
  background: #ff6600;
  color: white;
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .admin-branding {
    flex-direction: column;
    text-align: center;
  }
  
  .admin-logo {
    height: 40px;
  }
  
  .login-logo {
    height: 60px;
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .dashboard-card {
    padding: 20px;
  }
  
  .card-value {
    font-size: 1.6rem;
  }
  
  .ending-soon-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .ending-soon-badge {
    align-items: flex-start;
  }
  
  .panel-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .header-right-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-box {
    min-width: 100%;
  }
  
  .total-count {
    text-align: center;
  }
  
  .pagination-controls-top {
    width: 100%;
    justify-content: center;
  }
  
  .pagination-container {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .pagination-btn {
    padding: 8px 12px;
    font-size: 0.85rem;
  }
  
  .page-btn {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }
  
  .page-numbers {
    gap: 5px;
  }
}

/* Admit Card Styles */
.admit-card-template {
  display: none;
  position: absolute;
  top: -10000px;
  left: 0;
  width: 100%;
  background: white;
  padding: 20px;
}

.admit-card-template.visible-for-pdf {
  display: block;
  position: relative;
  top: 0;
}

.admit-card-container {
  width: 210mm;
  max-height: 297mm;
  margin: 0 auto;
  background: white;
  padding: 8mm;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border: 2px solid #2563eb;
  border-radius: 4px;
}

.admit-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid #2563eb;
  margin-bottom: 12px;
}

.admit-card-logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.admit-card-title h1 {
  font-size: 18px;
  font-weight: bold;
  color: #1e40af;
  margin: 0;
  letter-spacing: 0.3px;
}

.admit-card-title h2 {
  font-size: 14px;
  font-weight: 600;
  color: #dc2626;
  margin: 2px 0 0 0;
  letter-spacing: 0.2px;
}

.admit-card-content {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 15px;
  margin-bottom: 12px;
}

.admit-card-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.student-photo-container {
  width: 110px;
  height: 130px;
  border: 2px solid #2563eb;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  overflow: hidden;
}

.student-photo-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.student-photo-container i {
  font-size: 35px;
  color: #9ca3af;
}

.admit-card-number {
  padding: 8px;
  background: #eff6ff;
  border: 2px solid #2563eb;
  border-radius: 4px;
  text-align: center;
  font-size: 10px;
}

.admit-card-number strong {
  display: block;
  margin-bottom: 3px;
  color: #1e40af;
  font-size: 11px;
}

.admit-card-number span {
  font-family: 'Courier New', monospace;
  font-weight: bold;
  color: #dc2626;
  font-size: 11px;
  word-break: break-all;
}

.admit-card-right {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.admit-card-row {
  display: flex;
  gap: 7px;
}

.admit-card-field {
  flex: 1;
  padding: 6px 8px;
  background: #f9fafb;
  border-left: 2px solid #2563eb;
  border-radius: 2px;
}

.admit-card-field.half {
  flex: 0 0 calc(50% - 3.5px);
}

.admit-card-field label {
  display: block;
  font-size: 9px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.admit-card-field span {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #1f2937;
}

.admit-card-instructions {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 4px;
  padding: 8px 12px;
  margin-bottom: 10px;
}

.admit-card-instructions h3 {
  font-size: 11px;
  font-weight: bold;
  color: #92400e;
  margin: 0 0 5px 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.admit-card-instructions h3 i {
  color: #f59e0b;
  font-size: 10px;
}

.admit-card-instructions ul {
  margin: 0;
  padding-left: 16px;
  color: #78350f;
}

.admit-card-instructions li {
  margin-bottom: 2px;
  line-height: 1.3;
  font-size: 9px;
}

.admit-card-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  padding-top: 10px;
  border-top: 1px solid #e5e7eb;
  margin-bottom: 8px;
}

.footer-left,
.footer-right {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.signature-box,
.stamp-box {
  text-align: center;
  width: 100%;
}

.signature-line {
  width: 100%;
  height: 30px;
  border-bottom: 1px solid #374151;
  margin-bottom: 4px;
}

.signature-box p,
.stamp-box p {
  font-size: 9px;
  font-weight: 600;
  color: #4b5563;
  margin: 2px 0;
}

.stamp-box i {
  font-size: 22px;
  color: #2563eb;
  margin-bottom: 4px;
}

.admit-card-contact {
  text-align: center;
  padding: 6px 8px;
  background: #f3f4f6;
  border-radius: 3px;
  border: 1px solid #d1d5db;
}

.admit-card-contact p {
  margin: 2px 0;
  font-size: 8px;
  color: #4b5563;
}

.admit-card-contact i {
  color: #2563eb;
  margin: 0 5px;
}

.print-admit-card-button {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(6, 182, 212, 0.3);
}

.print-admit-card-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(6, 182, 212, 0.4);
}

.print-admit-card-button i {
  font-size: 16px;
}

/* Certificate Styles */
.certificate-template {
  display: none;
  position: absolute;
  top: -10000px;
  left: 0;
  width: 100%;
  background: white;
}

.certificate-template.visible-for-pdf {
  display: block;
  position: relative;
  top: 0;
}

.certificate-container {
  width: 297mm;
  height: 210mm;
  max-width: 297mm;
  max-height: 210mm;
  margin: 0;
  padding: 0;
  background: white;
  box-sizing: border-box;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

.certificate-border {
  width: 100%;
  height: 100%;
  border: 12px solid #2c3e50;
  border-image: linear-gradient(45deg, #3498db, #2c3e50, #3498db) 1;
  padding: 15px;
  box-sizing: border-box;
  position: relative;
}

.certificate-border::before,
.certificate-border::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border: 3px solid #f39c12;
  box-sizing: border-box;
}

.certificate-border::before {
  top: 10px;
  left: 10px;
}

.certificate-border::after {
  bottom: 10px;
  right: 10px;
}

.certificate-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 15px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  position: relative;
  z-index: 1;
}

.certificate-header {
  text-align: center;
  margin-bottom: 10px;
}

.certificate-logo {
  height: 60px;
  margin-bottom: 5px;
}

.certificate-title {
  font-size: 28px;
  font-weight: 800;
  color: #2c3e50;
  margin: 5px 0;
  letter-spacing: 2px;
}

.certificate-subtitle {
  font-size: 12px;
  color: #7f8c8d;
  font-weight: 600;
  letter-spacing: 3px;
}

.certificate-body {
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px 0;
}

.certificate-heading {
  font-size: 32px;
  font-weight: 800;
  color: #3498db;
  margin-bottom: 20px;
  letter-spacing: 4px;
  text-transform: uppercase;
  border-bottom: 3px solid #f39c12;
  display: inline-block;
  padding-bottom: 8px;
  margin-left: auto;
  margin-right: auto;
}

.certificate-text {
  font-size: 14px;
  color: #555;
  margin: 10px 0;
  line-height: 1.6;
}

.student-name {
  font-family: 'KaushanScript', cursive;
  font-size: 36px;
  font-weight: 400;
  color: #2c3e50;
  margin: 15px 0;
  padding: 8px 30px;
  border-bottom: 3px solid #2c3e50;
  display: inline-block;
  text-transform: capitalize;
  letter-spacing: 1px;
}

.course-name {
  font-size: 24px;
  font-weight: 700;
  color: #3498db;
  margin: 15px 0;
  text-transform: uppercase;
}

.certificate-message {
  font-size: 13px;
  color: #666;
  font-style: italic;
  margin-top: 20px;
}

.certificate-footer {
  margin-top: 15px;
}

.signature-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 30px;
}

.signature-line {
  text-align: center;
}

.signature-placeholder {
  width: 180px;
  height: 50px;
  margin-bottom: 8px;
}

.signature-label {
  font-size: 13px;
  color: #666;
  margin-bottom: 3px;
  border-top: 2px solid #2c3e50;
  padding-top: 3px;
}

.signature-name {
  font-size: 14px;
  font-weight: 700;
  color: #2c3e50;
}

.certificate-date {
  text-align: center;
}

.date-label {
  font-size: 13px;
  color: #666;
  margin-bottom: 3px;
}

.date-value {
  font-size: 14px;
  font-weight: 700;
  color: #2c3e50;
  border: 2px solid #2c3e50;
  padding: 6px 16px;
  border-radius: 4px;
  display: inline-block;
}

.certificate-contact {
  text-align: center;
  margin-top: 15px;
  padding-top: 10px;
  border-top: 2px solid #ecf0f1;
}

.certificate-contact p {
  font-size: 10px;
  color: #7f8c8d;
  margin: 2px 0;
}

.print-certificate-button {
  background: linear-gradient(135deg, #8e44ad 0%, #9b59b6 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(142, 68, 173, 0.3);
}

.print-certificate-button:hover {
  background: linear-gradient(135deg, #732d91 0%, #8e44ad 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(142, 68, 173, 0.4);
}

.print-certificate-button i {
  font-size: 16px;
}

/* Print Styles */
@media print {
  body * {
    visibility: hidden;
  }
  
  /* Only show the template that has display:block */
  .admit-card-template[style*="display: block"],
  .admit-card-template[style*="display: block"] * {
    visibility: visible;
  }
  
  .certificate-template[style*="display: block"],
  .certificate-template[style*="display: block"] * {
    visibility: visible;
  }
  
  /* Hide the other template explicitly */
  .admit-card-template[style*="display: none"],
  .certificate-template[style*="display: none"] {
    display: none !important;
    visibility: hidden !important;
  }
  
  .admit-card-template {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    padding: 0;
  }
  
  .admit-card-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 210mm;
    height: 297mm;
    max-height: 297mm;
    margin: 0;
    padding: 8mm;
    box-shadow: none;
    page-break-after: avoid;
    page-break-inside: avoid;
    overflow: hidden;
  }
  
  .certificate-template {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
  }
  
  .certificate-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 297mm;
    height: 210mm;
    max-width: 297mm;
    max-height: 210mm;
    margin: 0;
    padding: 0;
    page-break-after: avoid;
    page-break-inside: avoid;
    page-break-before: avoid;
    transform: none;
  }
  
  @page {
    margin: 10mm;
    size: A4;
  }

  .admin-container,
  header,
  footer {
    display: none !important;
  }

  #admitCardTemplate {
    display: block !important;
  }

  #certificateTemplate {
    display: block !important;
  }

}

/* ========== Course Modal (matches Enrollment Form UI) ========== */
.course-modal-overlay {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  overflow: auto;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.course-modal-inner {
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  margin: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.course-modal-close-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  margin-bottom: 12px;
  border: none;
  background: rgba(0, 0, 0, 0.12);
  color: #333;
  font-size: 1.5rem;
  line-height: 1;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.course-modal-close-btn:hover {
  background: rgba(0, 0, 0, 0.22);
  color: #000;
}

.course-modal-subtitle {
  font-size: 0.95rem;
  color: #666;
  margin-top: 8px;
  font-weight: normal;
}

.course-modal-inner .form-group input[type="text"],
.course-modal-inner .form-group input[type="number"],
.course-modal-inner .form-group textarea,
.course-modal-inner .course-form-select {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.95rem;
  font-family: Arial, sans-serif;
  width: 100%;
  box-sizing: border-box;
}

.course-modal-inner .form-group input:focus,
.course-modal-inner .form-group textarea:focus,
.course-modal-inner .course-form-select:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

.course-modal-inner .course-form-select {
  background: #fff;
  cursor: pointer;
  appearance: auto;
}

.course-checkbox-label {
  font-weight: 500;
  color: #333;
}

.course-cancel-btn {
  background: #95a5a6;
  color: white;
  border: none;
  padding: 15px 40px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-left: 15px;
}

.course-cancel-btn:hover {
  background: #7f8c8d;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .sidebar {
    width: var(--sidebar-collapsed-width);
  }
  
  .sidebar .sidebar-title,
  .sidebar .nav-text,
  .sidebar .nav-badge,
  .sidebar .user-email-sidebar {
    opacity: 0;
    position: absolute;
  }
  
  .main-wrapper {
    margin-left: var(--sidebar-collapsed-width);
  }
  
  .dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .sidebar {
    width: var(--sidebar-width);
    transform: translateX(-100%);
  }
  
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  
  .sidebar.mobile-open .sidebar-title,
  .sidebar.mobile-open .nav-text,
  .sidebar.mobile-open .nav-badge,
  .sidebar.mobile-open .user-email-sidebar {
    opacity: 1;
    position: static;
  }
  
  .main-wrapper {
    margin-left: 0 !important;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .top-header {
    padding: 0 15px;
  }
  
  .page-title {
    font-size: 1.2rem;
  }
  
  .user-email-top {
    display: none;
  }
  
  .admin-main {
    padding: 20px 15px;
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .header-controls {
    width: 100%;
    flex-direction: column;
  }
  
  .search-box {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .sidebar-header {
    padding: 15px;
  }
  
  .logout-button-top span {
    display: none;
  }
  
  .dashboard-card {
    flex-direction: column;
    text-align: center;
  }
  
  .card-value {
    font-size: 1.5rem;
  }
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
}

.sidebar-overlay.active {
  display: block;
}

/* Empty State Icons */
.empty-icon {
  font-size: 3rem;
  color: var(--text-light);
  margin-bottom: 15px;
  opacity: 0.5;
}
