* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Login page specific styles - only apply when .app is not present */
body:not(:has(.app)) {
  font-family: 'Inter', sans-serif;
  background-color: #ffffff;
  min-height: 100vh;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  padding-bottom: 100px;
}

/* Fallback for browsers that don't support :has() */
body.login-page {
  font-family: 'Inter', sans-serif;
  background-color: #ffffff;
  min-height: 100vh;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  margin: 0;
  padding: 0;
}

html:not(:has(.app)) {
  overflow-x: hidden;
  overflow-y: auto;
}

/* Purple Gradient Arc Pattern at Top - Mobile First */
body.login-page::before {
  content: '';
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200%;
  height: 300px;
  background: radial-gradient(ellipse 80% 60% at 50% 0%,
      rgba(138, 90, 235, 0.12) 0%,
      rgba(138, 90, 235, 0.08) 25%,
      rgba(138, 90, 235, 0.04) 50%,
      transparent 75%);
  z-index: 1;
  pointer-events: none;
}

/* Additional arc layers for depth */
body.login-page::after {
  content: '';
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 150%;
  height: 250px;
  background: radial-gradient(ellipse 70% 50% at 50% 0%,
      rgba(138, 90, 235, 0.08) 0%,
      rgba(138, 90, 235, 0.04) 30%,
      transparent 65%);
  z-index: 1;
  pointer-events: none;
}

/* Background Decorative Circles - Desktop only */
@media (min-width: 769px) {
  .circle {
    position: fixed;
    z-index: 0;
    border-radius: 50%;
    background: #8A5AEB;
  }
}

@media (max-width: 768px) {
  .circle {
    display: none;
  }
}

/* Top Right Corner Circles - All centered at same point, touching top edge but not right edge */
.circle-top.circle-1 {
  width: 502.5px;
  height: 502.5px;
  right: 0;
  top: -251.25px;
  opacity: 0.05;
}

.circle-top.circle-2 {
  width: 437.18px;
  height: 437.18px;
  right: 32.66px;
  top: -218.59px;
  opacity: 0.08;
}

.circle-top.circle-3 {
  width: 366.83px;
  height: 366.83px;
  right: 67.84px;
  top: -183.415px;
  opacity: 0.06;
}

.circle-top.circle-4 {
  width: 318.25px;
  height: 318.25px;
  right: 92.12px;
  top: -159.125px;
  background: #8B5CF6;
  opacity: 0.4;
}

.circle-top.circle-5 {
  width: 256.27px;
  height: 256.27px;
  right: 123.11px;
  top: -128.135px;
  background: #8B5CF6;
  opacity: 0.35;
}

/* Bottom Left Corner Circles - All centered at same point, touching bottom edge but not left edge */
.circle-bottom.circle-1 {
  width: 502.5px;
  height: 502.5px;
  left: 0;
  bottom: -251.25px;
  opacity: 0.05;
}

.circle-bottom.circle-2 {
  width: 437.18px;
  height: 437.18px;
  left: 32.66px;
  bottom: -218.59px;
  opacity: 0.08;
}

.circle-bottom.circle-3 {
  width: 366.83px;
  height: 366.83px;
  left: 67.84px;
  bottom: -183.415px;
  opacity: 0.06;
}

.circle-bottom.circle-4 {
  width: 318.25px;
  height: 318.25px;
  left: 92.12px;
  bottom: -159.125px;
  background: #8B5CF6;
  opacity: 0.4;
}

.circle-bottom.circle-5 {
  width: 256.27px;
  height: 256.27px;
  left: 123.11px;
  bottom: -128.135px;
  background: #8B5CF6;
  opacity: 0.35;
}

/* Main Container */
.container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 450px;
  padding: 40px 30px;
  padding-top: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: transparent;
  box-sizing: border-box;
}

/* Logo */
.logo {
  margin-bottom: -30px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo img {
  width: 100%;
  max-width: 350px;
  height: auto;
}

/* Welcome Section */
h2 {
  font-size: 32px;
  font-weight: 700;
  color: #6D28D9;
  margin-bottom: 10px;
  text-align: center;
}

.subtitle {
  font-size: 14px;
  color: #4B5563;
  margin-bottom: 30px;
  text-align: center;
  line-height: 1.5;
}

/* Form */
form {
  width: 100%;
  display: flex;
  flex-direction: column;
}

label {
  font-size: 14px;
  font-weight: 500;
  color: #4B5563;
  margin-bottom: 8px;
  display: block;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  font-size: 16px;
  font-family: 'Inter', sans-serif;
  color: #111827;
  background-color: #F9FAFB;
  margin-bottom: 20px;
  transition: all 0.2s;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

input[type="text"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: #8B5CF6;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
  color: #9CA3AF;
}

/* Password Box */
.password-box {
  position: relative;
  width: 100%;
  margin-bottom: 20px;
}

.password-box input {
  padding-right: 45px;
  margin-bottom: 0;
}

.eye {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  user-select: none;
  color: #9CA3AF;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  transition: color 0.2s;
}

.eye:hover {
  color: #6B7280;
}

.eye svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
}

.eye #eye-line {
  stroke: currentColor;
  stroke-width: 2;
}

/* Login Button */
button[type="submit"] {
  width: 100%;
  padding: 14px;
  background-color: #8B5CF6;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-top: 10px;
}

button[type="submit"]:hover {
  background-color: #7C3AED;
}

button[type="submit"]:active {
  background-color: #6D28D9;
}

/* Error Message */
.error-message {
  display: none;
  color: #EF4444;
  font-size: 14px;
  margin-top: -10px;
  margin-bottom: 10px;
  padding: 8px 12px;
  background-color: #FEE2E2;
  border-radius: 6px;
  border: 1px solid #FECACA;
}

/* Shake Animation */
@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-5px);
  }

  20%,
  40%,
  60%,
  80% {
    transform: translateX(5px);
  }
}

form.shake {
  animation: shake 0.5s;
}

/* Responsive Design */
@media (max-width: 768px) {
  .circle-top.circle-1 {
    width: 400px;
    height: 400px;
    right: 0;
    top: -200px;
    opacity: 0.05;
  }

  .circle-top.circle-2 {
    width: 350px;
    height: 350px;
    right: 25px;
    top: -175px;
    opacity: 0.08;
  }

  .circle-top.circle-3 {
    width: 293px;
    height: 293px;
    right: 53.5px;
    top: -146.5px;
    opacity: 0.06;
  }

  .circle-top.circle-4 {
    width: 255px;
    height: 255px;
    right: 72.5px;
    top: -127.5px;
    background: #8B5CF6;
    opacity: 0.4;
  }

  .circle-top.circle-5 {
    width: 205px;
    height: 205px;
    right: 97.5px;
    top: -102.5px;
    background: #8B5CF6;
    opacity: 0.35;
  }

  .circle-bottom.circle-1 {
    width: 400px;
    height: 400px;
    left: 0;
    bottom: -200px;
    opacity: 0.05;
  }

  .circle-bottom.circle-2 {
    width: 350px;
    height: 350px;
    left: 25px;
    bottom: -175px;
    opacity: 0.08;
  }

  .circle-bottom.circle-3 {
    width: 293px;
    height: 293px;
    left: 53.5px;
    bottom: -146.5px;
    opacity: 0.06;
  }

  .circle-bottom.circle-4 {
    width: 255px;
    height: 255px;
    left: 72.5px;
    bottom: -127.5px;
    background: #8B5CF6;
    opacity: 0.4;
  }

  .circle-bottom.circle-5 {
    width: 205px;
    height: 205px;
    left: 97.5px;
    bottom: -102.5px;
    background: #8B5CF6;
    opacity: 0.35;
  }
}

@media (max-width: 480px) {
  body.login-page {
    align-items: flex-start;
    padding-top: 0;
    justify-content: flex-start;
  }

  body.login-page::before {
    width: 150%;
    height: 250px;
  }

  body.login-page::after {
    width: 120%;
    height: 200px;
  }

  .container {
    padding: 30px 20px;
    padding-top: 50px;
    max-width: 100%;
    width: 100%;
    min-height: auto;
    justify-content: flex-start;
    margin-top: 0;
  }

  h2 {
    font-size: 24px;
    margin-bottom: 12px;
    width: 100%;
    text-align: left;
  }

  .logo {
    margin-bottom: 32px;
    width: 100%;
    justify-content: flex-start;
  }

  .logo img {
    max-width: 280px;
    height: auto;
  }

  .subtitle {
    font-size: 14px;
    text-align: left;
    width: 100%;
    margin-bottom: 32px;
    color: #6B7280;
    line-height: 1.6;
  }

  form {
    width: 100%;
  }

  label {
    text-align: left;
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
  }

  .circle-top.circle-1 {
    width: 300px;
    height: 300px;
    right: 0;
    top: -150px;
    opacity: 0.05;
  }

  .circle-top.circle-2 {
    width: 262px;
    height: 262px;
    right: 19px;
    top: -131px;
    opacity: 0.08;
  }

  .circle-top.circle-3 {
    width: 220px;
    height: 220px;
    right: 40px;
    top: -110px;
    opacity: 0.06;
  }

  .circle-top.circle-4 {
    width: 191px;
    height: 191px;
    right: 54.5px;
    top: -95.5px;
    background: #8B5CF6;
    opacity: 0.4;
  }

  .circle-top.circle-5 {
    width: 154px;
    height: 154px;
    right: 73px;
    top: -77px;
    background: #8B5CF6;
    opacity: 0.35;
  }

  .circle-bottom.circle-1 {
    width: 300px;
    height: 300px;
    left: 0;
    bottom: -150px;
    opacity: 0.05;
  }

  .circle-bottom.circle-2 {
    width: 262px;
    height: 262px;
    left: 19px;
    bottom: -131px;
    opacity: 0.08;
  }

  .circle-bottom.circle-3 {
    width: 220px;
    height: 220px;
    left: 40px;
    bottom: -110px;
    opacity: 0.06;
  }

  .circle-bottom.circle-4 {
    width: 191px;
    height: 191px;
    left: 54.5px;
    bottom: -95.5px;
    background: #8B5CF6;
    opacity: 0.4;
  }

  .circle-bottom.circle-5 {
    width: 154px;
    height: 154px;
    left: 73px;
    bottom: -77px;
    background: #8B5CF6;
    opacity: 0.35;
  }

  input[type="text"],
  input[type="password"] {
    font-size: 16px;
    /* Prevents zoom on iOS */
    padding: 16px;
    background-color: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    width: 100%;
    box-sizing: border-box;
  }

  .password-box {
    margin-bottom: 24px;
  }

  .password-box input {
    padding-right: 50px;
  }

  .eye {
    right: 16px;
    font-size: 20px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  button[type="submit"] {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    border-radius: 10px;
    margin-top: 8px;
    font-weight: 600;
    background-color: #8B5CF6;
    color: #ffffff;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
  }

  button[type="submit"]:hover {
    background-color: #7C3AED;
  }

  button[type="submit"]:active {
    background-color: #6D28D9;
  }
}

/* Extra small mobile devices */
@media (max-width: 375px) {
  .container {
    padding: 24px 16px;
    padding-top: 32px;
  }

  h2 {
    font-size: 22px;
  }

  .logo img {
    max-width: 240px;
  }

  .subtitle {
    font-size: 13px;
  }
}

@media (max-width: 320px) {
  .container {
    padding: 20px 15px;
  }

  h2 {
    font-size: 24px;
  }

  .logo img {
    max-width: 200px;
  }

  .circle-top.circle-1,
  .circle-bottom.circle-1 {
    width: 250px;
    height: 250px;
  }

  .circle-top.circle-2,
  .circle-bottom.circle-2 {
    width: 218px;
    height: 218px;
  }

  .circle-top.circle-3,
  .circle-bottom.circle-3 {
    width: 183px;
    height: 183px;
  }

  .circle-top.circle-4,
  .circle-bottom.circle-4 {
    width: 159px;
    height: 159px;
    background: #8B5CF6;
    opacity: 0.3;
  }

  .circle-top.circle-5,
  .circle-bottom.circle-5 {
    width: 128px;
    height: 128px;
    background: #8B5CF6;
    opacity: 0.25;
  }
}

/* ============================================
   DASHBOARD STYLES
   ============================================ */

:root {
  /* Base sizes - using rem for scalability */
  --base-font-size: 14px;
  --base-spacing: 1rem;

  /* Responsive sidebar width */
  --sidebar-w: 280px;

  /* Responsive spacing scale */
  --spacing-xs: 0.5rem;
  --spacing-sm: 0.75rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;

  /* Responsive padding */
  --padding-xs: 0.5rem;
  --padding-sm: 0.75rem;
  --padding-md: 1rem;
  --padding-lg: 1.5rem;
  --padding-xl: 2rem;
  --padding-content: clamp(1rem, 4vw, 2.25rem);
  --padding-mobile: 1rem;

  /* Responsive typography */
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: clamp(1.5rem, 4vw, 2rem);

  /* Colors */
  --bg: #fbfdff;
  --muted: #7b8794;
  --card-bg: #ffffff;
  --purple-1: #6f4bff;
  --purple-2: #8c52ff;
  --blue-1: #2fb8ff;
  --pink-1: #ff6ad5;
  --glass: rgba(11, 18, 37, 0.03);
  --shadow: 0 8px 20px rgba(18, 28, 51, 0.06);

  /* Responsive container max-widths */
  --container-max: 100%;
  --content-max-width: 100%;

  /* Border radius - responsive */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
}

/* Responsive breakpoints - update root variables */
@media (max-width: 1200px) {
  :root {
    --sidebar-w: 260px;
    --padding-content: clamp(1rem, 3vw, 2rem);
  }
}

@media (max-width: 900px) {
  :root {
    --sidebar-w: 0px;
    /* Hidden on mobile */
    --padding-content: 1rem;
    --base-font-size: 13px;
  }
}

@media (max-width: 600px) {
  :root {
    --padding-content: 0.75rem;
    --base-font-size: 12px;
    --spacing-lg: 1rem;
    --spacing-xl: 1.5rem;
  }
}

* {
  box-sizing: border-box
}

/* Dashboard styles - apply to body when .app exists */
body:has(.app) {
  height: 100%;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial;
  font-size: var(--base-font-size);
  color: #15202b;
  background: var(--bg);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

html:has(.app) {
  height: 100%;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

html {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

/* Fallback for browsers without :has() support - apply styles directly to .app parent */
.app {
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
  box-sizing: border-box
}

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-w);
  background: #fff;
  border-right: 1px solid #eef3f9;
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  padding: 20px 18px;
  z-index: 30;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  margin: 0;
  transition: left 0.3s ease;
}

.sidebar-top {
  margin: 0;
  padding: 0;
  width: 100%;
  display: flex;
  justify-content: center;
}

.sidebar-overlay {
  display: none;
}

.sidebar .logo {
  width: 100%;
  max-width: 250px;
  display: block;
  margin: 0 auto -60px !important
}

.nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 0 !important
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 12px;
  color: #556275;
  text-decoration: none;
  cursor: pointer;
  transition: all .18s;
}

.nav-item:hover {
  background: linear-gradient(90deg, #faf8ff, #f6f5ff);
  transform: translateY(-1px)
}

.nav-item.active {
  background: var(--purple-1);
  color: #FFFFFF;
  box-shadow: none;
  border-left: 3px solid var(--purple-1);
  overflow: hidden
}

.nav-item.active .nav-icon {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.2)
}

.nav-item.active .nav-text {
  color: #FFFFFF;
  font-weight: 700
}

.nav-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fbfbfb;
  color: #6b7280;
  font-size: 16px
}

.nav-icon svg {
  width: 20px;
  height: 20px;
  color: inherit
}

.nav-text {
  font-weight: 600
}

/* bottom logout */
.sidebar-bottom {
  padding-top: 12px;
  border-top: 1px solid #f1f4f8;
  margin-top: 12px
}

.logout {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  background: transparent;
  color: #6b7280;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none
}

.logout:hover {
  background: #f6f7f8
}

/* MAIN area */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  width: calc(100% - var(--sidebar-w));
  min-width: 0;
  max-width: calc(100% - var(--sidebar-w));
  overflow-x: hidden;
  position: relative;
  background: transparent;
  margin-top: 0;
  margin-right: 0;
  margin-bottom: 0;
}

/* TOPBAR */
.topbar {
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 36px;
  background: #F5F5F5;
  color: #1E1E1E;
  border-bottom-left-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 100;
}

/* Ask Peekaboo page - match topbar and content background */
body:has(.ask-peekaboo-page) .topbar,
.ask-peekaboo-page .topbar {
  background: #fbfdff;
}

body:has(.ask-peekaboo-page) .content,
.ask-peekaboo-page .content {
  background: #fbfdff;
}

/* Messages page - match topbar and content background */
body:has(.messages-page) .topbar {
  background: #fbfdff;
}

body:has(.messages-page) .content {
  background: #fbfdff;
}

/* Behaviour Observations page - match topbar and content background */
body:has(.behaviour-observations-page) .topbar,
.behaviour-observations-page .topbar {
  background: #fbfdff;
}

body:has(.behaviour-observations-page) .content,
.behaviour-observations-page .content {
  background: #fbfdff;
}

/* Admin Behaviour Observations page - match topbar and content background */
body:has(.behaviour-observations-admin-page) .topbar,
.behaviour-observations-admin-page .topbar {
  background: #fbfdff;
}

body:has(.behaviour-observations-admin-page) .content,
.behaviour-observations-admin-page .content {
  background: #fbfdff;
}

/* Ask Peekaboo Admin page - match topbar and content background */
body:has(.ask-peekaboo-admin-page) .topbar,
.ask-peekaboo-admin-page .topbar {
  background: #fbfdff;
}

body:has(.ask-peekaboo-admin-page) .content,
.ask-peekaboo-admin-page .content {
  background: #fbfdff;
}

