:root {
  --font-primary: "HK Grotesk", "hkgrotesk", sans-serif;
  --font-secondary: "Poppins", sans-serif;
  --acad-sphere-primary: #03A141;
  --acad-sphere-secondary: #FC0F18;
  --acad-sphere-accent: #FFCA00;
  --acad-sphere-dark: #333333;
  --acad-sphere-light: #f8f9fa;
  --acad-sphere-background: #f3f3f9;
  --acad-sphere-white: #FFFFFF;
}

/* Custom Navbar */
.custom-navbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  background-color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Header styling for sticky navbar */
header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background-color: white;
}

.custom-navbar .nav-link {
  color: var(--acad-sphere-dark) !important;
  font-weight: 500;
  transition: color 0.3s ease;
}

.custom-navbar .nav-link:hover {
  color: var(--acad-sphere-primary) !important;
}

.navbar .nav-link img,
.navbar form button.nav-link img {
  margin-right: 0.5rem;
  transition: filter 0.3s ease;
}

.navbar .nav-link:hover img,
.navbar .nav-link.active img,
.navbar form button.nav-link:hover img,
.navbar form button.nav-link.active img {
  filter: brightness(0) saturate(100%) invert(100%);
}

.custom-navbar .btn-acad-sphere-primary {
  background-color: var(--acad-sphere-primary);
  border: none;
  color: white;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.custom-navbar .btn-acad-sphere-secondary {
  padding: 0.5rem 1rem;
}

.custom-navbar .btn-acad-sphere-primary:hover {
  background-color: #018a35;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(1, 161, 64, 0.3);
  color: white;
}

/* Mobile-friendly navbar */
.navbar-brand {
  font-weight: 700;
}

.navbar-brand img {
  max-height: 100px;
}

.navbar-brand .fw-bold {
  font-size: 1rem;
}

.navbar-brand small {
  font-size: 0.75rem;
}

@media (max-width: 991px) {
  .navbar-brand {
    flex-direction: column;
    align-items: flex-start !important;
  }

  .navbar-brand img {
    max-height: 80px;
    margin-bottom: 5px;
  }

  .navbar-brand .fw-bold {
    font-size: 0.9rem;
    line-height: 1.2;
  }

  .navbar-brand small {
    font-size: 0.7rem;
  }

  .navbar-nav .btn {
    margin-top: 10px;
    width: 100%;
  }

  .navbar-nav form {
    width: 100%;
  }

  .navbar-nav form button {
    width: 100%;
    text-align: left;
  }
}

html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--acad-sphere-primary);
}

body {
  font-family: var(--font-primary);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-secondary);
}

main {
  flex: 1;
}

footer {
  margin-top: auto;
}

/* Form Controls - Matching Admissions Design */
.form-floating>.form-control-plaintext::placeholder,
.form-floating>.form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating>.form-control-plaintext:focus::placeholder,
.form-floating>.form-control:focus::placeholder {
  text-align: start;
}

/* Velzon-inspired Form Controls */
.form-control {
  border: 1.5px solid #000000 !important;
  transition: all 0.2s ease;
  font-size: 0.9375rem;
  border-radius: 2px;
}

.form-control:focus {
  border-color: var(--acad-sphere-primary);
  box-shadow: 0 0 0 0.15rem rgba(21, 65, 39, 0.15);
  background-color: #ffffff;
}

.form-select,
select.form-select,
.form-select.form-select-lg,
select.form-select.form-select-lg {
  border: 1.5px solid #000000 !important;
  transition: all 0.2s ease;
  font-size: 0.9375rem;
}

.form-select:focus,
select.form-select:focus,
.form-select.form-select-lg:focus,
select.form-select.form-select-lg:focus {
  border-color: var(--acad-sphere-primary) !important;
  border-width: 1.5px !important;
  border-style: solid !important;
  box-shadow: 0 0 0 0.15rem rgba(21, 65, 39, 0.15);
  background-color: #ffffff;
}

.form-label {
  font-weight: 500;
  color: #495057;
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
}

/* Input Group */
.input-group .form-control,
.input-group .form-select {
  border-radius: 2px;
}

.input-group-text {
  border-radius: 3px;
  border: 1px solid #e0e0e0;
  background-color: #f8f9fa;
}

/* Mobile Header */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background-color: var(--acad-sphere-primary);
  color: var(--acad-sphere-white);
  padding: 0 15px;
  z-index: 1001;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  align-items: center;
  justify-content: space-between;
}

