/* Modern School Management System Stylesheet */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #4361ee;
  --secondary: #3f37c9;
  --success: #4cc9f0;
  --info: #4895ef;
  --warning: #f72585;
  --danger: #e63946;
  --light: #f8f9fa;
  --dark: #212529;
  --sidebar-bg: #1a1a2e;
  --sidebar-hover: #16213e;
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

html {
  overflow-y: scroll;
}

body {
  background-color: #f0f2f5;
  overflow-x: hidden;
}

/* Login Page Styles */
.login-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.login-container {
  width: 100%;
  max-width: 450px;
  background: white;
  border-radius: 20px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  animation: fadeInUp 0.6s ease-out;
  transform: translateY(0);
  z-index: 10;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-header {
  background: linear-gradient(to right, var(--primary), var(--secondary));
  color: white;
  padding: 30px;
  text-align: center;
  position: relative;
}

.login-header .logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.login-header .logo i {
  background: rgba(255, 255, 255, 0.2);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  transition: transform 0.3s ease;
}

.login-header:hover .logo i {
  transform: scale(1.1);
}

.login-header h2 {
  font-weight: 600;
  margin-bottom: 5px;
  font-size: 1.8rem;
}

.login-header p {
  opacity: 0.9;
  font-size: 0.9rem;
}

.login-body {
  padding: 30px;
}

.login-form {
  position: relative;
}

.forgot-password-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.forgot-password-link:hover {
  color: var(--secondary);
  text-decoration: underline;
}

.input-group {
  display: flex;
  align-items: center;
  border: 2px solid #e1e5eb;
  border-radius: 12px;
  overflow: hidden;
  transition: var(--transition);
  background: #f8f9fa;
}

.input-group:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.1);
  background: white;
}

.input-group-text {
  background: #f8f9fa;
  border: none;
  padding: 0 15px;
  font-size: 1.1rem;
  color: #6c757d;
}

.input-group .form-control {
  border: none;
  background: transparent;
  padding: 14px 15px;
}

.input-group .form-control:focus {
  box-shadow: none;
}

.login-decorations {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.decoration-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  animation: float 8s infinite ease-in-out;
}

.decoration-circle:nth-child(1) {
  width: 150px;
  height: 150px;
  top: 10%;
  left: 5%;
  animation-delay: 0s;
}

.decoration-circle:nth-child(2) {
  width: 100px;
  height: 100px;
  top: 70%;
  left: 80%;
  animation-delay: 2s;
}

.decoration-circle:nth-child(3) {
  width: 80px;
  height: 80px;
  top: 40%;
  left: 70%;
  animation-delay: 4s;
}

/* ===========================
   Glassmorphism Login (ERP)
   =========================== */

:root {
  --background: #1a1a2e;
  --color: #ffffff;
  --primary-color: #0f3460;
}

.erp-login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: var(--background);
  color: var(--color);
  letter-spacing: 1px;
  padding: 20px;
  position: relative;
}

.erp-login-box {
  position: relative;
  width: 22.2rem;
  max-width: 100%;
}

.erp-login-box .form-container {
  border: 1px solid hsla(0, 0%, 65%, 0.158);
  box-shadow: 0 0 36px 1px rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  backdrop-filter: blur(20px);
  z-index: 99;
  padding: 2rem;
  position: relative;
}

.erp-login-box .form-container::before {
  content: none;
}

.erp-login-box form input {
  display: block;
  padding: 14px 18px;
  width: 100%;
  margin: 2rem 0;
  color: var(--color);
  outline: none;
  background-color: #9191911f;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-weight: 500;
  letter-spacing: 0.8px;
  font-size: 15px;
  backdrop-filter: blur(15px);
}

.erp-login-box form input::placeholder {
  color: var(--color);
  opacity: 0.6;
}

.erp-login-box form input:focus {
  box-shadow: 0 0 18px 2px rgba(0, 0, 0, 0.35);
}

.erp-login-box form button {
  background-color: var(--primary-color);
  color: var(--color);
  display: block;
  padding: 14px;
  border-radius: 999px;
  outline: none;
  font-size: 18px;
  letter-spacing: 1.5px;
  font-weight: bold;
  width: 100%;
  cursor: pointer;
  margin-top: 0.5rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  transition: all 0.1s ease-in-out;
}

.erp-login-box form button:hover {
  box-shadow: 0 0 10px 1px rgba(0, 0, 0, 0.15);
  transform: scale(1.02);
}

.circle {
  width: 8rem;
  height: 8rem;
  background: var(--primary-color);
  border-radius: 50%;
  position: absolute;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.45);
}

.illustration {
  position: absolute;
  top: -14%;
  right: -2px;
  width: 90%;
}

.circle-one {
  top: 0;
  left: 0;
  z-index: 1;
  transform: translate(-45%, -45%);
}

.circle-two {
  bottom: 0;
  right: 0;
  z-index: 1;
  transform: translate(45%, 45%);
}