/* Settings Admin page - match topbar and content background */
body:has(.settings-admin-page) .topbar,
.settings-admin-page .topbar {
  background: #fbfdff;
}

body:has(.settings-admin-page) .content,
.settings-admin-page .content {
  background: #fbfdff;
  text-align: left;
}

body:has(.settings-admin-page) .content .settings-content,
.settings-admin-page .content .settings-content {
  text-align: left;
}

/* Evaluation page - match topbar and content background */
body:has(.evaluation-page) .topbar,
.evaluation-page .topbar {
  background: #fbfdff;
}

body:has(.evaluation-page) .content,
.evaluation-page .content {
  background: #fbfdff;
}

/* Mobile fixes for evaluation pages */
@media (max-width: 900px) {

  .evaluation-page .content,
  .evaluation-teacher-page .content {
    padding: 16px !important;
    padding-bottom: 90px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  /* Fix classes grid on mobile */
  .evaluation-page .classes-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .evaluation-page .class-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  /* Fix panel controls on mobile */
  .evaluation-page .panel-top,
  .evaluation-page .panel-controls {
    flex-direction: column !important;
    width: 100% !important;
  }

  .evaluation-page .search-box {
    width: 100% !important;
    margin-top: 0 !important;
  }

  .evaluation-page .btn-filter-classes,
  .evaluation-page .btn-add-evaluation {
    width: 100% !important;
  }
}

@media (max-width: 520px) {

  .evaluation-page .content,
  .evaluation-teacher-page .content {
    padding-bottom: 100px !important;
  }
}

/* Topbar - black heading on mobile for all pages except dashboard */
@media (max-width: 900px) {
  .topbar:not(.dashboard-topbar) .page-title {
    color: #000000 !important;
  }

  .topbar:not(.dashboard-topbar) .page-title .breadcrumbs {
    color: #666666 !important;
  }

  .topbar:not(.dashboard-topbar) .page-title .breadcrumbs span {
    color: #000000 !important;
  }

  /* Evaluation topbar - black heading on mobile */
  .topbar.evaluation-topbar .page-title,
  body:has(.evaluation-page) .topbar.evaluation-topbar .page-title,
  .evaluation-page .topbar.evaluation-topbar .page-title,
  body:has(.evaluation-teacher-page) .topbar.evaluation-topbar .page-title,
  .evaluation-teacher-page .topbar.evaluation-topbar .page-title {
    color: #000000 !important;
  }

  /* Behaviour observations topbar - black heading on mobile */
  .topbar.behaviour-observations-topbar .page-title,
  body:has(.behaviour-observations-classes-page) .topbar.behaviour-observations-topbar .page-title,
  .behaviour-observations-classes-page .topbar.behaviour-observations-topbar .page-title,
  body.behaviour-observations-classes-page .topbar.behaviour-observations-topbar .page-title,
  .behaviour-observations-classes-page .topbar .page-title,
  body.behaviour-observations-classes-page .topbar .page-title {
    color: #000000 !important;
  }

  /* Override any white color rules for behaviour observations */
  body.behaviour-observations-classes-page .topbar .page-title,
  .behaviour-observations-classes-page .topbar .page-title {
    color: #000000 !important;
  }

  /* Behaviour observation detail admin page - black heading on mobile */
  body.behaviour-observation-detail-admin-page .topbar .page-title,
  .behaviour-observation-detail-admin-page .topbar .page-title {
    color: #000000 !important;
  }

  body.behaviour-observation-detail-admin-page .topbar .page-title .breadcrumbs {
    color: #666666 !important;
  }

  body.behaviour-observation-detail-admin-page .topbar .page-title .breadcrumbs span {
    color: #000000 !important;
  }
}

/* Classes page - match topbar and content background */
/* Classes page - match topbar and content background */
body.classes-page .topbar,
body:has(.classes-page) .topbar,
.classes-page .topbar,
.classes-page .main .topbar,
body.classes-page .main .topbar {
  background: #f4f7fb !important;
  background-image: none !important;
  background-color: #f4f7fb !important;
}

body.classes-page .content,
body:has(.classes-page) .content,
.classes-page .content,
.classes-page .main .content,
body.classes-page .main .content {
  background: #f4f7fb !important;
  background-image: none !important;
  background-color: #f4f7fb !important;
}

.mobile-menu-toggle {
  display: none
}

.page-title {
  font-weight: 700;
  font-size: 20px;
  opacity: 1;
  background: transparent;
  color: #1E1E1E;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px
}

.page-title .welcome-text {
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 4px
}

.page-title .greeting-text {
  font-size: 20px;
  font-weight: 700;
  color: #FFFFFF
}

.breadcrumb {
  font-size: 13px;
  color: #93a1b2;
  margin-bottom: 20px
}

.breadcrumbs {
  font-weight: 400;
  font-size: 13px;
  color: #93a1b2;
  margin-top: 4px
}

.breadcrumbs span {
  font-weight: 600;
  color: #333
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 18px
}

.notif {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #f1f4f8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #6b7280
}

.notif svg {
  width: 20px;
  height: 20px;
  color: inherit
}

.profile {
  display: flex;
  align-items: center;
  gap: 10px
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e5e7eb
}

.avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #e5e7eb;
  background: #f3f4f6;
  color: #6b7280
}

.profile-meta {
  font-size: 12px;
  line-height: 1;
  color: #1E1E1E
}

.profile-meta .agency {
  font-weight: 700;
  opacity: 1
}

.profile-meta .name {
  opacity: 1;
  font-weight: 600
}

/* CONTENT wrapper - responsive padding */
.content {
  padding: var(--padding-content);
  background: linear-gradient(180deg, #fbfdff 0, #fbfdff 100%);
  min-height: calc(100vh - 84px);
  width: 100%;
  max-width: var(--content-max-width);
  box-sizing: border-box;
  overflow-x: hidden;
  position: relative;
  margin: 0;
}

/* KPI row */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-left: 0;
  margin-right: 0
}

.kpi-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 22px 20px;
  box-shadow: var(--shadow);
  min-height: 120px;
  display: flex;
  flex-direction: column;
  gap: 12px
}

.kpi-icon {
  padding: 12px;
  border-radius: 50%;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  width: fit-content
}

.kpi-icon svg {
  width: 24px;
  height: 24px;
  color: inherit
}

.kpi-icon-purple {
  background: #E8D5FF
}

.kpi-icon-orange {
  background: #FFB84D
}

.kpi-icon-blue {
  background: #4FC3F7
}

.kpi-icon-yellow {
  background: #FFD54F
}

.kpi-number {
  font-size: 28px;
  font-weight: 800;
  color: #1e2430;
  margin-bottom: 6px
}

.kpi-label {
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
  font-size: 13px
}

.kpi-foot {
  font-size: 12px;
  color: #6dbf88;
  font-weight: 700
}

/* pending */
.kpi-foot.pending {
  color: #DC2626;
  background: #FEE2E2;
  padding: 4px 8px;
  border-radius: 6px;
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  width: fit-content
}

/* Banner row */
.banner-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 22px;
  flex-wrap: nowrap;
  width: 100%;
  box-sizing: border-box
}

.banner {
  height: 160px;
  padding: 30px;
  border-radius: 16px;
  color: white;
  position: relative;
  overflow: hidden;
  filter: drop-shadow(4px 4px 0px rgba(118, 113, 190, 0.25));
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between
}

.banner .banner-title {
  font-family: 'Inter', sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 14px;
  line-height: 100%;
  color: #FFFFFF;
  margin: 0 0 10px 0;
  z-index: 2;
  position: relative
}

.banner .banner-sub {
  font-family: 'Inter', sans-serif;
  font-style: normal;
  font-weight: 600;
  font-size: 20px;
  line-height: 100%;
  color: #FFFFFF;
  margin: 0;
  z-index: 2;
  position: relative
}

.btn-small {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 12px 14px;
  gap: 10px;
  width: 165px;
  height: 44px;
  background: #FFFFFF;
  box-shadow: 0px 0px 10px rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  border: none;
  font-family: 'Inter', sans-serif;
  font-style: normal;
  font-weight: 600;
  font-size: 14px;
  line-height: 100%;
  letter-spacing: -0.02em;
  color: inherit;
  cursor: pointer;
  transition: all .2s;
  z-index: 2;
  position: relative;
  flex: none
}

.btn-small span {
  display: flex;
  align-items: center;
  width: auto;
  height: 14px;
  flex: none
}

.btn-small svg {
  display: block;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  flex: none
}

.btn-small:hover {
  transform: translateY(-1px);
  box-shadow: 0px 0px 15px rgba(255, 255, 255, 0.2)
}

/* Purple banner */
.banner.purple {
  background: #8A5AEB
}

.banner.purple .btn-small {
  color: #827CD1
}

.banner.purple::before {
  content: '';
  position: absolute;
  width: 220px;
  height: 220px;
  right: -1.5px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  z-index: 0
}

.banner.purple::after {
  content: '';
  position: absolute;
  width: 160px;
  height: 160px;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  z-index: 0
}

/* Blue banner */
.banner.blue {
  background: #00C4FC
}

.banner.blue .btn-small {
  color: #51C2E8
}

.banner.blue::before {
  content: '';
  position: absolute;
  width: 180px;
  height: 180px;
  right: 0px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  z-index: 0
}

.banner.blue::after {
  content: '';
  position: absolute;
  width: 130px;
  height: 130px;
  right: 25px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  z-index: 0
}

/* Pink banner */
.banner.pink {
  background: #D63DF1
}

.banner.pink .btn-small {
  color: #D63DF1
}

.banner.pink::before {
  content: '';
  position: absolute;
  width: 180px;
  height: 180px;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  z-index: 0
}

.banner.pink::after {
  content: '';
  position: absolute;
  width: 130px;
  height: 130px;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  z-index: 0
}

/* Banner illustration for purple and pink banners */
.banner.purple .banner-illustration,
.banner.pink .banner-illustration {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 220px;
  height: 220px;
  z-index: 1;
  pointer-events: none;
}

.banner.pink .banner-illustration {
  width: 180px;
  height: 180px;
  right: 8px;
}

.banner.purple .banner-circle,
.banner.pink .banner-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.banner.purple .circle-outer {
  width: 220px;
  height: 220px;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.banner.purple .circle-middle {
  width: 190px;
  height: 190px;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
}

.banner.purple .circle-inner {
  width: 160px;
  height: 160px;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
}

.banner.pink .circle-outer {
  width: 180px;
  height: 180px;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.banner.pink .circle-middle {
  width: 150px;
  height: 150px;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
}

.banner.pink .circle-inner {
  width: 130px;
  height: 130px;
  right: 25px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
}

.banner.purple .banner-image,
.banner.pink .banner-image {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  /* Position to the left of circles, overlapping the outermost circle */
}

.banner.purple .banner-image {
  /* Position to left of outer circle (220px), overlapping it slightly */
  right: 70px;
  width: 90px;
  height: 95px;
}

.banner.pink .banner-image {
  /* Position to left of outer circle (180px), overlapping it slightly */
  right: 55px;
  width: 75px;
  height: 80px;
}

.banner.purple .banner-image img,
.banner.pink .banner-image img,
.banner.blue .banner-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.banner.blue .banner-illustration {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 180px;
  height: 180px;
  z-index: 1;
  pointer-events: none;
}

.banner.blue .banner-image {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  right: 45px;
  width: 90px;
  height: 95px;
}

/* Orange banner */
.banner.orange {
  background: #FF9452
}

.banner.orange .btn-small {
  color: #FF9452
}

.banner.orange::before {
  content: '';
  position: absolute;
  width: 180px;
  height: 180px;
  right: 0px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  z-index: 0
}

.banner.orange::after {
  content: '';
  position: absolute;
  width: 130px;
  height: 130px;
  right: 25px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  z-index: 0
}


/* CHARTS */
.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 26px;
  width: 100%
}

.card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 18px;
  box-shadow: var(--shadow)
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px
}

.card-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700
}

.select {
  background: #fff;
  border: 1px solid #eef3f9;
  padding: 8px 12px;
  border-radius: 8px;
  color: #6b7280;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 14px
}

.month-picker-wrapper {
  position: relative
}

.month-picker-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px
}

.month-picker-trigger svg {
  flex-shrink: 0
}

.month-picker-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border: 1px solid #eef3f9;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 100;
  min-width: 200px;
  padding: 12px
}

.month-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eef3f9
}

.month-picker-year {
  font-weight: 600;
  font-size: 14px;
  color: #1e2430
}

.month-nav-btn {
  background: none;
  border: none;
  font-size: 18px;
  color: #6b7280;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s
}

.month-nav-btn:hover {
  background: #f6f7f8;
  color: #1e2430
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px
}

.month-item {
  padding: 8px 12px;
  text-align: center;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  transition: all 0.2s
}

.month-item:hover {
  background: #f6f7f8;
  color: #1e2430
}

.month-item.active {
  background: #8A5AEB;
  color: #fff;
  font-weight: 600
}

.month-item.active:hover {
  background: #7a4adb
}

/* donut area */
.donut-area {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 8px 0;
  position: relative
}

.donut {
  flex: 0 0 177.9px;
  width: 177.9px;
  height: 177.9px;
  position: relative
}

.donut svg {
  width: 177.9px;
  height: 177.9px
}

.donut text {
  font-family: 'Inter', sans-serif
}

.donut text:first-of-type {
  font-weight: 600;
  font-size: 21.6076px;
  line-height: 19px;
  fill: #30344F
}

.donut text:last-of-type {
  font-weight: 400;
  font-size: 10px;
  line-height: 16px;
  fill: #30344F;
  opacity: 0.7;
  text-anchor: middle
}

.legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 11px;
  color: #4b5563
}

.legend .swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  margin-right: 8px
}

.legend .count {
  float: right;
  color: #9aa4b3;
  font-weight: 700;
  margin-left: 12px;
  font-size: 11px
}

/* big chart */
.big-chart {
  grid-column: 1/-1;
  margin-top: 18px;
  padding-bottom: 16px
}

.attendance-chart {
  height: 320px;
  padding: 8px 18px;
  position: relative
}

.line-svg {
  width: 100%;
  height: 320px;
  display: block
}

.month-point .tooltip,
.month-point .tooltip-line {
  opacity: 0;
  transition: opacity 0.2s
}

.month-point:hover .tooltip,
.month-point:hover .tooltip-line {
  opacity: 1
}

/* responsive rules */
@media (max-width:1100px) {
  :root {
    --sidebar-w: 200px
  }

  .sidebar {
    width: 200px
  }

  .nav-text {
    display: none
  }

  .logo img {
    width: 140px
  }

  .main {
    width: calc(100% - 200px);
    margin-left: 200px;
    max-width: calc(100% - 200px)
  }
}

