:root{
  /* Primary School Colors */
  --primary-blue: #1e40af;        /* Deep academic blue */
  --primary-green: #2e3f67;       /* Growth/success green */
  --secondary-blue: #3b82f6;      /* Lighter blue for accents */
  --light-blue: #eff6ff;          /* Very light blue background */
  
  /* Background Colors */
  --bg-main: #f8fafc;             /* Clean main background */
  --bg-card: #ffffff;             /* Pure white cards */
  --bg-sidebar: #1e293b;          /* Professional dark sidebar */
  --bg-header: #0f172a;           /* Deep navy header */
  
  /* Text Colors */
  --text-primary: #0f172a;        /* Dark navy text */
  --text-secondary: #64748b;      /* Muted gray text */
  --text-light: #94a3b8;          /* Light gray text */
  --text-white: #ffffff;          /* White text */
  
  /* Accent Colors */
  --accent-orange: #ea580c;       /* Warm orange for warnings */
  --accent-red: #dc2626;          /* Alert red */
  --accent-yellow: #f59e0b;       /* Academic yellow */
  
  /* Border Colors */
  --border-light: #e2e8f0;        /* Light borders */
  --border-medium: #cbd5e1;       /* Medium borders */
  
  /* Shadow Colors */
  --shadow-light: rgba(15, 23, 42, 0.08);
  --shadow-medium: rgba(15, 23, 42, 0.12);
  --shadow-strong: rgba(15, 23, 42, 0.16);
}

/* ======GLOBAL STYLES===== */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: 'Urbanist', 'Inter', sans-serif;
 background-color: #efefff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text-primary);
  line-height: 1.6;
}



/* =============LOGIN PAGE STARTS============ */


/* School Login Container */
.school-login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.school-login-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 380px;
    text-align: center;
}

/* Logo & Brand */
.school-login-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
    border-radius: 8px;
    object-fit: contain;
}

.school-login-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d2c61;
    margin: 0 0 1.5rem 0;
    line-height: 1.2;
    font-family: 'Poppins', sans-serif;
    letter-spacing: -0.4px;
}

/* Alert */
.school-login-alert {
    background: #fed7d7;
    color: #c53030;
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    border: 1px solid #feb2b2;
}

/* Form Elements */
.school-login-form {
    margin-top: 1.5rem;
}

.school-login-input-group {
    margin-bottom: 1.25rem;
    text-align: left;
    position: relative;
}

.school-login-input-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.school-login-input-group input {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
    background: #fff;
}

.school-login-input-group input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(20%);
    color: #718096;
    cursor: pointer;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: #2d3748;
}

/* Login Button */
.school-login-btn {
    width: 100%;
    padding: 0.875rem;
    background: #4299e1;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.school-login-btn:hover {
    background: #3182ce;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.school-login-btn:active {
    transform: translateY(0);
}

/* Footer Links */
.school-login-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.school-login-forgot {
    color: #4299e1;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.school-login-forgot:hover {
    color: #3182ce;
    text-decoration: underline;
}

/* Branding Section */
.school-login-branding {
    text-align: center;
    margin-top: 2rem;
    padding: 0.75rem 0;
    font-size: 0.8rem;
    color: #0a4c87;
    font-family: Urbanist, sans-serif;
    background: linear-gradient(to bottom, #fdfdff, #f0effd);
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f3ff;
}

.school-login-branding strong {
    font-weight: 600;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .school-login-container {
        padding: 15px 30px;
    }
    
    .school-login-card {
        padding: 1.5rem;
        max-width: 100%;
    }
    
    .school-login-brand {
        font-size: 1.3rem;
    }
    
    .school-login-logo {
        width: 100px;
        height: 100px;
    }
    
    .school-login-input-group input {
        padding: 0.75rem;
    }
    
    .school-login-btn {
        padding: 0.75rem;
    }
}

/* Loading State */
.school-login-btn:disabled {
    background: #a0aec0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Focus States for Accessibility */
.school-login-forgot:focus,
.password-toggle:focus {
    outline: 2px solid #4299e1;
    outline-offset: 2px;
    border-radius: 2px;
}


/* ============HEADER AND SIDEBAR FOR ALL============ */
/* HEADER */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 60px;
  background: linear-gradient(135deg, var(--bg-header) 0%, var(--primary-blue) 100%);
  color: var(--text-white);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  font-family: 'Inter', system-ui, sans-serif;
  z-index: 1000;
  box-shadow: 0 4px 20px var(--shadow-light);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header .logo {
  font-weight: 800;
  font-size: 1.5rem;
  text-decoration: none;
  color: var(--text-white);
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, #ffffff, #e2e8f0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header .user-info {
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0.9;
}

.header a.logout-btn {
  color: var(--text-white);
  background: linear-gradient(135deg, var(--accent-red) 0%, #b91c1c 100%);
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  margin-left: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(10, 194, 255, 0.3);
}

.header a.logout-btn:hover {
  background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.4);
}

@media (max-width: 1024px) {
  .header .user-info{
    display: none;
  }
}



/* LAYOUT */
.layout {
  display: flex;
  margin-top: 60px; /* header height */
  height: calc(100vh - 60px);
}

/* SIDEBAR */
.sidebar {
  width: 250px;
  background: #21243d;
  color: var(--text-white);
  padding-top: 1.5rem;
  font-family: 'Inter', system-ui, sans-serif;
  position: fixed;
  top: 60px;       /* height of header */
  left: 0;
  bottom: 0;
  height: calc(100vh - 60px);
  overflow-y: auto;
  z-index: 999;
  box-shadow: 4px 0 20px var(--shadow-light);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 25px;
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.sidebar nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar nav ul li {
  position: relative;
}

/* Elegant Divider with Glow Effect */
.sidebar nav ul li:not(:last-child)::after {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(90deg, 
              rgba(255, 255, 255, 0.05) 0%, 
              rgba(59, 130, 246, 0.2) 50%, 
              rgba(255, 255, 255, 0.05) 100%);
  margin: 0 1.5rem;
  opacity: 0.7;
}

.sidebar nav ul li a {
  color: #c3c6de;
  display: flex;
  align-items: center;
  padding: 0.7rem 1.5rem;
  text-decoration: none;
  font-weight: 400;
  font-size: 0.83rem;
  border-left: 3px solid transparent;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
  letter-spacing: -0.1px;
  font-family: 'Inter', sans-serif;
  
}

/* Hover Effect - Gradient Background Slide */
.sidebar nav ul li a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
              rgba(59, 130, 246, 0.15) 0%, 
              rgba(59, 130, 246, 0.15) 100%);
  transition: all 0.4s ease;
  z-index: -1;
}

/* Active/Hover States */
.sidebar nav ul li a:hover,
.sidebar nav ul li a.active {
  color: rgb(240, 243, 255);
  border-left-color: #3b82f6;
  transform: translateX(4px);
  background-color: #001a33;
}

.sidebar nav ul li a:hover::before,
.sidebar nav ul li a.active::before {
  left: 0;
}

/* Icon Styling with Pulse Effect */
.sidebar nav ul li a i {
  margin-right: 0.75rem;
  transition: all 0.3s ease;
  color: #7450b7;
  font-size: 1rem;
}

.sidebar nav ul li a:hover i,
.sidebar nav ul li a.active i {
  transform: scale(1.15);
  color: #3b82f6;
  text-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

/* Current Page Indicator */
.sidebar nav ul li a.active {
  background: linear-gradient(90deg, 
              rgba(30, 64, 175, 0.25) 0%, 
              rgba(46, 60, 106, 0.15) 100%);
  font-weight: 400;
}

/* Ripple Effect on Click */
.sidebar nav ul li a:active::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(60, 59, 92, 0.4);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%, -50%);
  transform-origin: 50% 50%;
  animation: ripple 0.6s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0) translate(-50%, -50%);
    opacity: 1;
  }
  100% {
    transform: scale(20, 20) translate(-50%, -50%);
    opacity: 0;
  }
}

/* Subtle Glow Effect on Active/Hover */
.sidebar nav ul li a.active,
.sidebar nav ul li a:hover {
  box-shadow: inset 2px 0 10px rgba(59, 130, 246, 0.2);
}

/* Tooltip for truncated items */
.sidebar nav ul li a span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.3s ease;
}

.sidebar nav ul li a:hover span {
  overflow: visible;
}
/* Hide toggle button on desktop */
/* Make sure the parent is positioned relative */
.header {  /* or whatever container holds the toggle */
  position: fixed;
}

/* Sidebar toggle button */
/* Default: hide toggle (desktop) */
.sidebar-toggle {
  display: none;
  font-size: 1.8rem;
  background: none;
  border: none;
  color: var(--text-white);
  cursor: pointer;
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  
}


.sidebar-toggle .bar {
  pointer-events: none; /* ensures click goes to button */
}


/* NEW TOGGLE */
.sidebar-toggle {
  position: absolute;
  top: 50%;        /* vertically center */
  right: 1rem;     /* same distance from right edge */
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  width: 26px;
  height: 28px;
  padding: 0;
  z-index: 1000;   /* on top */
}


.sidebar-toggle .bar {
  display: block;
  width: 100%;
  height: 3px;      /* thickness of each line */
  margin: 4px 0;    /* spacing between lines */
  background-color: #e7e6fa;
  border-radius: 2px;
  pointer-events: none;
  transition: all 0.3s ease;
}

/* Show toggle only on small screens */
@media (max-width: 1024px) {
  .sidebar-toggle {
    display: block;
  }
}



/* Show toggle button on mobile */
@media (max-width: 900px) {
  .sidebar-toggle {
    display: inline-block;
  }

  /* Sidebar hidden off-screen by default */
  .sidebar {
    position: fixed;
    top: 60px;  /* header height */
    left: -240px;
    width: 240px;
    height: calc(100vh - 60px);
  background: #273357;
    transition: left 0.3s ease;
    z-index: 9999;
  }

  /* Sidebar visible when 'open' class is added */
  .sidebar.open {
    left: 0;
  }

  /* Optional overlay when sidebar is open */
  body.sidebar-open::before {
    content: '';
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 9998;
  }

  body.sidebar-open {
    overflow: hidden;
  }

  /* Remove sidebar margin from main content on mobile */
  .main-content {
    margin-left: 0 !important;
    padding: 20px 15px;
  }
}


