:root {
  --bs-primary: #1dabcf;
  --bs-primary-rgb: 29, 171, 207;
  --algash-primary: #1dabcf;
  --algash-accent: #fea822;
  --algash-font-family: "Inter", "Segoe UI", Arial, "Noto Sans", sans-serif;
}

html,
body,
button,
input,
select,
textarea,
table,
h1,
h2,
h3,
h4,
h5,
h6,
#side-nav,
#side-nav ul li a,
#main,
#top-navbar,
.dashboard-content,
.analytics-card,
.analytics-section,
.analytics-chip,
.student-metric,
.parent-metric,
.admin-metric,
.director-metric,
.student-panel,
.parent-panel,
.admin-panel,
.director-panel,
.student-badge,
.algash-role-badge,
.badge,
.status-pill,
.language-switcher {
  font-family: var(--algash-font-family);
  letter-spacing: normal;
}

button,
input,
select,
textarea,
.language-switcher,
.language-switcher__item,
#side-nav a,
.analytics-card,
.student-badge,
.algash-role-badge,
.badge,
.status-pill {
  text-transform: none;
}

::selection {
  background-color: var(--algash-accent);
  color: #111;
}

.btn-primary {
  --bs-btn-bg: var(--algash-primary);
  --bs-btn-border-color: var(--algash-primary);
  --bs-btn-hover-bg: #168eab;
  --bs-btn-hover-border-color: #168eab;
  --bs-btn-active-bg: #137b94;
  --bs-btn-active-border-color: #137b94;
}

#side-nav {
  width: 300px;
  min-width: 300px;
  max-width: 300px;
}

#side-nav .top-side {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 180px;
  min-height: 180px;
  max-height: 180px;
  padding: 0.65rem 1.25rem !important;
  overflow: hidden;
  background-color: #ffffff;
  background-image: none !important;
  border-bottom: 4px solid var(--algash-accent);
}

.algash-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 215px;
  overflow: hidden;
  color: #13313a;
  line-height: 1.15;
}

.algash-brand:hover {
  color: var(--algash-primary);
}

.algash-brand__logo {
  display: block;
  width: 100%;
  max-width: 195px;
  height: auto;
  max-height: 138px;
  margin: 0 auto;
  object-fit: contain;
}

.algash-brand__logo-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 205px;
  height: 138px;
  overflow: hidden;
  background: #ffffff;
}

.algash-brand__name {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0;
}

.algash-brand__tagline {
  margin-top: 0.35rem;
  color: #6c757d;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.algash-role-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 0.18rem 0.6rem;
  background-color: var(--algash-primary);
  color: #fff;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.2rem;
  border: 1px solid rgba(29, 171, 207, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  font-family: inherit;
}

.language-switcher__form {
  display: inline-flex;
  margin: 0;
}

.language-switcher__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0.28rem 0.65rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #44636c;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: normal;
  line-height: 1;
  text-decoration: none;
  text-transform: none;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease;
}

.language-switcher__item:hover,
.language-switcher__item:focus {
  background: rgba(29, 171, 207, 0.1);
  color: #126f85;
}

.language-switcher__item--active {
  background: var(--algash-primary);
  color: #ffffff;
}

.language-switcher__item--active:hover,
.language-switcher__item--active:focus {
  background: var(--algash-primary);
  color: #ffffff;
}

.language-switcher--top {
  flex: 0 0 auto;
  margin-left: auto;
  margin-right: 0.5rem;
}

.language-switcher--sidebar {
  flex-wrap: wrap;
  width: 100%;
  max-width: 15rem;
  margin: 0 auto;
  background: #f8fdff;
}

.language-switcher--auth {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.language-switcher--landing {
  background: rgba(255, 255, 255, 0.9);
}

.user-password-reset-note {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #6c4a00;
  font-size: 0.92rem;
  font-weight: 650;
  background: #fff8e8;
  border-color: rgba(254, 168, 34, 0.28);
}

.user-password-reset-note .fas {
  flex: 0 0 auto;
  color: #d88705;
  background: rgba(254, 168, 34, 0.16);
}

.user-password-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.user-password-reset-btn .fas {
  width: 24px;
  height: 24px;
  margin-right: 0;
  background: rgba(220, 53, 69, 0.1);
  font-size: 0.78rem;
}

@media (max-width: 800px) {
  .language-switcher--top {
    margin-left: auto;
    margin-right: 0.35rem;
  }
}

@media (max-width: 575.98px) {
  .language-switcher--auth {
    position: static;
    display: flex;
    width: fit-content;
    margin: 0 0 1rem auto;
  }
}

#side-nav .top-side p {
  margin: 0.35rem 0 0;
}

#side-nav ul li a:hover {
  color: var(--algash-primary);
  background: rgba(29, 171, 207, 0.12);
}

#side-nav ul li.active a {
  background: var(--algash-primary);
  color: #fff;
}

#side-nav .sidebar-menu-list {
  box-sizing: border-box;
  margin: 0;
  padding-bottom: 0.85rem;
}

#side-nav .sidebar-menu-section {
  margin: 0.95rem 1rem 0.25rem;
  padding: 0.4rem 0.65rem;
  border-bottom: 1px solid rgba(19, 49, 58, 0.12);
  color: #78838c;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-transform: uppercase;
  pointer-events: none;
}

#side-nav .sidebar-menu-section:first-child {
  margin-top: 0.3rem;
}

#side-nav .sidebar-menu-list--compact {
  padding-top: 0.25rem;
}

@media (max-width: 1150px) {
  #side-nav {
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

@media (max-width: 480px) {
  #side-nav {
    width: min(88vw, 300px);
    min-width: min(88vw, 300px);
    max-width: min(88vw, 300px);
  }

  #side-nav ul li a {
    padding: 0.68rem 0.85rem;
    font-size: 0.92rem;
  }

  #side-nav .sidebar-menu-section {
    margin-right: 0.8rem;
    margin-left: 0.8rem;
  }
}

.form-title,
.news {
  background: linear-gradient(40deg, var(--algash-primary), #157f99) !important;
}

.events {
  background: linear-gradient(40deg, var(--algash-accent), #d88705) !important;
}

.link,
a {
  color: var(--algash-primary);
}

.link:hover,
a:hover {
  color: #137b94;
}

.auth-page {
  position: relative;
  min-height: 100vh;
  padding: 2rem 1rem;
  background:
    radial-gradient(circle at top left, rgba(29, 171, 207, 0.12), transparent 30rem),
    radial-gradient(circle at bottom right, rgba(254, 168, 34, 0.16), transparent 28rem),
    #f6fbfd;
}

.login-brand h1 {
  margin-bottom: 0.25rem;
  color: #13313a;
  font-size: 1.6rem;
  font-weight: 800;
}

.login-brand p {
  color: #6c757d;
  margin-bottom: 1rem;
}

.login-contact-hint {
  margin: 0.85rem 0 0;
  color: #5f737a;
  font-size: 0.92rem;
  text-align: center;
}

.auth-card {
  width: min(100%, 440px);
  margin: 3rem auto;
  border: 1px solid rgba(29, 171, 207, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 22px 60px rgba(20, 62, 75, 0.12);
  overflow: hidden;
}

.auth-card .login-brand {
  padding: 1.5rem 1.5rem 0.5rem;
}

.auth-card__body {
  padding: 1.35rem 1.5rem 1.5rem;
}

.auth-card input[type="email"],
.auth-card input[type="password"] {
  display: block;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  color: #212529;
  background: #fff;
}

.registration-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  min-height: calc(100vh - 4rem);
}

.registration-card {
  width: min(100%, 760px);
  padding: 2rem;
  border: 1px solid rgba(29, 171, 207, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 22px 60px rgba(20, 62, 75, 0.12);
}

.registration-card__intro {
  margin-bottom: 1.5rem;
}

.registration-card__eyebrow {
  display: inline-flex;
  margin-bottom: 0.75rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(29, 171, 207, 0.12);
  color: #126f85;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.registration-card h1 {
  margin-bottom: 0.5rem;
  color: #13313a;
  font-size: 1.9rem;
  font-weight: 850;
  letter-spacing: 0;
}

.registration-card p {
  max-width: 42rem;
  margin: 0;
  color: #5f737a;
}

.registration-form {
  display: grid;
  gap: 1rem;
}

.registration-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.registration-field--full {
  grid-column: 1 / -1;
}

.registration-field .form-label {
  color: #24444d;
  font-weight: 700;
}

.registration-field .form-control {
  min-height: 46px;
  border-color: rgba(29, 171, 207, 0.25);
  border-radius: 8px;
}

.registration-field .form-control:focus {
  border-color: var(--algash-primary);
  box-shadow: 0 0 0 0.2rem rgba(29, 171, 207, 0.14);
}

.password-field-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-field-wrapper .password-input {
  width: 100%;
  padding-right: 3.25rem;
}

.password-toggle-btn {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(29, 171, 207, 0.22);
  border-radius: 8px;
  background: #f8fdff;
  color: #126f85;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
  transform: translateY(-50%);
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.password-toggle-btn:hover,
.password-toggle-btn:focus {
  border-color: var(--algash-primary);
  background: rgba(29, 171, 207, 0.12);
  color: #0f5c6e;
}

.password-toggle-btn:focus-visible {
  outline: 3px solid rgba(29, 171, 207, 0.18);
  outline-offset: 2px;
}

.registration-role-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.registration-role-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 48px;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(29, 171, 207, 0.24);
  border-radius: 8px;
  background: #f8fdff;
  color: #183a44;
  font-weight: 750;
  cursor: pointer;
}

.registration-role-item--accent {
  border-top: 5px solid var(--algash-accent);
}

.registration-role-item input {
  accent-color: var(--algash-primary);
}

.registration-role-item:has(input:checked) {
  border-color: var(--algash-primary);
  background: rgba(29, 171, 207, 0.12);
}

.registration-submit {
  min-height: 48px;
  margin-top: 0.25rem;
  font-weight: 800;
}

.registration-card__footer {
  margin-top: 1.25rem;
  color: #5f737a;
  text-align: center;
}

.registration-alert,
.registration-error {
  color: #b42318;
}

.registration-alert {
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(180, 35, 24, 0.2);
  border-radius: 8px;
  background: rgba(180, 35, 24, 0.08);
}

.registration-error {
  margin-top: 0.35rem;
  font-size: 0.86rem;
  font-weight: 650;
}

.registration-success-panel {
  width: min(100%, 760px);
  padding: 1.6rem;
  border: 1px solid rgba(29, 171, 207, 0.18);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(20, 62, 75, 0.12);
  text-align: center;
}

.registration-success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 0.9rem;
  border-radius: 50%;
  background: rgba(25, 135, 84, 0.12);
  color: #198754;
  font-size: 1.4rem;
}

.registration-success-panel h2 {
  margin-bottom: 0.45rem;
  color: #13313a;
  font-size: 1.45rem;
  font-weight: 850;
  letter-spacing: 0;
}

.registration-success-panel p {
  margin: 0 auto;
  color: #5f737a;
}

.registration-success-panel__note {
  margin-top: 0.65rem !important;
  color: #24444d !important;
  font-weight: 750;
}

.registration-success-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.15rem 0 1.25rem;
}

.registration-contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.registration-contact-button:hover {
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(20, 62, 75, 0.16);
}

.registration-contact-button.whatsapp {
  background: #25d366;
}

.registration-contact-button.instagram {
  background: linear-gradient(135deg, #405de6, #c13584 58%, #f77737);
}

.registration-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.registration-contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem;
  border: 1px solid rgba(29, 171, 207, 0.14);
  border-radius: 8px;
  background: #f8fdff;
  color: #24444d;
  font-weight: 800;
}

.registration-qr-image {
  width: 144px;
  height: 144px;
  padding: 0.4rem;
  border-radius: 8px;
  background: #ffffff;
  object-fit: contain;
  box-shadow: inset 0 0 0 1px rgba(19, 49, 58, 0.08);
}

@media (max-width: 575.98px) {
  .registration-success-panel {
    padding: 1.25rem;
  }

  .registration-contact-grid {
    grid-template-columns: 1fr;
  }

  .registration-contact-button {
    width: 100%;
  }
}

.landing-page {
  min-height: 100vh;
  color: #16343d;
  background: #f7fbfd;
}

.landing-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(29, 171, 207, 0.16);
  backdrop-filter: blur(10px);
}

.landing-logo {
  color: #16343d;
  font-size: 1.2rem;
  font-weight: 800;
}

.landing-nav a {
  color: #425b63;
  font-weight: 600;
}

.landing-nav a:hover {
  color: var(--algash-primary);
}

.landing-hero {
  padding: 6rem 0 5rem;
  background:
    linear-gradient(110deg, rgba(29, 171, 207, 0.12), transparent 48%),
    radial-gradient(circle at 86% 18%, rgba(254, 168, 34, 0.18), transparent 18rem),
    #ffffff;
}

.landing-eyebrow {
  display: inline-flex;
  margin-bottom: 1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(29, 171, 207, 0.12);
  color: #126f85;
  font-weight: 700;
}

.landing-hero h1 {
  margin-bottom: 1rem;
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  font-weight: 850;
  letter-spacing: 0;
}

.landing-lead {
  max-width: 42rem;
  color: #4c6269;
  font-size: 1.25rem;
  line-height: 1.65;
}

.landing-summary,
.landing-info-card,
.landing-card,
.landing-step,
.landing-price,
.role-dashboard-card {
  border: 1px solid rgba(29, 171, 207, 0.14);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(22, 52, 61, 0.08);
}

