.dsm-wrap {
  --dsm-surface: #ffffff;
  --dsm-surface-soft: #f0f6ff;
  --dsm-border: #d3e2f1;
  --dsm-border-strong: #bfd4ea;
  --dsm-text: #122338;
  --dsm-muted: #4f6882;
  --dsm-primary: #0d67ad;
  --dsm-primary-dark: #0b4f86;
  --dsm-shadow: 0 14px 36px rgba(15, 46, 83, 0.12);
  --dsm-card-3d-shadow: 0 12px 24px rgba(25, 46, 73, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  --dsm-card-3d-shadow-hover: 0 18px 32px rgba(25, 46, 73, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.82);
  --dsm-card-3d-gloss: linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0));
  --dsm-card-3d-accent: linear-gradient(90deg, rgba(44, 111, 186, 0.9), rgba(121, 77, 183, 0.9));
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Tahoma, sans-serif;
  color: var(--dsm-text);
}

/* Force full-bleed dashboard on frontend pages even inside narrow theme containers */
body:not(.wp-admin) .dsm-wrap {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: 12px;
  padding-right: 12px;
}

.dsm-wrap,
.dsm-wrap * {
  box-sizing: border-box;
}

.dsm-wrap[data-dsm-shell] {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 14px;
  width: 100%;
  min-height: 420px;
  min-height: max(420px, calc(100dvh - 120px));
  height: auto;
  max-height: none;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid #d7e5f4;
  background: linear-gradient(150deg, #f3f8ff 0%, #e8f1ff 52%, #f7faff 100%);
  box-shadow: 0 18px 40px rgba(15, 46, 83, 0.08);
  overflow: visible;
}

.dsm-side-menu {
  background: var(--dsm-surface);
  border: 1px solid var(--dsm-border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  box-shadow: var(--dsm-shadow);
}

.dsm-side-trigger,
.dsm-side-backdrop {
  display: none;
}

.dsm-side-user-card {
  border: 1px solid #dbe6f2;
  border-radius: 10px;
  background: #ffffff;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dsm-side-user-avatar-wrap {
  display: flex;
  justify-content: center;
}

.dsm-side-user-avatar {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  border: 1px solid #d0ddeb;
  object-fit: cover;
  display: block;
  background: #ffffff;
}

.dsm-side-user-avatar-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
  color: #365576;
  background: #edf4fd;
}

.dsm-side-user-name {
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--dsm-text);
  line-height: 1.2;
}

.dsm-side-user-role {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #6a8097;
}

.dsm-side-user-upload-form {
  display: grid;
  gap: 8px;
}

.dsm-side-user-upload-form input[type="file"] {
  width: 100%;
  border: 1px solid #cfdaea;
  border-radius: 8px;
  padding: 5px 6px;
  background: #f8fbff;
  font-size: 11px;
  min-height: 32px;
  color: #365170;
}

.dsm-side-user-upload-form input[type="file"]::file-selector-button {
  border: 1px solid #bed0e4;
  border-radius: 6px;
  background: #ffffff;
  color: #2d4a69;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 8px;
  margin-right: 8px;
  cursor: pointer;
}

.dsm-side-btn {
  border: 0;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--dsm-primary), var(--dsm-primary-dark));
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  padding: 8px 9px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(13, 103, 173, 0.22);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.dsm-side-btn:hover,
.dsm-side-btn:focus {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(13, 103, 173, 0.26);
}

.dsm-side-btn.dsm-side-btn-light {
  border: 1px solid #ccd9e8;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
  color: #1b456d;
  box-shadow: none;
}