/* Hide mobile logout by default */
.logout-btn-mobile {
  display: none;
  color: rgb(239, 236, 255);
  text-decoration: none;
  font-weight: bold;
  font-size: 0.86rem;
  position: absolute;
  font-weight: 400;
  top: 50%;
  right: 4rem; /* adjust to sit near sidebar toggle */
  transform: translateY(-50%);
  margin-left: -10px;
}

/* Show on mobile screens */
@media (max-width: 1024px) {
  .logout-btn-mobile {
    display: block;
  }

  /* Optionally hide the desktop logout */
  .user-info .logout-btn {
    display: none;
  }

  /* Sidebar toggle adjustments if needed */
  .sidebar-toggle {
    display: block;
  }

.logout-btn-mobile i {
  margin-right: 0px;  /* space between icon and text */
}


}



/* MAIN CONTENT */
.main-content {
  margin-left: 240px;               /* Clear the sidebar */
  padding: 2rem 3rem;               /* Generous padding */
  background: #062144;
  overflow-y: auto;
  width: calc(100vw - 240px);      /* Full viewport width minus sidebar */
  min-height: calc(100vh - 60px);  /* Full viewport height minus header */
  box-sizing: border-box;           /* Include padding in width */
}

/* Add some nice styling for content cards in main area */
.content-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 16px var(--shadow-light);
  border: 1px solid var(--border-light);
  transition: all 0.3s ease;
}

.content-card:hover {
  box-shadow: 0 8px 24px var(--shadow-medium);
  transform: translateY(-2px);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .layout {
    margin-top: 60px;
  }
  
  .main-content {
    margin-left: 0; /* Reset margin on small screens */
    width: 100vw;
    padding: 1rem;
  }
  
  .header {
    padding: 0 1rem;
  }
  
  .login-container {
    padding: 1rem;
  }
  
  .login-card {
    padding: 2rem;
  }
}


/* ===UNIVERSAL H3 HEADER */
.section-header {
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 1.1rem;
  color: #4b3f62;
  margin: 1.5rem 0 1rem;
  padding-bottom: 0.3rem;
  position: relative;
  letter-spacing: -0.7px;
  margin-top: 50px;
}

/* Full width line below the header */
.section-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #e3e6f7;  /* light subtle line */
  border-radius: 1px;
}



/* ==========DASHBOARDS========== */


.main-content {
  padding: 2rem;
  background-color: #efefff; /* light background */
  min-height: calc(100vh - 60px); /* adjust based on header height */
  font-family: 'Inter', 'Poppins', sans-serif;
}

.main-content h1 {
  font-size: 1.6rem;
  font-weight: 600;
  color: #464159;
  margin-bottom: 1rem;
  font-family: 'Poppins', sans-serif;
  letter-spacing: -0.7px;
}

.main-content p {
  font-size: 1rem;
  color: #555;
  line-height: 1.6;
  margin-top: -10px;
  font-family: 'Urbanist', sans-serif;
  font-weight: 400;
  letter-spacing: 0.1px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .main-content {
    padding: 10px;
  }

  .main-content h1 {
    font-size: 1.1rem;
  }

.main-content p {
  font-size: 0.8rem;
margin-top: -10px;
}

}


@media (max-width:480px) {
  .login-card, .dashboard-container {
    padding:1.25rem;
    border-radius:10px;
  }
  

  
  input[type="text"], 
  input[type="password"] {
    padding:0.875rem;
    font-size:0.9375rem;
  }
  
  button.primary {
    padding:0.875rem;
    font-size:0.9375rem;
  }
  
  .dashboard-container p {
    font-size:0.9375rem;
  }
  
  .login-footer, .alert {
    font-size:0.75rem;
  }
}

/* Animation for better UX */
@keyframes fadeIn {
  from { opacity:0; transform:translateY(10px); }
  to { opacity:1; transform:translateY(0); }
}

.login-card, .dashboard-container {
  animation:fadeIn 0.4s ease-out forwards;
}




/*======= PAGE HEADER FOR EVERY ======*/
#page-title {
  font-size: 1rem;       /* Large, bold text */
  font-weight: 400;        /* Extra bold */
  color: #5679e1;             /* Dark gray/black */
  margin-bottom: 20px;     
  font-family: 'Poppins', sans-serif;
  text-align: left;      /* Center align (optional) */
  text-transform: capitalize; /* Capitalize each word */
  letter-spacing: -1px;     /* Slight spacing between letters */
}



/* ==========ADD STUDENT PAGE START============ */
/* Form Container */
.form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* Form Section Groups */
.form-section-group {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.form-section-group:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.form-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
}

.form-section-title::before {
    content: "";
    width: 4px;
    height: 18px;
    background: #3498db;
    border-radius: 2px;
    margin-right: 8px;
}

.form-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #ddd, transparent);
    margin: 16px 0 24px 0;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.form-label {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.form-input,
.form-select {
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #fff;
    width: 100%;
    box-sizing: border-box;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-input::placeholder {
    color: #a0a0a0;
}

/* Switch Toggle */
.form-switch-group {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

.form-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.form-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #27ae60;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Student Login Fields */
#student-login-fields {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
    margin-top: 16px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Datalist Styling */
datalist {
    max-height: 200px;
    overflow-y: auto;
}

#parent-list option {
    padding: 8px 12px;
    cursor: pointer;
}

/* Small Text */
small {
    color: #6c757d;
    font-size: 0.8rem;
    margin-top: 4px;
    display: block;
    line-height: 1.4;
}

/* Submit Button */
.form-button {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-button:hover {
    background: linear-gradient(135deg, #2980b9, #2573a7);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.form-button:active {
    transform: translateY(0);
}

/* File Input Styling */
.form-input[type="file"] {
    padding: 10px;
    border: 2px dashed #e1e5e9;
    background: #fafbfc;
}

.form-input[type="file"]:focus {
    border-color: #3498db;
    background: #f8fbff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-container {
        padding: 16px;
        margin: 10px;
        border-radius: 8px;
    }
    
    .form-section-group {
        padding: 16px;
        margin-bottom: 20px;
    }
    
    .form-section-title {
        font-size: 1.1rem;
    }
    
    .form-input,
    .form-select {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .form-switch-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .form-button {
        padding: 12px 16px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .form-container {
        padding: 12px;
        margin: 5px;
    }
    
    .form-section-group {
        padding: 12px;
    }
    
    .form-section-title {
        font-size: 1rem;
    }
    
    .form-group {
        margin-bottom: 16px;
    }
    
    .form-input,
    .form-select {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
}

/* Loading State */
.form-button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Success State */
.form-input:valid {
    border-color: #e1e5e9;
}

.form-input:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #e74c3c;
}

/* Animation for dynamic content */
#student-login-fields,
#existing-parent-search + small {
    transition: all 0.3s ease;
}

/* =============HEADER FOR ALL PAGES========= */
#page-title {
  font-size: 1.2rem;
  font-weight: 500;
  color: #24315a;
  margin: 0 0 1.5rem 0;
  padding-bottom: 0.75rem;
  font-family: 'Poppins', sans-serif;
  position: relative;
}

#page-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(36,49,90,0.3) 0%, rgba(36,49,90,0.1) 100%);
}



/* ===========MANAGE CLASSES PAGE STARTS============ */

/* Table styles */
table {
  width: 90%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  position: relative;
}

/* Faint column dividers */
table td:not(:last-child) {
  border-right: 1px solid rgba(0, 0, 0, 0.03);
}

/* Header styling */
table th {
  background: linear-gradient(to right, #1e40af, #1e3a8a);
  color: white;
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.8rem 1rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

/* Cell styling */
table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
  font-size: 0.87rem;
  color: #4c535f;
  font-family: 'Urbanist', sans-serif;
  font-weight: 500;
}

/* Hover effects */
table tbody tr:hover td {
  background: rgba(239, 246, 255, 0.5);
  transform: scale(1.002);
  box-shadow: 0 2px 8px rgba(30, 64, 175, 0.1);
}

/* Alternate row coloring */
table tbody tr:nth-child(even) {
  background-color: rgba(248, 250, 252, 0.5);
}


/* Force table cell content to the right */
td[data-label="Actions"] {
  text-align: right;
}

/* Action buttons container */
.action-buttons {
  display: inline-flex;
  gap: 0.4rem;
}

/* Base style for buttons */
.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #f1f5f9;
  text-decoration: none;
  transition: all 0.25s ease-in-out;
}

/* Icon styles */
.action-btn i {
  font-size: 14px;
  color: white;
}

/* Colors */
.view-btn { background-color: #7ca1d9; }
.edit-btn { background-color: #8358ac; }
.delete-btn { background-color: #ee5e6c; }

/* Hover effects */
.view-btn:hover { background-color: #0b5ed7; }
.edit-btn:hover { background-color: #240d43; }
.delete-btn:hover { background-color: #bb2d3b; }





/* Faint glow effect on header */
table th::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(to right, 
              rgba(30, 64, 175, 0.2), 
              rgba(30, 64, 175, 0.1));
  z-index: 1;
}

/* Subtle border radius for first/last cells */
table tr:first-child th:first-child {
  border-top-left-radius: 8px;
}
table tr:first-child th:last-child {
  border-top-right-radius: 8px;
}
table tr:last-child td:first-child {
  border-bottom-left-radius: 8px;
}
table tr:last-child td:last-child {
  border-bottom-right-radius: 8px;
}

/* mobile */
/* Mobile responsive table with headers shown inside each cell */

@media (max-width: 768px) {
  table, thead, tbody, th, td, tr {
    display: block;
    width: 100%;
  }

  thead tr {
    display: none; /* Hide the original table header */
  }

  tbody tr {
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
  }

  tbody td {
    position: relative;
    padding-left: 50%;
    text-align: right; /* Align text/icons to the right */
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: flex-end; /* Push content to the far right */
    align-items: center; /* Vertically center content */
  }

  tbody td:last-child {
    border-bottom: 0;
  }

  tbody td::before {
    content: attr(data-label);
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 600;
    color: #3a3071;
    white-space: nowrap;
    text-align: left; /* Keep label on left */
  }
}

@media (max-width: 768px) {
  .action-buttons {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: flex-start; /* or flex-end if you want them to the right */
    gap: 0.6rem;
    margin-top: 0.5rem; /* space above button row */
  }

  .action-btn {
    margin: 0.2rem; /* extra breathing room per button */
  }
}

/* DELETE MODAL FOR TABLE */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(2px);
  animation: fadeIn 0.2s ease-out;
}

.modal-content {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  max-width: 380px;
  width: 90%;
  text-align: center;
  font-family: 'Inter', sans-serif;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  transform: scale(0.98);
  animation: scaleUp 0.2s ease-out forwards;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 1rem;
}

.modal-message {
  font-size: 0.9rem;
  color: #4a4a4a;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.modal-buttons {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.modal-buttons button {
  padding: 0.65rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  border-radius: 6px;
  transition: all 0.2s ease;
  flex: 1;
  max-width: 120px;
}

.confirm-btn {
  background-color: #dc3545;
  color: white;
}

.confirm-btn:hover {
  background-color: #c82333;
  transform: translateY(-1px);
}

.cancel-btn {
  background-color: #f0f0f0;
  color: #333;
}

.cancel-btn:hover {
  background-color: #e0e0e0;
  transform: translateY(-1px);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleUp {
  from { transform: scale(0.95); }
  to { transform: scale(1); }
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .modal-content {
    padding: 1.25rem;
    border-radius: 10px;
  }
  
  .modal-title {
    font-size: 1.1rem;
  }
  
  .modal-message {
    font-size: 0.85rem;
  }
  
  .modal-buttons button {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }
}

/* ADD CLASS FORM */

#add-class-new-form {
  max-width: 700px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 2rem;
  padding: 1rem;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #e3e6f7;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

#add-class-new-form .form-group {
  display: flex;
  flex-direction: column;
}

#add-class-new-form .form-label {
  font-weight: 600;
  color: #0b57a3;
  margin-bottom: 0.3rem;
  font-size: 0.85rem;
}

#add-class-new-form .form-input {
  height: 38px;
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background-color: #f8fafc;
  font-family: inherit;
}

#add-class-new-form .form-input:focus {
  outline: none;
  border-color: #005fcc;
  box-shadow: 0 0 0 2px rgba(0,95,204,0.1);
}

/* Button styling inside this form */
#add-class-new-form .form-button-wrapper {
  grid-column: 1 / -1; /* make button span both columns */
  justify-self: center;
}

#add-class-new-form .form-button {
  width: auto;
  padding: 0.4rem 2rem;
  font-size: 0.85rem;
  height: 38px;
  border-radius: 6px;
  border: none;
  background-color: #005fcc;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

#add-class-new-form .form-button:hover {
  background-color: #062144;
}

/* Mobile optimization */
@media (max-width: 639px) {
  #add-class-new-form {
    grid-template-columns: 1fr;
  }
  #add-class-new-form .form-button-wrapper {
    justify-self: stretch;
  }
  #add-class-new-form .form-button {
    width: 100%;
  }
}

