:root {
  --bg: #eaf4d7;
  --surface: #fafcfc;
  --surface-strong: #ffffff;
  --text: #263a44;
  --text-muted: #667b84;
  --accent: #7faec4;
  --accent-hover: #6a9bb3;
  --accent-soft: #edf4f8;
  --button-bg: #7faec4;
  --button-hover: #6a9bb3;
  --button-border: #739eb4;
  --button-soft-bg: #d5e7f3;
  --button-soft-hover: #c3dbec;
  --button-soft-border: #a8c6da;
  --button-soft-text: #35586d;
  --danger-soft-bg: #f8e7e7;
  --danger-soft-hover: #f2d8d8;
  --danger-soft-border: #e3bbbb;
  --danger-soft-text: #9a4848;
  --week-card-bg: #edf6fc;
  --week-head-bg: #d9eaf5;
  --week-head-border: #c2d8e7;
  --green: #9ab37a;
  --green-hover: #7f9763;
  --green-soft: #f1f5ec;
  --line: #dce5e8;
  --danger: #ba3a3a;
  --success: #4b8b66;
  --shadow: 0 12px 30px rgba(61, 89, 102, 0.08);
  --radius: 20px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--text);
  background: linear-gradient(130deg, #f5fbfa 0%, #eaf4f8 34%, #e7f3ee 69%, #f4faf6 100%);
  background-size: 280% 280%;
  animation: appGradientFlow 18s ease infinite;
  position: relative;
  overflow-x: hidden;
}

.bg-shape {
  display: none;
}

.bg-shape-left {
  top: -80px;
  left: -120px;
  background: #b5cfdb;
}

.bg-shape-right {
  right: -120px;
  bottom: -100px;
  background: #ceddb7;
  animation-delay: 2.3s;
}

.layout {
  width: min(1260px, 94vw);
  margin: 20px auto;
  padding-bottom: 28px;
}

.panel {
  background: var(--surface-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(127, 155, 167, 0.18);
}

.brand {
  display: grid;
  gap: 10px;
}

.login-panel {
  width: min(580px, 100%);
  margin: 40px auto;
  padding: 30px;
  animation: rise 0.5s ease-out;
}

.brand h1,
.topbar h2,
section h3 {
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-weight: 800;
  margin: 0;
}

.brand h1 {
  font-size: clamp(1.66rem, 2.3vw, 2.32rem);
  line-height: 1.1;
}

.brand-login {
  margin-bottom: 4px;
}

.brand-logo {
  width: min(304px, 100%);
  height: auto;
  display: block;
}

.subtitle {
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.45;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: 0.73rem;
  color: var(--green-hover);
  margin: 0 0 2px;
}

.stack {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

label,
.field-label {
  display: grid;
  gap: 6px;
  font-size: 0.92rem;
  color: var(--text-muted);
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(102, 173, 216, 0.2);
}

input:disabled,
textarea:disabled,
select:disabled {
  background: #f3f7f8;
  color: #708891;
  cursor: not-allowed;
}

textarea {
  resize: vertical;
}

.btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 18px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--button-bg);
  color: #ffffff;
  border-color: var(--button-border);
}

.btn-primary:hover {
  background: var(--button-hover);
  border-color: var(--button-hover);
}

.btn-secondary {
  background: var(--button-soft-bg);
  color: var(--button-soft-text);
  border-color: var(--button-soft-border);
}

.btn-secondary:hover {
  background: var(--button-soft-hover);
  border-color: #93b5cc;
  color: #2e4f64;
}

.btn-link {
  background: var(--button-soft-bg);
  color: var(--button-soft-text);
  border-color: var(--button-soft-border);
}

.btn-link:hover {
  background: var(--button-soft-hover);
  border-color: #93b5cc;
  color: #2e4f64;
}

.error-text {
  margin: 0;
  color: var(--danger);
  min-height: 1.2em;
}

.success-text {
  margin: 0;
  color: var(--success);
  min-height: 1.2em;
}

.hidden {
  display: none !important;
}

.app {
  display: grid;
  gap: 12px;
}

.page-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.page-tab {
  min-width: 142px;
}

.page-tab.active {
  background: #ffffff;
  border-color: #90b2c8;
  color: #2c4b5e;
  box-shadow: 0 6px 14px rgba(83, 117, 135, 0.12);
}

.page-view {
  display: grid;
  gap: 12px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  animation: rise 0.45s ease-out;
}

.topbar h2 {
  font-size: clamp(1.2rem, 2vw, 1.8rem);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.topbar-brand > div {
  min-width: 0;
}

.topbar-brand .eyebrow {
  margin-bottom: 1px;
}

.topbar-logo {
  width: min(210px, 35vw);
  min-width: 142px;
  height: auto;
  display: block;
}

.topbar-brand h2 {
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.role-badge {
  background: #f2f5ef;
  color: #5f7650;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  text-transform: capitalize;
  border: 1px solid #dbe3d1;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  padding: 18px;
  background: var(--surface-strong);
  border-radius: var(--radius);
  border: 1px solid rgba(128, 157, 169, 0.2);
  box-shadow: var(--shadow);
  animation: rise 0.45s ease-out;
}

.stat-card small {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-card p {
  margin: 8px 0 0;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.content-grid > .panel {
  padding: 16px;
}

.knowledge-panel {
  padding: 18px;
  display: grid;
  gap: 14px;
}

.knowledge-top-row {
  align-items: flex-start;
}

.knowledge-hint {
  margin: 6px 0 0;
}

.knowledge-grid {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 12px;
}

.knowledge-folders-column,
.knowledge-content-column {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
  padding: 12px;
  min-height: 360px;
}

.knowledge-folders-column h4,
.knowledge-content-column h4,
.knowledge-resource-card h5 {
  margin: 0;
}

.knowledge-folders-column {
  display: grid;
  gap: 10px;
  align-content: start;
}

.knowledge-folders-list {
  display: grid;
  gap: 8px;
  align-content: start;
}

.knowledge-folder-node {
  display: grid;
  gap: 6px;
}

.knowledge-folder-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  margin-left: calc(var(--folder-level, 0) * 16px);
}

.knowledge-folder-toggle {
  border: 1px solid #d3dfe6;
  border-radius: 8px;
  background: #f1f7fb;
  color: #4f6f82;
  width: 28px;
  height: 28px;
  padding: 0;
  cursor: pointer;
  font-size: 0.78rem;
  line-height: 1;
  transition: transform 0.14s ease, background 0.2s ease, border-color 0.2s ease;
}

.knowledge-folder-toggle:hover {
  border-color: #a9c2d2;
  background: #e7f2f9;
}

.knowledge-folder-toggle.expanded {
  transform: rotate(90deg);
}

.knowledge-folder-toggle-placeholder {
  width: 28px;
  height: 28px;
}

.knowledge-folder-item {
  border: 1px solid #d7e1e5;
  border-radius: 10px;
  background: #f8fbfd;
  padding: 10px;
  display: grid;
  gap: 4px;
  text-align: left;
  cursor: pointer;
}

.knowledge-folder-item strong {
  font-size: 0.92rem;
  color: var(--text);
}

.knowledge-folder-item span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.knowledge-folder-item:hover {
  border-color: #afc7d7;
  background: #f2f8fc;
}

.knowledge-folder-item.selected {
  border-color: #9fbed2;
  background: #eaf4fb;
  box-shadow: inset 0 0 0 1px #c9dfec;
}

.knowledge-folder-children {
  display: grid;
  gap: 6px;
  margin-left: 14px;
  padding-left: 10px;
  border-left: 1px dashed #c6d5dd;
}

.knowledge-folder-details {
  display: grid;
  gap: 12px;
}

.knowledge-folder-header {
  display: grid;
  gap: 6px;
}

.knowledge-folder-header p {
  margin: 0;
}

.knowledge-access-panel {
  border: 1px solid #dce5ea;
  border-radius: 10px;
  background: #f9fcfe;
  padding: 10px;
}

.knowledge-resources-list {
  display: grid;
  gap: 10px;
}

.knowledge-resource-card {
  border: 1px solid #d8e2e7;
  border-radius: 10px;
  padding: 12px;
  background: #ffffff;
  display: grid;
  gap: 8px;
}

.knowledge-resource-kind {
  margin: 0;
  color: #5d7480;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.knowledge-resource-meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.knowledge-actions {
  flex-wrap: wrap;
  gap: 6px;
}

.knowledge-link-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.knowledge-inline-note {
  align-self: center;
  font-size: 0.78rem;
}

.knowledge-danger-btn {
  border-color: #d8b0b0;
  color: #874040;
  background: #f7ecec;
}

.knowledge-danger-btn:hover {
  border-color: #c89090;
  background: #f3dddd;
  color: #783636;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.section-title-row h3 {
  font-size: 1.28rem;
}

.calendar-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.calendar-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.calendar-range {
  margin: 0;
  text-align: left;
  color: var(--text-muted);
  font-weight: 500;
}

.day-range {
  margin-bottom: 12px;
}

.week-range {
  margin-left: 0;
  min-width: 180px;
  text-align: right;
  justify-self: end;
  white-space: nowrap;
}

.calendar-grid {
  display: block;
}

.calendar-day {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
}

.calendar-day.current-day {
  border-color: #ccd8dd;
  box-shadow: 0 8px 18px rgba(83, 109, 121, 0.08);
}

.calendar-day-head {
  border-bottom: 1px solid #e0e7ea;
  padding: 10px;
  display: grid;
  gap: 2px;
  background: #ffffff;
}

.calendar-weekday {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.calendar-date {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

.calendar-day-body {
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  align-content: start;
  min-height: 190px;
}

.day-empty {
  margin: 4px 0 0;
  font-size: 0.9rem;
  padding: 12px;
  border: 1px dashed #d4dde1;
  border-radius: 10px;
  background: #ffffff;
  grid-column: 1 / -1;
}

.calendar-lesson {
  border: 1px solid #d8e2e6;
  border-radius: 10px;
  background: #ffffff;
  padding: 11px;
  display: grid;
  gap: 6px;
  min-height: 196px;
  height: auto;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.calendar-lesson.regular {
  border-left: 4px solid var(--accent);
}

.calendar-lesson.trial {
  border-left: 4px solid var(--green);
}

.calendar-lesson-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.calendar-lesson-time {
  font-size: 0.76rem;
  color: var(--text-muted);
  white-space: nowrap;
  line-height: 1.2;
}

.calendar-lesson h4 {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.2;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-weight: 700;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.lesson-summary {
  display: grid;
  gap: 5px;
  min-height: 0;
  overflow: visible;
}

.summary-row {
  margin: 0;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  min-width: 0;
}

.summary-row span {
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.62rem;
  line-height: 1.1;
}

.summary-row strong {
  margin: 0;
  min-width: 0;
  font-weight: 500;
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.2;
}

.type-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f5f7;
  border: 1px solid #d7e1e6;
  color: #617884;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.lesson-link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.lesson-link:hover {
  color: var(--accent-hover);
}

.actions {
  display: flex;
  gap: 6px;
  margin-top: 0;
  min-height: 30px;
  align-self: end;
  align-items: center;
  min-width: 0;
  flex-wrap: nowrap;
}

.actions:empty::before {
  content: "";
  display: block;
  height: 28px;
  width: 100%;
}

.action-btn {
  border: 1px solid var(--button-soft-border);
  border-radius: 999px;
  background: var(--button-soft-bg);
  color: var(--button-soft-text);
  width: auto;
  padding: 5px 8px;
  font-size: 0.7rem;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  min-width: 0;
  flex: 1 1 0;
  font-weight: 600;
}

.actions .action-btn-toggle:only-child {
  flex-basis: 100%;
}

.action-btn-toggle {
  background: var(--button-soft-bg);
  border-color: var(--button-soft-border);
  color: var(--button-soft-text);
}

.action-btn-complete {
  background: #5fa873;
  border-color: #4f9562;
  color: #ffffff;
}

.action-btn-complete.is-complete {
  background: #c55151;
  border-color: #ad4040;
  color: #ffffff;
}

.action-btn-toggle:hover {
  background: var(--button-soft-hover);
  border-color: #93b5cc;
  color: #2e4f64;
}

.action-btn.action-btn-complete:hover {
  background: #4f9562;
  border-color: #448455;
  color: #ffffff;
}

.action-btn.action-btn-complete.is-complete:hover {
  background: #ad4040;
  border-color: #973434;
  color: #ffffff;
}

.action-btn:hover {
  background: var(--button-soft-hover);
  border-color: #93b5cc;
  color: #2e4f64;
}

.action-btn.danger {
  background: var(--danger-soft-bg);
  border-color: var(--danger-soft-border);
  color: var(--danger-soft-text);
}

.action-btn.danger:hover {
  background: var(--danger-soft-hover);
  border-color: #d8a4a4;
  color: #873939;
}

.week-overview {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #dde5e8;
}

.week-overview-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin-bottom: 10px;
  row-gap: 10px;
}

.week-overview-controls {
  width: auto;
  display: grid;
  grid-template-columns: repeat(3, auto) minmax(180px, 1fr);
  align-items: center;
  justify-content: end;
  gap: 8px;
}

.week-overview-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(165px, 1fr));
  gap: 8px;
  align-items: start;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-bottom: 4px;
}

.week-overview-grid::-webkit-scrollbar {
  height: 7px;
}

.week-overview-grid::-webkit-scrollbar-thumb {
  background: #c9d5da;
  border-radius: 999px;
}

.week-overview-day {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--week-card-bg);
  min-width: 165px;
  min-height: 120px;
  display: grid;
  grid-template-rows: auto 1fr;
}

.week-overview-day.selected {
  border-color: #bcd3e0;
  box-shadow: inset 0 0 0 1px #d4e5ef;
}

.week-overview-head {
  padding: 6px 6px 0;
  border-bottom: none;
  background: transparent;
}

.week-overview-day-link {
  border: 1px solid #cddde7;
  background: #deebf4;
  border-radius: 12px;
  width: 100%;
  padding: 7px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  color: var(--button-soft-text);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-align: left;
}

.week-overview-day-link strong {
  color: #2e4f64;
  font-size: 0.72rem;
  letter-spacing: 0;
}

.week-overview-day-link:hover {
  background: #d5e5f0;
  border-color: #b9cedd;
}

.week-overview-body {
  padding: 7px;
  display: grid;
  gap: 5px;
  align-content: start;
}

.week-overview-lesson {
  border: 1px solid var(--button-soft-border);
  border-radius: 8px;
  background: var(--button-soft-bg);
  padding: 4px 6px;
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  text-align: left;
  cursor: pointer;
  min-width: 0;
}

.week-overview-lesson:hover {
  border-color: #93b5cc;
  background: var(--button-soft-hover);
}

.week-overview-time {
  font-size: 0.66rem;
  font-weight: 700;
  color: #58778b;
  white-space: nowrap;
}

.week-overview-lesson-title {
  font-size: 0.68rem;
  color: #3f6175;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.week-overview-empty {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.lesson-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
}

.lesson-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(48, 65, 73, 0.34);
}

.lesson-modal-card {
  position: relative;
  width: min(760px, 96vw);
  max-height: 88vh;
  overflow: auto;
  border-radius: 16px;
  border: 1px solid #d6e1e5;
  box-shadow: 0 18px 36px rgba(63, 89, 102, 0.18);
  background: #ffffff;
  padding: 24px;
  display: grid;
  gap: 12px;
}

.lesson-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  border: 1px solid var(--button-soft-border);
  border-radius: 999px;
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--button-soft-bg);
  color: var(--button-soft-text);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  font-weight: 500;
  z-index: 3;
}