.dsm-side-btn.dsm-side-btn-logout {
  border: 1px solid #e9c3c3;
  background: linear-gradient(180deg, #fff9f9 0%, #fff0f0 100%);
  color: #8b2828;
  box-shadow: none;
}

.dsm-side-btn.dsm-side-btn-danger {
  border: 1px solid #d45b5b;
  background: linear-gradient(135deg, #d93f3f, #aa2525);
  color: #ffffff;
  box-shadow: 0 8px 16px rgba(177, 37, 37, 0.28);
}

.dsm-side-btn.dsm-side-btn-light:hover,
.dsm-side-btn.dsm-side-btn-light:focus {
  border-color: #a9c3df;
  background: linear-gradient(180deg, #ffffff 0%, #edf4ff 100%);
  color: #123d65;
  box-shadow: 0 8px 16px rgba(28, 79, 132, 0.14);
}

.dsm-side-btn.dsm-side-btn-logout:hover,
.dsm-side-btn.dsm-side-btn-logout:focus {
  border-color: #dbabab;
  background: linear-gradient(180deg, #fff8f8 0%, #ffecec 100%);
  color: #7a1f1f;
  box-shadow: 0 8px 16px rgba(150, 54, 54, 0.15);
}

.dsm-side-btn:disabled,
.dsm-side-btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.dsm-side-user-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.dsm-role-switcher {
  border: 1px solid #d8e4f1;
  border-radius: 10px;
  background: #f7fbff;
  padding: 8px;
}

.dsm-role-switcher summary {
  list-style: none;
}

.dsm-role-switcher summary::-webkit-details-marker {
  display: none;
}

.dsm-side-btn.dsm-side-btn-switch {
  width: 100%;
  margin: 0;
  border: 1px solid #0d8f73;
  background: linear-gradient(135deg, #11a27e 0%, #0f7f64 56%, #0b604c 100%);
  box-shadow: 0 10px 22px rgba(13, 115, 90, 0.3);
}

.dsm-side-btn.dsm-side-btn-switch:hover,
.dsm-side-btn.dsm-side-btn-switch:focus {
  border-color: #0b7d63;
  background: linear-gradient(135deg, #14ad86 0%, #11896e 56%, #0d6a54 100%);
  box-shadow: 0 12px 24px rgba(11, 97, 76, 0.34);
}

.dsm-role-switcher-list {
  margin-top: 8px;
  display: grid;
  gap: 7px;
}

.dsm-role-switch-link {
  border: 1px solid #cfe0f1;
  border-radius: 9px;
  background: #ffffff;
  padding: 8px 9px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dsm-role-switch-link strong {
  color: #183b5f;
  font-size: 13px;
  line-height: 1.2;
}

.dsm-role-switch-link small {
  color: #607891;
  font-size: 11px;
  line-height: 1.25;
}

.dsm-role-switch-link:hover {
  border-color: #a9c6e3;
  background: #f2f8ff;
}

.dsm-role-switch-admin strong {
  color: #493d8a;
}

.dsm-role-switch-teacher strong {
  color: #1d6a4a;
}

.dsm-role-switch-student strong {
  color: #235d8c;
}

.dsm-role-switch-parent strong {
  color: #8a4a2f;
}

.dsm-side-brand {
  padding: 4px 2px 8px;
  border-bottom: 1px solid #e6eef8;
}

.dsm-side-brand-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--dsm-text);
}

.dsm-side-brand-subtitle {
  margin: 5px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--dsm-muted);
}

.dsm-side-nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow: auto;
  min-height: 0;
  padding-right: 2px;
}

.dsm-side-group {
  margin: 0;
  border: 1px solid #d5e2ef;
  border-radius: 10px;
  background: #f7faff;
  overflow: hidden;
}

.dsm-side-group.is-active,
.dsm-side-group[open] {
  border-color: #bfd3e8;
  background: #f2f8ff;
}

.dsm-side-parent {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 36px;
  padding: 8px 11px;
  cursor: pointer;
  color: #2f4d6f;
  font-size: 14px;
  font-weight: 700;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.dsm-side-parent::-webkit-details-marker {
  display: none;
}

.dsm-side-parent:hover {
  background: #eaf3fc;
  color: #173657;
}

.dsm-side-parent-text {
  min-width: 0;
}

.dsm-side-parent-caret {
  width: 8px;
  height: 8px;
  border-right: 2px solid #4f6f90;
  border-bottom: 2px solid #4f6f90;
  transform: rotate(45deg);
  margin-top: -3px;
  transition: transform 0.16s ease;
  flex: 0 0 auto;
}

.dsm-side-group[open] .dsm-side-parent-caret {
  transform: rotate(225deg);
  margin-top: 2px;
}

.dsm-side-submenu {
  display: grid;
  gap: 6px;
  padding: 0 8px 8px;
}

.dsm-side-submenu-single {
  padding-top: 8px;
}

.dsm-side-group-single {
  padding: 8px;
}

.dsm-side-group-single .dsm-side-submenu-single {
  padding: 0;
}

.dsm-side-group-single .dsm-side-single-link {
  min-height: 38px;
  padding: 9px 11px;
}

.dsm-side-single-link {
  min-height: 36px;
  font-size: 14px;
}

.dsm-side-link {
  display: flex;
  align-items: center;
  min-height: 34px;
  border-radius: 8px;
  border: 1px solid #cedeed;
  background: #ffffff;
  color: #2f4d6f;
  padding: 7px 10px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.18s ease;
}

.dsm-side-link:hover {
  border-color: #bccfe3;
  background: #edf5fe;
  color: #173657;
}

.dsm-side-link.is-active {
  border-color: #0d67ad;
  background: linear-gradient(135deg, var(--dsm-primary), var(--dsm-primary-dark));
  color: #ffffff;
  box-shadow: 0 8px 16px rgba(13, 103, 173, 0.24);
}

.dsm-main {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dsm-main-header {
  background: var(--dsm-surface);
  border: 1px solid var(--dsm-border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  box-shadow: var(--dsm-shadow);
}

.dsm-main-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dsm-main-header h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: -0.5px;
  color: var(--dsm-text);
}

.dsm-main-subtitle {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--dsm-muted);
}

.dsm-main-date {
  font-size: 12px;
  font-weight: 700;
  color: #37587a;
  white-space: nowrap;
}

.dsm-notify-ui {
  position: relative;
}

.dsm-notify-ui.dsm-notify-mobile-stick {
  position: fixed;
  z-index: 100003;
}

.dsm-notify-trigger {
  border: 1px solid #c6d9ec;
  border-radius: 999px;
  background: linear-gradient(135deg, #0f67ae, #0b4f86);
  color: #ffffff;
  height: 34px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(14, 86, 146, 0.26);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.dsm-notify-trigger:hover,
.dsm-notify-trigger:focus {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 12px 24px rgba(14, 86, 146, 0.32);
}

.dsm-notify-trigger-icon {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #bfffe8;
  box-shadow: 0 0 0 4px rgba(191, 255, 232, 0.22);
}

.dsm-notify-trigger-count {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.16);
  font-size: 11px;
  font-weight: 800;
}

.dsm-notify-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 25, 45, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  z-index: 100000;
}

.dsm-notify-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(390px, 96vw);
  height: 100dvh;
  display: flex;
  flex-direction: column;
  border-left: 1px solid #cfdeed;
  background: linear-gradient(180deg, #ffffff 0%, #f5faff 100%);
  box-shadow: -22px 0 44px rgba(12, 39, 67, 0.24);
  transform: translateX(104%);
  transition: transform 0.26s ease;
  z-index: 100001;
}

.dsm-notify-ui.is-open .dsm-notify-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.dsm-notify-ui.is-open .dsm-notify-drawer {
  transform: translateX(0);
}

.dsm-notify-head {
  padding: 14px 14px 12px;
  border-bottom: 1px solid #d8e5f3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #f3f9ff;
}

.dsm-notify-head h4 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
  color: #173657;
}

.dsm-notify-close {
  border: 1px solid #c6d8eb;
  border-radius: 8px;
  background: #ffffff;
  color: #1b4a74;
  font-size: 12px;
  font-weight: 700;
  min-height: 30px;
  padding: 0 10px;
  cursor: pointer;
}

.dsm-notify-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.dsm-notify-empty {
  margin: 0;
  border: 1px dashed #cadcf0;
  border-radius: 10px;
  padding: 14px;
  font-size: 13px;
  color: #4b6987;
  background: #f9fcff;
}

.dsm-notify-item {
  margin: 0;
  border: 1px solid #d6e4f3;
  border-radius: 11px;
  background: #ffffff;
  padding: 11px;
  box-shadow: 0 8px 18px rgba(15, 56, 97, 0.08);
}

.dsm-notify-item h5 {
  margin: 0;
  font-size: 14px;
  line-height: 1.3;
  color: #173658;
}

.dsm-notify-meta {
  margin: 6px 0 0;
  font-size: 11px;
  font-weight: 700;
  color: #4a6988;
}

.dsm-notify-message {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: #2f4e6f;
}

.dsm-notify-time {
  margin: 8px 0 0;
  font-size: 11px;
  font-weight: 700;
  color: #6a829b;
}

.dsm-notify-actions {
  margin: 8px 0 0;
}

.dsm-notify-read-btn {
  border: 1px solid #c4d8ec;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #edf5ff 100%);
  color: #18466e;
  font-size: 12px;
  font-weight: 700;
  min-height: 30px;
  padding: 0 10px;
  cursor: pointer;
}

.dsm-notify-read-btn:hover,
.dsm-notify-read-btn:focus {
  border-color: #9dc0e0;
  background: linear-gradient(180deg, #ffffff 0%, #e8f2ff 100%);
  color: #123d65;
}

.dsm-main-content {
  flex: 1;
  min-height: 0;
  overflow: visible;
  padding: 2px 0 4px;
}

.dsm-section {
  display: none;
  height: auto;
  overflow: visible;
  padding: 2px 6px 6px 0;
}

.dsm-section.is-active {
  display: block;
}

.dsm-section > * + * {
  margin-top: 14px;
}

.dsm-section-head {
  margin: 0;
}

.dsm-section-title {
  margin: 0;
  font-size: 21px;
  font-weight: 780;
  line-height: 1.12;
  letter-spacing: -0.35px;
  color: var(--dsm-text);
}

.dsm-section-desc {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--dsm-muted);
}

/* Teacher dashboard: compact-modern polish */
.dsm-wrap[data-dsm-shell="teacher"] {
  padding: 18px;
  gap: 16px;
}

.dsm-wrap[data-dsm-shell="teacher"] .dsm-main-header {
  border-radius: 12px;
  padding: 12px 14px;
}

.dsm-wrap[data-dsm-shell="teacher"] .dsm-main-header h2 {
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.3px;
}

/* Student dashboard: keep hero title compact and balanced */
.dsm-wrap[data-dsm-shell="student"] .dsm-main-header h2 {
  font-size: 23px;
  line-height: 1.16;
  letter-spacing: -0.3px;
}

.dsm-wrap[data-dsm-shell="student"] .dsm-main-subtitle {
  margin-top: 4px;
  font-size: 12px;
}

/* Student dashboard: tighter hierarchy and spacing for compact readability */
.dsm-wrap[data-dsm-shell="student"] .dsm-main {
  gap: 12px;
}

.dsm-wrap[data-dsm-shell="student"] .dsm-main-header {
  padding: 12px;
}

.dsm-wrap[data-dsm-shell="student"] .dsm-section > * + * {
  margin-top: 12px;
}

.dsm-wrap[data-dsm-shell="student"] .dsm-section-title {
  font-size: 17px;
  line-height: 1.18;
  letter-spacing: -0.2px;
}

.dsm-wrap[data-dsm-shell="student"] .dsm-section-desc {
  margin-top: 4px;
  font-size: 12px;
}

.dsm-wrap[data-dsm-shell="student"] .dsm-kpi-grid {
  gap: 10px;
}

.dsm-wrap[data-dsm-shell="student"] .dsm-kpi {
  border-radius: 11px;
  padding: 11px 12px;
  min-height: 96px;
}

.dsm-wrap[data-dsm-shell="student"] .dsm-kpi h4 {
  margin-bottom: 3px;
  font-size: 10px;
  letter-spacing: 0.52px;
}

.dsm-wrap[data-dsm-shell="student"] .dsm-kpi .value {
  font-size: clamp(20px, 1.95vw, 30px);
  line-height: 1.1;
  letter-spacing: -0.16px;
  overflow-wrap: anywhere;
}

.dsm-wrap[data-dsm-shell="student"] .dsm-kpi p {
  font-size: 11.5px;
}

.dsm-wrap[data-dsm-shell="student"] .dsm-panel {
  border-radius: 11px;
  padding: 12px;
}

.dsm-wrap[data-dsm-shell="student"] .dsm-panel h3 {
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: -0.16px;
}

.dsm-wrap[data-dsm-shell="student"] .dsm-student-overview-panel p {
  margin: 0;
  line-height: 1.45;
}

.dsm-wrap[data-dsm-shell="student"] .dsm-student-overview-panel p + p {
  margin-top: 6px;
}

.dsm-wrap[data-dsm-shell="student"] .dsm-student-overview-panel strong {
  color: #1d314a;
}

.dsm-wrap[data-dsm-shell="teacher"] .dsm-main-subtitle {
  margin-top: 4px;
  font-size: 12px;
}

.dsm-wrap[data-dsm-shell="teacher"] .dsm-main-content {
  padding: 2px 4px 6px;
}

.dsm-wrap[data-dsm-shell="teacher"] .dsm-section {
  padding: 4px;
}

.dsm-wrap[data-dsm-shell="teacher"] .dsm-section-title {
  font-size: 17px;
  letter-spacing: -0.2px;
}

.dsm-wrap[data-dsm-shell="teacher"] .dsm-kpi-grid {
  gap: 12px;
}

.dsm-wrap[data-dsm-shell="teacher"] .dsm-kpi {
  position: relative;
  overflow: hidden;
  border-color: #c6d9ee;
  border-radius: 14px;
  background: linear-gradient(168deg, #ffffff 0%, #f3f8ff 100%);
  box-shadow: 0 12px 28px rgba(17, 61, 104, 0.1);
  padding: 12px 13px;
  min-height: 110px;
}

.dsm-wrap[data-dsm-shell="teacher"] .dsm-kpi::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, #0f67ae 0%, #2f80c4 100%);
}

.dsm-wrap[data-dsm-shell="teacher"] .dsm-kpi h4 {
  font-size: 10px;
  letter-spacing: 0.56px;
}

.dsm-wrap[data-dsm-shell="teacher"] .dsm-kpi .value {
  font-size: 38px;
  line-height: 1;
}

.dsm-wrap[data-dsm-shell="teacher"] .dsm-panel {
  border-color: #caddef;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fcff 100%);
  box-shadow: 0 14px 30px rgba(15, 56, 97, 0.09);
  padding: 16px;
}

.dsm-wrap[data-dsm-shell="teacher"] .dsm-panel h3 {
  font-size: 17px;
  line-height: 1.2;
  letter-spacing: -0.18px;
}

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

.dsm-kpi {
  border: 1px solid #d6e5f4;
  border-radius: 12px;
  background: linear-gradient(165deg, #fbfdff, #eef5ff);
  position: relative;
  overflow: hidden;
  padding: 13px;
  min-height: 104px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--dsm-card-3d-shadow);
  transform-origin: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.dsm-kpi::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--dsm-card-3d-gloss);
}

.dsm-kpi h4 {
  margin: 0 0 4px;
  font-size: 11px;
  color: #546f8b;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.65px;
}

.dsm-kpi .value {
  margin: 0 0 2px;
  font-size: 27px;
  font-weight: 780;
  line-height: 1.05;
  color: #0c5fa2;
}

.dsm-kpi p {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--dsm-muted);
}

.dsm-kpi-grid .dsm-kpi:nth-child(4n + 1) {
  border-color: #bfdcff;
  background: #eef7ff;
}

.dsm-kpi-grid .dsm-kpi:nth-child(4n + 1) .value {
  color: #0f5e9e;
}

.dsm-kpi-grid .dsm-kpi:nth-child(4n + 2) {
  border-color: #b9e7d4;
  background: #edfbf4;
}

.dsm-kpi-grid .dsm-kpi:nth-child(4n + 2) .value {
  color: #1c7a4d;
}

.dsm-kpi-grid .dsm-kpi:nth-child(4n + 3) {
  border-color: #f1ddb0;
  background: #fff8eb;
}

.dsm-kpi-grid .dsm-kpi:nth-child(4n + 3) .value {
  color: #a46010;
}

.dsm-kpi-grid .dsm-kpi:nth-child(4n + 4) {
  border-color: #d9cef9;
  background: #f4efff;
}

.dsm-kpi-grid .dsm-kpi:nth-child(4n + 4) .value {
  color: #5a33b0;
}

.dsm-kpi:hover,
.dsm-kpi:focus-within {
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--dsm-card-3d-shadow-hover);
}