/* Form header */
/* Heading inside the form */
.form-container h2 {
  font-size: 1.2rem;
  font-weight: 500;
  color: #33275a;
  margin-bottom: 25px;
  text-align: left;
  letter-spacing: -0.7px;
  font-family: 'Poppins', sans-serif;
  padding-bottom: 6px;
  border-bottom: 1.5px solid rgba(51, 39, 90, 0.2); /* faint neat underline */
}



/* ADD CLASS FORM*/

.class-teacher-section {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.5rem;
  max-width: 1100px;
}

/* Columns */
.left-column,
.right-column {
  flex: 1;
  border: 1px solid #e0e0e0;
  padding: 1.25rem;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

.left-column:hover,
.right-column:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Headings */
.class-teacher-section h3 {
  margin-top: 0;
  margin-bottom: 1.2rem;
  font-size: 1rem !important;
  color: #2c214f;
  font-weight: 600;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #f0f0f0;
  font-family: 'Poppins',sans-serif !important;
  letter-spacing: -0.3px;

}

/* Form Styles */
.class-teacher-section form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.85rem;
  color: #555;
  font-weight: 500;
  letter-spacing: -0.4px;
}

.form-group label sup {
  color: #e74c3c;
}

.class-teacher-section input,
.class-teacher-section select {
  padding: 0.6rem 0.8rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.class-teacher-section input:focus,
.class-teacher-section select:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Button Styles */
.btn-primary678 {
  background-color: #042135;
  color: white;
  border: none;
  padding: 0.65rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary:hover {
  background-color: #2980b9;
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Select Dropdown Arrow */
.class-teacher-section select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .class-teacher-section {
    flex-direction: column;
    gap: 1rem;
  }
  
  .left-column,
  .right-column {
    width: 100%;
  }
  
  .class-teacher-section h3 {
    font-size: 1.1rem;
  }
  
  .class-teacher-section input,
  .class-teacher-section select {
    padding: 0.55rem 0.7rem;
    font-size: 0.85rem;
  }
  
  .btn-primary {
    padding: 0.6rem;
    font-size: 0.85rem;
  }
}


/* ===========MANAGE STUDENTS PAGE START============= */

/* ACTION BUTTONS  */

.action-buttons {
  display: inline-flex;
  gap: 0.4rem;
}

/* Base style for buttons */
.action-buttons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.25s ease-in-out;
  color: white;
  font-size: 14px;
}

/* Colors */
.btn-view { background-color: #7ca1d9; }
.btn-edit { background-color: #8358ac; }
.btn-activate { background-color: #39165b; }
.btn-deactivate { background-color: #750466; }
.btn-delete { background-color: #ee5e6c; }

/* Hover effects */
.btn-view:hover { background-color: #0b5ed7; }
.btn-edit:hover { background-color: #240d43; }
.btn-delete:hover { background-color: #bb2d3b; }


/* DELETE MODAL */
/* Modal background */
.modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5);
   font-family: 'Inter', sans-serif;
   
}

/* Modal box */
.modal-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 20px;
  border-radius: 8px;
  width: 300px;
  text-align: center;
  position: relative;
  margin-top: 260px;
 
}

/* Close button */
.modal-content .close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 22px;
  cursor: pointer;
}

/* Modal buttons */
.modal-actions {
  margin-top: 20px;
  display: flex;
  justify-content: space-around;
}

.btn-cancel {
  padding: 6px 12px;
  background-color: #ccc;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
}

.btn-cancel:hover {
  background-color: #999;
}

.btn-confirm {
  padding: 6px 12px;
  background-color: #ee5e6c;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-family: 'Inter', sans-serif;
}

.btn-confirm:hover {
  background-color: #bb2d3b;
}

@media (max-width: 639px) {

}


/*Filter + Search Section */

.filter-search-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 28px;
    flex-wrap: wrap;
    max-width: 1100px;
    padding: 16px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.filter-search-section:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.filter-search-form {
    display: flex;
    width: 100%;
    gap: 24px;
    flex-wrap: wrap;
}

/* Filter Columns - Modern Card Style */
.filter-column,
.search-column {
    display: flex;
    flex-direction: column;
    flex: 1 1 220px;
    position: relative;
}

.filter-column label,
.search-column label {
    margin-bottom: 8px;
    font-weight: 500;
    color: #2d3748;
    font-size: 0.9rem;
}

/* Modern Select Input */
.filter-column select {
    padding: 10px 14px;
    font-size: 0.95rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    background-color: #f8fafc;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a5568' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    cursor: pointer;
}

.filter-column select:focus {
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2);
}

/* Modern Search Wrapper */
.search-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f8fafc;
    transition: all 0.3s ease;
}

.search-wrapper:focus-within {
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2);
}

.search-wrapper input {
    border: none;
    flex: 1;
    padding: 10px 14px;
    font-size: 0.95rem;
    background: transparent;
}

.search-wrapper input::placeholder {
    color: #a0aec0;
}

/* Modern Search Button */
.search-button {
    background-color: #4299e1;
    border: none;
    padding: 0 16px;
    height: 100%;
    min-height: 42px;
    cursor: pointer;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.search-button i {
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.search-button:hover {
    background-color: #3182ce;
}

.search-button:hover i {
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 640px) {
    .filter-search-section {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 12px;
    }

    .filter-search-form {
        gap: 16px;
    }

    .filter-column,
    .search-column {
        flex: 1 1 100%;
    }
}


/* EDIT MODAL CSS */
/* Minimal Modal Backdrop */
.edit-student-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(2px);
  overflow-y: auto;
  padding: 1rem;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Compact Modal Content */
.edit-student-modal-content {
  background: white;
  margin: 2rem auto;
  padding: 1.5rem;
  border-radius: 8px;
  width: min(90%, 700px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-10px);
  transition: transform 0.2s ease-out;
}

.edit-student-modal.active .edit-student-modal-content {
  transform: translateY(0);
}

/* Sleek Close Button */
.edit-student-modal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  font-size: 1.4rem;
  color: #999;
  cursor: pointer;
  background: none;
  border: none;
  transition: all 0.15s ease;
}

.edit-student-modal-close:hover {
  color: #ff4444;
  transform: scale(1.1);
}

/* Efficient Form Grid */
.edit-student-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.edit-student-full-width {
  grid-column: 1/-1;
}

/* Compact Form Groups */
.edit-student-form-group {
  margin-bottom: 0.8rem;
}

.edit-student-form-group label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #0b3372;
  letter-spacing: -0.3px;
}

.edit-student-form-group input,
.edit-student-form-group select {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.edit-student-form-group input:focus,
.edit-student-form-group select:focus {
  border-color: #4a90e2;
  box-shadow: 0 0 0 2px rgba(74,144,226,0.1);
  outline: none;
}

/* Minimal Form Actions */
.edit-student-form-actions {
  margin-top: 1.5rem;
  text-align: right;
}

.edit-student-btn-save {
  background: #132c5a !important;
  color: white;
  border: none;
  padding: 0.7rem 1.2rem;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  
}

.edit-student-btn-save:hover {
  background: #3e438e;
  transform: translateY(-1px);
}

/* Mobile Optimization */
@media (max-width: 600px) {
  .edit-student-form-grid {
    grid-template-columns: 1fr;
  }
  
  .edit-student-form-actions {
    text-align: center;
  }
  
  .edit-student-btn-save {
    width: 100%;
  }
}


/* ==========VIEW PARENT PAGE STARTS ===========*/

/* Parent Profile Section - Refined & Compact */
#parent-profile-section-isolated {
  padding: 1.5rem; /* Reduced padding */
  background: #f8fafc;
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  color: #1e293b;
  box-sizing: border-box;
  max-width: 1100px; /* Reduced max-width for a tighter layout */
  margin: 0 auto;
  border-radius: 12px;
  margin-left: 0px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 
              0 2px 4px -1px rgba(0, 0, 0, 0.02);
}

.parent-profile-inner-isolated {
  display: flex;
  gap: 1rem; /* Reduced gap between columns */
  flex-wrap: wrap;
}

/* Columns */
.profile-column-isolated {
  flex: 1 1 calc(33.33% - 0.67rem); /* Adjusted for reduced gap */
  padding: 1rem; /* Reduced padding */
  background: #fff;
  border-radius: 8px; /* Slightly smaller border-radius */
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.profile-column-isolated:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Summary Column */
.summary-column-isolated {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.summary-column-isolated .avatar-isolated {
  font-size: 6rem; /* Smaller icon size */
  text-align: center;
  color: #4c497d;
  margin-bottom: 0.5rem; /* Reduced margin */
  background: #eff6ff;
  width: 110px; /* Smaller avatar size */
  height: 110px; /* Smaller avatar size */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  margin-top: 20px; /* Adjusted top margin */
  margin-left: -50px; /* Adjusted left margin */
  margin-bottom: 16px;
}

.summary-column-isolated .parent-name-isolated {
  text-align: center;
  font-size: 1.1rem; /* Smaller font size */
  font-weight: 600;
  margin-bottom: 0.5rem; /* Reduced margin */
  color: #455a7c;
  font-family: 'Poppins', sans-serif;
  letter-spacing: -0.5px;
  text-transform: none;
  margin-left: -70px; /* Adjusted left margin */
  margin-top: -8px;
}

/* Forms */
.profile-column-isolated form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem; /* Reduced gap */
}

.profile-column-isolated label {
  font-weight: 500;
  font-size: 0.85rem; /* Smaller font size */
  color: #475569;
  margin-bottom: -0.25rem; /* Adjusted margin */
}

.profile-column-isolated input,
.profile-column-isolated select {
  padding: 0.5rem 0.6rem; /* Reduced padding */
  font-size: 0.85rem; /* Smaller font size */
  border-radius: 6px; /* Smaller border-radius */
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  transition: all 0.2s ease;
}

.profile-column-isolated input:focus,
.profile-column-isolated select:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 2px rgba(147, 197, 253, 0.3); /* Adjusted box-shadow */
  background: #fff;
}

/* Buttons */
.save-btn-isolated {
  margin-top: 0.25rem; /* Reduced margin */
  padding: 0.5rem 1rem; /* Reduced padding */
  font-weight: 600;
  border-radius: 6px; /* Smaller border-radius */
  border: none;
  background: #123060;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  font-size: 0.85rem; /* Smaller font size */
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.save-btn-isolated:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.save-btn-isolated:active {
  transform: translateY(0);
}

/* Section Headers */
.section-header-isolated {
  font-size: 1rem; /* Smaller font size */
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.75rem; /* Reduced margin */
  padding-bottom: 0.4rem; /* Reduced padding */
  border-bottom: 1px solid #f1f5f9;
}

/* Compact Parent Info Styling - All Items Accented */
.parent-info-container {
  display: flex;
  flex-direction: column;
  gap: 0.4rem; /* Reduced gap */
  margin-top: 0.75rem; /* Reduced margin */
  width: 100%;
}

.parent-info-item {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  padding: 0.4rem 0.6rem; /* Reduced padding */
  background: #f8fafc;
  border-radius: 5px; /* Smaller border-radius */
  font-size: 0.85rem; /* Smaller font size */
  line-height: 1.3;
  border-left: 2px solid #e2e8f0; /* Subtle border */
  transition: all 0.15s ease;
}

/* Color Accents */
.parent-info-item:nth-child(1) { border-left-color: #3b82f6; } /* Blue */
.parent-info-item:nth-child(2) { border-left-color: #10b981; } /* Green */
.parent-info-item:nth-child(3) { border-left-color: #f59e0b; } /* Amber */

.parent-info-label {
  font-weight: 600;
  color: #27589d;
  margin-right: 0.4rem; /* Reduced margin */
  white-space: nowrap;
}

.parent-info-label::after {
  content: ":";
}

.parent-info-value {
  color: #1e293b;
  font-weight: 500;
  font-size: 0.8rem; /* Even smaller font for value */
}

.parent-info-value:empty::before {
  content: 'N/A';
  color: #94a3b8;
  font-style: italic;
}

/* Target only h3 inside login-info-column-isolated */
.profile-column-isolated h3 {
  font-size: 0.95rem; /* Smaller font size */
  font-weight: 600;
  color: #2b2e8a;
  margin-bottom: 12px; /* Reduced margin */
  padding-bottom: 6px; /* Reduced padding */
  border-bottom: 2px solid #3498db;
  letter-spacing: -0.5px;
  font-family: 'Poppins', sans-serif;
}

.profile-column-isolated.summary-column-isolated h3.parent-name-isolated {
  border-bottom: none !important;
  padding-bottom: 0 !important;
}

/* Optional: small screen adjustments */
@media (max-width: 600px) {
  .profile-column-isolated h3{
    font-size: 1.1rem;
    text-align: left;
    margin-bottom: 12px;
  }
}


/* Hover effect for desktop */
@media (hover: hover) {
  .parent-info-item:hover {
    background: #f1f5f9;
    transform: translateX(2px);
  }
}


/* Mobile Responsiveness */
@media (max-width: 768px) {
  #parent-profile-section-isolated {
    padding: 1.25rem;
    border-radius: 0;
  }
  

.summary-column-isolated .avatar-isolated {
  margin-left: 0px;
}


.summary-column-isolated .parent-name-isolated {
  margin-left: 0px;
  margin-top: -10px;
  font-size: 1.2rem;
  margin-bottom: -9px;
}


  .parent-profile-inner-isolated {
    flex-direction: column;
    gap: 1rem;
  padding: 0;
  }

  .profile-column-isolated {
    flex: 1 1 100%;
    padding: 1.25rem;
    border-radius: 8px;
  }

  .summary-column-isolated .avatar-isolated {
    font-size: 5.5rem;
    width: 110px;
    height: 110px;
    margin-top: 0px;
  }

  .profile-column-isolated form {
    gap: 0.75rem;
  }

  .save-btn-isolated {
    width: 100%;
    padding: 0.75rem;
  }
}


/* ASSOCIATED STUDENTS */
/* Container for the list */
.student-list {
    list-style: none;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    max-width: 1100px;
}

/* Styles for each list item */
.student-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.student-item:first-child {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.student-item:last-child {
    border-bottom: none;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.student-item:hover {
    background-color: #f7f6ff;
    transform: translateX(5px);
}

/* Content of the list item */
.student-item-content {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

/* Image/Icon styling */
.student-image-container {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    margin-right: 15px;
    background-color: #dad8ef;
    border: 2px solid #e0e2f0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.student-image-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.no-image-thumb-placeholder i {
    font-size: 65px;
    color: #adb5bd;
}

/* Text details */
.student-details-compact {
    display: flex;
    flex-direction: column;
    margin-left: 10px;
}

.student-name-compact {
    font-weight: 600;
    font-size: 1rem;
    color: #3b4066;
    margin-bottom: 2px;
    font-family: 'Poppins', sans-serif;
    letter-spacing: -0.4px;
}

.student-info-compact {
    font-size: 0.85rem;
    color: #6c757d;
}

.student-info-compact i {
    margin-right: 5px;
    color: #8385b8;
}

/* Action button on the right */
.view-btn-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: #2a68bf;
    color: #ffffff;
    text-decoration: none;
    transition: background-color 0.2s ease-in-out, transform 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.view-btn-compact:hover {
    background-color: #5752d1;
    transform: scale(1.1);
}

.view-btn-compact i {
    font-size: 0.9rem;
}


/* Mobile Responsiveness */
@media (max-width: 768px) {
.student-image-container {
    width: 65px;
    height: 65px;
  }

.student-details-compact {
    margin-left: 1px;
}

.student-name-compact {
    font-weight: 600;
    font-size: 0.93rem;
}

}


/* ====================MANAGE TEACHER PAGE STARTS HERE============= */

.top-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: 1000PX;
}

.top-section .search-teacher form,
.top-section > div { /* add-teacher wrapper */
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.top-section input[type="text"],
.top-section select,
.top-section input[type="password"] {
  padding: 0.3rem 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
}

.top-section .btn {
  padding: 0.4rem 0.8rem;
  border: none;
  border-radius: 4px;
  background-color: #2c7be5;
  color: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
  font-family: 'Inter', sans-serif;
}

.top-section .btn:hover {
  background-color: #1a5bb8;
}

#addTeacherForm {
  display: none;
  margin-top: 0.5rem;
  border: 1px solid #ccc;
  padding: 0.8rem;
  border-radius: 5px;
  background-color: #f9f9f9;
  width: 300px;
  flex-direction: column;
  gap: 0.5rem;
}

#addTeacherForm form div {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

@media (max-width: 600px) {
  .top-section {
    flex-direction: column;
    align-items: stretch;
  }
  #addTeacherForm {
    width: 100%;
  }
}


/* add teacher modal */
/* Modal background */
.modal {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 999;
}

/* Modal content */
.modal-content {
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  max-width: 400px;
  width: 100%;
  position: relative;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Close button (X) */
.close-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  cursor: pointer;
  font-size: 1.2rem;
}

/* Form elements */
.modal-content form div {
  margin-bottom: 0.75rem;
}

.modal-content label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.modal-content input,
.modal-content select {
  width: 100%;
  padding: 0.4rem 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* Buttons container */
.modal-content .modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 30px;
}

/* Add button */
.modal-content .btn-primary {
  background-color: #163e8f;
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  min-width: 50% !important;
}

.modal-content .btn-primary:hover {
  background-color: #1d1b32;
}

/* Cancel button */
.modal-content .btn-cancel {
  background-color: #ccc;
  color: #333;
  border: none;
  padding: 2px 1rem !important;
  border-radius: 4px;
  cursor: pointer;
   font-family: 'Inter', sans-serif;

}

.modal-content .btn-cancel:hover {
  background-color: #bbb;
}



/* ================MANAGE TEACHERS PAGE================= */
/* Section wrapper */
.teachers-section {
  padding: 1.5rem 0;
  background-color: #ffffff;
  max-width: 1100px;
  margin: 0 auto;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
  margin-left: 0;
}

/* Inner container to center content */
.inner-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Row with 2 columns */
.teachers-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  position: relative;
}

/* Vertical divider between columns */
.teachers-row::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 10%;
  bottom: 10%;
  width: 1px;
  background: linear-gradient(to bottom, 
              transparent 0%, 
              #e2e8f0 20%, 
              #e2e8f0 80%, 
              transparent 100%);
  transform: translateX(-50%);
  transition: all 0.3s ease;
  opacity: 0.8;
}

/* Each column */
.teachers-col {
  flex: 1;
  min-width: 250px;
  position: relative;
}

/* Right column alignment */
.teachers-col.text-right {
  text-align: right;
}

/* Search form styling */
.search-form {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* Search input wrapper */
.search-input-wrapper {
  position: relative;
  flex: 1;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  transition: all 0.3s ease;
}

/* Search input */
.search-form input[type="text"] {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background-color: #f8fafc;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.search-form input[type="text"]:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background-color: #fff;
}

.search-form input[type="text"]:focus + .search-icon {
  fill: #2563eb;
}

/* Buttons */
.btn {
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.add-teacher-btn {
  background-color: #2563eb;
  color: #fff;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.add-teacher-btn:hover {
  background-color: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(37, 99, 235, 0.3);
}

.search-btn {
  background-color: #4b5563;
  color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-btn:hover {
  background-color: #374151;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

/* Responsive: stack columns on small screens */
@media (max-width: 768px) {
  .teachers-row {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
  }
  
  .teachers-row::before {
    content: "";
    position: absolute;
    left: 10%;
    right: 10%;
    top: 50%;
    height: 1px;
    width: auto;
    background: linear-gradient(to right, 
                transparent 0%, 
                #e2e8f0 20%, 
                #e2e8f0 80%, 
                transparent 100%);
    transform: translateY(-50%);
  }
  
  .teachers-col, 
  .teachers-col.text-right {
    width: 100%;
    text-align: left;
    padding: 1rem 0;
  }
  
  .search-form {
    width: 100%;
  }
  
  .teachers-col:first-child {
    padding-bottom: 1.5rem;
  }
  
  .teachers-col:last-child {
    padding-top: 1.5rem;
  }
}



/* Container for the entire section *
/* Teachers List Section */
.teachers-list-container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 15px;
    margin-left: 0px;
}

.teachers-list-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 20px;
}

.card-header h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2c3e50;
    font-family: 'Poppins', sans-serif;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 8px;
    letter-spacing: -0.6px;
}

/* List Item */
.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 12px 15px;
    margin-bottom: 12px;
    transition: box-shadow 0.3s ease;
}

.list-item:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

/* Profile + Name */
.list-item-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #f0f0f0;
    overflow: hidden;
}

.profile-pic-sm {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.teacher-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.teacher-name {
    font-weight: 600;
    font-size: 1rem;
    color: #2c3e50;
}

.teacher-username {
    font-size: 0.85rem;
    color: #7f8c8d;
}

/* Details */
.list-item-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.85rem;
    color: #44456b;
}

.detail-item strong {
    font-weight: 600;
    margin-right: 5px;
}

/* Actions */
.list-item-actions {
    display: flex;
    gap: 10px;
}



.no-teachers-found {
    text-align: center;
    color: #888;
    font-size: 1rem;
    padding: 20px 0;
}

/* ================= MOBILE STYLING ================= */
@media (max-width: 768px) {
    .list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .list-item-details {
        width: 100%;
        display: flex;
        justify-content: space-between;
        flex-wrap: wrap;
        font-size: 0.85rem;
    }

    .list-item-actions {
        align-self: flex-end;
    }

    .card-header h2 {
        font-size: 1.2rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .teacher-name {
        font-size: 0.95rem;
    }

    .teacher-username {
        font-size: 0.8rem;
    }

    .list-item-details {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* ==================VIEW TEACHER========== */
/* General Layout for Forms & Cards */
.profile-forms-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Shared Card Styling */
.profile-form-card,
.profile-card {
    background: linear-gradient(135deg, #ffffff 0%, #f5f7fa 100%);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
    position: relative;
    width: 100%;
    max-width: 350px;
    overflow: hidden;
}

/* Top Border Accent */
.profile-form-card::before,
.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #4b6cb7 0%, #182848 100%);
}

/* Hover Lift Effect */
.profile-form-card:hover,
.profile-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
}

/* Avatar Styling */
.profile-avatar {
    width: 130px;
    height: 130px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #4b6cb7 0%, #182848 100%);
    color: white;
    font-size: 120px;
    box-shadow: 0 4px 12px rgba(75, 108, 183, 0.4);
    transition: all 0.3s ease;
    margin-top: 30px;
}


/* Container for the profile image or icon */



.profile-card:hover .profile-avatar {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(75, 108, 183, 0.5);
}

/* Text Styling */
.profile-form-card h3,
.profile-card h3 {
    margin: 0 0 8px;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
}


.profile-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.profile-info .info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    background: #f0f4ff; /* soft blue background */
    border-radius: 10px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.profile-info .info-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.12);
}

.profile-info .label {
    font-weight: 600;
    color: #4b6cb7; /* primary accent color */
    font-family: 'Urbanist',sans-serif;
    font-size: 0.9rem;
}

.profile-info .value {
    color: #2c3e50;
    font-size: 0.9rem;
}



/* Mobile */
@media (max-width: 768px) {
    .profile-info {
        gap: 8px;
    }
    .profile-info .info-item {
        padding: 8px 12px;
        font-size: 14px;
    }
}


/* Simple Pulse Animation (only for summary card if needed) */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}
.profile-card {
    animation: pulse 5s infinite;
}
.profile-card:hover {
    animation: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .profile-forms-container {
        flex-direction: column;
        align-items: center;
    }
    .profile-form-card,
    .profile-card {
        max-width: 90%;
    }
    .profile-avatar {
        width: 100px;
        height: 100px;
        font-size: 80px;
    }
    .profile-form-card h3,
    .profile-card h3 {
        font-size: 1rem;
    }
    .profile-form-card p,
    .profile-card p {
        font-size: 13px;
    }
}


/* ASSIGNED SUBJECTS */
/* Scoped under teacher-classes-section to avoid collisions */
#teacher-classes-section .main-container {
    background-color: #f0f2f5;
    padding: 20px;
    border-radius: 10px;
    box-shadow: inset 0 0 8px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
    max-width: 1110px;
}

/* Subtle background animation */
#teacher-classes-section .main-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #625b9d, #9685dd, #2f3b68);
    background-size: 200% 100%;
    animation: shimmer 8s ease infinite;
    z-index: 1;
    border-radius: 10px 10px 0 0;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

#teacher-classes-section .inner-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    position: relative;
    z-index: 2;
}