.lesson-modal-close:hover {
  background: var(--button-soft-hover);
  border-color: #93b5cc;
  color: #2e4f64;
}

.lesson-modal-time {
  margin: 0;
  padding-right: 56px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.lesson-modal-card h3 {
  margin: 0;
  padding-right: 56px;
  font-size: 1.2rem;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-weight: 800;
}

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

.lesson-modal-row {
  margin: 0;
  padding: 10px;
  border: 1px solid #d8e1e5;
  border-radius: 10px;
  background: #ffffff;
  display: grid;
  gap: 4px;
}

.lesson-modal-row span {
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.lesson-modal-row strong {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  overflow-wrap: anywhere;
}

.lesson-modal-row.full {
  grid-column: 1 / -1;
}

.lesson-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.export-modal-card {
  width: min(640px, 96vw);
}

.access-vault-modal-card {
  width: min(760px, 96vw);
}

.access-vault-note {
  margin: -2px 0 8px;
  padding-right: 48px;
  line-height: 1.45;
}

.access-vault-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.access-vault-create-card,
.access-vault-directory-card {
  min-width: 0;
}

.access-vault-form {
  margin-top: 8px;
}

.export-modal-form {
  margin-top: 2px;
}

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

.export-teachers-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.export-teachers-head .field-label {
  margin: 0;
}

.export-teachers-actions {
  display: flex;
  gap: 8px;
}

.export-teachers-actions .btn {
  padding: 7px 12px;
  font-size: 0.78rem;
}

.export-teachers-list {
  max-height: 240px;
}

.muted {
  color: var(--text-muted);
}

.checklist {
  border: 1px solid #d7e1e5;
  background: #ffffff;
  border-radius: var(--radius-sm);
  padding: 10px;
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.checklist label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.9rem;
  color: var(--text);
}

.checklist input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

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

.billing-panel {
  padding: 18px;
  display: grid;
  gap: 14px;
}

.billing-top-row {
  align-items: flex-start;
}

.billing-hint,
.billing-config-notice {
  margin: 0;
}

.billing-config-notice {
  padding: 12px 14px;
  border: 1px dashed rgba(128, 160, 176, 0.5);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.6);
}

.billing-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.billing-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.billing-students-column,
.billing-form-card,
.billing-invoices-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: #ffffff;
}

.billing-main-column,
.billing-student-layout {
  display: grid;
  gap: 14px;
}

.billing-students-column {
  display: grid;
  gap: 12px;
  align-content: start;
}

.billing-students-list,
.billing-invoices-list {
  display: grid;
  gap: 10px;
}

.billing-student-card {
  border: 1px solid #d6e1e7;
  border-radius: 14px;
  background: #f7fbfd;
  padding: 12px;
  display: grid;
  gap: 5px;
  text-align: left;
  cursor: pointer;
}

.billing-student-card:hover {
  border-color: #9fc4d6;
  background: #eef8fc;
}

.billing-student-card.selected {
  border-color: #81b8d3;
  background: #e5f4fb;
  box-shadow: inset 0 0 0 1px rgba(95, 164, 199, 0.18);
}

.billing-student-name {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
}

.billing-student-email,
.billing-student-meta,
.billing-invoice-student,
.billing-invoice-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.billing-balance-badge,
.billing-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(137, 176, 194, 0.4);
  background: rgba(255, 255, 255, 0.75);
  color: #255067;
  font-size: 0.78rem;
  font-weight: 700;
}

.billing-selected-student {
  text-align: right;
}

.billing-teachers-weekly-toolbar {
  justify-content: flex-end;
}

.billing-teachers-weekly-range {
  margin: 0;
  min-width: 170px;
  text-align: right;
  white-space: nowrap;
}

.billing-invoice-card {
  border: 1px solid #d7e2e8;
  border-radius: 16px;
  padding: 14px;
  background: #fafdff;
  display: grid;
  gap: 12px;
}

.billing-invoice-card.invoice-status-paid {
  border-color: rgba(16, 185, 129, 0.36);
}

.billing-invoice-card.invoice-status-canceled {
  border-color: rgba(185, 92, 92, 0.34);
}

.billing-invoice-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.billing-invoice-heading {
  display: grid;
  gap: 4px;
}

.billing-invoice-heading h5,
.billing-form-card h4,
.billing-invoices-card h4,
.billing-students-column h4 {
  margin: 0;
}

.billing-status-badge.pending {
  color: #7d5b11;
  border-color: rgba(210, 168, 64, 0.35);
}

.billing-status-badge.paid {
  color: #12704d;
  border-color: rgba(22, 163, 74, 0.35);
}

.billing-status-badge.canceled {
  color: #9a4343;
  border-color: rgba(185, 92, 92, 0.35);
}

.billing-invoice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.billing-invoice-grid p {
  margin: 0;
  display: grid;
  gap: 4px;
}

.billing-invoice-grid span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.billing-invoice-grid strong {
  font-size: 0.95rem;
  color: var(--text);
}

.billing-actions {
  flex-wrap: wrap;
}

.billing-actions .action-btn {
  flex: 1 1 200px;
}

.billing-empty {
  margin: 0;
}

.billing-teachers-weekly-list {
  align-content: start;
}

.billing-teacher-weekly-item {
  cursor: default;
}

.billing-teacher-weekly-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.billing-teacher-weekly-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes appGradientFlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(12px);
  }
}

@media (max-width: 1200px) {
  .calendar-day-body {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  }

  .week-overview-grid {
    grid-template-columns: repeat(7, minmax(156px, 1fr));
  }

  .week-overview-day {
    min-width: 156px;
  }
}

@media (max-width: 980px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .calendar-lesson {
    min-height: 174px;
  }

  .summary-row {
    grid-template-columns: 58px 1fr;
  }

  .summary-row span {
    font-size: 0.64rem;
    letter-spacing: 0.02em;
  }

  .summary-row strong {
    font-size: 0.75rem;
  }

  .actions {
    gap: 5px;
  }

  .lesson-modal-grid {
    grid-template-columns: 1fr;
  }

  .week-overview-grid {
    grid-template-columns: repeat(7, minmax(148px, 1fr));
  }

  .week-overview-day {
    min-width: 148px;
  }

  .week-overview-header {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .week-overview-controls {
    width: 100%;
    grid-template-columns: repeat(3, max-content);
    justify-content: flex-start;
  }

  .week-range {
    margin-left: 0;
    grid-column: 1 / -1;
    width: 100%;
    text-align: left;
    justify-self: start;
    min-width: 0;
  }

  .topbar-logo {
    width: min(184px, 42vw);
    min-width: 132px;
  }

  .knowledge-grid {
    grid-template-columns: 1fr;
  }

  .knowledge-folders-column,
  .knowledge-content-column {
    min-height: 0;
  }

  .billing-summary-grid,
  .billing-invoice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 720px) {
  .layout {
    width: 92vw;
    margin-top: 16px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .topbar-brand {
    width: 100%;
  }

  .topbar-logo {
    width: min(168px, 56vw);
    min-width: 118px;
  }

  .topbar-actions {
    width: 100%;
  }

  .page-tabs {
    width: 100%;
  }

  .page-tab {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
  }

  .calendar-top-actions {
    width: 100%;
    gap: 6px;
  }

  .calendar-top-actions .btn {
    flex: 1 1 calc(50% - 6px);
  }

  .calendar-lesson {
    min-height: 168px;
  }

  .summary-row {
    grid-template-columns: 56px 1fr;
  }

  .actions {
    gap: 4px;
    flex-wrap: wrap;
  }

  .action-btn {
    flex: 1 1 calc(50% - 4px);
  }

  .actions .action-btn-toggle {
    flex-basis: 100%;
  }

  .lesson-modal {
    padding: 12px;
  }

  .lesson-modal-card {
    padding: 18px;
    padding-top: 20px;
  }

  .export-date-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .export-teachers-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .triple-grid {
    grid-template-columns: 1fr;
  }

  .billing-summary-grid,
  .billing-invoice-grid {
    grid-template-columns: 1fr;
  }

  .billing-invoice-top,
  .billing-top-row {
    flex-direction: column;
  }

  .billing-selected-student {
    text-align: left;
  }

  .billing-teachers-weekly-toolbar {
    justify-content: flex-start;
  }

  .billing-teachers-weekly-range {
    min-width: 0;
    text-align: left;
  }

  .billing-actions .action-btn {
    flex-basis: 100%;
  }

  .login-panel {
    padding: 22px;
    margin: 18px auto;
  }

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

  .week-overview-grid {
    grid-template-columns: repeat(7, minmax(136px, 1fr));
  }

  .week-overview-day {
    min-width: 136px;
  }

  .knowledge-top-row {
    flex-direction: column;
  }

  .knowledge-top-row .calendar-top-actions {
    width: 100%;
  }

  .knowledge-top-row .calendar-top-actions .btn {
    flex: 1 1 calc(50% - 6px);
  }
}

/* --- Glass morphism theme --- */
:root {
  --bg: #dff0ff;
  --surface: rgba(232, 244, 255, 0.42);
  --surface-strong: rgba(247, 251, 255, 0.62);
  --surface-soft: rgba(255, 255, 255, 0.22);
  --text: #0e2433;
  --text-muted: #486579;
  --accent: #2bb8f4;
  --accent-hover: #0ea5e9;
  --accent-soft: rgba(43, 184, 244, 0.18);
  --button-bg: rgba(44, 184, 244, 0.92);
  --button-hover: rgba(14, 165, 233, 0.98);
  --button-border: rgba(91, 200, 246, 0.56);
  --button-soft-bg: rgba(244, 250, 255, 0.24);
  --button-soft-hover: rgba(255, 255, 255, 0.34);
  --button-soft-border: rgba(255, 255, 255, 0.38);
  --button-soft-text: #173b4b;
  --danger-soft-bg: rgba(255, 228, 230, 0.32);
  --danger-soft-hover: rgba(255, 238, 239, 0.42);
  --danger-soft-border: rgba(239, 68, 68, 0.3);
  --danger-soft-text: #8f2f3a;
  --week-card-bg: rgba(246, 251, 255, 0.34);
  --week-head-bg: rgba(255, 255, 255, 0.5);
  --week-head-border: rgba(255, 255, 255, 0.42);
  --green: #2fd3ad;
  --green-hover: #14b88f;
  --green-soft: rgba(47, 211, 173, 0.18);
  --line: rgba(157, 190, 205, 0.3);
  --danger: #b42318;
  --success: #0f8a5f;
  --shadow: 0 28px 90px rgba(12, 28, 45, 0.18);
  --shadow-soft: 0 16px 40px rgba(12, 28, 45, 0.12);
  --radius: 24px;
  --radius-sm: 16px;
  --glass-border: rgba(255, 255, 255, 0.36);
  --glass-highlight: rgba(255, 255, 255, 0.42);
  --glass-blur: 22px;
}

body {
  background:
    radial-gradient(circle at 10% 12%, rgba(48, 184, 244, 0.32) 0%, transparent 32%),
    radial-gradient(circle at 88% 18%, rgba(71, 214, 184, 0.28) 0%, transparent 30%),
    radial-gradient(circle at 50% 100%, rgba(22, 163, 232, 0.18) 0%, transparent 38%),
    linear-gradient(135deg, #f7fbff 0%, #e2efff 34%, #dff9f1 68%, #eef7ff 100%);
  background-size: 220% 220%;
  animation: appGradientFlow 22s ease infinite;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: -3;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(97, 145, 170, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(97, 145, 170, 0.22) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.72), transparent 92%);
}

body::after {
  z-index: -2;
  background:
    radial-gradient(circle at center, transparent 0%, transparent 60%, rgba(15, 23, 42, 0.08) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 36%);
}

.layout {
  position: relative;
  z-index: 1;
}

.brand h1,
.topbar h2,
section h3,
.lesson-modal-card h3,
.billing-form-card h4,
.billing-invoices-card h4,
.billing-students-column h4,
.knowledge-folders-column h4,
.knowledge-content-column h4 {
  font-family: "Space Grotesk", "Manrope", "Segoe UI", sans-serif;
  letter-spacing: -0.025em;
}

.brand-logo,
.topbar-logo {
  filter: drop-shadow(0 16px 30px rgba(33, 115, 160, 0.12));
}

.bg-shape {
  display: block;
  position: fixed;
  width: 460px;
  height: 460px;
  border-radius: 999px;
  filter: blur(78px);
  opacity: 0.62;
  z-index: -1;
  animation: float 14s ease-in-out infinite;
}

.bg-shape-left {
  top: -170px;
  left: -170px;
  background: radial-gradient(circle, rgba(57, 189, 248, 0.78) 0%, transparent 66%);
}

.bg-shape-right {
  right: -180px;
  bottom: -170px;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.74) 0%, transparent 68%);
  animation-delay: 2.8s;
}