.landing-summary {
  padding: 2rem;
  border-top: 5px solid var(--algash-accent);
}

.landing-summary h2 {
  font-size: 1.35rem;
  font-weight: 800;
}

.landing-summary__meta {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.landing-summary__meta span {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: #f0fbfe;
  color: #126f85;
  font-weight: 700;
}

.landing-section {
  padding: 4.5rem 0;
  background: #ffffff;
}

.landing-section--muted {
  background: #f7fbfd;
}

.landing-section h2,
.landing-section-heading h2 {
  color: #16343d;
  font-weight: 800;
}

.landing-section p,
.landing-section-heading p {
  color: #5a6e75;
}

.landing-section-heading {
  max-width: 46rem;
  margin-bottom: 2rem;
}

.landing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.landing-card,
.landing-step,
.landing-price {
  padding: 1.25rem;
  font-weight: 700;
}

.landing-step {
  min-height: 100%;
  border-left: 4px solid var(--algash-primary);
}

.landing-subjects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.landing-subjects span {
  display: block;
  padding: 1.35rem;
  border-radius: 8px;
  background: #16343d;
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 800;
}

.landing-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.landing-checklist li {
  padding: 1rem;
  border-radius: 8px;
  background: #ffffff;
  border-left: 4px solid var(--algash-accent);
  font-weight: 700;
}

.landing-info-card {
  height: 100%;
  padding: 2rem;
}

.landing-info-card--accent {
  border-top: 5px solid var(--algash-accent);
}

.landing-price {
  display: grid;
  gap: 0.5rem;
  min-height: 100%;
}

.landing-price strong {
  color: #16343d;
  font-size: 1.3rem;
}

.landing-note {
  color: #4c6269;
  font-weight: 700;
}

.landing-faq .accordion-item {
  border-color: rgba(29, 171, 207, 0.16);
}

.landing-faq .accordion-button {
  color: #16343d;
  font-weight: 700;
}

.landing-faq .accordion-button:not(.collapsed) {
  background: #effbfe;
  color: #126f85;
}

.landing-cta {
  padding: 5rem 0;
  background: #16343d;
  color: #ffffff;
}

.landing-cta h2 {
  max-width: 48rem;
  margin: 0 auto;
  font-weight: 850;
}

.role-dashboard {
  padding: 1rem 0 2rem;
}

.role-dashboard__hero {
  display: flex;
  align-items: center;
  min-height: 210px;
  padding: 2rem;
  border-radius: 8px;
  background:
    linear-gradient(115deg, rgba(29, 171, 207, 0.18), rgba(254, 168, 34, 0.16)),
    #ffffff;
  border: 1px solid rgba(29, 171, 207, 0.18);
}

.role-dashboard__label {
  margin-bottom: 0.5rem;
  color: #126f85;
  font-weight: 800;
  text-transform: uppercase;
}

.role-dashboard__hero h1 {
  margin-bottom: 0.75rem;
  color: #16343d;
  font-weight: 850;
}

.role-dashboard__hero p {
  max-width: 45rem;
  margin-bottom: 0;
  color: #4c6269;
  font-size: 1.05rem;
}

.role-dashboard-card {
  min-height: 100%;
  padding: 1.5rem;
}

.role-dashboard-card__number {
  display: inline-flex;
  margin-bottom: 1rem;
  color: var(--algash-primary);
  font-weight: 850;
}

.role-dashboard-card h2 {
  font-size: 1.2rem;
  font-weight: 800;
}

.role-dashboard-card p {
  margin-bottom: 0;
  color: #65767c;
}

.users-count .card-count {
  border: 1px solid rgba(29, 171, 207, 0.14);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(22, 52, 61, 0.08);
}

.users-count .card-count h2 {
  color: #16343d;
  font-weight: 850;
}

.users-count .card-count i.bg-light-aqua,
.users-count .card-count i.bg-light-purple {
  background: rgba(29, 171, 207, 0.14) !important;
  color: var(--algash-primary);
}

.users-count .card-count i.bg-light-orange,
.users-count .card-count i.bg-light-red {
  background: rgba(254, 168, 34, 0.18) !important;
  color: #c77700;
}

.chart-wrap,
.bg-white.p-3 {
  border: 1px solid rgba(29, 171, 207, 0.14);
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(22, 52, 61, 0.07);
}

.student-dashboard,
.student-page {
  padding-bottom: 2rem;
}

.student-hero,
.student-page-header,
.student-panel,
.student-metric {
  border: 1px solid rgba(29, 171, 207, 0.14);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(22, 52, 61, 0.07);
}

.student-hero,
.student-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem;
  background:
    linear-gradient(115deg, rgba(29, 171, 207, 0.14), rgba(254, 168, 34, 0.12)),
    #ffffff;
}

.student-hero h1,
.student-page-header h1 {
  margin-bottom: 0.5rem;
  color: #16343d;
  font-weight: 850;
}

.student-hero p,
.student-page-header p {
  max-width: 48rem;
  margin-bottom: 0;
  color: #4c6269;
}

.student-eyebrow {
  margin-bottom: 0.5rem;
  color: #126f85;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.student-panel {
  padding: 1.35rem;
}

.student-panel h2,
.student-panel__header h2 {
  margin-bottom: 0;
  color: #16343d;
  font-size: 1.15rem;
  font-weight: 850;
}

.student-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.student-panel__header a {
  font-weight: 700;
}

.student-plan,
.student-material-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.student-plan li,
.student-material-list li {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  background: #f4fbfd;
  border-left: 4px solid var(--algash-primary);
  color: #314b53;
}

.student-status-pill {
  min-width: 170px;
  padding: 1rem 1.2rem;
  border-radius: 8px;
  background: #ffffff;
  text-align: center;
  box-shadow: 0 12px 28px rgba(22, 52, 61, 0.08);
}

.student-status-pill span,
.student-status-pill small {
  display: block;
  color: #65767c;
}

.student-status-pill strong {
  display: block;
  color: #16343d;
  font-size: 1.25rem;
  font-weight: 850;
}

.student-status-pill--success {
  border-top: 5px solid #22a06b;
}

.student-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 800;
}

.student-badge--success {
  background: rgba(34, 160, 107, 0.12);
  color: #157347;
}

.student-badge--warning {
  background: rgba(254, 168, 34, 0.2);
  color: #9a6500;
}

.student-badge--info {
  background: rgba(29, 171, 207, 0.12);
  color: #126f85;
}

.student-badge--orange {
  background: rgba(255, 126, 51, 0.18);
  color: #b54d00;
}

.student-badge--danger {
  background: rgba(220, 53, 69, 0.12);
  color: #b02a37;
}

.student-badge--dark {
  background: rgba(22, 52, 61, 0.12);
  color: #16343d;
}

.student-repeat-status {
  border-radius: 8px;
  padding: 1rem;
}

.student-repeat-status--open {
  background: rgba(29, 171, 207, 0.11);
  color: #126f85;
}

.student-repeat-status--closed {
  background: rgba(220, 53, 69, 0.1);
  color: #b02a37;
}

.student-progress-card,
.student-progress-row {
  padding: 1rem;
  border-radius: 8px;
  background: #f7fbfd;
}

.student-progress-row + .student-progress-row {
  margin-top: 0.85rem;
}

.diary-table-compact th {
  white-space: nowrap;
  color: #41565d;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.diary-table-compact td {
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

.diary-subject-row td {
  border-top: 4px solid var(--algash-primary);
  background: rgba(29, 171, 207, 0.06);
}

.diary-subject-separator td {
  border-top: 4px solid var(--algash-primary);
}

.diary-subject-row td:first-child {
  color: #16343d;
  font-weight: 850;
}

.diary-week-card {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(29, 171, 207, 0.16);
  border-left: 4px solid var(--algash-accent);
  border-radius: 8px;
  background: #ffffff;
}

.diary-week-card:first-of-type {
  margin-top: 0;
}

.diary-week-title {
  margin-bottom: 0.85rem;
  color: #16343d;
  font-size: 1rem;
  font-weight: 850;
}

.student-progress {
    animation: none;
  background-color: var(--algash-primary);
}

.student-progress--success {
  background-color: #22a06b;
}

.student-progress--warning {
  background-color: var(--algash-accent);
}

.student-progress--orange {
  background-color: #ff7e33;
}

.student-progress--danger {
  background-color: #dc3545;
}

.student-comment,
.student-notification {
  display: grid;
  gap: 0.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(29, 171, 207, 0.14);
}

.student-comment:last-child,
.student-notification:last-child {
  border-bottom: 0;
}

.student-comment div,
.student-notification {
  color: #4c6269;
}

.student-comment span,
.student-notification small {
  color: #7a8c92;
}

.student-notification span {
  width: max-content;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  background: rgba(29, 171, 207, 0.12);
  color: #126f85;
  font-weight: 800;
}

.student-metric {
  display: grid;
  gap: 0.5rem;
  padding: 1.25rem;
}

.student-metric span {
  color: #65767c;
  font-weight: 700;
}

.student-metric strong {
  color: #16343d;
  font-size: 2rem;
  font-weight: 850;
}

.student-metric--accent {
  border-top: 5px solid var(--algash-accent);
}

.student-attendance strong {
  display: block;
  margin-bottom: 0.75rem;
  color: #16343d;
  font-size: 2rem;
  font-weight: 850;
}

.teacher-page {
  padding-bottom: 2rem;
}

.teacher-hero,
.teacher-page-header,
.teacher-panel {
  border: 1px solid rgba(29, 171, 207, 0.14);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(22, 52, 61, 0.07);
}

.teacher-hero,
.teacher-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem;
  background:
    linear-gradient(115deg, rgba(29, 171, 207, 0.12), rgba(254, 168, 34, 0.1)),
    #ffffff;
}

.teacher-hero h1,
.teacher-page-header h1 {
  margin-bottom: 0.5rem;
  color: #16343d;
  font-weight: 850;
}

.teacher-hero p,
.teacher-page-header p {
  max-width: 52rem;
  margin-bottom: 0;
  color: #4c6269;
}

.teacher-eyebrow {
  margin-bottom: 0.5rem;
  color: #126f85;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.teacher-panel {
  padding: 1.35rem;
}

.teacher-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.teacher-panel__header h2 {
  margin-bottom: 0;
  color: #16343d;
  font-size: 1.15rem;
  font-weight: 850;
}

.teacher-table th {
  white-space: nowrap;
  color: #41565d;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.teacher-alert-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.teacher-alert-list li {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  background: #f7fbfd;
  border-left: 4px solid var(--algash-accent);
  color: #314b53;
  font-weight: 700;
}

.teacher-meta {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.teacher-meta div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(29, 171, 207, 0.12);
}

.teacher-meta dt {
  color: #65767c;
  font-weight: 700;
}

.teacher-meta dd {
  margin-bottom: 0;
  color: #16343d;
  font-weight: 850;
}

.parent-page {
  padding-bottom: 2rem;
}

.parent-hero,
.parent-page-header,
.parent-panel,
.parent-metric {
  border: 1px solid rgba(29, 171, 207, 0.14);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(22, 52, 61, 0.07);
}

.parent-hero,
.parent-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem;
  background:
    linear-gradient(115deg, rgba(29, 171, 207, 0.12), rgba(254, 168, 34, 0.1)),
    #ffffff;
}

.parent-hero h1,
.parent-page-header h1 {
  margin-bottom: 0.5rem;
  color: #16343d;
  font-weight: 850;
}

.parent-hero p,
.parent-page-header p {
  max-width: 52rem;
  margin-bottom: 0;
  color: #4c6269;
}

.parent-eyebrow {
  margin-bottom: 0.5rem;
  color: #126f85;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.parent-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid rgba(29, 171, 207, 0.14);
}

.parent-switch span {
  color: #65767c;
  font-weight: 850;
}

.parent-panel {
  padding: 1.35rem;
}

.parent-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.parent-panel__header h2,
.parent-panel h2 {
  margin-bottom: 0;
  color: #16343d;
  font-size: 1.15rem;
  font-weight: 850;
}

.parent-table th {
  white-space: nowrap;
  color: #41565d;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.parent-meta {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.parent-meta div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(29, 171, 207, 0.12);
}

.parent-meta dt {
  color: #65767c;
  font-weight: 700;
}

.parent-meta dd {
  margin-bottom: 0;
  color: #16343d;
  font-weight: 850;
  text-align: right;
}

.parent-comment,
.parent-mini-row {
  display: grid;
  gap: 0.35rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(29, 171, 207, 0.14);
}

.parent-comment:last-child,
.parent-mini-row:last-child {
  border-bottom: 0;
}

.parent-comment span,
.parent-mini-row span {
  color: #65767c;
}

.parent-comment p {
  margin-bottom: 0;
  color: #314b53;
}

.parent-score {
  color: #16343d;
  font-size: 3rem;
  font-weight: 850;
  line-height: 1;
}

.parent-metric {
  display: grid;
  gap: 0.5rem;
  padding: 1.25rem;
}

.parent-metric span {
  color: #65767c;
  font-weight: 700;
}

.parent-metric strong {
  color: #16343d;
  font-size: 2rem;
  font-weight: 850;
}

.parent-metric--accent {
  border-top: 5px solid var(--algash-accent);
}

.parent-bars,
.parent-alert-list {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.parent-bar-row,
.parent-progress-row {
  display: grid;
  grid-template-columns: 7rem 1fr 3rem;
  align-items: center;
  gap: 0.75rem;
}

.parent-bar-row div {
  height: 0.8rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e8f6fa;
}

.parent-bar-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--algash-primary);
}

.parent-progress-row + .parent-progress-row {
  margin-top: 1rem;
}