#teacher-classes-section .subject-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
    transition: all 0.3s cubic-bezier(0.25,0.8,0.25,1);
}

#teacher-classes-section .subject-card:nth-child(1) { animation-delay: 0.1s; }
#teacher-classes-section .subject-card:nth-child(2) { animation-delay: 0.15s; }
#teacher-classes-section .subject-card:nth-child(3) { animation-delay: 0.2s; }
#teacher-classes-section .subject-card:nth-child(4) { animation-delay: 0.25s; }
#teacher-classes-section .subject-card:nth-child(5) { animation-delay: 0.3s; }
#teacher-classes-section .subject-card:nth-child(6) { animation-delay: 0.35s; }

@keyframes fadeInUp {
    from { opacity:0; transform:translateY(10px);}
    to { opacity:1; transform:translateY(0);}
}

#teacher-classes-section .subject-card::before {
    content:'';
    position:absolute;
    top:0; left:0; right:0;
    height:2px;
    background: linear-gradient(90deg,#6c5ce7,#00cec9);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

#teacher-classes-section .subject-card:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    transform: translateY(-4px);
}

#teacher-classes-section .subject-card:hover::before { transform: scaleX(1); }
#teacher-classes-section .subject-card:active { transform: translateY(-1px) scale(0.99); transition: transform 0.1s ease; }