.panel,
.stat-card,
.calendar-day,
.calendar-day-head,
.calendar-lesson,
.week-overview-day,
.week-overview-day-link,
.week-overview-lesson,
.billing-students-column,
.billing-form-card,
.billing-invoices-card,
.billing-student-card,
.billing-invoice-card,
.lesson-modal-card,
.lesson-modal-row,
.checklist,
.knowledge-folders-column,
.knowledge-content-column,
.knowledge-folder-item,
.knowledge-resource-card,
.day-empty,
.export-modal-card,
.knowledge-access-panel,
.billing-config-notice,
.role-badge,
.type-badge,
.page-tabs {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.1) 100%),
    var(--surface);
  border-color: var(--glass-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(var(--glass-blur)) saturate(165%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(165%);
}

.panel::before,
.stat-card::before,
.calendar-day::before,
.calendar-lesson::before,
.week-overview-day::before,
.billing-form-card::before,
.billing-invoices-card::before,
.billing-student-card::before,
.billing-invoice-card::before,
.knowledge-resource-card::before,
.knowledge-folders-column::before,
.knowledge-content-column::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.42), transparent 30%, transparent 72%, rgba(255, 255, 255, 0.08));
  opacity: 0.85;
}

.topbar {
  position: sticky;
  top: 18px;
  z-index: 12;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.14)),
    var(--surface-strong);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(24px) saturate(170%);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
}

.page-tabs {
  padding: 8px;
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
}

.page-tab.active {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0.2)),
    rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.48);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38), 0 12px 24px rgba(15, 23, 42, 0.12);
}

.calendar-day-head {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.2)),
    var(--surface-strong);
}

.calendar-day.current-day,
.week-overview-day.selected,
.knowledge-folder-item.selected,
.billing-student-card.selected {
  border-color: rgba(73, 184, 240, 0.45);
  box-shadow: 0 18px 38px rgba(43, 184, 244, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.calendar-lesson.regular {
  border-left: 4px solid rgba(43, 184, 244, 0.92);
  background:
    linear-gradient(180deg, rgba(91, 202, 246, 0.16), rgba(255, 255, 255, 0.06)),
    var(--surface);
}

.calendar-lesson.trial {
  border-left: 4px solid rgba(47, 211, 173, 0.92);
  background:
    linear-gradient(180deg, rgba(47, 211, 173, 0.16), rgba(255, 255, 255, 0.06)),
    var(--surface);
}

.calendar-lesson h4,
.week-overview-lesson-title,
.billing-invoice-heading h5 {
  color: var(--text);
}

.knowledge-resource-kind,
.knowledge-inline-note,
.calendar-weekday,
.calendar-lesson-time,
.billing-student-email,
.billing-student-meta,
.billing-invoice-student,
.billing-invoice-label {
  color: var(--text-muted);
}

.role-badge,
.type-badge {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.12)),
    rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #1c4d62;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.stat-card p {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  letter-spacing: -0.04em;
}

input,
textarea,
select {
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 8px 16px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
}

input::placeholder,
textarea::placeholder {
  color: rgba(72, 101, 121, 0.82);
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(43, 184, 244, 0.62);
  box-shadow:
    0 0 0 4px rgba(43, 184, 244, 0.18),
    0 18px 24px rgba(43, 184, 244, 0.08);
}

input:disabled,
textarea:disabled,
select:disabled {
  background: rgba(255, 255, 255, 0.14);
}

.btn {
  box-shadow:
    0 14px 30px rgba(15, 23, 42, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn-primary {
  background: linear-gradient(135deg, rgba(38, 177, 244, 0.98), rgba(66, 214, 175, 0.88));
  border-color: rgba(87, 198, 244, 0.58);
}

.btn-primary:hover {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.98), rgba(22, 201, 152, 0.92));
}

.btn-secondary,
.btn-link,
.action-btn,
.knowledge-folder-toggle,
.lesson-modal-close {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.14)),
    var(--button-soft-bg);
  border-color: var(--button-soft-border);
  color: var(--button-soft-text);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
}

.btn-secondary:hover,
.btn-link:hover,
.action-btn:hover,
.knowledge-folder-toggle:hover,
.lesson-modal-close:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.18)),
    var(--button-soft-hover);
}

.knowledge-danger-btn,
.action-btn.danger {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.08)),
    var(--danger-soft-bg);
  border-color: var(--danger-soft-border);
  color: var(--danger-soft-text);
}

.knowledge-danger-btn:hover,
.action-btn.danger:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.1)),
    var(--danger-soft-hover);
}

.knowledge-folder-item,
.week-overview-lesson,
.week-overview-day-link,
.billing-student-card,
.billing-invoice-card,
.knowledge-resource-card {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.knowledge-folder-item:hover,
.billing-student-card:hover,
.billing-invoice-card:hover,
.knowledge-resource-card:hover,
.week-overview-lesson:hover {
  transform: translateY(-1px);
}

.knowledge-access-panel,
.billing-config-notice,
.checklist,
.day-empty {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.1)),
    rgba(255, 255, 255, 0.16);
}

.lesson-modal-backdrop {
  background: rgba(9, 18, 31, 0.42);
  backdrop-filter: blur(10px);
}

.lesson-modal-card,
.export-modal-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.16)),
    rgba(232, 245, 255, 0.34);
}

.week-overview-grid::-webkit-scrollbar-thumb {
  background: rgba(114, 152, 168, 0.36);
  border-radius: 999px;
}

.action-btn.action-btn-complete {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.9), rgba(52, 211, 153, 0.84));
  border-color: rgba(16, 185, 129, 0.52);
  color: #ffffff;
}

.action-btn.action-btn-complete.is-complete {
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.92), rgba(220, 38, 38, 0.92));
  border-color: rgba(220, 38, 38, 0.52);
  color: #ffffff;
}

/* --- Premium glass refinement --- */
:root {
  --glass-shadow-strong: 0 42px 120px rgba(6, 18, 32, 0.22);
  --glass-shadow-hover: 0 34px 90px rgba(29, 126, 174, 0.22);
  --glass-glow: rgba(76, 196, 248, 0.22);
  --glass-glow-soft: rgba(82, 223, 186, 0.18);
}

::selection {
  background: rgba(43, 184, 244, 0.24);
  color: #083047;
}

.layout::before {
  content: "";
  position: fixed;
  inset: 8% 6% auto;
  height: 42vh;
  z-index: -1;
  pointer-events: none;
  border-radius: 40px;
  background:
    radial-gradient(circle at 18% 24%, rgba(93, 207, 248, 0.2) 0%, transparent 36%),
    radial-gradient(circle at 78% 18%, rgba(79, 226, 185, 0.16) 0%, transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 85%);
  filter: blur(36px);
  opacity: 0.9;
}

.panel,
.stat-card,
.calendar-day,
.calendar-lesson,
.week-overview-day,
.week-overview-day-link,
.week-overview-lesson,
.billing-students-column,
.billing-form-card,
.billing-invoices-card,
.billing-student-card,
.billing-invoice-card,
.lesson-modal-card,
.knowledge-folders-column,
.knowledge-content-column,
.knowledge-folder-item,
.knowledge-resource-card,
.export-modal-card {
  isolation: isolate;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    var(--glass-shadow-strong);
}

.stat-card,
.calendar-lesson,
.knowledge-folder-item,
.knowledge-resource-card,
.billing-student-card,
.billing-invoice-card {
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.45s ease,
    border-color 0.3s ease,
    background 0.35s ease;
}

.stat-card::after,
.knowledge-resource-card::after,
.billing-invoice-card::after,
.calendar-lesson::after,
.knowledge-folder-item::after,
.billing-student-card::after {
  content: "";
  position: absolute;
  inset: -55% auto auto -35%;
  width: 58%;
  height: 220%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.32;
  background: linear-gradient(
    112deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.54) 42%,
    rgba(255, 255, 255, 0.08) 62%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(14deg) translateX(-160%);
  transition: transform 0.95s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.4s ease;
  mix-blend-mode: screen;
}

.stat-card:hover,
.knowledge-resource-card:hover,
.billing-invoice-card:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    var(--glass-shadow-hover);
  border-color: rgba(116, 214, 249, 0.4);
}

.calendar-lesson:hover,
.knowledge-folder-item:hover,
.billing-student-card:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 24px 62px rgba(29, 126, 174, 0.14);
  border-color: rgba(116, 214, 249, 0.34);
}

.stat-card:hover::after,
.calendar-lesson:hover::after,
.knowledge-folder-item:hover::after,
.knowledge-resource-card:hover::after,
.billing-student-card:hover::after,
.billing-invoice-card:hover::after {
  transform: rotate(14deg) translateX(260%);
  opacity: 0.58;
}

.topbar::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.06) 34%, rgba(255, 255, 255, 0.22) 68%, rgba(255, 255, 255, 0.04));
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  padding: 1px;
}

.topbar::after,
.login-panel::after,
.lesson-modal-card::after,
.export-modal-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.46), transparent 32%),
    linear-gradient(120deg, transparent 24%, rgba(255, 255, 255, 0.18) 48%, transparent 72%);
  opacity: 0.72;
}

