@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --font-primary: 'Outfit', sans-serif;
  --font-secondary: 'Plus Jakarta Sans', sans-serif;
  
  --bg-dark: #0a0e1a;
  --bg-card: rgba(18, 24, 43, 0.75);
  --bg-card-hover: rgba(26, 35, 62, 0.85);
  --border-glass: rgba(255, 255, 255, 0.1);
  --border-glass-bright: rgba(255, 255, 255, 0.2);
  
  --primary: #6366f1;
  --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --secondary-gradient: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  --accent-emerald: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --accent-rose: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  --accent-amber: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-glow: 0 10px 30px -10px rgba(99, 102, 241, 0.4);
  --shadow-card: 0 20px 40px rgba(0, 0, 0, 0.35);
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-primary);
  background-color: var(--bg-dark);
  color: var(--text-main);
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(124, 58, 237, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.1) 0px, transparent 50%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Glassmorphism Container */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

/* Layout */
.app-header {
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-glass);
  background: rgba(10, 14, 26, 0.8);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.brand-icon {
  width: 44px;
  height: 44px;
  background: var(--primary-gradient);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.brand-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-btn {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-btn:hover, .nav-btn.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.main-content {
  max-width: 1280px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

/* Top Toolbar for Admin */
.module-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.module-title-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-glow);
  transition: var(--transition);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 35px -8px rgba(99, 102, 241, 0.6);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  border: 1px solid var(--border-glass);
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Data Table Styling */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.custom-table th {
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-glass);
}

.custom-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.95rem;
  color: var(--text-main);
  vertical-align: middle;
}

.custom-table tbody tr {
  transition: var(--transition);
}

.custom-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* Badges & File Chips */
.badge {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.badge-pdf {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.badge-img {
  background: rgba(6, 182, 212, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

/* Action Icon Buttons */
.action-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: var(--transition);
}

.action-btn.view {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.action-btn.view:hover {
  background: #3b82f6;
  color: #fff;
}

.action-btn.edit {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.action-btn.edit:hover {
  background: #f59e0b;
  color: #fff;
}

.action-btn.delete {
  background: rgba(244, 63, 94, 0.15);
  color: #f87171;
  border: 1px solid rgba(244, 63, 94, 0.3);
}
.action-btn.delete:hover {
  background: #f43f5e;
  color: #fff;
}

/* Modal Styling */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 18, 0.85);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: #0f172a;
  border: 1px solid var(--border-glass-bright);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  padding: 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  transform: scale(0.9);
  transition: var(--transition);
  position: relative;
}

.modal-overlay.active .modal-container {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-glass);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 0.95rem;
  font-family: var(--font-primary);
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.file-input-wrapper {
  border: 2px dashed var(--border-glass);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.02);
}

.file-input-wrapper:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

/* Search Results Portal (Student Page) */
.hero-section {
  text-align: center;
  padding: 4rem 1rem 3rem 1rem;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2.5rem auto;
}

.search-card {
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem;
}

.search-box {
  display: flex;
  gap: 12px;
}

.search-input {
  flex: 1;
  padding: 14px 20px;
  font-size: 1.05rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-glass-bright);
  border-radius: var(--radius-md);
  color: #fff;
}

.search-input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.25);
}

/* Result Viewer Container */
.result-card {
  margin-top: 2rem;
  padding: 2rem;
  animation: fadeIn 0.4s ease-out;
}

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

.cert-preview-frame {
  width: 100%;
  height: 580px;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  background: #1e293b;
  margin-top: 1.5rem;
  overflow: hidden;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-title { font-size: 2rem; }
  .module-header { flex-direction: column; align-items: stretch; }
  .search-box { flex-direction: column; }
}

/* Light Theme (For White Background & Subdomain Embedding) */
body.light-theme {
  background-color: #ffffff !important;
  background-image: none !important;
  color: #0f172a !important;
}

body.light-theme .hero-title {
  color: #0284c7 !important; /* Sky Blue Heading */
  background: none !important;
  -webkit-text-fill-color: #0284c7 !important;
  font-weight: 800;
}