.parent-alert-list li,
.parent-package {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  background: #f7fbfd;
  border-left: 4px solid var(--algash-accent);
}

.parent-package {
  display: grid;
  gap: 0.25rem;
}

.parent-package strong {
  color: #16343d;
  font-size: 1.1rem;
}

.parent-package span {
  color: #65767c;
}

.finance-package-title {
  display: block;
  color: #16343d;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
}

.finance-package-subtitle,
.finance-muted-text {
  display: block;
  color: #53656c;
  font-size: 0.88rem;
  line-height: 1.35;
}

.finance-empty-state {
  padding: 1rem 1.15rem;
  border: 1px dashed rgba(29, 171, 207, 0.35);
  border-radius: 8px;
  background: #f7fbfd;
}

.finance-empty-state strong,
.finance-empty-state span {
  display: block;
}

.finance-empty-state strong {
  color: #16343d;
  font-weight: 800;
}

.finance-empty-state span {
  margin-top: 0.35rem;
  color: #53656c;
  font-size: 0.92rem;
}

.search-results {
  padding-bottom: 2rem;
}

.search-results__header,
.search-section,
.search-empty-state {
  border: 1px solid rgba(29, 171, 207, 0.14);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(22, 52, 61, 0.07);
}

.search-results__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1rem;
  padding: 1.35rem;
}

.search-results__eyebrow {
  margin-bottom: 0.35rem;
  color: #1586a2;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.search-results h1 {
  margin-bottom: 0.35rem;
  color: #16343d;
  font-size: 1.85rem;
  font-weight: 850;
  letter-spacing: 0;
}

.search-summary {
  margin: 0;
  color: #53656c;
}

.search-results__form {
  display: flex;
  gap: 0.5rem;
  width: min(100%, 460px);
}

.search-section {
  margin-bottom: 1rem;
  padding: 1rem;
}

.search-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.search-section__header h2 {
  margin: 0;
  color: #16343d;
  font-size: 1.08rem;
  font-weight: 800;
}

.search-section__header span {
  min-width: 2rem;
  border-radius: 999px;
  background: rgba(29, 171, 207, 0.12);
  color: #126f85;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
}

.search-section__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.8rem;
}

.search-result-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 160px;
  padding: 0.95rem;
  border: 1px solid rgba(29, 171, 207, 0.13);
  border-radius: 8px;
  background: #f8fdff;
}

.search-result-card h3 {
  margin: 0;
  color: #16343d;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
}

.search-result-card p {
  flex: 1;
  margin: 0;
  color: #53656c;
  font-size: 0.92rem;
  line-height: 1.45;
}

.search-result-type {
  display: inline-flex;
  width: fit-content;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(254, 168, 34, 0.14);
  color: #8a5a04;
  font-size: 0.75rem;
  font-weight: 800;
}

.search-empty-state {
  padding: 1.2rem;
  color: #53656c;
  font-weight: 700;
}

.director-page {
  padding-bottom: 2rem;
}

.director-hero,
.director-page-header,
.director-panel,
.director-metric {
  border: 1px solid rgba(29, 171, 207, 0.14);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(22, 52, 61, 0.07);
}

.director-hero,
.director-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem;
  background:
    linear-gradient(115deg, rgba(29, 171, 207, 0.12), rgba(254, 168, 34, 0.1)),
    #ffffff;
}

.director-hero h1,
.director-page-header h1 {
  margin-bottom: 0.5rem;
  color: #16343d;
  font-weight: 850;
}

.director-hero p,
.director-page-header p {
  max-width: 58rem;
  margin-bottom: 0;
  color: #4c6269;
}

.director-eyebrow {
  margin-bottom: 0.5rem;
  color: #126f85;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.director-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
}

.director-metric {
  display: grid;
  gap: 0.5rem;
  padding: 1.25rem;
}

.director-metric span {
  color: #65767c;
  font-weight: 700;
}

.director-metric strong {
  color: #16343d;
  font-size: 2rem;
  font-weight: 850;
}

.director-metric--alert,
.director-metric--danger {
  border-top: 5px solid #dc3545;
}

.director-metric--warning {
  border-top: 5px solid var(--algash-accent);
}

.director-metric--orange {
  border-top: 5px solid #ff7e33;
}

.director-panel {
  padding: 1.35rem;
}

.director-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.director-panel__header h2,
.director-panel h2 {
  margin-bottom: 0;
  color: #16343d;
  font-size: 1.15rem;
  font-weight: 850;
}

.director-table th {
  white-space: nowrap;
  color: #41565d;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.director-bar-row {
  display: grid;
  grid-template-columns: 12rem 1fr 3rem;
  align-items: center;
  gap: 0.75rem;
}

.director-bar-row + .director-bar-row {
  margin-top: 1rem;
}

.director-bar-row div {
  height: 0.8rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e8f6fa;
}

.director-bar-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.director-bar--success {
  background: #22a06b;
}

.director-bar--warning {
  background: var(--algash-accent);
}

.director-bar--orange {
  background: #ff7e33;
}

.director-bar--danger {
  background: #dc3545;
}

.director-alert-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.director-alert-list li {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  background: #f7fbfd;
  border-left: 4px solid var(--algash-accent);
  color: #314b53;
  font-weight: 700;
}

.admin-page {
  padding-bottom: 2rem;
}

.admin-hero,
.admin-page-header,
.admin-panel,
.admin-metric {
  border: 1px solid rgba(29, 171, 207, 0.16);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(22, 52, 61, 0.06);
}

.admin-hero,
.admin-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem;
  background:
    linear-gradient(115deg, rgba(29, 171, 207, 0.11), rgba(254, 168, 34, 0.09)),
    #ffffff;
}

.admin-hero h1,
.admin-page-header h1 {
  margin-bottom: 0.5rem;
  color: #16343d;
  font-weight: 850;
}

.admin-hero p,
.admin-page-header p {
  max-width: 62rem;
  margin-bottom: 0;
  color: #4c6269;
}

.admin-eyebrow {
  margin-bottom: 0.5rem;
  color: #126f85;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-panel {
  padding: 1.35rem;
}

.admin-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-panel__header h2,
.admin-panel h2 {
  margin-bottom: 0;
  color: #16343d;
  font-size: 1.12rem;
  font-weight: 850;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
}

.admin-metric {
  display: grid;
  gap: 0.45rem;
  padding: 1.15rem;
  border-top: 4px solid var(--algash-primary);
}

.admin-metric span,
.admin-control span {
  color: #65767c;
  font-weight: 700;
}

.admin-metric strong {
  color: #16343d;
  font-size: 2rem;
  font-weight: 850;
}

.admin-metric--warning {
  border-top-color: var(--algash-accent);
}

.admin-table th {
  white-space: nowrap;
  color: #41565d;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.admin-table td {
  color: #263f47;
}

.admin-control-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
}

.admin-control-grid--wide {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.admin-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid rgba(29, 171, 207, 0.14);
  border-left: 4px solid var(--algash-primary);
  border-radius: 8px;
  background: #ffffff;
}

.admin-control strong {
  color: #16343d;
  font-size: 1.5rem;
}

.admin-control--warning {
  border-left-color: var(--algash-accent);
}

.admin-control--orange {
  border-left-color: #ff7e33;
}

.admin-control--danger {
  border-left-color: #dc3545;
}

.admin-alert-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-alert-list li,
.admin-mini-row,
.admin-form-preview {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  background: #f7fbfd;
  border-left: 4px solid var(--algash-accent);
}

.admin-action-grid {
  display: grid;
  gap: 0.75rem;
}

.admin-mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.admin-mini-row + .admin-mini-row {
  margin-top: 0.75rem;
}

.admin-mini-row div {
  display: grid;
  gap: 0.15rem;
}

.admin-mini-row span:not(.student-badge) {
  color: #65767c;
}

.admin-radio-list {
  display: grid;
  gap: 0.65rem;
}

.admin-radio-list label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #314b53;
  font-weight: 700;
}

.algash-toast-stack {
  position: fixed;
  top: 1.1rem;
  right: 1.1rem;
  z-index: 1080;
  display: grid;
  width: min(390px, calc(100vw - 2rem));
  gap: 0.75rem;
  pointer-events: none;
}

.algash-toast {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 0.8rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-left: 5px solid var(--algash-primary);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: #16343d;
  box-shadow: 0 18px 44px rgba(22, 52, 61, 0.2);
  backdrop-filter: blur(14px);
  pointer-events: auto;
  transform: translateY(0);
  opacity: 1;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.algash-toast.is-hiding {
  transform: translateY(-0.45rem);
  opacity: 0;
}

.algash-toast__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(29, 171, 207, 0.13);
  color: var(--algash-primary);
}

.algash-toast__body {
  padding-top: 0.2rem;
  color: #263f47;
  font-weight: 750;
  line-height: 1.35;
}

.algash-toast__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #65767c;
}

.algash-toast__close:hover {
  background: rgba(22, 52, 61, 0.08);
  color: #16343d;
}

.algash-toast--success {
  border-left-color: #22a06b;
}

.algash-toast--success .algash-toast__icon {
  background: rgba(34, 160, 107, 0.13);
  color: #157347;
}

.algash-toast--error,
.algash-toast--danger {
  border-left-color: #dc3545;
}

.algash-toast--error .algash-toast__icon,
.algash-toast--danger .algash-toast__icon {
  background: rgba(220, 53, 69, 0.13);
  color: #b02a37;
}

.algash-toast--warning {
  border-left-color: var(--algash-accent);
}

.algash-toast--warning .algash-toast__icon {
  background: rgba(254, 168, 34, 0.2);
  color: #9a6500;
}

.algash-toast--info {
  border-left-color: var(--algash-primary);
}

.algash-history-section {
  scroll-margin-top: 1rem;
}

.algash-history-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.algash-history-tabs a {
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  background: rgba(29, 171, 207, 0.1);
  color: #126f85;
  font-weight: 800;
}

.algash-history-tabs a:hover {
  background: rgba(29, 171, 207, 0.18);
}

.notification-panel {
  overflow: hidden;
}

.notification-list {
  display: grid;
  gap: 0.85rem;
}

.notification-card {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid rgba(29, 171, 207, 0.14);
  border-left: 4px solid rgba(29, 171, 207, 0.42);
  border-radius: 8px;
  background: #ffffff;
}

.notification-card--unread {
  border-left-color: var(--algash-primary);
  background: #f7fbfd;
}

.notification-card--read {
  border-left-color: rgba(22, 52, 61, 0.22);
}

.notification-card__meta,
.notification-card__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.notification-card__meta {
  justify-content: space-between;
}

.notification-card__footer {
  justify-content: space-between;
}

.notification-card__content h2 {
  margin: 0 0 0.35rem;
  color: #16343d;
  font-size: 1rem;
  font-weight: 850;
}

.notification-card__content p {
  margin: 0;
  color: #4c6269;
  line-height: 1.5;
}

.notification-type,
.notification-status {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 850;
}

.notification-type {
  background: rgba(29, 171, 207, 0.12);
  color: #126f85;
}

.notification-date {
  color: #7a8c92;
  font-size: 0.86rem;
  font-weight: 700;
}

.notification-status--read {
  background: rgba(34, 160, 107, 0.12);
  color: #157347;
}

.notification-status--unread {
  background: rgba(254, 168, 34, 0.2);
  color: #9a6500;
}

.notification-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  background: var(--algash-primary);
  color: #ffffff;
  font-weight: 850;
  text-decoration: none;
  box-shadow: 0 10px 20px rgba(29, 171, 207, 0.22);
}

.notification-action-btn:hover,
.notification-action-btn:focus {
  background: #168eab;
  color: #ffffff;
  text-decoration: none;
}

.notification-empty {
  padding: 1rem;
  border-radius: 8px;
  background: #f7fbfd;
  color: #65767c;
  font-weight: 700;
}

.recording-key {
  max-width: 18rem;
  overflow-wrap: anywhere;
  color: #52656b;
  font-family: var(--bs-font-monospace, monospace);
  font-size: 0.86rem;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.analytics-grid--four {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.analytics-card,
.analytics-section,
.analytics-chart-card {
  border: 1px solid rgba(29, 171, 207, 0.12);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 253, 0.96));
  box-shadow: 0 16px 36px rgba(33, 52, 59, 0.08);
}

.analytics-card {
  padding: 1rem;
}

.analytics-kpi {
  min-height: 8.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.55rem;
}

.analytics-kpi span,
.analytics-mini-chart span,
.analytics-chart-card span {
  color: #6a7d83;
  font-size: 0.82rem;
  font-weight: 800;
}

.analytics-kpi strong {
  color: #183a44;
  font-size: 2rem;
  line-height: 1;
}

.analytics-kpi small {
  color: #6a7d83;
  font-weight: 700;
}

.analytics-kpi--success {
  border-color: rgba(34, 160, 107, 0.2);
}

.analytics-kpi--info,
.analytics-kpi--accent {
  border-color: rgba(29, 171, 207, 0.22);
}

.analytics-kpi--warning {
  border-color: rgba(254, 168, 34, 0.24);
}

.analytics-section {
  padding: 1.1rem;
}

.analytics-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.analytics-section__header h2 {
  margin: 0;
  color: #183a44;
  font-size: 1rem;
}

.analytics-section__header a {
  color: var(--algash-primary);
  font-weight: 800;
  text-decoration: none;
}

.analytics-progress {
  position: relative;
  height: 0.55rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e8f2f5;
}

.analytics-progress-bar {
  display: block;
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
  background: var(--algash-primary);
}

.analytics-progress-bar[data-progress-percent] {
  min-width: 0;
}

