:root {
  --bg-color: #f0f2f5;
  --text-color: #1a1f36;
  --card-bg: rgba(255, 255, 255, 0.65);
  --card-border: rgba(255, 255, 255, 0.5);
  --sidebar-bg: rgba(255, 255, 255, 0.85);
  --primary-color: #6366f1;
  --secondary-color: #a855f7;
  --accent-color: #ec4899;
  --glass-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
  --glass-backdrop: blur(16px);
  --navbar-bg: rgba(255, 255, 255, 0.88);
  --navbar-border: rgba(0, 0, 0, 0.06);
  --nav-link: #1a1f36;
}

[data-theme="dark"] {
  --bg-color: #0b0e14;
  --text-color: #e2e8f0;
  --card-bg: rgba(23, 25, 35, 0.7);
  --card-border: rgba(255, 255, 255, 0.08);
  --sidebar-bg: rgba(17, 19, 28, 0.9);
  --primary-color: #818cf8;
  --secondary-color: #c084fc;
  --accent-color: #f472b6;
  --glass-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
  --bs-body-color: #e2e8f0;
  --bs-heading-color: #ffffff;
  --navbar-bg: rgba(13, 15, 24, 0.95);
  --navbar-border: rgba(255, 255, 255, 0.07);
  --nav-link: #e2e8f0;
}

body {
  background: var(--bg-color);
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.1) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(236, 72, 153, 0.1) 0px, transparent 50%);
  color: var(--text-color);
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  transition: background 0.5s ease, color 0.5s ease;
  min-height: 100vh;
  letter-spacing: -0.01em;
}

/* ── Universal Navbar Styling ── */
.navbar {
  background: var(--navbar-bg);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border-bottom: 1px solid var(--navbar-border);
  padding: 0;
  height: 80px;
  position: sticky;
  top: 0;
  z-index: 999;
  transition: all 0.3s;
  display: flex;
  align-items: center;
}

.navbar-brand {
  font-weight: 800;
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-brand i {
  -webkit-text-fill-color: var(--primary-color);
  font-size: 1.6rem;
}

.nav-link {
  font-weight: 600;
  color: var(--nav-link) !important;
  margin: 0 12px;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  opacity: 0.8;
}

.nav-link:hover {
  color: var(--primary-color) !important;
  opacity: 1;
}

.theme-toggle {
  background: rgba(0, 0, 0, 0.05);
  border: none;
  color: var(--text-color);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-left: 10px;
}

[data-theme="dark"] .theme-toggle {
  background: rgba(255, 255, 255, 0.08);
}

.theme-toggle:hover {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-color);
}

.btn-admin {
  background: #2563eb;
  color: white !important;
  border: none;
  padding: 10px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
  display: inline-flex;
  align-items: center;
}

.btn-admin:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
  color: white !important;
}

/* Glassmorphism utility */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--card-border);
  box-shadow: var(--glass-shadow);
  border-radius: 24px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  border-color: var(--primary-color);
}

/* Sidebar styling */
.sidebar {
  height: calc(100vh - 40px);
  position: fixed;
  left: 20px;
  top: 20px;
  width: 240px;
  background: var(--sidebar-bg);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  padding-top: 30px;
  transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  border-radius: 24px;
  border: 1px solid var(--card-border);
  box-shadow: var(--glass-shadow);
}

.sidebar .nav-link {
  padding: 14px 24px;
  font-weight: 600;
  border-radius: 16px;
  margin: 4px 15px;
  transition: all 0.3s;
  color: var(--text-color) !important;
  opacity: 0.7;
}

.sidebar .nav-link:hover, .sidebar .nav-link.active {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white !important;
  opacity: 1;
  transform: translateX(5px);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.main-content {
  margin-left: 280px;
  padding: 30px 40px;
  transition: 0.4s;
}

/* Responsive Sidebar */
@media (max-width: 992px) {
  .sidebar {
    left: -280px;
    top: 0;
    height: 100vh;
    border-radius: 0;
    width: 260px;
  }
  .sidebar.active {
    left: 0;
    border-radius: 0 24px 24px 0;
  }
  .main-content {
    margin-left: 0 !important;
    padding: 20px !important;
  }
}

.profile-card {
  width: 95%;
  max-width: 420px;
  margin: 60px auto;
  border-radius: 32px;
  overflow: hidden;
  background: var(--card-bg);
  display: flex;
  flex-direction: column;
  position: relative;
}

.profile-header {
  height: 140px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  width: 100%;
  position: relative;
}

.profile-img-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: -60px;
  position: relative;
  z-index: 10;
}