#teacher-classes-section .subject-header {
    border-bottom: 1px solid #e9ecef;
    padding-bottom:8px;
    margin-bottom:4px;
    position:relative;
}

#teacher-classes-section .subject-title {
    font-size:0.95em;
    font-weight:600;
    color:#374e99;
    position:relative;
    display:inline-block;
    font-family: 'Poppins', sans-serif;
}

#teacher-classes-section .subject-title::after {
    content:'';
    position:absolute;
    bottom:-8px;
    left:0;
    width:0;
    height:2px;
    background:linear-gradient(90deg,#6c5ce7,#00cec9);
    transition: width 0.3s ease;
}

#teacher-classes-section .subject-card:hover .subject-title::after { width:30px; }

#teacher-classes-section .subject-details {
    display:flex;
    justify-content:space-between;
    align-items:center;
    font-size:0.85em;
    color:#6c757d;
    transition: transform 0.2s ease;
}

#teacher-classes-section .subject-card:hover .subject-details { transform:translateX(3px); }

#teacher-classes-section .detail-label { font-weight:500; color:#495057; }
#teacher-classes-section .detail-value { font-weight:600; color:#212529; position:relative; }

#teacher-classes-section .detail-value::after {
    content:'';
    position:absolute;
    bottom:-2px;
    left:0;
    width:0;
    height:1px;
    background-color:#00cec9;
    transition: width 0.3s ease;
}