body.light-theme .hero-desc {
  color: #475569 !important;
}

body.light-theme .glass-panel {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06) !important;
}

body.light-theme .search-input {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

body.light-theme .search-input::placeholder {
  color: #94a3b8 !important;
}

body.light-theme .search-input:focus {
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.15) !important;
}

body.light-theme .btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.3) !important;
}

body.light-theme .btn-secondary {
  background: #f1f5f9 !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
}

body.light-theme .btn-secondary:hover {
  background: #e2e8f0 !important;
}

body.light-theme .result-card h2 {
  color: #0f172a !important;
}

body.light-theme .result-card h3, 
body.light-theme .result-card p {
  color: #334155 !important;
}

body.light-theme .cert-preview-frame {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

/* ==========================================================================
   ADMIN LAYOUT & RESPONSIVE SIDEBAR
   ========================================================================== */
.admin-body {
  background-color: #070a13;
  color: #f8fafc;
  min-height: 100vh;
}

.admin-wrapper {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* Mobile Top Navbar */
.mobile-top-bar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(10, 14, 26, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glass);
  padding: 0 1.25rem;
  align-items: center;
  justify-content: space-between;
  z-index: 900;
}

.mobile-toggle-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Sidebar Drawer */
.app-sidebar {
  width: 270px;
  background: rgba(13, 18, 33, 0.95);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 950;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-glass);
}

.sidebar-nav {
  padding: 1.5rem 1rem;
  flex: 1;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 1px;
  margin-bottom: 10px;
  padding-left: 12px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-muted);
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 6px;
  transition: var(--transition);
}

.sidebar-link i {
  font-size: 1.1rem;
  width: 22px;
  text-align: center;
}

.sidebar-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-link.active {
  color: #fff;
  background: var(--primary-gradient);
  box-shadow: var(--shadow-glow);
  font-weight: 600;
}

.sidebar-footer {
  padding: 1.25rem 1rem;
  border-top: 1px solid var(--border-glass);
  background: rgba(8, 12, 23, 0.5);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 920;
}

.admin-main-content {
  flex: 1;
  margin-left: 270px;
  padding: 2rem 2.5rem;
  width: calc(100% - 270px);
  transition: var(--transition);
}

/* Responsive Media Queries for Admin */
@media (max-width: 991px) {
  .mobile-top-bar {
    display: flex;
  }

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

  .app-sidebar.active {
    transform: translateX(0);
  }

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

  .admin-main-content {
    margin-left: 0;
    width: 100%;
    padding: 5.5rem 1.25rem 2rem 1.25rem;
  }
}

/* ==========================================================================
   PUBLIC WEBSITE HEADER (MATCHING SCREENSHOT)
   ========================================================================== */
.site-header {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0.75rem 2rem;
  width: 100%;
}

.site-header-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.site-logo-link {
  display: inline-flex;
  align-items: center;
}

.site-logo {
  height: 60px !important;
  max-height: 60px !important;
  width: auto !important;
  object-fit: contain;
  display: block;
}

.site-nav {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 2.25rem !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.site-nav li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.site-nav-link {
  font-size: 1.05rem;
  font-weight: 700;
  color: #000000 !important;
  text-decoration: none !important;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.site-nav-link:hover,
.site-nav-link.active {
  color: #0284c7 !important;
}

.btn-call-us {
  background: #0084b4 !important;
  color: #ffffff !important;
  padding: 10px 28px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 132, 180, 0.3);
  transition: all 0.25s ease;
  border: none;
  white-space: nowrap;
}

.btn-call-us:hover {
  background: #006b94 !important;
  transform: translateY(-1px);
}

.mobile-nav-toggle {
  display: none;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  font-size: 1.3rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.mobile-nav-menu {
  display: none;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 1rem 1.5rem;
  flex-direction: column;
  gap: 1rem;
}

.mobile-nav-menu.active {
  display: flex;
}

@media (max-width: 991px) {
  .site-header {
    padding: 0.75rem 1.25rem;
  }
  .site-nav,
  .site-header-actions {
    display: none !important;
  }
  .mobile-nav-toggle {
    display: flex !important;
  }
}