.analytics-progress-bar--success {
  background: #22a06b;
}

.analytics-progress-bar--warning {
  background: #fea822;
}

.analytics-progress-bar--orange {
  background: #f47c48;
}

.analytics-progress-bar--danger {
  background: #e05252;
}

.analytics-progress-bar--dark {
  background: #82949a;
}

.analytics-progress-bar--info {
  background: var(--algash-primary);
}

.analytics-mini-chart {
  display: grid;
  grid-template-columns: minmax(140px, 1.1fr) minmax(120px, 2fr) auto;
  align-items: center;
  gap: 0.9rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(111, 135, 143, 0.14);
}

.analytics-mini-chart:last-child {
  border-bottom: 0;
}

.analytics-mini-chart strong,
.analytics-mini-row strong {
  display: block;
  color: #183a44;
}

.analytics-mini-chart b,
.analytics-mini-row b {
  color: #183a44;
  font-size: 0.95rem;
}

.analytics-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.8rem;
}

.analytics-status-grid--compact {
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
}

.analytics-chart-card {
  min-height: 7rem;
  padding: 0.85rem;
}

.analytics-chart-card strong {
  display: block;
  margin: 0.35rem 0;
  color: #183a44;
  font-size: 1.55rem;
}

.analytics-chart-card--success {
  border-color: rgba(34, 160, 107, 0.2);
}

.analytics-chart-card--warning {
  border-color: rgba(254, 168, 34, 0.22);
}

.analytics-chart-card--orange {
  border-color: rgba(244, 124, 72, 0.22);
}

.analytics-chart-card--danger {
  border-color: rgba(224, 82, 82, 0.2);
}

.analytics-chip {
  display: block;
  margin-bottom: 0.5rem;
  padding: 0.45rem 0.65rem;
  border-radius: 999px;
  background: #eef7fa;
  color: #183a44;
  font-size: 0.85rem;
  font-weight: 800;
}

.analytics-chip--success {
  background: rgba(34, 160, 107, 0.12);
}

.analytics-chip--warning {
  background: rgba(254, 168, 34, 0.16);
}

.analytics-chip--orange {
  background: rgba(244, 124, 72, 0.15);
}

.analytics-chip--danger {
  background: rgba(224, 82, 82, 0.12);
}

.analytics-status-grid h3 {
  color: #183a44;
  font-size: 0.92rem;
  margin-bottom: 0.75rem;
}

.analytics-list {
  margin: 0;
  padding-left: 1.1rem;
  color: #52656b;
  font-weight: 700;
}

.analytics-list li + li {
  margin-top: 0.55rem;
}

.analytics-mini-row {
  display: grid;
  grid-template-columns: minmax(90px, 0.7fr) minmax(140px, 1.4fr) auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(111, 135, 143, 0.14);
}

.analytics-mini-row:last-child {
  border-bottom: 0;
}

.analytics-mini-row span {
  color: #6a7d83;
  font-size: 0.82rem;
  font-weight: 800;
}

.analytics-filter-bar {
  display: block;
}

.analytics-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(170px, 1fr)) auto;
  gap: 0.85rem;
  align-items: end;
}

.analytics-filter-grid label span {
  display: block;
  margin-bottom: 0.35rem;
  color: #52656b;
  font-size: 0.82rem;
  font-weight: 800;
}

.analytics-filter-actions {
  display: flex;
  gap: 0.5rem;
}

.analytics-filter-btn {
  display: inline-flex;
  min-height: 2.35rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(29, 171, 207, 0.35);
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  background: #fff;
  color: var(--algash-primary);
  font-weight: 850;
  text-decoration: none;
}

.analytics-filter-btn--active,
.analytics-filter-btn:hover,
.analytics-filter-btn:focus {
  background: var(--algash-primary);
  color: #fff;
  text-decoration: none;
}

.journal-subject-row td {
  border-top: 2px solid rgba(29, 171, 207, 0.18);
}

.journal-subject-name {
  color: #12333d;
  font-weight: 950;
}