.dsm-grid-two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
  align-items: stretch;
}

.dsm-panel {
  background: var(--dsm-surface);
  border: 1px solid var(--dsm-border);
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--dsm-shadow);
  margin: 0;
}

/* Enforce semantic hidden state even when panel classes define display/grid/flex. */
.dsm-wrap [hidden],
.dsm-admin-wrap [hidden] {
  display: none !important;
}

.dsm-panel.dsm-panel-talent .bwk-bakat-form {
  max-width: none;
  margin: 0;
}

.dsm-panel.dsm-admin-embed-card {
  padding: 10px;
  display: grid;
  gap: 10px;
}

.dsm-admin-embed-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 4px 0;
}

.dsm-admin-embed-toolbar .dsm-muted {
  margin: 0;
}

.dsm-admin-embed-frame {
  width: 100%;
  min-height: 780px;
  border: 1px solid #d2e1f0;
  border-radius: 12px;
  background: #ffffff;
}

.dsm-talent-filter-form {
  display: grid;
  grid-template-columns: minmax(250px, 1.5fr) minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin: 0 0 10px;
}

.dsm-talent-filter-form p {
  margin: 0;
}

.dsm-talent-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dsm-attendance-filter-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(170px, 0.8fr) auto;
  gap: 10px;
  align-items: end;
  margin: 0 0 12px;
}

.dsm-attendance-filter-form > div {
  min-width: 0;
}

.dsm-attendance-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dsm-attendance-bulk-form {
  margin: 0;
}

.dsm-attendance-bulk-table-wrap {
  overflow: auto;
  border: 1px solid #d5e3f1;
  border-radius: 10px;
  background: #ffffff;
}

.dsm-attendance-bulk-table {
  border: 0;
  border-radius: 0;
}

.dsm-attendance-bulk-table th {
  white-space: nowrap;
}

.dsm-attendance-status-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dsm-attendance-status-group label {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #27425f;
}

.dsm-attendance-note-input {
  width: 100%;
  min-height: 34px;
  border: 1px solid #c8d8ea;
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 12px;
  color: #213e5d;
  background: #ffffff;
}

.dsm-attendance-note-input.is-disabled,
.dsm-attendance-note-input:disabled {
  background: #f3f7fc;
  color: #8aa0b8;
  border-color: #d6e2ef;
  cursor: not-allowed;
}

.dsm-attendance-bulk-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.dsm-talent-results-meta {
  margin: 0 0 10px;
  font-size: 13px;
  color: #274565;
}

.dsm-talent-table-wrap {
  overflow: auto;
}

.dsm-talent-row-actions {
  white-space: nowrap;
}