.page-view {
  animation: glassPageIn 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.stats-grid .stat-card:nth-child(1) {
  animation-delay: 0.02s;
}

.stats-grid .stat-card:nth-child(2) {
  animation-delay: 0.08s;
}

.stats-grid .stat-card:nth-child(3) {
  animation-delay: 0.14s;
}

.stats-grid .stat-card:nth-child(4) {
  animation-delay: 0.2s;
}

.stats-grid .stat-card {
  animation: rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.stats-grid .stat-card p,
.billing-invoice-grid strong,
.billing-balance-badge,
.billing-status-badge {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.22);
}

.stats-grid .stat-card p {
  background: linear-gradient(135deg, #0f3146 0%, #1f6f8f 42%, #18a98c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.role-badge,
.type-badge,
.billing-balance-badge,
.billing-status-badge {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    0 10px 22px rgba(12, 28, 45, 0.08);
}

.page-tabs,
.week-overview,
.billing-summary-grid,
.knowledge-grid,
.billing-layout,
.billing-student-layout {
  position: relative;
}

.page-tabs::after,
.week-overview::after,
.knowledge-grid::before,
.billing-layout::before,
.billing-student-layout::before {
  content: none;
}

.topbar > *,
.login-panel > *,
.lesson-modal-card > *,
.export-modal-card > *,
.panel > *,
.stat-card > *,
.calendar-day > *,
.calendar-lesson > *,
.week-overview-day > *,
.week-overview-day-link > *,
.week-overview-lesson > *,
.billing-students-column > *,
.billing-form-card > *,
.billing-invoices-card > *,
.billing-student-card > *,
.billing-invoice-card > *,
.knowledge-folders-column > *,
.knowledge-content-column > *,
.knowledge-folder-item > *,
.knowledge-resource-card > * {
  position: relative;
  z-index: 1;
}

.calendar-day-body,
.knowledge-folders-list,
.knowledge-resources-list,
.billing-invoices-list,
.billing-students-list,
.week-overview-body {
  position: relative;
  z-index: 1;
}

.action-btn,
.btn,
.knowledge-folder-toggle,
.lesson-modal-close {
  transition:
    transform 0.24s ease,
    box-shadow 0.3s ease,
    background 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease;
}

.btn:hover,
.action-btn:hover,
.knowledge-folder-toggle:hover,
.lesson-modal-close:hover {
  box-shadow:
    0 14px 28px rgba(14, 28, 43, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.btn-primary,
.action-btn.action-btn-complete,
.action-btn.action-btn-complete.is-complete {
  position: relative;
  overflow: hidden;
}

.btn-primary::after,
.action-btn.action-btn-complete::after,
.action-btn.action-btn-complete.is-complete::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(115deg, transparent 18%, rgba(255, 255, 255, 0.38) 46%, transparent 72%);
  transform: translateX(-120%);
  transition: transform 0.85s cubic-bezier(0.19, 1, 0.22, 1);
}

.btn-primary:hover::after,
.action-btn.action-btn-complete:hover::after,
.action-btn.action-btn-complete.is-complete:hover::after {
  transform: translateX(120%);
}

.calendar-lesson-top,
.billing-invoice-top,
.section-title-row,
.topbar-brand,
.topbar-actions {
  position: relative;
  z-index: 1;
}

.calendar-lesson-time,
.billing-invoice-label code {
  font-variant-numeric: tabular-nums;
}

.knowledge-folder-children {
  border-left-color: rgba(255, 255, 255, 0.34);
}

.billing-invoice-card.invoice-status-paid {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 26px 70px rgba(12, 185, 129, 0.12);
}

.billing-invoice-card.invoice-status-canceled {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 22px 54px rgba(224, 68, 68, 0.1);
}

.lesson-modal-close {
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 0;
  line-height: 0;
  position: absolute;
  overflow: hidden;
}

.lesson-modal-close::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 1.8px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
}

.lesson-modal-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 1.8px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(-45deg);
}

.week-overview {
  padding: 14px;
  border: 1px solid rgba(177, 202, 214, 0.44);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(43, 184, 244, 0.05), rgba(255, 255, 255, 0.08)),
    rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 24px rgba(41, 89, 116, 0.04);
}

.week-overview-day {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(194, 209, 217, 0.52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.week-overview-day::before {
  content: none;
}

.week-overview-day.selected {
  border-color: rgba(161, 195, 212, 0.72);
  box-shadow: inset 0 0 0 1px rgba(208, 230, 240, 0.44);
}

.week-overview-head {
  padding: 6px 6px 2px;
}

.week-overview-day-link,
.week-overview-lesson {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(193, 208, 216, 0.5);
  box-shadow: none;
}

.week-overview-day-link:hover,
.week-overview-lesson:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(177, 196, 206, 0.62);
}

:root {
  --glass-blur: 12px;
  --shadow: 0 16px 36px rgba(12, 28, 45, 0.1);
  --shadow-soft: 0 10px 24px rgba(12, 28, 45, 0.08);
  --glass-shadow-strong: 0 18px 42px rgba(12, 28, 45, 0.12);
  --glass-shadow-hover: 0 20px 46px rgba(29, 126, 174, 0.14);
}

body {
  animation: none;
  background-size: auto;
}

.bg-shape {
  display: none;
}

.layout::before,
.topbar::before,
.topbar::after,
.login-panel::after,
.lesson-modal-card::after,
.export-modal-card::after,
.stat-card::after,
.knowledge-resource-card::after,
.billing-invoice-card::after,
.calendar-lesson::after,
.knowledge-folder-item::after,
.billing-student-card::after,
.btn-primary::after,
.action-btn.action-btn-complete::after,
.action-btn.action-btn-complete.is-complete::after {
  content: none;
}

.stat-card::before,
.calendar-lesson::before,
.billing-student-card::before,
.billing-invoice-card::before,
.knowledge-resource-card::before,
.knowledge-folder-item::before {
  content: none;
}

.panel,
.stat-card,
.calendar-day,
.calendar-day-head,
.calendar-lesson,
.week-overview-day,
.week-overview-day-link,
.week-overview-lesson,
.billing-students-column,
.billing-form-card,
.billing-invoices-card,
.billing-student-card,
.billing-invoice-card,
.lesson-modal-card,
.lesson-modal-row,
.checklist,
.knowledge-folders-column,
.knowledge-content-column,
.knowledge-folder-item,
.knowledge-resource-card,
.day-empty,
.export-modal-card,
.knowledge-access-panel,
.billing-config-notice,
.role-badge,
.type-badge,
.page-tabs {
  box-shadow: 0 16px 36px rgba(12, 28, 45, 0.1);
}

.calendar-lesson,
.week-overview-day,
.week-overview-day-link,
.week-overview-lesson,
.knowledge-folder-item,
.knowledge-resource-card,
.billing-student-card,
.billing-invoice-card,
.lesson-modal-row,
.role-badge,
.type-badge,
.billing-balance-badge,
.billing-status-badge,
input,
textarea,
select,
.btn-secondary,
.btn-link,
.action-btn,
.knowledge-folder-toggle,
.lesson-modal-close {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.topbar {
  backdrop-filter: blur(14px) saturate(132%);
  -webkit-backdrop-filter: blur(14px) saturate(132%);
}

.lesson-modal-backdrop {
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.page-view,
.stats-grid .stat-card,
.lesson-modal-card,
.export-modal-card {
  animation: none;
}

.stat-card,
.calendar-lesson,
.knowledge-folder-item,
.knowledge-resource-card,
.billing-student-card,
.billing-invoice-card,
.btn,
.action-btn,
.knowledge-folder-toggle,
.lesson-modal-close {
  transition:
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease,
    color 0.22s ease;
}

.btn:hover,
.action-btn:hover,
.knowledge-folder-toggle:hover,
.lesson-modal-close:hover,
.stat-card:hover,
.calendar-lesson:hover,
.knowledge-folder-item:hover,
.knowledge-resource-card:hover,
.billing-student-card:hover,
.billing-invoice-card:hover {
  transform: none;
  box-shadow: 0 18px 38px rgba(12, 28, 45, 0.12);
}

.lesson-modal-close {
  z-index: 6;
  pointer-events: auto;
}

.lesson-modal-close::before,
.lesson-modal-close::after {
  pointer-events: none;
}

.week-overview-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  overflow-x: visible;
  overscroll-behavior-x: auto;
  padding-bottom: 0;
}

.week-overview-day {
  min-width: 0;
}

.week-overview-body {
  overflow: visible;
}

@media (max-width: 980px) {
  .week-overview-grid {
    grid-template-columns: repeat(7, minmax(148px, 1fr));
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-bottom: 4px;
  }

  .week-overview-day {
    min-width: 148px;
  }
}

@media (max-width: 720px) {
  .week-overview-grid {
    grid-template-columns: repeat(7, minmax(136px, 1fr));
  }

  .week-overview-day {
    min-width: 136px;
  }
}

.lesson-modal-card,
.export-modal-card {
  animation: modalGlassIn 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes glassPageIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.995);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes modalGlassIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bg-shape,
  .stats-grid .stat-card,
  .page-view,
  .lesson-modal-card,
  .export-modal-card {
    animation: none !important;
  }

  .stat-card:hover,
  .calendar-lesson:hover,
  .knowledge-folder-item:hover,
  .knowledge-resource-card:hover,
  .billing-student-card:hover,
  .billing-invoice-card:hover,
  .program-card:hover,
  .team-card:hover {
    transform: none !important;
  }
}

/* --- Soft white palette refinement --- */
:root {
  --bg: #f4f7fa;
  --surface: rgba(248, 250, 252, 0.62);
  --surface-strong: rgba(255, 255, 255, 0.82);
  --surface-soft: rgba(255, 255, 255, 0.46);
  --text: #162833;
  --text-muted: #667a86;
  --accent: #8fa8b6;
  --accent-hover: #7e97a6;
  --accent-soft: rgba(143, 168, 182, 0.15);
  --button-bg: rgba(122, 149, 164, 0.94);
  --button-hover: rgba(110, 137, 152, 0.98);
  --button-border: rgba(172, 189, 199, 0.68);
  --button-soft-bg: rgba(255, 255, 255, 0.54);
  --button-soft-hover: rgba(255, 255, 255, 0.74);
  --button-soft-border: rgba(205, 217, 225, 0.72);
  --button-soft-text: #284452;
  --week-card-bg: rgba(255, 255, 255, 0.4);
  --week-head-bg: rgba(255, 255, 255, 0.64);
  --week-head-border: rgba(221, 229, 234, 0.84);
  --green: #73a191;
  --green-hover: #61897b;
  --green-soft: rgba(115, 161, 145, 0.14);
  --line: rgba(185, 198, 207, 0.5);
  --shadow: 0 20px 52px rgba(13, 27, 42, 0.1);
  --shadow-soft: 0 12px 28px rgba(13, 27, 42, 0.08);
  --glass-border: rgba(255, 255, 255, 0.66);
  --glass-highlight: rgba(255, 255, 255, 0.76);
}

body {
  background:
    radial-gradient(circle at 12% 10%, rgba(176, 196, 210, 0.16) 0%, transparent 32%),
    radial-gradient(circle at 88% 18%, rgba(219, 228, 233, 0.2) 0%, transparent 30%),
    radial-gradient(circle at 54% 100%, rgba(205, 216, 223, 0.16) 0%, transparent 40%),
    linear-gradient(135deg, #fcfdff 0%, #f4f7fb 36%, #f7fafc 70%, #ffffff 100%);
}

body::before {
  opacity: 0.1;
}

body::after {
  background:
    radial-gradient(circle at center, transparent 0%, transparent 64%, rgba(15, 23, 42, 0.045) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 38%);
}

.topbar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.58)),
    var(--surface-strong);
}

.page-tab.active {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(247, 250, 252, 0.72)),
    rgba(255, 255, 255, 0.7);
  border-color: rgba(205, 217, 225, 0.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62), 0 10px 22px rgba(15, 23, 42, 0.08);
}

.calendar-day.current-day,
.week-overview-day.selected,
.knowledge-folder-item.selected,
.billing-student-card.selected {
  border-color: rgba(165, 187, 198, 0.68);
  box-shadow: 0 14px 28px rgba(96, 121, 137, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.34);
}

.calendar-lesson.regular {
  border-left-color: rgba(127, 157, 173, 0.9);
  background:
    linear-gradient(180deg, rgba(183, 202, 214, 0.16), rgba(255, 255, 255, 0.08)),
    var(--surface);
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(143, 168, 182, 0.7);
  box-shadow:
    0 0 0 4px rgba(143, 168, 182, 0.14),
    0 14px 22px rgba(143, 168, 182, 0.06);
}

.btn-primary {
  background: linear-gradient(135deg, rgba(122, 149, 164, 0.96), rgba(191, 204, 212, 0.92));
  border-color: rgba(177, 192, 201, 0.76);
}

.btn-primary:hover {
  background: linear-gradient(135deg, rgba(109, 136, 151, 0.98), rgba(179, 194, 203, 0.94));
}

.stats-grid .stat-card p {
  background: linear-gradient(135deg, #1b3140 0%, #4e6777 46%, #8ea4af 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

::selection {
  background: rgba(143, 168, 182, 0.18);
  color: #102733;
}

/* --- Subtle blue-lime accents --- */
:root {
  --accent-aqua: #93c0d2;
  --accent-lime: #cadf9f;
  --accent-aqua-soft: rgba(147, 192, 210, 0.2);
  --accent-lime-soft: rgba(202, 223, 159, 0.18);
  --accent-aqua-line: rgba(147, 192, 210, 0.42);
  --accent-lime-line: rgba(202, 223, 159, 0.38);
}

.page-tab.active {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(244, 252, 251, 0.88) 54%, rgba(248, 252, 240, 0.84)),
    rgba(255, 255, 255, 0.74);
  border-color: rgba(184, 209, 199, 0.96);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 12px 24px rgba(15, 23, 42, 0.07),
    0 10px 24px rgba(147, 192, 210, 0.08),
    0 0 0 1px rgba(202, 223, 159, 0.18);
}

.btn-primary {
  background: linear-gradient(135deg, rgba(110, 148, 170, 0.98) 0%, rgba(141, 188, 185, 0.95) 54%, rgba(202, 223, 159, 0.92) 100%);
  border-color: rgba(181, 204, 193, 0.84);
  box-shadow:
    0 14px 28px rgba(15, 23, 42, 0.08),
    0 10px 22px rgba(147, 192, 210, 0.12),
    0 6px 16px rgba(202, 223, 159, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.btn-primary:hover {
  background: linear-gradient(135deg, rgba(100, 140, 162, 1) 0%, rgba(132, 181, 177, 0.97) 56%, rgba(194, 218, 148, 0.94) 100%);
}

.calendar-day.current-day,
.week-overview-day.selected,
.knowledge-folder-item.selected,
.billing-student-card.selected {
  border-color: rgba(175, 202, 190, 0.8);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(242, 251, 250, 0.62) 58%, rgba(247, 251, 241, 0.5)),
    rgba(255, 255, 255, 0.62);
  box-shadow:
    0 14px 28px rgba(96, 121, 137, 0.08),
    0 10px 22px rgba(147, 192, 210, 0.08),
    0 0 0 1px rgba(147, 192, 210, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.38);
}

.billing-weekly-badge,
.billing-balance-badge,
.role-badge,
.type-badge {
  border-color: rgba(181, 202, 189, 0.66);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(243, 251, 250, 0.62) 58%, rgba(247, 251, 242, 0.54)),
    rgba(255, 255, 255, 0.6);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    0 8px 18px rgba(147, 192, 210, 0.05);
}

.billing-weekly-badge,
.billing-balance-badge {
  color: #284a59;
}

.calendar-lesson.regular {
  border-left-color: rgba(141, 193, 182, 0.96);
  background:
    linear-gradient(180deg, rgba(147, 192, 210, 0.14), rgba(202, 223, 159, 0.1)),
    var(--surface);
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(161, 196, 187, 0.8);
  box-shadow:
    0 0 0 4px rgba(147, 192, 210, 0.15),
    0 14px 22px rgba(202, 223, 159, 0.1);
}

.stats-grid .stat-card p,
.billing-summary-card strong {
  background: linear-gradient(135deg, #1b3140 0%, #4f7383 38%, #81a7ad 66%, #93b06a 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

::selection {
  background: rgba(171, 201, 178, 0.24);
  color: #102733;
}

/* --- Harmonized color lift --- */
:root {
  --accent-pearl-soft: rgba(248, 242, 232, 0.36);
  --accent-surface-aqua: rgba(239, 249, 250, 0.42);
  --accent-surface-lime: rgba(247, 250, 239, 0.36);
}

body {
  background:
    radial-gradient(circle at 14% 12%, rgba(147, 192, 210, 0.08) 0%, transparent 26%),
    radial-gradient(circle at 84% 18%, rgba(202, 223, 159, 0.06) 0%, transparent 22%),
    radial-gradient(circle at 52% 102%, rgba(248, 242, 232, 0.14) 0%, transparent 36%),
    linear-gradient(135deg, #fcfdff 0%, #f6f8fb 34%, #fafbf9 72%, #fffefd 100%);
}

.topbar {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(248, 250, 251, 0.76) 56%, rgba(250, 251, 248, 0.7)),
    var(--surface-strong);
}

.panel,
.calendar-day,
.week-overview-day,
.week-overview-day-link,
.billing-student-card,
.billing-invoice-card,
.knowledge-resource-card,
.lesson-modal-card,
.export-modal-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(248, 250, 251, 0.72) 54%, rgba(250, 251, 248, 0.64)),
    var(--surface-strong);
  border-color: rgba(192, 203, 210, 0.28);
}

.btn-secondary {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(248, 250, 251, 0.68) 58%, rgba(250, 251, 248, 0.62)),
    rgba(255, 255, 255, 0.66);
  border-color: rgba(194, 204, 210, 0.56);
  color: #284754;
}

.btn-secondary:hover {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(245, 249, 250, 0.74) 56%, rgba(249, 251, 245, 0.68)),
    rgba(255, 255, 255, 0.72);
  box-shadow:
    0 12px 24px rgba(15, 23, 42, 0.06),
    0 8px 18px rgba(147, 192, 210, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.56);
}

.page-tab:hover {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(246, 249, 250, 0.66) 56%, rgba(249, 251, 246, 0.6)),
    rgba(255, 255, 255, 0.68);
  border-color: rgba(194, 205, 203, 0.48);
}

.section-title-row h3,
.topbar-brand h2,
.lesson-modal-card h3,
.export-modal-card h3 {
  background: none;
  color: #29434f;
}