.profile-img {
  width: 120px;
  height: 120px;
  border-radius: 50% !important;
  border: 6px solid var(--card-bg) !important;
  object-fit: cover;
  background: white;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.profile-info {
  text-align: center;
  padding-top: 15px;
  padding-bottom: 30px;
}

.info-list {
  text-align: left;
}

.info-item {
  display: flex;
  align-items: center;
  padding: 16px;
  background: var(--card-bg);
  border-radius: 20px;
  margin-bottom: 12px;
  transition: all 0.3s;
}

.info-item:hover {
  background: rgba(99, 102, 241, 0.05);
  transform: scale(1.02);
}

.info-icon {
  width: 48px;
  height: 48px;
  background: white;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
  color: var(--primary-color);
  font-size: 1.2rem;
}

[data-theme="dark"] .info-icon {
  background: rgba(255, 255, 255, 0.05);
}

.info-content p {
  margin: 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.6;
  font-weight: 700;
}

.info-content h6 {
  margin: 0;
  font-weight: 600;
  font-size: 1rem;
}

/* QR Container */
.qr-container {
  display: flex;
  justify-content: center;
  align-items: center;
  background: white;
  border-radius: 10px;
  border: 1px solid #ddd;
}
.qr-container img {
  margin: 0 auto;
}

/* Dark Mode Overrides for Bootstrap Components */
[data-theme="dark"] .form-control {
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .table {
    color: var(--text-color) !important;
    --bs-table-bg: transparent !important;
    --bs-table-border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .table thead th {
    background-color: rgba(255, 255, 255, 0.03) !important;
    color: var(--text-color) !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .table tbody td {
    color: var(--text-color) !important;
    background-color: transparent !important;
}

[data-theme="dark"] .table-hover>tbody>tr:hover>* {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-color) !important;
}

[data-theme="dark"] .modal-content {
    background-color: #1a1c23;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .text-muted {
    color: rgba(255, 255, 255, 0.5) !important;
}

[data-theme="dark"] .badge.bg-light {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .btn-light {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: none;
}

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

/* Professional Footer Styling */
.main-footer {
  background: var(--navbar-bg, var(--card-bg));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--navbar-border, var(--card-border));
  padding: 80px 0 30px;
  margin-top: 0;
  color: var(--text-color);
  transition: all 0.3s ease;
  text-align: left;
}

.footer-logo {
  font-weight: 800;
  font-size: 1.8rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 24px;
  text-decoration: none;
}

.footer-description {
  opacity: 0.7;
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 32px;
  max-width: 350px;
  text-align: left;
  margin-left: 0;
}

.footer-heading {
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 25px;
  position: relative;
  color: var(--text-color);
}

.footer-heading::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 35px;
  height: 2.5px;
  background: var(--primary-color);
  border-radius: 2px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 14px;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-color);
  opacity: 0.65;
  font-weight: 500;
  transition: all 0.3s;
  display: inline-block;
}

.footer-links a:hover {
  opacity: 1;
  color: var(--primary-color);
  transform: translateX(6px);
}

.social-links {
  display: flex;
  gap: 12px;
  justify-content: flex-start;
  margin-left: 0;
}

.social-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--toggle-bg, rgba(99, 102, 241, 0.08));
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  transition: all 0.3s;
  text-decoration: none;
  border: 1px solid var(--navbar-border, rgba(99, 102, 241, 0.1));
}

.social-btn:hover {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
  border-color: transparent;
}

.footer-bottom {
  border-top: 1px solid var(--card-border);
  margin-top: 60px;
  padding-top: 30px;
  text-align: center;
  font-size: 0.92rem;
}

.footer-bottom p {
  opacity: 0.6;
  margin: 0;
}

[data-theme="dark"] .main-footer {
  background: rgba(13, 15, 24, 0.98);
}

[data-theme="dark"] .social-btn {
    background: rgba(255, 255, 255, 0.05);
}