.dsm-talent-pagination {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.dsm-talent-pagination-meta {
  font-size: 12px;
  color: #486582;
  font-weight: 700;
}

.dsm-talent-detail-panel h4 {
  margin: 12px 0 8px;
  font-size: 18px;
  color: #1a3552;
}

.dsm-talent-builder-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.dsm-talent-builder-sidebar {
  border: 1px solid #d6e4f2;
  border-radius: 12px;
  background: linear-gradient(165deg, #ffffff 0%, #f4f9ff 100%);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.dsm-talent-form-list {
  display: grid;
  gap: 10px;
  max-height: 640px;
  overflow: auto;
  padding-right: 2px;
}

.dsm-talent-form-item {
  border: 1px solid #cfe0f1;
  border-radius: 11px;
  background: #ffffff;
  padding: 10px;
  display: grid;
  gap: 6px;
}

.dsm-talent-form-item.is-active {
  border-color: #0e67ad;
  background: linear-gradient(160deg, #f5faff 0%, #edf5ff 100%);
  box-shadow: 0 10px 20px rgba(14, 76, 132, 0.14);
}

.dsm-talent-form-item h4 {
  margin: 0;
  font-size: 21px;
  line-height: 1.2;
  color: #17314d;
}

.dsm-talent-form-item .dsm-muted {
  margin: 0;
}

.dsm-talent-form-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dsm-talent-form-badge {
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 800;
  color: #155d97;
  border: 1px solid #b9d6ef;
  border-radius: 999px;
  background: #edf6ff;
  padding: 3px 7px;
}

.dsm-talent-form-badge-teacher {
  color: #165e42;
  border-color: #b8e0d0;
  background: #ebf9f1;
}

.dsm-talent-builder-editor {
  border: 1px solid #d6e4f2;
  border-radius: 12px;
  background: #ffffff;
  padding: 12px;
}

.dsm-talent-form-editor {
  display: grid;
  gap: 12px;
}

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

.dsm-talent-form-grid p {
  margin: 0;
}

.dsm-talent-toggle-row {
  display: grid;
  gap: 8px;
  border: 1px solid #d7e6f3;
  border-radius: 11px;
  background: #f6fbff;
  padding: 10px;
}

.dsm-talent-toggle-row label {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.dsm-talent-category-list {
  display: grid;
  gap: 10px;
}

.dsm-talent-category-card {
  border: 1px solid #d4e2f0;
  border-radius: 11px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
  padding: 10px;
}

.dsm-talent-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.dsm-talent-category-head h4 {
  margin: 0;
  font-size: 17px;
  color: #1a3654;
}

.dsm-talent-editor-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.dsm-panel h3 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: -0.25px;
  color: var(--dsm-text);
}

.dsm-wrap .dsm-main-header h2,
.dsm-wrap .dsm-section-title,
.dsm-wrap .dsm-panel h3,
.dsm-wrap .dsm-panel h4 {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.dsm-list {
  margin: 6px 0 0 16px;
  padding: 0;
}

.dsm-list li {
  margin: 4px 0;
  line-height: 1.42;
}

.dsm-panel label {
  display: block;
  font-weight: 680;
  margin: 8px 0 4px;
  color: #1f3551;
  font-size: 13px;
}

.dsm-student-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.dsm-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dsm-field label {
  margin: 0;
}

.dsm-panel input[type="text"],
.dsm-panel input[type="email"],
.dsm-panel input[type="password"],
.dsm-panel input[type="date"],
.dsm-panel input[type="file"],
.dsm-panel input[type="number"],
.dsm-panel textarea,
.dsm-panel select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #c1d4e7;
  border-radius: 9px;
  background: #ffffff;
  min-height: 34px;
  font-size: 13px;
  color: var(--dsm-text);
  box-shadow: none;
}

.dsm-panel input:focus,
.dsm-panel select:focus,
.dsm-panel textarea:focus {
  border-color: var(--dsm-primary);
  box-shadow: 0 0 0 1px var(--dsm-primary);
  outline: none;
}

.dsm-panel textarea {
  resize: vertical;
  min-height: 90px;
}

.dsm-btn {
  margin-top: 10px;
  background: linear-gradient(135deg, var(--dsm-primary), var(--dsm-primary-dark));
  color: #fff;
  border: 0;
  border-radius: 9px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 22px rgba(13, 103, 173, 0.28);
}

.dsm-btn:hover {
  background: linear-gradient(135deg, #0b5e9f, #084676);
}

.dsm-btn.dsm-btn-inline {
  margin-top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.dsm-btn.dsm-btn-ghost {
  background: linear-gradient(180deg, #ffffff 0%, #f1f7ff 100%);
  border: 1px solid #bfd4e8;
  color: #1e4f78;
  box-shadow: none;
}

.dsm-btn.dsm-btn-ghost:hover {
  background: linear-gradient(180deg, #ffffff 0%, #e8f2ff 100%);
  border-color: #a8c5df;
  color: #123f67;
}

.dsm-btn.dsm-btn-danger {
  background: linear-gradient(135deg, #d43d3d, #a92525);
  box-shadow: 0 12px 22px rgba(169, 37, 37, 0.26);
}

.dsm-btn.dsm-btn-danger:hover {
  background: linear-gradient(135deg, #c93333, #922020);
}

.dsm-btn.dsm-btn-wa {
  background: linear-gradient(135deg, #19a965, #0f7f4a);
  box-shadow: 0 12px 22px rgba(15, 127, 74, 0.24);
}

.dsm-btn.dsm-btn-wa:hover {
  background: linear-gradient(135deg, #16995b, #0d6f41);
}

.dsm-btn.dsm-btn-phone {
  background: linear-gradient(135deg, #1f6ed2, #174fa0);
  box-shadow: 0 12px 22px rgba(23, 79, 160, 0.24);
}

.dsm-btn.dsm-btn-phone:hover {
  background: linear-gradient(135deg, #1b61bc, #13468f);
}

.dsm-btn:disabled,
.dsm-btn[aria-disabled="true"] {
  opacity: 0.58;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
  pointer-events: none;
}

.dsm-security-panel {
  border-color: #cbdced;
  background: linear-gradient(160deg, #ffffff, #f8fbff);
}

.dsm-security-panel-required {
  border-color: #e7b1b1;
  background: linear-gradient(165deg, #fff8f8, #fff2f2);
}

.dsm-security-alert {
  margin: 0 0 10px;
  border: 1px solid #e5b3b3;
  border-radius: 10px;
  background: #fff3f3;
  color: #8a1f1f;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
}

.dsm-security-note {
  margin: 4px 0 0;
  color: #526b86;
  font-size: 12px;
  line-height: 1.4;
}

.dsm-security-form {
  display: grid;
  gap: 8px;
}

.dsm-security-credentials {
  border: 1px solid #d7e4f2;
  border-radius: 10px;
  background: #f6faff;
  padding: 11px 12px;
}

.dsm-security-credentials p {
  margin: 0 0 6px;
  font-size: 13px;
}

.dsm-security-credentials p:last-child {
  margin-bottom: 0;
}

.dsm-security-actions {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.dsm-profile-panel {
  border-color: #cfdeee;
  background: linear-gradient(165deg, #ffffff, #f6fbff);
}

.dsm-profile-form {
  display: grid;
  gap: 12px;
}

.dsm-profile-top {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid #d8e4f1;
  border-radius: 11px;
  background: #f8fbff;
  padding: 10px;
}

.dsm-profile-avatar-wrap {
  display: flex;
  justify-content: center;
}

.dsm-profile-avatar {
  width: 74px;
  height: 74px;
  border-radius: 10px;
  border: 1px solid #cfe0f0;
  object-fit: cover;
  background: #ffffff;
}

.dsm-profile-avatar-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  color: #365576;
  background: #edf4fd;
}

.dsm-profile-top-meta {
  display: grid;
  gap: 6px;
}

.dsm-profile-role-chip {
  margin: 0;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid #c9dcef;
  background: #ffffff;
  color: #2f5377;
  font-size: 10px;
  letter-spacing: 0.45px;
  font-weight: 800;
}

.dsm-profile-help {
  margin: 0;
  color: #56708a;
  font-size: 12px;
  line-height: 1.42;
}

.dsm-profile-grid,
.dsm-profile-role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.dsm-profile-role-grid .dsm-field-span-2 {
  grid-column: span 2;
}

.dsm-profile-inline-help {
  border: 1px solid #d6e4f2;
  border-radius: 9px;
  background: #f6fbff;
  padding: 10px;
  display: flex;
  align-items: center;
}

.dsm-profile-inline-help p {
  margin: 0;
  color: #496683;
  font-size: 12px;
  line-height: 1.4;
}

.dsm-profile-actions {
  margin: 0;
}

.dsm-checkbox {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 10px 0 0;
  font-weight: 680;
}

.dsm-checkbox input {
  margin: 0;
}

.dsm-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  border: 1px solid #d7e4f0;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.dsm-table th,
.dsm-table td {
  border-bottom: 1px solid #e2ecf6;
  padding: 8px 9px;
  vertical-align: top;
  text-align: left;
  word-break: break-word;
}

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

.dsm-table th {
  background: #eef5fd;
  font-weight: 700;
  color: #27425f;
}

.dsm-table-scroll {
  --dsm-table-min-width: 760px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable both-edges;
}

.dsm-wrap[data-dsm-shell] .dsm-table-scroll {
  --dsm-table-min-width: 780px;
}

.dsm-admin-wrap .dsm-table-scroll,
.bwk-bakat-admin-wrap .dsm-table-scroll {
  --dsm-table-min-width: 920px;
}

.dsm-table-scroll > table {
  width: 100%;
}

.dsm-table-scroll > .dsm-table,
.dsm-table-scroll > .dsm-admin-table,
.dsm-table-scroll > .bwk-bakat-table {
  margin: 0;
}

.dsm-homework-table .dsm-muted {
  margin-top: 4px;
  font-size: 11px;
  color: #4f6b86;
}

.dsm-homework-download-link {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dsm-homework-submit-form {
  margin-top: 8px;
  display: grid;
  gap: 7px;
  max-width: 290px;
}

.dsm-homework-submit-form input[type="file"],
.dsm-homework-submit-form input[type="text"] {
  font-size: 12px;
  padding: 7px 8px;
}

.dsm-homework-submit-form .dsm-btn {
  width: 100%;
}

.dsm-homework-submission-table td:first-child {
  min-width: 118px;
}

.dsm-homework-submission-table td:last-child {
  min-width: 230px;
}

.dsm-homework-review-form {
  display: grid;
  gap: 6px;
  min-width: 220px;
}

.dsm-homework-review-form select,
.dsm-homework-review-form input[type="number"],
.dsm-homework-review-form textarea {
  font-size: 12px;
  padding: 7px 8px;
}

.dsm-homework-review-form textarea {
  min-height: 56px;
}

.dsm-announcement-action-cell {
  white-space: nowrap;
}

.dsm-announcement-delete-form {
  margin: 0;
}

.dsm-fee-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 9px;
}

.dsm-fee-summary-card {
  border: 1px solid #d4e2ef;
  border-radius: 10px;
  background: #f6fbff;
  position: relative;
  overflow: hidden;
  padding: 10px;
  display: grid;
  gap: 4px;
  box-shadow: var(--dsm-card-3d-shadow);
  transform-origin: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.dsm-fee-summary-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--dsm-card-3d-gloss);
}

.dsm-fee-summary-card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--dsm-card-3d-accent);
}

.dsm-fee-summary-card span {
  font-size: 11px;
  font-weight: 700;
  color: #4d6580;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.dsm-fee-summary-card strong {
  font-size: 24px;
  line-height: 1;
  color: #193754;
}

.dsm-fee-summary-card small {
  margin-top: 3px;
  font-size: 11px;
  font-weight: 700;
  color: #4d6580;
}

.dsm-fee-summary-card-wide {
  grid-column: span 2;
}

.dsm-fee-summary-card-wide strong {
  font-size: 20px;
}

.dsm-fee-summary-grid .dsm-fee-summary-card:nth-child(5n + 1) {
  border-color: #bfdcff;
  background: #eef7ff;
}

.dsm-fee-summary-grid .dsm-fee-summary-card:nth-child(5n + 1) strong {
  color: #0f5e9e;
}

.dsm-fee-summary-grid .dsm-fee-summary-card:nth-child(5n + 2) {
  border-color: #d3c8f7;
  background: #f4efff;
}

.dsm-fee-summary-grid .dsm-fee-summary-card:nth-child(5n + 2) strong {
  color: #5b34b0;
}

.dsm-fee-summary-grid .dsm-fee-summary-card:nth-child(5n + 3) {
  border-color: #b8e5ef;
  background: #ecfbff;
}

.dsm-fee-summary-grid .dsm-fee-summary-card:nth-child(5n + 3) strong {
  color: #116888;
}

.dsm-fee-summary-grid .dsm-fee-summary-card:nth-child(5n + 4) {
  border-color: #b9e7d4;
  background: #edfbf4;
}

.dsm-fee-summary-grid .dsm-fee-summary-card:nth-child(5n + 4) strong {
  color: #1c7a4d;
}

.dsm-fee-summary-grid .dsm-fee-summary-card:nth-child(5n + 5) {
  border-color: #f1ddb0;
  background: #fff8eb;
}

.dsm-fee-summary-grid .dsm-fee-summary-card:nth-child(5n + 5) strong {
  color: #a46010;
}

.dsm-fee-summary-card:hover,
.dsm-fee-summary-card:focus-within {
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--dsm-card-3d-shadow-hover);
}

.dsm-fee-admin-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.dsm-fee-admin-config-grid.dsm-fee-admin-config-grid-single {
  grid-template-columns: 1fr;
}

.dsm-fee-config-card {
  display: grid;
  gap: 10px;
}

.dsm-fee-filter-form,
.dsm-fee-generate-form {
  display: grid;
  gap: 10px;
}

.dsm-fee-filter-grid,
.dsm-fee-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.dsm-fee-form-grid .dsm-field-span-2 {
  grid-column: span 2;
}

.dsm-fee-table td:last-child {
  min-width: 220px;
}

.dsm-fee-table-compact td:last-child {
  min-width: 250px;
}

.dsm-fee-bill-meta {
  margin-top: 4px;
  font-size: 11px;
  color: #4b6986;
  font-weight: 700;
}

.dsm-fee-detail-panel {
  border-color: #cadbef;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.dsm-fee-detail-meta {
  margin: 0 0 10px;
  font-size: 12px;
  color: #365676;
  line-height: 1.45;
}

.dsm-fee-detail-table td:last-child {
  min-width: 280px;
}

.dsm-fee-payment-form {
  margin: 0;
  display: grid;
  gap: 6px;
}

.dsm-fee-payment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dsm-fee-bill-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.dsm-fee-inline-form {
  margin: 0;
  display: inline-flex;
}

.dsm-fee-pending-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.dsm-fee-pending-actions .dsm-fee-inline-form {
  display: inline-flex;
}

.dsm-fee-payment-form input[type="number"],
.dsm-fee-payment-form input[type="date"],
.dsm-fee-payment-form input[type="text"],
.dsm-fee-payment-form select {
  min-height: 30px;
  padding: 6px 8px;
  font-size: 12px;
}

.dsm-fee-method-helper {
  border: 1px solid #d4e3f2;
  border-radius: 9px;
  background: #f7fbff;
  padding: 9px;
}

.dsm-fee-helper-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #2d4a67;
}

.dsm-fee-qr-image {
  display: block;
  width: 100%;
  max-width: 220px;
  border: 1px solid #d1dfef;
  border-radius: 10px;
  background: #ffffff;
  margin-bottom: 8px;
}

.dsm-fee-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid #c5d8e9;
  background: #f5faff;
  color: #214a74;
}

.dsm-fee-status-unpaid {
  border-color: #f3c4c4;
  background: #fff3f3;
  color: #8e2b2b;
}

.dsm-fee-status-partial {
  border-color: #f1d8b0;
  background: #fff8ec;
  color: #9b610f;
}

.dsm-fee-status-paid {
  border-color: #b9e2cb;
  background: #edf9f2;
  color: #206844;
}

.dsm-fee-status-pending,
.dsm-fee-status-payment-pending {
  border-color: #bfdaf5;
  background: #ecf6ff;
  color: #1a568f;
}

.dsm-fee-status-payment-confirmed {
  border-color: #b9e2cb;
  background: #edf9f2;
  color: #206844;
}

.dsm-fee-status-payment-rejected {
  border-color: #f3c4c4;
  background: #fff3f3;
  color: #8e2b2b;
}

.dsm-fee-overdue {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #a21f1f;
}

.dsm-fee-pending-inline {
  margin-top: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #1f5f98;
}

.dsm-fee-pending-note {
  margin-top: 6px;
  font-size: 11px;
  color: #35597d;
  line-height: 1.4;
}

.dsm-slip-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.dsm-slip-filter {
  margin-bottom: 10px;
}

.dsm-slip-print-actions {
  margin-top: 16px;
  display: flex;
  justify-content: center;
}

.dsm-slip-print-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 220px;
  padding: 12px 24px;
  border: 1px solid #d37f08;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 12px 24px rgba(175, 106, 10, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.dsm-slip-print-btn:hover,
.dsm-slip-print-btn:focus-visible {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 16px 26px rgba(175, 106, 10, 0.34);
  filter: brightness(1.03);
}

.dsm-slip-print-btn:active {
  transform: translateY(0) scale(0.99);
}

.dsm-slip-print-btn-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dsm-slip-print-btn-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.dsm-slip-print-btn-label {
  letter-spacing: 0.01em;
}

@media (max-width: 640px) {
  .dsm-slip-print-btn {
    width: 100%;
    max-width: 320px;
    min-width: 0;
    font-size: 16px;
    padding: 11px 18px;
  }
}

.dsm-slip-sheet {
  border: 1px solid #d1dfed;
  border-radius: 12px;
  background: #ffffff;
  padding: 12px;
  margin-top: 10px;
}

.dsm-slip-head {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #c8d7e7;
}

.dsm-slip-head h4 {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.2;
  color: #143553;
}

.dsm-slip-head p {
  margin: 2px 0;
  font-size: 13px;
  color: #264665;
}

.dsm-slip-exam + .dsm-slip-exam {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e2ecf6;
}

.dsm-slip-exam-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.dsm-slip-exam-head h5 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
  color: #193a5a;
}

.dsm-slip-exam-head span {
  font-size: 12px;
  color: #496988;
}

.dsm-slip-table {
  margin: 0;
}

.dsm-slip-stats {
  margin-top: 8px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #1f3f5e;
}

.dsm-slip-note {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.45;
  color: #1f3f5e;
}

@media (prefers-reduced-motion: reduce) {
  .dsm-kpi,
  .dsm-fee-summary-card {
    transition: none;
  }

  .dsm-kpi:hover,
  .dsm-kpi:focus-within,
  .dsm-fee-summary-card:hover,
  .dsm-fee-summary-card:focus-within {
    transform: none;
  }
}

@media (max-width: 1180px) {
  .dsm-table-scroll > table {
    min-width: var(--dsm-table-min-width);
    width: max(100%, var(--dsm-table-min-width));
  }

  .dsm-table-scroll > table th {
    white-space: nowrap;
  }
}

@media print {
  .dsm-wrap[data-dsm-shell] {
    display: block;
    border: 0;
    background: #ffffff;
    box-shadow: none;
    padding: 0;
    min-height: auto;
  }

  .dsm-side-menu,
  .dsm-side-trigger,
  .dsm-side-backdrop,
  .dsm-main-header,
  .dsm-section-head,
  .dsm-slip-filter,
  .dsm-slip-toolbar .dsm-btn,
  .dsm-slip-print-actions,
  .dsm-notify-ui,
  .dsm-main-date {
    display: none !important;
  }

  .dsm-main,
  .dsm-main-content {
    display: block;
    padding: 0;
  }

  .dsm-section {
    display: none !important;
    padding: 0 !important;
  }

  .dsm-section.is-active {
    display: block !important;
  }

  .dsm-panel,
  .dsm-slip-sheet {
    border: 0;
    box-shadow: none;
    margin: 0;
    padding: 0;
  }

  .dsm-slip-sheet + .dsm-slip-sheet {
    page-break-before: always;
  }

  .dsm-table-scroll {
    overflow: visible !important;
  }

  .dsm-table-scroll > table {
    min-width: 0 !important;
    width: 100% !important;
  }
}

@media (max-width: 1200px) {
  .dsm-fee-admin-config-grid {
    grid-template-columns: 1fr;
  }
}

.dsm-muted {
  color: var(--dsm-muted);
  font-size: 12px;
  line-height: 1.35;
}

.dsm-login-panel {
  --dsm-login-primary: #0d67ad;
  --dsm-login-primary-dark: #0b4f86;
  --dsm-login-border: #c8d9ea;
  max-width: 460px;
  margin: 18px auto;
  border: 1px solid var(--dsm-login-border);
  border-radius: 18px;
  background: linear-gradient(160deg, #fbfdff 0%, #f4f9ff 52%, #eef5ff 100%);
  box-shadow: 0 22px 40px rgba(13, 53, 94, 0.18);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 18px;
  animation: dsm-login-rise 0.24s ease both;
}

.dsm-login-panel::before,
.dsm-login-panel::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: -1;
}

.dsm-login-panel::before {
  width: 220px;
  height: 220px;
  top: -100px;
  left: -62px;
  background: radial-gradient(circle, rgba(13, 103, 173, 0.18) 0%, rgba(13, 103, 173, 0) 72%);
}

.dsm-login-panel::after {
  width: 170px;
  height: 170px;
  right: -72px;
  bottom: -86px;
  background: radial-gradient(circle, rgba(8, 120, 96, 0.16) 0%, rgba(8, 120, 96, 0) 72%);
}

.dsm-login-head {
  display: grid;
  gap: 6px;
  margin-bottom: 13px;
}

.dsm-login-kicker {
  margin: 0;
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  border: 1px solid #b8d4ea;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #1f5c8f;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.75px;
  text-transform: uppercase;
}

.dsm-login-head h3 {
  margin: 0;
  font-size: 26px;
  line-height: 1.08;
  letter-spacing: -0.4px;
}

.dsm-login-subtitle {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
}

.dsm-login-role-list {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dsm-login-role-chip {
  border: 1px solid #c8dbef;
  border-radius: 999px;
  background: #ffffff;
  color: #3b5f83;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 4px 9px;
}

.dsm-login-form-wrap form {
  margin: 0;
  display: grid;
  gap: 10px;
}

.dsm-login-panel .login-username,
.dsm-login-panel .login-password,
.dsm-login-panel .login-remember,
.dsm-login-panel .login-submit {
  margin: 0;
}

.dsm-login-panel .login-username label,
.dsm-login-panel .login-password label {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: #1e3e60;
}

.dsm-login-panel .login-input,
.dsm-login-panel input[type="text"],
.dsm-login-panel input[type="password"] {
  width: 100%;
  min-height: 40px;
  border: 1px solid #bfd3e7;
  border-radius: 10px;
  background: #ffffff;
  color: #173556;
  font-size: 14px;
  padding: 9px 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.dsm-login-panel .login-input::placeholder,
.dsm-login-panel input[type="text"]::placeholder,
.dsm-login-panel input[type="password"]::placeholder {
  color: #7f98b2;
}

.dsm-login-panel .login-input:focus,
.dsm-login-panel input[type="text"]:focus,
.dsm-login-panel input[type="password"]:focus {
  border-color: #0f6eb7;
  box-shadow: 0 0 0 3px rgba(15, 110, 183, 0.16);
  outline: none;
}

.dsm-login-panel .login-remember {
  padding-top: 2px;
}

.dsm-login-panel .login-remember label {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #395775;
  font-size: 12px;
  font-weight: 600;
}

.dsm-login-panel .login-remember input[type="checkbox"] {
  margin: 0;
  width: 16px;
  height: 16px;
}

.dsm-login-panel .login-submit {
  margin-top: 2px;
}

.dsm-login-panel .button-primary {
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--dsm-login-primary), var(--dsm-login-primary-dark));
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 14px;
  min-height: 40px;
  box-shadow: 0 12px 22px rgba(13, 103, 173, 0.28);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.dsm-login-panel .button-primary:hover,
.dsm-login-panel .button-primary:focus {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 14px 24px rgba(13, 103, 173, 0.32);
}

.dsm-login-meta {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
}

.dsm-login-link {
  color: #0a5c99;
  font-weight: 700;
  text-decoration: none;
}

.dsm-login-link:hover,
.dsm-login-link:focus {
  color: #084f84;
  text-decoration: underline;
}

.dsm-login-dot {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #8fa8c1;
}

.dsm-login-help {
  color: #56708b;
  line-height: 1.35;
}

.dsm-parent-register-panel {
  max-width: 920px;
}

.dsm-parent-register-form {
  gap: 14px;
}

.dsm-parent-register-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dsm-parent-register-grid .dsm-parent-register-email {
  grid-column: 1 / -1;
}

.dsm-parent-child-card {
  border: 1px solid #cfe0ef;
  border-radius: 12px;
  background: linear-gradient(160deg, #ffffff 0%, #f6fbff 100%);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.dsm-parent-child-card h4 {
  margin: 0;
  font-size: 18px;
  line-height: 1.18;
  letter-spacing: -0.2px;
  color: #15395d;
}

.dsm-parent-child-card .dsm-muted {
  margin: 0;
}

.dsm-parent-child-list {
  display: grid;
  gap: 8px;
}

.dsm-parent-child-row {
  border: 1px solid #d4e3f2;
  border-radius: 10px;
  background: #ffffff;
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.dsm-parent-child-add,
.dsm-parent-child-remove {
  margin: 0;
  min-height: 36px;
}

.dsm-parent-child-remove {
  display: none;
}

.dsm-parent-register-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dsm-parent-register-submit {
  width: 100%;
  margin-top: 2px;
  min-height: 48px;
  border: 1px solid #1a2f47;
  border-radius: 12px;
  padding: 12px 16px;
  background: linear-gradient(145deg, #0f1e2e 0%, #1b3550 55%, #254a6f 100%);
  box-shadow: 0 16px 28px rgba(15, 30, 46, 0.32);
  letter-spacing: 0.15px;
  font-size: 14px;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, border-color 0.18s ease;
}

.dsm-parent-register-submit:hover,
.dsm-parent-register-submit:focus {
  border-color: #284a6f;
  background: linear-gradient(145deg, #0b1826 0%, #162d45 54%, #1f4161 100%);
  box-shadow: 0 18px 32px rgba(10, 24, 38, 0.4);
  transform: translateY(-1px);
}

.dsm-parent-register-submit:focus {
  outline: none;
}

.dsm-parent-register-submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #d7e8fb, 0 18px 32px rgba(10, 24, 38, 0.4);
}

.dsm-parent-register-meta {
  margin-top: 14px;
}

@keyframes dsm-login-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

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

/* Keep white text for every dark-background button/state */
.dsm-side-btn:not(.dsm-side-btn-light):not(.dsm-side-btn-logout),
.dsm-side-btn:not(.dsm-side-btn-light):not(.dsm-side-btn-logout):visited,
.dsm-side-btn:not(.dsm-side-btn-light):not(.dsm-side-btn-logout):hover,
.dsm-side-btn:not(.dsm-side-btn-light):not(.dsm-side-btn-logout):focus,
.dsm-side-btn:not(.dsm-side-btn-light):not(.dsm-side-btn-logout):active,
.dsm-side-link.is-active,
.dsm-side-link.is-active:visited,
.dsm-side-link.is-active:hover,
.dsm-side-link.is-active:focus,
.dsm-side-link.is-active:active,
.dsm-btn:not(.dsm-btn-ghost),
.dsm-btn:not(.dsm-btn-ghost):visited,
.dsm-btn:not(.dsm-btn-ghost):hover,
.dsm-btn:not(.dsm-btn-ghost):focus,
.dsm-btn:not(.dsm-btn-ghost):active,
.dsm-login-panel .button-primary,
.dsm-login-panel .button-primary:visited,
.dsm-login-panel .button-primary:hover,
.dsm-login-panel .button-primary:focus,
.dsm-login-panel .button-primary:active {
  color: #ffffff !important;
}

.dsm-role-modal-wrap {
  min-height: calc(100dvh - 180px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(circle at top right, #e4f0ff 0%, #f4f9ff 44%, #eef5ff 100%);
  border: 1px solid #d4e3f2;
  border-radius: 18px;
}

.dsm-role-modal-card {
  width: min(760px, 100%);
  background: #ffffff;
  border: 1px solid #cfdeef;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 20px 38px rgba(13, 42, 79, 0.14);
}

.dsm-role-modal-card h3 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.35px;
  color: #14273d;
}

.dsm-role-modal-card p {
  margin: 7px 0 0;
  color: #526b86;
  font-size: 14px;
}

.dsm-role-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

@media (max-width: 760px) {
  .dsm-role-grid {
    grid-template-columns: 1fr;
  }
}

.dsm-role-option {
  text-decoration: none;
  border: 1px solid #ccdced;
  border-radius: 12px;
  background: linear-gradient(160deg, #f8fbff, #eef5ff);
  padding: 12px;
  min-height: 124px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.dsm-role-option:hover {
  transform: translateY(-2px);
  border-color: #9dc0e3;
  box-shadow: 0 14px 26px rgba(16, 71, 128, 0.16);
}

.dsm-role-chip {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  border: 1px solid #c8dbef;
  border-radius: 999px;
  background: #ffffff;
  color: #3a5d83;
  padding: 4px 8px;
}

.dsm-role-option strong {
  color: #152c47;
  font-size: 18px;
  line-height: 1.15;
}

.dsm-role-option small {
  color: #58718d;
  font-size: 12px;
  line-height: 1.35;
}

.dsm-role-admin .dsm-role-chip {
  border-color: #d8d2f5;
  color: #4d3f8f;
}

.dsm-role-teacher .dsm-role-chip {
  border-color: #c4e1d5;
  color: #21634a;
}

.dsm-role-student .dsm-role-chip {
  border-color: #b7d8f4;
  color: #1f537f;
}

.dsm-role-parent .dsm-role-chip {
  border-color: #edd1c4;
  color: #8a4a2b;
}

.dsm-notice {
  padding: 10px 12px;
  border-radius: 10px;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.dsm-notice.success {
  background: #e9f8ee;
  border: 1px solid #b6e3c4;
  color: #1f6333;
}

.dsm-notice.error {
  background: #fff1f1;
  border: 1px solid #f4c5c5;
  color: #8a1d1d;
}

/* Dashboard 3D refresh: purple header, cleaner side menu, purple actions */
.dsm-wrap[data-dsm-shell] {
  --dsm-primary: #612e95;
  --dsm-primary-dark: #3f1f6a;
}

.dsm-wrap[data-dsm-shell] .dsm-main-header {
  position: relative;
  overflow: hidden;
  border-width: 1px;
  box-shadow: 0 16px 34px rgba(26, 34, 61, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.dsm-wrap[data-dsm-shell] .dsm-main-header::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
}

.dsm-wrap[data-dsm-shell="teacher"] .dsm-main-header,
.dsm-wrap[data-dsm-shell="student"] .dsm-main-header,
.dsm-wrap[data-dsm-shell="parent"] .dsm-main-header {
  background: linear-gradient(140deg, #7d4bb5 0%, #5b2f8f 56%, #3f1f69 100%);
  border-color: #6f42a9;
}

.dsm-wrap[data-dsm-shell] .dsm-main-header h2,
.dsm-wrap[data-dsm-shell] .dsm-main-subtitle {
  color: #ffffff;
}

.dsm-wrap[data-dsm-shell] .dsm-main-subtitle {
  opacity: 0.94;
}

.dsm-wrap[data-dsm-shell] .dsm-main-header-actions {
  gap: 20px;
}

.dsm-wrap[data-dsm-shell] .dsm-main-date {
  order: 1;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  background: rgba(9, 19, 37, 0.26);
  color: #ffffff;
  font-size: 12px;
  line-height: 1;
  padding: 8px 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.dsm-wrap[data-dsm-shell] .dsm-main-header-actions .dsm-notify-ui {
  order: 2;
}

.dsm-wrap[data-dsm-shell] .dsm-side-menu {
  background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
  border-color: #ccd9e8;
  border-radius: 14px;
  box-shadow: 0 20px 38px rgba(12, 36, 66, 0.16);
}

.dsm-wrap[data-dsm-shell] .dsm-side-group {
  border-color: #c8d8ea;
  background: linear-gradient(180deg, #fbfdff 0%, #eef4fb 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), 0 8px 16px rgba(18, 46, 77, 0.08);
}

.dsm-wrap[data-dsm-shell] .dsm-side-link {
  border-color: #bfd1e4;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 7px 14px rgba(12, 44, 79, 0.08);
}

.dsm-wrap[data-dsm-shell] .dsm-side-link.is-active {
  border-color: #7040a8;
  background: linear-gradient(145deg, #7d4bb5 0%, #5b2f8f 56%, #3f1f69 100%);
  box-shadow: 0 12px 24px rgba(63, 31, 105, 0.34);
}

.dsm-wrap[data-dsm-shell] .dsm-side-btn,
.dsm-wrap[data-dsm-shell] .dsm-btn,
.dsm-wrap[data-dsm-shell] .dsm-btn.dsm-btn-ghost,
.dsm-wrap[data-dsm-shell] .dsm-btn.dsm-btn-danger,
.dsm-wrap[data-dsm-shell] .dsm-btn.dsm-btn-wa,
.dsm-wrap[data-dsm-shell] .dsm-btn.dsm-btn-phone,
.dsm-wrap[data-dsm-shell] .dsm-notify-read-btn,
.dsm-wrap[data-dsm-shell] .dsm-notify-close {
  border: 1px solid #7442ad;
  background: linear-gradient(145deg, #7f4db8 0%, #613096 56%, #441f70 100%);
  color: #ffffff;
  box-shadow: 0 11px 22px rgba(64, 31, 106, 0.3);
}

.dsm-wrap[data-dsm-shell] .dsm-side-btn:hover,
.dsm-wrap[data-dsm-shell] .dsm-side-btn:focus,
.dsm-wrap[data-dsm-shell] .dsm-btn:hover,
.dsm-wrap[data-dsm-shell] .dsm-btn:focus,
.dsm-wrap[data-dsm-shell] .dsm-notify-read-btn:hover,
.dsm-wrap[data-dsm-shell] .dsm-notify-read-btn:focus,
.dsm-wrap[data-dsm-shell] .dsm-notify-close:hover,
.dsm-wrap[data-dsm-shell] .dsm-notify-close:focus {
  border-color: #8c5fc1;
  background: linear-gradient(145deg, #8b58c0 0%, #6e3ca1 56%, #4d2679 100%);
  box-shadow: 0 14px 24px rgba(64, 31, 106, 0.36);
}

.dsm-wrap[data-dsm-shell] .dsm-notify-trigger {
  border: 1px solid #c77712;
  background: linear-gradient(145deg, #f5a22b 0%, #d97706 56%, #a85a03 100%);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(168, 90, 3, 0.32);
}

.dsm-wrap[data-dsm-shell] .dsm-notify-trigger:hover,
.dsm-wrap[data-dsm-shell] .dsm-notify-trigger:focus {
  border-color: #de8a1f;
  background: linear-gradient(145deg, #f7ad3f 0%, #e18511 56%, #b66408 100%);
  box-shadow: 0 15px 26px rgba(168, 90, 3, 0.38);
}

.dsm-wrap[data-dsm-shell] .dsm-side-btn.dsm-side-btn-light,
.dsm-wrap[data-dsm-shell] .dsm-side-btn.dsm-side-btn-light:hover,
.dsm-wrap[data-dsm-shell] .dsm-side-btn.dsm-side-btn-light:focus {
  border: 1px solid #ccd9e8;
  background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
  color: #1b456d;
  box-shadow: none;
}

.dsm-wrap[data-dsm-shell] .dsm-side-btn.dsm-side-btn-logout,
.dsm-wrap[data-dsm-shell] .dsm-side-btn.dsm-side-btn-logout:hover,
.dsm-wrap[data-dsm-shell] .dsm-side-btn.dsm-side-btn-logout:focus {
  border: 1px solid #e4bdbd;
  background: linear-gradient(180deg, #fff9f9 0%, #ffefef 100%);
  color: #7f2121;
  box-shadow: none;
}

.dsm-wrap[data-dsm-shell] .dsm-side-btn.dsm-side-btn-switch,
.dsm-wrap[data-dsm-shell] .dsm-side-btn.dsm-side-btn-switch:hover,
.dsm-wrap[data-dsm-shell] .dsm-side-btn.dsm-side-btn-switch:focus {
  border: 1px solid #0d8f73;
  background: linear-gradient(135deg, #11a27e 0%, #0f7f64 56%, #0b604c 100%);
  box-shadow: 0 10px 22px rgba(13, 115, 90, 0.3);
  color: #ffffff;
}

.dsm-wrap[data-dsm-shell] .dsm-panel,
.dsm-wrap[data-dsm-shell] .dsm-kpi,
.dsm-wrap[data-dsm-shell] .dsm-fee-summary-card,
.dsm-wrap[data-dsm-shell] .dsm-attendance-summary-card,
.dsm-wrap[data-dsm-shell] .dsm-talent-form-item,
.dsm-wrap[data-dsm-shell] .dsm-talent-category-card,
.dsm-wrap[data-dsm-shell] .dsm-parent-child-card,
.dsm-wrap[data-dsm-shell] .dsm-parent-child-row,
.dsm-wrap[data-dsm-shell] .dsm-notify-item {
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.dsm-wrap[data-dsm-shell] .dsm-panel:hover,
.dsm-wrap[data-dsm-shell] .dsm-panel:focus-within,
.dsm-wrap[data-dsm-shell] .dsm-kpi:hover,
.dsm-wrap[data-dsm-shell] .dsm-kpi:focus-within,
.dsm-wrap[data-dsm-shell] .dsm-fee-summary-card:hover,
.dsm-wrap[data-dsm-shell] .dsm-fee-summary-card:focus-within,
.dsm-wrap[data-dsm-shell] .dsm-attendance-summary-card:hover,
.dsm-wrap[data-dsm-shell] .dsm-attendance-summary-card:focus-within,
.dsm-wrap[data-dsm-shell] .dsm-talent-form-item:hover,
.dsm-wrap[data-dsm-shell] .dsm-talent-form-item:focus-within,
.dsm-wrap[data-dsm-shell] .dsm-talent-category-card:hover,
.dsm-wrap[data-dsm-shell] .dsm-talent-category-card:focus-within,
.dsm-wrap[data-dsm-shell] .dsm-parent-child-card:hover,
.dsm-wrap[data-dsm-shell] .dsm-parent-child-card:focus-within,
.dsm-wrap[data-dsm-shell] .dsm-parent-child-row:hover,
.dsm-wrap[data-dsm-shell] .dsm-parent-child-row:focus-within,
.dsm-wrap[data-dsm-shell] .dsm-notify-item:hover,
.dsm-wrap[data-dsm-shell] .dsm-notify-item:focus-within {
  transform: translateY(-3px);
  box-shadow: 0 18px 30px rgba(20, 37, 64, 0.18);
  border-color: #b6c9de;
}

@media (prefers-reduced-motion: reduce) {
  .dsm-wrap[data-dsm-shell] .dsm-panel,
  .dsm-wrap[data-dsm-shell] .dsm-kpi,
  .dsm-wrap[data-dsm-shell] .dsm-fee-summary-card,
  .dsm-wrap[data-dsm-shell] .dsm-attendance-summary-card,
  .dsm-wrap[data-dsm-shell] .dsm-talent-form-item,
  .dsm-wrap[data-dsm-shell] .dsm-talent-category-card,
  .dsm-wrap[data-dsm-shell] .dsm-parent-child-card,
  .dsm-wrap[data-dsm-shell] .dsm-parent-child-row,
  .dsm-wrap[data-dsm-shell] .dsm-notify-item {
    transition: none;
  }

  .dsm-wrap[data-dsm-shell] .dsm-panel:hover,
  .dsm-wrap[data-dsm-shell] .dsm-panel:focus-within,
  .dsm-wrap[data-dsm-shell] .dsm-kpi:hover,
  .dsm-wrap[data-dsm-shell] .dsm-kpi:focus-within,
  .dsm-wrap[data-dsm-shell] .dsm-fee-summary-card:hover,
  .dsm-wrap[data-dsm-shell] .dsm-fee-summary-card:focus-within,
  .dsm-wrap[data-dsm-shell] .dsm-attendance-summary-card:hover,
  .dsm-wrap[data-dsm-shell] .dsm-attendance-summary-card:focus-within,
  .dsm-wrap[data-dsm-shell] .dsm-talent-form-item:hover,
  .dsm-wrap[data-dsm-shell] .dsm-talent-form-item:focus-within,
  .dsm-wrap[data-dsm-shell] .dsm-talent-category-card:hover,
  .dsm-wrap[data-dsm-shell] .dsm-talent-category-card:focus-within,
  .dsm-wrap[data-dsm-shell] .dsm-parent-child-card:hover,
  .dsm-wrap[data-dsm-shell] .dsm-parent-child-card:focus-within,
  .dsm-wrap[data-dsm-shell] .dsm-parent-child-row:hover,
  .dsm-wrap[data-dsm-shell] .dsm-parent-child-row:focus-within,
  .dsm-wrap[data-dsm-shell] .dsm-notify-item:hover,
  .dsm-wrap[data-dsm-shell] .dsm-notify-item:focus-within {
    transform: none;
    box-shadow: var(--dsm-shadow);
  }
}

@media (max-width: 1180px) {
  .dsm-wrap[data-dsm-shell] {
    grid-template-columns: 1fr;
    height: auto;
    max-height: none;
    min-height: 0;
    overflow: visible;
    padding: 12px;
    gap: 12px;
    border-radius: 14px;
  }

  .dsm-side-trigger {
    position: fixed;
    right: max(8px, env(safe-area-inset-right));
    left: auto;
    top: calc(50% + 74px);
    width: 48px;
    min-height: 126px;
    height: auto;
    padding: 10px 6px;
    border: 1px solid #7442ad;
    border-radius: 14px;
    background: linear-gradient(180deg, #8b58c0 0%, #6e3ca1 56%, #4d2679 100%);
    color: #ffffff;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    box-shadow: 0 14px 28px rgba(64, 31, 106, 0.34);
    z-index: 100002;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .dsm-side-trigger:hover,
  .dsm-side-trigger:focus {
    transform: translateY(-1px);
    outline: none;
  }

  .dsm-side-trigger-icon {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #eadbff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.24);
  }

  .dsm-side-trigger-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    font-size: 11px;
    line-height: 1;
    letter-spacing: 0.2px;
    white-space: nowrap;
    font-weight: 700;
  }

  .dsm-side-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(8, 28, 52, 0.34);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 100200;
    transition: opacity 0.24s ease, visibility 0.24s ease;
  }

  .dsm-wrap[data-dsm-shell] .dsm-side-menu {
    position: fixed;
    top: 0;
    left: 0;
    bottom: auto;
    width: min(372px, calc(100vw - 28px));
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    padding: 12px 12px calc(14px + env(safe-area-inset-bottom));
    gap: 10px;
    border-radius: 0 16px 16px 0;
    z-index: 100201;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
    transform: translateX(calc(-100% - 16px));
    transition: transform 0.24s ease, box-shadow 0.24s ease;
    box-shadow: 0 24px 38px rgba(12, 40, 74, 0.22);
  }

  .dsm-wrap[data-dsm-shell] .dsm-side-user-card {
    padding: 11px;
    gap: 8px;
  }

  .dsm-wrap[data-dsm-shell] .dsm-side-user-avatar {
    width: 64px;
    height: 64px;
    border-radius: 8px;
  }

  .dsm-wrap[data-dsm-shell] .dsm-side-user-name {
    font-size: 14px;
  }

  .dsm-wrap[data-dsm-shell] .dsm-side-user-role {
    font-size: 10px;
    letter-spacing: 0.6px;
  }

  .dsm-wrap[data-dsm-shell] .dsm-side-user-actions {
    gap: 8px;
  }

  .dsm-wrap[data-dsm-shell] .dsm-side-btn {
    min-height: 42px;
    font-size: 14px;
    padding: 10px 12px;
    border-radius: 10px;
  }

  .dsm-wrap[data-dsm-shell] .dsm-role-switcher-list {
    margin-top: 10px;
    gap: 8px;
  }

  .dsm-wrap[data-dsm-shell] .dsm-role-switch-link {
    padding: 10px 12px;
    gap: 4px;
  }

  .dsm-wrap[data-dsm-shell] .dsm-role-switch-link strong {
    font-size: 15px;
  }

  .dsm-wrap[data-dsm-shell] .dsm-role-switch-link small {
    font-size: 12px;
  }

  body.admin-bar .dsm-wrap[data-dsm-shell] .dsm-side-menu {
    top: 32px;
    bottom: auto;
    height: calc(100dvh - 32px);
    max-height: calc(100dvh - 32px);
  }

  .dsm-wrap[data-dsm-shell].dsm-side-drawer-open .dsm-side-menu {
    transform: translateX(0);
  }

  .dsm-wrap[data-dsm-shell].dsm-side-drawer-open .dsm-side-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .dsm-wrap[data-dsm-shell].dsm-side-drawer-open .dsm-side-trigger {
    opacity: 0;
    pointer-events: none;
  }

  .dsm-wrap[data-dsm-shell] .dsm-side-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 0 0 auto;
    min-height: auto;
    overflow: visible;
    padding-right: 0;
  }

  .dsm-wrap[data-dsm-shell] .dsm-side-group {
    border-radius: 9px;
  }

  .dsm-wrap[data-dsm-shell] .dsm-side-parent {
    min-height: 42px;
    padding: 10px 12px;
    font-size: 14px;
  }

  .dsm-wrap[data-dsm-shell] .dsm-side-submenu {
    gap: 7px;
    padding: 0 8px 8px;
  }

  .dsm-wrap[data-dsm-shell] .dsm-side-group-single {
    padding: 8px;
  }

  .dsm-wrap[data-dsm-shell] .dsm-side-link {
    min-height: 40px;
    padding: 9px 11px;
    font-size: 14px;
  }

  .dsm-wrap[data-dsm-shell] .dsm-side-single-link {
    min-height: 42px;
    font-size: 14px;
  }

  .dsm-main-content {
    overflow: visible;
    padding: 2px 0 calc(74px + env(safe-area-inset-bottom));
  }

  .dsm-section {
    height: auto;
    overflow: visible;
    padding: 2px 0 0;
  }

  .dsm-main-header {
    padding: 12px;
    flex-direction: column;
    align-items: flex-start;
  }

  .dsm-main-header h2 {
    font-size: 24px;
  }

  .dsm-main-header-actions {
    align-self: flex-end;
    width: auto;
    justify-content: flex-end;
  }

  .dsm-main-date {
    white-space: normal;
  }

  .dsm-notify-ui {
    position: fixed !important;
    right: max(8px, env(safe-area-inset-right)) !important;
    top: calc(50% - 63px) !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    z-index: 100003 !important;
  }

  .dsm-notify-trigger {
    width: 48px;
    min-height: 126px;
    height: auto;
    padding: 10px 6px;
    border-radius: 14px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    box-shadow: 0 14px 30px rgba(14, 86, 146, 0.32);
  }

  .dsm-notify-trigger-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    font-size: 11px;
    line-height: 1;
    letter-spacing: 0.2px;
    white-space: nowrap;
  }

  .dsm-notify-trigger-count {
    min-width: 24px;
    height: 24px;
    padding: 0 5px;
  }

  .dsm-notify-trigger-icon {
    width: 9px;
    height: 9px;
  }

  .dsm-notify-ui.is-open .dsm-notify-trigger {
    opacity: 0;
    pointer-events: none;
  }

  .dsm-notify-drawer {
    right: 0;
    width: min(360px, calc(100vw - 12px));
    max-width: 100vw;
  }
}

@media (max-width: 782px) {
  body.admin-bar .dsm-wrap[data-dsm-shell] .dsm-side-menu {
    top: 46px;
    bottom: auto;
    height: calc(100dvh - 46px);
    max-height: calc(100dvh - 46px);
  }
}

@media (max-width: 960px) {
  .dsm-side-brand {
    padding-bottom: 7px;
  }

  .dsm-main-header h2 {
    font-size: 25px;
  }

  .dsm-notify-drawer {
    width: min(350px, calc(100vw - 12px));
  }

  .dsm-wrap[data-dsm-shell="teacher"] .dsm-main-header h2 {
    font-size: 20px;
  }

  .dsm-wrap[data-dsm-shell="student"] .dsm-main-header h2 {
    font-size: 20px;
  }

  .dsm-wrap[data-dsm-shell="student"] .dsm-section-title {
    font-size: 16px;
  }

  .dsm-wrap[data-dsm-shell="student"] .dsm-panel h3 {
    font-size: 15px;
  }

  .dsm-wrap[data-dsm-shell="student"] .dsm-kpi .value {
    font-size: 23px;
  }

  .dsm-wrap[data-dsm-shell="teacher"] .dsm-kpi .value {
    font-size: 32px;
  }

  .dsm-admin-embed-frame {
    min-height: 620px;
  }

  .dsm-talent-filter-form {
    grid-template-columns: 1fr;
  }

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

  .dsm-attendance-bulk-actions {
    justify-content: flex-start;
  }

  .dsm-talent-builder-layout {
    grid-template-columns: 1fr;
  }

  .dsm-fee-summary-card-wide,
  .dsm-fee-form-grid .dsm-field-span-2 {
    grid-column: span 1;
  }

  .dsm-fee-table td:last-child {
    min-width: 0;
  }
}

@media (max-width: 700px) {
  body:not(.wp-admin) .dsm-wrap {
    padding-left: 6px;
    padding-right: 6px;
  }

  .dsm-wrap[data-dsm-shell] {
    padding: 10px;
  }

  .dsm-section-title {
    font-size: 19px;
  }

  .dsm-panel h3 {
    font-size: 18px;
  }

  .dsm-wrap[data-dsm-shell="student"] .dsm-main-header h2 {
    font-size: 18px;
    line-height: 1.18;
  }

  .dsm-wrap[data-dsm-shell="student"] .dsm-section-title {
    font-size: 15px;
  }

  .dsm-wrap[data-dsm-shell="student"] .dsm-panel h3 {
    font-size: 14px;
  }

  .dsm-wrap[data-dsm-shell="student"] .dsm-kpi {
    min-height: 90px;
  }

  .dsm-wrap[data-dsm-shell="student"] .dsm-kpi .value {
    font-size: 21px;
  }

  .dsm-login-panel {
    margin: 12px auto;
    padding: 14px;
    border-radius: 14px;
  }

  .dsm-main-content {
    padding-bottom: calc(82px + env(safe-area-inset-bottom));
  }

  .dsm-side-trigger {
    right: max(6px, env(safe-area-inset-right));
    left: auto;
    top: calc(50% + 66px);
    width: 46px;
    min-height: 116px;
    height: auto;
    padding: 8px 5px;
    border-radius: 12px;
    gap: 6px;
  }

  .dsm-side-trigger-text {
    font-size: 10px;
  }

  .dsm-wrap[data-dsm-shell] .dsm-side-menu {
    width: min(350px, calc(100vw - 16px));
  }

  .dsm-notify-ui {
    position: fixed !important;
    right: max(6px, env(safe-area-inset-right)) !important;
    top: calc(50% - 58px) !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
  }

  .dsm-notify-trigger {
    width: 46px;
    min-height: 116px;
    height: auto;
    padding: 8px 5px;
    border-radius: 12px;
    gap: 6px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .dsm-notify-trigger-text {
    display: block;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    font-size: 10px;
    line-height: 1;
    letter-spacing: 0.2px;
    white-space: nowrap;
  }

  .dsm-notify-trigger-count {
    min-width: 22px;
    height: 22px;
    font-size: 10px;
  }

  .dsm-notify-trigger-icon {
    width: 10px;
    height: 10px;
  }

  .dsm-notify-drawer {
    top: 0;
    right: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    border-left: 0;
    border-radius: 0;
  }

  .dsm-notify-head {
    padding-top: calc(14px + env(safe-area-inset-top));
  }

  .dsm-notify-body {
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }

  .dsm-login-head h3 {
    font-size: 23px;
  }

  .dsm-login-role-list {
    gap: 5px;
  }

  .dsm-login-role-chip {
    font-size: 9px;
    padding: 3px 8px;
  }

  .dsm-login-meta {
    gap: 6px;
  }

  .dsm-admin-embed-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .dsm-admin-embed-frame {
    min-height: 520px;
  }

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

  .dsm-grid-two,
  .dsm-student-field-grid,
  .dsm-profile-grid,
  .dsm-profile-role-grid,
  .dsm-parent-register-grid,
  .dsm-parent-child-row {
    grid-template-columns: 1fr;
  }

  .dsm-homework-submit-form {
    max-width: 100%;
  }

  .dsm-homework-review-form {
    min-width: 100%;
  }

  .dsm-profile-top {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .dsm-profile-top-meta {
    width: 100%;
  }

  .dsm-profile-role-grid .dsm-field-span-2 {
    grid-column: auto;
  }

  .dsm-side-user-actions {
    grid-template-columns: 1fr;
  }
}