@media (max-width:900px) {

  /* KPI cards - horizontal scrollable on mobile */
  .kpi-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    grid-template-columns: none !important;
    /* Remove grid */
    gap: 12px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-behavior: smooth !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .kpi-row::-webkit-scrollbar {
    display: none !important;
  }

  .kpi-card {
    min-width: 160px !important;
    width: 160px !important;
    max-width: 160px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    min-height: 120px !important;
  }

  .banner-row {
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
  }

  .banner {
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }

  .charts-row {
    grid-template-columns: 1fr
  }

  /* Hide sidebar, show bottom nav */
  .sidebar {
    display: none !important;
  }

  .sidebar-overlay {
    display: none !important;
  }

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

  .bottom-nav {
    display: flex !important;
  }

  /* Completely hide sidebar on mobile - use bottom nav instead */
  .sidebar {
    display: none !important;
  }

  .sidebar-overlay {
    display: none !important;
  }

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

  .main {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important
  }

  .topbar {
    padding: 14px 16px !important;
    height: auto !important;
    min-height: 60px !important;
    flex-wrap: wrap !important;
  }

  .page-title {
    font-size: 18px !important
  }

  .topbar-right {
    flex-wrap: wrap;
    gap: 8px
  }

  .profile-meta {
    display: none
  }

  .content {
    padding: 16px !important;
    padding-bottom: 90px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* KPI cards - horizontal scrollable */
  .kpi-row {
    display: flex !important;
    flex-direction: row !important;
    gap: 12px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .kpi-row::-webkit-scrollbar {
    display: none !important;
  }

  .kpi-card {
    padding: 16px !important;
    min-width: 160px !important;
    width: 160px !important;
    max-width: 160px !important;
    flex-shrink: 0 !important;
  }

  .kpi-number {
    font-size: 24px
  }

  .kpi-label {
    font-size: 13px;
    display: block
  }

  .banner {
    padding: 20px;
    min-height: 140px
  }

  .banner-title {
    font-size: 18px
  }

  .banner-sub {
    font-size: 13px
  }

  .btn-small {
    width: auto;
    min-width: 140px;
    padding: 10px 14px;
    font-size: 13px
  }

  .card {
    padding: 14px
  }

  .card-header h3 {
    font-size: 15px
  }

  .donut-area {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 16px
  }

  .donut {
    flex: 0 0 auto
  }

  .legend {
    flex: 1;
    text-align: left;
    width: auto
  }

  .attendance-chart {
    height: 340px;
    padding: 8px 12px
  }

  .line-svg {
    height: 340px
  }

  .month-picker-dropdown {
    right: auto;
    left: 0;
    min-width: 180px
  }
}

@media (max-width:520px) {

  /* Hide sidebar - use bottom nav instead */
  .mobile-menu-toggle {
    display: none !important
  }

  .sidebar {
    display: none !important
  }

  .sidebar-overlay {
    display: none !important
  }

  /* Show bottom navigation */
  .bottom-nav {
    display: flex !important
  }

  .topbar {
    flex-direction: row;
    align-items: center;
    height: auto;
    padding: 12px 16px;
    gap: 8px
  }

  .page-title {
    font-size: 16px;
    flex: 1
  }

  .topbar-right {
    flex: 0 0 auto
  }

  .notif {
    width: 36px;
    height: 36px
  }

  .profile {
    flex-direction: row;
    gap: 8px
  }

  .avatar {
    width: 32px;
    height: 32px
  }

  .avatar-placeholder {
    width: 32px;
    height: 32px;
    font-size: 14px
  }

  .content {
    padding: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    padding-bottom: 100px !important;
  }

  /* KPI cards - horizontal scrollable row */
  .kpi-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    grid-template-columns: none !important;
    /* Remove grid */
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-behavior: smooth !important;
    scrollbar-width: none !important;
    /* Firefox */
    -ms-overflow-style: none !important;
    /* IE and Edge */
  }

  .kpi-row::-webkit-scrollbar {
    display: none !important;
    /* Chrome, Safari, Opera */
  }

  .kpi-card {
    padding: 16px !important;
    min-height: 120px !important;
    min-width: 160px !important;
    width: 160px !important;
    max-width: 160px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  .kpi-card .kpi-icon {
    width: 44px !important;
    height: 44px !important;
    padding: 10px !important;
    margin-bottom: 4px !important;
  }

  .kpi-card .kpi-icon svg {
    width: 24px !important;
    height: 24px !important;
  }

  .kpi-card .kpi-number {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #1E1E1E !important;
    margin: 4px 0 !important;
  }

  .kpi-card .kpi-label {
    font-size: 12px !important;
    line-height: 1.3 !important;
    color: #6B7280 !important;
    margin-bottom: 8px !important;
  }

  .kpi-card .kpi-foot {
    font-size: 11px !important;
    margin-top: auto !important;
  }

  .kpi-card .kpi-foot.pending {
    background: #FEE2E2 !important;
    color: #DC2626 !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    display: inline-block !important;
    width: fit-content !important;
  }

  .kpi-icon {
    width: 44px;
    height: 44px;
    padding: 10px
  }

  .kpi-icon svg {
    width: 20px;
    height: 20px
  }

  .kpi-number {
    font-size: 22px
  }

  .kpi-label {
    font-size: 12px;
    line-height: 1.3;
    display: block;
    visibility: visible;
    opacity: 1
  }

  .kpi-foot {
    font-size: 11px;
    display: block;
    visibility: visible;
    opacity: 1
  }

  .banner-row {
    gap: 10px
  }

  .banner {
    padding: 16px;
    min-height: 120px
  }

  .banner-title {
    font-size: 16px;
    margin-bottom: 6px
  }

  .banner-sub {
    font-size: 12px;
    margin-bottom: 10px
  }

  .btn-small {
    width: 100%;
    padding: 10px 12px;
    font-size: 12px;
    height: 40px
  }

  .btn-small svg {
    width: 16px;
    height: 16px
  }

  .card {
    padding: 12px
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px
  }

  .card-header h3 {
    font-size: 14px
  }

  .select {
    font-size: 13px;
    padding: 6px 10px
  }

  .month-picker-trigger {
    font-size: 13px
  }

  .month-picker-dropdown {
    min-width: 160px;
    padding: 10px
  }

  .month-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 4px
  }

  .month-item {
    padding: 6px 8px;
    font-size: 12px
  }

  .month-picker-header {
    padding-bottom: 6px;
    margin-bottom: 8px
  }

  .month-picker-year {
    font-size: 13px
  }

  .donut {
    width: 140px;
    height: 140px;
    flex: 0 0 140px
  }

  .donut svg {
    width: 140px;
    height: 140px
  }

  .donut text {
    font-size: 18px
  }

  .donut text:last-of-type {
    font-size: 9px
  }

  .legend {
    font-size: 10px;
    gap: 8px
  }

  .legend .count {
    font-size: 10px
  }

  .swatch {
    width: 12px;
    height: 12px
  }

  .attendance-chart {
    height: 300px;
    padding: 6px 8px
  }

  .line-svg {
    height: 300px
  }

  .charts-row {
    gap: 12px
  }

  .nav-item {
    padding: 10px
  }

  .nav-icon {
    width: 32px;
    height: 32px
  }

  .nav-icon svg {
    width: 18px;
    height: 18px
  }

  .nav-text {
    font-size: 13px
  }

  .logo {
    width: 100px
  }

  .logo img {
    width: 100px
  }
}

@media (max-width:375px) {
  .sidebar {
    width: 240px
  }

  .page-title {
    font-size: 15px
  }

  .kpi-number {
    font-size: 20px
  }

  .banner-title {
    font-size: 15px
  }

  .card-header h3 {
    font-size: 13px
  }

  .donut {
    width: 120px;
    height: 120px;
    flex: 0 0 120px
  }

  .donut svg {
    width: 120px;
    height: 120px
  }

  .attendance-chart {
    height: 280px
  }

  .line-svg {
    height: 280px
  }
}

/* Floating Chat Button */
.chat-button {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6f4bff 0%, #8c52ff 100%);
  border: none;
  box-shadow: 0 4px 12px rgba(111, 75, 255, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  z-index: 50;
  transition: all 0.3s ease;
}

.chat-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(111, 75, 255, 0.5);
}

.chat-button:active {
  transform: scale(0.95);
}

.chat-button svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

@media (max-width:520px) {
  .chat-button {
    width: 52px;
    height: 52px;
    bottom: 20px;
    right: 20px;
  }

  .chat-button svg {
    width: 22px;
    height: 22px;
  }
}

/* Evaluation Page Styles */
.evaluation-content {
  background: #fbfdff;
  padding: 40px;
  color: #1E1E1E;
}

.eval-page-title {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 25px;
  color: #1E1E1E;
  background: none;
}

.eval-banners-row {
  display: flex;
  flex-direction: row;
  gap: 20px;
  margin-bottom: 30px;
  align-items: stretch;
}

.eval-banner {
  min-width: 0;
  height: 200px;
  border-radius: 16px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.eval-banner.purple {
  flex: 2.8;
  background: #8A5AEB;
  color: #fff;
  filter: drop-shadow(4px 4px 0px rgba(118, 113, 190, 0.25));
}

.eval-banner.orange,
.eval-banner.blue {
  flex: 0.9;
}

.eval-banner.orange {
  background: #FF9452;
  color: white;
  filter: drop-shadow(4px 4px 0px rgba(255, 139, 67, 0.25));
}

.eval-banner.blue {
  background: #3EC0E5;
  color: white;
  filter: drop-shadow(4px 4px 0px rgba(31, 174, 215, 0.25));
}

.eval-banner .banner-text {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: auto;
  max-width: 100%;
  z-index: 2;
  position: relative;
  align-items: flex-start;
}

.eval-banner h3 {
  font-size: 14px;
  font-weight: 400;
  line-height: 100%;
  letter-spacing: -0.02em;
  margin: 0;
  color: #FFFFFF;
  white-space: nowrap;
  text-align: left;
}

.eval-banner h2 {
  font-size: 20px;
  font-weight: 600;
  line-height: 100%;
  letter-spacing: -0.02em;
  margin: 0;
  color: #FFFFFF;
  white-space: nowrap;
  text-align: left;
}

.eval-banner .banner-btn {
  padding: 12px 14px;
  width: 165px;
  height: 44px;
  background: #FFFFFF;
  color: #8A5AEB;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  font-size: 14px;
  line-height: 100%;
  letter-spacing: -0.02em;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);
}

.eval-banner .banner-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.eval-banner .banner-btn svg {
  width: 20px;
  height: 20px;
}

.eval-banner.purple .banner-illustration {
  position: absolute;
  right: 60px;
  top: 50%;
  transform: translateY(-50%);
  width: 293px;
  height: 293px;
  z-index: 1;
  pointer-events: none;
}

.eval-banner.purple .banner-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.eval-banner.purple .circle-outer {
  width: 293px;
  height: 293px;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.eval-banner.purple .circle-middle {
  width: 254px;
  height: 254px;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
}

.eval-banner.purple .circle-inner {
  width: 212px;
  height: 212px;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
}

.eval-banner.purple .banner-image {
  position: absolute;
  right: 81px;
  top: 50%;
  transform: translateY(-50%);
  width: 122px;
  height: 126px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.eval-banner.purple .banner-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.eval-banner .stat-icon {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 5.12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 13px;
  z-index: 1;
  position: relative;
}

.eval-banner .stat-icon svg {
  width: 20px;
  height: 20px;
  color: white;
}

.eval-banner h2 {
  font-size: 22px;
  margin-bottom: 3px;
  font-weight: 700;
  line-height: 28px;
  z-index: 1;
  position: relative;
}

.eval-banner p {
  font-size: 14px;
  line-height: 18px;
  margin: 0;
  z-index: 1;
  position: relative;
}

.eval-banner.orange .banner-illustration,
.eval-banner.blue .banner-illustration {
  position: absolute;
  right: 0;
  top: 0;
  width: 150px;
  height: 150px;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.eval-banner.orange .banner-circle,
.eval-banner.blue .banner-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.eval-banner.orange .circle-outer,
.eval-banner.blue .circle-outer {
  width: 150px;
  height: 150px;
  right: -75px;
  top: -75px;
}

.eval-banner.orange .circle-middle,
.eval-banner.blue .circle-middle {
  width: 130px;
  height: 130px;
  right: -65px;
  top: -65px;
  background: rgba(255, 255, 255, 0.15);
}

.eval-banner.orange .circle-inner,
.eval-banner.blue .circle-inner {
  width: 110px;
  height: 110px;
  right: -55px;
  top: -55px;
  background: rgba(255, 255, 255, 0.2);
}

.top-controls-with-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  gap: 20px;
}

.top-controls {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-shrink: 0;
  height: 48px;
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 4px;
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 60%;
  transform: translateY(-50%);
  color: #939393;
  pointer-events: none;
  z-index: 1;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-input {
  width: 300px;
  height: 48px;
  padding: 14px 18px;
  border-radius: 10px;
  border: 0.909091px solid #DEDEDE;
  background: white;
  font-family: 'Mona Sans', Inter, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #939393;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
}

.search-input::placeholder {
  color: #939393;
}

.search-input:focus {
  outline: none;
  border-color: #7B4CDE;
}

.filter-btn,
.export-btn {
  height: 48px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  font-family: 'Host Grotesk', Inter, sans-serif;
  font-size: 16px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0px 0px 10px rgba(255, 255, 255, 0.1);
}

.filter-btn {
  width: 110px;
  padding: 0 24px;
  background: #373458;
  color: #FFFFFF;
  height: 48px;
}

.filter-btn svg {
  width: 16px;
  height: 16px;
  stroke: white;
}

.filter-btn:hover {
  background: #2d2538;
}

.export-btn {
  width: 117px;
  padding: 0 24px;
  background: #827CD1;
  color: #FFFFFF;
  font-size: 14px;
  border-radius: 8px;
  height: 48px;
}

.export-btn svg {
  width: 16px;
  height: 16px;
  stroke: white;
}

.export-btn:hover {
  background: #6b61ed;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  line-height: 22px;
  margin: 0;
  color: #1E1E1E;
  font-family: 'Mona Sans', Inter, sans-serif;
  text-align: left;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 361px);
  gap: 20px;
  justify-content: start;
  align-items: start;
}

.eval-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 16px;
  gap: 12px;
  width: 100%;
  max-width: 361px;
  height: 133px;
  background: #FFFFFF;
  box-shadow: 0px -2px 14px rgba(0, 0, 0, 0.06), 0px 4px 16px rgba(0, 0, 0, 0.02);
  border-radius: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.eval-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.eval-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  height: auto;
}

.eval-header>div {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
}

.eval-header .calendar-icon {
  width: 38px;
  height: 38px;
  background: #8A5AEB;
  border: none;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.eval-header .calendar-icon svg {
  width: 22px;
  height: 22px;
  color: #FFFFFF;
}

.eval-header .date-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.eval-header h4 {
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  margin: 0;
  color: #2D3748;
  font-family: 'Mona Sans', Inter, sans-serif;
}

.eval-header .student-info {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  width: auto;
  height: 17px;
  white-space: nowrap;
}

.eval-header .student-info svg {
  width: 16px;
  height: 16px;
  color: #727A88;
}

.eval-header span {
  font-size: 12px;
  font-weight: 500;
  line-height: 17px;
  letter-spacing: -0.02em;
  color: #727A88;
  font-family: 'Mona Sans', Inter, sans-serif;
}

.eye-icon {
  width: 28px !important;
  height: 28px !important;
  background: #8A5AEB;
  border: none;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  min-width: 28px;
  max-width: 28px;
  position: relative;
}

.eye-icon svg {
  width: 16px;
  height: 16px;
  color: #FFFFFF;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.eye-icon:hover {
  background: #827CD1;
}

.eval-card hr {
  width: 100%;
  height: 0px;
  border: 0.5px solid rgba(11, 18, 21, 0.1);
  margin: 0;
}

.eval-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 39px;
}

.eval-bottom>div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.count {
  font-size: 16px;
  font-weight: 700;
  line-height: 20px;
  color: #2D3748;
  margin: 0;
  font-family: 'Mona Sans', Inter, sans-serif;
}

.eval-bottom span:not(.status) {
  font-size: 12px;
  font-weight: 500;
  line-height: 17px;
  color: #718096;
  font-family: 'Mona Sans', Inter, sans-serif;
}

.status {
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  line-height: 15px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: 'Plus Jakarta Sans', Inter, sans-serif;
}

.status.pending {
  background: #EBB83F;
  color: #FFFFFF;
  width: 84px;
  height: 28px;
}

.status.pending svg {
  width: 16px;
  height: 16px;
  stroke: white;
}

.status.completed {
  background: #00C172;
  color: #FFFFFF;
  width: 93px;
  height: 28px;
}

.status.completed svg {
  width: 16px;
  height: 16px;
  stroke: white;
}

@media (max-width:900px) {
  .evaluation-content {
    padding: 20px
  }

  .eval-banners-row {
    flex-direction: column
  }

  .eval-banner {
    width: 100%;
    height: auto;
    min-height: 160px
  }

  .eval-banner .banner-illustration {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    width: 200px;
    height: 200px;
    margin: 20px auto 0
  }

  .eval-banner .banner-circle {
    position: relative;
    margin: 0 auto
  }

  .eval-banner .banner-image {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    margin: 0 auto
  }

  .top-controls-with-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px
  }

  .section-title {
    margin-bottom: 0
  }

  .top-controls {
    flex-direction: row;
    align-items: center;
    width: 100%;
    flex-wrap: wrap
  }

  .search-input {
    width: 100%
  }

  .filter-btn,
  .export-btn {
    flex: 1;
    min-width: 120px
  }

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

  .eval-card {
    width: 100%;
    max-width: 361px
  }

  .eval-header {
    width: 100%
  }

  .eval-bottom {
    width: 100%
  }

  .eval-card hr {
    width: 100%
  }
}

@media (max-width:520px) {
  .evaluation-content {
    padding: 16px
  }

  .eval-page-title {
    font-size: 22px
  }

  .eval-banner {
    padding: 20px
  }

  .banner-text h2 {
    font-size: 18px
  }

  .banner-text h3 {
    font-size: 13px
  }

  .banner-btn {
    width: 100%;
    max-width: 165px
  }

  .banner-img {
    width: 180px
  }

  .stat-card {
    width: 100%
  }

  .stat-card h2 {
    font-size: 20px
  }

  .eval-card {
    width: 100%
  }

  .eval-header h4 {
    font-size: 13px
  }

  .count {
    font-size: 13px
  }

  .section-title {
    font-size: 18px
  }
}

/* Students Page Styles */
.students-topbar {
  background: #fbfdff;
}

/* Dashboard Page Styles */
/* Dashboard Topbar - Purple Gradient */
.topbar.dashboard-topbar {
  background: linear-gradient(135deg, #8B5CF6 0%, #A78BFA 50%, #C4B5FD 100%) !important;
  color: white !important;
  min-height: 84px !important;
  height: auto !important;
  position: relative;
  z-index: 100 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 20px 36px 350px 36px !important;
  padding-bottom: 350px !important;
  overflow: visible !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  box-sizing: border-box !important;
}

.topbar.dashboard-topbar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 350px !important;
  background: linear-gradient(135deg, #8B5CF6 0%, #A78BFA 50%, #C4B5FD 100%) !important;
  z-index: 0;
  opacity: 1;
}

.topbar.dashboard-topbar>* {
  position: relative !important;
  z-index: 101 !important;
  flex-shrink: 0 !important;
}

.topbar.dashboard-topbar .page-title {
  color: white !important;
  opacity: 1 !important;
  font-weight: 700 !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.2 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}

.topbar.dashboard-topbar .mobile-menu-toggle {
  color: white !important;
  opacity: 1 !important;
}

.topbar.dashboard-topbar .notif {
  background: rgba(255, 255, 255, 0.25) !important;
  color: white !important;
  opacity: 1 !important;
}

.topbar.dashboard-topbar .notif svg {
  color: white !important;
  opacity: 1 !important;
}

.topbar.dashboard-topbar .profile-meta .agency {
  color: rgba(255, 255, 255, 0.9) !important;
  opacity: 1 !important;
}

.topbar.dashboard-topbar .profile-meta .name {
  color: white !important;
  opacity: 1 !important;
  font-weight: 600 !important;
}

.topbar.dashboard-topbar .avatar {
  border: 2px solid rgba(255, 255, 255, 0.3) !important;
}

.topbar.dashboard-topbar .avatar-placeholder {
  border: 2px solid rgba(255, 255, 255, 0.3) !important;
  background: rgba(255, 255, 255, 0.2) !important;
  color: white !important;
}

/* Responsive styles for dashboard topbar */
@media (max-width: 900px) {
  .topbar.dashboard-topbar {
    min-height: 84px !important;
    padding: 20px 16px 350px 16px !important;
    padding-bottom: 350px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }
}

@media (max-width: 520px) {
  .topbar.dashboard-topbar {
    min-height: 84px !important;
    padding: 18px 14px 350px 14px !important;
    padding-bottom: 350px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }
}

/* Content below topbar - cards overlap */
body:has(.dashboard-topbar) .content,
.main:has(.dashboard-topbar) .content,
.dashboard-topbar~.content {
  margin-top: -350px !important;
  position: relative;
  z-index: 10;
  padding-top: 0 !important;
  background: #fbfdff;
}

body:has(.dashboard-topbar) .content .kpi-row,
.main:has(.dashboard-topbar) .content .kpi-row,
.dashboard-topbar~.content .kpi-row {
  margin-top: 40px !important;
  margin-bottom: 20px !important;
  position: relative;
  z-index: 20;
}

.students-content {
  background: #fbfdff;
  padding: 28px;
  color: #1E1E1E;
}

.students-content .page-title {
  margin-top: 0;
  margin-bottom: 8px;
}

.students-content .breadcrumb {
  margin-top: 0;
  margin-bottom: 20px;
}

/* Students Page Header */
.students-header {
  margin-bottom: 24px;
}

.students-header h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #1b2a36;
}

/* Students Stats Cards */
.students-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

.students-stats .stat-card {
  width: 260px;
  height: 90px;
  background: #ffffff;
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 8px 30px rgba(34, 40, 45, 0.05);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.students-stats .stat-card::before {
  content: '';
  position: absolute;
  right: -20px;
  top: -20px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.02) 0%, transparent 70%);
  border-radius: 50%;
}