.calendar-day:hover:not(.current-day),
.week-overview-day:hover:not(.selected),
.knowledge-folder-item:hover,
.knowledge-resource-card:hover,
.billing-student-card:hover,
.billing-invoice-card:hover {
  border-color: rgba(184, 201, 197, 0.56);
  box-shadow:
    0 14px 28px rgba(96, 121, 137, 0.08),
    0 10px 22px rgba(147, 192, 210, 0.04),
    inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.calendar-range,
.billing-student-meta,
.billing-invoice-label {
  color: #617d86;
}

/* --- Day schedule blue alignment --- */
.calendar-lesson.regular {
  border-left-color: #96b8ce;
  border-color: #cfdee8;
  background:
    linear-gradient(180deg, rgba(222, 235, 244, 0.56), rgba(238, 246, 251, 0.76) 58%, rgba(255, 255, 255, 0.56)),
    rgba(255, 255, 255, 0.66);
}

/* --- Day schedule glass finish --- */
.calendar-day {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(234, 244, 250, 0.48) 56%, rgba(255, 255, 255, 0.62)),
    rgba(255, 255, 255, 0.52);
  border-color: rgba(194, 213, 224, 0.62);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 22px 48px rgba(31, 71, 98, 0.08);
  backdrop-filter: blur(14px) saturate(128%);
  -webkit-backdrop-filter: blur(14px) saturate(128%);
}

.calendar-day::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.46), transparent 34%, transparent 74%, rgba(255, 255, 255, 0.12)),
    radial-gradient(circle at top right, rgba(209, 230, 242, 0.24), transparent 34%);
  opacity: 0.92;
}

.calendar-day.current-day {
  border-color: rgba(171, 199, 217, 0.84);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 24px 54px rgba(56, 112, 150, 0.12);
}

.calendar-day-head {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(225, 239, 248, 0.54)),
    rgba(255, 255, 255, 0.62);
  border-bottom-color: rgba(203, 220, 230, 0.7);
  backdrop-filter: blur(12px) saturate(126%);
  -webkit-backdrop-filter: blur(12px) saturate(126%);
}

.calendar-day-body {
  background: linear-gradient(180deg, rgba(231, 242, 249, 0.2), rgba(255, 255, 255, 0));
}

.day-empty {
  background:
    linear-gradient(180deg, rgba(241, 248, 252, 0.74), rgba(255, 255, 255, 0.62)),
    rgba(255, 255, 255, 0.56);
  border-color: rgba(201, 219, 230, 0.76);
  color: #5f7885;
  backdrop-filter: blur(10px) saturate(122%);
  -webkit-backdrop-filter: blur(10px) saturate(122%);
}

.calendar-lesson {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(231, 242, 249, 0.46) 56%, rgba(255, 255, 255, 0.58)),
    rgba(255, 255, 255, 0.52);
  border-color: rgba(198, 216, 227, 0.76);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 14px 30px rgba(31, 71, 98, 0.08);
  backdrop-filter: blur(12px) saturate(124%);
  -webkit-backdrop-filter: blur(12px) saturate(124%);
}

.calendar-lesson::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.42), transparent 38%, transparent 72%, rgba(255, 255, 255, 0.1)),
    radial-gradient(circle at top right, rgba(210, 230, 242, 0.2), transparent 34%);
  opacity: 0.88;
}

.calendar-lesson.regular {
  border-left-color: #98bbd3;
  border-color: rgba(198, 217, 229, 0.84);
  background:
    linear-gradient(180deg, rgba(223, 236, 245, 0.72), rgba(238, 246, 251, 0.82) 58%, rgba(255, 255, 255, 0.6)),
    rgba(255, 255, 255, 0.62);
}

.calendar-lesson.trial {
  border-left-color: #89b9c9;
  border-color: rgba(194, 216, 227, 0.82);
  background:
    linear-gradient(180deg, rgba(218, 237, 245, 0.72), rgba(235, 246, 251, 0.8) 58%, rgba(255, 255, 255, 0.6)),
    rgba(255, 255, 255, 0.62);
}

.calendar-lesson:hover {
  border-color: rgba(170, 200, 218, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    0 18px 38px rgba(46, 96, 128, 0.12);
}

.calendar-lesson-time,
.calendar-weekday {
  color: #648292;
}

/* --- Unified monochrome glass system --- */
:root {
  --mono-glass-fill: rgba(214, 228, 239, 0.34);
  --mono-glass-fill-strong: rgba(222, 234, 244, 0.46);
  --mono-glass-border: rgba(196, 213, 225, 0.72);
  --mono-glass-border-strong: rgba(176, 198, 214, 0.82);
  --mono-glass-shadow: 0 18px 40px rgba(25, 57, 81, 0.1);
  --mono-glass-shadow-hover: 0 22px 48px rgba(25, 57, 81, 0.14);
  --mono-glass-text: #274352;
  --mono-glass-muted: #5f7987;
  --mono-glass-accent: #94b6cf;
  --mono-glass-accent-strong: #82a9c6;
}

body {
  background:
    radial-gradient(circle at 14% 10%, rgba(170, 198, 219, 0.12) 0%, transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(214, 229, 240, 0.14) 0%, transparent 24%),
    radial-gradient(circle at 52% 100%, rgba(233, 241, 247, 0.18) 0%, transparent 38%),
    linear-gradient(135deg, #fcfdff 0%, #f4f8fb 36%, #f7fafd 70%, #ffffff 100%);
}

.topbar,
.page-tabs,
.panel,
.calendar-day,
.calendar-day-head,
.calendar-lesson,
.week-overview-day,
.week-overview-day-link,
.week-overview-lesson,
.billing-students-column,
.billing-form-card,
.billing-invoices-card,
.billing-student-card,
.billing-invoice-card,
.lesson-modal-card,
.lesson-modal-row,
.checklist,
.knowledge-folders-column,
.knowledge-content-column,
.knowledge-folder-item,
.knowledge-resource-card,
.day-empty,
.export-modal-card,
.knowledge-access-panel,
.billing-config-notice,
.role-badge,
.type-badge,
.billing-balance-badge,
.billing-status-badge {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0.46) 18%, rgba(226, 237, 246, 0.48) 56%, rgba(255, 255, 255, 0.66) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.06)),
    var(--mono-glass-fill);
  border-color: var(--mono-glass-border);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    var(--mono-glass-shadow);
  backdrop-filter: blur(12px) saturate(128%);
  -webkit-backdrop-filter: blur(12px) saturate(128%);
}

.btn-secondary,
.btn-link,
.action-btn,
.knowledge-folder-toggle,
.lesson-modal-close,
input,
textarea,
select {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82) 0%, rgba(250, 252, 255, 0.64) 48%, rgba(232, 240, 246, 0.54) 100%),
    rgba(255, 255, 255, 0.62);
  border-color: rgba(193, 209, 221, 0.74);
  color: var(--mono-glass-text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.68),
    0 12px 24px rgba(25, 57, 81, 0.06);
}

.btn-primary,
.page-tab.active {
  background:
    linear-gradient(145deg, rgba(178, 205, 224, 0.98) 0%, rgba(150, 185, 211, 0.96) 54%, rgba(133, 172, 202, 0.94) 100%);
  border-color: rgba(143, 177, 201, 0.84);
  color: #f8fbff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 16px 34px rgba(70, 112, 143, 0.22);
}

.btn-primary:hover,
.page-tab.active:hover {
  background:
    linear-gradient(145deg, rgba(169, 198, 219, 1) 0%, rgba(142, 178, 205, 0.98) 54%, rgba(125, 164, 194, 0.96) 100%);
  border-color: rgba(134, 168, 192, 0.9);
}

.calendar-day.current-day,
.week-overview-day.selected,
.knowledge-folder-item.selected,
.billing-student-card.selected {
  border-color: var(--mono-glass-border-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    0 18px 40px rgba(90, 130, 161, 0.18);
}

.calendar-lesson.regular,
.calendar-lesson.trial {
  border-left-color: var(--mono-glass-accent-strong);
  border-color: rgba(190, 210, 223, 0.84);
  background:
    linear-gradient(145deg, rgba(233, 242, 248, 0.84) 0%, rgba(246, 250, 253, 0.78) 54%, rgba(255, 255, 255, 0.64) 100%),
    rgba(255, 255, 255, 0.62);
}

.calendar-lesson:hover,
.week-overview-day:hover:not(.selected),
.week-overview-lesson:hover,
.week-overview-day-link:hover,
.knowledge-folder-item:hover,
.knowledge-resource-card:hover,
.billing-student-card:hover,
.billing-invoice-card:hover {
  border-color: rgba(167, 192, 210, 0.86);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    var(--mono-glass-shadow-hover);
}

.section-title-row h3,
.topbar-brand h2,
.lesson-modal-card h3,
.export-modal-card h3,
.billing-form-card h4,
.billing-invoices-card h4,
.billing-students-column h4,
.knowledge-folders-column h4,
.knowledge-content-column h4 {
  color: var(--mono-glass-text);
}

.calendar-weekday,
.calendar-lesson-time,
.calendar-range,
.billing-student-email,
.billing-student-meta,
.billing-invoice-student,
.billing-invoice-label,
.billing-status-badge,
.role-badge,
.type-badge {
  color: var(--mono-glass-muted);
}

/* --- Matte glass refinement --- */
:root {
  --mono-glass-fill: rgba(244, 247, 250, 0.78);
  --mono-glass-fill-strong: rgba(248, 250, 252, 0.86);
  --mono-glass-border: rgba(205, 214, 221, 0.78);
  --mono-glass-border-strong: rgba(194, 206, 214, 0.84);
  --mono-glass-shadow: 0 12px 28px rgba(20, 36, 52, 0.08);
  --mono-glass-shadow-hover: 0 16px 34px rgba(20, 36, 52, 0.1);
  --mono-glass-text: #304754;
  --mono-glass-muted: #687f8b;
  --mono-glass-accent: #b9cad7;
  --mono-glass-accent-strong: #aebfcd;
}

body {
  background:
    radial-gradient(circle at 14% 10%, rgba(197, 212, 221, 0.08) 0%, transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(225, 233, 238, 0.1) 0%, transparent 24%),
    radial-gradient(circle at 52% 100%, rgba(239, 243, 246, 0.14) 0%, transparent 38%),
    linear-gradient(135deg, #fdfefe 0%, #f6f8fa 38%, #fafbfc 72%, #ffffff 100%);
}

.topbar,
.page-tabs,
.panel,
.calendar-day,
.calendar-day-head,
.calendar-lesson,
.week-overview-day,
.week-overview-day-link,
.week-overview-lesson,
.billing-students-column,
.billing-form-card,
.billing-invoices-card,
.billing-student-card,
.billing-invoice-card,
.lesson-modal-card,
.lesson-modal-row,
.checklist,
.knowledge-folders-column,
.knowledge-content-column,
.knowledge-folder-item,
.knowledge-resource-card,
.day-empty,
.export-modal-card,
.knowledge-access-panel,
.billing-config-notice,
.role-badge,
.type-badge,
.billing-balance-badge,
.billing-status-badge {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.74) 18%, rgba(246, 248, 250, 0.72) 56%, rgba(255, 255, 255, 0.82) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)),
    var(--mono-glass-fill);
  border-color: var(--mono-glass-border);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    var(--mono-glass-shadow);
  backdrop-filter: blur(8px) saturate(108%);
  -webkit-backdrop-filter: blur(8px) saturate(108%);
}

.calendar-day::before,
.calendar-lesson::before {
  opacity: 0.42;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.3), transparent 36%, transparent 78%, rgba(255, 255, 255, 0.08)),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.16), transparent 36%);
}

.btn-secondary,
.btn-link,
.action-btn,
.knowledge-folder-toggle,
.lesson-modal-close,
input,
textarea,
select {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 251, 0.8) 52%, rgba(243, 246, 248, 0.72) 100%),
    rgba(255, 255, 255, 0.72);
  border-color: rgba(203, 212, 218, 0.8);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 8px 18px rgba(20, 36, 52, 0.05);
}

.btn-primary {
  background: linear-gradient(145deg, rgba(194, 207, 216, 0.98) 0%, rgba(180, 195, 206, 0.96) 100%);
  border-color: rgba(181, 196, 206, 0.84);
  color: #294552;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 12px 26px rgba(77, 97, 112, 0.12);
}

.btn-primary:hover {
  background: linear-gradient(145deg, rgba(187, 201, 211, 1) 0%, rgba(173, 189, 200, 0.98) 100%);
  border-color: rgba(172, 188, 198, 0.88);
}

.page-tab.active {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9) 0%, rgba(244, 247, 249, 0.8) 100%);
  border-color: rgba(199, 209, 216, 0.86);
  color: #304754;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 10px 22px rgba(20, 36, 52, 0.06);
}

.calendar-day.current-day,
.knowledge-folder-item.selected,
.billing-student-card.selected {
  border-color: var(--mono-glass-border-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 14px 30px rgba(20, 36, 52, 0.08);
}

.calendar-lesson.regular,
.calendar-lesson.trial {
  border-left-color: var(--mono-glass-accent-strong);
  border-color: rgba(201, 212, 219, 0.82);
  background:
    linear-gradient(145deg, rgba(248, 250, 251, 0.86) 0%, rgba(243, 247, 249, 0.78) 54%, rgba(255, 255, 255, 0.72) 100%),
    rgba(255, 255, 255, 0.72);
}

.calendar-lesson:hover,
.knowledge-folder-item:hover,
.knowledge-resource-card:hover,
.billing-student-card:hover,
.billing-invoice-card:hover {
  border-color: rgba(194, 206, 214, 0.84);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 12px 28px rgba(20, 36, 52, 0.08);
}

.week-overview {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(247, 249, 250, 0.58)),
    rgba(255, 255, 255, 0.54);
  border-color: rgba(206, 214, 220, 0.72);
  box-shadow: 0 10px 24px rgba(20, 36, 52, 0.05);
}