.register-forget {
  margin: 1rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.register-forget a {
  color: var(--color);
  text-decoration: none;
}

.register-forget a:hover {
  text-decoration: underline;
}

.forgot-link-wrapper {
  text-align: right;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.forgot-link-wrapper a {
  color: var(--color);
  text-decoration: none;
  letter-spacing: 0.08em;
}

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

.opacity {
  opacity: 0.6;
}

.theme-btn-container {
  position: absolute;
  left: 2rem;
  bottom: 2rem;
  display: flex;
  gap: 10px;
  flex-direction: column;
}

.theme-btn {
  cursor: pointer;
  transition: all 0.3s ease-in;
  border-radius: 5px;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.theme-btn:hover {
  width: 40px !important;
  transform: scale(1.1);
}

.school-title {
  position: absolute;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.8rem;
  font-weight: 700;
  opacity: 0.9;
  text-align: center;
  color: var(--color);
  z-index: 100;
}

.role-selector {
  margin: 0.5rem 0 1.5rem 0;
}

.role-selector select {
  display: block;
  padding: 14px 18px;
  width: 100%;
  color: var(--color);
  outline: none;
  background-color: #9191911f;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-weight: 500;
  letter-spacing: 0.8px;
  font-size: 15px;
  backdrop-filter: blur(15px);
  cursor: pointer;
  font-family: "Poppins", sans-serif;
}

.role-selector select option {
  background-color: var(--background);
  color: var(--color);
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-20px) rotate(180deg);
  }
}

.logo {
  text-align: center;
  margin-bottom: 2rem;
}

.logo img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.2);
}

.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #333;
}

.form-control {
  width: 100%;
  padding: 14px 20px;
  border: 2px solid #e1e5eb;
  border-radius: 12px;
  font-size: 16px;
  transition: var(--transition);
  background: #f8f9fa;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.1);
  background: white;
  outline: none;
}

.btn {
  display: inline-block;
  padding: 14px 28px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  text-decoration: none;
}

.btn-login {
  background: linear-gradient(to right, var(--primary), var(--secondary));
  color: white;
  width: 100%;
  box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
}

.btn-login:active {
  transform: translateY(0);
}

