body {
  background: #f6f7f9;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 15% 85%;
}

.app-sidebar {
  width: 100%;
  background: #1f2937;
  color: #e5e7eb;
  border-right: 1px solid #111827;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sidebar-brand {
  margin-bottom: 12px;
  padding: 6px 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-brand a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.sidebar-brand-subtitle {
  margin-top: 6px;
  font-size: 0.78rem;
  color: #cbd5e1;
  line-height: 1.35;
}

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

.sidebar-copyright {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.78rem;
  color: #cbd5e1;
  text-align: center;
  line-height: 1.4;
}

.sidebar-link {
  display: block;
  color: #e5e7eb;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.93rem;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

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

.sidebar-link.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.sidebar-divider {
  margin-top: 14px;
  margin-bottom: 2px;
  padding: 7px 10px;
  border-left: 3px solid #60a5fa;
  background: rgba(96, 165, 250, 0.12);
  border-radius: 0 8px 8px 0;
}

.sidebar-divider span {
  font-size: 0.74rem;
  color: #bfdbfe;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.sidebar-online-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.sidebar-online-item {
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.32);
  border-radius: 10px;
  padding: 8px 10px;
}

.sidebar-online-item.is-me {
  border-color: rgba(96, 165, 250, 0.7);
  background: rgba(37, 99, 235, 0.26);
}

.sidebar-online-name {
  color: #f8fafc;
  font-weight: 600;
  font-size: 0.84rem;
  line-height: 1.35;
}

.sidebar-online-me {
  margin-left: 4px;
  color: #93c5fd;
  font-weight: 700;
  font-size: 0.76rem;
}

.sidebar-online-meta {
  color: #cbd5e1;
  font-size: 0.74rem;
  line-height: 1.3;
}

.sidebar-online-empty {
  color: #cbd5e1;
  font-size: 0.78rem;
  padding: 2px 2px 0;
}

.app-content {
  width: 100%;
  min-width: 0;
  background: linear-gradient(180deg, #edf1f6 0%, #e7ecf3 100%);
}

.mobile-menu-toggle {
  display: none;
}

.sidebar-backdrop {
  display: none;
}

.app-topbar {
  background: #e5ebf3;
  border-bottom: 1px solid #cfd8e3;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

@media (max-width: 992px) {
  .app-shell {
    display: block;
  }

  .app-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(80vw, 320px);
    height: 100vh;
    z-index: 1050;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  }

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

  .mobile-menu-toggle {
    display: inline-block;
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1040;
  }

  .app-shell.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .app-content {
    width: 100%;
  }

  .app-topbar {
    flex-wrap: wrap;
  }
}

.card {
  border-radius: 8px;
}

.stat-card {
  min-height: 112px;
}

.table td,
.table th {
  vertical-align: middle;
}

/* Highlight inactive / newly registered users in admin tables */
.table tr.row-inactive-highlight > td,
.table tr.row-inactive-highlight > th {
  background-color: #fff3cd !important;
  border-bottom-color: #ffecb5 !important;
}

.student-list {
  max-height: 360px;
  overflow: auto;
}

.required::after {
  content: " *";
  color: #dc3545;
}

/* Login Page Modern Sleek Styling */
.login-card {
  border-radius: 20px !important;
  background: #ffffff;
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.08), 0 5px 15px rgba(0, 0, 0, 0.04) !important;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
}

.login-brand-icon {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #2563eb;
  border: 1px solid rgba(191, 219, 254, 0.6);
}

.login-input {
  border-radius: 12px !important;
  font-size: 0.95rem !important;
  transition: all 0.2s ease !important;
  background-color: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

.login-input:focus {
  background-color: #ffffff !important;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12) !important;
  border-color: #60a5fa !important;
}

.login-btn {
  border-radius: 12px !important;
  font-size: 1rem !important;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  border: none !important;
  transition: all 0.2s ease !important;
  letter-spacing: 0.02em;
}

.login-btn:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3) !important;
}

@media (max-width: 768px) and (orientation: portrait) {
  .login-input {
    width: 84% !important;
    max-width: 320px;
    display: block;
    margin-left: auto;
    margin-right: auto;
  }

  .login-btn {
    width: 84% !important;
    max-width: 320px;
    display: block;
    margin-left: auto;
    margin-right: auto;
  }
}