#teacher-classes-section .subject-card:hover .detail-value::after { width:100%; }

/* Small screen responsiveness */
@media (max-width:780px){
    #teacher-classes-section .inner-container { grid-template-columns:1fr; margin-top:30px; }
    #teacher-classes-section .main-container { padding:0; padding-top:3px; padding-bottom:16px !important; }
    #teacher-classes-section .subject-card { animation-delay:0s !important; }
}


/* Add to your existing style.css */
.teacher-graph-container {
    background-color: #ffffff;
    padding: 2rem;
    margin-top: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    max-width: 1110px;
}

.graph-card {
    position: relative;
    height: 400px;
    width: 100%;
    margin-top: 1rem;
}


/* =======================MANAGE SUBJECT PAGE START======================= */

.subject-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.2rem;
    margin: 0 auto;
    padding: 1.5rem;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    max-width: 1100px;
    margin-left: 0px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #4a5568;
}

input[type="text"],
select {
    padding: 0.65rem 0.8rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background: #f8fafc;
}

/* Dropdown Checkbox Styles */
.dropdown-checkbox {
    position: relative;
    width: 100%;
}

.dropbtn {
    width: 100%;
    padding: 0.65rem 0.8rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    text-align: left;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropbtn::after {
    content: "▼";
    font-size: 0.7rem;
    margin-left: 0.5rem;
    transition: transform 0.2s ease;
}

.dropdown-checkbox.active .dropbtn::after {
    transform: rotate(180deg);
}

.dropdown-content {
    display: none;
    position: absolute;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    padding: 0.5rem;
    margin-top: 0.3rem;
}

.dropdown-checkbox.active .dropdown-content {
    display: block;
}

.dropdown-content label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.1s ease;
    white-space: nowrap;
}

.dropdown-content input[type="checkbox"] {
    margin: 0;
    width: auto;
}

/* Done Button */
.done-btn {
    display: block;
    width: 100%;
    padding: 0.5rem;
    margin-top: 0.5rem;
    background: #4299e1;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.done-btn:hover {
    background: #3182ce;
}

/* Submit Button */
button[type="submit"] {
    grid-column: 1 / -1;
    padding: 0.75rem;
    background: #4299e1;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
 
}

button[type="submit"]:hover {
    background: #3182ce;
}


/* Mobile-optimized CSS only */
@media (max-width: 767px) {
    .subject-form {
        grid-template-columns: 1fr;
        gap: 0.7rem;
        padding: 0.9rem;
        border-radius: 6px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    }

    .form-group {
        gap: 0.25rem;
    }

    label {
        font-size: 0.75rem;
    }

    input[type="text"],
    select,
    .dropbtn {
        padding: 0.55rem 0.7rem;
        font-size: 0.8rem;
        border-radius: 4px;
    }

    .dropdown-content {
        max-height: 45vh;
        padding: 0.3rem;
        margin-top: 0.15rem;
    }

    .dropdown-content label {
        padding: 0.35rem;
        font-size: 0.75rem;
        gap: 0.4rem;
    }

    .done-btn,
    button[type="submit"] {
        padding: 0.65rem;
        font-size: 0.82rem;
        margin-top: 0.2rem;
        border-radius: 4px;
    }

    .dropbtn::after {
        font-size: 0.55rem;
        margin-left: 0.2rem;
    }

    /* Touch optimizations */
    input[type="checkbox"] {
        transform: scale(1.1);
        margin-right: 0.2rem;
    }

    button {
        -webkit-tap-highlight-color: transparent;
    }
}

#add-subject-btn {
    background-color: #236db7;
    color: #fff;
    padding: 9px 12px;
    font-size: 0.9rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    min-width: 170px;
    font-family: 'Inter', sans-serif;
}

/* Desktop only: limit button width */
@media (min-width: 1024px) {
    #add-subject-btn {
        width: auto;
        max-width: 140px;
    }
}

#add-subject-btn:hover {
    background-color: #1C86EE;
}

/* delete modal */

.modal-overlay {
  display: none; /* hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 999;
}

/* Modal box */
.modal-box {
  background: #fff;
  padding: 20px;
  max-width: 400px;
  width: 90%;
  margin: 100px auto;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  animation: slideDown 0.3s ease;
  max-height: 250px;
  margin-top: 250px;
 
}

/* Modal title */
.modal-box h3 {
  margin-bottom: 10px;
  color: #333;
}

/* Modal message text */
.modal-box p {
  color: #555;
  margin-bottom: 20px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
}

/* Modal buttons container */
.modal-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
}

/* Confirm button */
.modal-confirm {
  background: #e74c3c;
  color: white;
  padding: 8px 14px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.2s ease;
  font-family: 'Inter', sans-serif;
}
.modal-confirm:hover {
  background: #c0392b;
}

/* Cancel button */
.modal-cancel {
  background: #7f8c8d;
  color: white;
  padding: 8px 14px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.2s ease;
  font-family: 'Inter', sans-serif;
}
.modal-cancel:hover {
  background: #606060;
}

/* Animation for modal */
@keyframes slideDown {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}


/* EDIT SUBJECT */
/* Edit Subject Modal - Unique Styles */
.edit-subject-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.edit-subject-modal-container {
  background: #fff;
  padding: 2rem;
  width: min(90%, 450px);
  border-radius: 0.5rem;
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
  animation: editSubjectSlideIn 0.3s ease;
}

.edit-subject-modal-title {
  margin: 0 0 1.5rem;
  color: #2c3e50;
  font-size: 1.4rem;
  text-align: center;
}

.edit-subject-form-group {
  margin-bottom: 1.25rem;
}

.edit-subject-form-label {
  display: block;
  margin-bottom: 0.5rem;
  color: #34495e;
  font-weight: 500;
}

.edit-subject-form-input,
.edit-subject-form-select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 0.375rem;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.edit-subject-form-input:focus,
.edit-subject-form-select:focus {
  border-color: #3498db;
  outline: none;
}

.edit-subject-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.edit-subject-modal-cancel {
  background: #95a5a6;
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s;
}


.edit-subject-modal-cancel:hover {
  background: #7f8c8d;
}

.edit-subject-modal-save:hover {
  background: #27ae60;
}

@keyframes editSubjectSlideIn {
  from { 
    opacity: 0;
    transform: translateY(-20px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}


.filter-form {
    background-color: #f7fbff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    max-width: 1100px;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.filter-label {
    font-weight: 600;
    color: #495057;
    min-width: 120px;
}

.filter-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-grow: 1;
}

#class_filter {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: white;
    font-size: 14px;
    color: #495057;
    flex-grow: 1;
    max-width: 300px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#class_filter:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.reset-btn {
    padding: 8px 16px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
    font-family: 'Inter', sans-serif;
}

.reset-btn:hover {
    background-color: #5a6268;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .filter-controls {
        width: 100%;
    }
    
    #class_filter {
        max-width: 100%;
    }
}


/* ===========EXAM PAGE START HERE================ */
/* Container around the form */
.exam-form-container {
  max-width: 1100px;
  margin: 20px auto;
  padding: 10px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  overflow-x: auto;
  margin-left: 0px;
}

/* Form */
#create-exam-form {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 20px;
  flex-wrap: nowrap;
}

/* Each field wrapper */
#create-exam-form .form-field-unique {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;             /* spacing between label and field */
  white-space: nowrap;
}

/* Labels */
#create-exam-form .form-field-unique label {
  font-weight: 600;
  line-height: 1.5;
}

/* Inputs and selects - make them the same height and aligned */
#create-exam-form input,
#create-exam-form select {
  padding: 6px 10px;
  min-width: 140px;
  height: 36px;              /* force same height */
  line-height: 1.2;
  box-sizing: border-box;
  font-size: 14px;
  vertical-align: middle;
}

/* Submit button */
#create-exam-btn.btn-create-exam {
  padding: 10px 20px;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  height: 36px;             /* match input/select height */
  align-self: center;
}

#create-exam-btn.btn-create-exam:hover {
  background: #0056b3;
}

/* Responsive: stack fields on small screens */
@media (max-width: 700px) {
  #create-exam-form {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  #create-exam-form .form-field-unique {
    flex-direction: column;
    align-items: flex-start;
  }

  #create-exam-btn.btn-create-exam {
    align-self: stretch;
  }
}


/* Responsive: stack fields on small screens */
/* Mobile only: stack form fields vertically */
@media (max-width: 768px) {
  #create-exam-form {
    display: flex !important;
    flex-direction: column !important;  /* stack items top to bottom */
    align-items: stretch;
    gap: 15px;
  }

  #create-exam-form .form-field-unique {
    display: flex !important;
    flex-direction: column !important;  /* label above input */
    gap: 6px;
    width: 100%;
    margin-top: -10px !important;
  }

  #create-exam-form input,
  #create-exam-form select,
  #create-exam-btn {
    width: 100% !important;   /* take full width on mobile */
    box-sizing: border-box;
  }
}


/* section with filter and table */
.exam-container {
  display: flex;
  gap: 20px;
  margin-top: 0px;
  max-width: 1100px;
}