.form-check {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.form-check-input {
  margin-right: 10px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

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

.text-decoration-none {
  text-decoration: none;
}

.text-decoration-none:hover {
  text-decoration: underline;
}

.alert {
  padding: 15px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-weight: 500;
  animation: slideIn 0.3s ease-out;
  display: flex;
  align-items: center;
  gap: 10px;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.alert i {
  font-size: 1.2rem;
}

.alert-danger {
  background: #ffebee;
  border: 1px solid #ffcdd2;
  color: #c62828;
}

.alert-success {
  background: #e8f5e9;
  border: 1px solid #c8e6c9;
  color: #2e7d32;
}

.alert-info {
  background: #e3f2fd;
  border: 1px solid #bbdefb;
  color: #1565c0;
}

.alert-warning {
  background: #fff8e1;
  border: 1px solid #ffecb3;
  color: #f57f17;
}

/* Alert styles for ERP login pages (dark theme) */
.erp-login-container .alert {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--color);
  backdrop-filter: blur(10px);
  padding: 12px 15px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 1rem;
}

.erp-login-container .alert-danger {
  background: rgba(230, 57, 70, 0.2);
  border-color: rgba(230, 57, 70, 0.5);
  color: #ff6b7a;
}

.erp-login-container .alert-success {
  background: rgba(76, 201, 240, 0.2);
  border-color: rgba(76, 201, 240, 0.5);
  color: #6dd5fa;
}

.erp-login-container .alert-info {
  background: rgba(67, 97, 238, 0.2);
  border-color: rgba(67, 97, 238, 0.5);
  color: #7c9eff;
}

.erp-login-container .alert-warning {
  background: rgba(247, 37, 133, 0.2);
  border-color: rgba(247, 37, 133, 0.5);
  color: #ff6bb5;
}

/* Sidebar Styles */
.sidebar {
  height: 100vh;
  position: fixed;
  background: var(--sidebar-bg);
  color: white;
  overflow-y: auto;
  box-shadow: 3px 0 15px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: var(--transition);
  width: 260px;
}

.sidebar-brand {
  padding: 25px 20px;
  background: rgba(255, 255, 255, 0.05);
  margin-bottom: 20px;
}

.sidebar-brand h3 {
  color: white;
  font-weight: 600;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
}

.sidebar-brand h3 i {
  margin-right: 10px;
  color: var(--success);
}

.nav {
  padding: 0 15px;
}

.nav-item {
  margin-bottom: 5px;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  color: rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  transition: var(--transition);
  font-weight: 500;
  margin-bottom: 5px;
}

.nav-link i {
  margin-right: 15px;
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
}

.nav-link:hover,
.nav-link.active {
  color: white;
  background: var(--sidebar-hover);
  transform: none !important;
}

.nav-link.active {
  background: linear-gradient(to right, var(--primary), var(--secondary));
  box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

/* Main Content */
.main-content {
  margin-left: 260px;
  transition: var(--transition);
  padding: 20px;
  min-height: 100vh;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 600;
  color: #333;
}

.breadcrumb {
  background: transparent;
  padding: 0;
  margin: 0;
}

.breadcrumb-item a {
  color: var(--primary);
  text-decoration: none;
}

.breadcrumb-item.active {
  color: #6c757d;
}

/* Stat Cards */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  border-radius: 15px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: var(--transition);
  border: none;
  position: relative;
  z-index: 1;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.1));
  z-index: -1;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.stat-card.bg-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.stat-card.bg-success {
  background: linear-gradient(135deg, #4cc9f0, #4895ef);
}

.stat-card.bg-warning {
  background: linear-gradient(135deg, #f72585, #b5179e);
}

.stat-card.bg-info {
  background: linear-gradient(135deg, #4361ee, #3a0ca3);
}

.stat-card .card-body {
  padding: 25px;
}

.stat-card .d-flex {
  align-items: center;
}

.stat-card .stat-icon {
  width: 70px;
  height: 70px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-left: 15px;
}

.stat-card h5 {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 10px;
  opacity: 0.9;
}

.stat-card h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0;
}

/* Cards */
.card {
  border: none;
  border-radius: 15px;
  box-shadow: var(--card-shadow);
  margin-bottom: 25px;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.card-header {
  background: white;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 20px 25px;
  border-radius: 15px 15px 0 0 !important;
}

.card-header h5 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  color: #333;
}

.card-body {
  padding: 25px;
}

/* Tables */
.table {
  margin-bottom: 0;
}

.table th {
  font-weight: 600;
  color: #495057;
  border-top: none;
  border-bottom: 2px solid #dee2e6;
}

.table td {
  vertical-align: middle;
  padding: 15px;
}

.table-hover tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

.badge {
  padding: 8px 12px;
  border-radius: 20px;
  font-weight: 500;
  font-size: 0.85rem;
}

.badge.bg-success {
  background: linear-gradient(to right, #4cc9f0, #4895ef) !important;
}

.badge.bg-warning {
  background: linear-gradient(to right, #f72585, #b5179e) !important;
}

.badge.bg-danger {
  background: linear-gradient(to right, #e63946, #d00000) !important;
}

.badge.bg-info {
  background: linear-gradient(to right, #4361ee, #3a0ca3) !important;
}

/* Buttons */
.btn-group .btn {
  margin-right: 5px;
  margin-bottom: 5px;
}

.btn-sm {
  padding: 8px 15px;
  font-size: 0.85rem;
}

.btn-primary {
  background: linear-gradient(to right, var(--primary), var(--secondary));
  border: none;
  box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
}

.btn-success {
  background: linear-gradient(to right, #4cc9f0, #4895ef);
  border: none;
  box-shadow: 0 4px 15px rgba(76, 201, 240, 0.3);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76, 201, 240, 0.4);
}

.btn-warning {
  background: linear-gradient(to right, #f72585, #b5179e);
  border: none;
  box-shadow: 0 4px 15px rgba(247, 37, 133, 0.3);
}

.btn-warning:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(247, 37, 133, 0.4);
}

.btn-info {
  background: linear-gradient(to right, #4361ee, #3a0ca3);
  border: none;
  box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

.btn-info:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
}

.btn-outline-secondary {
  border: 2px solid #e1e5eb;
  color: #6c757d;
}

.btn-outline-secondary:hover {
  background: #f8f9fa;
  border-color: #adb5bd;
}

/* Forms */
.form-control {
  border: 2px solid #e1e5eb;
  padding: 12px 15px;
  border-radius: 10px;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.1);
}

.select2-container--bootstrap4 .select2-selection {
  border: 2px solid #e1e5eb;
  border-radius: 10px;
  height: calc(2.25rem + 4px);
}

/* Footer */
.footer {
  background: #050814;
  color: rgba(255, 255, 255, 0.65);
  padding: 18px 0;
  margin-top: 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
}

.footer-inner {
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-text {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .sidebar {
    width: 80px;
    text-align: center;
  }

  .sidebar .nav-link span {
    display: none;
  }

  .sidebar .nav-link i {
    margin-right: 0;
    font-size: 1.3rem;
  }

  .sidebar-brand h3 span {
    display: none;
  }

  .main-content {
    margin-left: 80px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 260px;
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .stat-cards {
    grid-template-columns: 1fr;
  }

  .login-container {
    margin: 10px;
  }
}

/* Animations */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.slide-up {
  animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Modal Styles */
.modal-content {
  border: none;
  border-radius: 15px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.modal-header {
  background: linear-gradient(to right, var(--primary), var(--secondary));
  color: white;
  border-radius: 15px 15px 0 0 !important;
  border: none;
}

.modal-header .btn-close {
  filter: invert(1);
}

/* List Group */
.list-group-item {
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 10px !important;
  margin-bottom: 10px;
  transition: var(--transition);
}

.list-group-item:hover {
  transform: translateX(5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.list-group-item:first-child,
.list-group-item:last-child {
  border-radius: 10px !important;
}

/* Chart Containers */
.chart-container {
  position: relative;
  height: 300px;
  width: 100%;
}