.week-overview-day,
.week-overview-day-link,
.week-overview-lesson {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(247, 249, 250, 0.68)),
    rgba(255, 255, 255, 0.62);
  border-color: rgba(205, 214, 220, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(6px) saturate(104%);
  -webkit-backdrop-filter: blur(6px) saturate(104%);
}

.week-overview-day.selected {
  border-color: rgba(196, 206, 213, 0.84);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 249, 250, 0.74)),
    rgba(255, 255, 255, 0.68);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 10px 22px rgba(20, 36, 52, 0.06);
}

.week-overview-day:hover:not(.selected),
.week-overview-day-link:hover,
.week-overview-lesson:hover {
  border-color: rgba(196, 206, 213, 0.84);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 10px 22px rgba(20, 36, 52, 0.05);
}

.week-overview-day-link strong,
.week-overview-time,
.week-overview-lesson-title {
  color: #425864;
}

/* --- Matte button cleanup --- */
.btn,
.btn-secondary,
.btn-link,
.action-btn,
.knowledge-folder-toggle,
.lesson-modal-close,
.page-tab {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 247, 249, 0.84)),
    rgba(255, 255, 255, 0.78);
  border-color: rgba(205, 214, 220, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 4px 12px rgba(20, 36, 52, 0.04);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.btn:hover,
.btn-secondary:hover,
.btn-link:hover,
.action-btn:hover,
.knowledge-folder-toggle:hover,
.lesson-modal-close:hover,
.page-tab:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 248, 250, 0.88)),
    rgba(255, 255, 255, 0.82);
  border-color: rgba(198, 208, 214, 0.86);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 5px 14px rgba(20, 36, 52, 0.05);
  transform: none;
}

.btn-primary,
.action-btn.action-btn-complete,
.action-btn.action-btn-complete.is-complete {
  background:
    linear-gradient(180deg, rgba(225, 232, 238, 0.98), rgba(208, 219, 227, 0.94)),
    rgba(220, 228, 234, 0.9);
  border-color: rgba(189, 201, 209, 0.88);
  color: #304754;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    0 6px 16px rgba(44, 63, 78, 0.06);
}

.btn-primary:hover,
.action-btn.action-btn-complete:hover,
.action-btn.action-btn-complete.is-complete:hover,
.page-tab.active:hover {
  background:
    linear-gradient(180deg, rgba(221, 229, 235, 1), rgba(205, 216, 224, 0.96)),
    rgba(216, 224, 230, 0.92);
  border-color: rgba(184, 196, 204, 0.9);
  color: #304754;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.66),
    0 7px 18px rgba(44, 63, 78, 0.07);
}

.page-tab.active {
  background:
    linear-gradient(180deg, rgba(248, 250, 251, 0.96), rgba(236, 241, 244, 0.9)),
    rgba(243, 246, 248, 0.88);
  border-color: rgba(196, 206, 212, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 5px 14px rgba(20, 36, 52, 0.05);
}

.action-btn.danger {
  background:
    linear-gradient(180deg, rgba(248, 243, 243, 0.96), rgba(240, 231, 231, 0.9)),
    rgba(244, 236, 236, 0.84);
  border-color: rgba(219, 198, 198, 0.88);
  color: #7d5555;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 5px 14px rgba(53, 32, 32, 0.05);
}

.action-btn.danger:hover {
  background:
    linear-gradient(180deg, rgba(249, 245, 245, 1), rgba(242, 234, 234, 0.94)),
    rgba(245, 238, 238, 0.88);
  border-color: rgba(214, 193, 193, 0.9);
  color: #764f4f;
}

/* --- Meaningful color lights --- */
:root {
  --tone-cool-bg: rgba(186, 210, 226, 0.16);
  --tone-cool-line: rgba(171, 196, 214, 0.78);
  --tone-cool-glow: rgba(153, 185, 208, 0.16);
  --tone-mint-bg: rgba(191, 214, 203, 0.15);
  --tone-mint-line: rgba(173, 199, 188, 0.76);
  --tone-mint-glow: rgba(160, 194, 179, 0.16);
  --tone-amber-bg: rgba(226, 208, 176, 0.16);
  --tone-amber-line: rgba(210, 190, 157, 0.78);
  --tone-amber-glow: rgba(210, 184, 136, 0.15);
  --tone-rose-bg: rgba(229, 200, 198, 0.16);
  --tone-rose-line: rgba(209, 181, 178, 0.76);
  --tone-rose-glow: rgba(196, 158, 155, 0.14);
}

.stat-card--cool,
.billing-student-card--cool,
.billing-teacher-weekly-item.billing-student-card--cool {
  background:
    radial-gradient(circle at top right, var(--tone-cool-bg), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.74) 18%, rgba(246, 248, 250, 0.72) 56%, rgba(255, 255, 255, 0.82) 100%),
    var(--mono-glass-fill);
  border-color: var(--tone-cool-line);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    0 12px 28px var(--tone-cool-glow);
}

.stat-card--mint,
.billing-student-card--mint,
.billing-teacher-weekly-item.billing-student-card--mint,
.billing-invoice-card.invoice-status-paid {
  background:
    radial-gradient(circle at top right, var(--tone-mint-bg), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.74) 18%, rgba(246, 248, 250, 0.72) 56%, rgba(255, 255, 255, 0.82) 100%),
    var(--mono-glass-fill);
  border-color: var(--tone-mint-line);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    0 12px 28px var(--tone-mint-glow);
}

.stat-card--amber,
.billing-invoice-card.invoice-status-pending {
  background:
    radial-gradient(circle at top right, var(--tone-amber-bg), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.74) 18%, rgba(246, 248, 250, 0.72) 56%, rgba(255, 255, 255, 0.82) 100%),
    var(--mono-glass-fill);
  border-color: var(--tone-amber-line);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    0 12px 28px var(--tone-amber-glow);
}

.stat-card--rose,
.billing-invoice-card.invoice-status-canceled {
  background:
    radial-gradient(circle at top right, var(--tone-rose-bg), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.74) 18%, rgba(246, 248, 250, 0.72) 56%, rgba(255, 255, 255, 0.82) 100%),
    var(--mono-glass-fill);
  border-color: var(--tone-rose-line);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    0 12px 28px var(--tone-rose-glow);
}

.stat-card--neutral {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.74) 18%, rgba(246, 248, 250, 0.72) 56%, rgba(255, 255, 255, 0.82) 100%),
    var(--mono-glass-fill);
}

.stat-card--cool p,
.billing-balance-badge--cool {
  color: #587588;
  background: none;
}

.stat-card--mint p,
.billing-balance-badge--mint,
.billing-status-badge.paid {
  color: #5d756d;
  background: none;
}

.stat-card--amber p,
.billing-status-badge.pending {
  color: #7b6a4e;
  background: none;
}

.stat-card--rose p,
.billing-status-badge.canceled {
  color: #7f5b5b;
  background: none;
}

.stat-card--neutral p {
  color: #4f6774;
  background: none;
}

.billing-balance-badge--cool,
.billing-status-badge.pending,
.billing-balance-badge--mint,
.billing-status-badge.paid,
.billing-status-badge.canceled {
  text-shadow: none;
}

.billing-balance-badge--cool {
  border-color: var(--tone-cool-line);
  background:
    linear-gradient(180deg, rgba(246, 250, 252, 0.94), rgba(233, 241, 247, 0.82)),
    rgba(255, 255, 255, 0.82);
  box-shadow: 0 6px 14px rgba(153, 185, 208, 0.1);
}

.billing-balance-badge--mint,
.billing-status-badge.paid {
  border-color: var(--tone-mint-line);
  background:
    linear-gradient(180deg, rgba(247, 250, 248, 0.94), rgba(236, 243, 239, 0.82)),
    rgba(255, 255, 255, 0.82);
  box-shadow: 0 6px 14px rgba(160, 194, 179, 0.1);
}

.billing-status-badge.pending {
  border-color: var(--tone-amber-line);
  background:
    linear-gradient(180deg, rgba(251, 248, 242, 0.94), rgba(245, 239, 227, 0.84)),
    rgba(255, 255, 255, 0.82);
  box-shadow: 0 6px 14px rgba(210, 184, 136, 0.1);
}

.billing-status-badge.canceled {
  border-color: var(--tone-rose-line);
  background:
    linear-gradient(180deg, rgba(250, 246, 246, 0.94), rgba(244, 235, 235, 0.84)),
    rgba(255, 255, 255, 0.82);
  box-shadow: 0 6px 14px rgba(196, 158, 155, 0.1);
}

.billing-student-card.selected.billing-student-card--cool,
.billing-student-card.selected.billing-student-card--mint {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 14px 30px rgba(20, 36, 52, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.26);
}

/* --- Selective glass accents --- */
:root {
  --glass-accent-start: rgba(165, 201, 216, 0.96);
  --glass-accent-end: rgba(201, 219, 168, 0.9);
  --glass-green-start: rgba(221, 241, 226, 0.98);
  --glass-green-end: rgba(195, 225, 203, 0.9);
  --glass-green-line: rgba(156, 191, 166, 0.84);
  --glass-green-text: #406453;
  --glass-red-start: rgba(247, 234, 234, 0.98);
  --glass-red-end: rgba(232, 204, 204, 0.9);
  --glass-red-line: rgba(207, 173, 173, 0.86);
  --glass-red-text: #835b5b;
}

.topbar,
.page-tabs,
.lesson-modal-card,
.export-modal-card,
.billing-balance-badge,
.billing-status-badge {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.58) 24%, rgba(245, 248, 250, 0.66) 100%),
    rgba(255, 255, 255, 0.64);
  border-color: rgba(203, 214, 220, 0.8);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 10px 24px rgba(26, 44, 58, 0.06);
  backdrop-filter: blur(10px) saturate(114%);
  -webkit-backdrop-filter: blur(10px) saturate(114%);
}

.topbar::after,
.lesson-modal-card::after,
.export-modal-card::after {
  opacity: 0.46;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.56), transparent 34%),
    linear-gradient(120deg, transparent 26%, rgba(255, 255, 255, 0.14) 48%, transparent 72%);
}

.btn-primary,
.action-btn[data-action="pay-invoice-ac"],
.action-btn[data-action="pay-invoice-pc"] {
  background:
    linear-gradient(135deg, var(--glass-accent-start) 0%, rgba(181, 211, 198, 0.94) 52%, var(--glass-accent-end) 100%);
  border-color: rgba(168, 196, 180, 0.88);
  color: #284754;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.46),
    0 8px 20px rgba(118, 154, 136, 0.12);
}

.btn-primary:hover,
.action-btn[data-action="pay-invoice-ac"]:hover,
.action-btn[data-action="pay-invoice-pc"]:hover {
  background:
    linear-gradient(135deg, rgba(157, 194, 210, 1) 0%, rgba(173, 204, 191, 0.98) 52%, rgba(194, 214, 155, 0.96) 100%);
  border-color: rgba(160, 189, 172, 0.9);
  color: #24424f;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 10px 22px rgba(118, 154, 136, 0.14);
}

.action-btn.action-btn-complete {
  background:
    linear-gradient(180deg, var(--glass-green-start), var(--glass-green-end)),
    rgba(219, 237, 224, 0.84);
  border-color: var(--glass-green-line);
  color: var(--glass-green-text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    0 8px 18px rgba(124, 166, 139, 0.12);
}

.action-btn.action-btn-complete:hover {
  background:
    linear-gradient(180deg, rgba(214, 237, 220, 1), rgba(189, 220, 198, 0.94)),
    rgba(212, 232, 218, 0.88);
  border-color: rgba(149, 184, 159, 0.9);
  color: #395c4a;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    0 9px 20px rgba(124, 166, 139, 0.14);
}

.action-btn.action-btn-complete.is-complete {
  background:
    linear-gradient(180deg, var(--glass-red-start), var(--glass-red-end)),
    rgba(240, 221, 221, 0.84);
  border-color: var(--glass-red-line);
  color: var(--glass-red-text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.56),
    0 8px 18px rgba(170, 128, 128, 0.12);
}

.action-btn.action-btn-complete.is-complete:hover {
  background:
    linear-gradient(180deg, rgba(246, 230, 230, 1), rgba(229, 199, 199, 0.94)),
    rgba(239, 218, 218, 0.88);
  border-color: rgba(201, 166, 166, 0.9);
  color: #7a5454;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 9px 20px rgba(170, 128, 128, 0.14);
}

/* --- Glassy tabs and brighter button accents --- */
:root {
  --interactive-accent-aqua: rgba(170, 204, 222, 0.96);
  --interactive-accent-lime: rgba(207, 223, 164, 0.9);
  --interactive-accent-line: rgba(173, 198, 184, 0.88);
  --interactive-accent-glow: rgba(141, 179, 160, 0.14);
}

.page-tab {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(245, 248, 250, 0.84)),
    rgba(255, 255, 255, 0.8);
  border-color: rgba(205, 214, 220, 0.82);
  color: #35505e;
}

.page-tab:hover {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.84) 0%, rgba(238, 246, 248, 0.74) 52%, rgba(244, 248, 236, 0.7) 100%),
    rgba(255, 255, 255, 0.78);
  border-color: rgba(191, 207, 199, 0.84);
  color: #2f4b57;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 7px 16px rgba(20, 36, 52, 0.05),
    0 0 0 1px rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(10px) saturate(118%);
  -webkit-backdrop-filter: blur(10px) saturate(118%);
}

.page-tab.active,
.page-tab.active:hover {
  background:
    linear-gradient(135deg, rgba(202, 220, 229, 0.94) 0%, rgba(191, 214, 210, 0.92) 52%, rgba(214, 224, 184, 0.88) 100%);
  border-color: rgba(181, 199, 190, 0.86);
  color: #2b4753;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.52),
    0 8px 18px rgba(118, 154, 136, 0.1);
}

.btn-secondary,
.btn-link,
.action-btn:not(.action-btn-complete):not(.danger),
.knowledge-folder-toggle {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(241, 247, 248, 0.88)),
    rgba(255, 255, 255, 0.82);
  border-color: rgba(199, 210, 216, 0.84);
  color: #34505d;
}