.exam-filter {
  flex: 0 0 20%;
  background: #f9f9f9;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.exam-filter h3 {
  margin-bottom: -11px;
  font-size: 18px;
  color: #32385a;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
}

.exam-filter .form-group {
  margin-bottom: 11px;
}

.exam-filter label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
   margin-top: 20px !important;
}

.exam-filter select {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.filter-btn {
  width: 100%;
  padding: 8px;
  background: #007bff;
  border: none;
  color: #fff;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
 
}

.exam-list {
  flex: 0 0 80%;
}

.exam-list table {
  width: 100%;
  border-collapse: collapse;
}

.exam-list th, .exam-list td {
  padding: 10px;
  border-bottom: 1px solid #ddd;
  text-align: left;
}


.exam-container {
  display: flex;
  gap: 20px;
}

/* Mobile only */
@media (max-width: 768px) {
  .exam-container {
    flex-direction: column;
  }

  .exam-filter,
  .exam-list {
    width: 100%;
  }

  .exam-filter form {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .exam-filter .form-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: -6px;
  }

  .exam-filter label {
    margin-bottom: 4px;
    font-weight: 600;
  }

  .exam-filter select,
  .exam-filter .filter-btn {
    width: 100%;
  }

  /* Table scroll on small screens */
  .exam-list table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}


/* delete modal */
/* Exam Delete Modal CSS */
.exam-delete-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.75);
  justify-content: center;
  align-items: center;
}

.exam-delete-modal-content {
  background-color: #fff;
  padding: 25px 30px;
  border-radius: 8px;
  max-width: 450px;
  width: 90%;
  text-align: center;
  position: relative;
  font-size: 0.87rem;
  color: #636778;
}

.exam-delete-modal-close {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
}

.exam-delete-modal-buttons {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 15px;
}

.exam-btn-confirm {
  padding: 8px 20px;
  background-color: #d9534f;
  color: white;
  border-radius: 5px;
  text-decoration: none;
}

.exam-btn-cancel {
  padding: 8px 20px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}




/* ==================RESULTS PAGE START============== */
/* Exam Filter Container */
.exam-filter-container {
  background: #ffffff;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  margin-bottom: 20px;
  max-width: 1010px;
}

/* Form Layout */
.exam-filter-form-unique {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

/* Form Fields */
.exam-filter-field-unique {
  flex: 1;
  min-width: 180px;
}

.exam-filter-form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #444;
 
}

.exam-filter-form-select {
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #fff;
  transition: border-color 0.2s;
}

.exam-filter-form-select:focus {
  border-color: #4a90e2;
  outline: none;
}

/* Button Styles */
.exam-filter-btn-submit-results {
  padding: 8px 18px;
  background-color: #023671;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  height: 36px;
  font-family: 'Inter', sans-serif;
 
}

.exam-filter-btn-submit-results:hover {
  background-color: #3a7bc8;
}

/* Mobile Styles */
@media (max-width: 768px) {
  .exam-filter-form-unique {
    flex-direction: column;
    gap: 15px;
  }
  
  .exam-filter-field-unique {
    width: 100%;
    min-width: 100%;
  }
  
  .exam-filter-btn-submit-results {
    width: 100%;
    padding: 10px;
  }
}

/* Small screens (optional) */
@media (max-width: 480px) {
  .exam-filter-container {
    padding: 12px;
  }
  
  .exam-filter-form-label {
    font-size: 13px;
  }
  
  .exam-filter-form-select {
    padding: 7px 10px;
    font-size: 13px;
  }
}

/* Button container */
.exam-results-loader__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem; /* space between icon and text */
    padding: 0.5rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    background-color: #007bff; /* primary color */
    color: #fff;
    font-family: 'Inter', sans-serif;
}

.exam-results-loader__button:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
}

.exam-results-loader__button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.exam-results-loader__button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.5);
}

/* Icon inside the button */
.exam-results-loader__icon {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

/* Optional: rotate icon when hovering (nice effect for sync icon) */
.exam-results-loader__button:hover .exam-results-loader__icon {
    transform: rotate(360deg);
}

/* Text */
.exam-results-loader__text {
    display: inline-block;
}


@media (max-width: 768px) {
    .exam-results-loader__button {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
        gap: 0.4rem;
    }

    .exam-results-loader__icon {
        font-size: 0.9rem;
    }

    .exam-results-loader__text {
        font-size: 0.9rem;
    }
}



/*================= RESULTS TABLE FOR ADMIN===================== */
/* Desktop Sticky Table Headers - ENHANCED VERSION */
@media (min-width: 769px) {
  .exam-results-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow-x: auto;
    display: block;
  }
  
  .exam-results-table thead,
  .exam-results-table tbody {
    display: block;
  }
  
  /* Sticky student column - UNCHANGED */
  .exam-results-table th:first-child,
  .exam-results-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: white;
    min-width: 180px;
  }
  
  /* ENHANCED: Navy gradient header with perfect alignment */
  .exam-results-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: linear-gradient(135deg, #001f3f 0%, #003366 100%);
    color: white;
    padding: 12px 15px;
    text-align: center; /* Ensures subject headers align with inputs */
    font-weight: 600;
    border-bottom: 2px solid #001a33;
  }
  
  /* ENHANCED: First header cell (Student) */
  .exam-results-table thead th:first-child {
    z-index: 4;
    background: linear-gradient(135deg, #001a33 0%, #002b52 100%);
    text-align: left; /* Keep student name left-aligned */
  }
  
  /* ENHANCED: Table cell alignment */
  .exam-results-table td {
    padding: 10px 15px;
    text-align: center; /* Centers marks under subject headers */
    vertical-align: middle; /* Perfect vertical alignment */
    border-bottom: 1px solid #eee;
  }
  
  /* ENHANCED: Input field styling */
  .exam-results-table td input {
    width: 60px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    display: inline-block; /* Ensures perfect centering */
  }
  
  /* Keep existing shadow effect */
  .exam-results-table th:first-child,
  .exam-results-table td:first-child {
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
  }
}

/* Mobile styles remain untouched EXACTLY AS YOU HAD THEM */
@media (max-width: 768px) {
  /* Your existing mobile styles remain here */
}


/* Desktop Sticky Table - PERFECT COLUMN ALIGNMENT */
@media (min-width: 769px) {
  .table-container {
    overflow-x: auto;
    max-width: 100%;
  }

  .exam-results-table {
    width: auto;
    border-collapse: collapse;
  }

  /* FORCED COLUMN WIDTHS */
  .exam-results-table th:not(:first-child),
  .exam-results-table td:not(:first-child) {
    width: 120px; /* Fixed width for all subject columns */
    min-width: 120px;
    max-width: 120px;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Your original sticky first column */
  .exam-results-table th:first-child,
  .exam-results-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: white;
    width: 180px; /* Fixed student column width */
    min-width: 180px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
  }

  /* Header styling */
  .exam-results-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: linear-gradient(135deg, #013c77 0%, #226cb5 100%);
    color: white;
    padding: 12px 5px; /* Reduced padding for more space */
    text-align: center;
    font-weight: 600;
    font-size: 0.75rem;
  }

  /* Cell styling */
  .exam-results-table td {
    padding: 10px 5px;
    text-align: center;
    vertical-align: middle;
    background: white;
    border-bottom: 1px solid #eee;
   
  }

  /* Input field styling */
  .exam-results-table td input {
    width: 80px; /* Slightly wider for better display */
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    display: inline-block;
  }

  /* Handle long subject names */
  .exam-results-table thead th:not(:first-child) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 12px 5px;
  }
}

/* Limit table max width to 1200px */
.exam-results-table {
    max-width: 1000px;
    margin: 0 auto; /* centers table if smaller than container */
    margin-bottom: 20px;
    margin-left: 10px;
}



/* VIEW STUDENT RESULT */

@media (max-width: 768px) {
  .results-table thead {
    display: none;
  }

  .results-table,
  .results-table tbody {
    display: block;
    width: 100%;
  }

  .results-table tr {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border: 1px solid #ddd;
    margin-bottom: 8px;
    border-radius: 6px;
  }

  .results-table td {
    border: none;
    padding: 0;
  }

  .results-table td:first-child {
    flex: 1;
    text-align: left;
    font-weight: bold;
  }

  .results-table td:last-child {
    flex: 0 0 80px;
    text-align: right;
  }

  .marks-grade {
    display: flex;
    justify-content: flex-end;
    gap: 162px;  /* increased gap so grade moves left closer to marks */
    margin-left: 40px;
  }
}


/* ==================GRADES PAGE START================*/
.grades-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  margin-top: 20px;
}

/* Columns card style */
.grades-column {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.08);
}

/* Make responsive: stack on small screens */
@media (max-width: 768px) {
  .grades-section {
    grid-template-columns: 1fr;
  }
}


/* delete modal */
/* Modal Overlay */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* Modal Box */
.modal-box {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  width: 320px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Modal Actions */
.modal-actions {
  margin-top: 20px;
  display: flex;
  justify-content: space-around;
}

.btn-cancel {
  background: #777;
  color: #fff;
  padding: 8px 16px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.btn-delete {
  background: #e74c3c;
  color: #fff;
  padding: 8px 16px;
  border-radius: 5px;
  text-decoration: none;
}

/* =============universal header */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Prevent horizontal scroll */
}


/* =================== VIEWSTUDENT PAGE FOR ADMIN AND TEACHERS SHARED =================== */
.unique-student-profile-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.2rem;
    margin: 1.2rem auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    max-width: 1100px;
    margin-left: 0px;
}

/* --- Layout Wrapper --- */
.unique-student-wrapper {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 1.2rem;
    align-items: start;
}

/* --- Columns --- */
.unique-student-column {
    display: flex;
    flex-direction: column;
}

/* --- Profile Picture Column --- */
.unique-student-pic-wrapper {
    position: relative;
    width: 100%;
    max-width: 140px;
    margin: 0 auto;
}

.unique-student-pic-img {
    width: 120%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid #f3f4f6;
    transition: all 0.2s ease;
}