.mobile-menu-toggle {
  background: none;
  border: none;
  color: var(--acad-sphere-white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 5px 10px;
}

.mobile-header-title h4 {
  color: var(--acad-sphere-white);
  font-size: 1rem;
  margin: 0;
  font-weight: 600;
}

.mobile-user-info {
  display: flex;
  align-items: center;
}

.mobile-username {
  font-size: 0.85rem;
  color: var(--acad-sphere-white);
}

/* Sidebar Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
}

/* Dashboard Layout Styles */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 250px;
  background-color: var(--acad-sphere-primary);
  color: var(--acad-sphere-white);
  padding: 0;
  z-index: 1000;
  box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  position: relative;
  flex-shrink: 0;
}

.sidebar-header h4 {
  margin: 0;
  font-weight: 600;
  font-size: 1rem;
}

.sidebar-close {
  display: none;
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  color: var(--acad-sphere-white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 5px;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
  overflow-y: auto;
}

.sidebar-menu li {
  margin: 5px 0;
}

.sidebar-menu a {
  display: block;
  padding: 12px 20px;
  color: var(--acad-sphere-white);
  text-decoration: none;
  transition: all 0.3s;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
  background-color: rgba(255,255,255,0.2);
  border-left: 4px solid var(--acad-sphere-white);
}

.sidebar-menu i {
  width: 20px;
  margin-right: 10px;
}

.sidebar-footer {
  padding: 15px 20px;
  border-top: 1px solid rgba(255,255,255,0.2);
  flex-shrink: 0;
}

.sidebar-user-info {
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.sidebar-user-info span {
  color: var(--acad-sphere-white);
}

.btn-logout-sidebar {
  width: 100%;
  background-color: var(--acad-sphere-secondary);
  color: var(--acad-sphere-white);
  border: none;
  padding: 10px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.3s;
}

.btn-logout-sidebar:hover {
  background-color: #E00E17;
}

.main-content {
  margin-left: 250px;
  padding: 20px;
  min-height: 100vh;
  transition: margin-left 0.3s ease;
}

.top-navbar {
  background: var(--acad-sphere-white);
  padding: 15px 20px;
  margin-bottom: 20px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.top-navbar h5 {
  margin: 0;
  font-size: 1.25rem;
}

.content-card {
  background: var(--acad-sphere-white);
  padding: 25px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.user-info span {
  /* color: var(--acad-sphere-primary); */
  font-weight: 500;
}

.desktop-username {
  display: inline;
}

.mobile-username {
  display: none;
}

.btn-logout {
  background-color: var(--acad-sphere-secondary);
  color: var(--acad-sphere-white);
  border: none;
  padding: 8px 15px;
  border-radius: 5px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s;
  white-space: nowrap;
}

.btn-logout:hover {
  background-color: #E00E17;
  color: var(--acad-sphere-white);
}

.logout-text {
  display: inline;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .mobile-header {
    display: flex;
  }

  .sidebar {
    transform: translateX(-100%);
    width: 280px;
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .sidebar-close {
    display: block;
  }

  .sidebar-overlay {
    display: block;
  }

  .main-content {
    margin-left: 0;
    padding: 15px;
    padding-top: 75px;
  }

  .top-navbar {
    padding: 10px 15px;
    margin-bottom: 15px;
  }

  .top-navbar h5 {
    font-size: 1.1rem;
  }

  .content-card {
    padding: 15px;
  }

  .user-info {
    width: 100%;
    justify-content: space-between;
    margin-top: 10px;
  }

  .desktop-username {
    display: none;
  }

  .mobile-username {
    display: inline;
  }

  .logout-text {
    display: none;
  }

  .btn-logout {
    padding: 8px 12px;
  }
}

@media (max-width: 576px) {
  .main-content {
    padding: 10px;
    padding-top: 70px;
  }

  .content-card {
    padding: 12px;
  }

  .top-navbar {
    padding: 8px 12px;
  }

  .top-navbar h5 {
    font-size: 1rem;
  }

  .sidebar {
    width: 100%;
  }
}

/* Login Page Styles */
.login-container {
  background: var(--acad-sphere-white);
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  padding: 40px;
  max-width: 400px;
  width: 100%;
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.login-header h2 {
  color: var(--acad-sphere-primary);
  font-weight: 600;
}

.btn-login {
  background-color: var(--acad-sphere-primary);
  border: none;
  width: 100%;
  padding: 12px;
  font-weight: 600;
  border-radius: 5px;
  color: var(--acad-sphere-white);
}

.btn-login:hover {
  background-color: #028A35;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(3, 161, 65, 0.4);
  color: var(--acad-sphere-white);
}

/* Bootstrap Button Overrides */
.btn-primary {
  background-color: var(--acad-sphere-primary);
  border-color: var(--acad-sphere-primary);
  color: var(--acad-sphere-white);
}

.btn-primary:hover {
  background-color: #028A35;
  border-color: #028A35;
  color: var(--acad-sphere-white);
}

.btn-info {
  background-color: var(--acad-sphere-accent);
  border-color: var(--acad-sphere-accent);
  color: var(--acad-sphere-dark);
}

.btn-info:hover {
  background-color: #E6B800;
  border-color: #E6B800;
  color: var(--acad-sphere-dark);
}

.btn-success {
  background-color: var(--acad-sphere-primary);
  border-color: var(--acad-sphere-primary);
  color: var(--acad-sphere-white);
}

.btn-success:hover {
  background-color: #028A35;
  border-color: #028A35;
  color: var(--acad-sphere-white);
}
.border-primary {
  border-color: var(--acad-sphere-primary)  !important;
  border-width: 1px !important;
}
.border-primary:hover {
  border-color: #028A35;
}
.btn-danger {
  background-color: var(--acad-sphere-secondary);
  border-color: var(--acad-sphere-secondary);
  color: var(--acad-sphere-white);
}

.btn-danger:hover {
  background-color: #E00E17;
  border-color: #E00E17;
  color: var(--acad-sphere-white);
}

/* Card Header Styles */


/* Dashboard Card Styles */
.dashboard-card-primary {
  background-color: var(--acad-sphere-primary);
  color: var(--acad-sphere-white);
}

.dashboard-card-secondary {
  background-color: var(--acad-sphere-secondary);
  color: var(--acad-sphere-white);
}

.dashboard-card-accent {
  background-color: var(--acad-sphere-accent);
  color: var(--acad-sphere-dark);
}

/* Status Cards - Matching Admissions Design */
.status-card {
  background-color: white;
  border: 2px solid #a5a0a0;
  border-radius: 3px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s ease;
  height: 100%;
}

.status-card:hover {
  border-color: var(--acad-sphere-primary);
  transform: translateY(-2px);
}

.card-icon {
  width: 60px;
  height: 60px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  background-color: var(--acad-sphere-primary);
}

.card-icon.success {
  background-color: #28a745;
}

.card-icon.warning {
  background-color: var(--acad-sphere-accent);
  color: var(--acad-sphere-dark);
}

.card-icon.info {
  background-color: #17a2b8;
}

.card-content h6 {
  margin: 0 0 0.5rem 0;
  font-weight: 600;
  color: var(--acad-sphere-dark);
}

.card-content p {
  margin: 0;
  color: #03A141;
  font-size: 0.9rem;
}

/* Responsive Table Styles */
@media (max-width: 768px) {
  .table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: -ms-autohiding-scrollbar;
    position: relative;
  }

  .table-responsive::-webkit-scrollbar {
    height: 8px;
  }

  .table-responsive::-webkit-scrollbar-track {
    background: var(--acad-sphere-light);
    border-radius: 4px;
  }

  .table-responsive::-webkit-scrollbar-thumb {
    background: var(--acad-sphere-primary);
    border-radius: 4px;
  }

  .table-responsive::-webkit-scrollbar-thumb:hover {
    background: #028A35;
  }

  .table {
    font-size: 0.85rem;
    width: 100%;
    min-width: 600px;
    margin-bottom: 0;
  }

  .table th,
  .table td {
    padding: 8px 4px;
    white-space: nowrap;
  }

  .btn-sm {
    padding: 4px 8px;
    font-size: 0.75rem;
  }

  /* Ensure tables inside cards can scroll */
  .card .table-responsive {
    margin: 0 -15px;
    padding: 0 15px;
  }

  .card-body {
    overflow-x: visible;
  }

  /* Fix for nested table-responsive in cards */
  .card-body .table-responsive {
    width: calc(100% + 30px);
    margin-left: -15px;
    margin-right: -15px;
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Responsive Card Styles */
@media (max-width: 768px) {
  .card {
    margin-bottom: 15px;
  }

  .card-body {
    padding: 15px;
  }

  .card-header {
    padding: 10px 15px;
    font-size: 1rem;
  }
}

/* Responsive Form Styles */
@media (max-width: 768px) {
  .form-control,
  .form-select {
    font-size: 1rem; /* Prevents zoom on iOS */
  }

  .form-label {
    font-size: 0.9rem;
  }

  .input-group-text {
    font-size: 0.9rem;
  }

  .btn {
    padding: 10px 15px;
    font-size: 0.9rem;
  }
}

/* Login Page Mobile Responsive */
@media (max-width: 768px) {
  .login-container {
    padding: 25px 20px;
    margin: 20px;
    max-width: 100%;
  }

  .login-header h2 {
    font-size: 1.5rem;
  }
}