@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../vendor/fonts/manrope/manrope-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../vendor/fonts/manrope/manrope-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../vendor/fonts/manrope/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --kep-cyan: #00b4d8;
  --kep-blue: #0077b6;
  --kep-deep: #023e8a;
  --kep-navy: #03045e;
  --kep-mint: #2dd4bf;
  --kep-amber: #ffc300;
  --kep-sky: #e8f6fc;
  --kep-warn-bg: #fff7ed;
  --kep-warn-bg-strong: #ffedd5;
  --kep-warn-border: #fdba74;
  --kep-warn-text: #9a3412;
  --kep-warn-icon: #ea580c;
  --kep-warn-btn: #ea580c;
  --kep-warn-btn-hover: #c2410c;
  --ink: #12324a;
  --ink-muted: #5b7388;
  --paper: #eef8fc;
  --paper-2: #f7fbff;
  --surface: #ffffff;
  --surface-2: #f3f8fd;
  --surface-3: #e8f1f8;
  --line: rgba(2, 62, 138, 0.12);
  --line-strong: rgba(2, 62, 138, 0.22);
  --shadow: 0 14px 36px rgba(15, 40, 70, 0.14);
  --shadow-soft: 0 8px 18px rgba(15, 40, 80, 0.04);
  --topbar-bg: rgba(255, 255, 255, 0.92);
  --stick-bg: rgba(247, 251, 255, 0.97);
  --input-bg: #ffffff;
  --input-border: #c5d4e6;
  --table-head: #f3f8fd;
  --table-stripe: rgba(2, 62, 138, 0.03);
  --table-hover: rgba(0, 119, 182, 0.06);
  --body-glow: rgba(0, 180, 216, 0.18);
  --body-grad-a: #eef8fc;
  --body-grad-b: #f7fbff;
  --sidebar: 270px;
  --theme-toggle-bg: rgba(2, 62, 138, 0.06);
  --theme-toggle-border: rgba(2, 62, 138, 0.14);
}

* { box-sizing: border-box; }

html, body {
  min-height: 100%;
  background:
    radial-gradient(circle at 90% -10%, var(--body-glow), transparent 32%),
    linear-gradient(180deg, var(--body-grad-a), var(--body-grad-b));
  color: var(--ink);
  font-family: Manrope, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, .page-title {
  font-weight: 800;
  letter-spacing: -0.02em;
}

a { color: var(--kep-blue); }

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  min-height: 100vh;
  min-width: 0;
}

.sidebar {
  background:
    linear-gradient(165deg, #0077b6 0%, #023e8a 55%, #03045e 100%);
  color: #fff;
  padding: 1.4rem 1rem 1.2rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  box-shadow: 8px 0 24px rgba(2, 62, 138, 0.18);
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.6rem;
}

.brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22);
  flex: 0 0 auto;
}

.brand-title { font-size: 1.05rem; margin: 0; font-weight: 800; line-height: 1.2; }
.brand-sub { color: rgba(255, 255, 255, 0.78); font-size: 0.72rem; line-height: 1.3; margin-top: 0.4rem; }

.nav-link {
  color: rgba(255, 255, 255, 0.88);
  border-radius: 0.85rem;
  padding: 0.65rem 0.85rem;
  display: flex;
  gap: 0.65rem;
  align-items: center;
  font-weight: 700;
}
.nav-link i { font-size: 1.05rem; flex: 0 0 auto; }
.nav-link { line-height: 1.25; }
.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}
.nav-link.active {
  color: #023e8a;
  background: #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}
.nav-badge {
  margin-left: auto;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.38rem;
  border-radius: 999px;
  background: #ffc300;
  color: #023e8a;
  font-size: 0.72rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-link.active .nav-badge {
  background: #0077b6;
  color: #fff;
}
.kep-toasts {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1080;
  display: grid;
  gap: 0.65rem;
  width: min(22rem, calc(100vw - 2rem));
  pointer-events: none;
}
.kep-toast {
  pointer-events: auto;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  background: #fff;
  color: #023e8a;
  text-decoration: none !important;
  box-shadow: 0 16px 40px rgba(2, 3, 43, 0.18);
  border: 1px solid #dbeafe;
  animation: kepToastIn 0.22s ease;
}
.kep-toast:hover { color: #023e8a !important; }
.kep-toast-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #fff3c4;
  color: #023e8a;
  flex: 0 0 auto;
}
.kep-toast strong { display: block; font-size: 0.92rem; }
.kep-toast strong + span { display: block; color: #4a6a80; font-size: 0.82rem; font-weight: 700; }
@keyframes kepToastIn {
  from { transform: translateY(-8px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.sidebar-foot {
  margin-top: auto;
  padding-top: 1.4rem;
}

/* overflow-x:hidden на предку ламає position:sticky – лишаємо visible. */
.main-col { min-width: 0; overflow: visible; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 1rem 1.5rem;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 40;
}
.page-stick-sentinel,
.page-stick-ph {
  margin: 0;
  padding: 0;
  border: 0;
  pointer-events: none;
}
.page-stick-sentinel { height: 1px; }
.page-stick-ph[hidden] { display: none !important; }
.page-stick {
  position: sticky;
  top: var(--page-sticky-top, 4.85rem);
  z-index: 30;
  margin: 0 0 1rem;
  padding: 0.15rem 0.15rem 0.75rem;
  background: var(--stick-bg);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.page-stick.is-pinned {
  position: fixed;
  margin: 0;
  max-width: none;
}
.page-stick > .page-toolbar,
.page-stick > .rnp-toolbar {
  position: static;
  top: auto;
  z-index: auto;
  margin: 0 0 0.65rem;
  padding: 0.45rem 0 0.55rem;
  background: transparent;
  border-bottom: none;
  box-shadow: none;
  backdrop-filter: none;
}
.page-stick .page-toolbar p,
.page-stick .rnp-toolbar .text-muted.small {
  display: none;
}
.page-stick > .row.g-3,
.page-stick > .rnp-catalog-stats,
.page-stick > .stu-filters,
.page-stick > .load-filters,
.page-stick > .load-tabs,
.page-stick > .rnp-depts,
.page-stick > .rnp-depts-hint,
.page-stick > .load-archive-note,
.page-stick > #grpDepts,
.page-stick > #grpYears {
  margin-bottom: 0.65rem !important;
}
.page-stick > :last-child {
  margin-bottom: 0 !important;
}
.page-stick .dash-stat {
  padding: 0.55rem 0.7rem;
  min-height: 0;
}
.page-stick .dash-stat-icon {
  width: 2.1rem;
  height: 2.1rem;
  font-size: 1rem;
}
.page-stick .dash-stat-value {
  font-size: 1.28rem;
}
.page-stick .dash-stat-label {
  font-size: 0.72rem;
}
.page-stick.is-stuck .rnp-dept-meta,
.page-stick.is-stuck .rnp-depts-hint,
.page-stick.is-stuck .topbar-kicker,
.page-stick.is-stuck .page-icon {
  display: none;
}
.page-stick.is-stuck .page-toolbar {
  margin-bottom: 0.45rem;
  padding: 0.2rem 0 0.35rem;
  gap: 0.55rem 0.75rem;
}
.page-stick.is-stuck .page-toolbar .h3 {
  font-size: 1.15rem;
}
.page-stick.is-stuck > .row.g-3 {
  --bs-gutter-x: 0.45rem;
  --bs-gutter-y: 0.45rem;
  margin-bottom: 0.45rem !important;
}
.page-stick.is-stuck .dash-stat {
  padding: 0.4rem 0.55rem;
  gap: 0.45rem;
}
.page-stick.is-stuck .dash-stat-icon {
  width: 1.75rem;
  height: 1.75rem;
  font-size: 0.88rem;
  border-radius: 0.55rem;
}
.page-stick.is-stuck .dash-stat-value {
  font-size: 1.05rem;
}
.page-stick.is-stuck .dash-stat-label {
  font-size: 0.66rem;
}
.page-stick.is-stuck .rnp-depts {
  gap: 0.4rem;
}
.page-stick.is-stuck .rnp-dept {
  padding: 0.45rem 0.55rem;
}
.page-toolbar {
  position: sticky;
  top: var(--page-sticky-top, 4.85rem);
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.85rem 1rem;
  margin: 0 0 1rem;
  padding: 0.75rem 0.15rem 0.85rem;
  background: rgba(247, 251, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 18px rgba(15, 40, 80, 0.04);
}
.page-toolbar > .page-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.page-toolbar .hours-dirty-note {
  flex: 1 1 100%;
  margin: 0;
}
.topbar-lead,
.topbar-tools {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.topbar-tools {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.topbar-copy { min-width: 0; }
.nav-toggle,
.nav-scrim {
  display: none;
}

.topbar-kicker {
  font-size: 0.78rem;
  color: var(--kep-blue);
  font-weight: 700;
  letter-spacing: 0.01em;
}
.topbar-title { font-weight: 800; }
.topbar-year {
  margin-top: 0.15rem;
  font-size: 0.82rem;
  font-weight: 800;
  color: #0077b6;
}
.btn {
  border-radius: 0.375rem;
}
.topbar .btn {
  border-radius: 0.375rem;
  font-weight: 800;
}
.topbar .btn-icon {
  width: 2.15rem;
  height: 2.15rem;
}
.btn-primary {
  --bs-btn-bg: #0077b6;
  --bs-btn-border-color: #0077b6;
  --bs-btn-hover-bg: #023e8a;
  --bs-btn-hover-border-color: #023e8a;
  --bs-btn-active-bg: #023e8a;
  --bs-btn-active-border-color: #023e8a;
}
.btn-outline-primary {
  --bs-btn-color: #0077b6;
  --bs-btn-border-color: #0077b6;
  --bs-btn-hover-bg: #0077b6;
  --bs-btn-hover-border-color: #0077b6;
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: #023e8a;
  --bs-btn-active-border-color: #023e8a;
  --bs-btn-active-color: #fff;
  --bs-btn-focus-shadow-rgb: 0, 119, 182;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-align: left;
}
.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #023e8a;
  background: #caf0f8;
}
.user-avatar-img {
  object-fit: cover;
  padding: 0;
  border: 2px solid #90e0ef;
}

.login-divider {
  text-align: center;
  color: #4a6a80;
  font-size: 0.82rem;
  font-weight: 700;
  position: relative;
}

.content { padding: 1.4rem 1.6rem 2.5rem; min-width: 0; }

.page-hero {
  background: linear-gradient(120deg, #0077b6, #00b4d8 60%, #48cae4);
  color: #fff;
  border-radius: 1.2rem;
  padding: 1.3rem 1.5rem;
  box-shadow: 0 16px 32px rgba(0, 119, 182, 0.22);
}
.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  opacity: 0.85;
}
.page-title { font-size: 1.8rem; margin: 0.15rem 0; }
.page-lead { opacity: 0.92; }

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: 0 10px 24px rgba(2, 62, 138, 0.06);
}

.stat-card {
  background: #fff;
  border-radius: 1rem;
  padding: 1.1rem 1.2rem;
  box-shadow: 0 10px 24px rgba(2, 62, 138, 0.06);
  border: 1px solid var(--line);
  border-top: 6px solid var(--kep-cyan);
}
.stat-card .value {
  font-size: 2rem;
  font-weight: 800;
  margin: 0;
  color: var(--kep-deep);
}
.stat-label { font-weight: 700; color: #4a6a80; }
.stat-cyan { border-top-color: #00b4d8; }
.stat-mint { border-top-color: #2dd4bf; }
.stat-amber { border-top-color: #ffc300; }

.dash-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(120deg, #0077b6, #00b4d8 58%, #48cae4);
  border-radius: 1.25rem;
  box-shadow: 0 16px 32px rgba(0, 119, 182, 0.22);
}
.dash-hero .card-body { position: relative; z-index: 1; }
.dash-hero-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.55);
  flex: 0 0 auto;
}
.dash-hero-avatar-fallback {
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #023e8a;
  background: #ffc300;
}
.dash-hero-badge {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-weight: 700;
}
.dash-hero-date {
  font-size: 0.86rem;
  font-weight: 700;
  opacity: 0.92;
}
.dash-hero .btn-outline {
  --bs-theme-bg: #fff;
  --bs-theme-border: rgba(255, 255, 255, 0.55);
  --bs-theme-text: #fff;
  --bs-theme-contrast: #023e8a;
  --bs-theme-hover: #fff;
}
.dash-hero .btn-solid {
  --bs-theme-bg: #ffc300;
  --bs-theme-border: #ffc300;
  --bs-theme-text: #023e8a;
  --bs-theme-contrast: #023e8a;
  --bs-theme-hover: #ffd60a;
}
.dash-stat {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-height: 96px;
  height: 100%;
  padding: 1rem 1.1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: 0 10px 24px rgba(2, 62, 138, 0.06);
  color: inherit;
}
a.dash-stat:hover {
  border-color: #90e0ef;
  box-shadow: 0 14px 28px rgba(2, 62, 138, 0.1);
  color: inherit;
}
.dash-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  flex: 0 0 auto;
  background: #e0f7ff;
  color: #0077b6;
}
.dash-stat-cyan .dash-stat-icon { background: #e0f7ff; color: #0077b6; }
.dash-stat-mint .dash-stat-icon { background: #e6fbf6; color: #0f766e; }
.dash-stat-amber .dash-stat-icon { background: #fff6d8; color: #b45309; }
.dash-stat-rose .dash-stat-icon { background: #ffe8ea; color: #be123c; }
.dash-stat-violet .dash-stat-icon { background: #ede9fe; color: #6d28d9; }
.dash-stat-copy { min-width: 0; flex: 1; }
.dash-stat-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #4a6a80;
}
.dash-stat-value {
  display: block;
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--kep-deep);
  line-height: 1.15;
}
.dash-stat-sub {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #4a6a80;
}
.dash-stat-go { color: #90a4b8; }
.dash-feed-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}
.dash-feed-item.is-unread {
  background: #fffbeb;
}
.topbar-notify-badge {
  position: absolute;
  top: -0.35rem;
  right: -0.35rem;
  margin-left: 0;
}
.cabinet-grades th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #5b7388;
  white-space: nowrap;
}
.cabinet-grades td {
  vertical-align: middle;
}
.cabinet-grades-search {
  min-width: min(18rem, 100%);
  max-width: 22rem;
}
.cab-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1rem;
  padding: 0.22rem 0.5rem;
  border-radius: 0.45rem;
  font-weight: 800;
  line-height: 1.1;
}
.cab-mark.mark-high { background: #bbf7d0; color: #14532d; }
.cab-mark.mark-mid { background: #fde68a; color: #713f12; }
.cab-mark.mark-low { background: #fed7aa; color: #9a3412; }
.cab-mark.mark-fail { background: #fecaca; color: #7f1d1d; }
.cab-mark.mark-absent { background: #fb7185; color: #fff; }
.cab-lesson-type {
  display: inline-flex;
  align-items: center;
  max-width: 12rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #eef6fb;
  color: #0c4a6e;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: normal;
}
.cab-att {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 750;
  line-height: 1.2;
}
.cab-att.is-present { background: #e6fbf6; color: #0f766e; }
.cab-att.is-absent { background: #ffe8ea; color: #be123c; }
.cab-att.is-excused { background: #fff6d8; color: #b45309; }
.cab-att.is-late { background: #e0f2fe; color: #0369a1; }
.cabinet-att-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.cabinet-absent-note {
  color: #be123c;
  font-weight: 700;
}
.cabinet-subject-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1rem 1.05rem;
  border-radius: 1rem;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(180deg, #ffffff 0%, #f3fafd 100%);
  border: 1px solid #d7ebf4;
  box-shadow: 0 10px 24px rgba(2, 62, 138, 0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.cabinet-subject-card:hover {
  transform: translateY(-2px);
  border-color: #8ecae6;
  box-shadow: 0 14px 28px rgba(2, 62, 138, 0.1);
  color: inherit;
}
.cabinet-subject-card.is-compact {
  padding: 0.85rem 0.95rem;
  min-height: 8.5rem;
}
.cabinet-subject-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}
.cabinet-subject-avg {
  min-width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: #023e8a;
  color: #fff;
  font-weight: 800;
  font-size: 0.92rem;
}
.cabinet-subject-title {
  margin: 0 0 0.2rem;
  line-height: 1.25;
}
.cabinet-subject-teacher {
  color: #5b7388;
  font-size: 0.9rem;
}
.cabinet-subject-progress {
  height: 0.42rem;
  border-radius: 999px;
  background: #e7f3f9;
  overflow: hidden;
  margin-bottom: 0.55rem;
}
.cabinet-subject-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #00b4d8, #0077b6);
}
.cabinet-subject-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  font-size: 0.82rem;
  color: #4a6a80;
}
.cabinet-subject-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.7rem;
}
.cabinet-subject-terms span {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: #eef8fc;
  color: #023e8a;
}
.cabinet-subject-terms span.is-current {
  background: #e8f8f1;
  color: #0f766e;
}
.cabinet-subject-terms span.is-laboratory { background: #ecfeff; color: #0e7490; }
.cabinet-subject-terms span.is-practical { background: #eff6ff; color: #1d4ed8; }
.cabinet-subject-terms span.is-seminar { background: #f5f3ff; color: #6d28d9; }
.cabinet-subject-terms span.is-control,
.cabinet-subject-terms span.is-kkr,
.cabinet-subject-terms span.is-mkr { background: #fff7ed; color: #c2410c; }
.cabinet-subject-terms span.is-term {
  background: #eef8fc;
  color: #023e8a;
}
.cabinet-risk-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}
.cabinet-risk-pill.is-high { background: #ffe8ea; color: #be123c; }
.cabinet-risk-pill.is-mid { background: #fff6d8; color: #b45309; }
.cabinet-risk-pill.is-empty { background: #eef2f7; color: #475569; }
.cabinet-subject-card.is-risk-high {
  border-color: #fecdd3;
  background: linear-gradient(180deg, #fff 0%, #fff5f6 100%);
}
.cabinet-subject-card.is-risk-mid {
  border-color: #fde68a;
  background: linear-gradient(180deg, #fff 0%, #fffbeb 100%);
}
.cabinet-subject-card.is-risk-empty {
  border-style: dashed;
}
.cabinet-fresh-grade {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.85rem;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: #023e8a;
  color: #fff;
  font-weight: 800;
}
.cabinet-transcript th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #5b7388;
  white-space: nowrap;
}
.cabinet-transcript tr.is-risk-high { background: #fff5f6; }
.cabinet-transcript tr.is-risk-mid { background: #fffbeb; }
.cabinet-transcript tr.is-risk-empty { background: #f8fafc; }
.cab-chart-wrap {
  overflow-x: auto;
}
.cab-chart-svg {
  width: 100%;
  min-width: 280px;
  height: auto;
  display: block;
}
.cab-chart-area { fill: rgba(0, 180, 216, 0.12); }
.cab-chart-line {
  stroke: #0077b6;
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.cab-chart-dot { fill: #023e8a; }
.cab-chart-grid {
  stroke: #d7ebf4;
  stroke-width: 1;
  stroke-dasharray: 4 4;
}
.cab-chart-axis,
.cab-chart-label,
.cab-chart-val {
  fill: #5b7388;
  font-size: 10px;
  font-family: Manrope, system-ui, sans-serif;
}
.cab-chart-val {
  fill: #023e8a;
  font-weight: 700;
}
.cab-access-filters {
  display: grid;
  grid-template-columns: minmax(14rem, 1.6fr) repeat(3, minmax(8rem, 0.9fr)) minmax(11rem, 1.1fr) auto;
  gap: 0.65rem 0.75rem;
  align-items: end;
}
.cab-access-field .form-select,
.cab-access-field .form-control {
  min-width: 0;
}
.cab-access-field.is-search .kep-combo {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}
.cab-access-field.is-search .kep-combo-field .form-control {
  height: 2.15rem;
  padding: 0.35rem 2.2rem 0.35rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 0.65rem;
}
.cab-access-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding-bottom: 1px;
}
@media (max-width: 1199.98px) {
  .cab-access-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cab-access-field.is-search,
  .cab-access-field.is-sort,
  .cab-access-actions {
    grid-column: 1 / -1;
  }
}
@media (max-width: 575.98px) {
  .cab-access-filters {
    grid-template-columns: 1fr;
  }
}
.cabinet-access-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #5b7388;
  white-space: nowrap;
}
.cab-sort-th {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.cab-sort-th:hover,
.cab-sort-th.is-active {
  color: #023e8a;
}
.cab-sort-th i {
  font-size: 0.85em;
}
.cabinet-access-table tr.is-kind-no_account,
.cabinet-access-table tr.is-kind-stopped,
.cabinet-access-table tr.is-kind-no_email {
  background: #fff5f6;
}
.cabinet-access-table tr.is-kind-never,
.cabinet-access-table tr.is-kind-stale {
  background: #fffbeb;
}
.dash-feed-ico {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: #eef8fc;
  color: #023e8a;
}
.dash-feed-ico.is-cyan { background: #e0f7ff; color: #0077b6; }
.dash-feed-ico.is-mint { background: #e6fbf6; color: #0f766e; }
.dash-feed-ico.is-amber { background: #fff6d8; color: #b45309; }
.dash-feed-ico.is-rose { background: #ffe8ea; color: #be123c; }
.dash-feed-ico.is-slate { background: #eef2f7; color: #475569; }
.dash-feed-desc {
  font-size: 0.92rem;
  margin-top: 0.15rem;
}
.dash-shortcut {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem;
  border-radius: 0.9rem;
  text-decoration: none;
  color: inherit;
  background: #f4fbfe;
  border: 1px solid transparent;
}
.dash-shortcut:hover {
  background: #e8f6fc;
  color: inherit;
  border-color: #caf0f8;
}
.dash-shortcut-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #fff;
  color: #0077b6;
  box-shadow: 0 4px 10px rgba(2, 62, 138, 0.08);
}
.min-w-0 { min-width: 0; }
.btn-icon {
  width: 2rem;
  height: 2rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
[data-refresh-page].is-busy i {
  display: inline-block;
  animation: kep-spin 0.7s linear infinite;
}
@keyframes kep-spin {
  to { transform: rotate(360deg); }
}
.page-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  color: #0077b6;
  background: #e0f7ff;
  box-shadow: 0 8px 16px rgba(0, 119, 182, 0.12);
  flex: 0 0 auto;
}
.stu-table thead th {
  white-space: nowrap;
}
.stu-pager {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.95rem 1rem;
  border-top: 1px solid var(--line);
  background: #fff;
}
.stu-pager-status {
  margin: 0;
  font-size: 0.875rem;
  color: var(--bs-secondary-color, #6c757d);
  text-align: center;
}
.stu-pager-status strong {
  color: var(--bs-body-color, #212529);
  font-weight: 700;
}
.stu-pager .pagination {
  --bs-pagination-color: #0077b6;
  --bs-pagination-hover-color: #023e8a;
  --bs-pagination-focus-color: #023e8a;
  --bs-pagination-active-bg: #0077b6;
  --bs-pagination-active-border-color: #0077b6;
  --bs-pagination-disabled-bg: transparent;
  --bs-pagination-disabled-color: #9bb8cc;
  --bs-pagination-border-radius: 0.8rem;
  --bs-pagination-focus-box-shadow: none;
  gap: 0.28rem;
  flex-wrap: wrap;
}
.stu-pager .page-item + .page-item .page-link {
  margin-left: 0;
}
.stu-pager .page-link {
  min-width: 2.4rem;
  height: 2.4rem;
  padding: 0 0.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.8rem !important;
  border: 1px solid var(--line);
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(2, 62, 138, 0.05);
}
.stu-pager .page-link:hover,
.stu-pager .page-link:focus,
.stu-pager .page-link:focus-visible {
  background: #e8f6fc;
  border-color: rgba(0, 119, 182, 0.28);
  box-shadow: 0 4px 10px rgba(2, 62, 138, 0.05);
  z-index: 1;
}
.stu-pager .page-item.active .page-link,
.stu-pager .page-item.active .page-link:hover,
.stu-pager .page-item.active .page-link:focus,
.stu-pager .page-item.active .page-link:focus-visible {
  background: #0077b6;
  background-image: none;
  border: 1px solid #0077b6;
  color: #fff;
  box-shadow: 0 6px 14px rgba(0, 119, 182, 0.22);
}
.stu-pager .page-item.disabled .page-link {
  box-shadow: none;
  background: #f4fafc;
  opacity: 0.72;
}
.stu-pager .page-item.is-jump .page-link {
  width: 2.4rem;
  padding: 0;
  border-radius: 999px !important;
  background: #eef8fc;
  color: #023e8a;
}
.stu-pager .page-item.is-jump .page-link i {
  font-size: 1.05rem;
}
.stu-pager .page-item.is-jump .page-link:hover,
.stu-pager .page-item.is-jump .page-link:focus {
  background: #0077b6;
  color: #fff;
  border-color: #0077b6;
}
.stu-pager .page-item.is-jump.disabled .page-link:hover,
.stu-pager .page-item.is-jump.disabled .page-link:focus {
  background: #f4fafc;
  color: #9bb8cc;
  border-color: var(--line);
}
.stu-pager .page-item.is-prev { margin-right: 0.45rem; }
.stu-pager .page-item.is-next { margin-left: 0.45rem; }
.stu-pager .page-item.is-gap .page-link {
  min-width: 1.8rem;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #7a99ae;
}
#accStaff > .stu-pager {
  margin-top: 1rem;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: var(--bs-border-radius, 0.375rem);
}
.stu-filters {
  margin-bottom: 1rem;
}
.stu-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.5rem;
}
.stu-filter-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.5rem;
  flex: 1 1 auto;
}
.stu-filter-bar > .kep-combo,
.stu-filter-fields > .kep-combo {
  flex: 1 1 16rem;
  min-width: min(100%, 14rem);
}
.stu-filter-bar > .kep-combo .form-control,
.stu-filter-fields > .kep-combo .form-control {
  height: 2.5rem;
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
  font-size: 0.95rem;
  border-radius: 0.6rem;
}
.stu-filter-field {
  display: block;
  min-width: 8rem;
  margin: 0;
}
.stu-filter-field.is-wide {
  min-width: 11rem;
  flex: 1 1 11rem;
}
.stu-filter-field > i {
  display: none;
}
.stu-filter-field .form-select {
  min-width: 8rem;
}
.stu-filter-field.is-wide .form-select {
  min-width: 11rem;
}
.stu-filter-foot {
  display: none;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.stu-filter-foot.is-on {
  display: flex;
}
.stu-filter-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}
.stu-filter-reset {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: var(--bs-border-radius, 0.375rem);
  background: #fff;
  color: #0077b6;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
}
a.stu-filter-reset:hover,
.stu-filter-reset:hover {
  background: #e9ecef;
  color: #023e8a;
}
.stu-empty-reset {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.9rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid #0077b6;
  border-radius: var(--bs-border-radius, 0.375rem);
  background: #fff;
  color: #0077b6;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}
.stu-empty-reset:hover {
  background: #0077b6;
  color: #fff;
}
.list-search {
  position: relative;
  flex: 1 1 16rem;
  min-width: min(100%, 15rem);
}
.list-search > i {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--bs-secondary-color, #6c757d);
  pointer-events: none;
  z-index: 2;
}
.list-search .form-control {
  padding-left: 2.25rem;
  padding-right: 2.25rem;
}
.list-search-clear {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.75rem;
  height: 1.75rem;
  border: 0;
  border-radius: var(--bs-border-radius, 0.375rem);
  display: grid;
  place-items: center;
  padding: 0;
  background: transparent;
  color: var(--bs-secondary-color, #6c757d);
  line-height: 1;
  text-decoration: none;
}
.list-search-clear:hover {
  background: #e9ecef;
  color: #212529;
}
.list-search-clear[hidden] {
  display: none;
}
@media (max-width: 576px) {
  .stu-filter-field,
  .stu-filter-field.is-wide {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 0;
  }
  .stu-filter-field .form-select,
  .stu-filter-field.is-wide .form-select {
    width: 100%;
    min-width: 0;
  }
}
.stu-row:hover { background: #f7fcff; }
.stu-row.is-dragging { opacity: 0.45; }
.stu-stream-break td {
  padding: 0.55rem 1rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #023e8a;
  background: #e7f4fb;
  border-top: 2px solid #90e0ef;
  border-bottom: 2px solid #90e0ef;
  text-align: left;
}
.stu-expelled-break td {
  padding: 0.55rem 1rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #be123c;
  background: #fff1f2;
  border-top: 2px solid #fecdd3;
  border-bottom: 2px solid #fecdd3;
  text-align: left;
}
.stu-row.is-expelled { background: #fff8f8; }
.stu-row.is-expelled:hover { background: #fff1f2; }
.stu-row.is-leave { background: #fffbeb; }
.stu-row.is-leave:hover { background: #fef3c7; }
.stu-leave-block {
  border-top: 1px solid #fde68a;
}
.stu-leave-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1rem 0.7rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #a16207;
  background: #fffbeb;
}
.stu-leave-head .bi { font-size: 1.05rem; }
.stu-leave-head span {
  margin-left: auto;
  min-width: 1.75rem;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: #fef3c7;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.stu-expelled-block {
  border-top: 1px solid #fecdd3;
}
.stu-expelled-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1rem 0.7rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #be123c;
  background: #fff1f2;
}
.stu-expelled-head .bi { font-size: 1.05rem; }
.stu-expelled-head span {
  margin-left: auto;
  min-width: 1.75rem;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: #ffe4e6;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.stu-num-col,
.stu-num {
  width: 3rem;
  text-align: center;
  color: #4a6a80;
  font-weight: 800;
}
.stu-drag-col { width: 4.5rem; }
.stu-drag-tools {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
}
.stu-drag,
.stu-move {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: #eef6fb;
  color: #4a6a80;
  display: grid;
  place-items: center;
  padding: 0;
  line-height: 1;
  cursor: grab;
}
.stu-move { cursor: pointer; }
.stu-drag:hover,
.stu-move:hover { background: #ede9fe; color: #6d28d9; }
.stu-sort-hint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.85rem;
  color: #4a6a80;
  font-size: 0.86rem;
  font-weight: 700;
}
.stu-person {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}
.stu-person:hover { color: var(--kep-blue); }
.stu-table .stu-person {
  min-width: 15.5rem;
}
.stu-table .stu-person strong {
  white-space: nowrap;
}
.stu-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #023e8a;
  background: linear-gradient(180deg, #caf0f8, #90e0ef);
}
.stu-avatar-lg {
  width: 72px;
  height: 72px;
  font-size: 1.25rem;
  border: 3px solid rgba(255, 255, 255, 0.55);
}
.stu-avatar-sm {
  width: 28px;
  height: 28px;
  font-size: 0.62rem;
}
img.stu-avatar {
  object-fit: cover;
  padding: 0;
  border: 2px solid #90e0ef;
  background: #fff;
}
.chip-course {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.22rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
  background: #e0f7ff;
  color: #0077b6;
}
.chip-course.is-1 { background: #e0f7ff; color: #0077b6; }
.chip-course.is-2 { background: #e6fbf6; color: #0f766e; }
.chip-course.is-3 { background: #fff6d8; color: #b45309; }
.chip-course.is-4 { background: #ede9fe; color: #6d28d9; }
.grp-curator {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
}
.stu-meta,
.stu-group {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  color: var(--ink);
}
.stu-meta i,
.stu-group i { color: #023e8a; }
html[data-theme="dark"] .stu-meta i,
html[data-theme="dark"] .stu-group i { color: #7dd3fc !important; }
.chip-status,
.chip-fund {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.22rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}
.chip-status.is-studying { background: #e6fbf6; color: #0f766e; }
.chip-status.is-academic_leave { background: #fff6d8; color: #b45309; }
.chip-status.is-expelled { background: #ffe8ea; color: #be123c; }
.chip-status.is-graduated { background: #ede9fe; color: #6d28d9; }
.chip-fund.is-budget { background: #e0f7ff; color: #0077b6; }
.chip-fund.is-contract { background: #fff6d8; color: #b45309; }
.chip-fund.is-extramural { background: #ede9fe; color: #6d28d9; }
.chip-headman {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 800;
  background: #fff6d8;
  color: #b45309;
  vertical-align: middle;
}
.stu-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: var(--bs-border-radius, 0.375rem);
  padding: 0.25rem 0.5rem;
  background: #fff;
  color: #212529;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
}
.stu-filter-chip i {
  font-size: 0.9rem;
  color: var(--bs-secondary-color, #6c757d);
}
.stu-filter-chip:hover {
  background: #e9ecef;
  color: #212529;
}
.stu-quick {
  width: auto;
  min-width: 9.2rem;
  max-width: 11rem;
  border: 0;
  border-radius: 0.375rem;
  font-weight: 800;
  font-size: 0.78rem;
  padding: 0.28rem 0.7rem;
  background-image: none;
}
.stu-quick.is-budget,
.stu-quick.is-studying,
.stu-quick.is-teacher { background: #e6fbf6; color: #0f766e; }
.stu-quick.is-curator { background: #e0f7ff; color: #0077b6; }
.stu-quick.is-methodist { background: #eef2ff; color: #3730a3; }
.stu-quick.is-head { background: #fce7f3; color: #9d174d; }
.stu-quick.is-contract,
.stu-quick.is-academic_leave { background: #fff6d8; color: #b45309; }
.stu-quick.is-extramural { background: #ede9fe; color: #6d28d9; }
.stu-quick.is-expelled { background: #ffe8ea; color: #be123c; }
.stu-quick.is-graduated { background: #eef2f7; color: #475569; }
.stu-quick:focus { box-shadow: 0 0 0 0.2rem rgba(0, 119, 182, 0.18); }
.stu-actions { white-space: nowrap; }
.stu-actions form { display: inline-flex; margin: 0; }
a.dash-stat.is-on {
  box-shadow: 0 0 0 2px #0077b6 inset, 0 8px 18px rgba(0, 119, 182, 0.08);
}
#stuStats.is-loading,
#stuTable.is-loading,
#stuChips.is-loading,
#teaStats.is-loading,
#teaTable.is-loading,
#teaChips.is-loading,
#grpStats.is-loading,
#grpTable.is-loading,
#grpChips.is-loading,
#grpDepts.is-loading,
#grpYears.is-loading,
#accStats.is-loading,
#accChips.is-loading,
#accStopped.is-loading,
#accStaff.is-loading {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.12s ease;
}
.stu-card { max-width: 760px; }
.stu-card-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.35rem 1.4rem;
  color: #fff;
  background: linear-gradient(120deg, #0077b6, #00b4d8 60%, #48cae4);
}
.stu-card-head .chip-status,
.stu-card-head .chip-fund,
.stu-card-head .chip-headman {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.stu-fact {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--line);
}
.stu-fact > i {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #e8f6fc;
  color: #0077b6;
}
.stu-fact-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #4a6a80;
}

.journal-chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.8rem;
  background: #eef8fc;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}
.journal-chip:hover {
  background: #caf0f8;
  color: inherit;
}
.journal-card {
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  overflow: hidden;
  background: #fff;
}
.chip-semester {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 0.28rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
  line-height: 1.2;
}
.chip-semester.is-1 {
  background: #dbeafe;
  color: #1d4ed8;
}
.chip-semester.is-2 {
  background: #ffedd5;
  color: #c2410c;
}
.journal-card .journal-chip {
  border-radius: 0;
  background: #f4fbfe;
}
.journal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.55rem 0.75rem 0.7rem;
  background: #fff;
}

.theme-primary {
  --bs-theme-bg: #0d6efd;
  --bs-theme-border: #0d6efd;
  --bs-theme-text: #0d6efd;
  --bs-theme-contrast: #fff;
  --bs-theme-hover: #0b5ed7;
}
.theme-success {
  --bs-theme-bg: #198754;
  --bs-theme-border: #198754;
  --bs-theme-text: #198754;
  --bs-theme-contrast: #fff;
  --bs-theme-hover: #157347;
}
.theme-danger {
  --bs-theme-bg: #dc3545;
  --bs-theme-border: #dc3545;
  --bs-theme-text: #dc3545;
  --bs-theme-contrast: #fff;
  --bs-theme-hover: #bb2d3b;
}
.theme-warning {
  --bs-theme-bg: #ffc107;
  --bs-theme-border: #ffc107;
  --bs-theme-text: #997404;
  --bs-theme-contrast: #000;
  --bs-theme-hover: #ffca2c;
}
.theme-orange {
  --bs-theme-bg: #ea580c;
  --bs-theme-border: #ea580c;
  --bs-theme-text: #c2410c;
  --bs-theme-contrast: #fff;
  --bs-theme-hover: #c2410c;
}
.theme-info {
  --bs-theme-bg: #0dcaf0;
  --bs-theme-border: #0dcaf0;
  --bs-theme-text: #087990;
  --bs-theme-contrast: #000;
  --bs-theme-hover: #31d2f2;
}
.theme-secondary {
  --bs-theme-bg: #6c757d;
  --bs-theme-border: #6c757d;
  --bs-theme-text: #6c757d;
  --bs-theme-contrast: #fff;
  --bs-theme-hover: #5c636a;
}
.theme-dark {
  --bs-theme-bg: #212529;
  --bs-theme-border: #212529;
  --bs-theme-text: #212529;
  --bs-theme-contrast: #fff;
  --bs-theme-hover: #1a1e21;
}
.theme-purple {
  --bs-theme-bg: #6f42c1;
  --bs-theme-border: #6f42c1;
  --bs-theme-text: #6f42c1;
  --bs-theme-contrast: #fff;
  --bs-theme-hover: #5a32a3;
}
.theme-semester {
  --bs-theme-bg: #65a30d;
  --bs-theme-border: #65a30d;
  --bs-theme-text: #3f6212;
  --bs-theme-contrast: #fff;
  --bs-theme-hover: #4d7c0f;
}
.theme-exam {
  --bs-theme-bg: #4f46e5;
  --bs-theme-border: #4f46e5;
  --bs-theme-text: #4338ca;
  --bs-theme-contrast: #fff;
  --bs-theme-hover: #4338ca;
}
.theme-credit {
  --bs-theme-bg: #0f766e;
  --bs-theme-border: #0f766e;
  --bs-theme-text: #0f766e;
  --bs-theme-contrast: #fff;
  --bs-theme-hover: #0d9488;
}
.theme-project {
  --bs-theme-bg: #c026d3;
  --bs-theme-border: #c026d3;
  --bs-theme-text: #a21caf;
  --bs-theme-contrast: #fff;
  --bs-theme-hover: #a21caf;
}

.btn-outline,
.btn-solid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
  border-radius: var(--bs-border-radius, 0.375rem);
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.btn.btn-outline,
.btn.btn-solid {
  padding: 0.375rem 0.75rem;
}
.btn-sm.btn-outline,
.btn-sm.btn-solid,
.btn.btn-sm.btn-outline,
.btn.btn-sm.btn-solid {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

.btn-outline {
  color: var(--bs-theme-text);
  background-color: transparent;
  border-color: var(--bs-theme-border);
}
.btn-outline:hover,
.btn-outline:focus-visible,
.btn.btn-outline:hover,
.btn.btn-outline:focus-visible,
a.btn-outline:hover {
  color: var(--bs-theme-contrast);
  background-color: var(--bs-theme-bg);
  border-color: var(--bs-theme-bg);
  text-decoration: none;
}
.btn-outline:active,
.btn.btn-outline:active {
  color: var(--bs-theme-contrast);
  background-color: var(--bs-theme-hover);
  border-color: var(--bs-theme-hover);
}

.btn-solid {
  color: var(--bs-theme-contrast);
  background-color: var(--bs-theme-bg);
  border-color: var(--bs-theme-border);
}
.btn-solid:hover,
.btn-solid:focus-visible,
.btn.btn-solid:hover,
.btn.btn-solid:focus-visible,
a.btn-solid:hover {
  color: var(--bs-theme-contrast);
  background-color: var(--bs-theme-hover);
  border-color: var(--bs-theme-hover);
  text-decoration: none;
}
.btn-solid:active,
.btn.btn-solid:active {
  color: var(--bs-theme-contrast);
  background-color: var(--bs-theme-hover);
  filter: brightness(0.92);
}

.btn-styled {
  box-shadow: 0 1px 2px rgb(0 0 0 / 15%), inset 0 1px 0 rgb(255 255 255 / 18%);
  background-image: linear-gradient(180deg, rgb(255 255 255 / 16%), rgb(0 0 0 / 8%));
}
.btn-outline.btn-styled {
  background-image: none;
  box-shadow: none;
}

.btn-outline:disabled,
.btn-solid:disabled,
.btn-outline.disabled,
.btn-solid.disabled {
  opacity: 0.65;
  pointer-events: none;
}

.table thead th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #4a6a80;
  background: #eef8fc;
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 195, 0, 0.28), transparent 26%),
    radial-gradient(circle at 88% 82%, rgba(72, 202, 228, 0.32), transparent 28%),
    linear-gradient(160deg, #02032b 0%, #023e8a 46%, #0077b6 100%);
}
.login-stage {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: 560px;
  border-radius: 1.7rem;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 30px 70px rgba(2, 3, 43, 0.38);
}
.login-hero {
  position: relative;
  color: #fff;
  padding: 2.4rem 2.3rem 2.1rem;
  background:
    linear-gradient(165deg, rgba(0, 180, 216, 0.2), transparent 42%),
    linear-gradient(180deg, #0077b6 0%, #023e8a 58%, #03045e 100%);
  overflow: hidden;
}
.login-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at 30% 20%, #000 0, transparent 78%);
  pointer-events: none;
}
.login-hero-glow {
  position: absolute;
  width: 220px;
  height: 220px;
  right: -60px;
  bottom: -40px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 195, 0, 0.45), transparent 68%);
  pointer-events: none;
}
.login-hero-mark {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
  margin-bottom: 1.35rem;
}
.login-hero-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.login-eyebrow {
  position: relative;
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #90e0ef;
}
.login-hero h1 {
  position: relative;
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  line-height: 1.15;
  margin: 0 0 0.85rem;
}
.login-hero-lead {
  position: relative;
  margin: 0 0 1.4rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.02rem;
  max-width: 22rem;
}
.login-points {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}
.login-points li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  color: #e8f6fc;
}
.login-points i {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #ffc300;
}
.login-panel {
  padding: 2.4rem 2.2rem 1.8rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-kicker {
  margin: 0 0 0.35rem;
  color: var(--kep-blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.login-panel h2 {
  margin: 0 0 0.55rem;
  font-size: 1.55rem;
}
.login-copy {
  color: #4a6a80;
  margin: 0 0 1.4rem;
}
.google-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 58px;
  padding: 0.7rem 1rem;
  border-radius: 1rem;
  color: #1f1f1f !important;
  background:
    linear-gradient(#fff, #f7fcff) padding-box,
    linear-gradient(90deg, #00b4d8, #ffc300) border-box;
  border: 2px solid transparent;
  box-shadow: 0 10px 24px rgba(0, 119, 182, 0.12);
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.google-cta:hover {
  color: #1f1f1f !important;
  border-color: #00b4d8;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(0, 119, 182, 0.16);
}
.google-cta-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid #eee;
}
.google-cta-text { font-size: 1.02rem; }
.login-choices {
  display: grid;
  gap: 1.15rem;
}
.login-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem 1.35rem;
  padding: 1.2rem 1.2rem;
  border-radius: 1.15rem;
  text-decoration: none !important;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 10px 22px rgba(0, 119, 182, 0.08);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.login-choice:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(0, 119, 182, 0.14);
}
.login-choice.is-teacher:hover { border-color: #90e0ef; }
.login-choice.is-student:hover { border-color: #99f6e4; }
.login-choice-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  flex: 0 0 auto;
}
.login-choice.is-teacher .login-choice-icon { background: #e0f7ff; color: #0077b6; }
.login-choice.is-student .login-choice-icon { background: #e6fbf6; color: #0f766e; }
.login-choice-copy {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  overflow: hidden;
  padding-right: 0.25rem;
}
.login-choice-copy strong {
  color: #023e8a;
  font-size: 1.08rem;
  line-height: 1.2;
}
.login-choice-copy span {
  color: #4a6a80;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.login-choice-go {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-left: 0.15rem;
  color: #0077b6;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
  flex: 0 0 auto;
}
.login-choice-go .google-cta-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
}
.login-choice-go .google-cta-icon svg {
  width: 24px;
  height: 24px;
}
.login-note {
  margin: 1rem 0 0;
  color: #4a6a80;
  font-size: 0.9rem;
}
.login-staff-link {
  display: inline-block;
  margin-top: 1.6rem;
  color: #7a93a6;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
}
.login-hero.is-staff {
  background:
    linear-gradient(165deg, rgba(255, 195, 0, 0.18), transparent 46%),
    linear-gradient(180deg, #001d3d 0%, #023e8a 52%, #03045e 100%);
}
.staff-panel { gap: 0; }
.staff-head {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  margin-bottom: 1.1rem;
}
.staff-head-copy { min-width: 0; }
.staff-head .login-kicker { margin: 0 0 0.15rem; }
.staff-head h2 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.2;
}
.staff-lock {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #023e8a;
  background: linear-gradient(180deg, #ffe566, #ffc300);
  box-shadow: 0 12px 22px rgba(255, 195, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  font-size: 1.35rem;
}
.staff-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  list-style: none;
  margin: 0 0 1.1rem;
  padding: 0;
}
.staff-steps li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 40px;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: #f4fbfe;
  color: #7a93a6;
  font-size: 0.82rem;
  font-weight: 800;
}
.staff-steps li span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(2, 62, 138, 0.08);
  font-size: 0.72rem;
  flex: 0 0 auto;
}
.staff-steps li.is-on {
  color: #023e8a;
  background: #e0f7ff;
  box-shadow: inset 0 0 0 1px #90e0ef;
}
.staff-steps li.is-on span { background: #0077b6; color: #fff; }
.staff-steps li.is-done {
  color: #047857;
  background: #ecfdf3;
}
.staff-steps li.is-done span { background: #059669; color: #fff; }
.staff-form {
  display: grid;
  gap: 0.95rem;
}
.staff-field { margin: 0; }
.staff-field-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.78rem;
  font-weight: 800;
  color: #4a6a80;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.staff-field-box {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 56px;
  padding: 0 0.55rem 0 0.55rem;
  border-radius: 1.05rem;
  background: #f4fbfe;
  border: 2px solid #caf0f8;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.staff-field-box:focus-within {
  border-color: #00b4d8;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 180, 216, 0.14);
}
.staff-field-box > i {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #0077b6;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 119, 182, 0.1);
  font-size: 1.05rem;
}
.staff-field-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  outline: none;
  height: 50px;
}
.staff-eye {
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  color: #4a6a80;
  border-radius: 0.7rem;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.staff-eye:hover { background: #e8f6fc; color: #023e8a; }
.staff-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 56px;
  margin-top: 0.15rem;
  padding: 0.55rem 0.55rem 0.55rem 1.2rem;
  border: 0;
  border-radius: 1.1rem;
  color: #fff;
  font: inherit;
  font-weight: 800;
  font-size: 1.02rem;
  background: linear-gradient(180deg, #0096c7 0%, #0077b6 100%);
  box-shadow: 0 12px 24px rgba(0, 119, 182, 0.28);
  cursor: pointer;
}
.staff-submit:hover,
.staff-submit:focus-visible {
  background: linear-gradient(180deg, #0077b6 0%, #023e8a 100%);
  color: #fff;
}
.staff-submit i {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
}
.staff-secure {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.95rem 0 0;
  color: #4a6a80;
  font-size: 0.86rem;
  font-weight: 700;
}
.staff-secure i { color: #059669; }
.staff-otp {
  position: relative;
  display: block;
  width: 100%;
}
.staff-otp-cells {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
  width: 100%;
}
.staff-otp-cells span {
  display: grid;
  place-items: center;
  min-height: 56px;
  border-radius: 0.95rem;
  border: 2px solid #caf0f8;
  background: #f4fbfe;
  font-weight: 800;
  font-size: 1.4rem;
  line-height: 1;
  color: #023e8a;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}
.staff-otp-cells span.is-filled {
  background: #fff;
  border-color: #48cae4;
  box-shadow: 0 8px 16px rgba(0, 119, 182, 0.1);
}
.staff-otp-cells span.is-on {
  border-color: #00b4d8;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 180, 216, 0.16);
}
.staff-otp-cells span.is-on:not(.is-filled)::after {
  content: "";
  width: 2px;
  height: 1.15em;
  border-radius: 1px;
  background: #0077b6;
  animation: staff-caret 1s steps(1) infinite;
}
@keyframes staff-caret {
  50% { opacity: 0; }
}
.staff-otp-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  border: 0;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  cursor: text;
}
.staff-otp.is-recovery {
  display: block;
}
.staff-otp.is-recovery .staff-otp-cells { display: none; }
.staff-otp.is-recovery .staff-otp-field {
  position: static;
  opacity: 1;
  height: 56px;
  padding: 0 1rem;
  border-radius: 1.05rem;
  background: #f4fbfe;
  border: 2px solid #caf0f8;
  color: var(--ink);
  caret-color: var(--ink);
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.08em;
  outline: none;
}
.staff-otp.is-recovery .staff-otp-field:focus {
  border-color: #00b4d8;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 180, 216, 0.14);
}
.staff-alt {
  justify-self: start;
  margin: -0.35rem 0 0;
  padding: 0;
  border: 0;
  background: none;
  color: #0077b6;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
}
.staff-alt:hover { color: #023e8a; }
.pw-panel { max-width: 520px; }
.pw-field {
  position: relative;
}
.pw-field .form-control {
  padding-right: 2.75rem;
}
.pw-eye {
  position: absolute;
  top: 50%;
  right: 0.3rem;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #4a6a80;
  border-radius: 0.7rem;
  display: grid;
  place-items: center;
  padding: 0;
}
.pw-eye:hover,
.pw-eye:focus-visible {
  background: #e8f6fc;
  color: #023e8a;
}
.pw-eye:focus-visible {
  outline: 2px solid #00b4d8;
  outline-offset: 1px;
}
.pw-meter {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.55rem;
}
.pw-meter-bars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  flex: 1;
}
.pw-meter-bars span {
  height: 6px;
  border-radius: 99px;
  background: #e2e8f0;
}
.pw-meter-bars[data-pw-level="empty"] span { background: #e2e8f0; }
.pw-meter-bars[data-pw-level="weak"] span:nth-child(1) { background: #dc2626; }
.pw-meter-bars[data-pw-level="medium"] span:nth-child(-n+2) { background: #d97706; }
.pw-meter-bars[data-pw-level="strong"] span { background: #059669; }
.pw-meter-label {
  min-width: 7.5rem;
  font-size: 0.82rem;
  color: #64748b;
}
.pw-meter-bars[data-pw-level="empty"] + .pw-meter-label { color: #64748b; }
.pw-meter-bars[data-pw-level="weak"] + .pw-meter-label { color: #dc2626; }
.pw-meter-bars[data-pw-level="medium"] + .pw-meter-label { color: #b45309; }
.pw-meter-bars[data-pw-level="strong"] + .pw-meter-label { color: #047857; }
.pw-checks {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  margin: 0.55rem 0 0;
  padding: 0;
  font-size: 0.78rem;
  color: #94a3b8;
}
.pw-checks li { display: inline-flex; align-items: center; gap: 0.3rem; }
.pw-checks li::before { content: "в—‹"; font-size: 0.7rem; }
.pw-checks li.is-ok { color: #047857; font-weight: 700; }
.pw-checks li.is-ok::before { content: "в—Џ"; }
.pw-match {
  margin-top: 0.45rem;
  font-size: 0.85rem;
  font-weight: 700;
}
.pw-match.is-ok { color: #047857; }
.pw-match.is-bad { color: #dc2626; }
.pw-panel .form-control.is-ok {
  border-color: #34d399;
}
.pw-panel .form-control.is-bad {
  border-color: #f87171;
}
.staff-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  align-self: flex-start;
  margin-top: 1.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: #f4fbfe;
  color: #4a6a80;
  font-weight: 800;
  font-size: 0.9rem;
  text-decoration: none;
}
.staff-back:hover {
  color: var(--kep-blue);
  background: #e0f7ff;
}

/* Темна тема: службовий вхід / 2FA */
html[data-theme="dark"] .staff-steps li {
  background: #1b2a40 !important;
  color: #9db0c5 !important;
}
html[data-theme="dark"] .staff-steps li span {
  background: #22344f !important;
  color: #c5d4e6 !important;
}
html[data-theme="dark"] .staff-steps li.is-on {
  background: #12324a !important;
  color: #7dd3fc !important;
  box-shadow: inset 0 0 0 1px #0284c7 !important;
}
html[data-theme="dark"] .staff-steps li.is-on span {
  background: #0284c7 !important;
  color: #fff !important;
}
html[data-theme="dark"] .staff-steps li.is-done {
  background: #134e4a !important;
  color: #5eead4 !important;
}
html[data-theme="dark"] .staff-steps li.is-done span {
  background: #0f766e !important;
  color: #fff !important;
}
html[data-theme="dark"] .staff-field-label {
  color: #9db0c5 !important;
}
html[data-theme="dark"] .staff-field-box {
  background: #101a2b !important;
  border-color: #334863 !important;
}
html[data-theme="dark"] .staff-field-box:focus-within {
  background: #152238 !important;
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.22) !important;
}
html[data-theme="dark"] .staff-field-box > i {
  background: #1b2a40 !important;
  color: #7dd3fc !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .staff-field-box input,
html[data-theme="dark"] .staff-otp-cells span {
  color: #f3f7fc !important;
  caret-color: #f3f7fc !important;
}
html[data-theme="dark"] .staff-otp-cells span {
  background: #101a2b !important;
  border-color: #334863 !important;
}
html[data-theme="dark"] .staff-otp-cells span.is-filled,
html[data-theme="dark"] .staff-otp-cells span.is-on {
  background: #152238 !important;
  border-color: #0284c7 !important;
  color: #f3f7fc !important;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.18) !important;
  transform: none !important;
}
html[data-theme="dark"] .staff-otp-cells span.is-on:not(.is-filled)::after {
  background: #7dd3fc !important;
}
html[data-theme="dark"] .staff-otp.is-recovery .staff-otp-field {
  background: #101a2b !important;
  border-color: #334863 !important;
  color: #f3f7fc !important;
  caret-color: #f3f7fc !important;
}
html[data-theme="dark"] .staff-otp.is-recovery .staff-otp-field:focus {
  background: #152238 !important;
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.22) !important;
}
html[data-theme="dark"] .staff-eye {
  color: #9db0c5 !important;
}
html[data-theme="dark"] .staff-eye:hover {
  background: #22344f !important;
  color: #7dd3fc !important;
}
html[data-theme="dark"] .staff-secure {
  color: #9db0c5 !important;
}
html[data-theme="dark"] .staff-secure i {
  color: #34d399 !important;
}
html[data-theme="dark"] .staff-back {
  background: #1b2a40 !important;
  color: #c5d4e6 !important;
}
html[data-theme="dark"] .staff-back:hover {
  background: #12324a !important;
  color: #7dd3fc !important;
}
html[data-theme="dark"] .staff-recovery {
  background: #1b2433 !important;
  border-color: #f59e0b !important;
  color: #fef3c7 !important;
}
html[data-theme="dark"] .staff-recovery-title,
html[data-theme="dark"] .staff-recovery-title i {
  color: #fbbf24 !important;
}
html[data-theme="dark"] .staff-recovery code,
html[data-theme="dark"] .staff-recovery .small {
  color: #fde68a !important;
}
html[data-theme="dark"] .staff-2fa-qr {
  background: #fff !important;
  border-color: #334863 !important;
}
html[data-theme="dark"] .staff-2fa-secret {
  color: #9db0c5 !important;
}
html[data-theme="dark"] .staff-2fa-secret code {
  color: #7dd3fc !important;
}
html[data-theme="dark"] .staff-head h2 {
  color: #f3f7fc !important;
}
html[data-theme="dark"] .login-copy {
  color: #c5d4e6 !important;
}

.staff-2fa-qr {
  display: grid;
  place-items: center;
  margin: 0.4rem 0 0.8rem;
  padding: 0.8rem;
  background: #fff;
  border: 2px solid #caf0f8;
  border-radius: 1.1rem;
}
.staff-2fa-qr img {
  width: 180px;
  height: 180px;
}
.staff-2fa-secret {
  font-size: 0.82rem;
  font-weight: 700;
  color: #4a6a80;
  word-break: break-all;
}
.staff-2fa-secret code {
  color: #023e8a;
}
.staff-recovery {
  margin: 0.4rem 0 1rem;
  padding: 0.85rem 0.95rem;
  border-radius: 1rem;
  background: #fff8e8;
  border: 1px solid #ffe08a;
}
.staff-recovery-title {
  font-weight: 800;
  color: #92400e;
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.staff-recovery ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.8rem;
  margin: 0 0 0.45rem;
  padding: 0;
  list-style: none;
  font-weight: 800;
  letter-spacing: 0.04em;
}
#code {
  letter-spacing: 0.18em;
  font-weight: 800;
}
.login-alert {
  border-radius: 0.9rem;
  padding: 0.75rem 0.9rem;
  margin-bottom: 1rem;
  font-weight: 700;
}
.login-alert-success { background: #dcfce7; color: #166534; }
.login-alert-danger { background: #fee2e2; color: #b91c1c; }
.login-alert-warning {
  background: var(--bs-warning-bg-subtle, #fff3cd);
  color: var(--bs-warning-text-emphasis, #664d03);
  border: 1px solid var(--bs-warning-border-subtle, #ffecb5);
}
.login-alert-info { background: #e0f2fe; color: #075985; }
.kep-flash {
  display: flex;
  align-items: flex-start;
  gap: 0.15rem;
  border-radius: 0.9rem;
  font-weight: 700;
  border-width: 1px;
  border-style: solid;
}
.kep-flash.alert-danger {
  background: #f8d7da;
  color: #842029;
  border-color: #f5c2c7;
}
.kep-flash.alert-success {
  background: #d1e7dd;
  color: #0f5132;
  border-color: #badbcc;
}
.kep-flash.alert-warning {
  background: #fff3cd;
  color: #664d03;
  border-color: #ffecb5;
}
.kep-flash.alert-info {
  background: #cff4fc;
  color: #055160;
  border-color: #b6effb;
}
.kep-flash > .bi {
  flex: 0 0 auto;
  margin-top: 0.12rem;
}
.login-card {
  width: min(460px, calc(100% - 2rem));
  background: #fff;
  padding: 2rem;
  border-radius: 1.4rem;
  box-shadow: 0 24px 50px rgba(3, 4, 94, 0.28);
}
.app-credits {
  width: min(980px, 100%);
  text-align: center;
  color: rgba(255, 255, 255, 0.78);
}
.app-credits-kicker {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
  color: #90e0ef;
}
.app-credits-people {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem 1.4rem;
}
.app-credits-person {
  display: grid;
  text-decoration: none;
  color: inherit;
  line-height: 1.25;
}
.app-credits-person strong {
  color: #fff;
  font-size: 0.95rem;
}
.app-credits-person span {
  font-size: 0.78rem;
  color: #ffc300;
}
.app-credits-person:hover strong { color: #ffc300; }
.sidebar-foot .app-credits {
  width: auto;
  text-align: left;
  padding: 0.15rem 0.35rem 0;
}
.sidebar-foot .app-credits-kicker { color: rgba(144, 224, 239, 0.85); }
.sidebar-foot .app-credits-people {
  display: grid;
  gap: 0.65rem;
  justify-content: start;
}
.sidebar-foot .app-credits-person span {
  color: rgba(255, 255, 255, 0.55);
  word-break: break-all;
}
.sidebar-foot .app-credits-person:hover span { color: #ffc300; }

@media (max-width: 860px) {
  .login-wrap { padding: 0.85rem; align-items: stretch; }
  .login-stage {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .login-hero { padding: 1.6rem 1.4rem 1.3rem; }
  .login-hero-mark { width: 72px; height: 72px; }
  .login-hero-lead { max-width: none; margin-bottom: 1rem; }
  .login-points { gap: 0.5rem; }
  .login-panel { padding: 1.5rem 1.35rem 1.4rem; }
  .login-hero.is-staff .login-points { display: none; }
  .login-hero.is-staff { padding-bottom: 1.1rem; }
  .staff-otp-cells { gap: 0.32rem; }
  .staff-otp-cells span { min-height: 48px; font-size: 1.2rem; }
  .login-choice { grid-template-columns: auto 1fr auto; }
  .login-choice-go-text { display: none; }
}

.theme-hint {
  background: #fff6d6;
  border: 1px solid rgba(255, 195, 0, 0.5);
  padding: 0.45rem 0.8rem;
  border-radius: 0.7rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.journal-workspace {
  --mj-line: #c9d6e5;
  --mj-head: #eef3f8;
  --mj-ink: #1e3a5f;
  --mj-cell: 38px;
  color: var(--mj-ink);
  min-width: 0;
}
.journal-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0 0 1rem;
  padding: 0.75rem 0.15rem 0.85rem;
  position: sticky;
  top: var(--page-sticky-top, 4.85rem);
  z-index: 30;
  background: rgba(247, 251, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 18px rgba(15, 40, 80, 0.04);
}
.journal-top > :last-child {
  flex: 0 0 auto;
}
.journal-kicker {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--kep-blue);
}
.journal-title {
  font-size: 1.75rem;
  margin: 0.12rem 0 0.2rem;
  color: var(--kep-deep);
}
.journal-lead {
  color: #4a6a80;
  font-weight: 600;
}
.jl-teacher {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.jl-subject-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: #e0f7ff;
  color: #0077b6;
  font-size: 1.1rem;
}
.page-icon.mx-auto { display: grid; }

.journal-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1rem;
}
.journal-tabs {
  position: relative;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.18rem;
  margin: 0 0 0.9rem;
  padding: 0.22rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  box-shadow: 0 8px 20px rgba(2, 62, 138, 0.06);
}
.journal-tab-glider {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  border-radius: 0.5rem;
  background: linear-gradient(180deg, #0077b6 0%, #023e8a 100%);
  box-shadow: 0 6px 14px rgba(0, 119, 182, 0.28);
  pointer-events: none;
}
.journal-tabs.is-ready .journal-tab-glider {
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), width 0.42s cubic-bezier(0.22, 1, 0.36, 1), height 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}
.journal-tab {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.48rem 0.95rem;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: #4a6a80;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: color 0.28s ease;
}
.journal-tab i {
  font-size: 1.05rem;
  opacity: 0.85;
  transition: opacity 0.28s ease;
}
.journal-tab:hover:not(.is-on) {
  background: #eef8fc;
  color: var(--kep-deep);
}
.journal-tab.is-on {
  color: #fff;
  background: linear-gradient(180deg, #0077b6 0%, #023e8a 100%);
  box-shadow: 0 6px 14px rgba(0, 119, 182, 0.28);
}
.journal-tabs.is-ready .journal-tab.is-on {
  background: transparent;
  box-shadow: none;
}
.journal-tab.is-on i { opacity: 1; }
.journal-tab:focus-visible {
  outline: 2px solid #00b4d8;
  outline-offset: 2px;
}
.journal-stage {
  display: grid;
}
.journal-stage > [data-journal-panel] {
  grid-area: 1 / 1;
  min-width: 0;
}
.journal-stage.is-switching {
  overflow: hidden;
}
[data-journal-panel][hidden] { display: none !important; }
.journal-stage.is-switching > [data-journal-panel] {
  display: block !important;
}
[data-journal-panel].is-swap {
  transition: opacity 0.38s ease, transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-journal-panel].is-enter {
  opacity: 0;
  transform: translateX(calc(var(--tab-dir, 1) * 1.4rem));
}
[data-journal-panel].is-enter.is-in {
  opacity: 1;
  transform: none;
}
[data-journal-panel].is-leave {
  opacity: 1;
  transform: none;
  pointer-events: none;
}
[data-journal-panel].is-leave.is-out {
  opacity: 0;
  transform: translateX(calc(var(--tab-dir, 1) * -1.4rem));
}
@media (prefers-reduced-motion: reduce) {
  .journal-tabs.is-ready .journal-tab-glider,
  [data-journal-panel].is-swap {
    transition: none;
  }
}

.journal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  font-size: 0.82rem;
}
.leg, .chip {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-weight: 800;
}
.leg-lecture { background: #dbeafe; color: #1e40af; }
.leg-laboratory { background: #ede9fe; color: #6d28d9; }
.leg-practical { background: #dcfce7; color: #166534; }
.leg-seminar { background: #fce7f3; color: #9d174d; }
.leg-individual { background: #e2e8f0; color: #334155; }
.leg-consultation { background: #cffafe; color: #0e7490; }
.leg-control { background: #fee2e2; color: #b91c1c; }
.leg-kkr { background: #ffe4e6; color: #9f1239; }
.leg-mkr { background: #ffedd5; color: #c2410c; }
.leg-thematic { background: #fef3c7; color: #92400e; }
.leg-semester { background: #d9f99d; color: #3f6212; }
.leg-exam { background: #e0e7ff; color: #3730a3; }
.leg-credit { background: #ccfbf1; color: #0f766e; }
.leg-course_project { background: #fae8ff; color: #a21caf; }
.leg-sep { color: #4a6a80; margin-left: 0.4rem; }
.chip-high { background: #bbf7d0; }
.chip-mid { background: #fde68a; }
.chip-low { background: #fed7aa; }
.chip-fail { background: #fecaca; }
.chip-absent { background: #fb7185; color: #fff; }

.j-hours {
  background: #eef8fc;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.9rem 1rem 0.85rem;
  margin-bottom: 0.9rem;
}
.j-hours-kicker {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #4a6a80;
  margin-bottom: 0.65rem;
}
.j-hours-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.55rem;
}
.j-hours-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem 0.6rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  padding: 0.65rem 0.8rem 0.7rem;
  font-size: 0.86rem;
  color: #4a6a80;
}
.j-hours-row strong {
  color: var(--kep-deep);
  font-size: 1.02rem;
}
.j-hours-row.is-total {
  border-color: var(--kep-cyan);
}
.j-hours-row.is-full {
  background: #ecfdf3;
}
.j-hours-row.is-over {
  background: #fff7ed;
}
.j-hours-bar {
  grid-column: 1 / -1;
  display: block;
  height: 0.35rem;
  border-radius: 99px;
  background: #dbeaf2;
  overflow: hidden;
}
.j-hours-bar i {
  display: block;
  height: 100%;
  background: var(--kep-cyan);
  border-radius: inherit;
}
.j-hours-row.is-full .j-hours-bar i { background: #059669; }
.j-hours-row.is-over .j-hours-bar i { background: #ea580c; }
.j-hours-note {
  margin-top: 0.65rem;
  font-size: 0.82rem;
  color: #4a6a80;
}

.journal-tools {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.9rem 1rem 0.85rem;
  margin-bottom: 0.9rem;
  box-shadow: 0 10px 24px rgba(2, 62, 138, 0.06);
}
.journal-add {
  display: grid;
  grid-template-columns: minmax(218px, 248px) 80px minmax(148px, 170px) 104px minmax(160px, 1fr) auto;
  gap: 0.5rem;
  align-items: end;
}
.journal-add label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0;
}
.journal-add label span {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #4a6a80;
}
.journal-add .form-select,
.journal-add .form-control {
  height: 38px;
  border-radius: 12px;
}
.journal-add > button {
  grid-column: 6;
  grid-row: 1;
  height: 38px;
  white-space: nowrap;
}
.journal-add .is-hw {
  grid-column: 1 / -1;
}
.journal-add .is-who {
  grid-column: span 2;
  min-width: 0;
}
.journal-add .is-who > span {
  white-space: nowrap;
}
.journal-add .is-who .form-select {
  width: 100%;
  min-width: 11rem;
}
.journal-theme-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  margin-top: 0.65rem;
}
.journal-theme-close {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem;
  margin-left: auto;
}
.journal-theme-close .kep-date {
  min-width: 188px;
}
.journal-theme-close .btn {
  white-space: nowrap;
  height: 38px;
}
.kep-date {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0;
  min-width: 218px;
}
.kep-date > span {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #4a6a80;
}
.kep-date-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  height: 38px;
  padding: 0 0.7rem;
  border: 1px solid #caf0f8;
  border-radius: 12px;
  background: #fff;
  color: var(--kep-deep);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}
.kep-date-btn i {
  color: #0077b6;
  font-size: 1rem;
}
.kep-date-btn .kep-date-caret {
  margin-left: 0.15rem;
  font-size: 0.78rem;
  color: #7a93a6;
}
.kep-date.is-open .kep-date-caret {
  transform: rotate(180deg);
}
.kep-date-btn strong {
  flex: 1;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kep-date-btn:hover,
.kep-date.is-open .kep-date-btn {
  border-color: #00b4d8;
  box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.16);
}
.kep-date-pop {
  position: fixed;
  z-index: 1200;
  width: 304px;
  padding: 0.8rem 0.85rem 0.7rem;
  border: 1px solid #90e0ef;
  border-radius: 1.1rem;
  background: #fff;
  box-shadow: 0 22px 48px rgba(2, 62, 138, 0.22);
}
.kep-date-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0077b6;
}
.kep-date-picked {
  margin: 0.18rem 0 0.6rem;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--kep-deep);
}
.kep-date-picked.is-wait {
  color: #0077b6;
}
.kep-date-head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
}
.kep-date-head strong {
  flex: 1;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--kep-deep);
  text-transform: capitalize;
}
.kep-date-nav {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: #e8f6fc;
  color: #0077b6;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.kep-date-nav:hover {
  background: #0077b6;
  color: #fff;
}
.kep-date-week,
.kep-date-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.kep-date-week span {
  height: 26px;
  display: grid;
  place-items: center;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7a93a6;
}
.kep-date-week span:nth-child(n+6) { color: #e11d48; }
.kep-date-day {
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--kep-deep);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
}
.kep-date-day:hover {
  background: #e8f6fc;
  color: #0077b6;
}
.kep-date-day.is-mute {
  color: #9bb0c0;
  font-weight: 700;
}
.kep-date-day.is-today {
  box-shadow: inset 0 0 0 1.5px #00b4d8;
}
.kep-date-day.is-pick {
  background: #0077b6;
  color: #fff;
  box-shadow: none;
}
.kep-date-day.is-pick:hover {
  background: #023e8a;
  color: #fff;
}
.kep-date-note {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: #4a6a80;
}
.kep-date-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.45rem;
}
.kep-date-today {
  border: 0;
  background: transparent;
  color: #0077b6;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  padding: 0.15rem 0.2rem;
}
.kep-date-today:hover { color: #023e8a; }
.journal-save-hint {
  margin: 0.85rem 0 0;
  color: #4a6a80;
  font-size: 0.86rem;
  font-weight: 700;
}
@keyframes journal-save-in {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes journal-save-icon-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.journal-save {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1040;
  margin: 0;
  padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
  background: none;
}
.journal-save.is-dirty,
.journal-save.is-invalid {
  display: block;
}
.journal-save-dialog {
  pointer-events: auto;
  position: relative;
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 1rem 1.15rem 1rem 1rem;
  border-radius: 1.2rem;
  background:
    linear-gradient(135deg, rgba(13, 110, 253, 0.07), transparent 42%),
    #fff;
  border: 1px solid #c5dcff;
  box-shadow:
    0 18px 40px rgba(2, 62, 138, 0.18),
    0 2px 0 rgba(255, 255, 255, 0.7) inset;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.1rem;
  overflow: hidden;
  animation: journal-save-in 0.38s ease-out both;
}
.journal-save.is-invalid .journal-save-dialog {
  border-color: #fecdd3;
  background:
    linear-gradient(135deg, rgba(220, 53, 69, 0.08), transparent 42%),
    #fff8f8;
  box-shadow:
    0 18px 40px rgba(159, 18, 57, 0.16),
    0 2px 0 rgba(255, 255, 255, 0.7) inset;
}
.journal-save-icon {
  flex: 0 0 auto;
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #0d6efd;
  background: linear-gradient(160deg, #e8f1ff, #d7e8ff);
  border: 1px solid #c5dcff;
  box-shadow: 0 6px 14px rgba(13, 110, 253, 0.14);
  animation: journal-save-icon-in 0.35s 0.06s ease-out both;
}
.journal-save.is-invalid .journal-save-icon {
  color: #dc3545;
  background: linear-gradient(160deg, #ffe8ec, #ffd6dc);
  border-color: #fecdd3;
  box-shadow: 0 6px 14px rgba(220, 53, 69, 0.14);
}
.journal-save-copy {
  flex: 1 1 16rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}
.journal-save-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--kep-deep, #023e8a);
}
.journal-save-lead {
  margin: 0;
  color: #475569;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.42;
}
.journal-save-lead strong {
  color: var(--kep-deep, #023e8a);
  font-weight: 800;
}
.journal-save-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex: 0 0 auto;
}
.journal-save-actions .btn {
  min-height: 2.35rem;
  padding-inline: 0.95rem;
  border-radius: 0.7rem;
  font-weight: 700;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.journal-save-actions .btn:hover,
.journal-save-actions .btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(2, 62, 138, 0.12);
}
.journal-save-error {
  color: #9f1239;
  font-size: 0.9rem;
  font-weight: 800;
}
.journal-save.is-dirty .btn,
.journal-save.is-invalid .btn {
  animation: none;
}
body:has(.journal-save.is-dirty),
body:has(.journal-save.is-invalid) {
  padding-bottom: 8rem;
}
@media (prefers-reduced-motion: reduce) {
  .journal-save-dialog,
  .journal-save-icon {
    animation: none !important;
  }
  .journal-save-actions .btn:hover,
  .journal-save-actions .btn:focus-visible {
    transform: none;
  }
}

.form-control, .form-select {
  border-radius: 0.375rem;
  border-color: #ced4da;
}
.form-control:focus, .form-select:focus {
  border-color: #00b4d8;
  box-shadow: 0 0 0 0.2rem rgba(0, 180, 216, 0.18);
}

.paper-journal {
  background: #eef2f7;
  border: 1px solid #d5e1ee;
  border-radius: 1.25rem;
  box-shadow: 0 16px 32px rgba(15, 40, 80, 0.08);
  overflow: hidden;
}
.paper-title {
  position: relative;
  z-index: 31;
  text-align: center;
  padding: 0.85rem 1rem 0.55rem;
  color: #fff;
  background: linear-gradient(90deg, #023e8a, #0077b6 55%, #00b4d8);
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.paper-title span {
  font-size: 0.72rem;
  letter-spacing: 0.01em;
  font-weight: 700;
  opacity: 0.92;
}
.month-tabs {
  position: relative;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.75rem 0.9rem 0.55rem;
  background: #eef2f7;
}
.month-tab {
  border: 0;
  border-radius: 0.7rem;
  padding: 0.42rem 0.85rem;
  font-weight: 800;
  font-size: 0.84rem;
  color: #fff;
  background: #94a3b8;
  box-shadow: 0 4px 10px rgba(15, 40, 80, 0.08);
  outline: none;
}
.month-tab:focus,
.month-tab:focus-visible {
  outline: none;
  box-shadow: 0 4px 10px rgba(15, 40, 80, 0.08);
}
.month-tab.is-active {
  outline: none;
  box-shadow: 0 4px 10px rgba(15, 40, 80, 0.08);
}
.month-tab.month-9 { background: #f5c400; color: #3f2f00; }
.month-tab.month-10 { background: #f59e0b; color: #3f2f00; }
.month-tab.month-11 { background: #ea580c; }
.month-tab.month-12 { background: #a78bfa; }
.month-tab.month-1 { background: #6366f1; }
.month-tab.month-2 { background: #3b82f6; }
.month-tab.month-3 { background: #22c55e; }
.month-tab.month-4 { background: #84cc16; color: #1f3308; }
.month-tab.month-5 { background: #16a34a; }
.month-tab.month-6 { background: #0d9488; }
.table-wrap {
  overflow: auto;
  max-height: min(78vh, calc(100dvh - 11rem));
  padding: 0.55rem 0.6rem 0.85rem;
  background: #e8edf5;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(2, 62, 138, 0.35) transparent;
}
.table-wrap::-webkit-scrollbar,
.topics-wrap::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.table-wrap::-webkit-scrollbar-thumb,
.topics-wrap::-webkit-scrollbar-thumb {
  background: rgba(2, 62, 138, 0.32);
  border-radius: 99px;
}
.table-wrap::-webkit-scrollbar-track,
.topics-wrap::-webkit-scrollbar-track {
  background: transparent;
}

.paper-grid {
  --mj-gap: 8px;
  --mj-bg: #e8edf5;
  --mj-col: 64px;
  --mj-mark-h: 52px;
  --mj-num: 52px;
  --mj-name-min: 220px;
  --mj-radius: 1rem;
  --mj-mark-fs: 1.05rem;
  --mj-date-fs: 0.95rem;
  --mj-type-fs: 0.78rem;
  border-collapse: separate;
  border-spacing: var(--mj-gap);
  width: max-content;
  min-width: 0;
  /* Без від’ємного margin – інакше overflow у .table-wrap обрізає верх «№» / «Тема» */
  margin: 0;
  background: #e8edf5;
}
.paper-grid th, .paper-grid td {
  border: 0;
  text-align: center;
  vertical-align: middle;
  background: transparent;
}
.paper-grid thead {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #e8edf5;
  box-shadow: 0 var(--mj-gap) 0 #e8edf5;
}
.paper-grid thead th {
  position: relative;
  top: auto;
  z-index: 1;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--mj-ink);
}
.paper-grid .is-month-hidden {
  display: none !important;
}

.paper-grid th.name-col,
.paper-grid td.name-col {
  position: sticky;
  left: 0;
  z-index: 8;
  background: var(--mj-bg);
  text-align: left !important;
  padding: 0;
  font-weight: 800;
  white-space: nowrap;
  color: var(--mj-ink);
  border-radius: 0;
  box-shadow: none;
  min-height: var(--mj-mark-h);
}
.paper-grid th.num-col,
.paper-grid td.num-col {
  left: 0;
  width: var(--mj-num);
  min-width: var(--mj-num);
  max-width: var(--mj-num);
  text-align: center !important;
  z-index: 9;
  color: #64748b;
  box-shadow: calc(-1 * var(--mj-gap)) 0 0 var(--mj-bg);
}
.paper-grid th.student-name,
.paper-grid td.student-name {
  left: calc(var(--mj-num) + var(--mj-gap));
  width: max-content;
  min-width: var(--mj-name-min);
  max-width: none;
  z-index: 8;
  overflow: visible;
  /* Без правої лінії/тіні – інакше колонка прізвищ виглядає окремим блоком. */
  box-shadow: calc(-1 * var(--mj-gap)) 0 0 var(--mj-bg);
}
.name-face {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: var(--mj-mark-h);
  height: 100%;
  width: max-content;
  min-width: 100%;
  max-width: none;
  box-sizing: border-box;
  padding: 0.35rem 0.7rem;
  background: #fff;
  border-radius: var(--mj-radius);
  box-shadow: 0 8px 18px rgba(30, 58, 95, 0.06);
  overflow: visible;
  white-space: nowrap;
  line-height: 1.25;
}
.paper-grid td.student-name .name-face {
  display: flex;
  align-items: center;
}
.num-col .name-face {
  width: 100%;
  min-width: 0;
  justify-content: center;
  padding: 0.35rem 0.15rem;
}
.paper-grid thead .name-col {
  position: sticky;
  top: auto;
  z-index: 22;
  height: auto;
  min-height: 0;
  background: var(--mj-bg);
}
.paper-grid thead .student-name {
  left: calc(var(--mj-num) + var(--mj-gap));
  z-index: 22;
  box-shadow: calc(-1 * var(--mj-gap)) 0 0 var(--mj-bg);
}
.paper-grid thead .num-col {
  z-index: 23;
  box-shadow: calc(-1 * var(--mj-gap)) 0 0 var(--mj-bg);
}
.paper-grid thead .name-face {
  min-height: 100%;
  align-items: center;
  background: #fff;
  box-shadow: 0 8px 18px rgba(30, 58, 95, 0.06);
}
.paper-grid tbody .mark-cell {
  position: relative;
  z-index: 1;
}
.paper-grid tbody tr:first-child > td {
  padding-top: 0.5rem;
}
.paper-grid tbody tr:first-child > td.name-col {
  padding-top: 0.5rem;
}

.theme-span {
  background: linear-gradient(90deg, #4c6ef5, #228be6);
  color: #fff;
  font-size: 0.8rem;
  padding: 0.45rem 0.55rem;
  border-radius: 1rem;
  box-shadow: 0 0 0 var(--mj-gap) var(--mj-bg);
}
/* .paper-grid th { background: transparent } сильніше за .theme-span – без цього
   у світлій темі лишається білий текст на сірому і «Тема 1» не видно */
.paper-grid thead th.theme-span {
  background: linear-gradient(90deg, #4c6ef5, #228be6);
  color: #fff;
}
.theme-span.col-semester,
.paper-grid thead th.theme-span.col-semester {
  background: linear-gradient(90deg, #65a30d, #16a34a);
  color: #fff;
}
.paper-grid thead th.theme-span.is-empty,
.theme-span.is-empty,
.theme-filler {
  background: var(--mj-bg);
  color: transparent;
  box-shadow: 0 0 0 var(--mj-gap) var(--mj-bg);
  border: 0;
  padding: 0;
  font-size: 0;
}
.date-cell,
.type-cell,
.mark-cell {
  min-width: var(--mj-col);
  width: var(--mj-col);
  max-width: var(--mj-col);
}
.date-cell,
.type-cell {
  background: #fff;
  border-radius: var(--mj-radius);
  padding: 0.28rem 0.15rem 0.22rem;
  box-shadow: 0 0 0 var(--mj-gap) var(--mj-bg), 0 8px 18px rgba(30, 58, 95, 0.06);
}
.date-strip {
  display: block;
  height: 4px;
  border-radius: 999px;
  margin: 0 0.35rem 0.22rem;
  background: #38bdf8;
}
.date-cell.col-lecture .date-strip { background: #60a5fa; }
.date-cell.col-laboratory .date-strip { background: #a78bfa; }
.date-cell.col-practical .date-strip { background: #34d399; }
.date-cell.col-seminar .date-strip { background: #f472b6; }
.date-cell.col-individual .date-strip { background: #94a3b8; }
.date-cell.col-consultation .date-strip { background: #22d3ee; }
.date-cell.col-control .date-strip { background: #f87171; }
.date-cell.col-kkr .date-strip { background: #fb7185; }
.date-cell.col-mkr .date-strip { background: #fb923c; }
.date-cell.col-thematic {
  background: #fde68a;
}
.date-cell.col-thematic .date-strip { background: #f59e0b; }
.date-cell.col-semester {
  background: #ecfccb;
}
.date-cell.col-semester .date-strip { background: #65a30d; }
.date-cell.col-exam .date-strip { background: #6366f1; }
.date-cell.col-credit .date-strip { background: #14b8a6; }
.date-cell.col-course_project .date-strip { background: #d946ef; }
.date-cell .d { display: block; font-size: var(--mj-date-fs); line-height: 1.1; }
.date-cell .m { display: block; color: #64748b; font-size: calc(var(--mj-date-fs) * 0.76); }
.type-cell {
  font-weight: 800;
  font-size: var(--mj-type-fs);
}
.type-cell.col-lecture { background: #dbeafe; color: #1e40af; }
.type-cell.col-laboratory { background: #ede9fe; color: #6d28d9; }
.type-cell.col-practical { background: #dcfce7; color: #166534; }
.type-cell.col-seminar { background: #fce7f3; color: #9d174d; }
.type-cell.col-individual { background: #e2e8f0; color: #334155; }
.type-cell.col-consultation { background: #cffafe; color: #0e7490; }
.type-cell.col-control { background: #fee2e2; color: #b91c1c; }
.type-cell.col-kkr { background: #ffe4e6; color: #9f1239; }
.type-cell.col-mkr { background: #ffedd5; color: #c2410c; }
.type-cell.col-thematic { background: #fef3c7; color: #92400e; }
.type-cell.col-semester { background: #d9f99d; color: #3f6212; }
.type-cell.col-exam { background: #e0e7ff; color: #3730a3; }
.type-cell.col-credit { background: #ccfbf1; color: #0f766e; }
.type-cell.col-course_project { background: #fae8ff; color: #a21caf; }
.date-cell.is-empty,
.type-cell.is-empty,
.mark-cell.is-empty {
  background: var(--mj-bg);
  box-shadow: 0 0 0 var(--mj-gap) var(--mj-bg);
  color: transparent;
}

.mark-cell {
  padding: 0;
  text-align: center;
}
.mark-input,
.mark-input.readonly {
  /* display:grid ламає системну каретку в Chrome – лишаємо block. */
  display: block;
  box-sizing: border-box;
  width: var(--mj-col);
  max-width: 100%;
  height: var(--mj-mark-h);
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: var(--mj-radius);
  background: #fff;
  text-align: center;
  font-family: Manrope, "Segoe UI", sans-serif;
  font-weight: 800;
  font-size: var(--mj-mark-fs);
  line-height: var(--mj-mark-h);
  color: var(--mj-ink);
  caret-color: #4c6ef5;
  box-shadow: 0 8px 18px rgba(30, 58, 95, 0.06);
  font-variant-numeric: tabular-nums;
}
.mark-cell.col-thematic .mark-input {
  background: #fde68a;
}
.mark-cell.col-semester .mark-input {
  background: #ecfccb;
}
.mark-cell.col-exam .mark-input {
  background: #eef2ff;
}
.mark-cell.col-credit .mark-input {
  background: #f0fdfa;
}
.mark-cell.col-course_project .mark-input {
  background: #fdf4ff;
}
.mark-input:focus {
  outline: 2px solid #4c6ef5;
  outline-offset: 0;
  background: #fff;
  caret-color: #4c6ef5;
}
.mark-input[readonly] {
  cursor: default;
  pointer-events: none;
}
.mark-input.readonly.is-nograde {
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
  font-weight: 700;
}
.mark-absent { background: #fb7185 !important; color: #fff; }
.mark-high { background: #bbf7d0 !important; color: #14532d !important; }
.mark-mid { background: #fde68a !important; color: #713f12 !important; }
.mark-low { background: #fed7aa !important; color: #9a3412 !important; }
.mark-fail { background: #fecaca !important; color: #7f1d1d !important; }
.mark-input.is-bad-mark {
  background: #fff1f2 !important;
  color: #9f1239 !important;
  outline: 3px solid #e11d48;
}

.topics-head {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1rem;
}
.topics-wrap {
  overflow-x: auto;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.topics-table {
  --bs-table-bg: transparent;
  --bs-table-hover-bg: #f7fbfe;
  --bs-table-color: var(--mj-ink, #1e3a5f);
  margin-bottom: 0;
  width: 100%;
}
.topics-table > :not(caption) > * > * {
  border-bottom-color: #e8eef5;
  padding: 0.7rem 0.65rem;
  background: transparent;
}
.topics-table thead th {
  color: #4a6a80;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
  background: #f4f8fc;
  border-bottom-width: 1px;
  vertical-align: middle;
}
.topics-table .topics-n {
  width: 3rem;
  color: #94a3b8;
  font-weight: 800;
  text-align: center;
}
.topics-hours-cell {
  white-space: nowrap;
  font-weight: 800;
  color: #334155;
}
.topics-table .topics-topic,
.topics-table .topics-hw {
  min-width: 12rem;
  overflow-wrap: break-word;
}
.topics-group > th {
  background: #f7fbfe;
  border-bottom-color: #e4eef6;
  padding: 0.65rem 0.65rem;
}
.topics-group-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
}
.topics-pack-meta {
  color: #4a6a80;
  font-size: 0.84rem;
  font-weight: 700;
}
.topics-pack-hours {
  margin-left: auto;
  padding: 0.18rem 0.65rem;
  border-radius: 999px;
  background: #e8f4fc;
  color: #023e8a;
  font-size: 0.82rem;
  font-weight: 800;
}
.topics-who-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
}
.topics-who-1::before,
.topics-who-2::before {
  content: "1 · ";
  color: #94a3b8;
  font-weight: 800;
}
.topics-who-2 {
  color: #64748b;
  font-size: 0.86rem;
}
.topics-who-2::before { content: "2 · "; }
.topics-who-edit {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.topics-sub-cell {
  min-width: 8.5rem;
  max-width: 12rem;
}
.topics-sub-mark {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  color: #9a3412;
  background: #ffedd5;
  border-radius: 0.4rem;
  padding: 0.18rem 0.5rem;
  white-space: nowrap;
}
.topics-sub-live {
  min-width: 8rem;
}
.topics-sub-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 1.35rem;
  padding: 1.1rem 0.15rem 0.25rem;
  border-top: 1px solid #e2e8f0;
}
.topics-sub-bar .btn-solid.theme-primary {
  color: #fff;
  background-color: #0d6efd;
  border-color: #0d6efd;
}
.topics-sub-bar .btn-solid.theme-primary:hover,
.topics-sub-bar .btn-solid.theme-primary:focus-visible {
  color: #fff;
  background-color: #0b5ed7;
  border-color: #0a58ca;
}
.topics-acts {
  display: inline-flex;
  gap: 0.3rem;
  justify-content: flex-end;
  align-items: center;
}
.topics-table .rnp-ico {
  width: 36px;
  height: 36px;
  font-size: 1rem;
}
.rnp-ico.is-cancel { background: #eef2f7; color: #64748b; }
.rnp-ico.is-cancel:hover { background: #64748b; color: #fff; }
.topics-table .kep-date {
  min-width: 0;
  width: 100%;
}
.topics-table .kep-date > span { display: none; }
.topics-table .kep-date-btn {
  height: 38px;
  padding: 0 0.55rem;
}
.topics-table .kep-date-btn strong { font-size: 0.86rem; }
.topics-table .form-select,
.topics-table .topics-text {
  width: 100%;
  min-height: 38px;
  border-radius: 0.5rem;
}
.topics-table .topics-text {
  resize: vertical;
  min-height: 58px;
  line-height: 1.35;
}
.topics-type-edit {
  display: none;
  flex-direction: column;
  gap: 0.3rem;
}
.topic-theme-select,
.theme-chip { font-weight: 800; }
.topic-theme-select {
  background: #eef4fb;
  border-color: #d7e3ef;
  color: var(--mj-ink);
}
.theme-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
  color: #3730a3;
  background: #e0e7ff;
}
.theme-chip[data-theme="1"] { color: #3730a3; background: #e0e7ff; }
.theme-chip[data-theme="2"] { color: #0f766e; background: #ccfbf1; }
.theme-chip[data-theme="3"] { color: #b45309; background: #ffedd5; }
.theme-chip[data-theme="4"] { color: #9f1239; background: #ffe4e6; }
.theme-chip[data-theme="5"] { color: #0369a1; background: #e0f2fe; }
.theme-chip[data-theme="6"] { color: #6d28d9; background: #ede9fe; }
.topics-table .topic-edit { display: none; }
.topics-table tr.is-editing .topic-view { display: none !important; }
.topics-table tr.is-editing .topic-edit { display: block; }
.topics-table tr.is-editing .topics-type-edit,
.topics-table tr.is-editing .topics-who-edit { display: flex; }
.topics-table tr.is-editing .topics-acts.topic-edit { display: inline-flex; }
.topics-table tr.row-thematic > * { background: #fffdf5; }
.topics-table tr.row-semester > * { background: #f7fee7; }
.theme-chip.is-semester,
.theme-chip.is-semester[data-theme] { color: #3f6212; background: #d9f99d; }
.topics-table tr.row-exam > * { background: #f7f8ff; }
.topics-table tr.row-credit > * { background: #f3fdfb; }
.topics-table tr.row-course_project > * { background: #fdf7ff; }
.type-pill {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}
.type-pill.type-lecture { background: #dbeafe; color: #1e40af; }
.type-pill.type-laboratory { background: #ede9fe; color: #6d28d9; }
.type-pill.type-practical { background: #dcfce7; color: #166534; }
.type-pill.type-seminar { background: #fce7f3; color: #9d174d; }
.type-pill.type-individual { background: #e2e8f0; color: #334155; }
.type-pill.type-consultation { background: #cffafe; color: #0e7490; }
.type-pill.type-control { background: #fee2e2; color: #b91c1c; }
.type-pill.type-kkr { background: #ffe4e6; color: #9f1239; }
.type-pill.type-mkr { background: #ffedd5; color: #c2410c; }
.type-pill.type-thematic { background: #fef3c7; color: #92400e; }
.type-pill.type-semester { background: #d9f99d; color: #3f6212; }
.type-pill.type-exam { background: #e0e7ff; color: #3730a3; }
.type-pill.type-credit { background: #ccfbf1; color: #0f766e; }
.type-pill.type-course_project { background: #fae8ff; color: #a21caf; }

@media (max-width: 1280px) {
  .journal-add {
    grid-template-columns: 1fr 1fr;
  }
  .journal-add .is-wide,
  .journal-add .is-hw,
  .journal-add > button {
    grid-column: 1 / -1;
    grid-row: auto;
  }
}

.audit-hash {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.72rem;
  word-break: break-all;
}
.audit-action {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  background: #e8f6fc;
  color: #023e8a;
  font-weight: 800;
  font-size: 0.78rem;
  white-space: nowrap;
}
.audit-action.is-cyan { background: #e0f7ff; color: #0077b6; }
.audit-action.is-mint { background: #e6fbf6; color: #0f766e; }
.audit-action.is-amber { background: #fff6d8; color: #b45309; }
.audit-action.is-rose { background: #ffe8ea; color: #be123c; }
.audit-action.is-slate { background: #eef2f7; color: #475569; }
#access-live,
#staff-active,
#stopped-access {
  scroll-margin-top: 1rem;
}
.staff-pending-block,
.staff-stopped-block {
  padding: 1.1rem 1.15rem 1.2rem;
  border-radius: 1.25rem;
}
.staff-pending-block {
  margin-bottom: 1.5rem;
  background: linear-gradient(180deg, #fff8e8 0%, #fff 72%);
  border: 1px solid #fde68a;
}
.staff-pending-block.is-hot {
  background: linear-gradient(180deg, #fff3cc 0%, #fffaf0 68%);
  border-color: #f5c14a;
  box-shadow: 0 12px 28px rgba(180, 83, 9, 0.12);
}
.staff-stopped-block {
  margin-top: 0;
  margin-bottom: 1.5rem;
  background: linear-gradient(180deg, #fff6f7 0%, #fff 72%);
  border: 1px solid #ffd6dc;
}
.staff-pending-block .staff-grid,
.staff-stopped-block .staff-grid {
  margin-bottom: 0;
}
.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.staff-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 1.2rem;
  padding: 1.15rem 1.2rem 1rem;
  box-shadow: 0 12px 28px rgba(0, 119, 182, 0.08);
  border: 1px solid var(--line);
}
.staff-card.is-pending {
  background: #fffdf6;
  border-color: #f5d78a;
}
.staff-card.is-stopped {
  background: #fff8f8;
}
.staff-card-head {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  margin-bottom: 0.9rem;
}
.staff-card .user-avatar {
  width: 72px;
  height: 72px;
  font-size: 1.25rem;
  flex: 0 0 auto;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(2, 62, 138, 0.16);
}
.staff-card .user-avatar-img {
  border-width: 3px;
  border-color: #90e0ef;
}
.staff-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.4rem;
}
.staff-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.75rem;
}
.staff-picks form {
  display: inline-flex;
  margin: 0;
}
.staff-pick {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2rem;
  padding: 0 0.7rem;
  border-radius: 0.375rem;
  border: 1px solid var(--line);
  background: #fff;
  color: #334155;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}
.staff-pick:hover {
  border-color: #90e0ef;
  background: #f7fcff;
  color: #023e8a;
}
.staff-pick.is-on.is-locked {
  pointer-events: none;
  cursor: default;
}
.staff-picks-hint {
  margin: -0.35rem 0 0.75rem;
  color: #4a6a80;
  font-size: 0.75rem;
  font-weight: 700;
}
.staff-pick.is-teacher.is-on,
.staff-pick.is-teacher:hover { background: #e0f7ff; border-color: #90e0ef; color: #0077b6; }
.staff-pick.is-curator.is-on,
.staff-pick.is-curator:hover { background: #e6fbf6; border-color: #99f6e4; color: #0f766e; }
.staff-pick.is-methodist.is-on,
.staff-pick.is-methodist:hover { background: #eef2ff; border-color: #c7d2fe; color: #3730a3; }
.staff-pick.is-head.is-on,
.staff-pick.is-head:hover { background: #fce7f3; border-color: #f9a8d4; color: #9d174d; }
.staff-pick.is-admin.is-on,
.staff-pick.is-admin:hover { background: #ede9fe; border-color: #c4b5fd; color: #5b21b6; }
.staff-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: auto;
}
.staff-actions form {
  display: flex;
  margin: 0;
  min-width: 0;
}
.staff-actions form:only-child {
  grid-column: 1 / -1;
}
.staff-actions .btn {
  width: 100%;
  height: 2.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.7rem;
  white-space: nowrap;
}
.staff-student-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  width: 100%;
  margin-bottom: 0.75rem;
}
.staff-student-form .form-select,
.staff-student-form .btn {
  height: 2.55rem;
}
.staff-role-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  width: 100%;
}
.staff-role-form .form-select {
  min-width: 0;
  flex: 1 1 9.5rem;
}
.staff-mail {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
  margin-top: 0.12rem;
  color: #4a6a80;
  font-size: 0.72rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.staff-mail i {
  color: #0077b6;
  flex: 0 0 auto;
}
.staff-mail span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.staff-locked {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #4a6a80;
  font-size: 0.82rem;
  font-weight: 700;
}
.chip-role {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.22rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 800;
  background: #e0f7ff;
  color: #0077b6;
}
.chip-role.is-teacher { background: #e0f7ff; color: #0077b6; }
.chip-role.is-curator { background: #e6fbf6; color: #0f766e; }
.chip-role.is-dean { background: #fff6d8; color: #b45309; }
.chip-role.is-head { background: #fce7f3; color: #9d174d; }
.chip-role.is-methodist { background: #eef2ff; color: #3730a3; }
.chip-role.is-admin { background: #ede9fe; color: #6d28d9; }
.chip-role.is-soon { background: #f1f5f9; color: #64748b; }
.chip-dept {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  background: #f1f5f9;
  color: #475569;
}
.chip-dept.is-akit { background: #e0f2fe; color: #0369a1; }
.chip-dept.is-bki { background: #d1fae5; color: #047857; }
.chip-dept.is-it { background: #e0e7ff; color: #3730a3; }
.chip-dept.is-poly { background: #ffedd5; color: #c2410c; }
.rnp-depts.is-compact .rnp-dept {
  min-height: 0;
  padding: 0.95rem 1.05rem;
}
.rnp-depts.is-compact .rnp-dept-meta {
  display: none;
}
.tea-roles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.tea-role-hint {
  margin-top: 0.22rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
}
.tea-group-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-height: 0.25rem;
}
.tea-group-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: default;
}
.tea-group-remove {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  line-height: 1;
  display: inline-flex;
  opacity: 0.7;
}
.tea-group-remove:hover {
  opacity: 1;
}

.rnp-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin: 0 0 1rem;
  padding: 0.75rem 0.15rem 0.85rem;
  position: sticky;
  top: var(--page-sticky-top, 4.85rem);
  z-index: 30;
  background: rgba(247, 251, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 18px rgba(15, 40, 80, 0.04);
}
.rnp-save-pair {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.rnp-save-status {
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}
.rnp-save-status:empty {
  display: none;
}
.rnp-save-status.text-success {
  color: #0f766e;
}
.rnp-toolbar-actions,
.rnp-upload {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-end;
}
.rnp-zoom {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.18rem 0.3rem 0.18rem 0.22rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  background: #fff;
}
.rnp-zoom-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 0.375rem;
  background: transparent;
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.rnp-zoom-btn:hover,
.rnp-zoom-btn:focus {
  background: #ecfeff;
  color: #0f766e;
  outline: none;
}
.rnp-zoom-range {
  width: 110px;
  height: 4px;
  margin: 0 2px;
  accent-color: #0f766e;
  cursor: pointer;
}
.rnp-zoom-value {
  min-width: 48px;
  height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 0.375rem;
  background: #f1f5f9;
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
  line-height: 28px;
  cursor: pointer;
}
.rnp-zoom-value:hover,
.rnp-zoom-value:focus {
  background: #ccfbf1;
  outline: none;
}
.rnp-import-split {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-end;
}
.rnp-import-btn {
  margin: 0;
  cursor: pointer;
}
.rnp-import-btn input {
  display: none;
}
.rnp-depts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 0 0 1.25rem;
  overflow: visible;
}
.rnp-dept {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.8rem;
  min-height: 0;
  padding: 1.05rem 1.05rem 0.95rem;
  border: 0;
  border-radius: 1.25rem;
  background: #fff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(2, 62, 138, 0.08);
  transition: none;
  transform: none;
}
.rnp-dept.is-akit { background: #eef9ff; }
.rnp-dept.is-bki { background: #eefaf7; }
.rnp-dept.is-it { background: #f3f4ff; }
.rnp-dept.is-poly { background: #fff6ec; }
.rnp-dept-top {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}
.rnp-dept-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: 1.25rem;
}
.rnp-dept.is-akit .rnp-dept-icon { background: #d7f1fb; color: #0077b6; }
.rnp-dept.is-bki .rnp-dept-icon { background: #ccfbf1; color: #0f766e; }
.rnp-dept.is-it .rnp-dept-icon { background: #e0e7ff; color: #4338ca; }
.rnp-dept.is-poly .rnp-dept-icon { background: #ffedd5; color: #c2410c; }
.rnp-dept-copy strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0f3d5e;
}
.rnp-dept-copy span {
  display: block;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #64748b;
}
.rnp-dept:hover,
.rnp-dept:focus,
.rnp-dept:focus-visible {
  color: inherit;
  transform: none;
  box-shadow: 0 10px 24px rgba(2, 62, 138, 0.08);
  outline: none;
}
.rnp-dept.is-active {
  box-shadow: 0 12px 28px rgba(2, 62, 138, 0.12);
}
.rnp-dept.is-akit.is-active { background: #dff3fc; }
.rnp-dept.is-bki.is-active { background: #d8f6ef; }
.rnp-dept.is-it.is-active { background: #e4e7fe; }
.rnp-dept.is-poly.is-active { background: #ffedd5; }
.rnp-dept.is-active .rnp-dept-icon { color: #fff; }
.rnp-dept.is-akit.is-active .rnp-dept-icon { background: #0077b6; }
.rnp-dept.is-bki.is-active .rnp-dept-icon { background: #0f766e; }
.rnp-dept.is-it.is-active .rnp-dept-icon { background: #4f46e5; }
.rnp-dept.is-poly.is-active .rnp-dept-icon { background: #c2410c; }
.rnp-dept.is-active .rnp-dept-copy span {
  color: #334155;
  font-weight: 700;
}
.rnp-dept-count {
  margin-left: auto;
  min-width: 1.7rem;
  height: 1.7rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.78);
  color: #334155;
  font-size: 0.78rem;
  font-weight: 800;
  flex: 0 0 auto;
}
.rnp-dept.is-akit .rnp-dept-count { color: #0077b6; }
.rnp-dept.is-bki .rnp-dept-count { color: #0f766e; }
.rnp-dept.is-it .rnp-dept-count { color: #4f46e5; }
.rnp-dept.is-poly .rnp-dept-count { color: #c2410c; }
.rnp-dept.is-akit.is-active .rnp-dept-count { background: #0077b6; color: #fff; }
.rnp-dept.is-bki.is-active .rnp-dept-count { background: #0f766e; color: #fff; }
.rnp-dept.is-it.is-active .rnp-dept-count { background: #4f46e5; color: #fff; }
.rnp-dept.is-poly.is-active .rnp-dept-count { background: #c2410c; color: #fff; }
.rnp-dept-meta {
  display: grid;
  gap: 0.45rem;
}
.rnp-dept-head {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.55rem 0.75rem;
  border: 0;
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.7);
}
.rnp-dept-mail {
  display: block;
  min-width: 0;
  color: #0f3d5e;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rnp-dept-head-label {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
}
.rnp-dept-person {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}
.rnp-dept-person img,
.rnp-dept-initials {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex: 0 0 auto;
  object-fit: cover;
}
.rnp-dept-initials {
  display: grid;
  place-items: center;
  background: #e2e8f0;
  color: #334155;
  font-size: 0.68rem;
  font-weight: 800;
}
.rnp-dept.is-akit .rnp-dept-initials { background: #e0f7ff; color: #0077b6; }
.rnp-dept.is-bki .rnp-dept-initials { background: #ccfbf1; color: #0f766e; }
.rnp-dept.is-it .rnp-dept-initials { background: #e0e7ff; color: #4338ca; }
.rnp-dept.is-poly .rnp-dept-initials { background: #ffedd5; color: #c2410c; }
.rnp-dept-person strong {
  display: block;
  font-size: 0.84rem;
  font-weight: 800;
  color: #0f3d5e;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rnp-dept-vacant {
  font-size: 0.82rem;
  color: #94a3b8;
  font-style: italic;
}
.rnp-depts-hint {
  margin: -0.45rem 0 1.1rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #64748b;
}
.rnp-depts-hint a {
  font-weight: 800;
  text-decoration: none;
}
.rnp-depts-hint a:hover { text-decoration: underline; }
.rnp-dept-section {
  margin: 0 0 1.45rem;
}
.rnp-dept-section-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 0.8rem;
  min-width: 0;
}
.rnp-dept-section-head .rnp-dept-icon {
  width: 40px;
  height: 40px;
  font-size: 1.05rem;
}
.rnp-dept-section.is-akit .rnp-dept-icon { background: #d7f1fb; color: #0077b6; }
.rnp-dept-section.is-bki .rnp-dept-icon { background: #ccfbf1; color: #0f766e; }
.rnp-dept-section.is-it .rnp-dept-icon { background: #e0e7ff; color: #4338ca; }
.rnp-dept-section.is-poly .rnp-dept-icon { background: #ffedd5; color: #c2410c; }
.rnp-dept-section-head strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0f3d5e;
}
.rnp-dept-section-head .min-w-0 > span {
  display: block;
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.35;
}
.rnp-dept-section-head .rnp-dept-count {
  margin-left: 0;
  background: #fff;
}
.rnp-dept-section.is-akit .rnp-dept-count { color: #0077b6; }
.rnp-dept-section.is-bki .rnp-dept-count { color: #0f766e; }
.rnp-dept-section.is-it .rnp-dept-count { color: #4f46e5; }
.rnp-dept-section.is-poly .rnp-dept-count { color: #c2410c; }
.rnp-dept-section-link {
  margin-left: auto;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
  color: #0077b6;
  text-decoration: none;
}
.rnp-dept-section-link:hover { text-decoration: underline; }
.rnp-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 0.15rem;
}
.rnp-crumb a {
  color: #0077b6;
  text-decoration: none;
}
.rnp-crumb a:hover { text-decoration: underline; }
.rnp-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.9rem;
}
.rnp-catalog .stu-pager {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
}
.rnp-plan-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  background: #fff;
  color: inherit;
  box-shadow: 0 10px 24px rgba(2, 62, 138, 0.06);
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.rnp-plan-card:hover {
  border-color: #90e0ef;
  box-shadow: 0 16px 32px rgba(2, 62, 138, 0.12);
  transform: translateY(-2px);
}
.rnp-plan-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 1.1rem 1.15rem 0.85rem;
  flex: 1;
}
.rnp-plan-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}
.rnp-plan-title {
  font-size: 1.28rem;
  font-weight: 800;
  margin: 0 0 0.25rem;
  color: var(--kep-deep);
  letter-spacing: -0.02em;
}
.rnp-plan-spec {
  color: #475569;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.35;
  min-height: 2.3em;
}
.rnp-plan-spec span {
  display: inline-block;
  margin-right: 0.35rem;
  color: #0077b6;
  font-weight: 800;
}
.rnp-plan-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 0.65rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  font-weight: 700;
  color: #4a6a80;
}
.rnp-plan-facts i {
  color: #0077b6;
  margin-right: 0.3rem;
}
.rnp-plan-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1.05rem 0.85rem;
  background: #f7fcff;
  border-top: 1px solid var(--line);
}
.rnp-plan-actions form {
  margin: 0;
}
.rnp-ico {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.08rem;
  text-decoration: none;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: background 0.15s ease, color 0.15s ease;
}
.rnp-ico.is-open { background: #e0f7ff; color: #0077b6; }
.rnp-ico.is-open:hover { background: #0077b6; color: #fff; }
.rnp-ico.is-edit { background: var(--bs-warning-bg-subtle, #fff3cd); color: var(--bs-warning-text-emphasis, #997404); }
.rnp-ico.is-edit:hover { background: #ffc107; color: #000; }
.rnp-ico.is-delete { background: #ffe8ea; color: #be123c; }
.rnp-ico.is-delete:hover { background: #e11d48; color: #fff; }
.rnp-ico.is-grad { background: #ede9fe; color: #6d28d9; }
.rnp-ico.is-grad:hover { background: #7c3aed; color: #fff; }
.rnp-ico.is-restore { background: #e6fbf6; color: #0f766e; }
.rnp-ico.is-restore:hover { background: #0f766e; color: #fff; }
.grp-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
}
.grp-actions form { margin: 0; }
.chip-year.is-on {
  background-color: #0077b6;
  color: #fff;
}
.rnp-create-card {
  margin: 0;
  border-style: dashed;
  border-color: #90e0ef;
  background: linear-gradient(165deg, #f7fcff 0%, #e8f7ff 100%);
  scroll-margin-top: 1rem;
  text-align: left;
}
.rnp-create-card:hover {
  transform: none;
  border-color: #00b4d8;
  box-shadow: 0 16px 32px rgba(2, 62, 138, 0.1);
}
.rnp-create-card:target,
.rnp-create-card:focus-within {
  border-color: #00b4d8;
  box-shadow: 0 0 0 4px rgba(0, 180, 216, 0.14);
}
.rnp-create-card.is-course-2 {
  background: linear-gradient(165deg, #f3fbf8 0%, #e6f7f1 100%);
  border-color: #99e2c8;
}
.rnp-create-card.is-course-2:hover,
.rnp-create-card.is-course-2:focus-within {
  border-color: #14b8a6;
}
.rnp-create-card.is-course-3 {
  background: linear-gradient(165deg, #fffaf0 0%, #fff3d6 100%);
  border-color: #f5d08a;
}
.rnp-create-card.is-course-3:hover,
.rnp-create-card.is-course-3:focus-within {
  border-color: #d97706;
}
.rnp-create-card.is-course-4 {
  background: linear-gradient(165deg, #faf5ff 0%, #ede9fe 100%);
  border-color: #c4b5fd;
}
.rnp-create-card.is-course-4:hover,
.rnp-create-card.is-course-4:focus-within {
  border-color: #7c3aed;
}
.rnp-create-avatar {
  background: #fff;
  color: #0077b6;
  font-size: 1.15rem;
  box-shadow: 0 6px 14px rgba(0, 119, 182, 0.12);
}
.rnp-create-card.is-course-2 .rnp-create-avatar {
  color: #0f766e;
  box-shadow: 0 6px 14px rgba(15, 118, 110, 0.12);
}
.rnp-create-card.is-course-3 .rnp-create-avatar {
  color: #b45309;
  box-shadow: 0 6px 14px rgba(180, 83, 9, 0.12);
}
.rnp-create-card.is-course-4 .rnp-create-avatar {
  color: #6d28d9;
  box-shadow: 0 6px 14px rgba(109, 40, 217, 0.12);
}
.rnp-create-pills {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 2px;
  padding: 3px;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #caf0f8;
}
.rnp-create-pill {
  margin: 0;
  cursor: pointer;
}
.rnp-create-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.rnp-create-pill span {
  display: grid;
  place-items: center;
  min-width: 4.4rem;
  height: 28px;
  padding: 0 0.7rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 800;
  color: #64748b;
  transition: background 0.15s ease, color 0.15s ease;
}
.rnp-create-pill:hover span {
  color: #023e8a;
}
.rnp-create-pill:has(input:checked) span {
  background: #0077b6;
  color: #fff;
  box-shadow: 0 4px 10px rgba(0, 119, 182, 0.28);
}
.rnp-create-card.is-course-2 .rnp-create-pill:has(input:checked) span {
  background: #0f766e;
  box-shadow: 0 4px 10px rgba(15, 118, 110, 0.28);
}
.rnp-create-card.is-course-3 .rnp-create-pill:has(input:checked) span {
  background: #b45309;
  box-shadow: 0 4px 10px rgba(180, 83, 9, 0.28);
}
.rnp-create-card.is-course-4 .rnp-create-pill:has(input:checked) span {
  background: #6d28d9;
  box-shadow: 0 4px 10px rgba(109, 40, 217, 0.28);
}
.rnp-create-card .rnp-plan-spec {
  min-height: 0;
  margin: 0 0 0.85rem;
}
.rnp-create-name {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(144, 224, 239, 0.7);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #4a6a80;
}
.rnp-create-name input {
  width: 100%;
  height: 40px;
  border: 1px solid #caf0f8;
  border-radius: 12px;
  padding: 0 0.8rem;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
  color: var(--kep-deep);
  background: #fff;
}
.rnp-create-name input:focus {
  outline: none;
  border-color: #00b4d8;
  box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.16);
}
.rnp-create-go {
  width: 100%;
  height: 40px;
  border: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: #0077b6;
  color: #fff;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.rnp-create-go:hover {
  background: #023e8a;
  transform: translateY(-1px);
}
.rnp-create-card.is-course-2 .rnp-create-go {
  background: #0f766e;
}
.rnp-create-card.is-course-2 .rnp-create-go:hover {
  background: #115e59;
}
.rnp-create-card.is-course-3 .rnp-create-go {
  background: #b45309;
}
.rnp-create-card.is-course-3 .rnp-create-go:hover {
  background: #92400e;
}
.rnp-create-card.is-course-4 .rnp-create-go {
  background: #6d28d9;
}
.rnp-create-card.is-course-4 .rnp-create-go:hover {
  background: #5b21b6;
}
.rnp-paper [contenteditable="true"] {
  min-width: 0.7em;
  min-height: 1.1em;
  border-radius: 2px;
  outline: none;
  cursor: text;
}
.rnp-paper [contenteditable="true"]:hover {
  background: #ecfeff;
}
.rnp-paper [contenteditable="true"]:focus {
  background: #fff7ed;
  box-shadow: inset 0 0 0 1px #fb923c;
}
.rnp-grid td.rnp-calc {
  background: #f8fafc;
  color: #334155;
  cursor: default;
  font-variant-numeric: tabular-nums;
}
.rnp-grid .rnp-total td.rnp-calc,
.rnp-grid .rnp-extra td.rnp-calc,
.rnp-grid tr.rnp-star td.rnp-calc {
  background: #fef3c7;
}
.rnp-scroll-shell {
  position: relative;
  min-width: 0;
  max-width: 100%;
}
.rnp-hscroll {
  position: sticky;
  top: 0;
  z-index: 30;
  overflow-x: auto;
  overflow-y: hidden;
  height: 14px;
  margin: 0 0 0.35rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(2, 62, 138, 0.45) #e2e8f0;
}
.rnp-hscroll.is-idle {
  display: none;
}
.rnp-hscroll-spacer {
  height: 1px;
  pointer-events: none;
}
.rnp-hscroll::-webkit-scrollbar {
  height: 10px;
}
.rnp-hscroll::-webkit-scrollbar-thumb {
  background: rgba(2, 62, 138, 0.4);
  border-radius: 999px;
}
.rnp-hscroll::-webkit-scrollbar-track {
  background: #e2e8f0;
  border-radius: 999px;
}
.rnp-paper-wrap {
  --rnp-zoom: 1;
  overflow-x: auto;
  padding-bottom: 1.5rem;
  zoom: var(--rnp-zoom);
  scrollbar-width: thin;
  scrollbar-color: rgba(2, 62, 138, 0.45) transparent;
}
.rnp-paper-wrap::-webkit-scrollbar {
  height: 12px;
}
.rnp-paper-wrap::-webkit-scrollbar-thumb {
  background: rgba(2, 62, 138, 0.4);
  border-radius: 999px;
}
.rnp-paper {
  transform-origin: top left;
  width: 2480px;
  min-width: 2480px;
  max-width: 2480px;
  background: #fff;
  color: #111;
  border: 1px solid #1f2937;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
  padding: 20px 16px 24px;
  font-family: "Times New Roman", Times, serif;
  font-size: 12px;
  line-height: 1.25;
}
.rnp-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px 28px;
  margin-bottom: 10px;
  max-width: none;
  align-items: start;
}
.rnp-approve {
  display: block;
  font-size: 12px;
}
.rnp-approve-title {
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.rnp-sign-line { margin: 10px 0 6px; }
.rnp-titleblock {
  text-align: center;
}
.rnp-emblem {
  display: none;
}
.error-emblem {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: #fff;
}
.rnp-org {
  font-weight: 700;
  font-size: 13px;
}
.rnp-college {
  font-weight: 700;
  max-width: 720px;
  margin: 0 auto 8px;
}
.rnp-titleblock h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin: 6px 0 8px;
}
.rnp-meta {
  text-align: center;
  font-size: 14px;
  margin: 8px 0 12px;
  padding: 6px 0;
}
.rnp-section {
  font-weight: 700;
  font-size: 13px;
  margin: 6px 0 4px;
}
.rnp-spec-hint {
  font-size: 10px;
  font-style: italic;
  color: #444;
  margin-top: 2px;
}
.rnp-cal-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
}
.rnp-budget {
  border-collapse: collapse;
  width: 300px;
  flex: 0 0 300px;
  margin-top: 0;
  font-size: 10px;
}
.rnp-budget caption {
  caption-side: top;
  font-weight: 700;
  font-size: 11px;
  text-align: left;
  padding: 0 0 6px;
  color: #111;
}
.rnp-budget th,
.rnp-budget td {
  border: 1px solid #e4e4e4;
  vertical-align: middle;
  padding: 3px 6px;
}
.rnp-budget th {
  text-align: left;
  font-weight: 600;
  background: #f8fafc;
  width: auto;
}
.rnp-budget td {
  width: 48px;
  text-align: center;
  font-weight: 700;
}
.rnp-cal,
.rnp-grid {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.rnp-cal-wrap .rnp-cal {
  width: auto;
  flex: 1 1 auto;
  min-width: 0;
}
.rnp-cal th,
.rnp-cal td,
.rnp-grid th,
.rnp-grid td {
  border: 1px solid #c5c5c5;
  padding: 2px 3px;
  text-align: center;
  vertical-align: middle;
}
.rnp-cal th {
  font-size: 10px;
  font-weight: 700;
  background: #f8fafc;
}
.rnp-cal td { width: 18px; }
.rnp-th { background: #fff; font-weight: 700; }
.rnp-vac { background: #fef9c3; font-weight: 700; }
.rnp-np { background: #e0f2fe; font-weight: 700; }
.rnp-tp { background: #ede9fe; font-weight: 700; }
.rnp-sem { background: #fce7f3; font-weight: 700; }
.rnp-dpa { background: #fee2e2; font-weight: 700; }
.rnp-att { background: #dcfce7; font-weight: 700; }
.rnp-intro { background: #ffedd5; font-weight: 700; }
.rnp-pd { background: #fae8ff; font-weight: 700; }
.rnp-kr { background: #ffedd5; font-weight: 700; }
.rnp-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin: 6px 0 12px;
  font-size: 11px;
}
.rnp-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  min-height: 16px;
  padding: 0 3px;
  text-align: center;
  border: 1px solid #e4e4e4;
  margin-right: 4px;
  font-style: normal;
  font-weight: 700;
  font-size: 10px;
  line-height: 1;
  vertical-align: middle;
}
.rnp-grid {
  font-size: 13px;
  --rnp-seq-w: 78px;
  --rnp-code-w: 78px;
  border-collapse: separate;
  border-spacing: 0;
  user-select: text;
  -webkit-user-select: text;
}
.rnp-grid thead th {
  background: #eef3f8;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.2;
  color: #111;
  white-space: normal;
  overflow-wrap: normal;
  word-break: keep-all;
  hyphens: none;
  overflow: visible;
  padding: 6px 3px;
}
.rnp-grid thead th[rowspan="3"] {
  height: 136px;
  vertical-align: bottom;
}
.rnp-h-vert {
  display: inline-block;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
  hyphens: none;
  line-height: 1.12;
  font-weight: 700;
  font-size: 12px;
  color: #111;
  letter-spacing: 0.01em;
  text-rendering: geometricPrecision;
}
@supports (writing-mode: sideways-lr) {
  .rnp-h-vert {
    writing-mode: sideways-lr;
    transform: none;
  }
}
.rnp-paper.is-first-year .rnp-prev,
.rnp-paper.is-first-year col.rnp-prev {
  display: none;
}
.rnp-grid .rnp-col-seq,
.rnp-grid th.rnp-col-seq,
.rnp-grid td.rnp-seq {
  width: var(--rnp-seq-w);
  min-width: var(--rnp-seq-w);
  max-width: var(--rnp-seq-w);
}
.rnp-grid .rnp-col-code,
.rnp-grid th.rnp-col-code,
.rnp-grid td.rnp-code {
  width: var(--rnp-code-w);
  min-width: var(--rnp-code-w);
  max-width: var(--rnp-code-w);
}
.rnp-grid .rnp-col-name,
.rnp-grid th.rnp-col-name,
.rnp-grid .rnp-name {
  text-align: left;
  font-weight: 600;
  width: 300px;
  min-width: 240px;
}
.rnp-grid .rnp-col-ects {
  width: 52px;
}
.rnp-grid .rnp-col-hours {
  width: 56px;
  min-width: 50px;
}
.rnp-grid .rnp-col-sem {
  width: 48px;
  min-width: 44px;
}
.rnp-grid .rnp-col-teacher,
.rnp-grid th.rnp-col-teacher,
.rnp-grid td.rnp-teacher {
  text-align: left;
  width: 148px;
  min-width: 132px;
  padding: 2px 3px;
  white-space: nowrap;
  overflow: hidden;
  line-height: 1.15;
  vertical-align: middle;
}
/* Оболонка фіксує висоту комірки як у текстового рядка; нативний select у Windows інакше роздуває tr. */
.rnp-grid td.rnp-teacher .rnp-teacher-shell {
  position: relative;
  display: block;
  height: 1.2em;
  min-height: 1.2em;
  max-height: 1.2em;
  overflow: hidden;
  line-height: 1.2;
}
.rnp-grid td.rnp-teacher .rnp-teacher-pick {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  box-sizing: border-box;
  width: 100%;
  height: 28px;
  margin: 0;
  padding: 0 11px 0 0;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%2364748b' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0 center;
  background-size: 8px 5px;
  color: inherit;
  font-family: inherit;
  font-size: 13px;
  font-weight: inherit;
  line-height: 28px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
}
.rnp-grid td.rnp-teacher .rnp-teacher-pick:focus {
  outline: none;
  background-color: #f8fbff;
}
.rnp-grid td.rnp-teacher .rnp-teacher-shell:focus-within {
  box-shadow: inset 0 0 0 1px #86b7fe;
}
.rnp-grid td.rnp-teacher .rnp-teacher-pick::-ms-expand {
  display: none;
}
.rnp-grid th.rnp-col-seq,
.rnp-grid td.rnp-seq,
.rnp-grid th.rnp-col-code,
.rnp-grid td.rnp-code,
.rnp-grid th.rnp-col-name,
.rnp-grid td.rnp-name {
  position: sticky;
  z-index: 3;
  background: #fff;
  box-sizing: border-box;
}
.rnp-grid thead th.rnp-col-seq,
.rnp-grid thead th.rnp-col-code,
.rnp-grid thead th.rnp-col-name {
  z-index: 5;
  background: #eef3f8;
}
.rnp-grid th.rnp-col-seq,
.rnp-grid td.rnp-seq {
  left: 0;
}
.rnp-grid th.rnp-col-code,
.rnp-grid td.rnp-code {
  left: var(--rnp-seq-w);
}
.rnp-grid th.rnp-col-name,
.rnp-grid td.rnp-name {
  left: calc(var(--rnp-seq-w) + var(--rnp-code-w));
  box-shadow: 8px 0 8px -6px rgba(15, 23, 42, 0.28);
}
.rnp-grid .rnp-total td.rnp-seq,
.rnp-grid .rnp-total td.rnp-code,
.rnp-grid .rnp-total td.rnp-name,
.rnp-grid .rnp-extra td.rnp-seq,
.rnp-grid .rnp-extra td.rnp-code,
.rnp-grid .rnp-extra td.rnp-name,
.rnp-grid tr.rnp-star td.rnp-seq,
.rnp-grid tr.rnp-star td.rnp-code,
.rnp-grid tr.rnp-star td.rnp-name {
  background: #fef3c7;
}
.rnp-grid tbody tr[data-kind]:hover > td {
  background: #eff6ff;
}
.rnp-grid tbody tr[data-kind]:hover > td.rnp-calc {
  background: #eff6ff;
}
.rnp-grid tbody tr.rnp-total:hover > td,
.rnp-grid tbody tr.rnp-extra:hover > td,
.rnp-grid tbody tr.rnp-star:hover > td,
.rnp-grid tbody tr.rnp-total:hover > td.rnp-calc,
.rnp-grid tbody tr.rnp-extra:hover > td.rnp-calc,
.rnp-grid tbody tr.rnp-star:hover > td.rnp-calc {
  background: #fde68a;
}
.rnp-grid tbody tr.is-picked > td,
.rnp-grid tbody tr.is-picked > td.rnp-calc,
.rnp-grid tbody tr.is-picked > td.rnp-seq,
.rnp-grid tbody tr.is-picked > td.rnp-code,
.rnp-grid tbody tr.is-picked > td.rnp-name {
  background: #dbeafe;
}
.rnp-grid tbody tr.rnp-total.is-picked > td,
.rnp-grid tbody tr.rnp-extra.is-picked > td,
.rnp-grid tbody tr.rnp-star.is-picked > td {
  background: #fde68a;
}
.rnp-grid td.rnp-seq {
  cursor: pointer;
}
.rnp-grid td.rnp-seq [contenteditable="true"] {
  cursor: text;
}
.rnp-grid .rnp-block td,
.rnp-grid .rnp-add-row td {
  box-sizing: border-box;
}
.rnp-grid .rnp-block td {
  background: #dbeafe;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
  text-align: center;
  position: relative;
  padding: 6px 12px;
}
.rnp-grid .rnp-block [data-block] {
  display: inline-block;
  min-width: 0;
  max-width: 100%;
  padding: 0 8px;
  text-align: center;
}
.rnp-block-add {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  border: 1px solid #1d4ed8;
  background: #fff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  border-radius: 0.375rem;
  padding: 3px 10px 3px 8px;
  line-height: 1.3;
  cursor: pointer;
  font-family: inherit;
  z-index: 2;
}
.rnp-block-add:hover,
.rnp-block-add:focus {
  background: #1d4ed8;
  color: #fff;
  outline: none;
}
.rnp-add-row td {
  background: #f8fffe;
  text-align: left;
  padding: 0 0 0 58px;
  border-style: dashed;
  border-color: #99f6e4;
}
.rnp-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 3px 0;
  border: 1px dashed #0f766e;
  background: #fff;
  color: #0f766e;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  border-radius: 0.375rem;
  padding: 4px 12px 4px 10px;
  line-height: 1.3;
  cursor: pointer;
  font-family: inherit;
}
.rnp-add-btn:hover,
.rnp-add-btn:focus {
  background: #0f766e;
  color: #fff;
  border-style: solid;
  outline: none;
}
.rnp-grid td.rnp-seq {
  padding: 1px 2px;
}
.rnp-seq-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 22px;
}
.rnp-grid tr.rnp-subject td.rnp-seq,
.rnp-grid tr.rnp-extra td.rnp-seq {
  padding-left: 2px;
}
.rnp-row-drag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1;
  cursor: grab;
  flex: 0 0 auto;
  touch-action: none;
}
.rnp-row-drag:hover,
.rnp-row-drag:focus {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
  outline: none;
}
.rnp-row-drag:active {
  cursor: grabbing;
}
.rnp-grid tr.is-dragging {
  opacity: 0.45;
}
.rnp-row-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  color: #94a3b8;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}
.rnp-row-del:hover,
.rnp-row-del:focus {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
  outline: none;
}
.rnp-row-split {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  color: #0284c7;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}
.rnp-row-split:hover,
.rnp-row-split:focus {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0369a1;
  outline: none;
}
.rnp-grid .rnp-total td,
.rnp-grid .rnp-extra td,
.rnp-grid tr.rnp-star td {
  background: #fef3c7;
  font-weight: 700;
}
.rnp-grid .rnp-extra td.rnp-name {
  padding-left: 0.85rem;
  font-style: italic;
}
.rnp-empty-blocks {
  list-style: none;
  padding: 0;
  margin: 0 auto 1.35rem;
  display: grid;
  gap: 0.5rem;
  max-width: 40rem;
  text-align: left;
}
.rnp-empty-blocks li {
  background: linear-gradient(180deg, #f3fbff, #e8f4fb);
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  padding: 0.7rem 0.95rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--kep-deep);
  line-height: 1.35;
}
.rnp-foot {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.8fr);
  gap: 8px 28px;
  margin-top: 14px;
  font-size: 12px;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.rnp-foot-date {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  min-width: 0;
}
.rnp-foot-when {
  font-size: 13px;
}
.rnp-foot-protocol {
  font-size: 11px;
  line-height: 1.3;
  max-width: 28em;
}
.rnp-signs {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  min-width: 0;
}
.rnp-sign-row {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(72px, 1.5fr) max-content;
  align-items: end;
  column-gap: 14px;
  min-width: 0;
  width: 100%;
}
.rnp-sign-role {
  text-align: left;
  line-height: 1.25;
}
.rnp-sign-blank {
  min-width: 0;
  border-bottom: 0.6px solid #8a8a8a;
  height: 2.4em;
}
.rnp-sign-name {
  margin-top: 0;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  text-align: left;
  min-width: 0;
}
.rnp-paper.rnp-print-fit {
  min-width: 0 !important;
  max-width: none !important;
  padding: 0 !important;
  box-shadow: none !important;
  border: 0 !important;
}
@media print {
  @page { size: 297mm 210mm; margin: 4mm; }
  html, body {
    background: #fff !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  .paper-journal {
    box-shadow: none !important;
    border: 1px solid #bbb !important;
  }
  .table-wrap { overflow: visible !important; max-height: none !important; }
  .sidebar, .topbar, .noprint, .alert, .kep-toasts, .modal, .nav-toggle, .nav-scrim, .journal-tabs { display: none !important; }
  .journal-stage { display: block; }
  [data-journal-panel][hidden] { display: block !important; }
  .app-shell, .main-col, .content {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    max-height: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #fff !important;
    overflow: visible !important;
  }
  .rnp-paper-wrap {
    overflow: visible !important;
    padding: 0 !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    zoom: 1 !important;
  }
  .rnp-paper,
  .rnp-paper.rnp-print-fit {
    zoom: var(--rnp-print-zoom, 1) !important;
    transform: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    box-shadow: none !important;
    border: 0 !important;
    padding: 0 !important;
    font-family: "Times New Roman", Times, serif !important;
    font-size: 7pt;
    font-weight: 400;
    line-height: 1.08;
    color: #000;
  }
  .rnp-head {
    grid-template-columns: auto minmax(0, 1fr);
    max-width: none;
    gap: 4px 12px;
    margin-bottom: 2px;
    align-items: start;
  }
  .rnp-approve {
    display: block;
  }
  .rnp-emblem {
    display: none !important;
  }
  .rnp-approve { font-size: 8pt; font-weight: 400; }
  .rnp-approve-title { font-size: 8.5pt; font-weight: 700; letter-spacing: 0.06em; }
  .rnp-sign-line { margin: 2px 0; }
  .rnp-org { font-size: 8pt; font-weight: 700; }
  .rnp-college {
    font-size: 8.5pt;
    font-weight: 700;
    margin-bottom: 1px;
    max-width: none;
  }
  .rnp-titleblock h2 {
    font-size: 11pt;
    font-weight: 700;
    margin: 0 0 1px;
    letter-spacing: 0.02em;
  }
  .rnp-spec-hint { font-size: 7pt; font-style: italic; margin-top: 0; }
  .rnp-meta {
    font-size: 9.5pt;
    font-weight: 700;
    margin: 2px 0 3px;
    padding: 0;
  }
  .rnp-section {
    font-size: 9pt;
    font-weight: 700;
    margin: 3px 0 2px;
  }
  .rnp-cal-wrap { gap: 4px; }
  .rnp-cal th,
  .rnp-cal td {
    padding: 1px !important;
    font-size: 6.5pt;
    font-weight: 400;
    color: #000;
    line-height: 1.08;
  }
  .rnp-cal th { font-weight: 400; }
  .rnp-cal td { width: auto; }
  .rnp-budget {
    width: 46mm;
    flex: 0 0 46mm;
    font-size: 7pt;
  }
  .rnp-budget caption { font-size: 7.5pt; font-weight: 700; padding-bottom: 1px; }
  .rnp-budget th,
  .rnp-budget td { padding: 1px 3px; font-weight: 400; }
  .rnp-budget th { font-weight: 400; }
  .rnp-budget td { font-size: 7.5pt; font-weight: 400; }
  .rnp-legend {
    font-size: 7.5pt;
    font-weight: 400;
    margin: 2px 0 3px;
    gap: 2px 10px;
  }
  .rnp-key {
    min-width: 14px;
    min-height: 10px;
    font-size: 6.5pt;
    font-weight: 700;
  }
  .rnp-grid {
    font-size: 6.5pt;
    font-weight: 400;
    width: 100% !important;
    table-layout: fixed;
    page-break-inside: auto;
    break-inside: auto;
    border-collapse: collapse !important;
  }
  .rnp-grid th.rnp-col-seq,
  .rnp-grid td.rnp-seq,
  .rnp-grid th.rnp-col-code,
  .rnp-grid td.rnp-code,
  .rnp-grid th.rnp-col-name,
  .rnp-grid td.rnp-name {
    position: static !important;
    left: auto !important;
    box-shadow: none !important;
    z-index: auto !important;
  }
  .rnp-cal,
  .rnp-budget,
  .rnp-grid {
    border: 0.4px solid #ececec !important;
  }
  .rnp-cal th,
  .rnp-cal td,
  .rnp-budget th,
  .rnp-budget td,
  .rnp-grid th,
  .rnp-grid td {
    border: 0.4px solid #ececec !important;
    box-shadow: none !important;
  }
  .rnp-grid col,
  .rnp-grid .rnp-col-seq,
  .rnp-grid th.rnp-col-seq,
  .rnp-grid td.rnp-seq,
  .rnp-grid .rnp-col-code,
  .rnp-grid th.rnp-col-code,
  .rnp-grid td.rnp-code,
  .rnp-grid .rnp-col-name,
  .rnp-grid th.rnp-col-name,
  .rnp-grid .rnp-name,
  .rnp-grid .rnp-col-ects,
  .rnp-grid .rnp-col-hours,
  .rnp-grid .rnp-col-sem,
  .rnp-grid .rnp-col-teacher,
  .rnp-grid th.rnp-col-teacher,
  .rnp-grid td.rnp-teacher {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }
  .rnp-grid .rnp-col-name,
  .rnp-grid th.rnp-col-name,
  .rnp-grid td.rnp-name {
    width: 16% !important;
  }
  .rnp-grid .rnp-col-teacher,
  .rnp-grid th.rnp-col-teacher,
  .rnp-grid td.rnp-teacher {
    width: 7.5% !important;
  }
  .rnp-grid thead {
    display: table-row-group;
  }
  .rnp-grid tr {
    page-break-inside: avoid;
    break-inside: avoid;
    page-break-after: auto;
  }
  .rnp-grid,
  .rnp-grid thead th,
  .rnp-grid td,
  .rnp-grid td.rnp-name,
  .rnp-grid td.rnp-seq,
  .rnp-grid .rnp-block td,
  .rnp-grid .rnp-total td,
  .rnp-grid .rnp-extra td,
  .rnp-grid .rnp-total td.rnp-calc,
  .rnp-grid .rnp-extra td.rnp-calc {
    font-weight: 400 !important;
  }
  .rnp-grid thead th {
    font-size: 5.5pt;
    font-weight: 400 !important;
    line-height: 1.05;
    overflow: hidden;
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: normal;
    hyphens: none;
    padding: 1px !important;
    color: #000;
    background: #e8eef4 !important;
    height: auto !important;
  }
  .rnp-grid thead th[rowspan="3"] {
    height: auto !important;
  }
  .rnp-h-vert {
    font-size: 5pt;
    font-weight: 400 !important;
    line-height: 1.05;
    letter-spacing: 0;
  }
  .rnp-grid td {
    padding: 1px 1px !important;
    font-size: 8pt;
    font-weight: 400 !important;
    color: #000;
    font-variant-numeric: tabular-nums;
    line-height: 1.05;
  }
  .rnp-grid td.rnp-seq,
  .rnp-grid td.rnp-name {
    font-size: 7.5pt !important;
    font-weight: 400 !important;
  }
  .rnp-grid td.rnp-name {
    text-align: left;
    padding: 1px 2px !important;
  }
  .rnp-grid .rnp-extra td.rnp-name {
    padding-left: 8px !important;
    font-style: italic;
  }
  .rnp-grid td.rnp-teacher {
    white-space: pre-line;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-size: 7.5pt !important;
    font-weight: 400 !important;
    text-align: left;
    padding: 1px 2px !important;
  }
  .rnp-grid .rnp-block td {
    font-size: 7.5pt !important;
    font-weight: 400 !important;
    padding: 1px 3px !important;
    background: #cfe2f3 !important;
    color: #000;
  }
  .rnp-grid .rnp-total td,
  .rnp-grid .rnp-extra td {
    font-size: 8pt;
    font-weight: 400 !important;
    background: #fff2cc !important;
  }
  .rnp-grid .rnp-total td.rnp-calc,
  .rnp-grid .rnp-extra td.rnp-calc {
    background: #fff2cc !important;
  }
  .rnp-zoom, .rnp-block-add, .rnp-row-del, .rnp-row-drag, .rnp-row-split, .rnp-hscroll, .rnp-add-row, .rnp-col-actions, .rnp-row-actions, .rnp-crumb { display: none !important; }
  .rnp-seq-wrap { justify-content: center; min-height: 0; }
  .rnp-grid tr.rnp-subject td.rnp-seq,
  .rnp-grid tr.rnp-extra td.rnp-seq { padding-left: 1px !important; }
  .rnp-foot {
    font-size: 7pt;
    font-weight: 400;
    margin-top: 5px;
    gap: 4px 16px;
    width: 100% !important;
    max-width: 100% !important;
  }
  .rnp-foot-date {
    gap: 8mm;
  }
  .rnp-foot-when { font-size: 7.5pt; }
  .rnp-foot-protocol { font-size: 6.5pt; max-width: none; }
  .rnp-signs { gap: 7mm; }
  .rnp-sign-row {
    grid-template-columns: minmax(0, 0.95fr) minmax(22mm, 1.7fr) max-content;
    column-gap: 8px;
    min-height: 9mm;
    align-items: end;
  }
  .rnp-sign-blank {
    min-width: 22mm !important;
    height: 8mm;
    border-bottom: 0.3pt solid #8a8a8a !important;
  }
  .rnp-sign-name {
    font-size: 8pt;
    font-weight: 700;
    margin-top: 0;
    min-width: 0;
  }
  .rnp-paper [contenteditable="true"],
  .rnp-paper [contenteditable="true"]:hover,
  .rnp-paper [contenteditable="true"]:focus {
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
  }
  .rnp-paper.is-first-year .rnp-prev {
    display: none !important;
  }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

.rnp-hours {
  background: #eef8fc;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1rem 1.1rem;
}
.rnp-hours-kicker {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #4a6a80;
  margin-bottom: 0.7rem;
}
.rnp-hours-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}
.rnp-hours-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: 0.85rem 1rem;
  box-shadow: none;
  cursor: pointer;
}
.rnp-hours-card:disabled {
  cursor: default;
}
.rnp-hours-card.is-active {
  border-color: var(--kep-cyan);
  box-shadow: 0 0 0 3px rgba(0, 166, 201, 0.16);
}
.rnp-hours-card.is-empty {
  opacity: 0.55;
}
.rnp-hours-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #4a6a80;
}
.rnp-hours-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--kep-deep);
}
.rnp-hours-parts,
.rnp-hours-note {
  font-size: 0.82rem;
  color: #4a6a80;
}
.rnp-hours-note { margin-top: 0.75rem; }
@media (max-width: 640px) {
  .rnp-hours-grid { grid-template-columns: 1fr; }
}

.load-help { padding: 0; overflow: hidden; }
.load-help-sum {
  list-style: none;
  cursor: pointer;
  font-weight: 800;
  padding: 1rem 1.2rem;
}
.load-help-sum::-webkit-details-marker { display: none; }
.load-help[open] .load-help-sum { border-bottom: 1px solid var(--line); }
.load-help-body { padding: 0 1.2rem 1.2rem; }
.load-steps {
  margin: 0 0 0.9rem;
  padding-left: 1.15rem;
}
.load-steps li + li { margin-top: 0.55rem; }
.load-norms {
  font-size: 0.86rem;
  color: #4a6a80;
  background: #f5fbfe;
  border-radius: 0.85rem;
  padding: 0.75rem 0.9rem;
}
.load-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.load-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 0.5rem;
  font-weight: 700;
  color: var(--kep-deep);
  background: #fff;
  border: 1px solid var(--line);
  text-decoration: none;
}
.load-tab span {
  font-size: 0.78rem;
  color: #4a6a80;
}
.load-tab.is-on,
.load-tab:hover {
  color: #fff;
  background: var(--kep-blue);
  border-color: var(--kep-blue);
}
.load-tab.is-on span,
.load-tab:hover span { color: rgba(255,255,255,0.82); }
.load-person {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.load-person:hover strong { color: var(--kep-blue); }
.load-rate { min-width: 11rem; }
.load-rate-n { font-weight: 800; }
.load-bar {
  display: block;
  height: 0.45rem;
  margin-top: 0.3rem;
  background: #e8f1f6;
  border-radius: 999px;
  overflow: hidden;
}
.load-bar.is-lg { height: 0.7rem; }
.load-bar > span {
  display: block;
  height: 100%;
  background: var(--kep-cyan);
  border-radius: inherit;
}
.load-bar > span.is-cap { background: #f59e0b; }
.load-bar > span.is-over { background: #e11d48; }
.load-flag {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
}
.load-flag.is-over { color: #be123c; }
.load-flag.is-cap { color: #b45309; }
.load-flag.is-warn { color: var(--kep-warn-text); }
.load-recipe {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.35rem;
}
.load-recipe span {
  font-size: 0.75rem;
  color: #4a6a80;
  background: #f3f8fb;
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
}
.load-assign {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 16rem;
}
.load-assign .form-select { min-width: 0; flex: 1; }
.load-idle {
  padding: 0 1rem 1rem;
}
.load-idle summary {
  cursor: pointer;
  font-weight: 800;
  padding: 0.4rem 0 0.7rem;
}
.load-page-head {
  min-width: 0;
  max-width: 100%;
}
.load-page-head > * {
  min-width: 0;
  max-width: 100%;
}
.load-idle summary span { color: #4a6a80; font-size: 0.85rem; }
.load-idle .load-cards { padding: 0.2rem 0 0; }
.load-filters {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1.15rem;
  padding: 1rem 1.1rem 1.05rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  box-shadow: 0 10px 24px rgba(0, 119, 182, 0.06);
  max-width: 100%;
  min-width: 0;
  overflow: visible;
}
.load-filters .stu-filter-bar {
  align-items: stretch;
  max-width: 100%;
  min-width: 0;
  overflow: visible;
}
.load-filters .kep-combo {
  flex: 1 1 14rem;
  min-width: 0;
  z-index: 1;
}
.load-filters .kep-combo.is-open {
  z-index: 40;
}
.load-filters .kep-combo-field > .bi-person {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  color: #4a6a80;
  font-size: 1.05rem;
  pointer-events: none;
}
.load-filters .kep-combo-field .form-control {
  padding-left: 2.7rem;
}
.load-filters .load-search {
  flex: 1 1 16rem;
  min-width: min(100%, 14rem);
  margin: 0;
}
.load-filters .stu-filter-field {
  position: relative;
  min-width: 0;
  flex: 1 1 8.5rem;
}
.load-filters .stu-filter-field > i {
  display: grid;
  place-items: center;
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  color: #4a6a80;
  font-size: 1.05rem;
  pointer-events: none;
}
.load-filters .stu-filter-field .form-select {
  height: 3rem;
  min-width: 0;
  width: 100%;
  padding: 0.55rem 2.2rem 0.55rem 2.55rem;
  border-radius: 0.9rem;
  border-color: rgba(2, 62, 138, 0.14);
  background-color: #f7fbfe;
  font-size: 0.95rem;
  font-weight: 700;
}
.load-filters .stu-filter-field .form-select:focus,
.load-filters .stu-filter-field .form-select.is-picked {
  background: #fff;
  border-color: var(--kep-cyan);
  box-shadow: 0 0 0 4px rgba(0, 180, 216, 0.12);
}
.load-search {
  position: relative;
  display: block;
  margin: 0;
}
.load-search > i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #4a6a80;
  font-size: 1.05rem;
  pointer-events: none;
}
.load-search .form-control {
  height: 3rem;
  padding: 0.55rem 2.8rem 0.55rem 2.7rem;
  border-radius: 0.9rem;
  border-color: rgba(2, 62, 138, 0.14);
  background: #f7fbfe;
  font-size: 1rem;
  font-weight: 600;
}
.load-search .form-control:focus,
.load-search .form-control.is-picked {
  background: #fff;
  border-color: var(--kep-cyan);
  box-shadow: 0 0 0 4px rgba(0, 180, 216, 0.12);
}
.load-search-clear {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 0.55rem;
  display: grid;
  place-items: center;
  padding: 0;
  background: transparent;
  color: #4a6a80;
}
.load-search-clear:hover {
  background: #e8f6fc;
  color: var(--kep-deep);
}
.load-search-clear[hidden] { display: none; }
.load-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.load-pills-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-right: 0.25rem;
  font-size: 0.78rem;
  font-weight: 800;
  color: #4a6a80;
  letter-spacing: 0.02em;
}
.load-pill {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.1rem;
  padding: 0.28rem 0.85rem;
  border: 1px solid rgba(2, 62, 138, 0.14);
  border-radius: 999px;
  background: #f4fafd;
  color: var(--kep-deep);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}
.load-pill:hover {
  border-color: var(--kep-cyan);
  background: #e8f8fc;
  color: var(--kep-blue);
}
.load-pill.is-on {
  background: var(--kep-blue);
  border-color: var(--kep-blue);
  color: #fff;
}
.load-filter-foot {
  display: none;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.load-filter-foot.is-on { display: flex; }
.load-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.load-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  background: #e8f6fc;
  color: var(--kep-deep);
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
}
.load-filter-chip:hover { background: #d8f0fa; color: var(--kep-blue); }
.load-filter-reset {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--kep-blue);
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
}
.load-filter-reset:hover {
  background: #e8f6fc;
  color: var(--kep-deep);
}
.load-catalog-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.15rem 0.15rem 0.85rem;
  color: #4a6a80;
  font-size: 0.88rem;
  font-weight: 700;
}
.load-catalog-sort {
  font-weight: 800;
  color: var(--kep-deep);
  letter-spacing: 0.04em;
}
.load-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16.25rem), 1fr));
  gap: 0.95rem;
  padding: 0.15rem;
  min-width: 0;
}
.load-cards > * { min-width: 0; }
#loadTable .load-cards,
.load-catalog .load-cards { padding: 0; }
#loadTable {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}
#loadTable > .load-catalog {
  padding: 1rem 1.15rem 1.2rem;
  max-width: 100%;
  min-width: 0;
}
.load-cards-empty {
  padding: 1.4rem 0.4rem 0.4rem;
  text-align: center;
  color: #4a6a80;
  font-weight: 600;
}
.load-card {
  position: relative;
  display: block;
  padding: 1.05rem 1.1rem 1rem;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  background: #fff;
  color: inherit;
  text-decoration: none;
  min-width: 0;
  min-height: 11.5rem;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(0, 119, 182, 0.06);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.load-card-body {
  display: grid;
  gap: 0.7rem;
  min-width: 0;
  overflow: hidden;
  padding-right: 2.55rem;
  color: inherit;
  text-decoration: none;
}
.load-card:hover {
  border-color: var(--kep-cyan);
  box-shadow: 0 14px 28px rgba(0, 119, 182, 0.12);
  transform: translateY(-1px);
  color: inherit;
}
.load-card-body:hover { color: inherit; }
.load-card-xls {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 0.55rem;
  color: #b45309;
  background: #fff8ee;
  text-decoration: none;
}
.load-card-xls:hover {
  background: #ffedd5;
  color: #9a3412;
}
.load-card.is-hourly { background: linear-gradient(180deg, #fff8f8 0%, #fff 58%); }
.load-card.is-over { background: linear-gradient(180deg, #fff1f2 0%, #fff 62%); }
.load-card.is-idle { min-height: 0; }
.load-card-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  overflow: hidden;
}
.load-card-head > .min-w-0 {
  flex: 1 1 auto;
}
.load-card-head span {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #4a6a80;
}
.load-card-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: 0.86rem;
  font-weight: 800;
  color: #023e8a;
  background: linear-gradient(180deg, #caf0f8, #90e0ef);
  object-fit: cover;
  box-shadow: 0 6px 14px rgba(2, 62, 138, 0.14);
}
img.load-card-avatar {
  padding: 0;
  border: 2px solid #90e0ef;
  background: #fff;
}
.load-card-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.load-card-metrics b {
  display: block;
  font-size: 1.28rem;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.load-card-metrics span {
  font-size: 0.74rem;
  font-weight: 800;
  color: #4a6a80;
  letter-spacing: 0.02em;
}
.load-card-hours b {
  display: block;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}
.load-card-hours span,
.load-card-subjects {
  font-size: 0.82rem;
  color: #4a6a80;
}
.load-card-split,
.load-face-split {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #4a6a80;
}
.load-face-split { margin-top: 0.35rem; }
.load-face-split span { white-space: nowrap; }
.load-face-split b { font-weight: 800; }
.load-card-split .is-hourly,
.load-face-split .is-hourly { color: #be123c; }
.load-card-subjects {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.load-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  min-width: 0;
  max-width: 100%;
}
.load-card-tags span {
  min-width: 0;
  flex: 0 1 auto;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0.16rem 0.52rem;
  border-radius: 999px;
  background: #eef8fc;
  color: #234e6a;
  font-size: 0.72rem;
  font-weight: 700;
}
.load-card-tags .is-more {
  background: #e8eef5;
  color: #4a6a80;
}
.load-board {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 0.9fr);
  gap: 1rem;
  align-items: start;
}
.load-board.is-current { grid-template-columns: minmax(0, 1fr); }
.load-face { overflow: hidden; }
.load-face.is-drop {
  outline: 3px solid var(--kep-cyan);
  outline-offset: -3px;
}
.load-face-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1.15rem 1.25rem 0.7rem;
}
.load-face-head.is-compact {
  padding: 0.85rem 1rem 0.45rem;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.load-face-meta {
  display: block;
  font-size: 0.8rem;
  color: #4a6a80;
}
.load-face-sum.is-compact {
  display: grid;
  gap: 0.35rem;
  justify-items: end;
  text-align: right;
}
.load-face-hours-row {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}
.load-face-hours {
  display: block;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.load-face-head.is-compact .load-face-hours {
  font-size: 1.45rem;
}
.load-face-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
  justify-content: flex-end;
  max-width: 34rem;
  background: #f3f6fa;
  border: 1px solid #d7e2ee;
  border-radius: 0.85rem;
  overflow: hidden;
}
.load-metric {
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "k"
    "v"
    "sem";
  justify-items: center;
  align-items: center;
  align-content: stretch;
  gap: 0.12rem;
  min-width: 5.4rem;
  flex: 1 1 5.4rem;
  padding: 0.45rem 0.65rem 0.5rem;
  text-align: center;
  border-left: 1px solid #d7e2ee;
}
.load-metric:first-child { border-left: 0; }
.load-metric-k {
  grid-area: k;
  align-self: start;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #6a8094;
  line-height: 1.1;
  -webkit-font-smoothing: auto;
}
.load-metric-v {
  grid-area: v;
  align-self: center;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  color: #1e3a55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: auto;
  text-rendering: auto;
}
.load-metric-sem {
  grid-area: sem;
  align-self: end;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: #6a8094;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: auto;
  min-height: 1rem;
}
.load-metric-sem b {
  font-weight: 700;
  color: #334e66;
}
.load-metric.is-hourly .load-metric-v { color: #be123c; }
.load-metric.is-budget .load-metric-v { color: #0e7490; }
.load-metric.is-paid .load-metric-v { color: #6d28d9; }
.load-face-fund,
.load-drop-hint,
.load-fund-note {
  margin: 0 0 0.85rem;
  font-size: 0.86rem;
  color: #4a6a80;
}
.load-fund-note { font-size: 0.78rem; }
.load-tariff-wrap { padding: 0 0.4rem 0.6rem; }
.load-tariff {
  --bs-table-bg: transparent;
  min-width: 88rem;
}
.load-tariff-v2 {
  min-width: 64rem;
  border-collapse: separate;
  border-spacing: 0;
  -webkit-font-smoothing: auto;
  text-rendering: geometricPrecision;
}
.load-tariff th,
.load-tariff td {
  white-space: nowrap;
  font-size: 0.82rem;
  vertical-align: middle;
}
.load-tariff-v2 th,
.load-tariff-v2 td {
  font-size: 0.82rem;
}
.load-tariff thead th {
  background: #eef8fc;
  font-weight: 800;
}
.load-tariff .is-name {
  white-space: normal;
  min-width: 12rem;
}
.load-tariff-v2 .is-name {
  min-width: 11rem;
  max-width: 16rem;
}
.load-tariff-v2 .is-muted {
  color: #4a6a80;
  font-weight: 600;
}
.load-tariff-v2 .is-total {
  font-size: 0.84rem;
  color: #0f3a57;
}
.load-tariff-v2 tbody tr:nth-child(even of .js-load-subj-row) td {
  background: #f8fcfe;
}
.load-tariff-v2 tbody tr.js-load-subj-row:hover td.is-sticky-1 {
  box-shadow: inset 3px 0 0 #38bdf8, 1px 0 0 #d7e6f0;
}
.load-tariff .is-fund { background: transparent; }
.load-tariff tfoot th {
  background: #eef8fc;
  font-weight: 800;
}
.load-tariff tfoot tr.is-staff th {
  background: #eefbf6;
  font-weight: 700;
  color: #0f766e;
}
.load-tariff tfoot tr.is-hourly th {
  background: #fff1f2;
  font-weight: 700;
  color: #be123c;
}
.load-tariff-v2 tfoot th {
  vertical-align: middle;
}
.load-tariff-v2 tfoot th.is-fund,
.load-tariff-v2 tfoot th.is-total,
.load-tariff-v2 tfoot th:not(.is-sticky-1) {
  text-align: center;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: auto;
}
.load-tariff-v2 thead th,
.load-tariff-v2 tfoot th {
  position: sticky;
  z-index: 3;
}
.load-tariff-v2 thead th { top: 0; }
.load-tariff-v2 thead tr:nth-child(2) th { top: 2.15rem; }
.load-tariff-v2 tfoot th {
  bottom: 0;
  z-index: 4;
}
.load-tariff-v2 tfoot tr.is-staff th { bottom: 2.05rem; }
.load-tariff-v2 tfoot tr:first-child th { bottom: 4.1rem; }
.load-tariff-v2 .is-sticky {
  position: sticky;
  z-index: 5;
  background: #fff;
  box-shadow: 1px 0 0 #d7e6f0;
}
.load-tariff-v2 thead .is-sticky,
.load-tariff-v2 tfoot .is-sticky {
  z-index: 6;
  background: #eef8fc;
}
.load-tariff-v2 tfoot tr.is-staff .is-sticky { background: #eefbf6; }
.load-tariff-v2 tfoot tr.is-hourly .is-sticky { background: #fff1f2; }
.load-tariff-v2 .is-sticky-1 { left: 0; min-width: 11rem; }
.load-tariff-v2 .is-sticky-2 { left: 11rem; min-width: 7.5rem; }
.load-tariff-v2 .is-sticky-3 { left: 18.5rem; min-width: 6.4rem; text-align: center; }
.load-tariff-v2 .is-sticky-3.is-fund-cell {
  text-align: center;
  vertical-align: middle;
}
.load-tariff-v2 .is-sticky-3 .load-fund-form,
.load-tariff-v2 .is-sticky-3 .load-fund-pair,
.load-tariff-v2 .is-sticky-3 .load-fund-readonly {
  margin-inline: auto;
}
.load-tariff-v2 .is-sticky-3 .load-fund-sem {
  justify-items: center;
  grid-template-columns: 1.05rem minmax(0, auto);
}
.load-tariff-v2 .is-sticky-4 { left: auto; right: 0; box-shadow: -1px 0 0 #d7e6f0; }
.load-subj-band td {
  padding: 0 !important;
  background: #e8f4fb !important;
  border-top: 1px solid #cfe3ef;
}
.load-subj-toggle {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  margin: 0;
  padding: 0.45rem 0.7rem;
  border: 0;
  background: transparent;
  text-align: left;
  color: #0f3a57;
  font-size: 0.82rem;
}
.load-subj-toggle i {
  transition: transform 0.15s ease;
}
.load-subj-toggle[aria-expanded="false"] i {
  transform: rotate(-90deg);
}
.load-subj-toggle span {
  margin-left: auto;
  color: #4a6a80;
  font-weight: 700;
  font-size: 0.74rem;
}
.load-row-subject {
  font-size: 0.9rem;
  font-weight: 750;
  letter-spacing: 0;
  color: var(--ink);
}
.load-row-subject .small,
.load-tariff-v2 .is-name .small,
.load-tariff-v2 .is-name .text-muted {
  display: inline-block;
  margin-top: 0.12rem;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
  color: #3d5a73;
  opacity: 1;
  -webkit-font-smoothing: auto;
}
.load-bare-badge {
  display: inline-block;
  margin-top: 0.2rem;
  padding: 0.08rem 0.4rem;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 0.72rem;
  font-weight: 800;
}
.load-recipe.is-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  margin-top: 0.25rem;
}
.load-recipe.is-row span {
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: #eef8fc;
  color: #3d5a73;
  font-size: 0.72rem;
  font-weight: 750;
}
.load-fund-chips {
  --fund-pad: 0.14rem;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: 0;
  min-width: 4.7rem;
  padding: var(--fund-pad);
  border-radius: 999px;
  border: 1px solid var(--bs-border-color, #dee2e6);
  background: var(--bs-tertiary-bg, #f8f9fa);
  isolation: isolate;
}
.load-fund-thumb {
  position: absolute;
  top: var(--fund-pad);
  bottom: var(--fund-pad);
  left: var(--fund-pad);
  width: calc(50% - var(--fund-pad));
  border-radius: 999px;
  background: var(--bs-info);
  box-shadow: 0 4px 10px rgba(13, 202, 240, 0.28);
  transform: translateX(0);
  transition:
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.32s ease,
    box-shadow 0.32s ease;
  z-index: 0;
  pointer-events: none;
}
.load-fund-chips.is-contract .load-fund-thumb {
  background: var(--bs-warning);
  box-shadow: 0 4px 10px rgba(255, 193, 7, 0.32);
  transform: translateX(100%);
}
.load-fund-chip {
  position: relative;
  z-index: 1;
  border: 0;
  border-radius: 999px;
  padding: 0.28rem 0.42rem;
  background: transparent;
  color: var(--bs-secondary-color, #6c757d);
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
  transition: color 0.28s ease;
}
.load-fund-chip.is-on {
  color: #000;
}
.load-fund-chip:not(.is-on):hover {
  color: var(--bs-body-color, #212529);
}
.load-fund-chip:focus-visible {
  outline: 2px solid var(--bs-primary, #0d6efd);
  outline-offset: 1px;
}
.load-fund-pair {
  min-width: 6.4rem;
  display: grid;
  gap: 0.45rem;
}
.load-fund-sem {
  display: grid;
  grid-template-columns: 1.05rem minmax(0, 1fr);
  align-items: center;
  gap: 0.35rem;
}
.load-fund-sem + .load-fund-sem {
  padding-top: 0.35rem;
  border-top: 1px dashed var(--bs-border-color, #dee2e6);
}
.load-fund-sem-label {
  color: var(--bs-secondary-color, #6c757d);
  font-size: 0.68rem;
  font-weight: 800;
}
.load-fund-readonly {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.load-fund-readonly .badge {
  font-size: 0.7rem;
  font-weight: 700;
}
.load-items {
  display: grid;
  gap: 0.7rem;
  padding: 0 1.15rem 1.2rem;
}
.load-item {
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: 0.85rem 1rem;
  background: #fff;
}
.load-item-top {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: start;
}
.load-item h2 {
  margin: 0;
  font-size: 1.02rem;
}
.load-item p { margin: 0.2rem 0 0; color: #4a6a80; font-size: 0.86rem; }
.load-item-hours { text-align: right; }
.load-item-hours strong { display: block; font-size: 1.2rem; }
.load-item-meta { margin-top: 0.45rem !important; }
.load-sems {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-top: 0.65rem;
}
.load-sem {
  background: #f7fbfd;
  border-radius: 0.75rem;
  padding: 0.65rem 0.75rem;
}
.load-sem h3 {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  margin: 0 0 0.4rem;
  font-size: 0.82rem;
  font-weight: 800;
}
.load-sem h3 b { font-weight: 800; }
.load-sem p {
  margin: 0;
  color: #4a6a80;
  font-size: 0.82rem;
}
@media (max-width: 720px) {
  .load-sems { grid-template-columns: 1fr; }
}
.load-free-head { padding: 1.1rem 1.15rem 0.5rem; }
.load-free-list {
  display: grid;
  gap: 0.85rem;
  padding: 0.4rem 1rem 1.1rem;
  max-height: calc(100vh - 8rem);
  overflow: auto;
}
.load-free-subject {
  display: grid;
  gap: 0.45rem;
}
.load-free-subject h3 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.3;
}
.load-free-subject h3 span {
  font-weight: 600;
  color: #4a6a80;
}
.load-chip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem 0.7rem;
  align-items: center;
  padding: 0.7rem 0.8rem;
  border: 1px dashed var(--line);
  border-radius: 0.85rem;
  background: #fff;
  cursor: grab;
}
.load-chip strong { display: block; }
.load-chip span { font-size: 0.78rem; color: #4a6a80; }
.load-chip-hours { text-align: right; }
.load-chip form { grid-column: 1 / -1; }
@media (max-width: 1280px) {
  .load-board { grid-template-columns: 1fr; }
  .load-free-list { max-height: none; }
}
.load-lead {
  max-width: 52rem;
  margin: -0.4rem 0 1.2rem;
  color: #4a6a80;
}
.load-howto .load-steps { padding-left: 1.2rem; }
.load-howto .load-steps li + li { margin-top: 0.55rem; }
.load-archive-note {
  font-size: 0.9rem;
  font-weight: 700;
  color: #b45309;
}
.load-queues {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.load-queue {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--kep-deep);
  background: #fff;
  border: 1px solid var(--line);
  text-decoration: none;
}
.load-queue span { font-size: 0.75rem; color: #4a6a80; }
.load-queue.is-on,
.load-queue:hover {
  color: #fff;
  background: var(--kep-blue);
  border-color: var(--kep-blue);
}
.load-queue.is-on span,
.load-queue:hover span { color: rgba(255,255,255,0.82); }
.load-queue-note {
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
  color: #4a6a80;
}
.load-packs {
  display: grid;
  gap: 0.45rem;
}
.load-pack {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  overflow: hidden;
}
.load-pack summary {
  display: grid;
  grid-template-columns: minmax(8rem, 1.6fr) 4.5rem 5.2rem 6rem;
  gap: 0.5rem;
  align-items: center;
  padding: 0.7rem 1rem;
  cursor: pointer;
  list-style: none;
}
.load-pack summary::-webkit-details-marker { display: none; }
.load-pack summary strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.load-pack summary span {
  font-size: 0.84rem;
  color: #4a6a80;
  text-align: right;
}
.load-pack[open] summary {
  border-bottom: 1px solid var(--line);
  background: #f5fbfe;
}
.load-pack-body { padding: 0.85rem 1rem 1rem; }
.load-form-row {
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  padding: 0.75rem 0.85rem;
  background: #fff;
}
.load-form-row + .load-form-row { margin-top: 0.55rem; }
.load-form-row-top {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: start;
}
.load-form-row-top span {
  display: block;
  font-size: 0.82rem;
  color: #4a6a80;
}
.load-pack-groups,
.load-pack-plan {
  margin: 0 0 0.35rem;
  font-size: 0.86rem;
  color: #4a6a80;
}
.load-pick { margin-top: 0.7rem; max-width: 28rem; }
.load-pick-label {
  display: grid;
  gap: 0.3rem;
  margin: 0;
  font-size: 0.75rem;
  font-weight: 800;
  color: #4a6a80;
}
.load-hits {
  display: grid;
  gap: 0.2rem;
  margin-top: 0.35rem;
  max-height: 14rem;
  overflow: auto;
}
.load-hit {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 0.65rem;
  padding: 0.4rem 0.65rem;
  font-size: 0.86rem;
}
.load-hit:hover,
.load-hit.is-on {
  border-color: var(--kep-blue);
  background: #f5fbfe;
}
.load-pick .btn { margin-top: 0.55rem; }
.load-preview {
  margin: 0.4rem 0 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f766e;
}
.load-preview.is-cap { color: #b45309; }
.load-preview.is-over { color: #be123c; }
@media (max-width: 700px) {
  .load-pack summary {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
  }
  .load-pack summary strong { grid-column: 1 / -1; }
}

@media (max-width: 1440px) {
  .rnp-depts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .rnp-depts { grid-template-columns: 1fr; }
}

.kep-year-bar,
.journal-year-bar,
.rnp-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem;
  min-width: 0;
  max-width: 100%;
}
.kep-year-bar > form,
.journal-year-bar > form,
.rnp-toolbar-actions > form,
.rnp-upload {
  margin: 0;
}
.kep-year-bar .year-switch .form-select,
.journal-year-bar .year-switch .form-select,
.rnp-toolbar-actions .year-switch .form-select,
.kep-year-bar > .btn,
.journal-year-bar > .btn,
.rnp-toolbar-actions > .btn,
.rnp-toolbar-actions .rnp-import-btn {
  height: 2.6rem;
  min-height: 2.6rem;
  box-sizing: border-box;
  padding: 0 1.05rem;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 2.6rem;
  border-radius: 0.5rem;
}
.kep-year-bar .year-switch .form-select,
.journal-year-bar .year-switch .form-select,
.rnp-toolbar-actions .year-switch .form-select {
  /* Залишаємо місце під стрілку – «· поточний» довший за «· новий» */
  padding: 0 2.55rem 0 1.05rem;
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 16px 12px;
}
.kep-year-bar > .btn,
.journal-year-bar > .btn,
.rnp-toolbar-actions > .btn,
.rnp-toolbar-actions .rnp-import-btn {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.year-switch {
  display: grid;
  align-content: end;
  gap: 0.28rem;
  margin: 0;
  min-width: 0;
  width: min(100%, 17.5rem);
}
.year-switch-caption {
  font-size: 0.72rem;
  font-weight: 800;
  color: #4a6a80;
  line-height: 1;
  padding-left: 0.2rem;
}
.year-switch .stu-filter-field { min-width: 0; width: 100%; }
.year-switch .form-select {
  font-weight: 800;
  padding-right: 2.55rem;
  background-color: #fff;
  border-color: rgba(2, 62, 138, 0.16);
}
.year-open-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
  margin-top: 1rem;
}
.year-open-label {
  display: grid;
  gap: 0.3rem;
  margin: 0;
  min-width: 12rem;
  font-size: 0.78rem;
  font-weight: 800;
  color: #4a6a80;
}
.backup-legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}
.backup-legend-item {
  display: grid;
  gap: 0.4rem;
  align-content: start;
  padding: 0.9rem 1rem;
  border-radius: 0.9rem;
  background: #f5fbfe;
  border: 1px solid var(--line);
}
.backup-legend-item p {
  margin: 0;
  font-size: 0.86rem;
  color: #4a6a80;
}
.backup-inside {
  display: grid;
  gap: 0.12rem;
}
.backup-inside strong { font-weight: 800; }
.backup-inside span {
  font-size: 0.78rem;
  color: #4a6a80;
}
.backup-restore-form .backup-journal-field {
  min-width: min(100%, 22rem);
  flex: 1 1 18rem;
}
.backup-fresh {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #0f766e;
  background: #e6fbf6;
  vertical-align: middle;
}
@media (max-width: 900px) {
  .backup-legend { grid-template-columns: 1fr; }
}
.year-term-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
}
.year-term-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.kep-combo {
  position: relative;
  flex: 1 1 18rem;
  min-width: min(100%, 16rem);
}
.kep-combo-field {
  position: relative;
}
.kep-combo-field .form-control {
  height: 3rem;
  padding: 0.7rem 2.4rem 0.7rem 1rem;
  border: 1px solid #c5d4e6;
  border-radius: 0.9rem;
  font-size: 1rem;
  box-shadow: 0 1px 0 rgba(15, 40, 70, 0.04);
}
.kep-combo.is-open .kep-combo-field .form-control,
.kep-combo-field .form-control:focus {
  border-color: #2f80ed;
  box-shadow: 0 0 0 4px rgba(47, 128, 237, 0.16);
}
.kep-combo-field .list-search-clear {
  right: 0.45rem;
}
.kep-combo-list {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 0.35rem);
  margin: 0;
  padding: 0.35rem;
  max-height: 22rem;
  overflow: auto;
  list-style: none;
  background: #fff;
  border: 1px solid #e4edf6;
  border-radius: 0.9rem;
  box-shadow: 0 14px 36px rgba(15, 40, 70, 0.14);
}
.kep-combo-hit {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  margin: 0;
  padding: 0.65rem 0.75rem;
  border: 0;
  border-radius: 0.7rem;
  background: transparent;
  color: #17324a;
  text-align: left;
}
.kep-combo-hit:hover,
.kep-combo-hit.is-on {
  background: #f3f8fd;
}
.kep-combo-ico {
  flex: 0 0 2.1rem;
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #eef4fb;
  color: #3d6b8f;
  font-size: 1.05rem;
}
.kep-combo-ico.is-text {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.kep-combo-ico.is-photo {
  padding: 0;
  overflow: hidden;
  background: #e8eef5;
}
.kep-combo-ico.is-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.kep-combo-copy {
  min-width: 0;
  display: grid;
  gap: 0.1rem;
}
.kep-combo-copy strong {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.kep-combo-copy span {
  color: #6a8196;
  font-size: 0.8rem;
}
.kep-combo-empty {
  padding: 0.9rem 0.8rem;
  color: #6a8196;
  text-align: center;
}
@media (max-width: 576px) {
  .kep-combo-field .form-control {
    height: 2.75rem;
    font-size: 0.95rem;
  }
}

.hours-plan-stick {
  position: sticky;
  top: var(--page-sticky-top, 4.85rem);
  z-index: 30;
  margin: 0 0 1rem;
  padding: 0.7rem 0.9rem 0.75rem;
  border: 1px solid #d7e6f2;
  border-radius: 1.05rem;
  background: rgba(247, 251, 255, 0.96);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 28px rgba(15, 40, 80, 0.06);
}
.hours-plan-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem 1rem;
}
.hours-plan-lead {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  flex: 1 1 16rem;
}
.hours-plan-sub {
  margin-top: 0.15rem;
  color: #6a8196;
  font-size: 0.86rem;
  line-height: 1.35;
}
.hours-plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
.hours-plan-stick .hours-dirty-note {
  margin: 0.65rem 0 0;
}
.hours-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 1.15rem;
  margin: 0.7rem 0 0;
  padding: 0.6rem 0 0;
  border-top: 1px solid #dceaf4;
  background: transparent;
}
.hours-legend-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.4rem;
}
.hours-legend-title {
  color: #7b91a5;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-right: 0.1rem;
}
.hours-legend-group.is-core .hours-legend-title { color: #1e40af; }
.hours-legend-group.is-extra .hours-legend-title { color: #92400e; }
.hours-legend-group.is-hourly .hours-legend-title { color: #0f766e; }
.hours-legend-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.28rem;
}
.hours-legend-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.55rem;
  padding: 0.12rem 0.55rem;
  border: 1px solid #d5e6f2;
  border-radius: 999px;
  background: #fff;
  color: #0c4a6e;
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: help;
}
.hours-legend-chip.is-core,
.hours-legend-chip.is-extra,
.hours-legend-chip.is-hourly {
  border-width: 1px;
}
/* Пастель як у легенді журналу – м’які фони, спокійний текст. */
.hours-legend-chip.is-kind-lecture,
.hours-kind-cell.is-kind-lecture:not(.is-hourly) { --hk-bg: #dbeafe; --hk-bd: #93c5fd; --hk-fg: #1e40af; }
.hours-legend-chip.is-kind-lab,
.hours-kind-cell.is-kind-lab:not(.is-hourly) { --hk-bg: #ede9fe; --hk-bd: #c4b5fd; --hk-fg: #6d28d9; }
.hours-legend-chip.is-kind-practice,
.hours-kind-cell.is-kind-practice:not(.is-hourly) { --hk-bg: #dcfce7; --hk-bd: #86efac; --hk-fg: #166534; }
.hours-legend-chip.is-kind-consult,
.hours-kind-cell.is-kind-consult:not(.is-hourly) { --hk-bg: #cffafe; --hk-bd: #67e8f9; --hk-fg: #0e7490; }
.hours-legend-chip.is-kind-preexam,
.hours-kind-cell.is-kind-preexam:not(.is-hourly) { --hk-bg: #fef3c7; --hk-bd: #fcd34d; --hk-fg: #92400e; }
.hours-legend-chip.is-kind-credit,
.hours-kind-cell.is-kind-credit:not(.is-hourly) { --hk-bg: #ccfbf1; --hk-bd: #5eead4; --hk-fg: #0f766e; }
.hours-legend-chip.is-kind-exam,
.hours-kind-cell.is-kind-exam:not(.is-hourly) { --hk-bg: #e0e7ff; --hk-bd: #a5b4fc; --hk-fg: #3730a3; }
.hours-legend-chip.is-kind-course,
.hours-kind-cell.is-kind-course:not(.is-hourly) { --hk-bg: #fae8ff; --hk-bd: #e879f9; --hk-fg: #a21caf; }
.hours-legend-chip.is-kind-field_practice,
.hours-kind-cell.is-kind-field_practice:not(.is-hourly) { --hk-bg: #d9f99d; --hk-bd: #bef264; --hk-fg: #3f6212; }
.hours-legend-chip.is-kind-defense,
.hours-kind-cell.is-kind-defense:not(.is-hourly) { --hk-bg: #e2e8f0; --hk-bd: #cbd5e1; --hk-fg: #334155; }
/* Погодинні (п) – ті самі пастелі, трохи світліший фон. */
.hours-legend-chip.is-hourly.is-kind-lecture,
.hours-kind-cell.is-hourly.is-kind-lecture { --hk-bg: #eff6ff; --hk-bd: #93c5fd; --hk-fg: #1e40af; }
.hours-legend-chip.is-hourly.is-kind-lab,
.hours-kind-cell.is-hourly.is-kind-lab { --hk-bg: #f5f3ff; --hk-bd: #c4b5fd; --hk-fg: #6d28d9; }
.hours-legend-chip.is-hourly.is-kind-practice,
.hours-kind-cell.is-hourly.is-kind-practice { --hk-bg: #f0fdf4; --hk-bd: #86efac; --hk-fg: #166534; }
.hours-legend-chip.is-hourly.is-kind-consult,
.hours-kind-cell.is-hourly.is-kind-consult { --hk-bg: #ecfeff; --hk-bd: #67e8f9; --hk-fg: #0e7490; }
.hours-legend-chip.is-hourly.is-kind-preexam,
.hours-kind-cell.is-hourly.is-kind-preexam { --hk-bg: #fffbeb; --hk-bd: #fcd34d; --hk-fg: #92400e; }
.hours-legend-chip.is-hourly.is-kind-credit,
.hours-kind-cell.is-hourly.is-kind-credit { --hk-bg: #f0fdfa; --hk-bd: #5eead4; --hk-fg: #0f766e; }
.hours-legend-chip.is-hourly.is-kind-exam,
.hours-kind-cell.is-hourly.is-kind-exam { --hk-bg: #eef2ff; --hk-bd: #a5b4fc; --hk-fg: #3730a3; }
.hours-legend-chip.is-hourly.is-kind-course,
.hours-kind-cell.is-hourly.is-kind-course { --hk-bg: #fdf4ff; --hk-bd: #e879f9; --hk-fg: #a21caf; }
.hours-legend-chip.is-hourly.is-kind-field_practice,
.hours-kind-cell.is-hourly.is-kind-field_practice { --hk-bg: #f7fee7; --hk-bd: #bef264; --hk-fg: #3f6212; }
.hours-legend-chip.is-hourly.is-kind-defense,
.hours-kind-cell.is-hourly.is-kind-defense { --hk-bg: #f8fafc; --hk-bd: #cbd5e1; --hk-fg: #334155; }
.hours-legend-chip.is-kind-lecture,
.hours-legend-chip.is-kind-lab,
.hours-legend-chip.is-kind-practice,
.hours-legend-chip.is-kind-consult,
.hours-legend-chip.is-kind-preexam,
.hours-legend-chip.is-kind-credit,
.hours-legend-chip.is-kind-exam,
.hours-legend-chip.is-kind-course,
.hours-legend-chip.is-kind-field_practice,
.hours-legend-chip.is-kind-defense {
  background: var(--hk-bg);
  border-color: var(--hk-bd);
  color: var(--hk-fg);
}
.hours-legend-chip.is-hourly {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hk-bd) 35%, transparent);
}
.hours-legend-chip:hover {
  filter: brightness(0.97);
}
@media (max-width: 720px) {
  .hours-plan-stick {
    border-radius: 0.85rem;
    padding: 0.65rem 0.7rem 0.7rem;
  }
  .hours-plan-actions {
    width: 100%;
  }
  .hours-plan-actions .btn {
    flex: 1 1 auto;
  }
}
.hours-plan-list {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}
.hours-card {
  border: 1px solid #d7e6f2;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 76, 117, 0.05);
  overflow: hidden;
}
.hours-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 0.75rem 0.9rem;
  align-items: start;
  padding: 0.95rem 1rem;
  background: linear-gradient(180deg, #f7fbfe 0%, #eef6fb 100%);
  border-bottom: 1px solid #dceaf4;
}
.hours-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
}
.hours-card-seq {
  min-width: 2.4rem;
  color: #0c4a6e;
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 2rem;
  text-align: center;
}
.hours-seq-input {
  width: 2.6rem;
  border: 1px solid transparent;
  border-radius: 0.45rem;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 800;
  text-align: center;
}
.hours-card-title {
  min-width: 0;
}
.hours-card-title h2,
.hours-name-input {
  margin: 0;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 0.45rem;
  background: transparent;
  color: #12324a;
  font-size: 1.02rem;
  font-weight: 750;
  line-height: 1.35;
}
.hours-name-input {
  padding: 0.15rem 0.25rem;
}
.hours-seq-input:focus,
.hours-name-input:focus,
.hours-teacher-pick:focus,
.hours-val-input:focus {
  outline: none;
  border-color: #7db7e0;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(14, 116, 144, 0.12);
}
.hours-card-meta {
  margin-top: 0.25rem;
  color: #5b7388;
  font-size: 0.82rem;
  font-weight: 600;
}
.hours-card-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}
.hours-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #d5e6f2;
  color: #5b7388;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}
.hours-pill b {
  color: #0c4a6e;
  font-size: 0.9rem;
}
.hours-pill.is-sum {
  background: #e0f2fe;
  border-color: #bae6fd;
  color: #075985;
}
.hours-card.is-collapsed .hours-card-head {
  border-bottom: 0;
}
.hours-card-overview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.75rem 1rem 0.95rem;
  background: #fbfdff;
}
.hours-overview-people {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-width: 0;
  flex: 1 1 14rem;
}
.hours-overview-person {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
  max-width: 100%;
  padding: 0.4rem 0.65rem;
  border: 1px solid #dceaf4;
  border-radius: 0.7rem;
  background: #fff;
}
.hours-overview-person.is-second {
  border-color: #fbcfe8;
  background: #fff7fb;
}
.hours-overview-person.is-vacancy {
  border-color: #fed7aa;
  background: #fffbeb;
}
.hours-overview-name {
  color: #12324a;
  font-size: 0.9rem;
  font-weight: 750;
}
.hours-overview-hours {
  color: #5b7388;
  font-size: 0.78rem;
  font-weight: 700;
}
.hours-overview-empty {
  color: #7a93a8;
  font-size: 0.86rem;
  font-weight: 650;
}
.hours-card-body {
  display: grid;
  gap: 0.7rem;
  padding: 0.75rem 1rem 1rem;
}
.hours-quick-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.hours-quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2rem;
  padding: 0.25rem 0.65rem;
  border: 1px solid #d5e6f2;
  border-radius: 999px;
  background: #fff;
  color: #0c4a6e;
  font-size: 0.78rem;
  font-weight: 750;
  white-space: nowrap;
}
.hours-quick-btn:hover,
.hours-quick-btn.is-on {
  background: #e8f4fc;
  border-color: #9ec5dc;
}
.hours-shares {
  display: grid;
  gap: 0.65rem;
}
.hours-share-line {
  border: 1px solid #dceaf4;
  border-radius: 0.75rem;
  background: #fff;
  padding: 0.7rem 0.75rem 0.8rem;
}
.hours-share-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.55rem 0.75rem;
  margin-bottom: 0.65rem;
}
.hours-share-who {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  flex: 1 1 auto;
  justify-items: stretch;
}
.hours-share-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
}
.hours-teacher-pick {
  width: 100%;
  max-width: 22rem;
  min-height: 2.15rem;
  border: 1px solid #d5e4f0;
  border-radius: 0.5rem;
  background: #fff;
  padding: 0.25rem 0.45rem;
  color: #12324a;
  font-size: 0.9rem;
  font-weight: 650;
}
.hours-fund-pick,
.hours-fund-label {
  min-height: 1.7rem;
  border: 1px solid #d5e4f0;
  border-radius: 0.45rem;
  background: #fff;
  padding: 0.12rem 0.4rem;
  color: #12324a;
  font-size: 0.78rem;
  font-weight: 750;
  text-transform: lowercase;
}
.hours-fund-label {
  display: inline-flex;
  align-items: center;
  background: #f8fafc;
}
.load-fund-form {
  min-width: 5.8rem;
  margin: 0;
}
.load-fund-sem {
  margin: 0;
}
.load-fund-sem .form-select {
  min-width: 3.6rem;
  padding-top: 0.15rem;
  padding-bottom: 0.15rem;
}
.load-form-fund {
  display: grid;
  gap: 0.2rem;
  justify-items: end;
  align-content: start;
}
.hours-role {
  display: inline-flex;
  align-self: start;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: lowercase;
}
.hours-role.is-vacancy {
  background: #fff7ed;
  color: #c2410c;
}
.hours-role[hidden] {
  display: none !important;
}
.hours-semesters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}
.hours-sem-panel {
  min-width: 0;
  border: 1px solid #e4eef6;
  border-radius: 0.65rem;
  background: #f8fbfe;
  padding: 0.55rem 0.55rem 0.6rem;
}
.hours-sem-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
}
.hours-sem-head strong {
  color: #0c4a6e;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.hours-sem-sum {
  min-width: 1.8rem;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
}
.hours-kind-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(4.4rem, 1fr));
  gap: 0.35rem;
}
.hours-kind-grid.is-hourly {
  margin-top: 0.4rem;
  padding-top: 0.4rem;
  border-top: 1px dashed #99f6e4;
}
.hours-kind-cell {
  display: grid;
  gap: 0.18rem;
  margin: 0;
  min-width: 0;
  border-radius: 0.4rem;
  padding: 0.15rem;
}
.hours-kind-cell span {
  color: #5b7388;
  font-size: 0.68rem;
  font-weight: 750;
  text-align: center;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hours-kind-cell.is-kind-lecture,
.hours-kind-cell.is-kind-lab,
.hours-kind-cell.is-kind-practice,
.hours-kind-cell.is-kind-consult,
.hours-kind-cell.is-kind-preexam,
.hours-kind-cell.is-kind-credit,
.hours-kind-cell.is-kind-exam,
.hours-kind-cell.is-kind-course,
.hours-kind-cell.is-kind-field_practice,
.hours-kind-cell.is-kind-defense {
  background: var(--hk-bg, #f8fafc);
}
.hours-kind-cell.is-kind-lecture span,
.hours-kind-cell.is-kind-lab span,
.hours-kind-cell.is-kind-practice span,
.hours-kind-cell.is-kind-consult span,
.hours-kind-cell.is-kind-preexam span,
.hours-kind-cell.is-kind-credit span,
.hours-kind-cell.is-kind-exam span,
.hours-kind-cell.is-kind-course span,
.hours-kind-cell.is-kind-field_practice span,
.hours-kind-cell.is-kind-defense span {
  color: var(--hk-fg, #5b7388);
}
.hours-kind-cell.is-hourly {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hk-bd, #94a3b8) 45%, transparent);
}
@keyframes hours-save-in {
  from {
    opacity: 0;
    transform: translateY(0.85rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes hours-save-icon-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.hours-save {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1050;
  margin: 0;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  pointer-events: none;
  background: rgba(3, 4, 94, 0.28);
}
.hours-save.is-dirty {
  display: flex;
}
.hours-save-dialog {
  pointer-events: auto;
  width: min(480px, 100%);
  padding: 1.25rem 1.3rem 1.15rem;
  border-radius: 1.2rem;
  background:
    linear-gradient(135deg, rgba(13, 110, 253, 0.07), transparent 42%),
    #fff;
  border: 1px solid #c5dcff;
  box-shadow:
    0 22px 48px rgba(2, 62, 138, 0.22),
    0 2px 0 rgba(255, 255, 255, 0.7) inset;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1rem;
  animation: hours-save-in 0.38s ease-out both;
}
.hours-save-icon {
  flex: 0 0 auto;
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #0d6efd;
  background: linear-gradient(160deg, #e8f1ff, #d7e8ff);
  border: 1px solid #c5dcff;
  box-shadow: 0 6px 14px rgba(13, 110, 253, 0.14);
  animation: hours-save-icon-in 0.35s 0.06s ease-out both;
}
.hours-save-copy {
  flex: 1 1 14rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}
.hours-save-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--kep-deep, #023e8a);
}
.hours-save-lead {
  margin: 0;
  color: #475569;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.42;
}
.hours-save-lead strong {
  color: var(--kep-deep, #023e8a);
  font-weight: 800;
}
.hours-save-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.15rem;
}
.hours-save-actions .btn {
  min-height: 2.35rem;
  padding-inline: 0.95rem;
  border-radius: 0.7rem;
  font-weight: 700;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.hours-save-actions .btn:hover,
.hours-save-actions .btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(2, 62, 138, 0.12);
}
@media (prefers-reduced-motion: reduce) {
  .hours-save-dialog,
  .hours-save-icon {
    animation: none !important;
  }
  .hours-save-actions .btn:hover,
  .hours-save-actions .btn:focus-visible {
    transform: none;
  }
}
.hours-share-total {
  color: #5b7388;
  font-size: 0.76rem;
  font-weight: 700;
}
.hours-val,
.hours-val-input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 2rem;
  border: 1px solid #d8e6f1;
  border-radius: 0.4rem;
  background: #fff;
  color: #12324a;
  font-size: 0.9rem;
  font-weight: 750;
  text-align: center;
  padding: 0.2rem 0.1rem;
  box-shadow: none;
}
.hours-val.is-empty,
.hours-val-input.is-empty {
  color: #9aafc0;
  font-weight: 600;
  border-color: #e4eef5;
  background: #fafcfd;
}
.hours-add-share {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  justify-self: start;
  border: 0;
  background: transparent;
  color: #0c4a6e;
  font-weight: 750;
  font-size: 0.88rem;
  padding: 0.2rem 0.1rem;
}
.hours-add-share:hover {
  color: #0369a1;
}
@media (max-width: 1100px) {
  .hours-card-head {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .hours-card-totals {
    grid-column: 2 / 3;
    justify-content: flex-start;
  }
}
@media (max-width: 900px) {
  .hours-semesters {
    grid-template-columns: 1fr;
  }
  .hours-teacher-pick {
    max-width: none;
  }
}

#kepConfirmModal .modal-dialog {
  max-width: 28rem;
}
#kepConfirmModal .kep-confirm {
  position: relative;
  border: 1px solid #c5dcff;
  border-radius: 1.2rem;
  background:
    linear-gradient(135deg, rgba(13, 110, 253, 0.07), transparent 42%),
    #fff;
  box-shadow:
    0 22px 48px rgba(2, 62, 138, 0.18),
    0 2px 0 rgba(255, 255, 255, 0.7) inset;
  overflow: hidden;
  padding: 1.15rem 1.15rem 1.05rem;
}
#kepConfirmModal.is-warn .kep-confirm {
  border-color: #fcd34d;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.1), transparent 46%),
    #fff;
  box-shadow:
    0 22px 48px rgba(180, 83, 9, 0.16),
    0 2px 0 rgba(255, 255, 255, 0.7) inset;
}
#kepConfirmModal.is-danger .kep-confirm {
  border-color: #fecdd3;
  background:
    linear-gradient(135deg, rgba(220, 53, 69, 0.08), transparent 46%),
    #fff8f8;
  box-shadow:
    0 22px 48px rgba(159, 18, 57, 0.16),
    0 2px 0 rgba(255, 255, 255, 0.7) inset;
}
.kep-confirm-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 2;
}
.kep-confirm-main {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding-right: 1.6rem;
}
.kep-confirm-icon {
  flex: 0 0 auto;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #0d6efd;
  background: linear-gradient(160deg, #e8f1ff, #d7e8ff);
  border: 1px solid #c5dcff;
  box-shadow: 0 6px 14px rgba(13, 110, 253, 0.14);
}
#kepConfirmModal.is-warn .kep-confirm-icon {
  color: #d97706;
  background: linear-gradient(160deg, #fff7ed, #ffedd5);
  border-color: #fcd34d;
  box-shadow: 0 6px 14px rgba(217, 119, 6, 0.16);
}
#kepConfirmModal.is-danger .kep-confirm-icon {
  color: #dc3545;
  background: linear-gradient(160deg, #ffe8ec, #ffd6dc);
  border-color: #fecdd3;
  box-shadow: 0 6px 14px rgba(220, 53, 69, 0.14);
}
.kep-confirm-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-top: 0.1rem;
}
.kep-confirm-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--kep-deep, #023e8a);
  line-height: 1.25;
}
.kep-confirm-text {
  margin: 0;
  color: #475569;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
}
.kep-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.05rem;
}
.kep-confirm-actions .btn {
  min-height: 2.35rem;
  padding-inline: 0.95rem;
  border-radius: 0.7rem;
  font-weight: 700;
}
@media (prefers-reduced-motion: reduce) {
  .load-fund-thumb {
    transition: none;
  }
}
@media (max-width: 720px) {
  .hours-plan-stick {
    position: static;
  }
  .hours-card-head {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.55rem;
  }
  .hours-card-seq {
    grid-column: 1 / 2;
    text-align: left;
    min-width: 0;
    line-height: 1.3;
  }
  .hours-card-title {
    grid-column: 1 / 2;
  }
  .hours-card-actions {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: start;
  }
  .hours-card-totals {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
  .hours-plan-actions .btn {
    flex: 1 1 calc(50% - 0.3rem);
  }
  .hours-kind-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hours-quick-bar {
    gap: 0.35rem;
  }
  .hours-quick-btn {
    flex: 1 1 auto;
    justify-content: center;
  }
  .hours-legend {
    gap: 0.45rem 0.7rem;
  }
}

.journal-rule-alert {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  max-width: 760px;
  margin: 0 0 1.15rem;
  padding: 0.95rem 1.05rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #eff8ff 0%, #e8f4fc 55%, #f0f9ff 100%);
  border: 1px solid #b6d8f2;
  box-shadow: 0 8px 22px rgba(14, 116, 144, 0.08);
  color: #0c4a6e;
}
.journal-rule-alert-icon {
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 0.65rem;
  background: #dff0fb;
  color: #0284c7;
  font-size: 1.2rem;
}
.journal-rule-alert-copy {
  min-width: 0;
}
.journal-rule-alert-copy strong {
  display: block;
  margin: 0 0 0.28rem;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #075985;
}
.journal-rule-alert-copy p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #0c4a6e;
}

.journal-exists {
  display: flex;
  gap: 0.95rem;
  align-items: flex-start;
  margin-bottom: 1.2rem;
  padding: 1rem 1.1rem;
  border-radius: 0.5rem;
  background: linear-gradient(180deg, #fff8ee 0%, #fff4e5 100%);
  border: 1px solid #f6c89a;
  color: #9a3412;
  box-shadow: 0 10px 24px rgba(154, 52, 18, 0.08);
}
.journal-exists-icon {
  width: 2.7rem;
  height: 2.7rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 0.5rem;
  background: #ffedd5;
  color: #c2410c;
  font-size: 1.35rem;
}
.journal-exists-copy h2 {
  margin: 0 0 0.3rem;
  font-size: 1.08rem;
  font-weight: 800;
  color: #9a3412;
}
.journal-exists-copy p {
  margin: 0 0 0.85rem;
  color: #7c2d12;
  line-height: 1.45;
}
.journal-exists .btn {
  border-radius: 0.5rem;
}

.table-responsive,
.table-wrap,
.topics-wrap,
.rnp-paper-wrap,
.load-tariff-wrap {
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
.card, .panel, .dash-hero, .rnp-toolbar {
  min-width: 0;
  max-width: 100%;
}

.nav-toggle {
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #fff;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--kep-deep);
  flex: 0 0 auto;
}
.nav-toggle-bars {
  display: grid;
  gap: 5px;
  width: 1.05rem;
}
.nav-toggle-bars span {
  display: block;
  height: 2px;
  background: currentColor;
  border-radius: 99px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
body.nav-open .nav-toggle-bars span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
body.nav-open .nav-toggle-bars span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle-bars span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 1440px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .nav-toggle { display: inline-flex; }
  .nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1035;
    background: rgba(3, 4, 94, 0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }
  body.nav-open .nav-scrim {
    opacity: 1;
    pointer-events: auto;
  }
  body.nav-open { overflow: hidden; }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    width: min(var(--sidebar), 86vw);
    height: 100dvh;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    box-shadow: 16px 0 40px rgba(2, 62, 138, 0.28);
  }
  body.nav-open .sidebar { transform: none; }
  .topbar {
    z-index: 1020;
    padding: 0.8rem 1.1rem;
  }
  .page-stick,
  .page-toolbar,
  .journal-top,
  .rnp-toolbar {
    top: var(--page-sticky-top, 3.7rem);
    padding-left: 0;
    padding-right: 0;
  }
  .topbar-kicker { display: none; }
  .content {
    padding: 1.1rem 1.15rem 2rem;
  }
  .page-title,
  .journal-title,
  .h3 {
    font-size: 1.42rem;
    overflow-wrap: break-word;
  }
  .page-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 1.15rem;
  }
  .dash-hero .card-body { padding: 1.15rem 1.25rem !important; }
  .dash-stat {
    min-height: 0;
    padding: 0.8rem 0.9rem;
    gap: 0.7rem;
  }
  .dash-stat-icon {
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
  }
  .dash-stat-value { font-size: 1.45rem; }
  .year-switch,
  .year-switch .stu-filter-field {
    min-width: 0;
    width: min(100%, 13rem);
  }
  .kep-year-bar,
  .journal-year-bar,
  .rnp-toolbar-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .load-cards {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr));
    gap: 0.8rem;
  }
  .load-filters { padding: 0.85rem 0.9rem 0.9rem; }
  .load-search .form-control { height: 2.75rem; }
  .load-filters .stu-filter-field .form-select { height: 2.75rem; }
  .journal-lead,
  .text-muted {
    overflow-wrap: break-word;
  }
  .journal-top > :last-child {
    flex: 1 1 auto;
    justify-content: flex-end;
  }
  .journal-legend {
    gap: 0.35rem 0.55rem;
    font-size: 0.82rem;
  }
  .paper-grid th.student-name,
  .paper-grid td.student-name {
    width: max-content;
    min-width: 180px;
    max-width: none;
  }
  .stu-table .stu-person {
    min-width: 12rem;
  }
  .stu-table .stu-person strong {
    white-space: normal;
  }
  .stu-table thead th {
    white-space: nowrap;
  }
  .table-responsive,
  .topics-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .load-assign,
  .load-rate {
    min-width: 0;
  }
  .year-open-label {
    min-width: min(100%, 12rem);
    flex: 1 1 12rem;
  }
  .backup-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .rnp-paper-wrap,
  .load-tariff-wrap {
    overflow-x: auto;
    max-width: 100%;
  }
}

@media (max-width: 760px) {
  .content {
    padding: 1rem 0.9rem max(1.8rem, env(safe-area-inset-bottom));
  }
  .topbar {
    padding: 0.75rem 0.9rem;
    flex-wrap: wrap;
  }
  .topbar-kicker { display: none; }
  .topbar-title { font-size: 0.98rem; }
  .topbar-year { font-size: 0.75rem; }
  .user-chip-copy { display: none; }
  .user-avatar,
  .user-avatar-img {
    width: 34px;
    height: 34px;
  }
  .topbar-btn-text { display: none; }
  .topbar-tools .btn {
    padding-left: 0.55rem;
    padding-right: 0.55rem;
  }
  .page-title,
  .journal-title,
  .h3 {
    font-size: 1.28rem;
  }
  .dash-stat {
    min-height: 0;
    padding: 0.75rem 0.8rem;
    gap: 0.65rem;
  }
  .dash-stat-icon {
    width: 40px;
    height: 40px;
    font-size: 1.05rem;
  }
  .dash-stat-value { font-size: 1.35rem; }
  .kep-year-bar,
  .journal-year-bar,
  .rnp-toolbar-actions {
    width: 100%;
  }
  .year-switch,
  .year-switch .stu-filter-field {
    min-width: 0;
    width: 100%;
    flex: 1 1 100%;
  }
  .kep-year-bar > .btn,
  .journal-year-bar > .btn,
  .rnp-toolbar-actions > .btn,
  .rnp-toolbar-actions .rnp-import-btn {
    flex: 1 1 auto;
    justify-content: center;
  }
  .load-assign {
    min-width: 0;
    flex-wrap: wrap;
    width: 100%;
  }
  .load-rate { min-width: 0; }
  .journal-exists { flex-wrap: wrap; }
  .staff-actions { grid-template-columns: 1fr; }
  .table-wrap { max-height: min(62vh, calc(100dvh - 8rem)); }
  .journal-top > :last-child { flex: 1 1 auto; }
  .text-muted { overflow-wrap: break-word; }
  .paper-grid th.student-name,
  .paper-grid td.student-name {
    width: max-content;
    min-width: 160px;
    max-width: none;
  }
  .journal-tabs {
    display: flex;
    width: 100%;
  }
  .journal-tab {
    flex: 1;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .journal-add {
    grid-template-columns: 1fr;
  }
  .journal-add .is-wide,
  .journal-add .is-hw,
  .journal-add > button {
    grid-column: 1 / -1;
    grid-row: auto;
  }
  .kep-date,
  .journal-theme-close .kep-date {
    min-width: 0;
    width: 100%;
  }
  .journal-theme-close {
    margin-left: 0;
    width: 100%;
  }
  .journal-chip {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .modal-dialog { margin: 0.6rem; }
  .login-choice {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .login-choice-go { display: none; }
}

@media (max-width: 480px) {
  .dash-hero .card-body { padding: 1.1rem !important; }
  .page-icon {
    width: 2.4rem;
    height: 2.4rem;
  }
  .brand-sub { display: none; }
}

/* ===== Темна тема ===== */
html[data-theme="dark"] {
  color-scheme: dark;
  --kep-cyan: #38bdf8;
  --kep-blue: #5bb8e8;
  --kep-deep: #93c5fd;
  --kep-navy: #dbeafe;
  --kep-mint: #2dd4bf;
  --kep-amber: #fbbf24;
  --kep-sky: #152238;
  --kep-warn-bg: #3a2718;
  --kep-warn-bg-strong: #4a2f16;
  --kep-warn-border: #b45309;
  --kep-warn-text: #fdba74;
  --kep-warn-icon: #fb923c;
  --kep-warn-btn: #ea580c;
  --kep-warn-btn-hover: #c2410c;
  --ink: #eef3f9;
  --ink-muted: #c5d4e6;
  --paper: #0b1220;
  --paper-2: #101a2b;
  --surface: #152238;
  --surface-2: #1b2a40;
  --surface-3: #22344f;
  --line: rgba(148, 183, 214, 0.16);
  --line-strong: rgba(148, 183, 214, 0.28);
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 8px 20px rgba(0, 0, 0, 0.28);
  --topbar-bg: rgba(15, 24, 40, 0.92);
  --stick-bg: rgba(15, 24, 40, 0.96);
  --input-bg: #101a2b;
  --input-border: #334863;
  --table-head: #1a2740;
  --table-stripe: rgba(255, 255, 255, 0.025);
  --table-hover: rgba(56, 189, 248, 0.08);
  --body-glow: rgba(56, 189, 248, 0.12);
  --body-grad-a: #0b1220;
  --body-grad-b: #101a2b;
  --theme-toggle-bg: rgba(148, 183, 214, 0.1);
  --theme-toggle-border: rgba(148, 183, 214, 0.22);
  --bs-body-bg: var(--paper);
  --bs-body-color: var(--ink);
  --bs-border-color: var(--line-strong);
  --bs-secondary-color: var(--ink-muted);
  --bs-tertiary-bg: var(--surface-2);
  --bs-secondary-bg: var(--surface);
  --bs-emphasis-color: #f8fbff;
  --bs-heading-color: #f3f7fc;
  --bs-link-color: #7dd3fc;
  --bs-link-hover-color: #bae6fd;
  --bs-card-bg: var(--surface);
  --bs-card-cap-bg: var(--surface-2);
  --bs-modal-bg: var(--surface);
  --bs-modal-border-color: var(--line);
  --bs-dropdown-bg: var(--surface);
  --bs-dropdown-link-color: var(--ink);
  --bs-dropdown-link-hover-bg: var(--surface-3);
  --bs-dropdown-border-color: var(--line);
  --bs-table-bg: transparent;
  --bs-table-color: var(--ink);
  --bs-table-border-color: var(--line);
  --bs-table-striped-bg: var(--table-stripe);
  --bs-table-hover-bg: var(--table-hover);
  --bs-form-control-bg: var(--input-bg);
}

html[data-theme="dark"] body,
html[data-theme="dark"] .content,
html[data-theme="dark"] .main-col {
  color: var(--ink);
}

html[data-theme="dark"] a:not(.nav-link):not(.btn):not(.dash-stat):not(.login-choice):not(.journal-chip):not(.load-card-body) {
  color: #7dd3fc;
}
html[data-theme="dark"] a:not(.nav-link):not(.btn):not(.dash-stat):not(.login-choice):not(.journal-chip):not(.load-card-body):hover {
  color: #bae6fd;
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .list-group-item,
html[data-theme="dark"] .accordion-item,
html[data-theme="dark"] .offcanvas {
  background-color: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}

html[data-theme="dark"] .card.border-0.shadow-sm,
html[data-theme="dark"] .card.shadow-sm {
  box-shadow: var(--shadow-soft) !important;
}

html[data-theme="dark"] .dash-hero,
html[data-theme="dark"] .dash-hero.card {
  background: linear-gradient(145deg, #152238 0%, #1b2a40 55%, #132033 100%);
  color: var(--ink);
  border-color: var(--line) !important;
}

html[data-theme="dark"] .page-title,
html[data-theme="dark"] .page-lead,
html[data-theme="dark"] .eyebrow,
html[data-theme="dark"] .topbar-title,
html[data-theme="dark"] .topbar-kicker,
html[data-theme="dark"] .topbar-year,
html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .form-text,
html[data-theme="dark"] .small.text-muted {
  color: var(--ink-muted) !important;
}
html[data-theme="dark"] .page-title,
html[data-theme="dark"] .topbar-title,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] .h1,
html[data-theme="dark"] .h2,
html[data-theme="dark"] .h3,
html[data-theme="dark"] .fw-bold {
  color: #f3f7fc;
}

html[data-theme="dark"] .user-chip,
html[data-theme="dark"] .user-chip-copy {
  color: var(--ink);
}

html[data-theme="dark"] .dash-stat {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: none;
}
html[data-theme="dark"] a.dash-stat:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}
html[data-theme="dark"] .dash-stat-value { color: #f3f7fc; }
html[data-theme="dark"] .dash-stat-label { color: var(--ink-muted); }
html[data-theme="dark"] .dash-stat-cyan .dash-stat-icon { background: #e0f7ff; color: #0077b6; }
html[data-theme="dark"] .dash-stat-mint .dash-stat-icon { background: #e6fbf6; color: #0f766e; }
html[data-theme="dark"] .dash-stat-amber .dash-stat-icon { background: #fff6d8; color: #b45309; }
html[data-theme="dark"] .dash-stat-rose .dash-stat-icon { background: #ffe8ea; color: #be123c; }

html[data-theme="dark"] .table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--ink);
  --bs-table-border-color: var(--line);
  --bs-table-striped-bg: var(--table-stripe);
  --bs-table-hover-bg: var(--table-hover);
  color: var(--ink);
  border-color: var(--line);
}
html[data-theme="dark"] .table > :not(caption) > * > * {
  background-color: transparent;
  color: inherit;
  border-bottom-color: var(--line);
}
html[data-theme="dark"] .table thead th,
html[data-theme="dark"] .table > thead {
  background: var(--table-head) !important;
  color: var(--ink-muted);
}
html[data-theme="dark"] .table-responsive,
html[data-theme="dark"] .cabinet-access-table,
html[data-theme="dark"] .stu-table-wrap {
  background: transparent;
}

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .form-select:focus,
html[data-theme="dark"] .kep-combo-field .form-control {
  background-color: var(--input-bg);
  color: var(--ink);
  border-color: var(--input-border);
  box-shadow: none;
}
html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .form-select:focus,
html[data-theme="dark"] .kep-combo.is-open .kep-combo-field .form-control,
html[data-theme="dark"] .kep-combo-field .form-control:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.18);
}
html[data-theme="dark"] .form-control::placeholder {
  color: #7f93a8;
}
html[data-theme="dark"] .form-select {
  --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%239db0c5' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}
html[data-theme="dark"] .form-control:disabled,
html[data-theme="dark"] .form-select:disabled,
html[data-theme="dark"] .form-control[readonly] {
  background-color: #152033;
  color: #9db0c5;
}

html[data-theme="dark"] .btn-outline,
html[data-theme="dark"] .btn-outline-primary,
html[data-theme="dark"] .btn-outline-secondary,
html[data-theme="dark"] .btn-outline-danger {
  background: transparent;
  color: #cfe4f5;
  border-color: var(--input-border);
}
html[data-theme="dark"] .btn-outline:hover,
html[data-theme="dark"] .btn-outline-primary:hover,
html[data-theme="dark"] .btn-outline-secondary:hover {
  background: var(--surface-3);
  color: #fff;
  border-color: #4b6785;
  transform: none;
}
html[data-theme="dark"] .btn-solid,
html[data-theme="dark"] .btn-primary {
  background: #0284c7;
  border-color: #0284c7;
  color: #fff;
}
html[data-theme="dark"] .btn-solid:hover,
html[data-theme="dark"] .btn-primary:hover {
  background: #0369a1;
  border-color: #0369a1;
  color: #fff;
}

html[data-theme="dark"] .alert {
  border-color: var(--line);
}
html[data-theme="dark"] .alert-success { background: #12352c; color: #6ee7b7; }
html[data-theme="dark"] .alert-danger { background: #3f151b; color: #fda4af; }
html[data-theme="dark"] .alert-warning {
  background: #1b2433;
  border-color: #f59e0b;
  color: #fef3c7;
}
html[data-theme="dark"] .alert-info { background: #12324a; color: #7dd3fc; }
html[data-theme="dark"] .alert-primary { background: #132033; color: #93c5fd; }

html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer {
  border-color: var(--line);
}
html[data-theme="dark"] .btn-close {
  filter: invert(1) grayscale(100%);
  opacity: 0.7;
}

html[data-theme="dark"] .kep-combo-list {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow);
}
html[data-theme="dark"] .kep-combo-hit { color: var(--ink); }
html[data-theme="dark"] .kep-combo-hit:hover,
html[data-theme="dark"] .kep-combo-hit.is-on { background: var(--surface-3); }
html[data-theme="dark"] .kep-combo-ico { background: #22344f; color: #9db0c5; }
html[data-theme="dark"] .kep-combo-copy span,
html[data-theme="dark"] .kep-combo-empty { color: var(--ink-muted); }
html[data-theme="dark"] .kep-combo-copy strong { color: #eaf2fa; }

html[data-theme="dark"] .kep-toast {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--shadow);
}
html[data-theme="dark"] .kep-toast:hover { color: var(--ink) !important; }
html[data-theme="dark"] .kep-toast strong + span { color: var(--ink-muted); }
html[data-theme="dark"] .kep-toast-icon { background: #45320f; color: #fbbf24; }

html[data-theme="dark"] .stu-filters,
html[data-theme="dark"] .stu-filter-bar,
html[data-theme="dark"] .stu-filter-fields,
html[data-theme="dark"] .load-filters,
html[data-theme="dark"] .cab-access-filters {
  color: var(--ink);
}
html[data-theme="dark"] .stu-filter-chip,
html[data-theme="dark"] .stu-filter-reset,
html[data-theme="dark"] a.stu-filter-reset {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--ink);
}
html[data-theme="dark"] .stu-avatar {
  background: #22344f;
  color: #cfe4f5;
}

html[data-theme="dark"] .nav-link.active {
  color: #0b1220;
  background: #e2eef8;
}
html[data-theme="dark"] .sidebar {
  box-shadow: 8px 0 24px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .cabinet-access-table tr.is-kind-no_account,
html[data-theme="dark"] .cabinet-access-table tr.is-kind-stopped,
html[data-theme="dark"] .cabinet-access-table tr.is-kind-no_email,
html[data-theme="dark"] .cabinet-transcript tr.is-risk-high {
  background: rgba(190, 18, 60, 0.16);
}
html[data-theme="dark"] .cabinet-access-table tr.is-kind-never,
html[data-theme="dark"] .cabinet-access-table tr.is-kind-stale,
html[data-theme="dark"] .cabinet-transcript tr.is-risk-mid {
  background: rgba(180, 83, 9, 0.16);
}
html[data-theme="dark"] .cabinet-risk-pill.is-high { background: #ffe8ea !important; color: #be123c !important; }
html[data-theme="dark"] .cabinet-risk-pill.is-mid { background: #fff6d8 !important; color: #b45309 !important; }
html[data-theme="dark"] .cabinet-risk-pill.is-empty { background: #eef2f7 !important; color: #475569 !important; }

html[data-theme="dark"] .cabinet-subject-avg {
  background: #0284c7 !important;
  color: #fff !important;
}
html[data-theme="dark"] .cabinet-subject-teacher,
html[data-theme="dark"] .cabinet-subject-meta,
html[data-theme="dark"] .cabinet-subject-meta strong {
  color: #d7e3f0 !important;
}
html[data-theme="dark"] .cabinet-subject-progress {
  background: #22344f !important;
}
html[data-theme="dark"] .cabinet-grades th {
  color: #d0dceb !important;
}
html[data-theme="dark"] .cabinet-grades td {
  color: #eef3f9 !important;
}
html[data-theme="dark"] .cab-lesson-type {
  background: #eef6fb !important;
  color: #0c4a6e !important;
}
html[data-theme="dark"] .cab-lesson-type.is-lecture { background: #dbeafe !important; color: #1e40af !important; }
html[data-theme="dark"] .cab-lesson-type.is-laboratory { background: #ede9fe !important; color: #6d28d9 !important; }
html[data-theme="dark"] .cab-lesson-type.is-practical { background: #dcfce7 !important; color: #166534 !important; }
html[data-theme="dark"] .cab-lesson-type.is-seminar { background: #fce7f3 !important; color: #9d174d !important; }
html[data-theme="dark"] .cab-lesson-type.is-individual { background: #e2e8f0 !important; color: #334155 !important; }
html[data-theme="dark"] .cab-lesson-type.is-consultation { background: #cffafe !important; color: #0e7490 !important; }
html[data-theme="dark"] .cab-lesson-type.is-thematic { background: #fef3c7 !important; color: #92400e !important; }
html[data-theme="dark"] .cab-lesson-type.is-semester { background: #d9f99d !important; color: #3f6212 !important; }
html[data-theme="dark"] .cab-lesson-type.is-exam { background: #e0e7ff !important; color: #3730a3 !important; }
html[data-theme="dark"] .cab-lesson-type.is-credit { background: #ccfbf1 !important; color: #0f766e !important; }
html[data-theme="dark"] .cab-lesson-type.is-course_project { background: #fae8ff !important; color: #a21caf !important; }
html[data-theme="dark"] .cab-mark.mark-high {
  background: #bbf7d0 !important;
  color: #14532d !important;
}
html[data-theme="dark"] .cab-mark.mark-mid {
  background: #fde68a !important;
  color: #713f12 !important;
}
html[data-theme="dark"] .cab-mark.mark-low {
  background: #fed7aa !important;
  color: #9a3412 !important;
}
html[data-theme="dark"] .cab-mark.mark-fail {
  background: #fecaca !important;
  color: #7f1d1d !important;
}
html[data-theme="dark"] .cab-mark.mark-absent {
  background: #fb7185 !important;
  color: #fff !important;
}
html[data-theme="dark"] .cab-att.is-present {
  background: #e6fbf6 !important;
  color: #0f766e !important;
}
html[data-theme="dark"] .cab-att.is-absent {
  background: #ffe8ea !important;
  color: #be123c !important;
}
html[data-theme="dark"] .cab-att.is-excused {
  background: #fff6d8 !important;
  color: #b45309 !important;
}
html[data-theme="dark"] .cab-att.is-late {
  background: #e0f2fe !important;
  color: #0369a1 !important;
}
html[data-theme="dark"] .cabinet-absent-note {
  color: #fda4af !important;
}
html[data-theme="dark"] .cabinet-subject-terms span,
html[data-theme="dark"] .cabinet-subject-terms span.is-term {
  background: #eef8fc !important;
  color: #023e8a !important;
}
html[data-theme="dark"] .cabinet-subject-terms span.is-current {
  background: #e8f8f1 !important;
  color: #0f766e !important;
}
html[data-theme="dark"] .cabinet-subject-terms span.is-laboratory {
  background: #ecfeff !important;
  color: #0e7490 !important;
}
html[data-theme="dark"] .cabinet-subject-terms span.is-practical {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
}
html[data-theme="dark"] .cabinet-subject-terms span.is-seminar {
  background: #f5f3ff !important;
  color: #6d28d9 !important;
}
html[data-theme="dark"] .cabinet-subject-terms span.is-control,
html[data-theme="dark"] .cabinet-subject-terms span.is-kkr,
html[data-theme="dark"] .cabinet-subject-terms span.is-mkr {
  background: #fff7ed !important;
  color: #c2410c !important;
}
html[data-theme="dark"] .cab-chart-area {
  fill: rgba(56, 189, 248, 0.16) !important;
}
html[data-theme="dark"] .cab-chart-line {
  stroke: #38bdf8 !important;
}
html[data-theme="dark"] .cab-chart-dot {
  fill: #7dd3fc !important;
  stroke: #0b1220;
  stroke-width: 1.5;
}
html[data-theme="dark"] .cab-chart-grid {
  stroke: #334863 !important;
}
html[data-theme="dark"] .cab-chart-axis,
html[data-theme="dark"] .cab-chart-label {
  fill: #d0dceb !important;
}
html[data-theme="dark"] .cab-chart-val {
  fill: #e0f2fe !important;
  font-weight: 800 !important;
  font-size: 12px !important;
}

html[data-theme="dark"] .page-toolbar,
html[data-theme="dark"] .rnp-toolbar,
html[data-theme="dark"] .journal-toolbar,
html[data-theme="dark"] .list-search,
html[data-theme="dark"] .staff-card,
html[data-theme="dark"] .load-card {
  background-color: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

html[data-theme="dark"] .bg-white,
html[data-theme="dark"] .bg-light,
html[data-theme="dark"] .bg-body,
html[data-theme="dark"] .bg-body-tertiary {
  background-color: var(--surface) !important;
  color: var(--ink) !important;
}

html[data-theme="dark"] .border,
html[data-theme="dark"] .border-top,
html[data-theme="dark"] .border-bottom,
html[data-theme="dark"] .border-start,
html[data-theme="dark"] .border-end {
  border-color: var(--line) !important;
}

html[data-theme="dark"] .login-wrap {
  background: var(--paper);
}
html[data-theme="dark"] .login-panel {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}
html[data-theme="dark"] .login-copy,
html[data-theme="dark"] .login-kicker {
  color: var(--ink-muted);
}
html[data-theme="dark"] .login-choice {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--ink);
}
html[data-theme="dark"] .login-choice:hover {
  background: var(--surface-3);
}

html[data-theme="dark"] .journal-sheet,
html[data-theme="dark"] .journal-grid,
html[data-theme="dark"] .jr-wrap,
html[data-theme="dark"] .marks-table,
html[data-theme="dark"] table.journal,
html[data-theme="dark"] .paper-grid {
  background: var(--surface);
  color: var(--ink);
}
html[data-theme="dark"] .mark-input,
html[data-theme="dark"] .mark-input.readonly {
  background: #152238 !important;
  color: #c5d4e6 !important;
  box-shadow: inset 0 0 0 1px #334863 !important;
  border: 0 !important;
}
html[data-theme="dark"] .mark-input {
  caret-color: #38bdf8 !important;
}
html[data-theme="dark"] .mark-input:focus {
  background: #1b2a40 !important;
  color: #f3f7fc !important;
  outline: 2px solid #38bdf8 !important;
  box-shadow: none !important;
  caret-color: #38bdf8 !important;
}
html[data-theme="dark"] .mark-cell.col-thematic .mark-input { background: #fde68a !important; color: #713f12 !important; box-shadow: none !important; }
html[data-theme="dark"] .mark-cell.col-semester .mark-input { background: #ecfccb !important; color: #3f6212 !important; box-shadow: none !important; }
html[data-theme="dark"] .mark-cell.col-exam .mark-input { background: #e0e7ff !important; color: #3730a3 !important; box-shadow: none !important; }
html[data-theme="dark"] .mark-cell.col-credit .mark-input { background: #ccfbf1 !important; color: #0f766e !important; box-shadow: none !important; }
html[data-theme="dark"] .mark-cell.col-course_project .mark-input { background: #fae8ff !important; color: #a21caf !important; box-shadow: none !important; }
html[data-theme="dark"] .mark-input.readonly.is-nograde {
  background: #101a2b !important;
  color: #7f93a8 !important;
  box-shadow: inset 0 0 0 1px #2a3d56 !important;
}
html[data-theme="dark"] .mark-high { background: #bbf7d0 !important; color: #14532d !important; box-shadow: none !important; }
html[data-theme="dark"] .mark-mid { background: #fde68a !important; color: #713f12 !important; box-shadow: none !important; }
html[data-theme="dark"] .mark-low { background: #fed7aa !important; color: #9a3412 !important; box-shadow: none !important; }
html[data-theme="dark"] .mark-fail { background: #fecaca !important; color: #7f1d1d !important; box-shadow: none !important; }
html[data-theme="dark"] .mark-absent { background: #fb7185 !important; color: #fff !important; box-shadow: none !important; }
html[data-theme="dark"] .cab-sort-th:hover,
html[data-theme="dark"] .cab-sort-th.is-active {
  color: #7dd3fc;
}

.theme-toggle {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  border: 1px solid var(--theme-toggle-border);
  background: var(--theme-toggle-bg);
  color: var(--ink);
  display: inline-grid;
  place-items: center;
  padding: 0;
  flex: 0 0 auto;
}
.theme-toggle:hover {
  border-color: var(--line-strong);
  color: var(--kep-blue);
}
.theme-toggle .theme-icon-sun { display: none; }
.theme-toggle .theme-icon-moon { display: inline-block; }
html[data-theme="dark"] .theme-toggle .theme-icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .theme-icon-sun { display: inline-block; }
.theme-toggle-public {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 50;
  /* Логін завжди на темному градієнті – іконка має бути світлою в обох темах. */
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.38);
  color: #fff;
  box-shadow: 0 8px 20px rgba(2, 3, 43, 0.28);
}
.theme-toggle-public:hover {
  background: rgba(255, 255, 255, 0.26);
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}
/* ===== Темна тема: донастройка сторінок ===== */
html[data-theme="dark"] .card,
html[data-theme="dark"] .subject-card,
html[data-theme="dark"] .journal-card,
html[data-theme="dark"] .journal-actions,
html[data-theme="dark"] .journal-card .journal-chip,
html[data-theme="dark"] .journal-top,
html[data-theme="dark"] .journal-tabs,
html[data-theme="dark"] .journal-tools,
html[data-theme="dark"] .journal-toolbar,
html[data-theme="dark"] .j-hours-row,
html[data-theme="dark"] .paper-journal,
html[data-theme="dark"] .table-wrap,
html[data-theme="dark"] .month-tabs,
html[data-theme="dark"] .kep-date-btn,
html[data-theme="dark"] .kep-date-pop,
html[data-theme="dark"] .topics-table thead th,
html[data-theme="dark"] .rnp-paper,
html[data-theme="dark"] .rnp-plan-card:not(.rnp-create-card),
html[data-theme="dark"] .rnp-plan-actions,
html[data-theme="dark"] .rnp-th,
html[data-theme="dark"] .rnp-grid td.rnp-name,
html[data-theme="dark"] .rnp-zoom,
html[data-theme="dark"] .rnp-hours-card,
html[data-theme="dark"] .rnp-dept-section-head .rnp-dept-count,
html[data-theme="dark"] .hours-plan-stick,
html[data-theme="dark"] .hours-card,
html[data-theme="dark"] .hours-card-head,
html[data-theme="dark"] .hours-card-overview,
html[data-theme="dark"] .hours-overview-person,
html[data-theme="dark"] .hours-share-line,
html[data-theme="dark"] .hours-teacher-pick,
html[data-theme="dark"] .hours-val-input,
html[data-theme="dark"] .hours-pill,
html[data-theme="dark"] .hours-quick-btn,
html[data-theme="dark"] .hours-legend-chip,
html[data-theme="dark"] .hours-sem-panel,
html[data-theme="dark"] .load-filters,
html[data-theme="dark"] .load-tab,
html[data-theme="dark"] .load-queue,
html[data-theme="dark"] .load-item,
html[data-theme="dark"] .load-chip,
html[data-theme="dark"] .load-pack,
html[data-theme="dark"] .load-form-row,
html[data-theme="dark"] .load-hit,
html[data-theme="dark"] .load-filter-reset,
html[data-theme="dark"] .load-card,
html[data-theme="dark"] .load-card.is-hourly,
html[data-theme="dark"] .load-card.is-over,
html[data-theme="dark"] .cabinet-subject-card,
html[data-theme="dark"] .cabinet-subject-card.is-risk-high,
html[data-theme="dark"] .cabinet-subject-card.is-risk-mid,
html[data-theme="dark"] .dash-shortcut,
html[data-theme="dark"] .dash-shortcut-icon,
html[data-theme="dark"] .stu-pager,
html[data-theme="dark"] .stu-filter-reset,
html[data-theme="dark"] .stu-empty-reset,
html[data-theme="dark"] .staff-pick,
html[data-theme="dark"] .staff-card,
html[data-theme="dark"] .staff-card.is-pending,
html[data-theme="dark"] .staff-card.is-stopped,
html[data-theme="dark"] .staff-pending-block,
html[data-theme="dark"] .staff-pending-block.is-hot,
html[data-theme="dark"] .staff-stopped-block,
html[data-theme="dark"] .backup-legend-item,
html[data-theme="dark"] .journal-exists,
html[data-theme="dark"] .journal-rule-alert,
html[data-theme="dark"] .page-toolbar,
html[data-theme="dark"] .rnp-toolbar,
html[data-theme="dark"] .list-search {
  background: var(--surface) !important;
  background-image: none !important;
  color: var(--ink);
  border-color: var(--line) !important;
}
html[data-theme="dark"] .rnp-create-card,
html[data-theme="dark"] .rnp-create-card.is-course-2,
html[data-theme="dark"] .rnp-create-card.is-course-3,
html[data-theme="dark"] .rnp-create-card.is-course-4,
html[data-theme="dark"] .rnp-create-card.rnp-plan-card,
html[data-theme="dark"] .rnp-create-card.rnp-plan-card:hover,
html[data-theme="dark"] .rnp-create-card.is-course-2.rnp-plan-card,
html[data-theme="dark"] .rnp-create-card.is-course-2.rnp-plan-card:hover,
html[data-theme="dark"] .rnp-create-card.is-course-3.rnp-plan-card,
html[data-theme="dark"] .rnp-create-card.is-course-3.rnp-plan-card:hover,
html[data-theme="dark"] .rnp-create-card.is-course-4.rnp-plan-card,
html[data-theme="dark"] .rnp-create-card.is-course-4.rnp-plan-card:hover {
  background: #152238 !important;
  background-image: none !important;
  color: #e7eef7 !important;
  border-color: #334863 !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28) !important;
}
html[data-theme="dark"] .rnp-create-card { border-color: #0284c7 !important; }
html[data-theme="dark"] .rnp-create-card.is-course-2 { border-color: #0f766e !important; }
html[data-theme="dark"] .rnp-create-card.is-course-3 { border-color: #b45309 !important; }
html[data-theme="dark"] .rnp-create-card.is-course-4 { border-color: #6d28d9 !important; }
html[data-theme="dark"] .rnp-create-card .rnp-plan-title,
html[data-theme="dark"] .rnp-create-card .rnp-plan-spec,
html[data-theme="dark"] .rnp-create-card .rnp-plan-spec span,
html[data-theme="dark"] .rnp-create-card .rnp-create-name,
html[data-theme="dark"] .rnp-create-card .rnp-create-name span,
html[data-theme="dark"] .rnp-create-card .text-muted,
html[data-theme="dark"] .rnp-create-card strong {
  color: #e7eef7 !important;
}
html[data-theme="dark"] .rnp-create-card .rnp-plan-title,
html[data-theme="dark"] .rnp-create-card strong {
  color: #f3f7fc !important;
}
html[data-theme="dark"] .rnp-create-avatar {
  background: #1b2a40 !important;
  color: #7dd3fc !important;
}
html[data-theme="dark"] .rnp-create-card.is-course-2 .rnp-create-avatar { color: #5eead4 !important; }
html[data-theme="dark"] .rnp-create-card.is-course-3 .rnp-create-avatar { color: #fbbf24 !important; }
html[data-theme="dark"] .rnp-create-card.is-course-4 .rnp-create-avatar { color: #c4b5fd !important; }
html[data-theme="dark"] .rnp-create-pills {
  background: #1b2a40 !important;
  border-color: #334863 !important;
}
html[data-theme="dark"] .rnp-create-pill span {
  color: #c5d4e6 !important;
  opacity: 1 !important;
}
html[data-theme="dark"] .rnp-create-pill:hover span {
  color: #f3f7fc !important;
}
html[data-theme="dark"] .rnp-create-pill:has(input:checked) span {
  background: #0077b6 !important;
  color: #fff !important;
}
html[data-theme="dark"] .rnp-create-card.is-course-2 .rnp-create-pill:has(input:checked) span {
  background: #0f766e !important;
  color: #fff !important;
}
html[data-theme="dark"] .rnp-create-card.is-course-3 .rnp-create-pill:has(input:checked) span {
  background: #b45309 !important;
  color: #fff !important;
}
html[data-theme="dark"] .rnp-create-card.is-course-4 .rnp-create-pill:has(input:checked) span {
  background: #6d28d9 !important;
  color: #fff !important;
}
html[data-theme="dark"] .rnp-create-name input {
  background: #101a2b !important;
  color: #f3f7fc !important;
  border-color: #334863 !important;
}

html[data-theme="dark"] .journal-rule-alert {
  background: #12324a !important;
  border-color: #0284c7 !important;
  color: #e0f2fe !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .journal-rule-alert-icon {
  background: #164e63 !important;
  color: #7dd3fc !important;
}
html[data-theme="dark"] .journal-rule-alert-copy strong {
  color: #f0f9ff !important;
}
html[data-theme="dark"] .journal-rule-alert-copy p {
  color: #d0dceb !important;
}

html[data-theme="dark"] .journal-exists {
  background: #3a2718 !important;
  border-color: #b45309 !important;
  color: #ffedd5 !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .journal-exists-icon {
  background: #7c2d12 !important;
  color: #fdba74 !important;
}
html[data-theme="dark"] .journal-exists-copy h2 {
  color: #ffedd5 !important;
}
html[data-theme="dark"] .journal-exists-copy p {
  color: #fde68a !important;
}

html[data-theme="dark"] .journal-chip,
html[data-theme="dark"] .journal-card .journal-chip {
  background: var(--surface-2) !important;
  color: #eaf2fa !important;
}
html[data-theme="dark"] .journal-chip:hover,
html[data-theme="dark"] .journal-card .journal-chip:hover {
  background: var(--surface-3) !important;
  color: #f3f7fc !important;
}
html[data-theme="dark"] .journal-chip strong,
html[data-theme="dark"] .journal-card strong {
  color: #f3f7fc !important;
}
html[data-theme="dark"] .journal-chip .small {
  color: #b6c7da !important;
}
html[data-theme="dark"] .journal-actions {
  background: var(--surface-2) !important;
  border-top: 1px solid var(--line);
}
html[data-theme="dark"] .subject-card h3,
html[data-theme="dark"] .subject-card h2,
html[data-theme="dark"] .jl-teacher h2 {
  color: #f3f7fc;
}
html[data-theme="dark"] .journal-card .text-muted,
html[data-theme="dark"] .journal-chip .text-muted {
  color: var(--ink-muted) !important;
}
html[data-theme="dark"] .theme-toggle {
  background: rgba(148, 183, 214, 0.16);
  border-color: rgba(148, 183, 214, 0.42);
  color: #eaf2fa;
}
html[data-theme="dark"] .theme-toggle:hover {
  background: rgba(148, 183, 214, 0.24);
  border-color: #7dd3fc;
  color: #7dd3fc;
}

html[data-theme="dark"] .journal-card .btn-outline,
html[data-theme="dark"] .journal-actions .btn-outline,
html[data-theme="dark"] .subject-card .btn-outline {
  color: #eaf2fa !important;
  border-color: #6b849e !important;
  background: transparent !important;
}
html[data-theme="dark"] .btn-outline.theme-primary {
  color: #7dd3fc !important;
  border-color: #38bdf8 !important;
  background: transparent !important;
}
html[data-theme="dark"] .btn-outline.theme-primary:hover,
html[data-theme="dark"] .btn-outline.theme-primary:focus-visible {
  color: #fff !important;
  background: #0284c7 !important;
  border-color: #0284c7 !important;
  transform: none !important;
}
html[data-theme="dark"] .btn-outline.theme-success {
  color: #6ee7b7 !important;
  border-color: #34d399 !important;
  background: transparent !important;
}
html[data-theme="dark"] .btn-outline.theme-success:hover,
html[data-theme="dark"] .btn-outline.theme-success:focus-visible {
  color: #052e16 !important;
  background: #34d399 !important;
  border-color: #34d399 !important;
  transform: none !important;
}
html[data-theme="dark"] .btn-outline.theme-info {
  color: #67e8f9 !important;
  border-color: #22d3ee !important;
  background: transparent !important;
}
html[data-theme="dark"] .btn-outline.theme-info:hover,
html[data-theme="dark"] .btn-outline.theme-info:focus-visible {
  color: #083344 !important;
  background: #22d3ee !important;
  border-color: #22d3ee !important;
  transform: none !important;
}
html[data-theme="dark"] .btn-outline.theme-danger {
  color: #fb7185 !important;
  border-color: #f43f5e !important;
  background: transparent !important;
}
html[data-theme="dark"] .btn-outline.theme-danger:hover,
html[data-theme="dark"] .btn-outline.theme-danger:focus-visible {
  color: #fff !important;
  background: #e11d48 !important;
  border-color: #e11d48 !important;
  transform: none !important;
}
html[data-theme="dark"] .btn-outline.theme-warning {
  color: #fbbf24 !important;
  border-color: #f59e0b !important;
  background: transparent !important;
}
html[data-theme="dark"] .btn-outline.theme-warning:hover,
html[data-theme="dark"] .btn-outline.theme-warning:focus-visible {
  color: #422006 !important;
  background: #f59e0b !important;
  border-color: #f59e0b !important;
  transform: none !important;
}
html[data-theme="dark"] .btn-outline.theme-semester {
  color: #a3e635 !important;
  border-color: #84cc16 !important;
  background: transparent !important;
}
html[data-theme="dark"] .btn-outline.theme-semester:hover,
html[data-theme="dark"] .btn-outline.theme-semester:focus-visible {
  color: #fff !important;
  background: #65a30d !important;
  border-color: #65a30d !important;
  transform: none !important;
}
html[data-theme="dark"] .btn-outline.theme-exam {
  color: #a5b4fc !important;
  border-color: #818cf8 !important;
  background: transparent !important;
}
html[data-theme="dark"] .btn-outline.theme-exam:hover,
html[data-theme="dark"] .btn-outline.theme-exam:focus-visible {
  color: #fff !important;
  background: #4f46e5 !important;
  border-color: #4f46e5 !important;
  transform: none !important;
}
html[data-theme="dark"] .btn-outline.theme-credit {
  color: #5eead4 !important;
  border-color: #2dd4bf !important;
  background: transparent !important;
}
html[data-theme="dark"] .btn-outline.theme-credit:hover,
html[data-theme="dark"] .btn-outline.theme-credit:focus-visible {
  color: #fff !important;
  background: #0f766e !important;
  border-color: #0f766e !important;
  transform: none !important;
}
html[data-theme="dark"] .btn-outline.theme-project {
  color: #f0abfc !important;
  border-color: #e879f9 !important;
  background: transparent !important;
}
html[data-theme="dark"] .btn-outline.theme-project:hover,
html[data-theme="dark"] .btn-outline.theme-project:focus-visible {
  color: #fff !important;
  background: #c026d3 !important;
  border-color: #c026d3 !important;
  transform: none !important;
}
html[data-theme="dark"] .btn-outline.theme-purple {
  color: #d8b4fe !important;
  border-color: #a78bfa !important;
  background: transparent !important;
}
html[data-theme="dark"] .btn-outline.theme-purple:hover,
html[data-theme="dark"] .btn-outline.theme-purple:focus-visible {
  color: #fff !important;
  background: #6f42c1 !important;
  border-color: #6f42c1 !important;
  transform: none !important;
}
html[data-theme="dark"] .btn-outline.theme-orange {
  color: #fdba74 !important;
  border-color: #fb923c !important;
  background: transparent !important;
}
html[data-theme="dark"] .btn-outline.theme-orange:hover,
html[data-theme="dark"] .btn-outline.theme-orange:focus-visible {
  color: #fff !important;
  background: #ea580c !important;
  border-color: #ea580c !important;
  transform: none !important;
}
html[data-theme="dark"] .journal-theme-close .btn-outline {
  border-width: 1px !important;
}

html[data-theme="dark"] .journal-top,
html[data-theme="dark"] .hours-plan-stick {
  background: var(--stick-bg) !important;
  border-bottom-color: var(--line) !important;
}
html[data-theme="dark"] .paper-journal,
html[data-theme="dark"] .table-wrap,
html[data-theme="dark"] .month-tabs {
  background: var(--surface-2) !important;
}
html[data-theme="dark"] .paper-grid thead th,
html[data-theme="dark"] .topics-table thead th {
  background: var(--table-head) !important;
  color: var(--ink-muted) !important;
}
/* name-face / date-cell / type-cell – стилі нижче в блоці журналу */
html[data-theme="dark"] .topics-table {
  --bs-table-color: #eef3f9;
  --bs-table-hover-bg: #1b2a40;
  color: #eef3f9;
}
html[data-theme="dark"] .topics-table > :not(caption) > * > * {
  border-bottom-color: #334863 !important;
  color: #eef3f9 !important;
}
html[data-theme="dark"] .topics-table > :not(caption) > tr.row-thematic > *,
html[data-theme="dark"] .topics-table > :not(caption) > tr.row-semester > *,
html[data-theme="dark"] .topics-table > :not(caption) > tr.row-exam > *,
html[data-theme="dark"] .topics-table > :not(caption) > tr.row-credit > *,
html[data-theme="dark"] .topics-table > :not(caption) > tr.row-course_project > * {
  border-bottom-color: inherit !important;
}
html[data-theme="dark"] .topics-table .topics-n {
  color: #9db0c5 !important;
}
html[data-theme="dark"] .topics-hours-cell {
  color: #f3f7fc !important;
}
html[data-theme="dark"] .topics-who-stack {
  color: #eef3f9 !important;
}
html[data-theme="dark"] .topics-who-1::before,
html[data-theme="dark"] .topics-who-2::before {
  color: #9db0c5 !important;
}
html[data-theme="dark"] .topics-who-2 {
  color: #c5d4e6 !important;
}
html[data-theme="dark"] .topics-pack-meta {
  color: #c5d4e6 !important;
}
html[data-theme="dark"] .topics-pack-hours {
  background: #12324a !important;
  color: #7dd3fc !important;
}
html[data-theme="dark"] .topics-group > th {
  background: #152238 !important;
  border-bottom-color: #334863 !important;
  color: #eef3f9 !important;
}
/* Темна тема: спецрядки – темний відтінок + світлий текст (світлий крем ламає hover). */
html[data-theme="dark"] .topics-table tr.row-thematic > * {
  background: rgba(245, 158, 11, 0.14) !important;
  color: #fde68a !important;
  border-color: rgba(245, 158, 11, 0.28) !important;
}
html[data-theme="dark"] .topics-table tr.row-thematic .topic-view:not(.type-pill),
html[data-theme="dark"] .topics-table tr.row-thematic .topics-who-stack,
html[data-theme="dark"] .topics-table tr.row-thematic .topics-who-2,
html[data-theme="dark"] .topics-table tr.row-thematic .topics-hours-cell,
html[data-theme="dark"] .topics-table tr.row-thematic .topics-n,
html[data-theme="dark"] .topics-table tr.row-thematic .topics-who-1::before,
html[data-theme="dark"] .topics-table tr.row-thematic .topics-who-2::before {
  color: #fde68a !important;
}
html[data-theme="dark"] .topics-table tr.row-semester > * {
  background: rgba(163, 230, 53, 0.12) !important;
  color: #d9f99d !important;
  border-color: rgba(163, 230, 53, 0.28) !important;
}
html[data-theme="dark"] .topics-table tr.row-semester .topic-view:not(.type-pill) {
  color: #d9f99d !important;
}
html[data-theme="dark"] .topics-table tr.row-exam > * {
  background: rgba(129, 140, 248, 0.14) !important;
  color: #c7d2fe !important;
  border-color: rgba(129, 140, 248, 0.28) !important;
}
html[data-theme="dark"] .topics-table tr.row-exam .topic-view:not(.type-pill) {
  color: #c7d2fe !important;
}
html[data-theme="dark"] .topics-table tr.row-credit > * {
  background: rgba(45, 212, 191, 0.12) !important;
  color: #99f6e4 !important;
  border-color: rgba(45, 212, 191, 0.28) !important;
}
html[data-theme="dark"] .topics-table tr.row-credit .topic-view:not(.type-pill) {
  color: #99f6e4 !important;
}
html[data-theme="dark"] .topics-table tr.row-course_project > * {
  background: rgba(232, 121, 249, 0.12) !important;
  color: #f0abfc !important;
  border-color: rgba(232, 121, 249, 0.28) !important;
}
html[data-theme="dark"] .topics-table tr.row-course_project .topic-view:not(.type-pill) {
  color: #f0abfc !important;
}
html[data-theme="dark"] .topics-table.table-hover > tbody > tr.row-thematic:hover > *,
html[data-theme="dark"] .topics-table.table-hover > tbody > tr.row-semester:hover > *,
html[data-theme="dark"] .topics-table.table-hover > tbody > tr.row-exam:hover > *,
html[data-theme="dark"] .topics-table.table-hover > tbody > tr.row-credit:hover > *,
html[data-theme="dark"] .topics-table.table-hover > tbody > tr.row-course_project:hover > * {
  --bs-table-bg-state: transparent;
  box-shadow: none !important;
}
html[data-theme="dark"] .topics-table.table-hover > tbody > tr.row-thematic:hover > * {
  background: rgba(245, 158, 11, 0.22) !important;
  color: #fde68a !important;
}
html[data-theme="dark"] .topics-table.table-hover > tbody > tr.row-semester:hover > * {
  background: rgba(163, 230, 53, 0.2) !important;
  color: #d9f99d !important;
}
html[data-theme="dark"] .topics-table.table-hover > tbody > tr.row-exam:hover > * {
  background: rgba(129, 140, 248, 0.22) !important;
  color: #c7d2fe !important;
}
html[data-theme="dark"] .topics-table.table-hover > tbody > tr.row-credit:hover > * {
  background: rgba(45, 212, 191, 0.2) !important;
  color: #99f6e4 !important;
}
html[data-theme="dark"] .topics-table.table-hover > tbody > tr.row-course_project:hover > * {
  background: rgba(232, 121, 249, 0.2) !important;
  color: #f0abfc !important;
}
html[data-theme="dark"] .topics-table tr.row-thematic .rnp-ico.is-edit,
html[data-theme="dark"] .topics-table tr.row-semester .rnp-ico.is-edit,
html[data-theme="dark"] .topics-table tr.row-exam .rnp-ico.is-edit,
html[data-theme="dark"] .topics-table tr.row-credit .rnp-ico.is-edit,
html[data-theme="dark"] .topics-table tr.row-course_project .rnp-ico.is-edit {
  background: #fff3cd !important;
  color: #997404 !important;
}
html[data-theme="dark"] .topics-table tr.row-thematic .rnp-ico.is-delete,
html[data-theme="dark"] .topics-table tr.row-semester .rnp-ico.is-delete,
html[data-theme="dark"] .topics-table tr.row-exam .rnp-ico.is-delete,
html[data-theme="dark"] .topics-table tr.row-credit .rnp-ico.is-delete,
html[data-theme="dark"] .topics-table tr.row-course_project .rnp-ico.is-delete {
  background: #ffe8ea !important;
  color: #be123c !important;
}
html[data-theme="dark"] .topics-table tr.row-thematic .rnp-ico.is-edit:hover,
html[data-theme="dark"] .topics-table tr.row-semester .rnp-ico.is-edit:hover,
html[data-theme="dark"] .topics-table tr.row-exam .rnp-ico.is-edit:hover,
html[data-theme="dark"] .topics-table tr.row-credit .rnp-ico.is-edit:hover,
html[data-theme="dark"] .topics-table tr.row-course_project .rnp-ico.is-edit:hover {
  background: #ffc107 !important;
  color: #000 !important;
}
html[data-theme="dark"] .topics-table tr.row-thematic .rnp-ico.is-delete:hover,
html[data-theme="dark"] .topics-table tr.row-semester .rnp-ico.is-delete:hover,
html[data-theme="dark"] .topics-table tr.row-exam .rnp-ico.is-delete:hover,
html[data-theme="dark"] .topics-table tr.row-credit .rnp-ico.is-delete:hover,
html[data-theme="dark"] .topics-table tr.row-course_project .rnp-ico.is-delete:hover {
  background: #e11d48 !important;
  color: #fff !important;
}
html[data-theme="dark"] .type-pill.type-lecture,
html[data-theme="dark"] .topics-table .type-pill.type-lecture { background: #dbeafe !important; color: #1e40af !important; }
html[data-theme="dark"] .type-pill.type-laboratory,
html[data-theme="dark"] .topics-table .type-pill.type-laboratory { background: #ede9fe !important; color: #6d28d9 !important; }
html[data-theme="dark"] .type-pill.type-practical,
html[data-theme="dark"] .topics-table .type-pill.type-practical { background: #dcfce7 !important; color: #166534 !important; }
html[data-theme="dark"] .type-pill.type-seminar,
html[data-theme="dark"] .topics-table .type-pill.type-seminar { background: #fce7f3 !important; color: #9d174d !important; }
html[data-theme="dark"] .type-pill.type-individual,
html[data-theme="dark"] .topics-table .type-pill.type-individual { background: #e2e8f0 !important; color: #334155 !important; }
html[data-theme="dark"] .type-pill.type-consultation,
html[data-theme="dark"] .topics-table .type-pill.type-consultation { background: #cffafe !important; color: #0e7490 !important; }
html[data-theme="dark"] .type-pill.type-control,
html[data-theme="dark"] .topics-table .type-pill.type-control { background: #fee2e2 !important; color: #b91c1c !important; }
html[data-theme="dark"] .type-pill.type-kkr,
html[data-theme="dark"] .topics-table .type-pill.type-kkr { background: #ffe4e6 !important; color: #9f1239 !important; }
html[data-theme="dark"] .type-pill.type-mkr,
html[data-theme="dark"] .topics-table .type-pill.type-mkr { background: #ffedd5 !important; color: #c2410c !important; }
html[data-theme="dark"] .type-pill.type-thematic,
html[data-theme="dark"] .topics-table .type-pill.type-thematic { background: #fef3c7 !important; color: #92400e !important; }
html[data-theme="dark"] .type-pill.type-semester,
html[data-theme="dark"] .topics-table .type-pill.type-semester { background: #d9f99d !important; color: #3f6212 !important; }
html[data-theme="dark"] .type-pill.type-exam,
html[data-theme="dark"] .topics-table .type-pill.type-exam { background: #e0e7ff !important; color: #3730a3 !important; }
html[data-theme="dark"] .type-pill.type-credit,
html[data-theme="dark"] .topics-table .type-pill.type-credit { background: #ccfbf1 !important; color: #0f766e !important; }
html[data-theme="dark"] .type-pill.type-course_project,
html[data-theme="dark"] .topics-table .type-pill.type-course_project { background: #fae8ff !important; color: #a21caf !important; }
html[data-theme="dark"] .journal-legend .leg-lecture { background: #dbeafe !important; color: #1e40af !important; }
html[data-theme="dark"] .journal-legend .leg-laboratory { background: #ede9fe !important; color: #6d28d9 !important; }
html[data-theme="dark"] .journal-legend .leg-practical { background: #dcfce7 !important; color: #166534 !important; }
html[data-theme="dark"] .journal-legend .leg-seminar { background: #fce7f3 !important; color: #9d174d !important; }
html[data-theme="dark"] .journal-legend .leg-individual { background: #e2e8f0 !important; color: #334155 !important; }
html[data-theme="dark"] .journal-legend .leg-consultation { background: #cffafe !important; color: #0e7490 !important; }
html[data-theme="dark"] .journal-legend .leg-thematic { background: #fef3c7 !important; color: #92400e !important; }
html[data-theme="dark"] .journal-legend .leg-semester { background: #d9f99d !important; color: #3f6212 !important; }
html[data-theme="dark"] .journal-legend .leg-exam { background: #e0e7ff !important; color: #3730a3 !important; }
html[data-theme="dark"] .journal-legend .leg-credit { background: #ccfbf1 !important; color: #0f766e !important; }
html[data-theme="dark"] .journal-legend .leg-course_project { background: #fae8ff !important; color: #a21caf !important; }
html[data-theme="dark"] .theme-chip {
  border: 0 !important;
}
html[data-theme="dark"] .theme-chip[data-theme="1"] { color: #3730a3 !important; background: #e0e7ff !important; }
html[data-theme="dark"] .theme-chip[data-theme="2"] { color: #0f766e !important; background: #ccfbf1 !important; }
html[data-theme="dark"] .theme-chip[data-theme="3"] { color: #b45309 !important; background: #ffedd5 !important; }
html[data-theme="dark"] .theme-chip[data-theme="4"] { color: #9f1239 !important; background: #ffe4e6 !important; }
html[data-theme="dark"] .theme-chip[data-theme="5"] { color: #0369a1 !important; background: #e0f2fe !important; }
html[data-theme="dark"] .theme-chip[data-theme="6"] { color: #6d28d9 !important; background: #ede9fe !important; }
html[data-theme="dark"] .mark-input:focus {
  background: #152238 !important;
}

html[data-theme="dark"] .jl-subject-icon,
html[data-theme="dark"] .page-icon {
  background: #22344f !important;
  color: #7dd3fc !important;
}
html[data-theme="dark"] .chip-semester,
html[data-theme="dark"] .chip-status {
  border-color: var(--line);
}
html[data-theme="dark"] .chip-status.is-studying {
  background: #e6fbf6 !important;
  color: #0f766e !important;
}
html[data-theme="dark"] .chip-status.is-academic_leave {
  background: #fff6d8 !important;
  color: #b45309 !important;
}
html[data-theme="dark"] .chip-status.is-expelled {
  background: #ffe8ea !important;
  color: #be123c !important;
}
html[data-theme="dark"] .chip-status.is-graduated {
  background: #ede9fe !important;
  color: #6d28d9 !important;
}
html[data-theme="dark"] .chip-fund.is-budget {
  background: #e0f7ff !important;
  color: #0077b6 !important;
}
html[data-theme="dark"] .chip-fund.is-contract {
  background: #fff6d8 !important;
  color: #b45309 !important;
}
html[data-theme="dark"] .chip-fund.is-extramural {
  background: #ede9fe !important;
  color: #6d28d9 !important;
}
html[data-theme="dark"] .stu-quick.is-budget,
html[data-theme="dark"] .stu-quick.is-studying {
  background: #e6fbf6 !important;
  color: #0f766e !important;
}
html[data-theme="dark"] .stu-quick.is-contract,
html[data-theme="dark"] .stu-quick.is-academic_leave {
  background: #fff6d8 !important;
  color: #b45309 !important;
}
html[data-theme="dark"] .stu-quick.is-extramural {
  background: #ede9fe !important;
  color: #6d28d9 !important;
}
html[data-theme="dark"] .stu-quick.is-expelled {
  background: #ffe8ea !important;
  color: #be123c !important;
}
html[data-theme="dark"] .stu-quick.is-graduated {
  background: #eef2f7 !important;
  color: #475569 !important;
}
html[data-theme="dark"] .chip-course.is-1 {
  background: #e0f7ff !important;
  color: #0077b6 !important;
}
html[data-theme="dark"] .chip-course.is-2 {
  background: #e6fbf6 !important;
  color: #0f766e !important;
}
html[data-theme="dark"] .chip-course.is-3 {
  background: #fff6d8 !important;
  color: #b45309 !important;
}
html[data-theme="dark"] .chip-course.is-4 {
  background: #ede9fe !important;
  color: #6d28d9 !important;
}

html[data-theme="dark"] .rnp-plan-actions {
  background: var(--surface-2) !important;
}

html[data-theme="dark"] .hours-card-head {
  background: linear-gradient(180deg, #1b2a40 0%, #152238 100%) !important;
}
html[data-theme="dark"] .hours-overview-person.is-second {
  background: #2a1f38 !important;
}
html[data-theme="dark"] .hours-overview-person.is-vacancy {
  background: #3a3218 !important;
}
html[data-theme="dark"] .hours-sem-panel {
  background: var(--surface-2) !important;
}

html[data-theme="dark"] .load-pack[open] summary {
  background: var(--surface-2) !important;
}
html[data-theme="dark"] .load-tab.is-on,
html[data-theme="dark"] .load-tab.active {
  background: var(--surface-3) !important;
  color: #f3f7fc !important;
}

html[data-theme="dark"] .load-face-pills {
  background: #152033;
  border-color: #2a3c55;
}
html[data-theme="dark"] .load-metric {
  border-left-color: #2a3c55;
}
html[data-theme="dark"] .load-metric-k,
html[data-theme="dark"] .load-metric-sem {
  color: #8aa0b8;
}
html[data-theme="dark"] .load-metric-sem b {
  color: #c5d4e4;
}
/* Темна тема: яскраві цифри на темному фоні (світлі аналоги погано читаються). */
html[data-theme="dark"] .load-metric-v {
  color: #e8f0f8 !important;
}
html[data-theme="dark"] .load-metric.is-hourly .load-metric-v {
  color: #fb7185 !important;
}
html[data-theme="dark"] .load-metric.is-budget .load-metric-v {
  color: #22d3ee !important;
}
html[data-theme="dark"] .load-metric.is-paid .load-metric-v {
  color: #c4b5fd !important;
}
/* Підсумки в темній темі: м’який фон, але чіткі світлі підписи й години. */
html[data-theme="dark"] .load-tariff tfoot tr.is-staff th {
  background: #1c2f33 !important;
  color: #e8f7f2 !important;
  font-weight: 800 !important;
}
html[data-theme="dark"] .load-tariff tfoot tr.is-hourly th {
  background: #32242c !important;
  color: #fff1f2 !important;
  font-weight: 800 !important;
}
html[data-theme="dark"] .load-tariff-v2 tfoot tr.is-staff .is-sticky {
  background: #1c2f33 !important;
}
html[data-theme="dark"] .load-tariff-v2 tfoot tr.is-hourly .is-sticky {
  background: #32242c !important;
}
html[data-theme="dark"] .load-tariff-v2 tfoot th {
  vertical-align: middle !important;
}

html[data-theme="dark"] a.load-card-body,
html[data-theme="dark"] a.load-card-body:hover {
  color: var(--ink);
}
html[data-theme="dark"] .load-catalog-head {
  color: #b6c7da;
}
html[data-theme="dark"] .load-catalog-sort {
  color: #e7eef7;
}
html[data-theme="dark"] .load-card-head strong,
html[data-theme="dark"] .load-card-metrics b,
html[data-theme="dark"] .load-card-hours b {
  color: #f3f7fc;
}
html[data-theme="dark"] .load-card-head span,
html[data-theme="dark"] .load-card-metrics span,
html[data-theme="dark"] .load-card-hours span,
html[data-theme="dark"] .load-card-subjects,
html[data-theme="dark"] .load-card-split,
html[data-theme="dark"] .load-face-split,
html[data-theme="dark"] .load-cards-empty {
  color: #b6c7da;
}
html[data-theme="dark"] .load-card-split .is-hourly,
html[data-theme="dark"] .load-face-split .is-hourly,
html[data-theme="dark"] .load-flag.is-over {
  color: #fb7185;
}
html[data-theme="dark"] .load-flag.is-cap {
  color: #fbbf24;
}
html[data-theme="dark"] .load-flag.is-warn {
  color: #fdba74;
  font-weight: 800;
}
html[data-theme="dark"] .load-card-tags span {
  background: #243447 !important;
  color: #e7eef7 !important;
  border: 1px solid #3d5570;
}
html[data-theme="dark"] .load-card-tags .is-more {
  background: #334863 !important;
  color: #c5d4e6 !important;
}
html[data-theme="dark"] .load-filter-chip {
  background: #243447 !important;
  color: #e7eef7 !important;
  border: 1px solid #3d5570;
}
html[data-theme="dark"] .load-filter-chip:hover {
  background: #334863 !important;
  color: #f3f7fc !important;
}
html[data-theme="dark"] .load-card-xls {
  background: #3a2718;
  color: #fdba74;
}
html[data-theme="dark"] .load-card-xls:hover {
  background: #4a2f16;
  color: #fde68a;
}

html[data-theme="dark"] .cabinet-subject-card.is-risk-high {
  background: linear-gradient(180deg, #152238 0%, #3f151b 100%) !important;
}
html[data-theme="dark"] .cabinet-subject-card.is-risk-mid {
  background: linear-gradient(180deg, #152238 0%, #3a2718 100%) !important;
}

html[data-theme="dark"] .dash-shortcut {
  background: var(--surface-2) !important;
}
html[data-theme="dark"] .dash-feed-item.is-unread {
  background: #3a2718 !important;
}

html[data-theme="dark"] .stu-pager .page-link {
  background: var(--surface) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}
html[data-theme="dark"] .stu-pager .page-item.active .page-link {
  background: #0284c7 !important;
  border-color: #0284c7 !important;
  color: #fff !important;
}
html[data-theme="dark"] .stu-row:hover { background: rgba(56, 189, 248, 0.08) !important; }
html[data-theme="dark"] .stu-row.is-expelled { background: rgba(190, 18, 60, 0.14) !important; }
html[data-theme="dark"] .stu-row.is-leave { background: rgba(180, 83, 9, 0.14) !important; }
html[data-theme="dark"] .stu-leave-head { background: #3a2718 !important; color: #fdba74 !important; }
html[data-theme="dark"] .stu-expelled-head { background: #3f151b !important; color: #fda4af !important; }

html[data-theme="dark"] .staff-card.is-pending { background: #fff6d8 !important; color: #92400e !important; }
html[data-theme="dark"] .staff-card.is-stopped { background: #3f151b !important; }
html[data-theme="dark"] .staff-pending-block,
html[data-theme="dark"] .staff-pending-block.is-hot,
html[data-theme="dark"] .staff-stopped-block {
  background: var(--surface-2) !important;
}

html[data-theme="dark"] .backup-legend-item {
  background: var(--surface-2) !important;
}
html[data-theme="dark"] .user-chip {
  background: transparent;
  color: var(--ink);
}
html[data-theme="dark"] .topbar-kicker,
html[data-theme="dark"] .topbar-year {
  color: var(--ink-muted) !important;
}
html[data-theme="dark"] .topbar-title {
  color: #f3f7fc !important;
}

html[data-theme="dark"] .year-switch,
html[data-theme="dark"] .kep-year-bar,
html[data-theme="dark"] .journal-year-bar {
  color: var(--ink);
}
html[data-theme="dark"] .year-switch-caption {
  color: var(--ink-muted);
}
html[data-theme="dark"] .kep-year-bar .year-switch .form-select,
html[data-theme="dark"] .journal-year-bar .year-switch .form-select,
html[data-theme="dark"] .rnp-toolbar-actions .year-switch .form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%239db0c5' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 16px 12px;
  padding-right: 2.55rem;
}

html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-body,
html[data-theme="dark"] .modal-footer {
  background: var(--surface) !important;
  color: var(--ink);
  border-color: var(--line) !important;
}

html[data-theme="dark"] .pagination .page-link {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}
html[data-theme="dark"] .pagination .page-item.active .page-link {
  background: #0284c7;
  border-color: #0284c7;
  color: #fff;
}

html[data-theme="dark"] .nav-scrim {
  background: rgba(0, 0, 0, 0.55);
}

html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] input[type="time"],
html[data-theme="dark"] input[type="datetime-local"] {
  color-scheme: dark;
}

html[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * {
  --bs-table-bg-type: var(--table-stripe);
}

html[data-theme="dark"] .jl-teacher {
  color: var(--ink);
}
html[data-theme="dark"] .content .card-body {
  color: var(--ink);
}
html[data-theme="dark"] .content .card-body h1,
html[data-theme="dark"] .content .card-body h2,
html[data-theme="dark"] .content .card-body h3,
html[data-theme="dark"] .content .card-body h4,
html[data-theme="dark"] .content .card-body h5,
html[data-theme="dark"] .content .card-body .h3,
html[data-theme="dark"] .content .card-body .h5 {
  color: #f3f7fc;
}

html[data-theme="dark"] .j-hours {
  background: #152238 !important;
  border-color: #334863 !important;
  color: #d7e3f0 !important;
}
html[data-theme="dark"] .rnp-hours {
  background: #152238 !important;
  border-color: #334863 !important;
  color: #d7e3f0 !important;
}
html[data-theme="dark"] .rnp-hours-kicker,
html[data-theme="dark"] .rnp-hours-note {
  color: #d0dceb !important;
}
html[data-theme="dark"] .rnp-hours-card {
  background: #1b2a40 !important;
  border-color: #334863 !important;
  color: #eef3f9 !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .rnp-hours-card.is-active {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.22) !important;
}
html[data-theme="dark"] .rnp-hours-label,
html[data-theme="dark"] .rnp-hours-parts {
  color: #c5d4e6 !important;
}
html[data-theme="dark"] .rnp-hours-value {
  color: #7dd3fc !important;
}
html[data-theme="dark"] .j-hours-row {
  background: #1b2a40 !important;
  border-color: #334863 !important;
  color: #d0dceb !important;
}
html[data-theme="dark"] .j-hours-row strong {
  color: #f3f7fc !important;
}
html[data-theme="dark"] .j-hours-row.is-total {
  background: #22344f !important;
  border-color: #38bdf8 !important;
}
html[data-theme="dark"] .j-hours-row.is-full {
  background: #134e4a !important;
}
html[data-theme="dark"] .j-hours-row.is-over {
  background: #3a2718 !important;
}
html[data-theme="dark"] .j-hours-bar {
  background: #22344f !important;
}
html[data-theme="dark"] .j-hours-bar i {
  background: #38bdf8 !important;
}
html[data-theme="dark"] .j-hours-row.is-full .j-hours-bar i {
  background: #34d399 !important;
}
html[data-theme="dark"] .j-hours-row.is-over .j-hours-bar i {
  background: #fb923c !important;
}
html[data-theme="dark"] .journal-tools {
  background: #152238 !important;
  border-color: #334863 !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .journal-add label span,
html[data-theme="dark"] .journal-add-cap,
html[data-theme="dark"] .journal-theme-row label span {
  color: #d0dceb !important;
}
html[data-theme="dark"] .journal-add .form-control,
html[data-theme="dark"] .kep-date-btn {
  background: #101a2b !important;
  color: #eef3f9 !important;
  border-color: #4b6785 !important;
}
html[data-theme="dark"] .kep-date-btn i {
  color: #7dd3fc !important;
}
html[data-theme="dark"] .kep-date-btn .kep-date-caret {
  color: #9db0c5 !important;
}
html[data-theme="dark"] .kep-date-btn strong {
  color: #eef3f9 !important;
}
html[data-theme="dark"] .journal-add .form-select,
html[data-theme="dark"] .journal-theme-row .form-select,
html[data-theme="dark"] .topics-table .form-select {
  background-color: #101a2b !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%239db0c5' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.75rem center !important;
  background-size: 16px 12px !important;
  color: #eef3f9 !important;
  border-color: #4b6785 !important;
}
html[data-theme="dark"] .journal-add .form-select option,
html[data-theme="dark"] .journal-theme-row .form-select option,
html[data-theme="dark"] .topics-table .form-select option {
  background-color: #101a2b;
  color: #eef3f9;
}
html[data-theme="dark"] .journal-add .form-control::placeholder {
  color: #9db0c5 !important;
}
html[data-theme="dark"] .journal-legend {
  color: #d0dceb;
}
html[data-theme="dark"] .journal-legend .leg-sep {
  color: #d0dceb !important;
}
html[data-theme="dark"] .journal-legend .chip-high {
  background: #bbf7d0 !important;
  color: #14532d !important;
}
html[data-theme="dark"] .journal-legend .chip-mid {
  background: #fde68a !important;
  color: #92400e !important;
}
html[data-theme="dark"] .journal-legend .chip-low {
  background: #fed7aa !important;
  color: #9a3412 !important;
}
html[data-theme="dark"] .journal-legend .chip-fail {
  background: #fecaca !important;
  color: #991b1b !important;
}
html[data-theme="dark"] .journal-legend .chip-absent {
  background: #be123c !important;
  color: #fff !important;
}
html[data-theme="dark"] .journal-legend .type-pill,
html[data-theme="dark"] .type-pill {
  filter: none;
}
html[data-theme="dark"] .kep-date-pop {
  box-shadow: var(--shadow) !important;
}
html[data-theme="dark"] .table-wrap,
html[data-theme="dark"] .paper-journal {
  border-color: var(--line) !important;
}
html[data-theme="dark"] .month-tabs .btn:not(.month-tab),
html[data-theme="dark"] .month-tabs button:not(.month-tab) {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface);
}
html[data-theme="dark"] .credits,
html[data-theme="dark"] .sidebar-foot,
html[data-theme="dark"] .sidebar-foot a {
  color: rgba(255, 255, 255, 0.72);
}

/* ===== Темна тема: контраст текстів і журналу ===== */
html[data-theme="dark"] .journal-workspace {
  --mj-line: #334863;
  --mj-head: #1a2740;
  --mj-ink: #eef3f9;
  --mj-bg: #101a2b;
  color: var(--mj-ink);
}
html[data-theme="dark"] .paper-grid {
  --mj-bg: #101a2b;
  --mj-gap: 8px;
  background: #101a2b !important;
  color: var(--mj-ink);
}
html[data-theme="dark"] .paper-journal,
html[data-theme="dark"] .table-wrap {
  background: #101a2b !important;
  border-color: #334863 !important;
}
html[data-theme="dark"] .paper-grid thead {
  background: #101a2b !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .paper-grid thead th {
  background: #101a2b !important;
  color: #d7e3f0 !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .paper-grid th.name-col,
html[data-theme="dark"] .paper-grid td.name-col,
html[data-theme="dark"] .paper-grid th.num-col,
html[data-theme="dark"] .paper-grid td.num-col,
html[data-theme="dark"] .paper-grid th.student-name,
html[data-theme="dark"] .paper-grid td.student-name {
  background: #101a2b !important;
  color: var(--mj-ink) !important;
  box-shadow: none !important;
}
/* Темна тема: № і прізвища – ті самі «плитки», що й клітинки оцінок. */
html[data-theme="dark"] .name-face {
  background: #152238 !important;
  color: #f3f7fc !important;
  border-radius: var(--mj-radius, 1rem) !important;
  box-shadow: inset 0 0 0 1px #334863 !important;
  border: 0 !important;
}
html[data-theme="dark"] .paper-grid thead .name-face {
  background: #1b2a40 !important;
  color: #eaf2fa !important;
}
html[data-theme="dark"] .date-cell {
  background: #1b2a40 !important;
  color: #f3f7fc !important;
  box-shadow: 0 0 0 var(--mj-gap, 10px) var(--mj-bg, #101a2b) !important;
  border: 0 !important;
}
html[data-theme="dark"] .type-cell {
  box-shadow: 0 0 0 var(--mj-gap, 10px) var(--mj-bg, #101a2b) !important;
  border: 0 !important;
}
html[data-theme="dark"] .date-cell .d {
  color: #f8fbff !important;
  font-weight: 800 !important;
}
html[data-theme="dark"] .date-cell .m {
  color: #9db0c5 !important;
}
html[data-theme="dark"] .date-cell.col-thematic {
  background: #fde68a !important;
  color: #92400e !important;
}
html[data-theme="dark"] .date-cell.col-semester {
  background: #ecfccb !important;
  color: #3f6212 !important;
}
html[data-theme="dark"] .date-cell.col-thematic .d,
html[data-theme="dark"] .date-cell.col-thematic .m,
html[data-theme="dark"] .date-cell.col-semester .d,
html[data-theme="dark"] .date-cell.col-semester .m {
  color: inherit !important;
}
html[data-theme="dark"] .date-strip {
  opacity: 1 !important;
}
html[data-theme="dark"] .date-cell.col-lecture .date-strip { background: #60a5fa !important; }
html[data-theme="dark"] .date-cell.col-laboratory .date-strip { background: #a78bfa !important; }
html[data-theme="dark"] .date-cell.col-practical .date-strip { background: #34d399 !important; }
html[data-theme="dark"] .date-cell.col-seminar .date-strip { background: #f472b6 !important; }
html[data-theme="dark"] .date-cell.col-individual .date-strip { background: #94a3b8 !important; }
html[data-theme="dark"] .date-cell.col-consultation .date-strip { background: #22d3ee !important; }
html[data-theme="dark"] .date-cell.col-control .date-strip { background: #f87171 !important; }
html[data-theme="dark"] .date-cell.col-kkr .date-strip { background: #fb7185 !important; }
html[data-theme="dark"] .date-cell.col-mkr .date-strip { background: #fb923c !important; }
html[data-theme="dark"] .date-cell.col-thematic .date-strip { background: #f59e0b !important; }
html[data-theme="dark"] .date-cell.col-semester .date-strip { background: #65a30d !important; }
html[data-theme="dark"] .date-cell.col-exam .date-strip { background: #6366f1 !important; }
html[data-theme="dark"] .date-cell.col-credit .date-strip { background: #14b8a6 !important; }
html[data-theme="dark"] .date-cell.col-course_project .date-strip { background: #d946ef !important; }
html[data-theme="dark"] .theme-span,
html[data-theme="dark"] .paper-grid thead th.theme-span {
  background: linear-gradient(90deg, #3b82f6, #0284c7) !important;
  color: #fff !important;
  box-shadow: 0 0 0 var(--mj-gap, 10px) var(--mj-bg, #101a2b) !important;
}
html[data-theme="dark"] .theme-span.col-semester,
html[data-theme="dark"] .paper-grid thead th.theme-span.col-semester {
  background: linear-gradient(90deg, #65a30d, #16a34a) !important;
  color: #fff !important;
}
/* Порожній хвіст таблиці – не синя «Тема», лише фон. */
html[data-theme="dark"] .paper-grid thead th.theme-span.is-empty,
html[data-theme="dark"] .theme-span.is-empty,
html[data-theme="dark"] .theme-filler {
  background: #101a2b !important;
  color: transparent !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .mark-input,
html[data-theme="dark"] .mark-input.readonly {
  background: #152238 !important;
  color: #c5d4e6 !important;
  box-shadow: inset 0 0 0 1px #334863 !important;
  border: 0 !important;
}
html[data-theme="dark"] .mark-input.mark-high,
html[data-theme="dark"] .mark-cell.col-thematic .mark-input.mark-high,
html[data-theme="dark"] .mark-cell.col-semester .mark-input.mark-high,
html[data-theme="dark"] .mark-cell.col-exam .mark-input.mark-high,
html[data-theme="dark"] .mark-cell.col-credit .mark-input.mark-high,
html[data-theme="dark"] .mark-cell.col-course_project .mark-input.mark-high {
  background: #bbf7d0 !important;
  color: #14532d !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .mark-input.mark-mid,
html[data-theme="dark"] .mark-cell.col-thematic .mark-input.mark-mid,
html[data-theme="dark"] .mark-cell.col-semester .mark-input.mark-mid,
html[data-theme="dark"] .mark-cell.col-exam .mark-input.mark-mid,
html[data-theme="dark"] .mark-cell.col-credit .mark-input.mark-mid,
html[data-theme="dark"] .mark-cell.col-course_project .mark-input.mark-mid {
  background: #fde68a !important;
  color: #713f12 !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .mark-input.mark-low,
html[data-theme="dark"] .mark-cell.col-thematic .mark-input.mark-low,
html[data-theme="dark"] .mark-cell.col-semester .mark-input.mark-low,
html[data-theme="dark"] .mark-cell.col-exam .mark-input.mark-low,
html[data-theme="dark"] .mark-cell.col-credit .mark-input.mark-low,
html[data-theme="dark"] .mark-cell.col-course_project .mark-input.mark-low {
  background: #fed7aa !important;
  color: #9a3412 !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .mark-input.mark-fail,
html[data-theme="dark"] .mark-cell.col-thematic .mark-input.mark-fail,
html[data-theme="dark"] .mark-cell.col-semester .mark-input.mark-fail,
html[data-theme="dark"] .mark-cell.col-exam .mark-input.mark-fail,
html[data-theme="dark"] .mark-cell.col-credit .mark-input.mark-fail,
html[data-theme="dark"] .mark-cell.col-course_project .mark-input.mark-fail {
  background: #fecaca !important;
  color: #7f1d1d !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .mark-input.mark-absent,
html[data-theme="dark"] .mark-cell.col-thematic .mark-input.mark-absent,
html[data-theme="dark"] .mark-cell.col-semester .mark-input.mark-absent,
html[data-theme="dark"] .mark-cell.col-exam .mark-input.mark-absent,
html[data-theme="dark"] .mark-cell.col-credit .mark-input.mark-absent,
html[data-theme="dark"] .mark-cell.col-course_project .mark-input.mark-absent {
  background: #fb7185 !important;
  color: #fff !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .date-cell.is-empty,
html[data-theme="dark"] .type-cell.is-empty,
html[data-theme="dark"] .mark-cell.is-empty,
html[data-theme="dark"] .theme-span.is-empty {
  background: #101a2b !important;
  box-shadow: none !important;
  color: transparent !important;
  border-color: transparent !important;
}
html[data-theme="dark"] .date-cell.col-thematic { background: #fde68a !important; color: #92400e !important; }
html[data-theme="dark"] .date-cell.col-semester { background: #ecfccb !important; color: #3f6212 !important; }
html[data-theme="dark"] .type-cell.col-lecture { background: #dbeafe !important; color: #1e40af !important; }
html[data-theme="dark"] .type-cell.col-laboratory { background: #ede9fe !important; color: #6d28d9 !important; }
html[data-theme="dark"] .type-cell.col-practical { background: #dcfce7 !important; color: #166534 !important; }
html[data-theme="dark"] .type-cell.col-seminar { background: #fce7f3 !important; color: #9d174d !important; }
html[data-theme="dark"] .type-cell.col-thematic { background: #fef3c7 !important; color: #92400e !important; }
html[data-theme="dark"] .type-cell.col-semester { background: #d9f99d !important; color: #3f6212 !important; }
html[data-theme="dark"] .type-cell.col-exam { background: #e0e7ff !important; color: #3730a3 !important; }
html[data-theme="dark"] .type-cell.col-credit { background: #ccfbf1 !important; color: #0f766e !important; }
html[data-theme="dark"] .type-cell.col-course_project { background: #fae8ff !important; color: #a21caf !important; }
html[data-theme="dark"] .type-cell.col-individual { background: #e2e8f0 !important; color: #334155 !important; }
html[data-theme="dark"] .type-cell.col-consultation { background: #cffafe !important; color: #0e7490 !important; }
html[data-theme="dark"] .type-cell.col-control { background: #fee2e2 !important; color: #b91c1c !important; }
html[data-theme="dark"] .type-cell.col-kkr { background: #ffe4e6 !important; color: #9f1239 !important; }
html[data-theme="dark"] .type-cell.col-mkr { background: #ffedd5 !important; color: #c2410c !important; }

html[data-theme="dark"] .journal-lead,
html[data-theme="dark"] .journal-kicker,
html[data-theme="dark"] .journal-save span,
html[data-theme="dark"] .j-hours-kicker,
html[data-theme="dark"] .journal-add-cap {
  color: #b6c7d9 !important;
}
html[data-theme="dark"] .journal-title {
  color: #f3f7fc !important;
}
html[data-theme="dark"] .journal-tab {
  color: #b6c7d9 !important;
}
html[data-theme="dark"] .journal-tab:hover:not(.is-on) {
  background: #22344f !important;
  color: #f3f7fc !important;
}
html[data-theme="dark"] .journal-tab.is-on {
  color: #fff !important;
}
html[data-theme="dark"] .theme-hint {
  background: #1b2433 !important;
  border-color: #f59e0b !important;
  color: #fef3c7 !important;
}
html[data-theme="dark"] .load-archive-note {
  color: #fef3c7 !important;
  background: #1b2433;
  border: 1px solid #f59e0b;
  border-radius: 0.75rem;
  padding: 0.65rem 0.9rem;
}
html[data-theme="dark"] .journal-save {
  background: none !important;
}
html[data-theme="dark"] .journal-save-dialog {
  background:
    linear-gradient(135deg, rgba(59, 130, 246, 0.16), transparent 42%),
    #1b2433 !important;
  border-color: #3b82f6 !important;
  color: #e2e8f0 !important;
  box-shadow:
    0 18px 40px rgba(2, 6, 23, 0.45),
    0 0 0 1px rgba(59, 130, 246, 0.12) inset !important;
}
html[data-theme="dark"] .journal-save.is-invalid .journal-save-dialog {
  background:
    linear-gradient(135deg, rgba(251, 113, 133, 0.14), transparent 42%),
    #2a1519 !important;
  border-color: #fb7185 !important;
}
html[data-theme="dark"] .journal-save-icon {
  color: #93c5fd !important;
  background: linear-gradient(160deg, #1e3a5f, #172554) !important;
  border-color: #3b82f6 !important;
}
html[data-theme="dark"] .journal-save.is-invalid .journal-save-icon {
  color: #fda4af !important;
  background: linear-gradient(160deg, #4c0519, #3f0a14) !important;
  border-color: #fb7185 !important;
}
html[data-theme="dark"] .journal-save-title {
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .journal-save-lead {
  color: #cbd5e1 !important;
}
html[data-theme="dark"] .journal-save-lead strong {
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .journal-save-hint {
  color: #94a3b8 !important;
}
html[data-theme="dark"] .month-tabs {
  background: #152238 !important;
}
html[data-theme="dark"] .month-tab {
  border-color: transparent !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .month-tab:not([class*="month-"]) {
  color: #eef3f9 !important;
  background: #475569 !important;
}
html[data-theme="dark"] .month-tab.month-9 { background: #f5c400 !important; color: #3f2f00 !important; }
html[data-theme="dark"] .month-tab.month-10 { background: #f59e0b !important; color: #3f2f00 !important; }
html[data-theme="dark"] .month-tab.month-11 { background: #ea580c !important; color: #fff !important; }
html[data-theme="dark"] .month-tab.month-12 { background: #a78bfa !important; color: #fff !important; }
html[data-theme="dark"] .month-tab.month-1 { background: #6366f1 !important; color: #fff !important; }
html[data-theme="dark"] .month-tab.month-2 { background: #3b82f6 !important; color: #fff !important; }
html[data-theme="dark"] .month-tab.month-3 { background: #22c55e !important; color: #fff !important; }
html[data-theme="dark"] .month-tab.month-4 { background: #84cc16 !important; color: #1f3308 !important; }
html[data-theme="dark"] .month-tab.month-5 { background: #16a34a !important; color: #fff !important; }
html[data-theme="dark"] .month-tab.month-6 { background: #0d9488 !important; color: #fff !important; }
html[data-theme="dark"] .month-tab.is-active {
  box-shadow: none !important;
  outline: none !important;
  transform: none !important;
}

html[data-theme="dark"] .dash-stat-label,
html[data-theme="dark"] .dash-stat-sub {
  color: #c5d4e6 !important;
}
html[data-theme="dark"] .dash-stat-value {
  color: #f8fbff !important;
}

html[data-theme="dark"] .rnp-dept,
html[data-theme="dark"] .rnp-dept.is-akit,
html[data-theme="dark"] .rnp-dept.is-bki,
html[data-theme="dark"] .rnp-dept.is-it,
html[data-theme="dark"] .rnp-dept.is-poly,
html[data-theme="dark"] .rnp-dept.is-akit.is-active,
html[data-theme="dark"] .rnp-dept.is-bki.is-active,
html[data-theme="dark"] .rnp-dept.is-it.is-active,
html[data-theme="dark"] .rnp-dept.is-poly.is-active {
  background: #152238 !important;
  color: #e7eef7 !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28) !important;
  border: 1px solid #334863 !important;
}
html[data-theme="dark"] .rnp-dept.is-akit { border-color: #0284c7 !important; }
html[data-theme="dark"] .rnp-dept.is-bki { border-color: #0f766e !important; }
html[data-theme="dark"] .rnp-dept.is-it { border-color: #6366f1 !important; }
html[data-theme="dark"] .rnp-dept.is-poly { border-color: #c2410c !important; }
html[data-theme="dark"] .rnp-dept.is-akit.is-active { background: #12324a !important; }
html[data-theme="dark"] .rnp-dept.is-bki.is-active { background: #134e4a !important; }
html[data-theme="dark"] .rnp-dept.is-it.is-active { background: #1e1b4b !important; }
html[data-theme="dark"] .rnp-dept.is-poly.is-active { background: #3a2210 !important; }
html[data-theme="dark"] .rnp-dept-copy strong {
  color: #f3f7fc !important;
}
html[data-theme="dark"] .rnp-dept-copy span,
html[data-theme="dark"] .rnp-dept:not(.is-active) .rnp-dept-copy span,
html[data-theme="dark"] .rnp-dept.is-active .rnp-dept-copy span {
  color: #b6c7d9 !important;
  font-weight: 600 !important;
  opacity: 1 !important;
}
html[data-theme="dark"] .rnp-depts-hint {
  color: #c5d4e6 !important;
}
html[data-theme="dark"] .rnp-dept-count {
  background: #22344f !important;
  color: #e7eef7 !important;
}
html[data-theme="dark"] .rnp-dept.is-akit .rnp-dept-count { color: #7dd3fc !important; }
html[data-theme="dark"] .rnp-dept.is-bki .rnp-dept-count { color: #5eead4 !important; }
html[data-theme="dark"] .rnp-dept.is-it .rnp-dept-count { color: #a5b4fc !important; }
html[data-theme="dark"] .rnp-dept.is-poly .rnp-dept-count { color: #fdba74 !important; }
html[data-theme="dark"] .rnp-dept.is-akit.is-active .rnp-dept-count { background: #0284c7 !important; color: #fff !important; }
html[data-theme="dark"] .rnp-dept.is-bki.is-active .rnp-dept-count { background: #0f766e !important; color: #fff !important; }
html[data-theme="dark"] .rnp-dept.is-it.is-active .rnp-dept-count { background: #4f46e5 !important; color: #fff !important; }
html[data-theme="dark"] .rnp-dept.is-poly.is-active .rnp-dept-count { background: #c2410c !important; color: #fff !important; }
html[data-theme="dark"] .rnp-dept-head {
  background: #1b2a40 !important;
  border: 1px solid #334863 !important;
}
html[data-theme="dark"] .rnp-dept-head-label {
  color: #9db0c5 !important;
  opacity: 1 !important;
}
html[data-theme="dark"] .rnp-dept-mail,
html[data-theme="dark"] .rnp-dept-person strong {
  color: #eaf2fa !important;
}
html[data-theme="dark"] .rnp-dept-vacant {
  color: #9db0c5 !important;
}
html[data-theme="dark"] .rnp-dept-initials,
html[data-theme="dark"] .rnp-dept.is-akit .rnp-dept-initials,
html[data-theme="dark"] .rnp-dept.is-bki .rnp-dept-initials,
html[data-theme="dark"] .rnp-dept.is-it .rnp-dept-initials,
html[data-theme="dark"] .rnp-dept.is-poly .rnp-dept-initials {
  background: #22344f !important;
  color: #cfe4f5 !important;
}
html[data-theme="dark"] .rnp-dept.is-akit .rnp-dept-icon { background: #12324a !important; color: #7dd3fc !important; }
html[data-theme="dark"] .rnp-dept.is-bki .rnp-dept-icon { background: #134e4a !important; color: #5eead4 !important; }
html[data-theme="dark"] .rnp-dept.is-it .rnp-dept-icon { background: #1e1b4b !important; color: #a5b4fc !important; }
html[data-theme="dark"] .rnp-dept.is-poly .rnp-dept-icon { background: #3a2210 !important; color: #fdba74 !important; }
html[data-theme="dark"] .rnp-dept.is-akit.is-active .rnp-dept-icon { background: #0284c7 !important; color: #fff !important; }
html[data-theme="dark"] .rnp-dept.is-bki.is-active .rnp-dept-icon { background: #0f766e !important; color: #fff !important; }
html[data-theme="dark"] .rnp-dept.is-it.is-active .rnp-dept-icon { background: #4f46e5 !important; color: #fff !important; }
html[data-theme="dark"] .rnp-dept.is-poly.is-active .rnp-dept-icon { background: #c2410c !important; color: #fff !important; }

html[data-theme="dark"] .alert-warning,
html[data-theme="dark"] .alert-warning * {
  color: #fef3c7 !important;
}
html[data-theme="dark"] .alert-warning {
  background: #1b2433 !important;
  border-color: #f59e0b !important;
}
html[data-theme="dark"] .alert-info {
  background: #12324a !important;
  border-color: #0284c7 !important;
  color: #7dd3fc !important;
}
html[data-theme="dark"] .alert-info * { color: #7dd3fc !important; }

html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .form-text,
html[data-theme="dark"] .small.text-muted,
html[data-theme="dark"] .page-lead,
html[data-theme="dark"] .eyebrow {
  color: #d0dceb !important;
}

/* ===== Темна тема: контраст ролей, легенд, hover, РНП ===== */
html[data-theme="dark"] .backup-legend-item {
  background: #152238 !important;
  border-color: #334863 !important;
}
html[data-theme="dark"] .backup-legend-item p,
html[data-theme="dark"] .backup-inside span,
html[data-theme="dark"] .staff-picks-hint,
html[data-theme="dark"] .staff-locked,
html[data-theme="dark"] .staff-mail,
html[data-theme="dark"] .staff-mail span,
html[data-theme="dark"] .year-switch-caption,
html[data-theme="dark"] .year-open-label {
  color: #c5d4e6 !important;
}
html[data-theme="dark"] .staff-mail i {
  color: #7dd3fc !important;
}

html[data-theme="dark"] .staff-pick {
  background: #1b2a40 !important;
  border-color: #4b6785 !important;
  color: #eaf2fa !important;
}
html[data-theme="dark"] .staff-pick:hover {
  background: #22344f !important;
  border-color: #38bdf8 !important;
  color: #f8fbff !important;
}
html[data-theme="dark"] .staff-pick.is-teacher.is-on,
html[data-theme="dark"] .staff-pick.is-teacher:hover {
  background: #12324a !important;
  border-color: #38bdf8 !important;
  color: #7dd3fc !important;
}
html[data-theme="dark"] .staff-pick.is-curator.is-on,
html[data-theme="dark"] .staff-pick.is-curator:hover {
  background: #134e4a !important;
  border-color: #2dd4bf !important;
  color: #5eead4 !important;
}
html[data-theme="dark"] .staff-pick.is-methodist.is-on,
html[data-theme="dark"] .staff-pick.is-methodist:hover {
  background: #1e1b4b !important;
  border-color: #a5b4fc !important;
  color: #c7d2fe !important;
}
html[data-theme="dark"] .staff-pick.is-admin.is-on,
html[data-theme="dark"] .staff-pick.is-admin:hover {
  background: #ede9fe !important;
  border-color: #c4b5fd !important;
  color: #5b21b6 !important;
}
html[data-theme="dark"] .staff-pick.is-head.is-on,
html[data-theme="dark"] .staff-pick.is-head:hover {
  background: #4a044e !important;
  border-color: #f0abfc !important;
  color: #f5d0fe !important;
}
html[data-theme="dark"] .staff-pick.is-on.is-locked {
  background: #22344f !important;
  color: #f3f7fc !important;
}

html[data-theme="dark"] .chip-role.is-teacher { background: #e0f7ff !important; color: #0077b6 !important; }
html[data-theme="dark"] .chip-role.is-curator { background: #e6fbf6 !important; color: #0f766e !important; }
html[data-theme="dark"] .chip-role.is-dean { background: #fff6d8 !important; color: #b45309 !important; }
html[data-theme="dark"] .chip-role.is-head { background: #fce7f3 !important; color: #9d174d !important; }
html[data-theme="dark"] .chip-role.is-methodist { background: #eef2ff !important; color: #3730a3 !important; }
html[data-theme="dark"] .chip-role.is-admin { background: #ede9fe !important; color: #6d28d9 !important; }
html[data-theme="dark"] .chip-role.is-soon { background: #f1f5f9 !important; color: #64748b !important; }
html[data-theme="dark"] .chip-dept.is-akit { background: #e0f2fe !important; color: #0369a1 !important; }
html[data-theme="dark"] .chip-dept.is-bki { background: #d1fae5 !important; color: #047857 !important; }
html[data-theme="dark"] .chip-dept.is-it { background: #e0e7ff !important; color: #3730a3 !important; }
html[data-theme="dark"] .chip-dept.is-poly { background: #ffedd5 !important; color: #c2410c !important; }
html[data-theme="dark"] .chip-headman {
  background: #fff6d8 !important;
  color: #b45309 !important;
}

html[data-theme="dark"] .rnp-ico.is-open { background: #e0f7ff !important; color: #0077b6 !important; }
html[data-theme="dark"] .rnp-ico.is-open:hover { background: #0077b6 !important; color: #fff !important; }
html[data-theme="dark"] .rnp-ico.is-edit { background: #fff3cd !important; color: #997404 !important; }
html[data-theme="dark"] .rnp-ico.is-edit:hover { background: #ffc107 !important; color: #000 !important; }
html[data-theme="dark"] .rnp-ico.is-delete { background: #ffe8ea !important; color: #be123c !important; }
html[data-theme="dark"] .rnp-ico.is-delete:hover { background: #e11d48 !important; color: #fff !important; }
html[data-theme="dark"] .rnp-ico.is-grad { background: #ede9fe !important; color: #6d28d9 !important; }
html[data-theme="dark"] .rnp-ico.is-grad:hover { background: #7c3aed !important; color: #fff !important; }
html[data-theme="dark"] .rnp-ico.is-restore { background: #e6fbf6 !important; color: #0f766e !important; }
html[data-theme="dark"] .rnp-ico.is-restore:hover { background: #0f766e !important; color: #fff !important; }
html[data-theme="dark"] .rnp-ico.is-cancel { background: #eef2f7 !important; color: #64748b !important; }
html[data-theme="dark"] .rnp-ico.is-cancel:hover { background: #64748b !important; color: #fff !important; }

html[data-theme="dark"] .rnp-plan-card:not(.rnp-create-card),
html[data-theme="dark"] .rnp-plan-card:not(.rnp-create-card):hover {
  background: #152238 !important;
  color: #e7eef7 !important;
  border-color: #334863 !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28) !important;
}
html[data-theme="dark"] .rnp-plan-card:not(.rnp-create-card) .text-muted,
html[data-theme="dark"] .rnp-plan-card:not(.rnp-create-card) p,
html[data-theme="dark"] .rnp-plan-card:not(.rnp-create-card) small,
html[data-theme="dark"] .rnp-plan-meta,
html[data-theme="dark"] .rnp-plan-meta span,
html[data-theme="dark"] .rnp-plan-actions {
  color: #c5d4e6 !important;
}
html[data-theme="dark"] .rnp-plan-card:not(.rnp-create-card) .rnp-plan-spec {
  color: #c5d4e6 !important;
}
html[data-theme="dark"] .rnp-plan-card:not(.rnp-create-card) .rnp-plan-spec span {
  color: #7dd3fc !important;
}
html[data-theme="dark"] .rnp-plan-card:not(.rnp-create-card) .rnp-plan-title,
html[data-theme="dark"] .rnp-plan-card:not(.rnp-create-card) strong,
html[data-theme="dark"] .rnp-plan-card:not(.rnp-create-card) h3 {
  color: #f3f7fc !important;
}
html[data-theme="dark"] .rnp-plan-facts {
  color: #c5d4e6 !important;
  border-top-color: #334863 !important;
}
html[data-theme="dark"] .rnp-plan-facts span {
  color: #c5d4e6 !important;
}
html[data-theme="dark"] .rnp-plan-facts i {
  color: #7dd3fc !important;
}
html[data-theme="dark"] .rnp-plan-card .stu-avatar {
  background: #22344f !important;
  color: #cfe4f5 !important;
}
html[data-theme="dark"] .rnp-plan-card .chip-course.is-1 {
  background: #e0f7ff !important;
  color: #0077b6 !important;
}
html[data-theme="dark"] .rnp-plan-card .chip-course.is-2 {
  background: #e6fbf6 !important;
  color: #0f766e !important;
}
html[data-theme="dark"] .rnp-plan-card .chip-course.is-3 {
  background: #fff6d8 !important;
  color: #b45309 !important;
}
html[data-theme="dark"] .rnp-plan-card .chip-course.is-4 {
  background: #ede9fe !important;
  color: #6d28d9 !important;
}
html[data-theme="dark"] .rnp-plan-card .chip-status.is-studying {
  background: #e6fbf6 !important;
  color: #0f766e !important;
}
html[data-theme="dark"] .rnp-plan-card .chip-status.is-academic_leave {
  background: #fff6d8 !important;
  color: #b45309 !important;
}

html[data-theme="dark"] .rnp-paper {
  background: #101a2b !important;
  color: #eef3f9 !important;
  box-shadow: none !important;
  border-color: #334863 !important;
}
html[data-theme="dark"] .rnp-paper table,
html[data-theme="dark"] .rnp-paper th,
html[data-theme="dark"] .rnp-paper td,
html[data-theme="dark"] .rnp-th,
html[data-theme="dark"] .rnp-grid td,
html[data-theme="dark"] .rnp-grid td.rnp-name {
  background: #152238 !important;
  color: #eef3f9 !important;
  border-color: #4b6785 !important;
}
html[data-theme="dark"] .rnp-paper thead th,
html[data-theme="dark"] .rnp-grid thead th,
html[data-theme="dark"] .rnp-th {
  background: #1b2a40 !important;
  color: #f8fbff !important;
}
html[data-theme="dark"] .rnp-h-vert,
html[data-theme="dark"] .rnp-grid thead th .rnp-h-vert,
html[data-theme="dark"] .rnp-paper thead .rnp-h-vert {
  color: #f8fbff !important;
  font-weight: 800 !important;
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.15);
}
html[data-theme="dark"] .rnp-org,
html[data-theme="dark"] .rnp-college,
html[data-theme="dark"] .rnp-titleblock h2,
html[data-theme="dark"] .rnp-approve,
html[data-theme="dark"] .rnp-approve-title,
html[data-theme="dark"] .rnp-meta,
html[data-theme="dark"] .rnp-section,
html[data-theme="dark"] .rnp-budget caption,
html[data-theme="dark"] .rnp-budget th,
html[data-theme="dark"] .rnp-budget td,
html[data-theme="dark"] .rnp-legend,
html[data-theme="dark"] .rnp-cal th,
html[data-theme="dark"] .rnp-cal td {
  color: #eef3f9 !important;
}
html[data-theme="dark"] .rnp-spec-hint {
  color: #d0dceb !important;
}
html[data-theme="dark"] .rnp-key {
  background: #1b2a40 !important;
  border-color: #4b6785 !important;
  color: #f3f7fc !important;
}
html[data-theme="dark"] .rnp-cal th {
  background: #1b2a40 !important;
}
html[data-theme="dark"] .rnp-vac { background: #fef9c3 !important; color: #713f12 !important; }
html[data-theme="dark"] .rnp-np { background: #e0f2fe !important; color: #0c4a6e !important; }
html[data-theme="dark"] .rnp-tp { background: #ede9fe !important; color: #5b21b6 !important; }
html[data-theme="dark"] .rnp-sem { background: #fce7f3 !important; color: #9d174d !important; }
html[data-theme="dark"] .rnp-dpa { background: #fee2e2 !important; color: #b91c1c !important; }
html[data-theme="dark"] .rnp-att { background: #dcfce7 !important; color: #166534 !important; }
html[data-theme="dark"] .rnp-intro { background: #ffedd5 !important; color: #c2410c !important; }
html[data-theme="dark"] .rnp-pd { background: #fae8ff !important; color: #a21caf !important; }
html[data-theme="dark"] .rnp-kr { background: #ffedd5 !important; color: #c2410c !important; }
html[data-theme="dark"] .rnp-add-row td {
  background: #134e4a !important;
  border-color: #2dd4bf !important;
}
html[data-theme="dark"] .rnp-add-btn {
  background: #1b2a40 !important;
  color: #5eead4 !important;
  border-color: #2dd4bf !important;
}
html[data-theme="dark"] .rnp-add-btn:hover,
html[data-theme="dark"] .rnp-add-btn:focus {
  background: #0f766e !important;
  color: #fff !important;
}
html[data-theme="dark"] .rnp-row-drag,
html[data-theme="dark"] .rnp-row-del,
html[data-theme="dark"] .rnp-row-split {
  background: #1b2a40 !important;
  border-color: #4b6785 !important;
  color: #c5d4e6 !important;
}
html[data-theme="dark"] .rnp-row-drag:hover,
html[data-theme="dark"] .rnp-row-drag:focus {
  background: #22344f !important;
  color: #f3f7fc !important;
}
html[data-theme="dark"] .rnp-row-del:hover,
html[data-theme="dark"] .rnp-row-del:focus {
  background: #4c1524 !important;
  border-color: #fb7185 !important;
  color: #fda4af !important;
}
html[data-theme="dark"] .rnp-row-split:hover,
html[data-theme="dark"] .rnp-row-split:focus {
  background: #12324a !important;
  border-color: #38bdf8 !important;
  color: #7dd3fc !important;
}
html[data-theme="dark"] .rnp-grid .rnp-total td,
html[data-theme="dark"] .rnp-grid .rnp-extra td,
html[data-theme="dark"] .rnp-grid tr.rnp-star td {
  background: #3a3218 !important;
  color: #fde68a !important;
}

html[data-theme="dark"] .tooltip .tooltip-inner,
html[data-theme="dark"] .popover,
html[data-theme="dark"] .popover-body {
  background: #1b2a40 !important;
  color: #f3f7fc !important;
  border-color: #334863 !important;
}
html[data-theme="dark"] .tooltip .tooltip-arrow::before,
html[data-theme="dark"] .bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow::before,
html[data-theme="dark"] .bs-tooltip-top .tooltip-arrow::before {
  border-top-color: #1b2a40 !important;
}

html[data-theme="dark"] .modal-title,
html[data-theme="dark"] .kep-confirm-title,
html[data-theme="dark"] #kepConfirmTitle {
  color: #f3f7fc !important;
}
html[data-theme="dark"] #kepConfirmText,
html[data-theme="dark"] .kep-confirm-text,
html[data-theme="dark"] .modal-body {
  color: #c5d4e6 !important;
}
html[data-theme="dark"] #kepConfirmModal .kep-confirm {
  border-color: #3d5570 !important;
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.1), transparent 46%),
    #152238 !important;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.45) !important;
}
html[data-theme="dark"] #kepConfirmModal.is-warn .kep-confirm {
  border-color: #92400e !important;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.14), transparent 46%),
    #1b2433 !important;
}
html[data-theme="dark"] #kepConfirmModal.is-danger .kep-confirm {
  border-color: #9f1239 !important;
  background:
    linear-gradient(135deg, rgba(244, 63, 94, 0.14), transparent 46%),
    #241820 !important;
}
html[data-theme="dark"] .kep-confirm-icon {
  color: #7dd3fc !important;
  background: linear-gradient(160deg, #1e3a5f, #16324f) !important;
  border-color: #3d5570 !important;
  box-shadow: none !important;
}
html[data-theme="dark"] #kepConfirmModal.is-warn .kep-confirm-icon {
  color: #fbbf24 !important;
  background: linear-gradient(160deg, #3a2a12, #2a1f0c) !important;
  border-color: #92400e !important;
}
html[data-theme="dark"] #kepConfirmModal.is-danger .kep-confirm-icon {
  color: #fb7185 !important;
  background: linear-gradient(160deg, #3f1d2a, #2a1218) !important;
  border-color: #9f1239 !important;
}
html[data-theme="dark"] .modal-body .alert,
html[data-theme="dark"] .modal-body .alert-warning,
html[data-theme="dark"] #kepConfirmText .alert {
  background: #1b2433 !important;
  border-color: #f59e0b !important;
  color: #fef3c7 !important;
}
html[data-theme="dark"] .load-tariff-v2 tbody tr:nth-child(even of .js-load-subj-row) td {
  background: #152238;
}
html[data-theme="dark"] .load-tariff-v2 tbody tr.js-load-subj-row:hover td.is-sticky-1 {
  box-shadow: inset 3px 0 0 #38bdf8, 1px 0 0 #334863;
}
html[data-theme="dark"] .load-tariff-v2 .is-sticky {
  background: #101a2b;
  box-shadow: 1px 0 0 #334863;
}
html[data-theme="dark"] .load-tariff-v2 thead .is-sticky,
html[data-theme="dark"] .load-tariff-v2 tfoot .is-sticky,
html[data-theme="dark"] .load-tariff thead th,
html[data-theme="dark"] .load-tariff tfoot th {
  background: #1b2a40;
}
html[data-theme="dark"] .load-fund-chips {
  background: #1b2a40;
  border-color: #334863;
}
html[data-theme="dark"] .load-fund-thumb {
  background: var(--bs-info);
  box-shadow: 0 4px 12px rgba(13, 202, 240, 0.28);
}
html[data-theme="dark"] .load-fund-chips.is-contract .load-fund-thumb {
  background: var(--bs-warning);
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.28);
}
html[data-theme="dark"] .load-fund-chip {
  color: #94a3b8;
}
html[data-theme="dark"] .load-fund-chip.is-on {
  color: #082f49;
}
html[data-theme="dark"] .load-fund-chips.is-contract .load-fund-chip.is-on {
  color: #451a03;
}
html[data-theme="dark"] .load-fund-chip:not(.is-on):hover {
  color: #e2e8f0;
}
html[data-theme="dark"] .load-fund-sem + .load-fund-sem {
  border-top-color: #334863;
}
html[data-theme="dark"] .load-fund-sem-label {
  color: #94a3b8;
}
html[data-theme="dark"] .load-subj-band td {
  background: #1b2a40 !important;
  border-top-color: #334863;
}
html[data-theme="dark"] .load-subj-toggle {
  color: #e7eef7;
}
html[data-theme="dark"] .load-subj-toggle span {
  color: #94a3b8;
}
html[data-theme="dark"] .btn-outline-secondary {
  color: #e7eef7 !important;
  border-color: #4b6785 !important;
}
html[data-theme="dark"] .btn-outline-secondary:hover {
  background: #22344f !important;
  color: #fff !important;
}

html[data-theme="dark"] .stu-quick.is-methodist {
  background: #eef2ff !important;
  color: #3730a3 !important;
}
html[data-theme="dark"] .stu-quick.is-teacher {
  background: #e6fbf6 !important;
  color: #0f766e !important;
}
html[data-theme="dark"] .stu-quick.is-curator {
  background: #e0f7ff !important;
  color: #0077b6 !important;
}
html[data-theme="dark"] .stu-quick.is-head {
  background: #fce7f3 !important;
  color: #9d174d !important;
}

html[data-theme="dark"] .table a,
html[data-theme="dark"] .cabinet-access-table a,
html[data-theme="dark"] a.fw-bold {
  color: #7dd3fc !important;
}
html[data-theme="dark"] .table .small,
html[data-theme="dark"] .cabinet-access-table .small,
html[data-theme="dark"] .d-flex.flex-wrap.gap-2.mb-3.small,
html[data-theme="dark"] .d-flex.flex-wrap.gap-2.mb-3.small .text-muted {
  color: #c5d4e6 !important;
}

html[data-theme="dark"] .rnp-zoom,
html[data-theme="dark"] .rnp-zoom-btn,
html[data-theme="dark"] .rnp-zoom-value {
  background: #1b2a40 !important;
  color: #e7eef7 !important;
  border-color: #334863 !important;
}
html[data-theme="dark"] .rnp-zoom-btn:hover {
  background: #134e4a !important;
  color: #5eead4 !important;
}

html[data-theme="dark"] [class*="card"] .text-muted,
html[data-theme="dark"] [class*="card"] p,
html[data-theme="dark"] .card .small {
  color: #c5d4e6 !important;
}

html[data-theme="dark"] .rnp-ico[data-tip] {
  position: relative;
  z-index: 5;
}
html[data-theme="dark"] .rnp-ico[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.4rem);
  z-index: 40;
  padding: 0.35rem 0.55rem;
  border-radius: 0.45rem;
  background: #1b2a40;
  color: #f3f7fc;
  border: 1px solid #4b6785;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.rnp-ico[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.4rem);
  z-index: 40;
  padding: 0.35rem 0.55rem;
  border-radius: 0.45rem;
  background: #12324a;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(15, 40, 70, 0.18);
  pointer-events: none;
}

/* ===== Темна тема: вхід + розподіл годин ===== */
html[data-theme="dark"] .login-panel {
  background: #152238 !important;
  color: #e7eef7 !important;
}
html[data-theme="dark"] .login-panel h2 {
  color: #f3f7fc !important;
}
html[data-theme="dark"] .login-kicker {
  color: #7dd3fc !important;
}
html[data-theme="dark"] .login-copy {
  color: #c5d4e6 !important;
}
html[data-theme="dark"] .login-choice {
  background: #1b2a40 !important;
  border-color: #4b6785 !important;
  color: #e7eef7 !important;
}
html[data-theme="dark"] .login-choice:hover {
  background: #22344f !important;
  border-color: #38bdf8 !important;
}
html[data-theme="dark"] .login-choice-copy strong {
  color: #f3f7fc !important;
}
html[data-theme="dark"] .login-choice-copy span {
  color: #c5d4e6 !important;
}
html[data-theme="dark"] .login-choice-go {
  color: #7dd3fc !important;
}
html[data-theme="dark"] .login-choice.is-teacher .login-choice-icon {
  background: #12324a !important;
  color: #7dd3fc !important;
}
html[data-theme="dark"] .login-choice.is-student .login-choice-icon {
  background: #134e4a !important;
  color: #5eead4 !important;
}
html[data-theme="dark"] .login-alert-danger {
  background: #4c1524 !important;
  color: #fecaca !important;
  border: 1px solid #fb7185 !important;
}
html[data-theme="dark"] .login-alert-success {
  background: #14532d !important;
  color: #bbf7d0 !important;
}
html[data-theme="dark"] .login-alert-warning {
  background: #1b2433 !important;
  border: 1px solid #f59e0b !important;
  color: #fef3c7 !important;
}
html[data-theme="dark"] .login-alert-info {
  background: #12324a !important;
  color: #7dd3fc !important;
}
html[data-theme="dark"] .staff-alt,
html[data-theme="dark"] .login-panel a:not(.staff-back) {
  color: #7dd3fc !important;
}
html[data-theme="dark"] .staff-field-box input::placeholder {
  color: #7f93a8 !important;
}
html[data-theme="dark"] .app-credits-kicker {
  color: #9db0c5 !important;
}
html[data-theme="dark"] .app-credits-person strong {
  color: #eaf2fa !important;
}
html[data-theme="dark"] .app-credits-person span {
  color: #9db0c5 !important;
}

html[data-theme="dark"] .hours-plan-sub,
html[data-theme="dark"] .hours-legend-title,
html[data-theme="dark"] .hours-card-seq,
html[data-theme="dark"] .hours-card-title h2,
html[data-theme="dark"] .hours-name-input,
html[data-theme="dark"] .hours-seq-input {
  color: #f3f7fc !important;
}
html[data-theme="dark"] .hours-save {
  background: rgba(2, 6, 23, 0.55) !important;
}
html[data-theme="dark"] .hours-save-dialog {
  background:
    linear-gradient(135deg, rgba(59, 130, 246, 0.16), transparent 42%),
    #1b2433 !important;
  border-color: #3b82f6 !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .hours-save-icon {
  color: #93c5fd !important;
  background: linear-gradient(160deg, #1e3a5f, #172554) !important;
  border-color: #3b82f6 !important;
}
html[data-theme="dark"] .hours-save-title {
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .hours-save-lead {
  color: #cbd5e1 !important;
}
html[data-theme="dark"] .hours-save-lead strong {
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .hours-card-seq {
  color: #7dd3fc !important;
}
html[data-theme="dark"] .hours-plan-sub,
html[data-theme="dark"] .hours-legend-title {
  color: #d0dceb !important;
}
html[data-theme="dark"] .hours-card-meta {
  color: #d7e3f0 !important;
}
html[data-theme="dark"] .hours-pill {
  background: #1b2a40 !important;
  border-color: #4b6785 !important;
  color: #d7e3f0 !important;
}
html[data-theme="dark"] .hours-pill b {
  color: #7dd3fc !important;
}
html[data-theme="dark"] .hours-pill.is-sum {
  background: #12324a !important;
  border-color: #38bdf8 !important;
  color: #bae6fd !important;
}
html[data-theme="dark"] .hours-pill.is-sum b {
  color: #e0f2fe !important;
}
html[data-theme="dark"] .hours-overview-person {
  background: #1b2a40 !important;
  border-color: #4b6785 !important;
  color: #eef3f9 !important;
}
html[data-theme="dark"] .hours-overview-person.is-second {
  background: #3b1d4a !important;
  border-color: #e879f9 !important;
}
html[data-theme="dark"] .hours-overview-person.is-vacancy {
  background: #3a3218 !important;
  border-color: #fbbf24 !important;
}
html[data-theme="dark"] .hours-overview-name,
html[data-theme="dark"] .hours-overview-person .hours-overview-name {
  color: #f8fbff !important;
}
html[data-theme="dark"] .hours-overview-hours {
  color: #d7e3f0 !important;
}
html[data-theme="dark"] .hours-overview-empty {
  color: #d0dceb !important;
}
html[data-theme="dark"] .hours-role {
  background: #134e4a !important;
  color: #5eead4 !important;
}
html[data-theme="dark"] .hours-overview-person.is-second .hours-role {
  background: #4a044e !important;
  color: #f0abfc !important;
}
html[data-theme="dark"] .hours-role.is-vacancy {
  background: #45320f !important;
  color: #fde68a !important;
}
html[data-theme="dark"] .hours-card-overview {
  background: #152238 !important;
}
html[data-theme="dark"] .hours-share-line {
  background: #1b2a40 !important;
  border-color: #334863 !important;
  color: #eef3f9 !important;
}
html[data-theme="dark"] .hours-teacher-pick,
html[data-theme="dark"] .hours-fund-pick,
html[data-theme="dark"] .hours-fund-label,
html[data-theme="dark"] .hours-val-input,
html[data-theme="dark"] .hours-name-input:focus,
html[data-theme="dark"] .hours-seq-input:focus,
html[data-theme="dark"] .hours-teacher-pick:focus,
html[data-theme="dark"] .hours-fund-pick:focus,
html[data-theme="dark"] .hours-val-input:focus {
  background: #101a2b !important;
  color: #eef3f9 !important;
  border-color: #4b6785 !important;
}
html[data-theme="dark"] .hours-val.is-empty,
html[data-theme="dark"] .hours-val-input.is-empty {
  background: #152238 !important;
  color: #9db0c5 !important;
  border-color: #334863 !important;
}
html[data-theme="dark"] .hours-sem-head strong,
html[data-theme="dark"] .hours-share-total,
html[data-theme="dark"] .hours-share-meta {
  color: #d7e3f0 !important;
}
html[data-theme="dark"] .hours-sem-sum {
  background: #12324a !important;
  color: #7dd3fc !important;
}
html[data-theme="dark"] .hours-add-share {
  color: #7dd3fc !important;
}
html[data-theme="dark"] .hours-add-share:hover {
  color: #bae6fd !important;
}
html[data-theme="dark"] .hours-kind-grid.is-hourly {
  border-top-color: #334863;
}
html[data-theme="dark"] .hours-legend-group.is-core .hours-legend-title {
  color: #93c5fd !important;
}
html[data-theme="dark"] .hours-legend-group.is-extra .hours-legend-title {
  color: #fcd34d !important;
}
html[data-theme="dark"] .hours-legend-group.is-hourly .hours-legend-title {
  color: #5eead4 !important;
}
/* Темна тема: ті самі пастелі журналу (світлий фон чіпа + темний текст). */
html[data-theme="dark"] .hours-legend-chip.is-kind-lecture,
html[data-theme="dark"] .hours-kind-cell.is-kind-lecture:not(.is-hourly) { --hk-bg: #dbeafe; --hk-bd: #93c5fd; --hk-fg: #1e40af; }
html[data-theme="dark"] .hours-legend-chip.is-kind-lab,
html[data-theme="dark"] .hours-kind-cell.is-kind-lab:not(.is-hourly) { --hk-bg: #ede9fe; --hk-bd: #c4b5fd; --hk-fg: #6d28d9; }
html[data-theme="dark"] .hours-legend-chip.is-kind-practice,
html[data-theme="dark"] .hours-kind-cell.is-kind-practice:not(.is-hourly) { --hk-bg: #dcfce7; --hk-bd: #86efac; --hk-fg: #166534; }
html[data-theme="dark"] .hours-legend-chip.is-kind-consult,
html[data-theme="dark"] .hours-kind-cell.is-kind-consult:not(.is-hourly) { --hk-bg: #cffafe; --hk-bd: #67e8f9; --hk-fg: #0e7490; }
html[data-theme="dark"] .hours-legend-chip.is-kind-preexam,
html[data-theme="dark"] .hours-kind-cell.is-kind-preexam:not(.is-hourly) { --hk-bg: #fef3c7; --hk-bd: #fcd34d; --hk-fg: #92400e; }
html[data-theme="dark"] .hours-legend-chip.is-kind-credit,
html[data-theme="dark"] .hours-kind-cell.is-kind-credit:not(.is-hourly) { --hk-bg: #ccfbf1; --hk-bd: #5eead4; --hk-fg: #0f766e; }
html[data-theme="dark"] .hours-legend-chip.is-kind-exam,
html[data-theme="dark"] .hours-kind-cell.is-kind-exam:not(.is-hourly) { --hk-bg: #e0e7ff; --hk-bd: #a5b4fc; --hk-fg: #3730a3; }
html[data-theme="dark"] .hours-legend-chip.is-kind-course,
html[data-theme="dark"] .hours-kind-cell.is-kind-course:not(.is-hourly) { --hk-bg: #fae8ff; --hk-bd: #e879f9; --hk-fg: #a21caf; }
html[data-theme="dark"] .hours-legend-chip.is-kind-field_practice,
html[data-theme="dark"] .hours-kind-cell.is-kind-field_practice:not(.is-hourly) { --hk-bg: #d9f99d; --hk-bd: #bef264; --hk-fg: #3f6212; }
html[data-theme="dark"] .hours-legend-chip.is-kind-defense,
html[data-theme="dark"] .hours-kind-cell.is-kind-defense:not(.is-hourly) { --hk-bg: #e2e8f0; --hk-bd: #cbd5e1; --hk-fg: #334155; }
html[data-theme="dark"] .hours-legend-chip.is-hourly.is-kind-lecture,
html[data-theme="dark"] .hours-kind-cell.is-hourly.is-kind-lecture { --hk-bg: #eff6ff; --hk-bd: #93c5fd; --hk-fg: #1e40af; }
html[data-theme="dark"] .hours-legend-chip.is-hourly.is-kind-lab,
html[data-theme="dark"] .hours-kind-cell.is-hourly.is-kind-lab { --hk-bg: #f5f3ff; --hk-bd: #c4b5fd; --hk-fg: #6d28d9; }
html[data-theme="dark"] .hours-legend-chip.is-hourly.is-kind-practice,
html[data-theme="dark"] .hours-kind-cell.is-hourly.is-kind-practice { --hk-bg: #f0fdf4; --hk-bd: #86efac; --hk-fg: #166534; }
html[data-theme="dark"] .hours-legend-chip.is-hourly.is-kind-consult,
html[data-theme="dark"] .hours-kind-cell.is-hourly.is-kind-consult { --hk-bg: #ecfeff; --hk-bd: #67e8f9; --hk-fg: #0e7490; }
html[data-theme="dark"] .hours-legend-chip.is-hourly.is-kind-preexam,
html[data-theme="dark"] .hours-kind-cell.is-hourly.is-kind-preexam { --hk-bg: #fffbeb; --hk-bd: #fcd34d; --hk-fg: #92400e; }
html[data-theme="dark"] .hours-legend-chip.is-hourly.is-kind-credit,
html[data-theme="dark"] .hours-kind-cell.is-hourly.is-kind-credit { --hk-bg: #f0fdfa; --hk-bd: #5eead4; --hk-fg: #0f766e; }
html[data-theme="dark"] .hours-legend-chip.is-hourly.is-kind-exam,
html[data-theme="dark"] .hours-kind-cell.is-hourly.is-kind-exam { --hk-bg: #eef2ff; --hk-bd: #a5b4fc; --hk-fg: #3730a3; }
html[data-theme="dark"] .hours-legend-chip.is-hourly.is-kind-course,
html[data-theme="dark"] .hours-kind-cell.is-hourly.is-kind-course { --hk-bg: #fdf4ff; --hk-bd: #e879f9; --hk-fg: #a21caf; }
html[data-theme="dark"] .hours-legend-chip.is-hourly.is-kind-field_practice,
html[data-theme="dark"] .hours-kind-cell.is-hourly.is-kind-field_practice { --hk-bg: #f7fee7; --hk-bd: #bef264; --hk-fg: #3f6212; }
html[data-theme="dark"] .hours-legend-chip.is-hourly.is-kind-defense,
html[data-theme="dark"] .hours-kind-cell.is-hourly.is-kind-defense { --hk-bg: #f8fafc; --hk-bd: #cbd5e1; --hk-fg: #334155; }
html[data-theme="dark"] .hours-legend-chip.is-kind-lecture,
html[data-theme="dark"] .hours-legend-chip.is-kind-lab,
html[data-theme="dark"] .hours-legend-chip.is-kind-practice,
html[data-theme="dark"] .hours-legend-chip.is-kind-consult,
html[data-theme="dark"] .hours-legend-chip.is-kind-preexam,
html[data-theme="dark"] .hours-legend-chip.is-kind-credit,
html[data-theme="dark"] .hours-legend-chip.is-kind-exam,
html[data-theme="dark"] .hours-legend-chip.is-kind-course,
html[data-theme="dark"] .hours-legend-chip.is-kind-field_practice,
html[data-theme="dark"] .hours-legend-chip.is-kind-defense {
  background: var(--hk-bg) !important;
  border-color: var(--hk-bd) !important;
  color: var(--hk-fg) !important;
}
html[data-theme="dark"] .hours-kind-cell.is-kind-lecture,
html[data-theme="dark"] .hours-kind-cell.is-kind-lab,
html[data-theme="dark"] .hours-kind-cell.is-kind-practice,
html[data-theme="dark"] .hours-kind-cell.is-kind-consult,
html[data-theme="dark"] .hours-kind-cell.is-kind-preexam,
html[data-theme="dark"] .hours-kind-cell.is-kind-credit,
html[data-theme="dark"] .hours-kind-cell.is-kind-exam,
html[data-theme="dark"] .hours-kind-cell.is-kind-course,
html[data-theme="dark"] .hours-kind-cell.is-kind-field_practice,
html[data-theme="dark"] .hours-kind-cell.is-kind-defense {
  background: var(--hk-bg) !important;
}
html[data-theme="dark"] .hours-kind-cell.is-kind-lecture span,
html[data-theme="dark"] .hours-kind-cell.is-kind-lab span,
html[data-theme="dark"] .hours-kind-cell.is-kind-practice span,
html[data-theme="dark"] .hours-kind-cell.is-kind-consult span,
html[data-theme="dark"] .hours-kind-cell.is-kind-preexam span,
html[data-theme="dark"] .hours-kind-cell.is-kind-credit span,
html[data-theme="dark"] .hours-kind-cell.is-kind-exam span,
html[data-theme="dark"] .hours-kind-cell.is-kind-course span,
html[data-theme="dark"] .hours-kind-cell.is-kind-field_practice span,
html[data-theme="dark"] .hours-kind-cell.is-kind-defense span {
  color: var(--hk-fg) !important;
}
html[data-theme="dark"] .hours-quick-btn {
  background: #1b2a40 !important;
  border-color: #4b6785 !important;
  color: #7dd3fc !important;
}
html[data-theme="dark"] .hours-quick-btn:hover,
html[data-theme="dark"] .hours-quick-btn.is-on {
  background: #12324a !important;
  border-color: #38bdf8 !important;
  color: #e0f2fe !important;
}

/* Темна тема: загальний контраст другорядного тексту */
html[data-theme="dark"] .kep-combo-copy span,
html[data-theme="dark"] .kep-combo-empty,
html[data-theme="dark"] .stat-label,
html[data-theme="dark"] .leg-sep,
html[data-theme="dark"] .j-hours-kicker,
html[data-theme="dark"] .j-hours-note,
html[data-theme="dark"] .j-hours-row,
html[data-theme="dark"] .rnp-hours-kicker,
html[data-theme="dark"] .rnp-hours-label,
html[data-theme="dark"] .rnp-hours-parts,
html[data-theme="dark"] .rnp-hours-note,
html[data-theme="dark"] .rnp-depts-hint,
html[data-theme="dark"] .rnp-dept-section-head .min-w-0 > span,
html[data-theme="dark"] .load-idle summary span,
html[data-theme="dark"] .load-item p,
html[data-theme="dark"] .load-chip span,
html[data-theme="dark"] .load-queue span,
html[data-theme="dark"] .dash-feed-meta,
html[data-theme="dark"] .cabinet-meta,
html[data-theme="dark"] .stu-meta,
html[data-theme="dark"] .stu-fact-label,
html[data-theme="dark"] .staff-mail,
html[data-theme="dark"] .page-kicker,
html[data-theme="dark"] .topbar-kicker,
html[data-theme="dark"] .topbar-year {
  color: #d0dceb !important;
}
html[data-theme="dark"] .stu-fact {
  border-top-color: #334863 !important;
  color: #eef3f9 !important;
}
html[data-theme="dark"] .stu-fact > i {
  background: #12324a !important;
  color: #7dd3fc !important;
}
html[data-theme="dark"] .stu-fact strong,
html[data-theme="dark"] .stu-fact a {
  color: #f3f7fc !important;
}
html[data-theme="dark"] .dash-stat-label {
  color: #d0dceb !important;
}
html[data-theme="dark"] .table thead th,
html[data-theme="dark"] .table > thead {
  color: #d0dceb !important;
}

/* ── Компактна щільність: ноутбуки й великі екрани ──
   Без зміни html font-size (15px давав дробові rem і «миль» тексту). */
@media (min-width: 1024px) {
  :root {
    --sidebar: 248px;
  }
  .content {
    padding: 1.05rem 1.25rem 2rem;
  }
  .page-title,
  .journal-title {
    font-size: 1.5rem;
  }
  .journal-top {
    gap: 0.7rem;
    margin-bottom: 0.7rem;
    padding-bottom: 0.65rem;
  }
  .journal-legend {
    gap: 0.3rem 0.5rem;
  }
  .theme-hint {
    padding: 0.35rem 0.7rem;
  }
  .paper-grid {
    --mj-gap: 5px;
    --mj-col: 48px;
    --mj-mark-h: 40px;
    --mj-num: 40px;
    --mj-name-min: 176px;
    --mj-radius: 0.7rem;
    --mj-mark-fs: 0.95rem;
    --mj-date-fs: 0.82rem;
    --mj-type-fs: 0.7rem;
  }
  html[data-theme="dark"] .paper-grid {
    --mj-gap: 5px;
  }
  .name-face {
    padding: 0.28rem 0.6rem;
  }
  .topics-table > :not(caption) > * > * {
    padding: 0.4rem 0.5rem;
  }
  .table > :not(caption) > * > * {
    padding: 0.5rem 0.6rem;
  }
  .btn-sm.btn-outline,
  .btn-sm.btn-solid,
  .btn.btn-sm.btn-outline,
  .btn.btn-sm.btn-solid {
    padding: 0.3rem 0.7rem;
  }
  .brand-mark {
    width: 48px;
    height: 48px;
  }
}

@media (min-width: 1440px) {
  .paper-grid {
    --mj-gap: 4px;
    --mj-col: 46px;
    --mj-mark-h: 38px;
    --mj-num: 38px;
    --mj-name-min: 168px;
    --mj-radius: 0.65rem;
    --mj-mark-fs: 0.92rem;
    --mj-date-fs: 0.8rem;
    --mj-type-fs: 0.68rem;
  }
  html[data-theme="dark"] .paper-grid {
    --mj-gap: 4px;
  }
  .content {
    padding: 1rem 1.35rem 1.8rem;
  }
}

@media (min-width: 1800px) {
  .paper-grid {
    --mj-col: 44px;
    --mj-mark-h: 36px;
  }
}