.btn-secondary:hover,
.btn-link:hover,
.action-btn:not(.action-btn-complete):not(.danger):hover,
.knowledge-folder-toggle:hover {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88) 0%, rgba(230, 243, 248, 0.84) 56%, rgba(240, 248, 226, 0.8) 100%),
    rgba(255, 255, 255, 0.82);
  border-color: var(--interactive-accent-line);
  color: #274652;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 18px var(--interactive-accent-glow);
}

.btn-primary,
.action-btn[data-action="pay-invoice-ac"],
.action-btn[data-action="pay-invoice-pc"],
.action-btn[data-action="sync-invoice"] {
  background:
    linear-gradient(135deg, var(--interactive-accent-aqua) 0%, rgba(184, 214, 200, 0.95) 48%, var(--interactive-accent-lime) 100%);
  border-color: var(--interactive-accent-line);
  color: #25434f;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    0 10px 22px var(--interactive-accent-glow);
}

.btn-primary:hover,
.action-btn[data-action="pay-invoice-ac"]:hover,
.action-btn[data-action="pay-invoice-pc"]:hover,
.action-btn[data-action="sync-invoice"]:hover {
  background:
    linear-gradient(135deg, rgba(159, 197, 214, 1) 0%, rgba(176, 209, 196, 0.98) 48%, rgba(200, 221, 155, 0.96) 100%);
  border-color: rgba(165, 191, 177, 0.92);
  color: #22414d;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.54),
    0 12px 24px rgba(118, 154, 136, 0.16);
}

/* --- Week overview soft tints --- */
.week-overview-day {
  background:
    radial-gradient(circle at top right, rgba(196, 216, 230, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(241, 247, 251, 0.74)),
    rgba(255, 255, 255, 0.64);
  border-color: rgba(196, 211, 221, 0.82);
}

.week-overview-day.selected {
  background:
    radial-gradient(circle at top right, rgba(188, 212, 228, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(238, 246, 251, 0.78)),
    rgba(255, 255, 255, 0.7);
  border-color: rgba(188, 206, 219, 0.88);
}

.week-overview-day-link {
  background:
    linear-gradient(180deg, rgba(241, 248, 252, 0.92), rgba(233, 243, 249, 0.78)),
    rgba(255, 255, 255, 0.72);
  border-color: rgba(194, 210, 221, 0.84);
}

.week-overview-lesson {
  background:
    linear-gradient(180deg, rgba(244, 249, 252, 0.94), rgba(235, 244, 249, 0.8)),
    rgba(255, 255, 255, 0.76);
  border-color: rgba(198, 212, 221, 0.82);
}

/* --- Glowing tabs and glass sheen --- */
@keyframes glassSheenSweep {
  0% {
    transform: translateX(-150%) rotate(16deg);
    opacity: 0;
  }
  18% {
    opacity: 0.28;
  }
  38% {
    opacity: 0.42;
  }
  62% {
    transform: translateX(210%) rotate(16deg);
    opacity: 0;
  }
  100% {
    transform: translateX(210%) rotate(16deg);
    opacity: 0;
  }
}

.page-tab {
  position: relative;
  overflow: hidden;
}

.page-tab:hover {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88) 0%, rgba(236, 246, 249, 0.82) 56%, rgba(243, 248, 233, 0.78) 100%),
    rgba(255, 255, 255, 0.8);
  border-color: rgba(188, 205, 198, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 8px 18px rgba(20, 36, 52, 0.05),
    0 0 18px rgba(189, 213, 226, 0.2),
    0 0 28px rgba(205, 221, 176, 0.14);
}

.page-tab.active {
  background:
    linear-gradient(135deg, rgba(242, 248, 251, 0.94) 0%, rgba(233, 243, 247, 0.9) 56%, rgba(241, 246, 234, 0.86) 100%),
    rgba(255, 255, 255, 0.84);
  border-color: rgba(191, 205, 205, 0.9);
  color: #2b4753;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 6px 14px rgba(20, 36, 52, 0.05);
}

.page-tab.active:hover {
  background:
    linear-gradient(135deg, rgba(240, 247, 250, 0.96) 0%, rgba(231, 243, 247, 0.92) 56%, rgba(239, 246, 231, 0.88) 100%),
    rgba(255, 255, 255, 0.86);
  border-color: rgba(186, 203, 196, 0.9);
  color: #284754;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 18px rgba(20, 36, 52, 0.05),
    0 0 18px rgba(189, 213, 226, 0.18),
    0 0 28px rgba(205, 221, 176, 0.12);
}

.btn-primary,
.action-btn[data-action="pay-invoice-ac"],
.action-btn[data-action="pay-invoice-pc"],
.action-btn[data-action="sync-invoice"],
.calendar-lesson {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.btn-primary::after,
.action-btn[data-action="pay-invoice-ac"]::after,
.action-btn[data-action="pay-invoice-pc"]::after,
.action-btn[data-action="sync-invoice"]::after,
.calendar-lesson::after {
  content: "";
  position: absolute;
  inset: -48% auto auto -34%;
  width: 54%;
  height: 210%;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  background: linear-gradient(
    112deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.46) 38%,
    rgba(255, 255, 255, 0.12) 58%,
    rgba(255, 255, 255, 0) 100%
  );
  mix-blend-mode: screen;
  animation: glassSheenSweep 6.6s ease-in-out infinite;
}

.btn-primary:hover::after,
.action-btn[data-action="pay-invoice-ac"]:hover::after,
.action-btn[data-action="pay-invoice-pc"]:hover::after,
.action-btn[data-action="sync-invoice"]:hover::after,
.calendar-lesson:hover::after {
  animation-duration: 4.4s;
}

/* --- Neutral glass buttons, keep page tabs accented --- */
:root {
  --button-glass-fill:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.66) 28%, rgba(244, 247, 250, 0.76) 100%),
    rgba(255, 255, 255, 0.76);
  --button-glass-fill-hover:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.76) 28%, rgba(245, 249, 251, 0.82) 100%),
    rgba(255, 255, 255, 0.82);
  --button-glass-line: rgba(203, 214, 220, 0.84);
  --button-glass-line-hover: rgba(192, 206, 214, 0.9);
  --button-glass-text: #304754;
  --button-glass-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 20px rgba(26, 44, 58, 0.06);
  --button-glass-shadow-hover:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 12px 24px rgba(26, 44, 58, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.2);
}

.btn-primary,
.btn-secondary:not(.page-tab),
.btn-link,
.action-btn,
.action-btn.action-btn-complete,
.action-btn.action-btn-complete.is-complete,
.action-btn.danger,
.action-btn[data-action="pay-invoice-ac"],
.action-btn[data-action="pay-invoice-pc"],
.action-btn[data-action="sync-invoice"],
.knowledge-folder-toggle,
.lesson-modal-close {
  background: var(--button-glass-fill);
  border-color: var(--button-glass-line);
  color: var(--button-glass-text);
  box-shadow: var(--button-glass-shadow);
  backdrop-filter: blur(10px) saturate(116%);
  -webkit-backdrop-filter: blur(10px) saturate(116%);
}

.btn-primary:hover,
.btn-secondary:not(.page-tab):hover,
.btn-link:hover,
.action-btn:hover,
.action-btn.action-btn-complete:hover,
.action-btn.action-btn-complete.is-complete:hover,
.action-btn.danger:hover,
.action-btn[data-action="pay-invoice-ac"]:hover,
.action-btn[data-action="pay-invoice-pc"]:hover,
.action-btn[data-action="sync-invoice"]:hover,
.knowledge-folder-toggle:hover,
.lesson-modal-close:hover {
  background: var(--button-glass-fill-hover);
  border-color: var(--button-glass-line-hover);
  color: #29414d;
  box-shadow: var(--button-glass-shadow-hover);
  transform: translateY(-1px);
}

.btn-primary,
.btn-secondary:not(.page-tab),
.btn-link,
.action-btn,
.knowledge-folder-toggle,
.lesson-modal-close {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.btn-primary::after,
.btn-secondary:not(.page-tab)::after,
.btn-link::after,
.action-btn::after,
.action-btn.action-btn-complete::after,
.action-btn.action-btn-complete.is-complete::after,
.action-btn.danger::after,
.action-btn[data-action="pay-invoice-ac"]::after,
.action-btn[data-action="pay-invoice-pc"]::after,
.action-btn[data-action="sync-invoice"]::after,
.knowledge-folder-toggle::after,
.lesson-modal-close::after {
  content: "";
  position: absolute;
  inset: -48% auto auto -34%;
  width: 54%;
  height: 210%;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  background: linear-gradient(
    112deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.52) 38%,
    rgba(255, 255, 255, 0.16) 58%,
    rgba(255, 255, 255, 0) 100%
  );
  mix-blend-mode: screen;
}

.btn-primary:hover::after,
.btn-secondary:not(.page-tab):hover::after,
.btn-link:hover::after,
.action-btn:hover::after,
.action-btn.action-btn-complete:hover::after,
.action-btn.action-btn-complete.is-complete:hover::after,
.action-btn.danger:hover::after,
.action-btn[data-action="pay-invoice-ac"]:hover::after,
.action-btn[data-action="pay-invoice-pc"]:hover::after,
.action-btn[data-action="sync-invoice"]:hover::after,
.knowledge-folder-toggle:hover::after,
.lesson-modal-close:hover::after {
  opacity: 1;
  animation: glassSheenSweep 1.35s ease-out 1;
}

/* --- Accent CTA buttons and status actions --- */
#saveLessonBtn,
#exportSubmitBtn,
#billingCreateInvoiceBtn {
  background:
    linear-gradient(135deg, rgba(242, 248, 251, 0.94) 0%, rgba(233, 243, 247, 0.9) 56%, rgba(241, 246, 234, 0.86) 100%),
    rgba(255, 255, 255, 0.84);
  border-color: rgba(191, 205, 205, 0.9);
  color: #2b4753;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 6px 14px rgba(20, 36, 52, 0.05);
}

#saveLessonBtn:hover,
#exportSubmitBtn:hover,
#billingCreateInvoiceBtn:hover {
  background:
    linear-gradient(135deg, rgba(240, 247, 250, 0.96) 0%, rgba(231, 243, 247, 0.92) 56%, rgba(239, 246, 231, 0.88) 100%),
    rgba(255, 255, 255, 0.86);
  border-color: rgba(186, 203, 196, 0.9);
  color: #284754;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 18px rgba(20, 36, 52, 0.05),
    0 0 18px rgba(189, 213, 226, 0.18),
    0 0 28px rgba(205, 221, 176, 0.12);
}

.action-btn.action-btn-complete:not(.is-complete) {
  background:
    linear-gradient(180deg, rgba(229, 244, 233, 0.98), rgba(206, 230, 214, 0.92)),
    rgba(222, 239, 227, 0.88);
  border-color: rgba(155, 190, 166, 0.9);
  color: #355846;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    0 8px 18px rgba(124, 166, 139, 0.14);
}

.action-btn.action-btn-complete:not(.is-complete):hover {
  background:
    linear-gradient(180deg, rgba(220, 240, 225, 1), rgba(193, 223, 202, 0.96)),
    rgba(214, 235, 220, 0.92);
  border-color: rgba(144, 180, 155, 0.92);
  color: #315341;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.66),
    0 10px 20px rgba(124, 166, 139, 0.16);
}

.knowledge-danger-btn,
.action-btn.danger,
.action-btn.action-btn-complete.is-complete {
  background:
    linear-gradient(180deg, rgba(248, 233, 233, 0.98), rgba(232, 205, 205, 0.92)),
    rgba(241, 221, 221, 0.88);
  border-color: rgba(205, 167, 167, 0.9);
  color: #7a5454;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 8px 18px rgba(170, 128, 128, 0.14);
}

.knowledge-danger-btn:hover,
.action-btn.danger:hover,
.action-btn.action-btn-complete.is-complete:hover {
  background:
    linear-gradient(180deg, rgba(247, 228, 228, 1), rgba(228, 195, 195, 0.96)),
    rgba(239, 216, 216, 0.92);
  border-color: rgba(196, 157, 157, 0.92);
  color: #744f4f;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.64),
    0 10px 20px rgba(170, 128, 128, 0.16);
}

/* --- Modal close icon fix --- */
.lesson-modal-close {
  top: 2px;
  right: 2px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  font-size: 0;
  line-height: 0;
}

.lesson-modal-close::before,
.lesson-modal-close::after,
.lesson-modal-close:hover::after {
  content: none;
  animation: none;
  opacity: 0;
}

.lesson-modal-close-icon {
  position: relative;
  display: block;
  width: 15px;
  height: 15px;
  transform: none;
  z-index: 1;
}

.lesson-modal-close-icon::before,
.lesson-modal-close-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 15px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.lesson-modal-close-icon::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.lesson-modal-close-icon::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.lesson-modal-close:hover {
  transform: none;
}

/* --- Clean glass morphism polish --- */
:root {
  --glass-shell:
    linear-gradient(155deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.42) 34%, rgba(230, 240, 246, 0.4) 100%),
    rgba(255, 255, 255, 0.28);
  --glass-shell-soft:
    linear-gradient(155deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.34) 34%, rgba(235, 243, 248, 0.3) 100%),
    rgba(255, 255, 255, 0.24);
  --glass-stroke: rgba(198, 212, 222, 0.74);
  --glass-stroke-strong: rgba(183, 199, 210, 0.9);
  --glass-shadow-lg: 0 22px 52px rgba(23, 45, 64, 0.11);
  --glass-shadow-md: 0 16px 34px rgba(23, 45, 64, 0.09);
  --glass-shadow-sm: 0 10px 22px rgba(23, 45, 64, 0.07);
  --glass-shadow-hover: 0 26px 56px rgba(23, 45, 64, 0.13);
  --glass-highlight:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.66), transparent 36%),
    linear-gradient(120deg, transparent 22%, rgba(255, 255, 255, 0.18) 48%, transparent 74%);
}

body {
  background: #ffffff;
  background-attachment: fixed;
}