.unique-student-pic-img:hover {
    transform: scale(1.03);
    border-color: #3b82f6;
}

.unique-student-default-icon {
    font-size: 100px;
    color: #d1d5db;
    margin: 0.5rem 0;
}

.unique-student-edit-pic-btn {
    margin: 0.8rem auto 0 auto; /* Center horizontally with auto left/right */
    padding: 0.35rem 0.6rem;    /* Smaller padding to reduce width */
    background: #3b82f6;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    max-width: fit-content;     /* Shrinks button to fit content */
    font-family: 'Inter', sans-serif;
}


.unique-student-edit-pic-btn:hover {
    background: #2563eb;
}

/* --- Student Info Column --- */
.unique-student-info {
    align-items: flex-start;
}

.unique-student-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem;
    width: 100%;
}

.unique-student-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.8rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #3b82f6;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Inter', sans-serif;
}

.unique-student-card-title i {
    color: #3b82f6;
    font-size: 0.9rem;
}

.unique-student-detail {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
    font-size: 0.85rem;
    line-height: 1.3;
}

.unique-student-label {
    font-weight: 500;
    color: #0e4490;
    flex-basis: 100px;
    flex-shrink: 0;
    font-size: 0.8rem;
    font-family: 'Poppins';
}

.unique-student-value {
    color: #6d7786;
    font-weight: 400;
}

/* School Logo Column */
.unique-student-logo {
    padding: 0.8rem;
    background: #f9fafb;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.unique-student-logo-img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    opacity: 0.8;
    transition: all 0.2s ease;
}

.unique-student-logo-img:hover {
    opacity: 1;
}

/* USP Section*/
.usp-section {
    background: #f9fafb;
    padding: 1.2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin: 1.2rem auto;
    max-width: 1100px;
    border: 1px solid #e5e7eb;
    margin-left: 0px;
}

.usp-wrapper {
    display: flex;
    justify-content: center;
}

.usp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    width: 100%;
}

.usp-col {
    display: flex;
    flex-direction: column;
}

.usp-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    height: 100%;
}

.usp-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 0.8rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.usp-card-title i {
    color: #3b82f6;
    font-size: 0.85rem;
}

.usp-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.7rem;
}

.usp-icon {
    font-size: 0.85rem;
    color: #6b7280;
    padding-top: 2px;
    flex-shrink: 0;
}

.usp-detail-text {
    display: flex;
    flex-direction: column;
}

.usp-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 1px;
}

.usp-value {
    font-size: 0.85rem;
    font-weight: 400;
    color: #1f2937;
}

/* Form Elements */
.usp-profile-update-form {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.usp-profile-update-form label {
    font-size: 0.8rem;
    color: #4b5563;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.usp-profile-update-form label i {
    color: #6b7280;
    font-size: 0.8rem;
}

.usp-profile-update-form input {
    padding: 0.5rem 0.7rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    background-color: #f9fafb;
}

.usp-profile-update-form input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.usp-profile-update-btn {
    padding: 0.6rem 0.8rem;
    background: #3b82f6;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.3rem;
}

.usp-profile-update-btn:hover {
    background: #2563eb;
}

.usp-parents-card p {
    font-style: italic;
    color: #9ca3af;
    margin: 0;
    font-size: 0.8rem;
}

/* =================== Media Queries =================== */
@media (max-width: 1024px) {
    .unique-student-wrapper {
        grid-template-columns: 1fr 2fr;
        gap: 1rem;
    }
    
    .unique-student-logo {
        display: none;
    }
    
    .usp-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
    }
}

@media (max-width: 768px) {
    .unique-student-profile-section,
    .usp-section {
        padding: 1rem;
        margin: 1rem auto;
        border-radius: 10px;
    }
    
    .unique-student-wrapper {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .unique-student-pic-wrapper {
        max-width: 120px;
    }
    
    .unique-student-card {
        padding: 0.8rem;
    }
    
    .unique-student-detail {
        flex-direction: column;
        gap: 0.2rem;
        margin-bottom: 0.6rem;
    }
    
    .unique-student-label {
        flex-basis: auto;
        font-size: 0.75rem;
    }
    
    .usp-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .usp-card {
        padding: 0.8rem;
    }
    
    .usp-card-title {
        font-size: 0.9rem;
    }
    
    .usp-label {
        font-size: 0.65rem;
    }
    
    .usp-value {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .unique-student-profile-section,
    .usp-section {
        padding: 0.8rem;
        margin: 0.8rem auto;
    }
    
    .unique-student-pic-wrapper {
        max-width: 100px;
    }
    
    .unique-student-default-icon {
        font-size: 80px;
    }
    
    .unique-student-card-title {
        font-size: 1rem;
    }
    
    .usp-card-title {
        font-size: 0.85rem;
    }
    
    .usp-detail-item {
        margin-bottom: 0.5rem;
    }
}


/* RESULTS FILTER */
.exam-filter-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: #fff;
  padding: 1.25rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  max-width: 480px;
  width: 100%;
}

.exam-filter-form label {
  font-size: 0.875rem;
  color: #374151;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.exam-filter-form select {
  width: 100%;
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #f9fafb;
  cursor: pointer;
  transition: all 0.15s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3e%3cpath d='M6 8l4 4 4-4' stroke='%236b7280' stroke-width='1.5'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1rem;
}

.exam-filter-form select:hover {
  border-color: #9ca3af;
}

.exam-filter-form select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
  outline: none;
}

@media (min-width: 640px) {
  .exam-filter-form {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
  }
  
  .exam-filter-form label {
    margin-bottom: 0;
    min-width: 120px;
  }
}


/* --- Responsive Design --- */
@media (max-width: 992px) {
    .stu-profile-account-wrapper {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .stu-profile-school-column {
        display: none; /* Hide the school logo column on smaller screens */
    }
    .stu-profile-picture-wrapper {
        max-width: 150px;
        margin: 0 auto;
    }
    .stu-section-header {
        font-size: 1.25rem;
        margin-left: 0px;
    }
    .stu-profile-update-form {
        max-width: 400px;
        margin-left: 0px;
        margin-top: -20px;
    }
    .default-profile1-icon {
        font-size: 120px;
        margin: 0 auto;
        height: 150px;
        width: 150px;
        margin-left: 0px;
        margin-top: 0px;
        margin-bottom: -100px;
    }

        .stu-profile-update-form {
        margin-top: 13px;
    }
}

@media (max-width: 480px) {
    .stu-profile-account-section {
        padding: 1.5rem;
    }
    .stu-profile-update-form input {
        padding: 0.75rem 1rem;
    }
    .stu-profile-update-btn {
        padding: 0.75rem 1.25rem;
    }

.stu-profile-photo-img {
    width: 130%;
    border-radius: 12px;
    aspect-ratio: 1/1;
    object-fit: cover;
    border: 3px solid #e2eaf2;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05), 0 0 0 0 rgba(59, 130, 246, 0);
    transition: all 0.4s ease;
    margin-top: 0px;
    margin-bottom: -20px;
   margin-left: -30px;
   
}


}


/* ====ADMIN DASHBOARD-=== */

#modern-dashboard-stats {
  max-width: 1100px;
  margin: 0 auto 0 0;
}



.modern-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 9px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.05), 0 8px 12px rgba(0, 0, 0, 0.001) !important;
    margin-top: -10px;
    
}

.modern-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007bff, #0056b3);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.modern-card:hover::before {
    transform: scaleX(1);
}

.modern-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15), 0 8px 12px rgba(0, 0, 0, 0.01) !important;
}

/* Icon Box Styles */
.icon-box {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.icon-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.modern-card:hover .icon-box::after {
    left: 100%;
}

.modern-card:hover .icon-box {
    transform: scale(1.1) rotate(5deg);
}

/* Background colors for different cards */
.bg-primary {
    background: linear-gradient(135deg, #007bff, #0056b3) !important;
}

.bg-success {
    background: linear-gradient(135deg, #28a745, #1e7e34) !important;
}

.bg-warning {
    background: linear-gradient(135deg, #ffc107, #e0a800) !important;
}

/* Text Styles */
.modern-card h6 {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #6c757d !important;
}

.modern-card h3 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Link Styles */
.modern-card a {
    color: #007bff !important;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 2px 0;
}

.modern-card a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #007bff, #0056b3);
    transition: width 0.3s ease;
}

.modern-card a:hover {
    color: #0056b3 !important;
    transform: translateX(4px);
}

.modern-card a:hover::after {
    width: 100%;
}

.modern-card a:hover i {
    transform: translateX(4px);
}

.modern-card a i {
    transition: transform 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modern-card {
        margin-bottom: 1rem;
      
    }
    
    .icon-box {
        width: 60px;
        height: 60px;
    }
    
    .icon-box i {
        font-size: 1.5rem !important;
    }
    
    .modern-card h3 {
        font-size: 1.75rem;
    }
}

/* Animation for card entrance */
@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.col-md-4:nth-child(1) .modern-card {
    animation: cardEntrance 0.6s ease 0.1s both;
}

.col-md-4:nth-child(2) .modern-card {
    animation: cardEntrance 0.6s ease 0.2s both;
}

.col-md-4:nth-child(3) .modern-card {
    animation: cardEntrance 0.6s ease 0.3s both;
}


#modern-dashboard-stats {
  overflow-x: hidden;
}

#modern-dashboard-stats .container-fluid {
  margin-left: 0 !important; /* aligns to left edge */
  max-width: 1100px;
}

@media (max-width: 768px) {
  #modern-dashboard-stats .container-fluid {
    padding: 0 45px;
  }


  #modern-dashboard-stats {
 padding: 0px 10px;
}


.modern-card {
margin-bottom: -3px;
margin-top: -10px;
    
}


}



/* Container for the whole section */
/* === Admin Student Dashboard Container === */
.adminstudent-dash {
    background: #fff;
    border-radius: 9px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 20px 25px;
    max-width: 1110px;
    margin: 20px auto;
    margin-left: 0px;
   
}