.grade-journal-card { overflow: hidden; }
.grade-journal-card__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.grade-journal-card__header p { margin: 0.25rem 0 0; color: #6a7d83; font-size: 0.92rem; }
.grade-journal-notice,
.grade-journal-empty { margin: 0.75rem 0 1rem; border: 1px solid rgba(29, 171, 207, 0.2); border-radius: 12px; padding: 0.85rem 1rem; background: rgba(29, 171, 207, 0.07); color: #31535d; font-weight: 650; }
.grade-journal-scroll { max-width: 100%; overflow-x: auto; overflow-y: visible; padding-bottom: 0.5rem; scrollbar-color: rgba(29, 171, 207, 0.55) rgba(29, 171, 207, 0.08); -webkit-overflow-scrolling: touch; }
.grade-journal-table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; color: #183a44; font-size: 0.84rem; }
.grade-journal-table th,
.grade-journal-table td { height: 62px; border-right: 1px solid rgba(111, 135, 143, 0.17); border-bottom: 1px solid rgba(111, 135, 143, 0.17); padding: 0.65rem 0.7rem; background: #fff; text-align: center; vertical-align: middle; }
.grade-journal-table thead th { height: 72px; background: #eaf6fa; color: #31535d; font-size: 0.74rem; font-weight: 900; text-transform: uppercase; }
.grade-journal-subject { width: 160px; min-width: 160px; max-width: 160px; overflow-wrap: anywhere; white-space: normal; background: #f3fafc !important; }
.grade-journal-group { width: 150px; min-width: 150px; max-width: 150px; overflow-wrap: anywhere; white-space: normal; background: #f9fcfd !important; }
.grade-journal-assessment { width: 165px; min-width: 165px; max-width: 165px; }
.grade-journal-total { width: 125px; min-width: 125px; max-width: 125px; text-align: center !important; }
.grade-journal-table th,
.grade-journal-table td {
  position: static !important;
  inset: auto !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  z-index: auto !important;
  box-shadow: none !important;
}
.grade-journal-date { width: 88px; min-width: 88px; white-space: nowrap; }
.grade-journal-value.has-grade { color: #15596b; font-weight: 850; }
.grade-journal-value.not-applicable { color: #97a4a8; }
.attendance-dot { display: inline-flex; width: 28px; height: 28px; border-radius: 50%; align-items: center; justify-content: center; font-weight: 900; line-height: 1; }
.attendance-dot--danger { background: #dc3545; color: #fff; }
.attendance-dot--warning { background: #ffc107; color: #3a2a00; }
.attendance-dot--orange { background: #fd7e14; color: #fff; }
.gradebook-editable-cell.gradebook-cell--changed {
    background: #fff3bf !important;
    box-shadow: inset 0 0 0 1px #f1c75b;
    transition: background-color 160ms ease, box-shadow 160ms ease;
}
.gradebook-chart-wrap { height: 340px; min-height: 260px; }
.grade-journal-subject-name { color: #12333d; font-weight: 900; line-height: 1.35; }
.grade-journal-assessment-label { display: inline-flex; border-radius: 999px; padding: 0.25rem 0.55rem; background: rgba(29, 171, 207, 0.09); color: #175466; font-weight: 850; }
.grade-journal-group-start td { border-top: 2px solid rgba(29, 171, 207, 0.24); }
.grade-journal-table tbody tr.journal-row-white { background: #fff; }
.grade-journal-table tbody tr.journal-row-light { background: #f4f7f8; }
.grade-journal-table tbody tr.journal-row-white > td:not(.grade-journal-subject):not(.grade-journal-group),
.grade-journal-table tbody tr.journal-row-light > td:not(.grade-journal-subject):not(.grade-journal-group) { background: inherit !important; }

@media (max-width: 767px) {
  .grade-journal-card__header { align-items: stretch; flex-direction: column; }
  .grade-journal-table { font-size: 0.78rem; }
  .grade-journal-table th,
  .grade-journal-table td { padding: 0.55rem 0.45rem; }
  .grade-journal-subject { width: 125px; min-width: 125px; max-width: 125px; }
  .grade-journal-group { width: 120px; min-width: 120px; max-width: 120px; }
  .grade-journal-assessment { width: 140px; min-width: 140px; max-width: 140px; }
  .grade-journal-total { width: 105px; min-width: 105px; max-width: 105px; }
}

.group-gradebook__panel .teacher-panel__header p {
  margin: 0.25rem 0 0;
  color: #6a7d83;
  font-size: 0.9rem;
  font-weight: 600;
}

.group-gradebook__scroll {
  overflow-x: auto;
  padding-bottom: 0.35rem;
}

.group-gradebook-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: #183a44;
  font-size: 0.88rem;
}

.group-gradebook-table th,
.group-gradebook-table td {
  min-width: 155px;
  border-right: 1px solid rgba(111, 135, 143, 0.16);
  border-bottom: 1px solid rgba(111, 135, 143, 0.16);
  padding: 0.65rem;
  vertical-align: middle;
  background: #fff;
}

.group-gradebook-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #eef8fb;
  color: #31535d;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.group-gradebook-sticky {
  position: sticky;
  z-index: 3;
  box-shadow: 8px 0 14px rgba(24, 58, 68, 0.04);
}

.group-gradebook-sticky--student {
  left: 0;
  min-width: 190px;
  width: 190px;
  background: #f7fbfd;
}

.group-gradebook-sticky--metric {
  left: 190px;
  min-width: 190px;
  width: 190px;
  background: #fbfdfe;
}

thead .group-gradebook-sticky {
  z-index: 6;
  background: #e6f4f8;
}

.group-gradebook-week {
  min-width: 170px;
}

th.group-gradebook-week span,
th.group-gradebook-week small,
.group-gradebook-sticky--metric small {
  display: block;
}

th.group-gradebook-week small,
.group-gradebook-sticky--metric small,
.group-gradebook-percent,
.group-gradebook-empty {
  margin-top: 0.2rem;
  color: #7a8c92;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: none;
}

.group-gradebook-student-row td {
  border-top: 2px solid rgba(29, 171, 207, 0.18);
}

.group-gradebook-student-name {
  color: #12333d;
  font-weight: 950;
}

.group-gradebook-input,
.group-gradebook-attendance {
  min-width: 7.5rem;
  border-color: rgba(29, 171, 207, 0.22);
  border-radius: 8px;
  font-weight: 800;
}

.group-gradebook-input:focus,
.group-gradebook-attendance:focus {
  border-color: var(--algash-primary);
  box-shadow: 0 0 0 0.18rem rgba(29, 171, 207, 0.14);
}

.group-gradebook-average {
  min-width: 110px;
  text-align: center;
  background: #fbfdfe;
}

.lesson-gradebook-panel .teacher-panel__header {
  align-items: flex-start;
  gap: 1rem;
}

.lesson-gradebook-panel .teacher-panel__header p {
  margin: 0.25rem 0 0;
  color: #65767c;
  font-size: 0.92rem;
}

.lesson-gradebook-scroll {
  border: 1px solid rgba(29, 171, 207, 0.14);
  border-radius: 12px;
  overflow: auto;
  background: #ffffff;
}

.lesson-gradebook-table {
  min-width: 1040px;
  margin-bottom: 0;
}

.lesson-gradebook-table th,
.lesson-gradebook-table td {
  border-color: #e8f1f4;
  vertical-align: top;
}

.lesson-gradebook-table thead th {
  background: linear-gradient(180deg, #f4fbfd 0%, #ecf7fa 100%);
  color: #16343d;
  font-weight: 850;
  white-space: nowrap;
}

.lesson-gradebook-table thead small {
  display: block;
  margin-top: 0.15rem;
  color: #7a8c92;
  font-size: 0.75rem;
  font-weight: 800;
}

.lesson-gradebook-student {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 210px;
  background: #ffffff;
  box-shadow: 1px 0 0 #e8f1f4;
}

thead .lesson-gradebook-student {
  z-index: 3;
  background: linear-gradient(180deg, #f4fbfd 0%, #ecf7fa 100%);
}

.lesson-gradebook-cell {
  min-width: 150px;
}

.lesson-gradebook-score {
  display: grid;
  grid-template-columns: minmax(64px, 1fr) auto minmax(58px, 0.75fr);
  align-items: center;
  gap: 0.35rem;
}

.lesson-gradebook-score span {
  color: #8a9aa6;
  font-weight: 800;
}

.lesson-gradebook-score .form-control {
  min-height: 2rem;
  padding: 0.28rem 0.45rem;
  border-color: #d8e8ee;
  border-radius: 8px;
  font-weight: 750;
}

.lesson-gradebook-max {
  color: #5f747b;
}

.lesson-gradebook-result {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 1.2rem;
  margin-top: 0.4rem;
  color: #5f747b;
  font-size: 0.8rem;
  font-weight: 800;
}

.lesson-gradebook-result small {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.1rem 0.38rem;
  background: rgba(29, 171, 207, 0.1);
  color: #126f85;
  font-weight: 900;
}

.lesson-gradebook-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.attendance-filter {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  align-items: end;
  gap: 1rem;
}

.attendance-filter label {
  display: grid;
  gap: 0.35rem;
  margin: 0;
}

.attendance-filter span {
  color: #5f747b;
  font-size: 0.86rem;
  font-weight: 800;
}

.attendance-manager .form-select,
.attendance-manager .form-control {
  border-color: rgba(29, 171, 207, 0.22);
  border-radius: 8px;
}

@media (max-width: 768px) {
  .lesson-gradebook-panel .teacher-panel__header {
    display: grid;
  }

  .lesson-gradebook-table {
    min-width: 920px;
  }

  .lesson-gradebook-student {
    min-width: 170px;
  }

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

.sidebar-notification-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
}

#side-nav .sidebar-notification-icon i {
  margin-right: 0;
}

.sidebar-notification-badge {
  position: absolute;
  top: -5px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc3545;
  color: #fff;
  border: 2px solid #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 14px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(220, 53, 69, 0.28);
}

.schedule-day-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.schedule-day-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  min-height: 168px;
  padding: 16px;
}

.schedule-day-card h3 {
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
}

.schedule-chip-list {
  display: grid;
  gap: 10px;
}

.schedule-chip {
  display: grid;
  gap: 4px;
  border-left: 3px solid #2563eb;
  border-radius: 6px;
  background: #f8fafc;
  padding: 10px 12px;
}

.schedule-chip__time {
  font-weight: 700;
  color: #1d4ed8;
}

.schedule-chip__title {
  font-weight: 600;
  color: #111827;
}

.schedule-chip__meta {
  color: #64748b;
  font-size: 0.9rem;
}

.schedule-lesson-row {
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
}

.schedule-lesson-row__main {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: #111827;
}

.schedule-lesson-row__time {
  flex: 0 0 auto;
  font-weight: 800;
  color: #1d4ed8;
}

.schedule-lesson-row__subject {
  min-width: 0;
  font-weight: 700;
}

.schedule-lesson-row__meta {
  margin-top: 3px;
  color: #64748b;
  font-size: 0.9rem;
}

.schedule-day-empty {
  margin: 0;
  border: 1px dashed rgba(100, 116, 139, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  color: #64748b;
  padding: 12px;
}

.weekly-diary-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
  align-items: stretch;
}

.weekly-diary-day {
  overflow: hidden;
  border: 1px solid #dbeaf0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 41, 60, 0.06);
}

.weekly-diary-day-header {
  padding: 14px 18px;
  border-bottom: 1px solid #dbeaf0;
  background: linear-gradient(90deg, rgba(31, 174, 205, 0.14), rgba(255, 168, 0, 0.08));
}

.weekly-diary-day-header h3 {
  margin: 0;
  color: #12313f;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
}

.weekly-diary-lessons {
  display: block;
}

.weekly-diary-row {
  display: grid !important;
  grid-template-columns: 44px 120px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-height: auto;
  padding: 12px 18px;
  border-bottom: 1px solid #edf3f6;
  background: #fff;
}

.weekly-diary-row:last-child {
  border-bottom: 0;
}

.weekly-diary-row--head {
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  padding-top: 9px;
  padding-bottom: 9px;
}

.weekly-diary-number,
.weekly-diary-time,
.weekly-diary-content {
  min-width: 0;
  padding: 0;
}

.weekly-diary-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #20accb;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.weekly-diary-row--head .weekly-diary-number {
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: #64748b;
  justify-content: flex-start;
}

.weekly-diary-row:not(.weekly-diary-row--head) .weekly-diary-number {
  color: #fff;
}

.weekly-diary-time {
  color: #12313f;
  font-weight: 700;
  white-space: nowrap;
}

.weekly-diary-subject {
  margin-bottom: 4px;
  color: #12313f;
  font-weight: 800;
}

.weekly-diary-meta {
  color: #657786;
  font-size: 14px;
  line-height: 1.3;
}

.weekly-diary-empty {
  padding: 18px;
  color: #8a9aa6;
  font-size: 14px;
  background: #fff;
}

.homework-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.homework-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
  padding: 16px;
}

.homework-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.homework-card h2 {
  margin: 2px 0 0;
  color: #12313f;
  font-size: 1.05rem;
  font-weight: 800;
}

.homework-card p {
  color: #334155;
}

.homework-card__meta {
  display: grid;
  gap: 4px;
  color: #64748b;
  font-size: 0.9rem;
}

.material-card {
  border-left: 4px solid var(--algash-primary);
}

.material-card .btn {
  width: max-content;
}

.legal-page {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.legal-hero {
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(32, 172, 203, 0.16), rgba(255, 168, 0, 0.12));
  border: 1px solid rgba(32, 172, 203, 0.18);
  padding: 34px;
  box-shadow: 0 16px 38px rgba(15, 41, 60, 0.08);
}

.legal-eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 10px;
  color: #20accb;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.legal-hero h1 {
  margin: 0;
  color: #12313f;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 900;
}

.legal-hero p {
  max-width: 760px;
  margin: 12px 0 0;
  color: #475569;
  font-size: 1.05rem;
}

.legal-card {
  margin-top: 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  padding: 30px;
}

.legal-note {
  margin-bottom: 18px;
  border-left: 4px solid #20accb;
  border-radius: 8px;
  background: #f0fbfe;
  color: #315665;
  padding: 12px 14px;
  font-size: 0.95rem;
}

.legal-section + .legal-section {
  margin-top: 24px;
}

.legal-section h2 {
  margin: 0 0 10px;
  color: #12313f;
  font-size: 1.2rem;
  font-weight: 850;
}

.legal-section p {
  margin: 0;
  color: #334155;
  line-height: 1.7;
}

.legal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.legal-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
  margin-top: 22px;
  font-size: 0.92rem;
}

.legal-footer-links a {
  color: #20accb;
  font-weight: 700;
  text-decoration: none;
}

.legal-footer-links a:hover {
  color: #12313f;
  text-decoration: underline;
}

.landing-legal-footer {
  background: #0f2d3a;
  color: rgba(255, 255, 255, 0.78);
  padding: 24px 0 30px;
  text-align: center;
}

.landing-legal-footer p {
  margin: 0;
}

.landing-legal-footer .legal-footer-links a {
  color: #d8f7ff;
}

.registration-legal-block {
  margin: 18px 0;
  border: 1px solid rgba(32, 172, 203, 0.2);
  border-radius: 8px;
  background: #f8fcfd;
  padding: 14px;
  color: #475569;
  font-size: 0.92rem;
}

.registration-legal-block p {
  margin: 0 0 12px;
}

.registration-legal-block a {
  color: #168ead;
  font-weight: 700;
}

.registration-consent-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  color: #12313f;
  font-weight: 700;
}

.registration-consent-check .form-check-input {
  flex: 0 0 auto;
  margin-top: 3px;
}

.registration-card__footer .legal-footer-links {
  margin-top: 14px;
  gap: 8px 12px;
  font-size: 0.82rem;
}

.sidebar-help-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  color: #20accb;
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
}

.sidebar-help-link:hover {
  color: #12313f;
  text-decoration: underline;
}

.help-page {
  padding: 22px 0 48px;
}

.help-hero {
  border: 1px solid rgba(32, 172, 203, 0.18);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(32, 172, 203, 0.14), rgba(255, 168, 0, 0.1));
  box-shadow: 0 14px 34px rgba(15, 41, 60, 0.07);
  padding: 30px;
}

.help-eyebrow {
  display: inline-flex;
  margin-bottom: 8px;
  color: #20accb;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.help-hero h1 {
  margin: 0;
  color: #12313f;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
}

.help-hero p {
  max-width: 780px;
  margin: 10px 0 0;
  color: #475569;
  font-size: 1.02rem;
}

.help-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.help-card,
.help-panel,
.help-callout {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.help-card {
  display: block;
  min-height: 190px;
  padding: 20px;
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.help-card:hover {
  border-color: rgba(32, 172, 203, 0.35);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.09);
  transform: translateY(-2px);
}

.help-card i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: rgba(32, 172, 203, 0.12);
  color: #20accb;
}

.help-card--accent i {
  background: rgba(255, 168, 0, 0.18);
  color: #d97706;
}

.help-card h2,
.help-panel h2 {
  margin: 0 0 10px;
  color: #12313f;
  font-size: 1.16rem;
  font-weight: 900;
}

.help-card p,
.help-panel p {
  margin: 0;
  color: #64748b;
  line-height: 1.55;
}

.help-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.help-panel {
  margin-top: 22px;
  padding: 22px;
}

.help-layout .help-panel {
  margin-top: 0;
}

.help-checklist,
.help-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.help-checklist li,
.help-steps li {
  position: relative;
  min-height: 34px;
  color: #334155;
  line-height: 1.45;
}

.help-checklist li {
  padding-left: 28px;
}

.help-checklist li::before {
  content: "";
  position: absolute;
  top: 0.48em;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #20accb;
  box-shadow: 0 0 0 5px rgba(32, 172, 203, 0.12);
}

.help-steps {
  counter-reset: help-step;
}

.help-steps li {
  counter-increment: help-step;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.help-steps li::before {
  content: counter(help-step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #20accb;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 900;
}

.help-steps--wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.help-callout {
  margin-top: 18px;
  border-left: 4px solid #20accb;
  background: #f0fbfe;
  color: #315665;
  padding: 14px 16px;
}

.help-account-list {
  display: grid;
  gap: 8px;
}

.help-account-list code,
.help-command {
  display: block;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.help-account-list code {
  padding: 9px 10px;
  color: #12313f;
}

.help-command {
  margin: 10px 0 14px;
  padding: 12px;
  white-space: pre-wrap;
}

.help-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.pilot-launch-page {
  padding: 22px 0 48px;
}

.data-quality-page { padding: 24px 0 48px; }
.audit-log-page { padding: 24px 0 48px; }
.notification-center-page { padding: 24px 0 48px; }
.onboarding-card { background: linear-gradient(135deg, #f8fbff, #eef7ff); border: 1px solid #cfe3f6; border-radius: 18px; box-shadow: 0 10px 28px rgba(15,41,60,.06); overflow: hidden; padding: 20px; }
.my-profile-page { padding: 24px 0 48px; }
.user-duplicates-page { padding: 24px 0 48px; }
.periods-page { padding: 24px 0 48px; }
.periods-hero { align-items: center; margin-bottom: 18px; }
.period-warning { align-items: center; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 13px; color: #1e40af; display: flex; gap: 9px; margin-bottom: 18px; padding: 13px 15px; }
.period-list { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.period-card, .period-form-panel, .period-section { background: #fff; border: 1px solid #e5eaf2; border-radius: 17px; box-shadow: 0 8px 25px rgba(15,23,42,.05); padding: 20px; }
.period-card__top { align-items: flex-start; display: flex; gap: 16px; justify-content: space-between; }
.period-card h2 { font-size: 19px; margin: 7px 0 3px; }
.period-card p { color: #64748b; }
.period-card__metrics { display: flex; gap: 10px; }
.period-card__metrics span { background: #f1f5f9; border-radius: 10px; color: #64748b; font-size: 11px; padding: 8px; text-align: center; }
.period-card__metrics strong { color: #1e3a8a; display: block; font-size: 18px; }
.period-status { border-radius: 999px; display: inline-block; font-size: 11px; font-weight: 800; padding: 5px 9px; }
.period-status--draft { background: #f1f5f9; color: #475569; }
.period-status--active { background: #dcfce7; color: #15803d; }
.period-status--archived { background: #e2e8f0; color: #334155; }
.period-card__actions, .period-detail-actions, .period-detail-links { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; }
.period-form-panel { margin: 0 auto; max-width: 900px; }
.period-form-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.period-form-grid label { color: #475569; display: block; font-size: 13px; font-weight: 700; margin-bottom: 5px; }
.period-form-wide { grid-column: 1 / -1; }
.period-summary { display: grid; gap: 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; }
.period-summary div { background: #fff; border: 1px solid #e5eaf2; border-radius: 13px; padding: 14px; }
.period-summary span { color: #64748b; display: block; font-size: 11px; }
.period-summary strong { color: #1e3a8a; font-size: 24px; }
.period-detail-links { margin-bottom: 18px; }
.period-section { margin-bottom: 14px; }
.period-section h2 { font-size: 19px; margin-bottom: 13px; }
.period-student-list { display: flex; flex-wrap: wrap; gap: 7px; }
.period-student-list span { background: #f1f5f9; border-radius: 999px; padding: 6px 10px; }
.period-empty { background: #fff; border: 1px dashed #cbd5e1; border-radius: 17px; grid-column: 1 / -1; padding: 55px; text-align: center; }
@media (max-width: 900px) { .period-list { grid-template-columns: 1fr; } .period-summary { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .period-form-grid, .period-summary { grid-template-columns: 1fr; } .period-form-wide { grid-column: auto; } .period-card__top { flex-direction: column; } }
.duplicates-hero { align-items: center; margin-bottom: 18px; }
.duplicates-warning { align-items: center; background: #fffbeb; border: 1px solid #fde68a; border-radius: 14px; color: #854d0e; display: flex; gap: 10px; margin-bottom: 18px; padding: 14px 16px; }
.duplicates-summary { display: grid; gap: 12px; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 18px; }
.duplicates-summary > div { background: #fff; border: 1px solid #e5eaf2; border-radius: 14px; padding: 15px; }
.duplicates-summary span { color: #64748b; display: block; font-size: 12px; min-height: 36px; }
.duplicates-summary strong { color: #1e3a8a; font-size: 26px; }
.duplicates-filters { background: #fff; border: 1px solid #e5eaf2; border-radius: 15px; display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(150px, .8fr)) minmax(220px, 1.4fr) auto; margin-bottom: 18px; padding: 15px; }
.duplicates-filters input, .duplicates-filters select { border: 1px solid #d7deea; border-radius: 9px; min-height: 41px; padding: 7px 10px; width: 100%; }
.duplicates-table-wrap { background: #fff; border: 1px solid #e5eaf2; border-radius: 17px; overflow: hidden; }
.duplicates-table { margin: 0; min-width: 1100px; }
.duplicates-table th { background: #f8fafc; color: #475569; font-size: 11px; padding: 12px; text-transform: uppercase; }
.duplicates-table td { padding: 13px; vertical-align: top; }
.duplicate-badge { border-radius: 999px; display: inline-block; font-size: 11px; font-weight: 800; padding: 5px 8px; }
.duplicate-badge--critical { background: #fee2e2; color: #b91c1c; }
.duplicate-badge--warning { background: #fef3c7; color: #92400e; }
.duplicate-users { display: grid; gap: 8px; min-width: 250px; }
.duplicate-users article { background: #f8fafc; border-radius: 9px; display: grid; padding: 9px; }
.duplicate-users small, .duplicate-users span { color: #64748b; font-size: 11px; }
.duplicate-users em { color: #475569; font-size: 10px; font-style: normal; }
.duplicate-actions { display: grid; gap: 9px; min-width: 160px; }
.duplicate-actions div { border-bottom: 1px solid #eef2f7; display: grid; gap: 3px; padding-bottom: 7px; }
.duplicate-actions a { font-size: 11px; }
@media (max-width: 1200px) { .duplicates-summary { grid-template-columns: repeat(3, 1fr); } .duplicates-filters { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 650px) { .duplicates-summary, .duplicates-filters { grid-template-columns: 1fr; } }
.my-profile-hero { align-items: center; margin-bottom: 22px; }
.my-profile-grid { display: grid; gap: 20px; grid-template-columns: 280px minmax(0, 1fr); }
.my-profile-card, .my-profile-panel { background: #fff; border: 1px solid #e5eaf2; border-radius: 18px; box-shadow: 0 8px 26px rgba(15,23,42,.05); padding: 22px; }
.my-profile-card { align-self: start; text-align: center; }
.my-profile-avatar { border: 4px solid #dbeafe; border-radius: 50%; height: 110px; margin: 0 auto 14px; overflow: hidden; width: 110px; }
.my-profile-avatar img { height: 100%; object-fit: cover; width: 100%; }
.my-profile-card h2 { font-size: 20px; margin: 0 0 5px; }
.my-profile-role { background: #dbeafe; border-radius: 999px; color: #1d4ed8; display: inline-block; font-size: 12px; font-weight: 800; padding: 5px 10px; }
.my-profile-card dl { margin: 22px 0 0; text-align: left; }
.my-profile-card dl div { border-top: 1px solid #eef2f7; padding: 10px 0; }
.my-profile-card dt { color: #64748b; font-size: 11px; text-transform: uppercase; }
.my-profile-card dd { color: #1e293b; margin: 2px 0 0; overflow-wrap: anywhere; }
.my-profile-main { display: grid; gap: 18px; }
.my-profile-panel h2 { font-size: 20px; margin-bottom: 17px; }
.my-profile-panel h3 { color: #475569; font-size: 13px; margin: 16px 0 7px; text-transform: uppercase; }
.my-profile-form-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.my-profile-form-grid label, .my-profile-password label { color: #475569; display: block; font-size: 13px; font-weight: 700; margin-bottom: 5px; }
.my-profile-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.my-profile-tags span { background: #f1f5f9; border-radius: 999px; color: #334155; font-size: 12px; padding: 6px 10px; }
.my-profile-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.my-profile-security { align-items: center; display: flex; gap: 20px; justify-content: space-between; }
.my-profile-security h2 { margin-bottom: 8px; }
.my-profile-security p { color: #64748b; margin: 3px 0; }
.my-profile-password { margin: 0 auto; max-width: 680px; }
@media (max-width: 850px) { .my-profile-grid { grid-template-columns: 1fr; } .my-profile-form-grid { grid-template-columns: 1fr; } }
@media (max-width: 540px) { .my-profile-security { align-items: flex-start; flex-direction: column; } }
.onboarding-card__header { align-items: center; display: flex; gap: 20px; justify-content: space-between; margin-bottom: 15px; }
.onboarding-card__eyebrow { color: #2563eb; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.onboarding-card__header h2 { color: #12313f; font-size: 21px; margin: 2px 0; }
.onboarding-card__header p { color: #64748b; margin: 0; }
.onboarding-card__progress { min-width: 160px; text-align: right; }
.onboarding-card__progress strong { color: #1d4ed8; font-size: 22px; }
.onboarding-progress { background: #dbeafe; border-radius: 999px; height: 7px; margin-top: 5px; overflow: hidden; }
.onboarding-progress i { background: linear-gradient(90deg, #2563eb, #20accb); display: block; height: 100%; }
.onboarding-steps { display: grid; gap: 9px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.onboarding-step { align-items: center; background: rgba(255,255,255,.86); border: 1px solid #dbe7f1; border-radius: 12px; display: grid; gap: 12px; grid-template-columns: 90px minmax(0, 1fr) auto; padding: 12px; }
.onboarding-step__status { font-size: 11px; font-weight: 800; }
.onboarding-step__status i { margin-right: 4px; }
.onboarding-step--ready .onboarding-step__status { color: #15803d; }
.onboarding-step--waiting .onboarding-step__status { color: #a16207; }
.onboarding-step--action .onboarding-step__status { color: #b91c1c; }
.onboarding-step__content h3 { color: #1e293b; font-size: 14px; margin: 0 0 2px; }
.onboarding-step__content p { color: #64748b; font-size: 12px; margin: 0; }
.onboarding-dismiss { margin-top: 12px; text-align: right; }
.onboarding-dismiss button { background: none; border: 0; color: #64748b; font-size: 12px; padding: 4px; }
@media (max-width: 1100px) { .onboarding-steps { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .onboarding-card__header { align-items: flex-start; flex-direction: column; } .onboarding-card__progress { text-align: left; width: 100%; } .onboarding-step { grid-template-columns: 1fr; } }
.notification-center-hero { align-items: center; margin-bottom: 20px; }
.notification-summary-grid { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 20px; }
.notification-summary-card { background: #fff; border: 1px solid #e5eaf2; border-radius: 16px; box-shadow: 0 8px 24px rgba(15,23,42,.05); padding: 18px; }
.notification-summary-card span { color: #64748b; display: block; font-size: 13px; }
.notification-summary-card strong { color: #1e3a8a; display: block; font-size: 30px; margin-top: 5px; }
.notification-summary-card--new { border-top: 3px solid #2563eb; }
.notification-filters { background: #fff; border: 1px solid #e5eaf2; border-radius: 16px; display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(170px, 1fr)) auto; margin-bottom: 20px; padding: 16px; }
.notification-filters input, .notification-filters select { border: 1px solid #d7deea; border-radius: 10px; min-height: 42px; padding: 8px 12px; width: 100%; }
.notification-center-list { display: grid; gap: 12px; }
.notification-center-card { align-items: center; background: #fff; border: 1px solid #e5eaf2; border-radius: 16px; display: grid; gap: 15px; grid-template-columns: 44px minmax(0, 1fr) auto; padding: 18px; }
.notification-center-card--unread { background: #eff6ff; border-color: #93c5fd; box-shadow: 0 8px 24px rgba(37,99,235,.08); }
.notification-center-card__icon { align-items: center; background: #dbeafe; border-radius: 12px; color: #1d4ed8; display: flex; height: 44px; justify-content: center; width: 44px; }
.notification-center-card__meta { color: #64748b; display: flex; font-size: 12px; gap: 12px; }
.notification-center-card__body h2 { font-size: 17px; margin: 5px 0; }
.notification-center-card__body p { color: #475569; margin: 0; }
.notification-center-card__actions { align-items: flex-end; display: flex; flex-direction: column; gap: 8px; }
.notification-center-empty { background: #fff; border: 1px dashed #cbd5e1; border-radius: 18px; color: #64748b; padding: 55px 20px; text-align: center; }
.notification-center-empty i { font-size: 32px; margin-bottom: 12px; }
.notification-center-empty h2 { font-size: 18px; }
@media (max-width: 768px) { .notification-summary-grid, .notification-filters { grid-template-columns: 1fr; } .notification-center-card { grid-template-columns: 40px 1fr; } .notification-center-card__actions { align-items: flex-start; grid-column: 1 / -1; } }
.audit-log-hero { align-items: center; margin-bottom: 22px; }
.audit-log-filters { background: #fff; border: 1px solid #e5eaf2; border-radius: 16px; display: grid; gap: 10px; grid-template-columns: repeat(2, 145px) repeat(4, minmax(130px, 1fr)) minmax(180px, 1.4fr) auto; margin-bottom: 22px; padding: 16px; }
.audit-log-filters input, .audit-log-filters select { border: 1px solid #d7deea; border-radius: 9px; min-height: 40px; padding: 7px 10px; width: 100%; }
.audit-log-table-wrap { background: #fff; border: 1px solid #e5eaf2; border-radius: 18px; box-shadow: 0 8px 28px rgba(15, 23, 42, .05); overflow: hidden; }
.audit-log-table { margin: 0; }
.audit-log-table th { background: #f8fafc; color: #475569; font-size: 12px; padding: 13px; text-transform: uppercase; }
.audit-log-table td { padding: 13px; vertical-align: middle; }
@media (max-width: 1200px) { .audit-log-filters { grid-template-columns: repeat(4, minmax(140px, 1fr)); } }
@media (max-width: 768px) { .audit-log-filters { grid-template-columns: 1fr; } }
.data-quality-hero { margin-bottom: 22px; }
.data-quality-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.data-quality-stat { background: #fff; border: 1px solid #e5eaf2; border-radius: 16px; padding: 18px; box-shadow: 0 8px 24px rgba(15, 23, 42, .05); }
.data-quality-stat span { display: block; color: #64748b; font-size: 13px; min-height: 40px; }
.data-quality-stat strong { display: block; color: #1e3a8a; font-size: 30px; line-height: 1; margin-top: 8px; }
.data-quality-stat--critical { border-top: 3px solid #dc2626; }
.data-quality-filters { align-items: center; background: #fff; border: 1px solid #e5eaf2; border-radius: 16px; display: grid; gap: 12px; grid-template-columns: 190px 190px minmax(220px, 1fr) auto; margin-bottom: 22px; padding: 16px; }
.data-quality-filters select, .data-quality-filters input { border: 1px solid #d7deea; border-radius: 10px; min-height: 42px; padding: 8px 12px; width: 100%; }
.data-quality-table-wrap { background: #fff; border: 1px solid #e5eaf2; border-radius: 18px; box-shadow: 0 8px 28px rgba(15, 23, 42, .05); overflow: hidden; }
.data-quality-table-heading { align-items: center; display: flex; justify-content: space-between; padding: 20px 22px; }
.data-quality-table-heading h2 { font-size: 20px; margin: 0; }
.data-quality-table-heading span { color: #64748b; }
.data-quality-table { margin: 0; }
.data-quality-table th { background: #f8fafc; color: #475569; font-size: 12px; padding: 13px 16px; text-transform: uppercase; }
.data-quality-table td { padding: 14px 16px; vertical-align: middle; }
.data-quality-badge { border-radius: 999px; display: inline-block; font-size: 12px; font-weight: 700; padding: 5px 9px; white-space: nowrap; }
.data-quality-badge--critical { background: #fee2e2; color: #b91c1c; }
.data-quality-badge--warning { background: #fef3c7; color: #92400e; }
@media (max-width: 1100px) { .data-quality-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 768px) { .data-quality-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } .data-quality-filters { grid-template-columns: 1fr; } .data-quality-table-heading { align-items: flex-start; flex-direction: column; gap: 8px; } }
@media (max-width: 480px) { .data-quality-summary { grid-template-columns: 1fr; } }

.pilot-launch-hero {
  align-items: stretch;
}

.pilot-progress-card {
  min-width: 220px;
  border: 1px solid rgba(32, 172, 203, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 28px rgba(15, 41, 60, 0.08);
  padding: 18px;
  text-align: right;
}

.pilot-progress-card span,
.pilot-progress-card small {
  display: block;
  color: #64748b;
  font-weight: 700;
}

.pilot-progress-card strong {
  display: block;
  color: #12313f;
  font-size: 2.8rem;
  font-weight: 950;
  line-height: 1;
  margin: 8px 0;
}

.pilot-warning {
  margin-top: 18px;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  background: #fffbeb;
  color: #7c4a03;
  padding: 14px 16px;
  font-weight: 700;
}

.pilot-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.pilot-kpi {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  padding: 14px;
}

.pilot-kpi span {
  display: block;
  color: #64748b;
  font-size: 0.86rem;
  font-weight: 800;
}

.pilot-kpi strong {
  display: block;
  margin-top: 4px;
  color: #12313f;
  font-size: 1.55rem;
  font-weight: 950;
}

.pilot-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.pilot-section-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.pilot-section-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid #edf3f6;
  background: linear-gradient(90deg, rgba(32, 172, 203, 0.1), rgba(255, 168, 0, 0.06));
}

.pilot-section-card h2 {
  margin: 0 0 6px;
  color: #12313f;
  font-size: 1.12rem;
  font-weight: 900;
}

.pilot-section-card p {
  margin: 0;
  color: #64748b;
  line-height: 1.45;
}

.pilot-checklist {
  display: grid;
}

.pilot-check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid #edf3f6;
}

.pilot-check-row:last-child {
  border-bottom: 0;
}

.pilot-check-row__label {
  color: #334155;
  font-weight: 700;
}

.pilot-status-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 900;
}

.pilot-status-badge--ready {
  background: #dcfce7;
  color: #166534;
}

.pilot-status-badge--not_ready {
  background: #fee2e2;
  color: #991b1b;
}

.pilot-status-badge--review {
  background: #e0f2fe;
  color: #075985;
}

.student-import-page .director-page-header,
.student-import-page .admin-page-header {
  align-items: flex-start;
}

.import-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 16px;
}

.import-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  padding: 20px;
}

.import-card h2 {
  margin: 0 0 8px;
  color: #12313f;
  font-size: 1.18rem;
  font-weight: 900;
}

.import-card--hint code {
  display: block;
  white-space: normal;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #12313f;
  padding: 12px;
}

.import-columns-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin: 12px 0 0;
  padding-left: 18px;
  color: #334155;
  font-weight: 700;
}

.import-options {
  display: grid;
  gap: 8px;
}

.import-options .form-check {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: #334155;
  font-weight: 700;
}

.import-preview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.import-table th {
  color: #64748b;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.import-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.76rem;
  font-weight: 900;
}

.import-status--ready {
  background: #dcfce7;
  color: #166534;
}

.import-status--error {
  background: #fee2e2;
  color: #991b1b;
}

.import-status--info {
  background: #e0f2fe;
  color: #075985;
}

.import-error,
.import-warning {
  margin-bottom: 4px;
  font-size: 0.86rem;
  font-weight: 700;
}

.import-error {
  color: #991b1b;
}

.import-warning {
  color: #92400e;
}

.import-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.import-summary-grid div {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.import-summary-grid span {
  display: block;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 800;
}

.import-summary-grid strong {
  display: block;
  color: #12313f;
  font-size: 1.5rem;
  font-weight: 950;
}

.data-export-page {
  padding-bottom: 32px;
}

.export-warning {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border: 1px solid #fde68a;
  border-radius: 8px;
  background: #fffbeb;
  color: #78350f;
  padding: 16px 18px;
  margin-bottom: 18px;
}

.export-warning i {
  color: #d97706;
  font-size: 1.25rem;
  margin-top: 2px;
}

.export-warning strong,
.export-warning span {
  display: block;
}

.export-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.export-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  padding: 20px;
}

.export-card__icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(31, 174, 205, 0.12);
  color: #1489a3;
}

.export-card h2,
.export-note h2 {
  margin: 0 0 8px;
  color: #12313f;
  font-size: 1.12rem;
  font-weight: 900;
}

.export-card p,
.export-note p {
  color: #64748b;
  margin: 0;
}

.export-card .btn {
  margin-top: auto;
}

.export-note {
  margin-top: 18px;
  border: 1px solid #dbeaf0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 18px;
}

@media (max-width: 767.98px) {
  .student-hero,
  .student-page-header,
  .teacher-hero,
  .teacher-page-header,
  .parent-hero,
  .parent-page-header,
  .director-hero,
  .director-page-header,
  .admin-hero,
  .admin-page-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 1.4rem;
  }

  .student-status-pill {
    width: 100%;
  }

  .parent-bar-row,
  .parent-progress-row,
  .director-bar-row,
  .analytics-mini-chart,
  .analytics-mini-row,
  .analytics-filter-grid {
    grid-template-columns: 1fr;
  }

  .analytics-filter-actions {
    flex-wrap: wrap;
  }

  .analytics-filter-btn {
    flex: 1 1 120px;
  }

  .search-results__header,
  .search-results__form {
    flex-direction: column;
    width: 100%;
  }

  .algash-toast-stack {
    top: 0.75rem;
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
  }

  .schedule-day-grid {
    grid-template-columns: 1fr;
  }

  .schedule-lesson-row__main {
    flex-direction: column;
    gap: 2px;
  }

  .weekly-diary-grid {
    grid-template-columns: 1fr;
  }

  .weekly-diary-row {
    grid-template-columns: 36px 100px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .weekly-diary-number,
  .weekly-diary-time,
  .weekly-diary-content {
    padding: 0;
  }

  .legal-page {
    width: min(100% - 20px, 1040px);
    padding: 24px 0;
  }

  .legal-hero,
  .legal-card {
    padding: 20px;
  }

  .legal-actions .btn {
    width: 100%;
  }

  .help-layout,
  .help-steps--wide {
    grid-template-columns: 1fr;
  }

  .help-hero,
  .help-panel {
    padding: 20px;
  }

  .help-actions .btn {
    width: 100%;
  }

  .pilot-section-grid {
    grid-template-columns: 1fr;
  }

  .pilot-progress-card {
    width: 100%;
    text-align: left;
  }

  .pilot-section-card__header,
  .pilot-check-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .import-layout {
    grid-template-columns: 1fr;
  }

  .import-preview-header {
    flex-direction: column;
  }

  .import-columns-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .landing-hero {
    padding: 4rem 0 3rem;
  }

  .landing-section {
    padding: 3rem 0;
  }
}

.system-status-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.organization-settings-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.organization-settings-hero {
  align-items: center;
}

.organization-settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.7fr);
  gap: 18px;
  align-items: start;
}

.organization-form-card,
.organization-preview-card {
  background: #ffffff;
  border: 1px solid #dbeaf0;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 41, 60, 0.06);
  padding: 20px;
}

.organization-form-card h2,
.organization-preview-card h2 {
  margin: 0 0 16px;
  color: #12313f;
  font-size: 20px;
  font-weight: 800;
}

.organization-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.organization-form-field {
  display: grid;
  gap: 6px;
}

.organization-form-field--wide {
  grid-column: 1 / -1;
}

.organization-form-field label {
  color: #12313f;
  font-weight: 700;
}

.organization-form-field small {
  color: #657786;
}

.organization-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.organization-preview-card--compact {
  min-width: 230px;
}

.organization-preview-card span {
  color: #657786;
}

.organization-preview-card strong {
  display: block;
  color: #12313f;
  font-size: 22px;
  line-height: 1.2;
}

.organization-preview-card small {
  color: #657786;
}

.organization-logo-preview {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border: 1px solid #dbeaf0;
  border-radius: 12px;
  padding: 8px;
  margin-bottom: 12px;
  background: #f7fbfd;
}

.organization-preview-list {
  display: grid;
  gap: 10px;
}

.organization-preview-list div {
  display: grid;
  gap: 2px;
  padding: 10px 0;
  border-bottom: 1px solid #edf3f6;
}

.organization-preview-list div:last-child {
  border-bottom: none;
}

.organization-preview-list strong {
  font-size: 15px;
  overflow-wrap: anywhere;
}

.access-cards-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.access-cards-hero {
  align-items: center;
}

.access-cards-summary,
.access-filter-card,
.access-table-card,
.access-print-card {
  background: #ffffff;
  border: 1px solid #dbeaf0;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 41, 60, 0.06);
  padding: 18px;
}

.access-cards-summary {
  min-width: 230px;
}

.access-cards-summary span,
.access-cards-summary small,
.access-muted,
.access-password-note {
  color: #657786;
}

.access-cards-summary strong {
  display: block;
  color: #12313f;
  font-size: 34px;
  line-height: 1;
}

.access-filter-card {
  display: grid;
  grid-template-columns: 160px 220px 140px minmax(180px, 1fr);
  gap: 14px;
  align-items: end;
}

.access-filter-card label {
  display: block;
  color: #12313f;
  font-weight: 700;
  margin-bottom: 6px;
}

.access-filter-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.access-table {
  min-width: 1180px;
  margin-bottom: 0;
}

.access-table th {
  color: #12313f;
  white-space: nowrap;
}

.access-table td {
  vertical-align: top;
}

.access-muted {
  font-size: 13px;
  margin-top: 4px;
}

.access-actions {
  display: grid;
  gap: 8px;
  min-width: 160px;
}

.access-password-note {
  font-size: 13px;
}

.access-print-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.access-print-card span {
  color: #20accb;
  font-weight: 800;
}

.access-print-card h2 {
  color: #12313f;
  font-size: 20px;
  margin: 8px 0;
}

.access-print-card p,
.access-print-card div,
.access-print-card small {
  color: #12313f;
  margin: 6px 0;
}

@media print {
  #side-nav,
  #top-navbar,
  .access-cards-hero,
  .export-warning,
  .access-filter-card,
  .access-table-card,
  footer {
    display: none !important;
  }

  #main {
    padding: 0 !important;
  }

  .access-print-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10mm;
  }

  .access-print-card {
    box-shadow: none;
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

.system-status-hero {
  align-items: center;
}

.system-status-health,
.system-status-card {
  background: #ffffff;
  border: 1px solid #dbeaf0;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 41, 60, 0.06);
  padding: 18px;
}

.system-status-health {
  min-width: 230px;
}

.system-status-health span,
.system-status-table span,
.system-status-counts span,
.system-readiness-row small {
  color: #657786;
}

.system-status-health strong {
  display: block;
  margin-top: 6px;
  color: #12313f;
  font-size: 28px;
  line-height: 1;
  text-transform: uppercase;
}

.system-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.system-status-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.system-status-card__header i {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: #20accb;
}

.system-status-card__header h2 {
  margin: 0;
  color: #12313f;
  font-size: 18px;
  font-weight: 800;
}

.system-status-table,
.system-status-warnings {
  display: grid;
  gap: 10px;
}

.system-status-table > div,
.system-readiness-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.9fr) minmax(0, 1.3fr);
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #edf3f6;
}

.system-status-table > div:last-child,
.system-readiness-row:last-child {
  border-bottom: none;
}

.system-status-table strong {
  color: #12313f;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.system-status-main {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.system-status-main p,
.system-status-main small {
  margin: 0;
  color: #657786;
}

.system-status-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.system-status-counts div {
  background: #f7fbfd;
  border: 1px solid #e5f0f5;
  border-radius: 12px;
  padding: 12px;
}

.system-status-counts strong {
  display: block;
  margin-top: 4px;
  color: #12313f;
  font-size: 22px;
}

.system-status-warning,
.system-status-note {
  background: rgba(255, 168, 0, 0.12);
  border: 1px solid rgba(255, 168, 0, 0.28);
  border-radius: 12px;
  color: #6c4a00;
  padding: 12px 14px;
  margin: 8px 0 0;
}

.system-status-ok {
  background: rgba(32, 172, 203, 0.12);
  border: 1px solid rgba(32, 172, 203, 0.22);
  border-radius: 12px;
  color: #12313f;
  padding: 12px 14px;
  margin: 0;
}

.system-readiness-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
}

.system-readiness-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.system-readiness-row span:first-child {
  color: #12313f;
  font-weight: 700;
}

.system-readiness-row small {
  grid-column: 1 / -1;
}

@media (max-width: 900px) {
  .organization-settings-layout,
  .organization-form-grid,
  .access-filter-card,
  .access-print-grid,
  .system-status-grid,
  .system-readiness-grid {
    grid-template-columns: 1fr;
  }

  .system-status-table > div,
  .system-readiness-row {
    grid-template-columns: 1fr;
  }

  .system-status-counts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Final shared UI polish */
:root {
  --algash-surface: #ffffff;
  --algash-surface-soft: #f7fbfd;
  --algash-border: #dbeaf0;
  --algash-text: #12313f;
  --algash-muted: #657786;
  --algash-radius: 16px;
  --algash-radius-sm: 10px;
  --algash-shadow: 0 8px 24px rgba(15, 41, 60, 0.06);
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
  background: #f6fafc;
  color: var(--algash-text);
}

#main,
#main-content {
  min-width: 0;
}

#main-content {
  padding: 1.5rem clamp(1rem, 2.2vw, 2rem) 2.5rem;
}

.card,
.student-panel,
.parent-panel,
.teacher-panel,
.admin-panel,
.director-panel,
.my-profile-panel,
.period-card,
.period-section,
.support-ticket-card,
.announcement-card,
.notification-card,
.search-result-card {
  border: 1px solid var(--algash-border);
  border-radius: var(--algash-radius);
  background: var(--algash-surface);
  box-shadow: var(--algash-shadow);
}

.card-header {
  border-bottom-color: #e7f0f4;
  padding: 0.9rem 1.1rem;
  background: var(--algash-surface-soft);
}

.student-panel,
.parent-panel,
.teacher-panel,
.admin-panel,
.director-panel,
.my-profile-panel,
.period-section {
  padding: clamp(1rem, 1.8vw, 1.35rem);
}

.student-panel__header,
.parent-panel__header,
.teacher-panel__header,
.admin-panel__header,
.director-panel__header {
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.student-panel__header h2,
.parent-panel__header h2,
.teacher-panel__header h2,
.admin-panel__header h2,
.director-panel__header h2,
.card-header h2,
.card-header h3 {
  margin-bottom: 0;
  color: var(--algash-text);
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.student-hero,
.parent-hero,
.teacher-hero,
.admin-hero,
.director-hero,
.support-hero,
.help-hero,
.legal-hero,
.role-dashboard__hero,
.director-page-header,
.student-page-header,
.parent-page-header,
.teacher-page-header,
.admin-page-header {
  gap: 1rem;
  border-radius: calc(var(--algash-radius) + 2px);
  padding: clamp(1.15rem, 2.4vw, 2rem);
  overflow: hidden;
}

.student-hero h1,
.parent-hero h1,
.teacher-hero h1,
.admin-hero h1,
.director-hero h1,
.support-hero h1,
.help-hero h1,
.legal-hero h1,
.role-dashboard__hero h1,
.director-page-header h1,
.student-page-header h1,
.parent-page-header h1,
.teacher-page-header h1,
.admin-page-header h1 {
  max-width: 100%;
  margin-bottom: 0.4rem;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 38px;
  border-radius: 9px;
  padding: 0.48rem 0.85rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: normal;
}

.btn-sm {
  min-height: 32px;
  padding: 0.34rem 0.62rem;
  font-size: 0.8rem;
}

.btn-lg {
  min-height: 46px;
  padding: 0.7rem 1.15rem;
}

.btn .fa-file-excel {
  color: #16865b;
}

.btn-primary .fa-file-excel,
.btn-success .fa-file-excel {
  color: currentColor;
}

a.btn[href*="/export/"]:not(.btn-primary):not(.btn-danger),
a.btn[href*="download"]:not(.btn-primary):not(.btn-danger),
.btn-export:not(.btn-primary):not(.btn-danger) {
  border-color: rgba(22, 134, 91, 0.28);
  background: #f0fbf6;
  color: #146c4b;
}

a.btn[href*="/export/"]:not(.btn-primary):not(.btn-danger):hover,
a.btn[href*="download"]:not(.btn-primary):not(.btn-danger):hover,
.btn-export:not(.btn-primary):not(.btn-danger):hover {
  border-color: #16865b;
  background: #e2f7ec;
  color: #10593e;
}

.student-badge,
.support-badge,
.data-quality-badge,
.duplicate-badge,
.pilot-status-badge,
.period-status,
.notification-status,
.status-pill,
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0.3rem 0.62rem;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
}

.table-responsive,
.card.overflow-auto {
  max-width: 100%;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
  scrollbar-color: rgba(29, 171, 207, 0.5) rgba(29, 171, 207, 0.08);
}

.table {
  width: 100%;
  margin-bottom: 0;
  color: var(--algash-text);
}

.table > thead > tr > th {
  border-bottom: 1px solid #dcebf0;
  padding: 0.78rem 0.75rem;
  background: #eef8fb;
  color: #31535d;
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1.25;
  text-transform: none;
  vertical-align: middle;
  white-space: nowrap;
}

.table > tbody > tr > td {
  border-color: #e7eff3;
  padding: 0.75rem;
  line-height: 1.4;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.table > tbody > tr:last-child > td {
  border-bottom: 0;
}

.table td .btn,
.table td form .btn {
  max-width: 100%;
}

.form-label,
form label:not(.form-check-label) {
  margin-bottom: 0.38rem;
  color: #31535d;
  font-size: 0.86rem;
  font-weight: 750;
}

.form-control,
.form-select {
  min-height: 42px;
  border-color: #cfdee5;
  border-radius: var(--algash-radius-sm);
  color: var(--algash-text);
  box-shadow: none;
}

textarea.form-control {
  min-height: 118px;
  resize: vertical;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--algash-primary);
  box-shadow: 0 0 0 0.18rem rgba(29, 171, 207, 0.13);
}

.form-text,
form small {
  overflow-wrap: anywhere;
}

.errorlist {
  margin: 0.4rem 0 0;
  padding: 0;
  color: #b42332;
  font-size: 0.82rem;
  list-style: none;
}

.search-empty-state,
.notification-empty,
.notification-center-empty,
.weekly-diary-empty,
.grade-journal-empty,
.finance-empty-state,
.support-empty,
.period-empty,
.schedule-day-empty {
  border: 1px dashed rgba(29, 171, 207, 0.32);
  border-radius: var(--algash-radius);
  padding: clamp(1.2rem, 3vw, 2rem);
  background: #f8fcfd;
  color: var(--algash-muted);
  text-align: center;
}

.search-empty-state h2,
.notification-center-empty h2,
.support-empty h2,
.period-empty h2 {
  margin-bottom: 0.35rem;
  color: var(--algash-text);
  font-size: 1.1rem;
}

#side-nav {
  max-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(29, 171, 207, 0.45) transparent;
}

#side-nav ul li a {
  min-height: 42px;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}

#top-navbar {
  position: fixed;
  z-index: 90;
  border-bottom: 1px solid rgba(29, 171, 207, 0.12);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 5px 18px rgba(15, 41, 60, 0.04);
}

#top-navbar .container {
  width: 100%;
  max-width: none;
  padding: 0.5rem clamp(0.75rem, 2vw, 1.5rem);
}

#top-navbar .nav-wrapper {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex-wrap: nowrap;
}

#top-navbar .form-header {
  display: flex;
  flex: 1 1 28rem;
  width: min(100%, 38rem);
  max-width: 38rem;
  min-width: 12rem;
  margin: 0;
}

#top-navbar .form-header .form-control {
  min-width: 0;
}

.topbar-menu-toggle {
  border: 0;
  background: transparent;
}

.topbar-menu-toggle {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  color: #31535d;
}

.topbar-menu-toggle:hover,
.topbar-menu-toggle:focus {
  background: rgba(29, 171, 207, 0.1);
  color: var(--algash-primary);
}

.topbar-profile {
  position: relative;
  display: block;
  flex: 0 0 auto;
  min-width: 40px;
  min-height: 40px;
  margin-left: 0;
}

.topbar-avatar {
  display: block;
  width: 40px;
  height: 40px;
  padding: 0;
  overflow: hidden;
  border-color: rgba(29, 171, 207, 0.32) !important;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(15, 41, 60, 0.12);
}

.topbar-avatar img,
.topbar-profile-menu .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topbar-profile-menu {
  z-index: 1100;
  min-width: 14rem;
  border: 1px solid var(--algash-border);
  border-radius: 12px;
  padding: 0.7rem;
  box-shadow: 0 14px 34px rgba(15, 41, 60, 0.14);
}

.topbar-profile-name {
  max-width: 12rem;
  margin-top: 0.55rem;
  color: var(--algash-text);
  text-align: center;
  overflow-wrap: anywhere;
}

.topbar-profile-role {
  margin: 0.15rem 0 0.35rem;
  color: var(--algash-primary);
  font-size: 0.76rem;
  font-weight: 800;
}

.topbar-profile-menu .dropdown-item {
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  white-space: normal;
}

.topbar-logout {
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 900px) {
  #main-content {
    padding: 1rem 0.85rem 2rem;
  }

  #top-navbar .nav-wrapper {
    gap: 0.45rem;
  }

  #top-navbar .form-header {
    flex: 1 1 auto;
    width: auto;
    max-width: none;
    min-width: 8rem;
  }

  #top-navbar .language-switcher--top {
    margin-left: auto;
    margin-right: 0.25rem;
  }

  #top-navbar .topbar-profile {
    margin-left: 0;
  }

  .table-responsive > .table,
  .card.overflow-auto > .table {
    min-width: 680px;
  }
}

@media (max-width: 575.98px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  #main,
  #main-content {
    min-width: 0;
    max-width: 100%;
  }

  #top-navbar .container {
    padding-inline: 0.45rem;
  }

  #top-navbar .nav-wrapper {
    gap: 0.32rem;
  }

  #top-navbar .form-header {
    min-width: 0;
  }

  #top-navbar .form-header .form-control {
    padding-inline: 0.55rem;
  }

  #top-navbar .form-header .btn {
    flex: 0 0 34px;
    width: 34px;
    min-height: 36px;
    padding-inline: 0;
  }

  .topbar-menu-toggle,
  .topbar-avatar {
    width: 36px;
    height: 36px;
  }

  .student-hero,
  .parent-hero,
  .teacher-hero,
  .admin-hero,
  .director-hero,
  .support-hero,
  .help-hero,
  .legal-hero,
  .role-dashboard__hero {
    align-items: stretch;
    flex-direction: column;
  }

  .student-hero .btn,
  .parent-hero .btn,
  .teacher-hero .btn,
  .admin-hero .btn,
  .director-hero .btn,
  .support-hero .btn {
    width: 100%;
  }

  #top-navbar .language-switcher__item {
    min-height: 26px;
    padding: 0.23rem 0.38rem;
    font-size: 0.68rem;
  }

  .language-switcher--top {
    gap: 0.12rem;
    padding: 0.16rem;
    margin-right: 0.1rem;
  }

  .card-body,
  .student-panel,
  .parent-panel,
  .teacher-panel,
  .admin-panel,
  .director-panel,
  .my-profile-panel,
  .period-section {
    padding: 0.95rem;
  }

  .d-flex.gap-2,
  .d-flex.gap-3 {
    flex-wrap: wrap;
  }

  .table-responsive,
  .card.overflow-auto,
  .group-gradebook__scroll {
    max-width: 100%;
    overflow-x: auto !important;
  }

  .analytics-filter-actions,
  .support-actions,
  .support-filter-actions,
  .organization-actions,
  .access-filter-actions,
  .period-card__actions,
  .period-detail-actions,
  .period-detail-links {
    flex-wrap: wrap;
    align-items: stretch;
  }

  .analytics-filter-actions > *,
  .support-actions > *,
  .support-filter-actions > *,
  .organization-actions > *,
  .access-filter-actions > *,
  .period-card__actions > *,
  .period-detail-actions > *,
  .period-detail-links > * {
    max-width: 100%;
  }

  .bulk-action-panel {
    display: grid;
    gap: 0.65rem;
  }

  .bulk-action-panel .form-select,
  .form-control,
  .form-select,
  textarea {
    width: 100%;
    max-width: 100%;
  }
}

.support-page {
  padding: 28px 0 48px;
}

.support-hero,
.support-form-card,
.support-table-card,
.support-empty,
.support-ticket-card,
.support-kpi,
.support-filter-card {
  background: #fff;
  border: 1px solid #e5eef4;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(18, 49, 63, 0.08);
}

.support-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 26px;
  margin-bottom: 18px;
}

.support-eyebrow,
.support-muted {
  color: #6c7f89;
  font-size: 13px;
  font-weight: 700;
}

.support-hero h1,
.support-ticket-card h2,
.support-form-card h2,
.support-empty h2 {
  color: #12313f;
  margin: 4px 0 8px;
}

.support-hero p,
.support-ticket-card p,
.support-empty p {
  color: #5c6f7b;
  margin: 0;
}

.support-ticket-grid,
.support-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.support-ticket-card,
.support-form-card,
.support-table-card,
.support-empty,
.support-kpi,
.support-filter-card {
  padding: 18px;
}

.support-ticket-card__head,
.support-actions {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.support-ticket-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: #6c7f89;
  font-size: 13px;
  margin: 14px 0;
}

.support-admin-note {
  background: #f7fbfd;
  border: 1px solid #e5eef4;
  border-radius: 10px;
  padding: 12px;
  margin: 14px 0;
  color: #12313f;
}

.support-admin-note strong,
.support-admin-note span {
  display: block;
}

.support-admin-note--muted {
  color: #6c7f89;
}

.support-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.support-badge--warning {
  background: rgba(255, 168, 0, 0.16);
  color: #7a5300;
}

.support-badge--primary {
  background: rgba(32, 172, 203, 0.14);
  color: #0f6275;
}

.support-badge--success {
  background: rgba(33, 160, 112, 0.14);
  color: #156c4c;
}

.support-badge--danger {
  background: rgba(220, 68, 68, 0.14);
  color: #9d2424;
}

.support-badge--secondary {
  background: #edf3f6;
  color: #506571;
}

.support-empty {
  text-align: center;
  padding: 36px 20px;
}

.support-empty i {
  color: #20accb;
  font-size: 34px;
  margin-bottom: 10px;
}

.support-empty--compact {
  box-shadow: none;
  border: 0;
}

.support-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 16px;
}

.support-message {
  color: #12313f;
  line-height: 1.65;
}

.support-definition-list {
  display: grid;
  grid-template-columns: minmax(120px, auto) minmax(0, 1fr);
  gap: 8px 14px;
}

.support-definition-list dt {
  color: #6c7f89;
  font-weight: 700;
}

.support-definition-list dd {
  margin: 0;
  color: #12313f;
}

.support-kpi strong {
  display: block;
  color: #12313f;
  font-size: 28px;
}

.support-kpi span {
  color: #6c7f89;
  font-weight: 700;
}

.support-filter-card {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin: 16px 0;
}

.support-filter-actions {
  display: flex;
  gap: 8px;
}

.support-table th {
  color: #506571;
  font-size: 13px;
  white-space: nowrap;
}

.announcement-page {
  padding: 28px 0 48px;
}

.announcement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.announcement-card {
  background: #fff;
  border: 1px solid #e5eef4;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(18, 49, 63, 0.08);
  padding: 18px;
}

.announcement-card h2 {
  color: #12313f;
  margin: 4px 0 8px;
}

.announcement-card p {
  color: #5c6f7b;
  margin: 0 0 14px;
}

.announcement-filter-card {
  grid-template-columns: repeat(2, minmax(160px, 1fr)) auto;
}

.announcement-detail-card {
  max-width: 900px;
}

.announcement-form-card {
  max-width: 860px;
}

.reports-page {
  padding: 28px 0 48px;
}

.reports-filter-card {
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
}

.reports-filter-card--teacher {
  grid-template-columns: repeat(3, minmax(160px, 1fr)) auto;
}

.reports-kpi-grid {
  margin-bottom: 16px;
}

.reports-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.reports-card-grid a {
  text-decoration: none;
  color: inherit;
}

.announcement-card--accent {
  border-color: rgba(32, 172, 203, 0.35);
  background: #f7fbfd;
}

.reports-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.reports-mini-grid span {
  background: #f7fbfd;
  border: 1px solid #e5eef4;
  border-radius: 10px;
  color: #6c7f89;
  padding: 10px;
}

.reports-mini-grid strong {
  display: block;
  color: #12313f;
}

.bulk-action-panel {
  background: #f8fbfd;
  border: 1px solid #e5eef4;
  border-radius: 8px;
  padding: 12px;
}

.bulk-action-panel .form-select {
  min-width: 210px;
}

@media (max-width: 900px) {
  .support-hero,
  .support-ticket-card__head,
  .support-actions,
  .support-filter-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .support-detail-grid,
  .support-filter-card,
  .announcement-filter-card,
  .reports-filter-card,
  .reports-filter-card--teacher {
    grid-template-columns: 1fr;
  }
}