.students-stats .stat-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  position: relative;
  z-index: 1;
  width: 100%;
}

.students-stats .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.students-stats .stat-icon svg {
  width: 24px;
  height: 24px;
}

.students-stats .stat-card-blue .stat-icon {
  background: linear-gradient(180deg, #4FC3F7, #29B6F6);
}

.students-stats .stat-card-green .stat-icon {
  background: linear-gradient(180deg, #66BB6A, #43A047);
}

.students-stats .stat-card-red .stat-icon {
  background: linear-gradient(180deg, #EF5350, #E53935);
}

.students-stats .stat-label {
  color: #9aa3b2;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 4px;
}

.students-stats .stat-number {
  font-weight: 800;
  font-size: 20px;
  color: #1b2a36;
  line-height: 1.2;
}

/* Students Panel */
.students-panel {
  background: #ffffff;
  padding: 22px;
  border-radius: 12px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.05);
}

.students-panel .panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.students-panel .panel-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #1b2a36;
}

.students-panel .panel-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
}

.students-panel .search-box {
  width: 300px;
  padding: 0 16px !important;
  padding-left: 24px !important;
  border-radius: 10px;
  border: 1px solid #e5e7ec;
  background: #fafafa;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  height: 40px;
  box-sizing: border-box;
  padding-top: 0 !important;
}

.students-panel .search-box svg {
  opacity: 0.6;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-left: 12px !important;
  margin-top: 12px !important;
  position: relative;
}

.students-panel .search-box input {
  border: 0;
  background: transparent;
  outline: none;
  font-weight: 600;
  font-size: 14px;
  flex: 1;
  color: #1b2a36;
  height: 100%;
  line-height: 1;
  padding: 0 !important;
  padding-top: 22px !important;
  padding-left: 8px !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
}

.students-panel .search-box input::placeholder {
  color: #9aa3b2;
}

.students-panel .btn {
  padding: 0 18px;
  border-radius: 10px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 14px;
  height: 40px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
}

.students-panel .filter-btn {
  background: #2b2b3c;
  color: #fff;
}

.students-panel .add-btn {
  background: linear-gradient(90deg, #7b61ff, #9e7dff);
  color: #fff;
}

/* Students Table */
.students-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
}

.students-table th {
  background: #faf7fb;
  padding: 14px;
  text-align: left;
  font-size: 14px;
  color: #7d8591;
  border-radius: 4px;
  font-weight: 700;
}

.students-table td {
  padding: 16px;
  border-bottom: 1px solid #f1f2f6;
  font-size: 14px;
  color: #525c67;
}

.student-name {
  display: flex;
  align-items: center;
  gap: 12px;
}