.bg-shape {
  display: none;
  position: fixed;
  width: clamp(240px, 30vw, 420px);
  height: clamp(240px, 30vw, 420px);
  border-radius: 50%;
  filter: blur(18px);
  opacity: 0.7;
  pointer-events: none;
  z-index: 0;
}

.bg-shape-left {
  top: -90px;
  left: -110px;
  background:
    radial-gradient(circle at 35% 35%, rgba(183, 215, 232, 0.8) 0%, rgba(183, 215, 232, 0.44) 38%, transparent 72%);
}

.bg-shape-right {
  right: -120px;
  bottom: -110px;
  background:
    radial-gradient(circle at 50% 40%, rgba(214, 227, 188, 0.72) 0%, rgba(214, 227, 188, 0.36) 40%, transparent 74%);
}

.layout {
  position: relative;
  z-index: 1;
  width: min(1280px, 92vw);
  margin: 32px auto 48px;
}

.page-view,
.content-grid,
.knowledge-panel,
.billing-panel,
.billing-layout,
.billing-student-layout,
.knowledge-grid {
  gap: 18px;
}

:where(
  .topbar,
  .page-tabs,
  .panel,
  .stat-card,
  .calendar-day,
  .calendar-day-head,
  .calendar-lesson,
  .week-overview,
  .week-overview-day,
  .week-overview-day-link,
  .week-overview-lesson,
  .billing-students-column,
  .billing-form-card,
  .billing-invoices-card,
  .billing-student-card,
  .billing-invoice-card,
  .knowledge-folders-column,
  .knowledge-content-column,
  .knowledge-folder-item,
  .knowledge-resource-card,
  .knowledge-access-panel,
  .checklist,
  .lesson-modal-card,
  .export-modal-card,
  .lesson-modal-row,
  .day-empty,
  .role-badge,
  .billing-config-notice
) {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--glass-shell);
  border-color: var(--glass-stroke);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    var(--glass-shadow-md);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
}

:where(
  .topbar,
  .page-tabs,
  .panel,
  .stat-card,
  .calendar-day,
  .calendar-day-head,
  .calendar-lesson,
  .week-overview,
  .week-overview-day,
  .week-overview-day-link,
  .week-overview-lesson,
  .billing-students-column,
  .billing-form-card,
  .billing-invoices-card,
  .billing-student-card,
  .billing-invoice-card,
  .knowledge-folders-column,
  .knowledge-content-column,
  .knowledge-folder-item,
  .knowledge-resource-card,
  .knowledge-access-panel,
  .checklist,
  .lesson-modal-card,
  .export-modal-card,
  .lesson-modal-row,
  .day-empty,
  .role-badge,
  .billing-config-notice
)::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--glass-highlight);
  opacity: 0.9;
  pointer-events: none;
  z-index: 0;
}

:where(
  .topbar,
  .page-tabs,
  .panel,
  .stat-card,
  .calendar-day,
  .calendar-day-head,
  .calendar-lesson,
  .week-overview,
  .week-overview-day,
  .week-overview-day-link,
  .week-overview-lesson,
  .billing-students-column,
  .billing-form-card,
  .billing-invoices-card,
  .billing-student-card,
  .billing-invoice-card,
  .knowledge-folders-column,
  .knowledge-content-column,
  .knowledge-folder-item,
  .knowledge-resource-card,
  .knowledge-access-panel,
  .checklist,
  .lesson-modal-card,
  .export-modal-card,
  .lesson-modal-row,
  .day-empty,
  .role-badge,
  .billing-config-notice
) > * {
  position: relative;
  z-index: 1;
}

.topbar,
.page-tabs,
.lesson-modal-card,
.export-modal-card {
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0.48) 36%, rgba(232, 241, 247, 0.42) 100%),
    rgba(255, 255, 255, 0.3);
  border-color: var(--glass-stroke-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    var(--glass-shadow-lg);
}

.panel,
.knowledge-folders-column,
.knowledge-content-column,
.billing-students-column,
.billing-form-card,
.billing-invoices-card,
.knowledge-access-panel,
.checklist {
  background: var(--glass-shell-soft);
}

.topbar {
  padding: 24px 26px;
}

.page-tabs {
  padding: 8px;
  gap: 10px;
}

.stats-grid .stat-card,
.calendar-day,
.calendar-lesson,
.knowledge-folder-item,
.knowledge-resource-card,
.billing-student-card,
.billing-invoice-card,
.week-overview-day,
.week-overview-day-link,
.week-overview-lesson,
.day-empty {
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    background 0.22s ease;
}

.calendar-lesson:hover,
.knowledge-folder-item:hover,
.knowledge-resource-card:hover,
.billing-student-card:hover,
.billing-invoice-card:hover,
.stats-grid .stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--glass-stroke-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    var(--glass-shadow-hover);
}

.calendar-day.current-day,
.week-overview-day.selected,
.knowledge-folder-item.selected,
.billing-student-card.selected {
  border-color: var(--glass-stroke-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 20px 42px rgba(87, 118, 142, 0.16);
}

.calendar-lesson.regular,
.calendar-lesson.trial {
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.78) 0%, rgba(244, 249, 252, 0.6) 48%, rgba(229, 239, 246, 0.36) 100%),
    rgba(255, 255, 255, 0.22);
}

.week-overview {
  padding: 18px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.74) 0%, rgba(255, 255, 255, 0.34) 36%, rgba(233, 241, 246, 0.26) 100%),
    rgba(255, 255, 255, 0.24);
}

.week-overview-day:hover:not(.selected),
.week-overview-day-link:hover,
.week-overview-lesson:hover {
  transform: none;
  border-color: var(--glass-stroke-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    var(--glass-shadow-hover);
}

:where(
  .btn-secondary:not(.page-tab),
  .btn-link,
  .knowledge-folder-toggle,
  .lesson-modal-close,
  .action-btn:not(.danger):not(.action-btn-complete):not([data-action="pay-invoice-ac"]):not([data-action="pay-invoice-pc"]):not([data-action="sync-invoice"])
) {
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.74) 0%, rgba(255, 255, 255, 0.42) 42%, rgba(235, 243, 248, 0.32) 100%),
    rgba(255, 255, 255, 0.24);
  border-color: var(--glass-stroke);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    0 12px 24px rgba(23, 45, 64, 0.07);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

:where(
  .btn-secondary:not(.page-tab),
  .btn-link,
  .knowledge-folder-toggle,
  .lesson-modal-close,
  .action-btn:not(.danger):not(.action-btn-complete):not([data-action="pay-invoice-ac"]):not([data-action="pay-invoice-pc"]):not([data-action="sync-invoice"])
):hover {
  border-color: var(--glass-stroke-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 16px 28px rgba(23, 45, 64, 0.09);
}

.page-tab {
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.38) 42%, rgba(236, 244, 248, 0.32) 100%),
    rgba(255, 255, 255, 0.22);
  border-color: var(--glass-stroke);
  color: #31505f;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 12px 24px rgba(23, 45, 64, 0.08);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.page-tab:hover {
  border-color: var(--glass-stroke-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 16px 28px rgba(23, 45, 64, 0.1);
}

.page-tab.active,
.page-tab.active:hover,
.btn-primary,
#saveLessonBtn,
#exportSubmitBtn,
#billingCreateInvoiceBtn,
.action-btn.action-btn-complete:not(.is-complete),
.action-btn.action-btn-complete.is-complete,
.action-btn.danger,
.knowledge-danger-btn,
.action-btn[data-action="pay-invoice-ac"],
.action-btn[data-action="pay-invoice-pc"],
.action-btn[data-action="sync-invoice"] {
  backdrop-filter: blur(20px) saturate(165%);
  -webkit-backdrop-filter: blur(20px) saturate(165%);
}

input,
textarea,
select {
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0.56) 44%, rgba(234, 242, 247, 0.32) 100%),
    rgba(255, 255, 255, 0.24);
  border-color: rgba(195, 210, 220, 0.78);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 10px 24px rgba(23, 45, 64, 0.05);
  backdrop-filter: blur(14px) saturate(145%);
  -webkit-backdrop-filter: blur(14px) saturate(145%);
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(140, 174, 197, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 0 0 4px rgba(165, 198, 219, 0.2),
    0 16px 30px rgba(23, 45, 64, 0.08);
}

.role-badge,
.type-badge {
  backdrop-filter: blur(16px) saturate(145%);
  -webkit-backdrop-filter: blur(16px) saturate(145%);
}

.lesson-modal-backdrop {
  background: rgba(229, 237, 243, 0.28);
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
}

.lesson-modal-card,
.export-modal-card {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    0 34px 80px rgba(18, 38, 55, 0.16);
}

#loginForm .btn-primary {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  margin-top: 8px;
  background:
    linear-gradient(135deg, rgba(133, 181, 219, 0.98) 0%, rgba(123, 198, 210, 0.96) 52%, rgba(184, 220, 152, 0.94) 100%);
  background-size: 180% 180%;
  background-position: 0% 50%;
  border-color: rgba(132, 181, 174, 0.9);
  color: #f9fcff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    0 16px 30px rgba(91, 145, 157, 0.2);
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.3s ease,
    border-color 0.22s ease,
    background-position 0.5s ease,
    filter 0.28s ease;
}

#loginForm .btn-primary > span {
  position: relative;
  z-index: 2;
}

#loginForm .btn-primary::before {
  content: "";
  position: absolute;
  inset: -34% 52% -34% -12%;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0.18) 35%, transparent 70%);
  opacity: 0.62;
  transform: translate3d(-8%, 0, 0) scale(0.92);
  transition: transform 0.34s ease, opacity 0.26s ease;
  pointer-events: none;
}

#loginForm .btn-primary::after {
  content: "";
  position: absolute;
  top: -18%;
  bottom: -18%;
  left: -30%;
  width: 38%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 18%,
    rgba(255, 255, 255, 0.46) 50%,
    rgba(255, 255, 255, 0.08) 82%,
    transparent 100%
  );
  transform: skewX(-20deg) translateX(-135%);
  opacity: 0;
  transition: transform 0.56s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.24s ease;
  pointer-events: none;
}

#loginForm .btn-primary:hover {
  background:
    linear-gradient(135deg, rgba(123, 171, 210, 1) 0%, rgba(112, 190, 202, 0.98) 52%, rgba(174, 211, 141, 0.96) 100%);
  background-position: 100% 50%;
  border-color: rgba(124, 173, 166, 0.94);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 22px 38px rgba(91, 145, 157, 0.26);
  filter: saturate(1.06);
  transform: translateY(-3px) scale(1.015);
}

#loginForm .btn-primary:hover::before {
  opacity: 0.78;
  transform: translate3d(8%, -2%, 0) scale(1.08);
}

#loginForm .btn-primary:hover::after {
  opacity: 1;
  transform: skewX(-20deg) translateX(300%);
}

#loginForm .btn-primary:active {
  transform: translateY(-1px) scale(0.995);
}

/* --- Tighter spacing for knowledge and billing pages --- */
#knowledgePage .knowledge-panel,
#billingPage .billing-panel {
  padding: 14px;
  gap: 12px;
}

#knowledgePage .knowledge-grid,
#billingPage .billing-layout,
#billingPage .billing-student-layout,
#billingPage .billing-main-column {
  gap: 12px;
}

#billingPage .billing-summary-grid {
  gap: 12px;
}

#knowledgePage .knowledge-folder-details,
#knowledgePage .knowledge-resources-list,
#billingPage .billing-students-list,
#billingPage .billing-invoices-list {
  gap: 8px;
}

#knowledgePage .section-title-row,
#billingPage .section-title-row {
  margin-bottom: 8px;
}

/* --- Super admin account management --- */
#usersPage .users-panel {
  padding: 16px;
  gap: 14px;
}

.users-grid {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.users-create-card,
.users-directory-card,
.users-role-card,
.account-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--glass-stroke);
  border-radius: 24px;
  background: var(--glass-shell-soft);
  box-shadow: var(--glass-shadow-md);
}

.users-create-card,
.users-directory-card,
.users-role-card {
  padding: 20px;
}

.users-password-note {
  margin: -6px 0 4px;
}

.users-password-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.users-password-preview {
  margin: -4px 0 2px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.48);
  border: 1px dashed rgba(138, 159, 176, 0.42);
  word-break: break-all;
}

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

.users-role-list {
  display: grid;
  gap: 10px;
}

.access-vault-list {
  gap: 12px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 2px;
}

.account-card {
  padding: 16px 18px;
}

.account-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.account-card-name {
  font-size: 1rem;
  line-height: 1.35;
}

.account-card-login {
  margin: 8px 0 0;
  color: rgba(41, 56, 78, 0.8);
  word-break: break-word;
}

.account-card-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.access-vault-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.account-card-note {
  color: rgba(41, 56, 78, 0.62);
  font-size: 0.92rem;
}

.access-vault-password {
  margin-top: 12px;
}

.access-vault-password span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(41, 56, 78, 0.58);
}

.access-vault-password code {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: 0.98rem;
  color: #27414f;
  word-break: break-all;
}

.access-vault-password-note {
  margin: 12px 0 0;
}

.account-card--mint {
  background:
    linear-gradient(155deg, rgba(247, 255, 251, 0.86) 0%, rgba(235, 249, 244, 0.5) 36%, rgba(226, 244, 236, 0.38) 100%),
    rgba(255, 255, 255, 0.2);
}

.account-card--cool {
  background:
    linear-gradient(155deg, rgba(248, 251, 255, 0.86) 0%, rgba(236, 243, 255, 0.52) 36%, rgba(229, 239, 252, 0.4) 100%),
    rgba(255, 255, 255, 0.2);
}

.account-card--amber {
  background:
    linear-gradient(155deg, rgba(255, 252, 245, 0.88) 0%, rgba(252, 244, 225, 0.54) 38%, rgba(248, 236, 208, 0.4) 100%),
    rgba(255, 255, 255, 0.2);
}

.account-card--neutral {
  background: var(--glass-shell-soft);
}

@media (max-width: 980px) {
  .users-grid,
  .users-role-columns {
    grid-template-columns: 1fr;
  }
}