.student-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.students-panel .status-badge {
  padding: 6px 12px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(90deg, #5bd08a, #67d991);
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

.students-panel .status-badge.status-active {
  background: linear-gradient(90deg, #5bd08a, #67d991);
}

.students-panel .status-badge.status-inactive {
  background: linear-gradient(90deg, #ff6b6b, #ff888a);
}

/* Panel Footer */
.panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid #f1f2f6;
  margin-top: 12px;
  font-size: 14px;
  color: #7f8895;
}

.panel-footer .per-page select {
  padding: 6px;
  border-radius: 6px;
  border: 1px solid #e5e7ec;
  margin: 0 8px;
}

.panel-footer .pagination {
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-footer .page-nav,
.panel-footer .page-number {
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s;
}

.panel-footer .page-number.active {
  background: #7b61ff;
  color: #fff;
  font-weight: 700;
}

.panel-footer .page-nav:hover,
.panel-footer .page-number:hover {
  background: #f2f4f8;
}

/* Teachers Page Styles */
.teachers-topbar {
  background: #fbfdff;
}

.teachers-content {
  background: #fbfdff;
  padding: 32px;
}

.teachers-header {
  margin-bottom: 26px;
}

.teachers-stats {
  display: flex;
  gap: 18px;
}

.stat-card {
  width: 260px;
  height: 90px;
  background: #ffffff;
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 8px 30px rgba(34, 40, 45, 0.05);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  right: -20px;
  top: -20px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.02) 0%, transparent 70%);
  border-radius: 50%;
}

.stat-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon svg {
  width: 24px;
  height: 24px;
}

.stat-card-blue .stat-icon {
  background: linear-gradient(180deg, #4FC3F7, #29B6F6);
}

.stat-card-green .stat-icon {
  background: linear-gradient(180deg, #66BB6A, #43A047);
}

.stat-card-red .stat-icon {
  background: linear-gradient(180deg, #EF5350, #E53935);
}

.stat-number {
  font-weight: 800;
  font-size: 20px;
  color: #1b2a36;
  line-height: 1.2;
}

.stat-label {
  color: #9aa3b2;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 4px;
}

.teachers-panel {
  background: #ffffff;
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 12px 40px rgba(34, 40, 45, 0.05);
}

.panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.panel-title {
  margin: 0;
  font-weight: 700;
  font-size: 24px;
  color: #1b2a36;
}

.panel-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-box {
  display: flex;
  align-items: center;
  border: none;
  background: transparent;
  padding: 0;
  width: 300px;
  position: relative;
}

.search-box svg {
  width: 18px;
  height: 18px;
  opacity: 0.6;
  position: absolute;
  left: 8px;
  top: 5px;
  pointer-events: none;
  z-index: 1;
}

.search-input {
  border: 1px solid #1b2a36;
  background: #ffffff;
  outline: none;
  font-weight: 600;
  font-size: 14px;
  color: #1b2a36;
  width: 100%;
  padding: 10px 16px 10px 40px;
  border-radius: 10px;
}

.search-input::placeholder {
  color: #9aa3b2;
  font-weight: 500;
}

.panel-controls {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-filter {
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  background: #2b2b3c;
  color: #fff;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-filter:hover {
  background: #1a1a26;
}

.btn-filter svg {
  width: 16px;
  height: 16px;
}

.btn-add {
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(90deg, #7b61ff, #a776ff);
  color: #fff;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-add:hover {
  background: linear-gradient(90deg, #6b51ef, #9766ef);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(123, 97, 255, 0.3);
}

.btn-add svg {
  width: 16px;
  height: 16px;
}

.table-wrapper {
  overflow: auto;
  margin-top: 8px;
}

.teachers-table {
  width: 100%;
  border-collapse: collapse;
}

.teachers-table thead th {
  background: #faf7fb;
  color: #6b7480;
  padding: 18px 12px;
  text-align: left;
  font-weight: 700;
  font-size: 13px;
  border-radius: 8px;
  border: none;
}

.teachers-table thead th:first-child {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

.teachers-table thead th:last-child {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

.teachers-table tbody td {
  background: transparent;
  padding: 18px 12px;
  border-top: 1px solid #f0f1f5;
  vertical-align: middle;
  font-size: 14px;
  color: #1b2a36;
}

.teacher-name {
  display: flex;
  align-items: center;
  gap: 12px;
}

.teacher-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.status-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 12px;
}

.status-badge.active {
  background: linear-gradient(180deg, #b89dff, #9b7cff);
  color: #fff;
}

.status-badge.inactive {
  background: #f0f1f5;
  color: #6b7480;
}

.action-buttons {
  display: flex;
  gap: 10px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.2s;
}

.icon-view {
  background: #2b2b3c;
  color: #fff;
}

.icon-view:hover {
  background: #1a1a26;
}

.icon-edit {
  background: #eae6ff;
  color: #7b61ff;
}

.icon-edit:hover {
  background: #ddd5ff;
}

.icon-delete {
  background: #ffd6d9;
  color: #ff4d6d;
}

.icon-delete:hover {
  background: #ffc2c7;
}

.panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  margin-top: 8px;
  border-top: 1px solid #eef0f5;
}

.per-page {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #6b7480;
}

.per-page select {
  padding: 6px;
  border-radius: 6px;
  border: 1px solid #eef0f5;
  background: #fff;
  color: #1b2a36;
  font-weight: 600;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #6b7480;
}

.page-nav {
  cursor: pointer;
  padding: 4px 8px;
  transition: opacity 0.2s;
}

.page-nav:hover:not([style*="opacity: 0.5"]) {
  color: #7b61ff;
}

.page-numbers {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-number {
  cursor: pointer;
  padding: 4px 8px;
  transition: all 0.2s;
  border-radius: 4px;
}

.page-number:hover:not(.active) {
  background: #f0f0f0;
  color: #7b61ff;
}

.page-number.active {
  background: #7b61ff;
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 700;
}

/* Add Teacher Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  background: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  border-bottom: 1px solid #eef0f5;
}

.modal-header h2 {
  margin: 0;
  font-weight: 700;
  font-size: 24px;
  color: #1b2a36;
}

.close-btn {
  background: none;
  border: none;
  font-size: 32px;
  color: #6b7480;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s;
}

.close-btn:hover {
  background: #f0f1f5;
  color: #1b2a36;
}

.modal-body {
  padding: 24px;
}

.import-section {
  margin-bottom: 32px;
}

.import-section h3 {
  margin: 0 0 16px 0;
  font-weight: 700;
  font-size: 18px;
  color: #1b2a36;
}

.upload-area {
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  background: #fafbfc;
  transition: all 0.2s;
}

.upload-area:hover {
  border-color: #7b61ff;
  background: #f8f9ff;
}

.upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.cloud-icon {
  width: 48px;
  height: 48px;
  color: #7b61ff;
  margin-bottom: 8px;
}

.upload-text {
  margin: 0;
  font-weight: 600;
  font-size: 16px;
  color: #1b2a36;
}

.upload-hint {
  margin: 0;
  font-size: 13px;
  color: #9aa3b2;
}

.browse-btn {
  margin-top: 8px;
  padding: 10px 24px;
  background: linear-gradient(90deg, #7b61ff, #a776ff);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.browse-btn:hover {
  background: linear-gradient(90deg, #6b51ef, #9766ef);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(123, 97, 255, 0.3);
}

.form-section {
  margin-top: 24px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 12px;
}

.form-row:first-of-type {
  grid-template-columns: repeat(4, 1fr);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-weight: 600;
  font-size: 14px;
  color: #1b2a36;
}

.form-group input,
.form-group select {
  padding: 12px 16px;
  border: 1px solid #eef0f5;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #1b2a36;
  background: #fff;
  outline: none;
  transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  border-color: #7b61ff;
  box-shadow: 0 0 0 3px rgba(123, 97, 255, 0.1);
}

.form-group input::placeholder {
  color: #9aa3b2;
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%236b7480' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  padding-top: 0;
  width: 20%;
  margin-left: auto;
}

.btn-cancel {
  padding: 8px 20px;
  background: #2b2b3c;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 9px;
}

.btn-cancel:hover {
  background: #1a1a26;
}

.btn-submit {
  padding: 8px 20px;
  background: linear-gradient(90deg, #7b61ff, #a776ff);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.2s;
  height: 36px;
  box-sizing: border-box;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-submit:hover {
  background: linear-gradient(90deg, #6b51ef, #9766ef);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(123, 97, 255, 0.3);
}

.btn-submit svg {
  width: 14px;
  height: 14px;
}

/* Responsive */
@media (max-width:1000px) {
  .teachers-stats {
    flex-direction: column;
  }

  .stat-card {
    width: 100%;
  }

  .panel-top {
    flex-direction: column;
  }

  .search-box {
    width: 100%;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .modal-content {
    max-width: 100%;
    margin: 20px;
  }
}

.students-page-title {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 25px;
  color: #1E1E1E;
  background: none;
}

.stats-row {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 18px;
  background: #fff;
  padding: 22px;
  border-radius: 16px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.04);
}

.icon-area {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: #e0ecff;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-area svg {
  width: 24px;
  height: 24px;
}

.stat-card h4 {
  font-size: 15px;
  opacity: 0.7;
  margin: 0 0 4px 0;
  font-weight: 500;
  color: #1E1E1E;
}

.stat-card h2 {
  font-size: 26px;
  font-weight: 700;
  margin: 0;
  color: #1E1E1E;
}

.stat-card.blue .icon-area {
  background: #4A90E2;
}

.stat-card.green .icon-area {
  background: #52C41A;
}

.stat-card.red .icon-area {
  background: #FF4D4F;
}

.students-card {
  background: #fff;
  padding: 25px;
  border-radius: 18px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.students-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.students-header h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.controls {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.search-input {
  padding: 10px 15px;
  border-radius: 12px;
  border: 1px solid #ddd;
  width: 200px;
  height: 40px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  background: #fff;
  color: #1E1E1E;
  margin-top: 4px;
  box-sizing: border-box;
}

.search-input:focus {
  outline: none;
  border-color: #7d73ff;
}

.filter-btn,
.export-btn {
  padding: 10px 22px;
  border-radius: 12px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  margin-top: 4px;
  box-sizing: border-box;
}

.filter-btn svg,
.export-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

.filter-btn {
  background: #3d3552;
  color: #fff;
}

.filter-btn:hover {
  background: #2d2538;
}

.export-btn {
  background: #7d73ff;
  color: #fff;
}

.export-btn:hover {
  background: #6b61ed;
}

.students-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.students-table thead {
  background: #F2F3F7;
  border-radius: 12px;
}

.students-table thead th {
  padding: 15px 10px;
  font-weight: 600;
  text-align: left;
}

.students-table tbody td {
  padding: 16px 10px;
  border-bottom: 1px solid #F2F3F7;
  color: #1E1E1E;
}

.students-table tbody tr:last-child td {
  border-bottom: none;
}

.students-table tbody tr:hover {
  background: #F9FAFB;
}

.students-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #7d73ff;
}

.action-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: #8A5AEB;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  padding: 0;
  text-decoration: none;
}

.action-btn:hover {
  background: #7A4ADB;
}

.action-btn svg {
  width: 16px;
  height: 16px;
}

.action-btn svg path {
  stroke: #FFFFFF;
  fill: none;
}

/* Student Details Page Styles */
:root {
  --student-primary: #6A4EFF;
  --student-primary-dark: #3E2C99;
  --student-bg: #F4F6FB;
  --student-white: #ffffff;
  --student-text-dark: #1f1f1f;
  --student-text-light: #6c6c6c;
  --student-border: #e4e4e4;
  --student-sidebar-width: 240px;
  --student-radius: 12px;
}

.student-details-layout {
  display: flex;
  height: 100vh;
  width: 100%;
  background: var(--student-bg);
  color: var(--student-text-dark);
}

/* Student details layout uses standard sidebar */
.student-details-layout .sidebar {
  width: var(--student-sidebar-width);
}

.student-details-logo {
  text-align: center;
  margin-bottom: 40px;
}

.student-details-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.student-details-menu-item {
  padding: 12px 24px;
  font-size: 15px;
  color: var(--student-text-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: all 0.2s;
}

.student-details-menu-item:hover {
  background: rgba(106, 78, 255, 0.1);
}

.student-details-menu-item.active {
  background: var(--student-primary);
  color: #fff;
  font-weight: 600;
  border-radius: 8px;
}

.student-details-logout {
  padding: 12px 24px;
  color: var(--student-text-light);
  cursor: pointer;
  margin-top: auto;
  text-decoration: none;
  transition: all 0.2s;
}

.student-details-logout:hover {
  color: var(--student-text-dark);
}

/* Student Details Content */
.student-details-content {
  padding: 32px 48px;
  flex: 1;
}

/* Topbar styles for student details page */
.student-details-topbar {
  background: #fbfdff;
}


.student-details-card {
  background: var(--student-primary-dark);
  padding: 28px;
  color: #fff;
  border-radius: var(--student-radius);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.student-details-card img {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  object-fit: cover;
}

.student-details-export-btn {
  background: rgba(255, 255, 255, 0.17);
  padding: 10px 22px;
  border-radius: 8px;
  cursor: pointer;
  color: #fff;
  font-size: 14px;
  transition: all 0.2s;
}

.student-details-export-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Tab section */
.student-details-tabs {
  margin-top: 28px;
  display: flex;
  gap: 28px;
  border-bottom: 1px solid var(--student-border);
}

.student-details-tab {
  padding-bottom: 12px;
  cursor: pointer;
  font-weight: 500;
  color: var(--student-text-light);
  transition: all 0.2s;
}

.student-details-tab:hover {
  color: var(--student-primary-dark);
}

.student-details-tab.active {
  color: var(--student-primary-dark);
  border-bottom: 3px solid var(--student-primary-dark);
}

/* Tab Content */
.student-details-tab-content {
  display: none;
  margin-top: 20px;
}

.student-details-tab-content.active {
  display: block;
}

.student-details-details-card {
  background: #fff;
  padding: 28px;
  border-radius: var(--student-radius);
  margin-top: 20px;
}

.student-details-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  row-gap: 22px;
  column-gap: 40px;
}

/* Add spacing for the 4th column (Class, Relationship, Blood Group) */
.student-details-grid>.student-details-detail:nth-child(4),
.student-details-grid>.student-details-detail:nth-child(8),
.student-details-grid>.student-details-detail:nth-child(12) {
  padding-left: 30px;
}

.student-details-detail h4 {
  margin: 0;
  color: var(--student-text-light);
  font-size: 14px;
  font-weight: 400;
}

.student-details-detail p {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--student-text-dark);
}

@media (max-width: 1400px) {
  .student-details-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .student-details-detail[style*="grid-column: span 2"] {
    grid-column: span 3 !important;
  }
}

@media (max-width: 1200px) {
  .student-details-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .student-details-detail[style*="grid-column: span"] {
    grid-column: span 2 !important;
  }
}

@media (max-width: 900px) {
  .student-details-content {
    padding: 20px;
  }

  .student-details-grid {
    grid-template-columns: 1fr;
  }

  .student-details-detail[style*="grid-column: span"] {
    grid-column: span 1 !important;
  }

  .student-details-card {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .student-details-grid {
    grid-template-columns: 1fr;
  }

  .student-details-detail[style*="grid-column: span"] {
    grid-column: span 1 !important;
  }

  .student-details-card {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }
}

@media (max-width:900px) {
  .students-content {
    padding: 20px
  }

  .stats-row {
    flex-direction: column
  }

  .students-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px
  }

  .controls {
    flex-direction: column;
    width: 100%
  }

  .search-input {
    width: 100%
  }

  .filter-btn,
  .export-btn {
    width: 100%
  }

  .students-table {
    font-size: 12px
  }

  .students-table thead th,
  .students-table tbody td {
    padding: 12px 8px
  }

  .students-table {
    display: block;
    overflow-x: auto
  }

  .student-details-grid {
    grid-template-columns: 1fr
  }

  .student-profile-header {
    flex-direction: column;
    text-align: center
  }
}

/* ============================================
   ATTENDANCE REPORT STYLES
   ============================================ */

.attendance-content-grid {
  margin-top: 25px;
  display: grid;
  grid-template-columns: 65% 35%;
  gap: 25px;
}

.attendance-calendar-card {
  background: white;
  padding: 25px;
  border-radius: 12px;
}

.attendance-calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.attendance-calendar-header h4 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1E1E1E;
}

.calendar-nav-btn {
  background: #f1f4f8;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.calendar-nav-btn:hover {
  background: #e5e7eb;
  color: #1E1E1E;
}

.attendance-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
}

.attendance-day-label {
  text-align: center;
  font-weight: 600;
  color: #9a9a9a;
  font-size: 13px;
  padding: 8px 0;
}

.attendance-day {
  background: #eef0f7;
  height: 75px;
  border-radius: 10px;
  padding: 8px;
  font-weight: 600;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  color: #1E1E1E;
}

.attendance-day.empty {
  background: transparent;
}

.attendance-day.absent {
  background: #ff6b6b;
  color: white;
}

.attendance-day.absent .day-number {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}

.attendance-day.absent .absent-label {
  position: absolute;
  bottom: 6px;
  left: 6px;
  font-size: 11px;
  font-weight: 500;
  display: block;
}

.attendance-stats {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.attendance-stat-card {
  background: #f5f7fb;
  padding: 18px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 15px;
  position: relative;
}

.attendance-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.attendance-icon.orange {
  background: #ffb84d;
}

.attendance-icon.purple {
  background: #a26cf8;
}

.attendance-icon.red {
  background: #ff6b6b;
}

.attendance-icon svg {
  width: 20px;
  height: 20px;
}

.attendance-stat-card>div:not(.attendance-icon) {
  flex: 1;
}

.attendance-stat-card h4 {
  font-size: 24px;
  margin: 0;
  font-weight: 700;
  color: #1E1E1E;
  line-height: 1.2;
}

.attendance-stat-card p {
  margin: 4px 0 0;
  font-size: 13px;
  color: #7b7b7b;
  line-height: 1.4;
}

.attendance-increase {
  position: absolute;
  right: 15px;
  top: 15px;
  background: #e5f9e7;
  color: #26a645;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.attendance-absent-table {
  background: white;
  padding: 22px;
  border-radius: 12px;
  margin-top: 20px;
}

.attendance-absent-table h3 {
  margin: 0 0 15px 0;
  font-size: 18px;
  font-weight: 700;
  color: #1E1E1E;
}

.attendance-absent-table table {
  width: 100%;
  border-collapse: collapse;
}

.attendance-absent-table thead {
  background: #f5f7fb;
  border-radius: 8px 8px 0 0;
}

.attendance-absent-table thead tr {
  border-radius: 8px 8px 0 0;
}

.attendance-absent-table th {
  text-align: left;
  color: #7b7b7b;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 0;
  background: #f5f7fb;
}

.attendance-absent-table td {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  font-size: 14px;
  color: #1E1E1E;
}

.attendance-absent-table tbody tr:last-child td {
  border-bottom: none;
}

/* Responsive styles for attendance report */
@media (max-width: 1200px) {
  .attendance-content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .attendance-calendar-card {
    padding: 16px;
  }

  .attendance-calendar-grid {
    gap: 8px;
  }

  .attendance-day {
    height: 60px;
    font-size: 14px;
  }

  .attendance-stat-card {
    padding: 14px;
  }

  .attendance-stat-card h4 {
    font-size: 18px;
  }
}

/* ============================================
   ATTENDANCE PAGE STYLES
   ============================================ */

.attendance-topbar {
  background: #fbfdff;
}

.attendance-content {
  padding: 25px 40px;
}

/* Top Cards */
.attendance-top-cards {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
  align-items: stretch;
}

.attendance-card {
  padding: 20px;
  border-radius: 14px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Override background for banner cards - stat cards only */
.attendance-card.stat-card.stat-orange,
.attendance-card.stat-card.stat-pink,
.attendance-card.stat-card.stat-blue {
  background: transparent !important;
}

.attendance-card.stat-card {
  padding: 30px !important;
  border-radius: 16px !important;
  height: 160px !important;
  box-shadow: none !important;
  background: transparent !important;
}

.attendance-card.take-attendance {
  padding: 30px !important;
  border-radius: 16px !important;
  height: 160px !important;
  box-shadow: none !important;
  /* Background will be set by .attendance-card.take-attendance rule below */
}

/* Take Attendance Banner */
.attendance-card.take-attendance {
  background: linear-gradient(135deg, #00C4FC 0%, #00A8D9 100%) !important;
  color: white;
  position: relative;
  overflow: hidden;
  height: 160px !important;
  padding: 30px !important;
  border-radius: 16px !important;
  filter: drop-shadow(4px 4px 0px rgba(31, 174, 215, 0.25)) !important;
}

.take-attendance::before {
  content: '';
  position: absolute;
  width: 238px;
  height: 238px;
  right: 0px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  z-index: 0;
}

.take-attendance::after {
  content: '';
  position: absolute;
  width: 172px;
  height: 173px;
  right: 33px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  z-index: 0;
}

.take-attendance-text {
  position: relative;
  z-index: 2;
}

.take-attendance-text h3 {
  font-size: 20px;
  margin-bottom: 12px;
  font-weight: 600;
  color: white;
  font-family: 'Inter', sans-serif;
}

.start-attendance-btn {
  background: white;
  border: none;
  color: #00C4FC;
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 165px;
  height: 44px;
  box-shadow: 0px 0px 10px rgba(255, 255, 255, 0.1);
  justify-content: center;
}

.start-attendance-btn svg {
  width: 20px;
  height: 20px;
  stroke: #00C4FC;
}

.start-attendance-btn:hover {
  background: #f0f0f0;
  transform: translateY(-1px);
}

.take-attendance-illustration {
  position: absolute;
  right: 90px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.9;
  z-index: 1;
  width: 122px;
  height: 126px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.take-attendance-illustration img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Stats cards */
.attendance-card.stat-card {
  color: white;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
  height: 160px !important;
  padding: 30px !important;
  border-radius: 16px !important;
}

.attendance-card.stat-card .stat-icon-hex {
  position: absolute;
  top: 20px;
  left: 20px;
  opacity: 0.7;
  z-index: 1;
}

.attendance-card.stat-card p {
  font-size: 14px;
  margin: 0;
  margin-top: 55px;
  opacity: 0.95;
  font-weight: 500;
  position: relative;
  z-index: 2;
  color: white;
}

.attendance-card.stat-card h1 {
  margin-top: 8px;
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  position: relative;
  z-index: 2;
  color: white;
}

.attendance-card.stat-card.stat-orange {
  background: #FF9452 !important;
  filter: drop-shadow(4px 4px 0px rgba(255, 139, 67, 0.25)) !important;
}

.attendance-card.stat-card.stat-orange::before {
  content: '';
  position: absolute;
  width: 238px;
  height: 238px;
  right: 0px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  z-index: 0;
}

.attendance-card.stat-card.stat-orange::after {
  content: '';
  position: absolute;
  width: 172px;
  height: 173px;
  right: 33px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  z-index: 0;
}

.attendance-card.stat-card.stat-pink {
  background: #D63DF1 !important;
  filter: drop-shadow(4px 4px 0px rgba(214, 61, 241, 0.25)) !important;
}

.attendance-card.stat-card.stat-pink::before {
  content: '';
  position: absolute;
  width: 238px;
  height: 238px;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  z-index: 0;
}

.attendance-card.stat-card.stat-pink::after {
  content: '';
  position: absolute;
  width: 172px;
  height: 173px;
  right: 41px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  z-index: 0;
}

.attendance-card.stat-card.stat-blue {
  background: #00C4FC !important;
  filter: drop-shadow(4px 4px 0px rgba(31, 174, 215, 0.25)) !important;
}

.attendance-card.stat-card.stat-blue::before {
  content: '';
  position: absolute;
  width: 238px;
  height: 238px;
  right: 0px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  z-index: 0;
}

.attendance-card.stat-card.stat-blue::after {
  content: '';
  position: absolute;
  width: 172px;
  height: 173px;
  right: 33px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  z-index: 0;
}

/* Report Box */
.attendance-report {
  background: white;
  padding: 25px;
  border-radius: 14px;
  margin-top: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.attendance-report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.attendance-report-header h3 {
  font-size: 20px;
  font-weight: 600;
  color: #1E1E1E;
  margin: 0;
}

.attendance-tools {
  display: flex;
  gap: 12px;
}

.attendance-search {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-size: 14px;
  width: 200px;
  height: 44px;
  box-sizing: border-box;
}

.attendance-filter,
.attendance-export {
  background: #6a5acd;
  color: white;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s;
  height: 44px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

.attendance-filter:hover,
.attendance-export:hover {
  background: #5a4abd;
}

/* Calendar */
.attendance-calendar-container {
  margin-top: 20px;
}

.attendance-cal-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.attendance-cal-nav h4 {
  font-size: 18px;
  font-weight: 600;
  color: #1E1E1E;
  margin: 0;
}

.cal-nav-btn {
  cursor: pointer;
  color: #6a5acd;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background 0.2s;
}

.cal-nav-btn:hover {
  background: #f0f0f0;
}

.attendance-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  min-height: 400px;
  width: 100%;
}

.attendance-day-label {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #999;
  padding-bottom: 5px;
}

.attendance-day {
  background: #ffffff;
  height: 95px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 8px;
  font-size: 14px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  color: #333;
  min-height: 95px;
  box-sizing: border-box;
  overflow: visible;
}

.attendance-day strong {
  display: block;
  font-weight: 700;
  color: #1E1E1E;
  margin-bottom: 4px;
}

.attendance-day.empty {
  background: transparent;
  border: none;
}

.attendance-day.prev-month {
  color: #999;
  opacity: 0.7;
}

.attendance-day.current-month {
  font-weight: 600;
}

.attendance-day.current-month strong {
  font-weight: 700;
  color: #1E1E1E;
}

.attendance-day.selected {
  border: 2px solid #4a8bff;
  background: #e8f1ff;
}

.attendance-day .small {
  font-size: 12px;
  color: #777;
  margin-top: 4px;
}

.attendance-badge {
  position: relative;
  width: fit-content;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 10px;
  margin-top: 4px;
  display: inline-block;
  font-weight: 600;
}

.attendance-badge.green {
  background: #e5f9e7;
  color: #1e9e42;
}

.attendance-badge.red {
  background: #ffe3e3;
  color: #d93333;
}

/* Responsive Styles for Attendance Page */
@media (max-width: 1200px) {
  .attendance-top-cards {
    grid-template-columns: 1fr 1fr;
  }

  .take-attendance {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .attendance-content {
    padding: 20px;
  }

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

  .attendance-report-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .attendance-tools {
    width: 100%;
    flex-wrap: wrap;
  }

  .attendance-search {
    width: 100%;
  }

  .attendance-filter,
  .attendance-export {
    flex: 1;
    min-width: 120px;
  }

  .attendance-calendar-grid {
    gap: 6px;
  }

  .attendance-day {
    height: 80px;
    padding: 6px;
    font-size: 12px;
  }

  .attendance-badge {
    font-size: 9px;
    padding: 1px 4px;
  }
}

@media (max-width: 520px) {
  .attendance-content {
    padding: 16px;
  }

  .attendance-card:not(.stat-card):not(.take-attendance) {
    padding: 16px;
  }

  .take-attendance-text h3 {
    font-size: 18px;
  }

  .stat-card h1 {
    font-size: 28px;
  }

  .attendance-report {
    padding: 20px;
  }

  .attendance-day {
    height: 70px;
    font-size: 11px;
  }
}

/* Attendance Detail Modal */
.attendance-detail-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.attendance-detail-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}


.attendance-detail-content {
  padding: 26px 36px;
  background: linear-gradient(180deg, #fbfdff 0, #fbfdff 100%);
  min-height: calc(100vh - 84px);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.attendance-detail-breadcrumbs {
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
}

.attendance-detail-breadcrumbs span {
  font-weight: 600;
  color: #333;
}

.attendance-detail-topbar {
  background: #fbfdff;
}


.attendance-detail-report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.attendance-detail-report-tools {
  display: flex;
  align-items: center;
  gap: 14px;
}

.attendance-detail-date {
  padding: 10px 14px;
  border: 1px solid #DADADA;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #333;
}

.attendance-detail-date svg {
  width: 16px;
  height: 16px;
  color: #666;
  flex-shrink: 0;
}

.attendance-detail-export-btn {
  padding: 10px 22px;
  background: #A084FF;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  border: none;
  font-weight: 500;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.attendance-detail-export-btn svg {
  width: 16px;
  height: 16px;
}

.attendance-detail-export-btn:hover {
  background: #8b6fff;
}

.attendance-detail-close {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #E6E6E6;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.2s;
}

.attendance-detail-close:hover {
  background: #f5f5f5;
  border-color: #ccc;
}

.attendance-detail-cards {
  display: flex;
  gap: 22px;
  margin-bottom: 32px;
  margin-top: 0;
  padding: 0 36px;
  background: linear-gradient(180deg, #fbfdff 0, #fbfdff 100%);
}

.attendance-detail-card {
  width: 210px;
  padding: 22px;
  border-radius: 16px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.attendance-detail-card-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 13px;
  z-index: 1;
  position: relative;
  flex-shrink: 0;
}

.attendance-detail-card-icon svg {
  width: 40px;
  height: 40px;
}

.attendance-detail-card p {
  font-size: 15px;
  opacity: 0.9;
  margin: 0 0 4px 0;
  line-height: 1.4;
  z-index: 1;
  position: relative;
  font-weight: 400;
}

.attendance-detail-card h2 {
  font-size: 34px;
  font-weight: 700;
  margin: 0;
  line-height: 1;
  z-index: 1;
  position: relative;
  color: #fff;
}

.attendance-detail-card-orange {
  background: #FF9B4E;
  position: relative;
}

.attendance-detail-card-orange::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  z-index: 0;
}

.attendance-detail-card-orange::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  z-index: 0;
}

.attendance-detail-card-pink {
  background: #FF6FAE;
  position: relative;
}

.attendance-detail-card-pink::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  z-index: 0;
}

.attendance-detail-card-pink::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  z-index: 0;
}

.attendance-detail-card-blue {
  background: #3AB8FF;
  position: relative;
}

.attendance-detail-card-blue::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  z-index: 0;
}

.attendance-detail-card-blue::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  z-index: 0;
}

.attendance-detail-report-box {
  background: #fff;
  border-radius: 16px;
  padding: 26px 28px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

.attendance-detail-report-box h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: #333;
}

.attendance-detail-report-box table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.attendance-detail-report-box th {
  text-align: left;
  padding: 14px 10px;
  color: #666;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid #EFEFEF;
  background: transparent;
}

.attendance-detail-report-box td {
  padding: 18px 10px;
  border-bottom: 1px solid #F1F1F1;
  vertical-align: middle;
}

.attendance-detail-report-box tbody tr:last-child td {
  border-bottom: none;
}

.attendance-detail-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.attendance-detail-avatar {
  height: 38px;
  width: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8A5AEB 0%, #6f4ade 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
  flex-shrink: 0;
}

.attendance-detail-circle {
  height: 18px;
  width: 18px;
  border-radius: 50%;
  border: 2px solid #CFCFCF;
  display: inline-block;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.attendance-detail-circle:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.attendance-detail-circle:focus {
  outline: 2px solid #8A5AEB;
  outline-offset: 2px;
}

.attendance-detail-circle.present {
  border-color: #4CD964;
  background: #4CD964;
}

.attendance-detail-circle.absent {
  border-color: #FF4D4D;
  background: #FF4D4D;
}

.attendance-detail-note-input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #DADADA;
  border-radius: 10px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s;
}

.attendance-detail-note-input:focus {
  outline: none;
  border-color: #8A5AEB;
}

@media (max-width: 900px) {
  .attendance-detail-content {
    width: 95%;
    padding: 20px;
    max-height: 95vh;
  }

  .attendance-detail-cards {
    flex-direction: column;
    gap: 12px;
  }

  .attendance-detail-card {
    width: 100%;
  }

  .attendance-detail-report-box {
    padding: 20px;
    overflow-x: auto;
  }

  .attendance-detail-report-box table {
    min-width: 600px;
  }
}

/ *   B e h a v i o u r   O b s e r v a t i o n s   P a g e   S t y l e s   * /         . p a g e - t i t l e - m a i n    {
           f o n t - s i z e :    2 4 p x ;
           f o n t - w e i g h t :    7 0 0 ;
           c o l o r :    # 1 E 1 E 1 E ;
           m a r g i n :    0   0   2 4 p x   0 ;
       
}

         / *   S t a t   C a r d s   R o w   * /     . b e h a v i o u r - c a r d s - r o w    {
           d i s p l a y :    f l e x ;
           g a p :    2 2 p x ;
           m a r g i n - b o t t o m :    3 2 p x ;
       
}

         / *   B e h a v i o u r   C a r d s   * /     . b e h a v i o u r - c a r d    {
           b o r d e r - r a d i u s :    1 6 p x ;
           p a d d i n g :    2 2 p x ;
           p o s i t i o n :    r e l a t i v e ;
           o v e r f l o w :    h i d d e n ;
           b o x - s h a d o w :    0   4 p x   1 2 p x   r g b a ( 0 ,    0 ,    0 ,    0 . 1 ) ;
           d i s p l a y :    f l e x ;
           f l e x - d i r e c t i o n :    c o l u m n ;
           m i n - h e i g h t :    1 6 0 p x ;
       
}

         . b e h a v i o u r - c a r d - p u r p l e    {
           b a c k g r o u n d :    l i n e a r - g r a d i e n t ( 1 3 5 d e g ,    # 8 A 5 A E B   0 % ,    # 6 F 4 B F F   1 0 0 % ) ;
           c o l o r :    w h i t e ;
           f l e x :    1 ;
           m i n - w i d t h :    3 0 0 p x ;
       
}

         . b e h a v i o u r - c a r d - o r a n g e    {
           b a c k g r o u n d :    # F F 9 B 4 E ;
           c o l o r :    w h i t e ;
           w i d t h :    2 1 0 p x ;
       
}

         . b e h a v i o u r - c a r d - b l u e    {
           b a c k g r o u n d :    # 3 A B 8 F F ;
           c o l o r :    w h i t e ;
           w i d t h :    2 1 0 p x ;
       
}

         . b e h a v i o u r - c a r d - c o n t e n t    {
           d i s p l a y :    f l e x ;
           f l e x - d i r e c t i o n :    c o l u m n ;
           j u s t i f y - c o n t e n t :    s p a c e - b e t w e e n ;
           h e i g h t :    1 0 0 % ;
           z - i n d e x :    1 ;
           p o s i t i o n :    r e l a t i v e ;
       
}

         . b e h a v i o u r - c a r d - h e a d e r   h 3    {
           f o n t - s i z e :    2 0 p x ;
           f o n t - w e i g h t :    7 0 0 ;
           m a r g i n :    0   0   4 p x   0 ;
       
}

         . b e h a v i o u r - c a r d - h e a d e r   p    {
           f o n t - s i z e :    1 4 p x ;
           o p a c i t y :    0 . 9 ;
           m a r g i n :    0 ;
       
}

         . b e h a v i o u r - s u b m i t - b t n    {
           m a r g i n - t o p :    1 6 p x ;
           p a d d i n g :    1 0 p x   2 0 p x ;
           b a c k g r o u n d :    r g b a ( 2 5 5 ,    2 5 5 ,    2 5 5 ,    0 . 2 ) ;
           b o r d e r :    1 p x   s o l i d   r g b a ( 2 5 5 ,    2 5 5 ,    2 5 5 ,    0 . 3 ) ;
           b o r d e r - r a d i u s :    8 p x ;
           c o l o r :    w h i t e ;
           f o n t - s i z e :    1 4 p x ;
           f o n t - w e i g h t :    6 0 0 ;
           c u r s o r :    p o i n t e r ;
           d i s p l a y :    f l e x ;
           a l i g n - i t e m s :    c e n t e r ;
           g a p :    8 p x ;
           w i d t h :    f i t - c o n t e n t ;
           t r a n s i t i o n :    a l l   0 . 2 s ;
       
}

         . b e h a v i o u r - s u b m i t - b t n : h o v e r    {
           b a c k g r o u n d :    r g b a ( 2 5 5 ,    2 5 5 ,    2 5 5 ,    0 . 3 ) ;
           t r a n s f o r m :    t r a n s l a t e Y ( - 1 p x ) ;
       
}

         . b e h a v i o u r - c a r d - i l l u s t r a t i o n    {
           p o s i t i o n :    a b s o l u t e ;
           r i g h t :    - 2 0 p x ;
           t o p :    - 2 0 p x ;
           w i d t h :    1 5 0 p x ;
           h e i g h t :    1 5 0 p x ;
           o p a c i t y :    0 . 3 ;
           z - i n d e x :    0 ;
       
}

         . b e h a v i o u r - c a r d - i c o n    {
           w i d t h :    4 0 p x ;
           h e i g h t :    4 0 p x ;
           b a c k g r o u n d :    r g b a ( 2 5 5 ,    2 5 5 ,    2 5 5 ,    0 . 3 ) ;
           b o r d e r - r a d i u s :    8 p x ;
           d i s p l a y :    f l e x ;
           a l i g n - i t e m s :    c e n t e r ;
           j u s t i f y - c o n t e n t :    c e n t e r ;
           m a r g i n - b o t t o m :    1 2 p x ;
       
}

         . b e h a v i o u r - c a r d - i c o n   s v g    {
           c o l o r :    w h i t e ;
       
}

         . b e h a v i o u r - c a r d - n u m b e r    {
           f o n t - s i z e :    3 4 p x ;
           f o n t - w e i g h t :    7 0 0 ;
           m a r g i n :    8 p x   0 ;
           l i n e - h e i g h t :    1 ;
       
}

         . b e h a v i o u r - c a r d - l a b e l    {
           f o n t - s i z e :    1 5 p x ;
           o p a c i t y :    0 . 9 ;
           m a r g i n - t o p :    4 p x ;
       
}

         / *   B e h a v i o u r   R e p o r t s   S e c t i o n   * /     . b e h a v i o u r - r e p o r t s - s e c t i o n    {
           m a r g i n - t o p :    3 2 p x ;
       
}

         . b e h a v i o u r - r e p o r t s - h e a d e r    {
           d i s p l a y :    f l e x ;
           j u s t i f y - c o n t e n t :    s p a c e - b e t w e e n ;
           a l i g n - i t e m s :    c e n t e r ;
           m a r g i n - b o t t o m :    2 0 p x ;
           f l e x - w r a p :    w r a p ;
           g a p :    1 6 p x ;
       
}

         . b e h a v i o u r - r e p o r t s - t i t l e    {
           f o n t - s i z e :    2 0 p x ;
           f o n t - w e i g h t :    7 0 0 ;
           c o l o r :    # 1 E 1 E 1 E ;
           m a r g i n :    0 ;
       
}

         . b e h a v i o u r - r e p o r t s - c o n t r o l s    {
           d i s p l a y :    f l e x ;
           a l i g n - i t e m s :    c e n t e r ;
           g a p :    1 2 p x ;
       
}

         . b e h a v i o u r - s e a r c h - b o x    {
           d i s p l a y :    f l e x ;
           a l i g n - i t e m s :    c e n t e r ;
           g a p :    8 p x ;
           p a d d i n g :    1 0 p x   1 4 p x ;
           b a c k g r o u n d :    w h i t e ;
           b o r d e r :    1 p x   s o l i d   # D A D A D A ;
           b o r d e r - r a d i u s :    1 0 p x ;
           m i n - w i d t h :    2 0 0 p x ;
       
}

         . b e h a v i o u r - s e a r c h - b o x   s v g    {
           c o l o r :    # 7 b 7 b 7 b ;
           f l e x - s h r i n k :    0 ;
       
}

         . b e h a v i o u r - s e a r c h - i n p u t    {
           b o r d e r :    n o n e ;
           o u t l i n e :    n o n e ;
           f o n t - s i z e :    1 4 p x ;
           c o l o r :    # 3 3 3 ;
           w i d t h :    1 0 0 % ;
           b a c k g r o u n d :    t r a n s p a r e n t ;
       
}

         . b e h a v i o u r - s e a r c h - i n p u t : : p l a c e h o l d e r    {
           c o l o r :    # 9 9 9 ;
       
}

         . b e h a v i o u r - f i l t e r - b t n ,
     . b e h a v i o u r - e x p o r t - b t n    {
           p a d d i n g :    1 0 p x   1 8 p x ;
           b a c k g r o u n d :    w h i t e ;
           b o r d e r :    1 p x   s o l i d   # D A D A D A ;
           b o r d e r - r a d i u s :    1 0 p x ;
           f o n t - s i z e :    1 4 p x ;
           f o n t - w e i g h t :    5 0 0 ;
           c o l o r :    # 3 3 3 ;
           c u r s o r :    p o i n t e r ;
           d i s p l a y :    f l e x ;
           a l i g n - i t e m s :    c e n t e r ;
           g a p :    8 p x ;
           t r a n s i t i o n :    a l l   0 . 2 s ;
       
}

         . b e h a v i o u r - f i l t e r - b t n : h o v e r ,
     . b e h a v i o u r - e x p o r t - b t n : h o v e r    {
           b a c k g r o u n d :    # f 5 f 5 f 5 ;
           b o r d e r - c o l o r :    # c c c ;
       
}

         . b e h a v i o u r - f i l t e r - b t n   s v g ,
     . b e h a v i o u r - e x p o r t - b t n   s v g    {
           c o l o r :    # 7 b 7 b 7 b ;
       
}

         / *   R e p o r t s   G r i d   * /     . b e h a v i o u r - r e p o r t s - g r i d    {
           d i s p l a y :    g r i d ;
           g r i d - t e m p l a t e - c o l u m n s :    r e p e a t ( a u t o - f i l l ,    m i n m a x ( 3 0 0 p x ,    1 f r ) ) ;
           g a p :    2 0 p x ;
       
}

         . b e h a v i o u r - r e p o r t - c a r d    {
           b a c k g r o u n d :    w h i t e ;
           b o r d e r - r a d i u s :    1 2 p x ;
           p a d d i n g :    2 0 p x ;
           b o x - s h a d o w :    0   2 p x   8 p x   r g b a ( 0 ,    0 ,    0 ,    0 . 0 5 ) ;
           p o s i t i o n :    r e l a t i v e ;
           t r a n s i t i o n :    a l l   0 . 2 s ;
       
}

         . b e h a v i o u r - r e p o r t - c a r d : h o v e r    {
           b o x - s h a d o w :    0   4 p x   1 2 p x   r g b a ( 0 ,    0 ,    0 ,    0 . 1 ) ;
           t r a n s f o r m :    t r a n s l a t e Y ( - 2 p x ) ;
       
}

         . b e h a v i o u r - v i e w - b t n    {
           p o s i t i o n :    a b s o l u t e ;
           t o p :    1 6 p x ;
           r i g h t :    1 6 p x ;
           w i d t h :    3 2 p x ;
           h e i g h t :    3 2 p x ;
           b a c k g r o u n d :    # 8 A 5 A E B ;
           b o r d e r :    n o n e ;
           b o r d e r - r a d i u s :    8 p x ;
           d i s p l a y :    f l e x ;
           a l i g n - i t e m s :    c e n t e r ;
           j u s t i f y - c o n t e n t :    c e n t e r ;
           c u r s o r :    p o i n t e r ;
           t r a n s i t i o n :    a l l   0 . 2 s ;
           z - i n d e x :    1 ;
       
}

         . b e h a v i o u r - v i e w - b t n : h o v e r    {
           b a c k g r o u n d :    # 6 F 4 B F F ;
           t r a n s f o r m :    s c a l e ( 1 . 0 5 ) ;
       
}

         . b e h a v i o u r - v i e w - b t n   s v g    {
           c o l o r :    w h i t e ;
       
}

         . b e h a v i o u r - r e p o r t - d a t e    {
           d i s p l a y :    f l e x ;
           a l i g n - i t e m s :    c e n t e r ;
           g a p :    6 p x ;
           f o n t - s i z e :    1 4 p x ;
           f o n t - w e i g h t :    6 0 0 ;
           c o l o r :    # 3 3 3 ;
           m a r g i n - b o t t o m :    1 2 p x ;
           p a d d i n g - r i g h t :    4 0 p x ;
       
}

         . b e h a v i o u r - r e p o r t - d a t e   s v g    {
           c o l o r :    # 7 b 7 b 7 b ;
       
}

         . b e h a v i o u r - r e p o r t - s t u d e n t - c o u n t    {
           d i s p l a y :    f l e x ;
           a l i g n - i t e m s :    c e n t e r ;
           g a p :    6 p x ;
           f o n t - s i z e :    1 4 p x ;
           c o l o r :    # 6 6 6 ;
           m a r g i n - b o t t o m :    1 2 p x ;
       
}

         . b e h a v i o u r - r e p o r t - s t u d e n t - c o u n t   s v g    {
           c o l o r :    # 7 b 7 b 7 b ;
       
}

         . b e h a v i o u r - r e p o r t - o b s e r v a t i o n s    {
           f o n t - s i z e :    1 4 p x ;
           c o l o r :    # 6 6 6 ;
           m a r g i n - b o t t o m :    1 6 p x ;
       
}

         . b e h a v i o u r - r e p o r t - o b s e r v a t i o n s   s t r o n g    {
           c o l o r :    # 3 3 3 ;
           f o n t - w e i g h t :    6 0 0 ;
       
}

         . b e h a v i o u r - r e p o r t - s t a t u s    {
           d i s p l a y :    f l e x ;
           a l i g n - i t e m s :    c e n t e r ;
       
}

         . b e h a v i o u r - s t a t u s - b a d g e    {
           p a d d i n g :    6 p x   1 2 p x ;
           b o r d e r - r a d i u s :    6 p x ;
           f o n t - s i z e :    1 2 p x ;
           f o n t - w e i g h t :    6 0 0 ;
           d i s p l a y :    i n l i n e - f l e x ;
           a l i g n - i t e m s :    c e n t e r ;
           g a p :    6 p x ;
       
}

         . b e h a v i o u r - s t a t u s - s u b m i t t e d    {
           b a c k g r o u n d :    # 0 0 C 1 7 2 ;
           c o l o r :    w h i t e ;
       
}

         . b e h a v i o u r - s t a t u s - p e n d i n g    {
           b a c k g r o u n d :    # E B B 8 3 F ;
           c o l o r :    w h i t e ;
       
}

         . b e h a v i o u r - s t a t u s - b a d g e   s v g    {
           w i d t h :    1 2 p x ;
           h e i g h t :    1 2 p x ;
       
}

         / *   R e s p o n s i v e   * /     @ m e d i a   ( m a x - w i d t h :   9 0 0 p x )    {
           . b e h a v i o u r - c a r d s - r o w    {
                 f l e x - d i r e c t i o n :    c o l u m n ;
             
  }

                   . b e h a v i o u r - c a r d - p u r p l e ,
           . b e h a v i o u r - c a r d - o r a n g e ,
           . b e h a v i o u r - c a r d - b l u e    {
                 w i d t h :    1 0 0 % ;
             
  }

                   . b e h a v i o u r - r e p o r t s - g r i d    {
                 g r i d - t e m p l a t e - c o l u m n s :    1 f r ;
             
  }

                   . b e h a v i o u r - r e p o r t s - h e a d e r    {
                 f l e x - d i r e c t i o n :    c o l u m n ;
                 a l i g n - i t e m s :    f l e x - s t a r t ;
             
  }

                   . b e h a v i o u r - r e p o r t s - c o n t r o l s    {
                 w i d t h :    1 0 0 % ;
                 f l e x - w r a p :    w r a p ;
             
  }

                   . b e h a v i o u r - s e a r c h - b o x    {
                 f l e x :    1 ;
                 m i n - w i d t h :    0 ;
             
  }

       
}

         

/* Student Detail Page Styles */
.top-grid {
  display: grid !important;
  grid-template-columns: 380px 1fr !important;
  gap: 22px;
  align-items: start;
  margin-bottom: 0;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  clear: both;
}


.top-grid>div:first-child {
  align-self: start;
  grid-column: 1;
}

.top-grid>div:last-child {
  align-self: start;
  grid-column: 2;
}

/* Right Column */
.right-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: stretch;
  width: 100%;
  min-width: 0;
}

/* Profile Card */
.profile-card {
  background: #ffffff;
  border-radius: 16px;
  overflow: visible;
  padding: 0;
  box-shadow: 0 12px 30px rgba(36, 46, 64, 0.06);
  position: relative;
}

.profile-card-purple {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 0;
  color: #1b2a36;
  position: relative;
  overflow: hidden;
  box-shadow: 0px 8px 24px rgba(27, 46, 94, 0.12);
  align-self: start;
  width: 100%;
  max-width: 338px;
  box-sizing: border-box;
  margin-left: 0;
  margin-top: 0;
  margin-bottom: 0;
}

.profile-header-purple {
  background: #5B5189;
  padding: 32px 32px 0 32px;
  position: relative;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  border-bottom-left-radius: 60px;
  border-bottom-right-radius: 60px;
  height: 150px;
  overflow: visible;
}

.profile-name-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0;
  background: transparent;
  position: relative;
  z-index: 2;
  margin-top: 60px;
}

.profile-body-white {
  background: #ffffff;
  padding: 20px 16px 26px 16px;
  position: relative;
  z-index: 1;
  border: 1px solid #EBE5F3;
  border-top: none;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  margin-top: 10px;
}

.profile-illustrations {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.15;
  z-index: 0;
  pointer-events: none;
}

.profile-banner {
  height: 120px;
  background: linear-gradient(180deg, #6f58c2 0%, #7b61ff 100%);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  position: relative;
}

.profile-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 6px solid #fff;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 50px;
  object-fit: cover;
}

.profile-body {
  padding: 70px 28px 28px 28px;
  text-align: center;
}

.profile-header-purple .profile-avatar-container-purple {
  position: relative;
  z-index: 1;
}

.profile-header-purple .profile-name-purple,
.profile-header-purple .profile-sub-purple {
  position: relative;
  z-index: 1;
}

.profile-avatar-container-purple {
  display: flex;
  justify-content: center;
  margin-bottom: 0;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -50px;
  z-index: 3;
  margin-top: 0;
}

.profile-avatar-purple {
  width: 100px;
  height: 100px;
  border-radius: 100px;
  border: 4px solid #FFFFFF;
  object-fit: cover;
  background: #030E2B;
  position: relative;
  z-index: 2;
}

.profile-name {
  font-size: 20px;
  font-weight: 800;
  margin: 6px 0;
  color: #122129;
}

.profile-name-purple {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  color: #252E4A;
  text-align: center;
  position: relative;
  z-index: 2;
  line-height: 100%;
  width: 122px;
  height: 20px;
}

.profile-sub {
  font-size: 13px;
  color: #6b7680;
}

.profile-sub-purple {
  font-size: 14px;
  font-weight: 400;
  margin: 0;
  text-align: center;
  color: rgba(37, 46, 74, 0.6);
  position: relative;
  z-index: 2;
  line-height: 100%;
  letter-spacing: -0.01em;
  width: 174px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 100%;
}

.info-list {
  margin-top: 18px;
  padding: 14px;
  background: linear-gradient(180deg, #fff, #fff);
  border-radius: 12px;
  border: 1px solid rgba(124, 126, 160, 0.04);
}

.info-list-purple {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.info-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid rgba(124, 126, 160, 0.04);
  margin-bottom: 12px;
  background: linear-gradient(180deg, #fbfbfe, #fff);
}

.info-row:last-child {
  margin-bottom: 0;
}

.info-row-purple {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
  width: 100%;
}

.info-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #f3f4fb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6e57c9;
  font-weight: 700;
  font-size: 20px;
  flex-shrink: 0;
}

.info-icon-house {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #F3F2FA;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 8px;
  box-sizing: border-box;
}

.info-icon-house svg {
  width: 15px;
  height: 15px;
  stroke: #827CD1;
  fill: #827CD1;
}

.info-icon-purple {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  opacity: 0.8;
  color: white;
}

.info-text {
  font-size: 14px;
  flex: 1;
}

.info-text-purple {
  flex: 1;
  text-align: left;
}

.info-label {
  font-size: 12px;
  color: #93a1b2;
  margin-bottom: 6px;
}

.info-label-purple {
  font-size: 12px;
  margin-bottom: 0;
  color: #797F8F;
  font-weight: 400;
  text-align: left;
  line-height: 12px;
}

.info-value {
  font-weight: 700;
  color: #122129;
}

.info-value-purple {
  font-weight: 500;
  color: #02030D;
  font-size: 14px;
  text-align: left;
  line-height: 14px;
  margin-top: 7px;
}


.stats-row {
  display: flex;
  gap: 16px;
  margin: 0;
  padding: 0;
  width: 100%;
  align-items: flex-start;
}

.stat {
  flex: 1;
  background: #ffffff;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(36, 46, 64, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  min-width: 0;
}

.stat .ico {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7f7fc;
  color: #6e57c9;
  font-weight: 700;
  font-size: 20px;
  flex-shrink: 0;
  margin-bottom: 0;
}

.stat .ico svg {
  width: 20px;
  height: 20px;
}

.stat-purple .ico {
  background: linear-gradient(180deg, #8B5CF6, #7B61FF);
  color: white;
}

.stat-green .ico {
  background: linear-gradient(180deg, #66BB6A, #43A047);
  color: white;
}

.stat-orange .ico {
  background: linear-gradient(180deg, #FFA726, #FB8C00);
  color: white;
}

.stat .meta {
  flex: 1;
}

.stat .big {
  font-size: 22px;
  font-weight: 800;
  color: #122129;
  margin: 0;
  line-height: 1.2;
}

.stat .label {
  font-size: 13px;
  color: #93a1b2;
  margin: 0;
  line-height: 1.4;
}

/* Attendance Card */
.attendance-card {
  background: #ffffff;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(36, 46, 64, 0.06);
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* Override for banner cards - stat cards only (take-attendance has its own gradient) */
.attendance-card.stat-card.stat-orange,
.attendance-card.stat-card.stat-pink,
.attendance-card.stat-card.stat-blue {
  background: transparent !important;
}

.attendance-title {
  font-weight: 800;
  margin-bottom: 12px;
  color: #122129;
  font-size: 18px;
  text-align: left;
  width: 100%;
  display: block;
}

/* Use attendance calendar styles from attendance report */
.attendance-card .attendance-calendar-card {
  background: white;
  padding: 16px;
  border-radius: 12px;
  width: 100%;
  box-sizing: border-box;
}

.attendance-card .attendance-calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.attendance-card .attendance-calendar-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #1E1E1E;
}

.attendance-card .attendance-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.attendance-card .attendance-day-label {
  text-align: center;
  font-weight: 600;
  color: #9a9a9a;
  font-size: 11px;
  padding: 4px 0;
}

.attendance-card .attendance-day {
  background: #eef0f7;
  height: 50px;
  border-radius: 8px;
  padding: 6px;
  font-weight: 600;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  color: #1E1E1E;
  font-size: 13px;
}

.attendance-card .attendance-day.empty {
  background: transparent;
}

.attendance-card .attendance-day.absent {
  background: #ff6b6b;
  color: white;
}

.attendance-card .attendance-day.absent .day-number {
  display: block;
  font-weight: 600;
  margin-bottom: 2px;
  font-size: 13px;
}

.attendance-card .attendance-day.absent .absent-label {
  position: absolute;
  bottom: 4px;
  left: 4px;
  font-size: 9px;
  font-weight: 500;
  display: block;
}

@media (max-width:1100px) {
  .top-grid {
    grid-template-columns: 1fr !important;
  }

  .profile-avatar {
    left: 28px;
    transform: none;
    top: -55px;
  }

  .profile-body {
    text-align: left;
    padding-left: 28px;
  }
}

/* ============================================
   ADMIN HORIZONTAL NAVIGATION - MOBILE ONLY
   ============================================ */

/* Hide by default on desktop */
.admin-horizontal-nav {
  display: none;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin: 20px 0;
  padding: 0;
  gap: 8px;
  width: 100%;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
}

.admin-horizontal-nav::-webkit-scrollbar {
  display: none;
}

.admin-horizontal-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 12px;
  color: #9CA3AF;
  text-decoration: none;
  transition: all 0.2s;
  flex-shrink: 0;
  min-width: 60px;
  border-radius: 8px;
}

.admin-horizontal-nav-item svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
}

.admin-horizontal-nav-label {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
}

.admin-horizontal-nav-item.active {
  color: #8B5CF6;
  background: #F3F0FF;
}

.admin-horizontal-nav-item.active svg {
  stroke: #8B5CF6;
}

.admin-horizontal-nav-item:hover {
  background: #F9F9FB;
}

/* ============================================
   BOTTOM NAVIGATION BAR - MOBILE ONLY
   ============================================ */

.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid #E5E7EB;
  padding: 8px 0;
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  justify-content: flex-start;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE and Edge */
}

.bottom-nav::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari, Opera */
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 12px;
  color: #9CA3AF;
  text-decoration: none;
  transition: all 0.2s;
  flex-shrink: 0;
  min-width: 60px;
  position: relative;
}

.bottom-nav-item svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
}

.bottom-nav-label {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
}

.bottom-nav-item.active {
  color: #8B5CF6;
}

.bottom-nav-item.active svg {
  stroke: #8B5CF6;
}

.bottom-nav-item:active {
  opacity: 0.7;
}

/* Show bottom nav on mobile */
@media (max-width: 900px) {

  html,
  body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .bottom-nav {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    z-index: 1000 !important;
  }

  /* Show admin horizontal nav on mobile */
  .admin-horizontal-nav {
    display: flex !important;
  }

  /* Hide sidebar on mobile when bottom nav is shown */
  .sidebar {
    display: none !important;
  }

  .sidebar-overlay {
    display: none !important;
  }

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

  /* Adjust main content padding for bottom nav */
  .main {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-bottom: 80px;
    box-sizing: border-box !important;
  }

  .content {
    padding-bottom: 80px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* Mobile dashboard topbar adjustments */
  .topbar.dashboard-topbar {
    padding: 16px !important;
    padding-bottom: 24px !important;
    min-height: auto !important;
    height: auto !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .topbar.dashboard-topbar .topbar-right {
    width: 100%;
    justify-content: space-between;
    margin-top: 0;
  }

  body:has(.dashboard-topbar) .content,
  .dashboard-topbar~.content {
    margin-top: 0 !important;
    padding-top: 20px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Hide desktop sidebar completely */
  .sidebar {
    display: none !important;
  }

  /* Adjust content for no sidebar */
  .main {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Ensure all cards use full width */
  .kpi-row,
  .banner-row,
  .charts-row {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .kpi-card,
  .banner,
  .card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* ============================================
   COMPREHENSIVE RESPONSIVE ENHANCEMENTS
   ============================================ */

/* Global Sidebar Toggle Standardization */
.sidebar-overlay.active {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.sidebar.active {
  left: 0 !important;
}

/* Ensure consistent sidebar behavior */
@media (max-width: 900px) {
  .sidebar.active .nav-text {
    display: block !important;
  }
}

/* Tables - Horizontal Scroll on Mobile */
@media (max-width: 900px) {

  .students-table,
  .teachers-table,
  .users-table,
  table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .students-table thead,
  .teachers-table thead,
  table thead {
    display: table-header-group;
  }

  .students-table tbody,
  .teachers-table tbody,
  table tbody {
    display: table-row-group;
  }

  .students-table tr,
  .teachers-table tr,
  table tr {
    display: table-row;
  }

  .students-table th,
  .students-table td,
  .teachers-table th,
  .teachers-table td,
  table th,
  table td {
    display: table-cell;
    white-space: nowrap;
    min-width: 100px;
  }

  /* Table wrapper for better scroll indication */
  .table-wrapper,
  div[style*="overflow:auto"] {
    position: relative;
    margin: 0 -16px;
    padding: 0 16px;
  }

  .table-wrapper::after,
  div[style*="overflow:auto"]::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 20px;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.9), transparent);
    pointer-events: none;
  }
}

/* Forms and Inputs - Better Mobile UX */
@media (max-width: 520px) {

  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="tel"],
  input[type="date"],
  textarea,
  select {
    font-size: 16px !important;
    /* Prevents zoom on iOS */
  }

  .form-row {
    flex-direction: column !important;
    grid-template-columns: 1fr !important;
  }

  .form-group {
    width: 100% !important;
    margin-bottom: 16px;
  }
}

/* Modals - Full Screen on Mobile */
@media (max-width: 768px) {

  .modal-content,
  .modal-overlay>div {
    width: 95% !important;
    max-width: 95% !important;
    margin: 10px auto !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
  }

  .modal-header {
    padding: 16px !important;
    flex-wrap: wrap;
  }

  .modal-body {
    padding: 16px !important;
  }

  .modal-footer,
  .form-actions {
    flex-direction: column-reverse !important;
    gap: 12px !important;
    padding: 16px !important;
  }

  .modal-footer button,
  .form-actions button {
    width: 100% !important;
  }
}

/* Cards and Grids - Stack on Mobile */
@media (max-width: 768px) {

  .kpi-row,
  .students-stats,
  .stat-cards {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .eval-banners-row,
  .banner-row {
    flex-direction: column !important;
    gap: 12px !important;
    overflow: visible !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .eval-banner,
  .banner {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  /* Show only first banner on mobile for evaluation pages - full screen width */
  .evaluation-teacher-page .banner-row .banner:not(:first-child),
  .evaluation-teacher-page .banner-row .eval-banner:not(:first-child),
  .evaluation-report-page .banner-row .banner:not(:first-child),
  .evaluation-report-page .banner-row .eval-banner:not(:first-child),
  #scrollable-banner-row .banner:not(:first-child),
  #scrollable-banner-row .eval-banner:not(:first-child) {
    display: none !important;
  }

  /* Fit content width banners on mobile for evaluation pages */
  .evaluation-teacher-page .content .banner-row,
  .evaluation-teacher-page .banner-row,
  .evaluation-report-page .content .banner-row,
  .evaluation-report-page .banner-row,
  #scrollable-banner-row {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .evaluation-teacher-page .banner-row .banner:first-child,
  .evaluation-teacher-page .banner-row .eval-banner:first-child,
  .evaluation-report-page .banner-row .banner:first-child,
  .evaluation-report-page .banner-row .eval-banner:first-child,
  #scrollable-banner-row .banner:first-child,
  #scrollable-banner-row .eval-banner:first-child {
    width: 100% !important;
    max-width: 100% !important;
  }

  .attendance-top-cards {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .charts-row {
    grid-template-columns: 1fr !important;
  }
}

/* Topbar - Better Mobile Layout */
@media (max-width: 520px) {
  .topbar {
    flex-wrap: wrap;
    height: auto !important;
    min-height: auto;
    padding: 16px 16px 12px 16px !important;
    gap: 12px;
    background: transparent !important;
    box-shadow: none !important;
  }

  .topbar.dashboard-topbar {
    background: linear-gradient(135deg, #8B5CF6 0%, #A78BFA 50%, #C4B5FD 100%) !important;
    padding: 16px !important;
    padding-bottom: 20px !important;
    border-radius: 0 !important;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }

  .topbar-right {
    width: auto;
    justify-content: flex-end;
    order: 2;
    margin-top: 0;
    gap: 12px;
  }

  .page-title {
    flex: 1;
    order: 1;
    margin-bottom: 0;
    color: #000000 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1.3;
  }

  .topbar.dashboard-topbar .page-title {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: white !important;
  }

  /* Make topbar text black on mobile for all topbars except dashboard */
  .topbar:not(.dashboard-topbar) .page-title {
    color: #000000 !important;
  }

  .topbar:not(.dashboard-topbar) .page-title .breadcrumbs {
    color: #666666 !important;
  }

  .topbar:not(.dashboard-topbar) .page-title .breadcrumbs span {
    color: #000000 !important;
  }

  /* Behaviour observations topbar - black heading on mobile */
  .topbar.behaviour-observations-topbar .page-title,
  body:has(.behaviour-observations-classes-page) .topbar.behaviour-observations-topbar .page-title,
  .behaviour-observations-classes-page .topbar.behaviour-observations-topbar .page-title,
  body.behaviour-observations-classes-page .topbar.behaviour-observations-topbar .page-title,
  .behaviour-observations-classes-page .topbar .page-title,
  body.behaviour-observations-classes-page .topbar .page-title {
    color: #000000 !important;
  }

  /* Override any white color rules for behaviour observations */
  body.behaviour-observations-classes-page .topbar .page-title,
  .behaviour-observations-classes-page .topbar .page-title,
  body.behaviour-observations-classes-page .topbar.behaviour-observations-topbar .page-title,
  .behaviour-observations-classes-page .topbar.behaviour-observations-topbar .page-title {
    color: #000000 !important;
  }

  /* Force black color for behaviour observations topbar text - highest priority */
  body.behaviour-observations-classes-page .topbar *,
  .behaviour-observations-classes-page .topbar * {
    color: inherit;
  }

  body.behaviour-observations-classes-page .topbar .page-title,
  .behaviour-observations-classes-page .topbar .page-title {
    color: #000000 !important;
  }

  /* Behaviour observation detail admin page - black heading on mobile */
  body.behaviour-observation-detail-admin-page .topbar .page-title,
  .behaviour-observation-detail-admin-page .topbar .page-title {
    color: #000000 !important;
  }

  body.behaviour-observation-detail-admin-page .topbar .page-title .breadcrumbs {
    color: #666666 !important;
  }

  body.behaviour-observation-detail-admin-page .topbar .page-title .breadcrumbs span {
    color: #000000 !important;
  }

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

  .profile-meta {
    display: none !important;
  }

  .notif {
    width: 44px !important;
    height: 44px !important;
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    border-radius: 12px;
  }

  .profile {
    gap: 0 !important;
  }

  .avatar {
    width: 44px !important;
    height: 44px !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
  }

  .avatar-placeholder {
    width: 44px !important;
    height: 44px !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    font-size: 18px !important;
  }
}

/* Search Boxes - Better Mobile */
@media (max-width: 520px) {

  .search-box,
  .search-input,
  input[type="text"][placeholder*="Search"],
  input[type="text"][placeholder*="search"] {
    width: 100% !important;
    max-width: 100% !important;
  }

  .panel-controls,
  .students-header,
  .panel-top {
    flex-direction: column !important;
    gap: 12px !important;
    align-items: stretch !important;
  }

  .filter-btn,
  .export-btn,
  .add-btn {
    width: 100% !important;
    justify-content: center !important;
  }
}

/* Calendar - Responsive */
@media (max-width: 768px) {

  .attendance-calendar-grid,
  .calendar-grid {
    gap: 6px !important;
  }

  .attendance-day {
    height: 50px !important;
    font-size: 12px !important;
    padding: 6px !important;
  }

  .attendance-day-label {
    font-size: 11px !important;
    padding: 6px 0 !important;
  }
}

/* Pagination - Better Mobile */
@media (max-width: 520px) {

  .pagination,
  .panel-footer {
    flex-direction: column !important;
    gap: 12px !important;
    align-items: stretch !important;
  }

  .per-page {
    width: 100% !important;
    text-align: center !important;
  }

  .pagination {
    justify-content: center !important;
    flex-wrap: wrap !important;
  }

  .page-number,
  .page-nav {
    min-width: 36px !important;
    height: 36px !important;
    font-size: 13px !important;
  }
}

/* Student Details - Responsive Grid */
@media (max-width: 900px) {

  .student-details-grid,
  .top-grid {
    grid-template-columns: 1fr !important;
  }

  .student-profile-card {
    text-align: center !important;
  }

  .profile-avatar {
    margin: 0 auto !important;
    position: relative !important;
    transform: none !important;
    top: 0 !important;
    left: 0 !important;
  }
}

/* Evaluation Cards - Responsive */
@media (max-width: 768px) {
  .eval-card {
    width: 100% !important;
    max-width: 100% !important;
  }

  .eval-cards-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Attendance Detail Modal - Responsive */
@media (max-width: 768px) {
  .attendance-detail-content {
    width: 95% !important;
    max-width: 95% !important;
    padding: 16px !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
  }

  .attendance-detail-cards {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .attendance-detail-table-wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
}

/* Banner Images - Scale on Mobile, but keep visible for evaluation banners */
@media (max-width: 520px) {

  /* Hide images only for dashboard banners, not evaluation banners */
  .banner:not(.eval-banner) .banner-image,
  .banner:not(.eval-banner) .banner-illustration,
  .take-attendance-illustration {
    display: none !important;
  }

  /* Keep evaluation banner images and illustrations visible */
  .eval-banner .banner-image,
  .eval-banner .banner-illustration,
  .eval-banner .banner-circle,
  .eval-banner .circle-outer,
  .eval-banner .circle-middle,
  .eval-banner .circle-inner {
    display: block !important;
    visibility: visible !important;
  }

  /* Scale down evaluation banner illustrations for mobile */
  .eval-banner .banner-illustration {
    width: 180px !important;
    height: 180px !important;
  }

  .eval-banner.purple .circle-outer {
    width: 180px !important;
    height: 180px !important;
  }

  .eval-banner.purple .circle-middle {
    width: 150px !important;
    height: 150px !important;
    right: 15px !important;
  }

  .eval-banner.purple .circle-inner {
    width: 120px !important;
    height: 120px !important;
    right: 30px !important;
  }

  .eval-banner.purple .banner-image {
    width: 80px !important;
    height: 85px !important;
    right: 50px !important;
  }

  .banner-title,
  .banner-sub {
    max-width: 100% !important;
  }
}

/* Dropdowns and Selects - Better Mobile */
@media (max-width: 520px) {

  .month-picker-dropdown,
  .select-dropdown {
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    max-width: 100% !important;
  }

  .month-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

/* Action Buttons - Stack on Mobile */
@media (max-width: 520px) {
  .action-buttons {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .icon-btn {
    width: 36px !important;
    height: 36px !important;
  }
}

/* Content Padding - Reduce on Mobile */
@media (max-width: 520px) {

  html,
  body {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  .app {
    width: 100% !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .main {
    width: 100% !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .content {
    padding: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
  }

  .students-content,
  .attendance-content,
  .evaluation-content {
    padding: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .card {
    padding: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Ensure all rows use full width */
  .kpi-row,
  .banner-row,
  .charts-row {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Ensure all cards use full width */
  .kpi-card,
  .banner,
  .donut-card,
  .line-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* Dashboard Topbar - Mobile Adjustments */
@media (max-width: 900px) {
  .topbar.dashboard-topbar {
    flex-wrap: wrap;
    padding-bottom: 24px !important;
    background: linear-gradient(135deg, #8B5CF6 0%, #A78BFA 50%, #C4B5FD 100%) !important;
  }

  .topbar.dashboard-topbar .page-title {
    color: white !important;
  }

  body:has(.dashboard-topbar) .content,
  .dashboard-topbar~.content {
    margin-top: 0 !important;
    padding-top: 20px !important;
  }
}

@media (max-width: 520px) {
  .topbar.dashboard-topbar {
    padding: 16px !important;
    padding-bottom: 20px !important;
  }

  body:has(.dashboard-topbar) .content,
  .dashboard-topbar~.content {
    margin-top: 0 !important;
    padding-top: 16px !important;
  }

  .content {
    padding: 16px !important;
    padding-bottom: 100px !important;
  }
}

/* Chat Button - Hide on Mobile (bottom nav replaces it) */
@media (max-width: 900px) {
  .chat-button {
    display: none !important;
  }
}

/* Chat Button - Smaller on Mobile */
@media (max-width: 520px) {
  .chat-button {
    display: none !important;
  }
}

/* Donut Charts - Smaller on Mobile */
@media (max-width: 520px) {
  .donut {
    max-width: 140px !important;
    max-height: 140px !important;
  }

  .legend {
    font-size: 11px !important;
  }

  .legend .count {
    font-size: 11px !important;
  }
}

/* Line Charts - Responsive SVG */
@media (max-width: 768px) {

  .line-svg,
  .attendance-chart svg {
    height: 300px !important;
  }

  .attendance-chart {
    height: 300px !important;
    padding: 6px 8px !important;
  }
}

/* Upload Areas - Better Mobile */
@media (max-width: 520px) {
  .upload-area {
    padding: 20px !important;
  }

  .upload-content {
    padding: 16px !important;
  }

  .browse-btn {
    width: 100% !important;
    margin-top: 12px !important;
  }
}

/* Import Sections - Stack on Mobile */
@media (max-width: 768px) {

  .import-section,
  div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

/* Status Badges - Better Mobile */
@media (max-width: 520px) {
  .status-badge {
    font-size: 11px !important;
    padding: 4px 8px !important;
  }
}

/* Fix for Sidebar Overlay Click */
@media (max-width: 900px) {
  .sidebar-overlay {
    display: block !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 999 !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
    pointer-events: none !important;
  }

  .sidebar-overlay.active {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .sidebar.open~.sidebar-overlay,
  body:has(.sidebar.open) .sidebar-overlay {
    opacity: 1 !important;
    pointer-events: auto !important;
  }
}

/* Prevent Horizontal Scroll */
@media (max-width: 900px) {
  html {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  body {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    position: relative !important;
  }

  .app {
    width: 100vw !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  .main {
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  .content {
    width: 100vw !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

/* Improved Touch Targets */
@media (max-width: 900px) {

  button,
  .btn,
  a,
  .nav-item,
  .icon-btn {
    min-height: 44px !important;
    min-width: 44px !important;
  }

  input[type="checkbox"],
  input[type="radio"] {
    width: 20px !important;
    height: 20px !important;
  }
}

/* Better Spacing on Mobile */
@media (max-width: 520px) {

  .panel-top,
  .students-header,
  .card-header {
    margin-bottom: 16px !important;
  }

  h2,
  h3,
  .panel-title {
    font-size: 18px !important;
    margin-bottom: 12px !important;
  }
}

/* Smooth Scrolling for Tables */
@media (max-width: 900px) {

  .table-wrapper,
  div[style*="overflow:auto"] {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }

  .table-wrapper::-webkit-scrollbar,
  div[style*="overflow:auto"]::-webkit-scrollbar {
    height: 8px;
  }

  .table-wrapper::-webkit-scrollbar-track,
  div[style*="overflow:auto"]::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
  }

  .table-wrapper::-webkit-scrollbar-thumb,
  div[style*="overflow:auto"]::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
  }

  .table-wrapper::-webkit-scrollbar-thumb:hover,
  div[style*="overflow:auto"]::-webkit-scrollbar-thumb:hover {
    background: #555;
  }
}

/* ============================================
   FINAL MOBILE WIDTH FIX - OVERRIDE ALL
   ============================================ */
@media (max-width: 520px) {

  /* Force full viewport width */
  html {
    width: 100vw !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body {
    width: 100vw !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .app {
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
  }

  .main {
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
  }

  .content {
    width: 100vw !important;
    max-width: 100vw !important;
    padding: 16px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    overflow-x: hidden !important;
  }

  /* KPI Cards - horizontal scrollable row on mobile */
  .kpi-row {
    display: flex !important;
    flex-direction: row !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 16px 0 0 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-behavior: smooth !important;
    scrollbar-width: none !important;
    /* Firefox */
    -ms-overflow-style: none !important;
    /* IE and Edge */
  }

  .kpi-row::-webkit-scrollbar {
    display: none !important;
    /* Chrome, Safari, Opera */
  }

  .kpi-card {
    min-width: 160px !important;
    width: 160px !important;
    max-width: 160px !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    padding: 16px !important;
    min-height: 120px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  .kpi-card .kpi-icon {
    width: 44px !important;
    height: 44px !important;
    padding: 10px !important;
    margin-bottom: 4px !important;
  }

  .kpi-card .kpi-icon svg {
    width: 24px !important;
    height: 24px !important;
  }

  .kpi-card .kpi-number {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #1E1E1E !important;
    margin: 4px 0 !important;
  }

  .kpi-card .kpi-label {
    font-size: 12px !important;
    line-height: 1.3 !important;
    color: #6B7280 !important;
    margin-bottom: 8px !important;
  }

  .kpi-card .kpi-foot {
    font-size: 11px !important;
    margin-top: auto !important;
  }

  .kpi-card .kpi-foot.pending {
    background: #FEE2E2 !important;
    color: #DC2626 !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    display: inline-block !important;
    width: fit-content !important;
  }

  .kpi-card .kpi-number {
    font-size: 20px !important;
    font-weight: 700 !important;
  }

  .kpi-card .kpi-label {
    font-size: 11px !important;
    line-height: 1.3 !important;
  }

  .kpi-card .kpi-foot {
    font-size: 10px !important;
  }

  .kpi-card .kpi-icon {
    width: 40px !important;
    height: 40px !important;
    padding: 10px !important;
  }

  .kpi-card .kpi-icon svg {
    width: 20px !important;
    height: 20px !important;
  }

  /* Hide sidebar on mobile */
  .sidebar {
    display: none !important;
  }

  .sidebar-overlay {
    display: none !important;
  }

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

  /* Show bottom navigation on mobile */
  .bottom-nav {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    z-index: 1000 !important;
  }

  /* Banner cards */
  .banner-row {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 12px !important;
    margin: 16px 0 0 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  .banner {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
  }

  /* Chart cards */
  .charts-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 16px !important;
    margin: 20px 0 0 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  .card {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
  }
}

/* ============================================
   MOBILE DASHBOARD SPECIFIC STYLES
   ============================================ */

/* Mobile Dashboard Topbar - Welcome Message */
@media (max-width: 900px) {
  .topbar.dashboard-topbar .page-title .welcome-text {
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 4px;
    display: block;
  }

  .topbar.dashboard-topbar .page-title .greeting-text {
    font-size: 18px;
    font-weight: 700;
    color: #FFFFFF;
    display: block;
  }
}

/* Mobile Dashboard - Adjust KPI Cards to 2 columns */
@media (max-width: 520px) {

  /* Prevent horizontal scrolling */
  html {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
  }

  /* Ensure full width for all containers */
  .app {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .main {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .content {
    width: 100% !important;
    max-width: 100% !important;
    padding: 16px !important;
    padding-bottom: 100px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow-x: hidden !important;
  }

  /* Allow KPI row to scroll horizontally */
  .content .kpi-row {
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }

  /* Allow horizontal scrolling for KPI row */
  .content .kpi-row {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Ensure inner content uses full available width except KPI row */
  .content>*:not(.kpi-row) {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow-x: hidden !important;
  }

  /* Ensure KPI row can scroll horizontally */
  .content .kpi-row {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Ensure all direct children of content use full available width */
  .content .banner-row,
  .content .charts-row {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* KPI cards should have fixed width for scrolling */
  .content .kpi-card {
    min-width: 160px !important;
    width: 160px !important;
    max-width: 160px !important;
    flex-shrink: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    transform: none !important;
    position: relative !important;
    box-sizing: border-box !important;
  }

  /* Banner and card should use full width */
  .content .banner,
  .content .card {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    transform: none !important;
    position: relative !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
  }

  /* Topbar full width */
  .topbar {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* Remove any negative margins */
  body:has(.dashboard-topbar) .content,
  .dashboard-topbar~.content {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* KPI cards - horizontal scrollable row */
  .kpi-row {
    display: flex !important;
    flex-direction: row !important;
    gap: 12px !important;
    margin-top: 16px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-behavior: smooth !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }

  .kpi-row::-webkit-scrollbar {
    display: none !important;
  }

  .kpi-card {
    padding: 16px !important;
    min-height: 120px !important;
    min-width: 160px !important;
    width: 160px !important;
    max-width: 160px !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin: 0 !important;
  }

  .kpi-card .kpi-icon {
    flex-shrink: 0 !important;
  }

  .kpi-card>div:not(.kpi-icon) {
    flex: 1 !important;
    min-width: 0 !important;
  }

  /* Ensure KPI card content doesn't overflow */
  .kpi-number,
  .kpi-label,
  .kpi-foot {
    width: 100% !important;
    box-sizing: border-box !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
  }

  .kpi-number {
    font-size: 22px !important;
  }

  .kpi-label {
    font-size: 12px !important;
    line-height: 1.3;
  }

  .kpi-foot {
    font-size: 11px !important;
  }

  .kpi-icon {
    width: 40px !important;
    height: 40px !important;
    padding: 10px !important;
  }

  .kpi-icon svg {
    width: 20px !important;
    height: 20px !important;
  }

  /* Banner cards stack vertically */
  .banner-row {
    margin-top: 16px;
    gap: 12px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .banner {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 140px !important;
    padding: 20px !important;
    box-sizing: border-box !important;
  }

  .banner-title {
    font-size: 18px !important;
    margin-bottom: 6px !important;
  }

  .banner-sub {
    font-size: 14px !important;
    margin-bottom: 12px !important;
  }

  .btn-small {
    padding: 12px 16px !important;
    font-size: 14px !important;
    height: 44px !important;
    width: auto !important;
    min-width: 150px !important;
  }

  /* Charts stack vertically */
  .charts-row {
    margin-top: 20px;
    gap: 16px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  .card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .donut-card {
    width: 100% !important;
    max-width: 100% !important;
    padding: 20px !important;
    box-sizing: border-box !important;
  }

  .line-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Bottom nav full width */
  .bottom-nav {
    width: 100vw !important;
    max-width: 100vw !important;
    left: 0 !important;
    right: 0 !important;
    box-sizing: border-box !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-behavior: smooth !important;
    justify-content: flex-start !important;
  }
}

/* ============================================
   FINAL MOBILE WIDTH FIX - OVERRIDES ALL
   ============================================ */
@media (max-width: 900px) {

  /* Ensure proper mobile viewport */
  html,
  body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
  }

  .app {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    min-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .main {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    margin-left: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    flex: 1 !important;
  }

  /* Content area - add bottom padding for bottom nav */
  .content,
  section.content {
    width: 100% !important;
    max-width: 100% !important;
    padding: 16px !important;
    padding-bottom: 90px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  /* Ensure bottom nav is visible */
  .bottom-nav {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    z-index: 1000 !important;
  }

  /* Hide sidebar completely on mobile */
  .sidebar {
    display: none !important;
  }

  .sidebar-overlay {
    display: none !important;
  }

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

  /* KPI Row - horizontal scrollable */
  .kpi-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 16px 0 0 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-behavior: smooth !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }

  .kpi-row::-webkit-scrollbar {
    display: none !important;
  }

  .kpi-card {
    min-width: 160px !important;
    width: 160px !important;
    max-width: 160px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
  }
}

@media (max-width: 520px) {

  /* Reset everything */
  * {
    box-sizing: border-box !important;
  }

  html,
  body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .app {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
  }

  .main {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
  }

  /* Content area */
  .content,
  section.content {
    width: 100% !important;
    max-width: 100% !important;
    padding: 16px !important;
    padding-bottom: 100px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  /* KPI Row - horizontal scrollable */
  .kpi-row {
    display: flex !important;
    flex-direction: row !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 16px 0 0 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-behavior: smooth !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }

  .kpi-row::-webkit-scrollbar {
    display: none !important;
  }

  /* KPI Cards */
  .kpi-card {
    min-width: 160px !important;
    width: 160px !important;
    max-width: 160px !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    padding: 16px !important;
    min-height: 120px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  /* Banner Row */
  .banner-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 16px 0 0 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  /* Banners */
  .banner {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  /* Charts Row */
  .charts-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 20px 0 0 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  /* Cards */
  .card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }
}

/* Mobile Bottom Navigation Adjustments - Final Override */
@media (max-width: 900px) {

  /* Ensure bottom nav is always visible on mobile */
  .bottom-nav {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    z-index: 1000 !important;
    background: #ffffff !important;
    border-top: 1px solid #E5E7EB !important;
  }

  /* Ensure content has space for bottom nav */
  .content,
  section.content {
    padding-bottom: 90px !important;
  }

  /* Hide sidebar completely */
  .sidebar,
  .sidebar-overlay,
  .mobile-menu-toggle {
    display: none !important;
  }

  /* Ensure main takes full width */
  .main {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}