:root {
  --bg: #060608;
  --bg-2: #0c0c10;
  --bg-3: #121217;
  --surface: #0d0d11;
  --surface-2: #141419;
  --surface-3: #1a1a21;
  --line: #26262e;
  --line-soft: #1f1f26;
  --line-strong: #3a3a45;
  --text: #f5f5f7;
  --text-2: #d4d4d8;
  --muted: #a1a1aa;
  --accent: #db2777;
  --accent-strong: #f43f8e;
  --accent-soft: rgba(219, 39, 119, 0.14);
  --blue: #f472b6;
  --blue-soft: #f9a8d4;
  --on-accent: #fff0f6;
  --nav-active: #3d1230;
  --login-glow: #2a1020;
  --login-mid: #12090f;
  --green: #4ade80;
  --red: #f87171;
  --purple: #c084fc;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.25);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

[data-theme="light"] {
  --bg: #f7f7f9;
  --bg-2: #f1f1f4;
  --bg-3: #e9e9ee;
  --surface: #ffffff;
  --surface-2: #f4f4f6;
  --surface-3: #ececf0;
  --line: #e2e2e8;
  --line-soft: #ececf0;
  --line-strong: #c8c8d0;
  --text: #18181b;
  --text-2: #3f3f46;
  --muted: #71717a;
  --accent: #db2777;
  --accent-strong: #be185d;
  --accent-soft: rgba(219, 39, 119, 0.1);
  --blue: #db2777;
  --blue-soft: #be185d;
  --on-accent: #ffffff;
  --nav-active: rgba(219, 39, 119, 0.1);
  --login-glow: #fbcfe8;
  --login-mid: #faf0f5;
  --shadow: 0 20px 50px rgba(24, 24, 27, 0.12);
  --shadow-sm: 0 4px 14px rgba(24, 24, 27, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(165deg, var(--bg) 0%, var(--bg-2) 50%, var(--bg-3) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input, select, textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}

.svg-sprite {
  display: none;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Animations */
.page-enter {
  animation: pageEnter 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.metric-grid > *,
.date-card-list > * {
  animation: pageEnter 0.32s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.metric-grid > *:nth-child(2),
.date-card-list > *:nth-child(2) { animation-delay: 0.05s; }

.metric-grid > *:nth-child(3),
.date-card-list > *:nth-child(3) { animation-delay: 0.1s; }

.metric-grid > *:nth-child(4),
.date-card-list > *:nth-child(4) { animation-delay: 0.15s; }

.metric-grid > *:nth-child(n + 5),
.date-card-list > *:nth-child(n + 5) { animation-delay: 0.18s; }

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

/* Login Screen */
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px 20px;
  background: radial-gradient(1100px 650px at 50% -90px, var(--login-glow) 0%, var(--login-mid) 45%, var(--bg) 85%);
}

.login-card {
  width: min(100%, 450px);
  padding: 44px 38px 34px;
  background: rgba(13, 13, 17, 0.96);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.login-brand, .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.4px;
}

.login-brand {
  justify-content: center;
}

.login-brand b, .brand b {
  color: var(--accent);
}

.logo-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(219, 39, 119, 0.45);
}

.logo-mark svg {
  width: 24px;
  height: 24px;
}

.login-heading {
  text-align: center;
  margin: 32px 0 28px;
}

.login-heading p {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.2px;
}

.login-heading h1 {
  margin: 0 0 12px;
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.8px;
}

.login-heading span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.login-card label, .modal label {
  display: block;
  margin: 18px 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-2);
}

.login-card input, .modal input, .modal select, .modal textarea {
  width: 100%;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-card input::placeholder, .modal input::placeholder, .modal textarea::placeholder {
  color: var(--muted);
}

.login-card input:focus, .modal input:focus, .modal select:focus, .modal textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(219, 39, 119, 0.15);
  outline: 0;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 75px;
}

.password-field button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 6px;
}

.password-field button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.form-error {
  min-height: 20px;
  margin: 12px 0 4px;
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
}

.primary-button {
  width: 100%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 800;
  font-size: 15px;
  transition: transform 0.15s, background 0.15s, box-shadow 0.15s;
}

.primary-button:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(219, 39, 119, 0.3);
}

.primary-button svg {
  width: 18px;
  height: 18px;
}

.login-footer {
  text-align: center;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 13px;
}

/* App Shell */
.app {
  min-height: 100vh;
  display: flex;
}

/* Sidebar */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 25;
  width: 270px;
  display: flex;
  flex-direction: column;
  padding: 28px 18px 20px;
  background: var(--surface);
  border-right: 1px solid var(--line-soft);
}

.sidebar .brand {
  padding: 0 10px;
}

.term-card {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 30px 4px 24px;
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.term-card div {
  display: grid;
  gap: 2px;
}

.term-card b {
  font-size: 14px;
  color: var(--text);
}

.term-card small {
  color: var(--muted);
  font-size: 12px;
}

.status-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.2);
}

.nav-menu {
  display: grid;
  gap: 6px;
}

.nav-item {
  width: 100%;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 13px 15px;
  text-align: left;
  font-size: 15px;
  font-weight: 700;
  transition: background 0.18s, color 0.18s;
}

.nav-item svg {
  width: 20px;
  height: 20px;
}

.nav-item:hover {
  background: var(--surface-2);
  color: var(--text);
}

.nav-item.active {
  background: var(--nav-active);
  color: var(--text);
}

.nav-item.active svg {
  color: var(--accent);
}

.nav-admin {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.nav-admin p {
  margin: 0 14px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.1px;
}

.sidebar-footer {
  margin-top: auto;
}

.logout {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 11px 14px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}

.logout svg {
  width: 18px;
  height: 18px;
}

.logout:hover {
  color: var(--red);
  background: rgba(248, 113, 113, 0.08);
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 270px;
  min-width: 0;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 4vw, 56px);
  background: rgba(6, 6, 8, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.header-context {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-term {
  padding: 7px 12px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 700;
}

.breadcrumb {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.breadcrumb i {
  font-style: normal;
  color: var(--muted);
  margin: 0 10px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.bell-button {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-2);
  transition: background 0.15s, border-color 0.15s;
}

.bell-button:hover, .bell-button.active {
  background: var(--surface-2);
  border-color: var(--line-strong);
  color: var(--text);
}

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

.bell-button em {
  position: absolute;
  top: 5px;
  right: 5px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  background: var(--red);
  border: 2px solid var(--surface);
  border-radius: 12px;
  color: white;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.notification-wrap {
  position: relative;
}

.notification-panel {
  position: absolute;
  right: -10px;
  top: 52px;
  width: min(400px, calc(100vw - 32px));
  z-index: 35;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.notification-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.notification-heading b {
  font-size: 15px;
  color: var(--text);
}

.notification-heading button {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.notification-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.notification-item:last-child {
  border-bottom: 0;
}

.notification-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--blue-soft);
}

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

.notification-item b {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--text);
}

.notification-item p {
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.5;
}

.notification-item small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}

.notification-empty {
  padding: 36px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.user-menu {
  position: relative;
}

.profile-chip {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  text-align: left;
  transition: background 0.15s, border-color 0.15s;
}

.profile-chip:hover,
.profile-chip[aria-expanded="true"] {
  background: var(--surface-2);
  border-color: var(--line);
}

.avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), #be185d);
  color: var(--on-accent);
  font-size: 14px;
  font-weight: 800;
}

.profile-chip .profile-meta {
  display: grid;
  gap: 2px;
  flex: 1;
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-chip small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.profile-chevron {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--muted);
  transform: rotate(90deg);
  transition: transform 0.18s ease;
}

.profile-chip[aria-expanded="true"] .profile-chevron {
  transform: rotate(-90deg);
}

.user-menu-popover {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 40;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: modalIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.user-menu-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 6px;
}

.user-menu-row span {
  color: var(--text-2);
  font-size: 13px;
  font-weight: 700;
}

.theme-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  border: 0;
  border-radius: 999px;
  background: var(--line-strong);
  transition: background 0.18s ease;
}

.theme-switch[aria-checked="true"] {
  background: var(--accent);
}

.theme-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  transition: transform 0.18s ease;
}

.theme-switch[aria-checked="true"] .theme-switch-thumb {
  transform: translateX(20px);
}

.user-menu-popover .logout {
  width: 100%;
}

.mobile-menu {
  display: none;
}

/* Page Layout */
.page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 40px clamp(24px, 4vw, 56px) 60px;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}

.page-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.2px;
}

.page-heading h1 {
  margin: 0 0 8px;
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1.2px;
  color: var(--text);
}

.page-heading p:not(.page-kicker) {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.page-heading .date {
  color: var(--muted) !important;
  font-size: 13px !important;
  font-weight: 800;
  letter-spacing: 0.6px;
  padding: 8px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

/* Base Card Styles */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.calendar-card:hover {
  transform: none;
  box-shadow: none;
}

.card-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.card-title h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.card-title button {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  transition: color 0.15s;
}

.card-title button:hover {
  color: var(--accent-strong);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 36px 24px 40px;
  text-align: center;
}

.empty-state svg {
  width: 28px;
  height: 28px;
  color: var(--muted);
  opacity: 0.55;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

/* Metrics Grid */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  min-height: 140px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, var(--surface-2), var(--surface-2));
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.metric-card span, .stat-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.8px;
}

.metric-card b {
  display: block;
  margin: 12px 0 6px;
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1.2px;
  color: var(--text);
}

.metric-card small, .stat-card small {
  color: var(--muted);
  font-size: 13px;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.9fr);
  gap: 20px;
}

.clean-card {
  overflow: hidden;
}

.quick-stack {
  display: grid;
  padding: 12px;
  gap: 4px;
}

.quick-stack button {
  display: flex;
  gap: 14px;
  align-items: center;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-2);
  padding: 14px 16px;
  text-align: left;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.18s, color 0.18s;
}

.quick-stack button:hover {
  background: var(--surface-3);
  color: var(--text);
}

.quick-stack svg {
  width: 20px;
  height: 20px;
  color: var(--blue-soft);
}

/* Action Buttons */
.action-button, .inline-button {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--on-accent);
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 800;
  transition: transform 0.15s, background 0.15s, box-shadow 0.15s;
}

.action-button svg, .inline-button svg {
  width: 18px;
  height: 18px;
}

.action-button:hover, .inline-button:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(219, 39, 119, 0.25);
}

.mini-button {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-2);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.mini-button:hover {
  border-color: var(--muted);
  color: var(--text);
  background: var(--line);
}

.danger-button {
  border: 0;
  border-radius: var(--radius-sm);
  background: #dc2626;
  color: var(--text);
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 800;
  transition: background 0.15s;
}

.danger-button:hover {
  background: #ef4444;
}

.text-danger {
  border: 0;
  background: transparent;
  color: #f87171;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}

.text-danger:hover {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.12);
}

.back-link {
  border: 0;
  background: transparent;
  color: var(--text-2);
  padding: 6px 0;
  margin: 0 0 20px;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.15s;
}

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

/* Progress / Student Overview Cards */
.progress-card {
  padding: 28px;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.card-top h3 {
  margin: 0 0 6px;
  font-size: 18px;
  color: var(--text);
}

.card-top p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.grade-circle {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border: 4px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-size: 24px;
  font-weight: 800;
  background: rgba(219, 39, 119, 0.08);
}

.grade-circle small {
  font-size: 13px;
}

.progress-track {
  height: 7px;
  overflow: hidden;
  margin: 30px 0 12px;
  border-radius: 999px;
  background: var(--line);
}

.progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.4s ease;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.6px;
}

.notice-card {
  padding: 26px;
}

.notice-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #4c1030;
  color: var(--blue-soft);
}

.notice-icon svg {
  width: 22px;
  height: 22px;
}

.notice-card h3 {
  margin: 18px 0 8px;
  font-size: 17px;
  color: var(--text);
}

.notice-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

/* Subjects list & row */
.subjects-card {
  overflow: hidden;
  margin-top: 24px;
}

.subject-row {
  width: 100%;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  padding: 18px 24px;
  border: 0;
  background: transparent;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

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

.subject-row:hover {
  background: var(--surface-2);
}

.subject-row > svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
  transition: color 0.15s, transform 0.15s;
}

.subject-row:hover > svg {
  color: var(--accent);
  transform: translateX(2px);
}

.subject-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--line);
  color: var(--blue-soft);
}

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

.subject-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.subject-name small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

/* Grade Badges */
.grade-badge {
  min-width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 800;
  padding: 0 8px;
}

.g5 {
  background: #14532d;
  color: #86efac;
}

.g4 {
  background: #831843;
  color: var(--blue-soft);
}

.g3 {
  background: #831843;
  color: #fde047;
}

.g2 {
  background: #701a35;
  color: #fca5a5;
}

.g1 {
  background: #500724;
  color: #f87171;
}

.empty-grade {
  background: var(--line);
  color: var(--muted);
}

/* Teacher Hero & Workflow */
.teacher-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 32px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: radial-gradient(120% 170% at 0% 0%, #4c1030 0%, var(--surface-2) 48%, var(--surface-2) 100%);
  margin-bottom: 24px;
}

.teacher-eyebrow {
  color: var(--blue-soft);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.2px;
}

.teacher-hero h2 {
  margin: 10px 0 8px;
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.8px;
  color: var(--text);
}

.teacher-hero p {
  max-width: 580px;
  margin: 0;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.6;
}

.teacher-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.teacher-summary .card {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 0 14px;
  padding: 22px;
}

.teacher-summary .card > span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #4c1030;
  color: var(--blue-soft);
}

.teacher-summary svg {
  width: 20px;
  height: 20px;
}

.teacher-summary b {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
}

.teacher-summary small {
  color: var(--muted);
  font-size: 13px;
}

/* Workflow Step Tracker */
.workflow-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
  padding: 0 4px;
}

.workflow-steps span {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.workflow-steps span:not(:last-child):after {
  content: '';
  width: 42px;
  height: 2px;
  margin: 0 14px;
  background: var(--line);
}

.workflow-steps i {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-size: 12px;
  font-style: normal;
}

.workflow-steps .active {
  color: var(--text);
}

.workflow-steps .active i {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
  font-weight: 800;
}

/* Selection Grids (Step 1 & 2) */
.selection-intro {
  margin-bottom: 22px;
}

.selection-intro h2, .matrix-heading h2 {
  margin: 0 0 6px;
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.7px;
  color: var(--text);
}

.selection-intro p, .matrix-heading span {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

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

.choice-card, .class-choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  min-height: 115px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.choice-card:hover, .class-choice:hover {
  transform: translateY(-3px);
  border-color: var(--muted);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.35);
}

.choice-card > span:nth-child(2) {
  display: grid;
  gap: 6px;
}

.choice-card b {
  font-size: 16px;
  color: var(--text);
}

.choice-card small, .class-choice small {
  color: var(--muted);
  font-size: 13px;
}

.choice-card > svg, .class-choice > svg {
  margin-left: auto;
  color: var(--muted);
}

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

.class-choice {
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 155px;
}

.class-choice > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.2px;
}

.class-choice b {
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -2px;
  color: var(--text);
}

.class-choice > svg {
  position: absolute;
  right: 22px;
  top: 22px;
}

/* Step 3: Grade Matrix */
.matrix-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 6px 0 20px;
}

.matrix-card {
  overflow: hidden;
}

.matrix-scroll, .timetable-scroll {
  overflow: auto;
}

.grade-matrix {
  width: 100%;
  min-width: 950px;
  border-collapse: collapse;
}

.grade-matrix th {
  padding: 16px 12px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-align: center;
}

.grade-matrix th:first-child {
  text-align: left;
  padding-left: 24px;
}

.grade-matrix td {
  height: 74px;
  padding: 10px;
  border-bottom: 1px solid var(--line-soft);
  text-align: center;
}

.grade-matrix tr:last-child td {
  border-bottom: 0;
}

.grade-matrix tr:hover td {
  background: var(--surface-2);
}

.matrix-student {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 6px 10px 6px 14px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.matrix-student:hover {
  background: rgba(255, 255, 255, 0.05);
}

.matrix-student:hover b {
  color: var(--accent);
}

.matrix-student b {
  display: block;
  font-size: 15px;
  color: var(--text);
}

.matrix-student small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.matrix-grade, .matrix-average {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  font-weight: 800;
  font-size: 15px;
}

.matrix-grade {
  cursor: pointer;
  transition: transform 0.15s, outline 0.15s;
}

.matrix-grade:hover {
  transform: scale(1.1);
  outline: 2px solid white;
  outline-offset: 2px;
}

.matrix-average {
  background: var(--line);
  color: var(--text);
}

.matrix-empty {
  color: var(--muted);
  font-size: 16px;
}

.matrix-add {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px dashed var(--muted);
  border-radius: 8px;
  background: transparent;
  color: var(--text-2);
  transition: all 0.18s;
}

.matrix-add:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  transform: scale(1.05);
}

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

.empty-cell {
  padding: 50px !important;
  color: var(--muted);
  text-align: center !important;
  font-size: 15px;
}

/* Step 4: Student Details Sheet */
.student-sheet-head {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.sheet-avatar {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: linear-gradient(140deg, var(--accent), #be185d);
  color: var(--on-accent);
  font-size: 20px;
  font-weight: 800;
}

.student-sheet-head h2 {
  margin: 2px 0 4px;
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
}

.student-sheet-head span {
  color: var(--muted);
  font-size: 14px;
}

.sheet-average {
  margin-left: auto;
  text-align: center;
  padding: 0 20px;
}

.sheet-average small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.8px;
}

.sheet-average b {
  display: block;
  margin-top: 2px;
  color: var(--accent);
  font-size: 28px;
  font-weight: 800;
}

.sheet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.record-list {
  display: grid;
}

.record-list article {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line-soft);
}

.record-list article:last-child {
  border-bottom: 0;
}

.record-list b {
  display: block;
  font-size: 15px;
  color: var(--text);
}

.record-list small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.record-list article > div {
  flex: 1;
  min-width: 0;
}

.record-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.record-delete svg {
  width: 16px;
  height: 16px;
}

.record-delete:hover {
  color: var(--red);
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.25);
}

.col-actions {
  width: 56px;
  text-align: right;
}

.data-table .col-actions {
  padding-right: 16px;
}

.note-list {
  padding: 6px 24px;
}

.note-list article {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
}

.note-list article:last-child {
  border: 0;
}

.note-list span {
  color: var(--blue-soft);
  margin-top: 2px;
}

.note-list svg {
  width: 20px;
  height: 20px;
}

.note-list p {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.6;
}

.note-list small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

/* Student Individual Subject Cards */
.student-subject-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.subject-detail-card {
  overflow: hidden;
}

.subject-detail-card .subject-row {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
}

.subject-detail-card .subject-row:hover {
  background: var(--surface-2);
}

.subject-details {
  border-top: 1px solid var(--line-soft);
  padding: 10px 24px 20px;
  background: var(--surface-2);
}

.grade-detail {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}

.grade-detail:last-child {
  border-bottom: 0;
}

.grade-detail b {
  font-size: 15px;
  color: var(--text);
}

.grade-detail small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.grade-detail p {
  margin: 8px 0 0;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.5;
  background: var(--surface-2);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
}

/* Timetable / Schedule (Večernja smjena only) — clean e-Dnevnik style */
.timetable-card {
  overflow: hidden;
  margin-top: 20px;
}

.schedule-edit-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

.schedule-edit-note svg {
  width: 15px;
  height: 15px;
}

.timetable {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

.timetable th {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 1px;
  text-align: center;
  font-weight: 800;
}

.timetable th:first-child {
  text-align: left;
  min-width: 150px;
}

.timetable tbody th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  background: var(--surface);
  white-space: nowrap;
  vertical-align: middle;
  border-bottom: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
}

.timetable-period-th div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.timetable-period-th b {
  font-size: 13px;
  color: var(--text);
}

.timetable-period-th small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

/* Break rows — plain muted band */
.timetable-break-row th,
.timetable-break-row td {
  background: var(--surface);
  height: 38px;
  padding: 8px 16px;
  vertical-align: middle;
}

.timetable-break-th b {
  font-size: 12px;
  color: var(--muted);
}

.timetable-break-th small {
  font-size: 11px;
  color: var(--muted);
}

.timetable-break-cell {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-align: center;
}

.timetable td {
  min-width: 140px;
  height: 92px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  vertical-align: middle;
  text-align: center;
}

.timetable td:last-child {
  border-right: 0;
}

/* Flat subject cell */
.schedule-cell {
  text-align: center;
}

.schedule-event {
  display: grid;
  gap: 4px;
  justify-items: center;
  text-align: center;
}

.schedule-event b {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

.schedule-event small {
  font-size: 11px;
  color: var(--muted);
}

.schedule-cell-clickable {
  cursor: pointer;
  transition: background 0.15s;
}

.schedule-cell-clickable:hover {
  background: rgba(219, 39, 119, 0.07);
}

.schedule-empty {
  color: var(--muted);
  font-size: 14px;
}

.schedule-empty-action {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  transition: all 0.18s;
  cursor: pointer;
}

.schedule-empty-action:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

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

/* Tone variants (subject catalog cards) */
.subject-amber {
  background: #3d1024;
  color: #f9a8d4;
  border-color: var(--accent);
}

.subject-sky {
  background: #3d1024;
  color: var(--blue-soft);
  border-color: var(--blue);
}

.subject-violet {
  background: #2e1065;
  color: #d1bfff;
  border-color: #a78bfa;
}

.subject-green {
  background: #143526;
  color: #8eeebe;
  border-color: #4ade80;
}

.subject-rose {
  background: #42182b;
  color: #fda4cf;
  border-color: var(--blue);
}

.subject-blue {
  background: #3d1024;
  color: var(--blue-soft);
  border-color: var(--blue);
}

/* Calendar & Exams — clean e-Dnevnik style */
.calendar-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
}

.calendar-card {
  padding: 24px;
}

.calendar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.calendar-month h2 {
  margin: 0;
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  text-transform: capitalize;
}

.calendar-month-note {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.calendar-nav {
  display: flex;
  gap: 6px;
}

.calendar-nav .mini-button {
  padding: 7px 10px;
}

.calendar-nav .mini-button svg {
  width: 16px;
  height: 16px;
}

.calendar-nav .flip {
  display: inline-flex;
}

.calendar-nav .flip svg {
  transform: scaleX(-1);
}

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

.calendar-week div {
  padding-bottom: 10px;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
}

.calendar-day {
  min-height: 92px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--surface);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.calendar-day:hover {
  border-color: var(--line-strong);
}

.calendar-day.day-clickable {
  cursor: pointer;
}

.calendar-day.day-clickable:hover {
  border-color: var(--accent);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--accent-soft);
}

.calendar-day.muted {
  background: transparent;
  border-color: var(--line-soft);
}

.calendar-day.muted .day-number {
  color: var(--muted);
}

.calendar-day.today {
  border-color: rgba(219, 39, 119, 0.5);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px rgba(219, 39, 119, 0.18);
}

.day-number {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}

.today .day-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin: -4px 0 0 -4px;
  border-radius: 7px;
  background: var(--accent);
  color: var(--on-accent);
}

.day-events {
  display: grid;
  gap: 4px;
}

.event-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  overflow: hidden;
  padding: 4px 7px;
  border: 1px solid rgba(219, 39, 119, 0.16);
  border-radius: 6px;
  background: rgba(219, 39, 119, 0.09);
  color: #fbcfe8;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.event-pill:hover {
  background: rgba(219, 39, 119, 0.18);
  border-color: rgba(219, 39, 119, 0.35);
}

.event-pill i {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent);
}

.calendar-side {
  display: grid;
  align-content: start;
  gap: 18px;
}

.side-card {
  padding: 22px;
}

.side-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.side-card h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

.side-count {
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.side-count.muted-count {
  background: rgba(148, 163, 184, 0.1);
  color: var(--muted);
}

.date-card-list {
  display: grid;
  gap: 10px;
}

.date-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.date-card:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
  transform: translateY(-1px);
}

.date-card.is-clickable {
  cursor: pointer;
}

.date-card.is-clickable:hover {
  border-color: var(--accent);
}

.date-card-tile {
  width: 52px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  padding: 8px 0;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface-3);
  text-align: center;
}

.date-card-tile b {
  font-size: 19px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.date-card-tile small {
  margin-top: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--muted);
}

.date-card-body {
  flex: 1;
  min-width: 0;
}

.date-card-body h4 {
  margin: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.date-card-body p {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.date-card-status {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 8px;
  border: 1px solid rgba(244, 114, 182, 0.2);
  border-radius: 999px;
  background: rgba(244, 114, 182, 0.09);
  color: var(--blue-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.date-card.is-today {
  border-color: rgba(219, 39, 119, 0.45);
  background: var(--surface-2);
}

.date-card.is-today .date-card-tile {
  border-color: var(--accent);
  background: var(--accent);
}

.date-card.is-today .date-card-tile b {
  color: var(--on-accent);
}

.date-card.is-today .date-card-tile small {
  color: rgba(255, 240, 246, 0.72);
}

.date-card.is-today .date-card-status {
  border-color: rgba(219, 39, 119, 0.3);
  background: var(--accent-soft);
  color: var(--accent);
}

.date-card.is-past {
  opacity: 0.55;
}

.date-card.is-past:hover {
  opacity: 0.8;
}

.date-card.is-past .date-card-status {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(148, 163, 184, 0.08);
  color: var(--muted);
}

/* Tables (People, Grades, Subjects) */
.table-card {
  overflow: hidden;
}

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

.data-table th {
  padding: 16px 20px;
  text-align: left;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.8px;
}

.data-table td {
  padding: 16px 20px;
  border-top: 1px solid var(--line-soft);
  font-size: 14px;
  vertical-align: middle;
}

.data-table tr:hover td {
  background: var(--surface-2);
}

.table-subject {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.table-note {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.user-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tiny-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--nav-active);
  color: var(--blue-soft);
  font-size: 13px;
  font-weight: 800;
}

.role-label {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 6px;
  background: var(--surface-3);
  color: var(--blue-soft);
  font-size: 12px;
  font-weight: 800;
}

.role-principal {
  background: #4c1030;
  color: #fbcfe8;
}

.role-teacher {
  background: #4c1030;
  color: var(--blue-soft);
}

.role-student {
  background: #14422e;
  color: #8deec0;
}

.class-tag {
  padding: 5px 9px;
  border-radius: 6px;
  background: #4c1030;
  color: var(--blue-soft);
  font-size: 13px;
  font-weight: 800;
}

.type-tag {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
}

.type-core {
  background: var(--line-strong);
  color: var(--blue-soft);
}

.type-elective {
  background: #4c1d5e;
  color: #d8c2ff;
}

.active-status {
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.active-status:before {
  content: '•';
  margin-right: 6px;
}

/* Subjects Catalog Page */
.subjects-catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.subject-admin-card {
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.subject-admin-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.subject-admin-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.subject-admin-info h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.subject-admin-info p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.subject-admin-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.subject-admin-meta span {
  font-size: 13px;
  color: var(--muted);
}

/* Settings Grid & Cards */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-card {
  padding: 22px;
}

.stat-card b {
  display: block;
  margin: 10px 0 4px;
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
}

.reset-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-top: 24px;
  padding: 26px;
}

.reset-card > div {
  display: flex;
  align-items: center;
  gap: 16px;
}

.reset-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #4c1d24;
  color: #fca5a5;
}

.reset-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
  color: var(--text);
}

.reset-card p {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 8, 15, 0.75);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.18s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  width: min(100%, 480px);
  padding: 28px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.modal-enter {
  animation: modalIn 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.modal-heading h2 {
  margin: 0;
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
}

.icon-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
}

.icon-close:hover {
  background: var(--line);
  color: var(--text);
}

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

.modal-copy {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.modal label span {
  color: var(--muted);
  font-weight: 500;
}

.modal textarea {
  min-height: 85px;
  resize: vertical;
}

.grade-picker {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 6px;
}

.grade-pick {
  height: 46px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 17px;
  transition: transform 0.15s;
}

.grade-pick:hover {
  transform: scale(1.05);
}

.elective-student-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  max-height: 220px;
  overflow-y: auto;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  margin-top: 8px;
}

.elective-student-item {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  cursor: pointer;
  margin: 0 !important;
  transition: background 0.15s, border-color 0.15s;
}

.elective-student-item:hover {
  background: var(--surface-3);
  border-color: var(--line-strong);
}

.elective-student-item input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  cursor: pointer;
  accent-color: var(--accent);
}

.elective-student-item div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.elective-student-item b {
  font-size: 13px;
  color: var(--text);
}

.elective-student-item small {
  font-size: 11px;
  color: var(--muted);
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.modal-actions .primary-button {
  width: auto;
}

.cancel-button {
  border: 0;
  background: transparent;
  color: var(--text-2);
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}

.cancel-button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.danger-kicker {
  color: #f87171 !important;
}

/* Toast */
.toast {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 90;
  border: 1px solid #166534;
  border-radius: var(--radius-sm);
  background: #14532d;
  color: #dcfce7;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--shadow);
  animation: toastIn 0.25s ease;
}

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

/* Responsive */
@media (max-width: 1050px) {
  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .settings-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .selection-grid, .student-subject-grid, .subjects-catalog-grid {
    grid-template-columns: 1fr;
  }
  .sheet-grid {
    grid-template-columns: 1fr;
  }
  .teacher-hero {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 950px) {
  .sidebar {
    transform: translateX(-101%);
    transition: transform 0.25s ease;
  }
  .sidebar.open {
    transform: none;
  }
  .main-content {
    margin-left: 0;
  }
  .mobile-menu {
    display: grid;
    gap: 5px;
    width: 32px;
    border: 0;
    background: transparent;
    padding: 6px;
    margin-right: 12px;
  }
  .mobile-menu span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-2);
  }
  .topbar {
    justify-content: flex-start;
  }
  .top-actions {
    margin-left: auto;
  }
  .calendar-shell {
    grid-template-columns: 1fr;
  }
  .calendar-side {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 650px) {
  .topbar {
    height: 70px;
    padding: 0 16px;
  }
  .header-term {
    display: none;
  }
  .page {
    padding: 30px 16px 50px;
  }
  .page-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .page-heading h1 {
    font-size: 26px;
  }
  .metric-grid {
    grid-template-columns: 1fr;
  }
  .workflow-steps {
    overflow-x: auto;
    padding-bottom: 8px;
  }
  .workflow-steps span {
    flex: 0 0 auto;
  }
  .class-grid {
    grid-template-columns: 1fr;
  }
  .matrix-heading, .student-sheet-head, .reset-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .sheet-average {
    margin-left: 0;
    padding: 10px 0;
  }
  .student-sheet-head .action-button, .reset-card .danger-button {
    width: 100%;
  }
  .calendar-side {
    grid-template-columns: 1fr;
  }
  .calendar-card {
    padding: 16px;
  }
  .calendar-day {
    min-height: 64px;
    padding: 6px;
  }
  .calendar-week div {
    font-size: 10px;
  }
  .login-card {
    padding: 32px 22px;
  }
  .notification-panel {
    right: -40px;
  }
}

/* ================================
   SCHEDULE MODAL — LOCKED SLOT SUMMARY
   ================================ */
.modal-slot-summary {
  display: block;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}

/* Responsive tweak for 7-col timetable */
@media (max-width: 960px) {
  .timetable-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Reduced motion — accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Standing (Disciplinary) System */
.standing-summary {
  padding: 26px 28px;
  margin-bottom: 20px;
}

.standing-title {
  display: block;
  margin-bottom: 16px;
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--text);
}

.standing-title small {
  margin-left: 8px;
  color: var(--muted);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
}

.standing-summary.tone-good .standing-title { color: var(--green); }
.standing-summary.tone-note .standing-title { color: var(--purple); }
.standing-summary.tone-warn .standing-title { color: var(--accent); }
.standing-summary.tone-bad .standing-title { color: var(--red); }
.standing-summary.tone-critical .standing-title { color: #ef4444; }

.standing-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.standing-seg {
  height: 8px;
  border-radius: 999px;
  background: var(--green);
}

.standing-seg.tone-note.lit { background: var(--purple); }
.standing-seg.tone-warn.lit { background: var(--accent); }
.standing-seg.tone-bad.lit { background: var(--red); }
.standing-seg.tone-critical.lit { background: #ef4444; }

.standing-endpoints {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}

.standing-endpoints span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.standing-caption {
  margin: 16px 0 0;
  color: var(--text-2);
  font-size: 14px;
}

.standing-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.standing-badge.tone-good {
  border-color: rgba(74, 222, 128, 0.35);
  background: rgba(74, 222, 128, 0.1);
  color: var(--green);
}

.standing-badge.tone-note {
  border-color: rgba(192, 132, 252, 0.35);
  background: rgba(192, 132, 252, 0.1);
  color: var(--purple);
}

.standing-badge.tone-warn {
  border-color: rgba(219, 39, 119, 0.35);
  background: var(--accent-soft);
  color: var(--accent);
}

.standing-badge.tone-bad {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.1);
  color: var(--red);
}

.standing-badge.tone-critical {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.14);
  color: #fca5a5;
}

[data-theme="light"] .standing-badge.tone-critical { color: #dc2626; }

.standing-student-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.standing-student-card {
  padding: 18px 20px;
  content-visibility: auto;
  contain-intrinsic-size: auto 130px;
}

.standing-student-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.standing-student-id {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.standing-student-id b {
  font-size: 15px;
  color: var(--text);
}

.standing-student-id small {
  color: var(--muted);
  font-size: 12px;
}

.standing-student-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

.standing-student-foot span {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.standing-history-card {
  overflow: hidden;
}

.standing-list {
  display: grid;
}

.standing-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line-soft);
  content-visibility: auto;
  contain-intrinsic-size: auto 64px;
}

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

.standing-row.is-inactive {
  opacity: 0.55;
}

.standing-row-body {
  flex: 1;
  min-width: 0;
}

.standing-row-body b {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  overflow-wrap: anywhere;
}

.standing-row-body small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.standing-row-side {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.standing-expiry {
  color: var(--blue-soft);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.standing-expiry.permanent {
  color: var(--red);
}

.standing-expiry.expired {
  color: var(--muted);
}

.standing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.18);
}

@media (max-width: 650px) {
  .standing-row {
    flex-wrap: wrap;
    padding: 14px 16px;
  }
  .standing-summary {
    padding: 20px 16px;
  }
}

/* Dokumenti (Official documents) */
.doc-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 26px;
  margin-bottom: 20px;
}

.doc-intro b {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.doc-intro p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13.5px;
}

.doc-count {
  padding: 5px 12px;
  border: 1px solid rgba(219, 39, 119, 0.35);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

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

.doc-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 24px;
  animation: cardIn 0.3s ease backwards;
  animation-delay: calc(var(--i, 0) * 60ms);
}

.doc-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(219, 39, 119, 0.3);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
}

.doc-icon svg {
  width: 22px;
  height: 22px;
}

.doc-body {
  flex: 1;
}

.doc-body h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.doc-body p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.doc-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 9px 16px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.doc-link:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.doc-link svg {
  width: 15px;
  height: 15px;
}

@media (max-width: 650px) {
  .doc-grid {
    grid-template-columns: 1fr;
  }
  .doc-intro {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 16px;
  }
}

/* User menu links + Informacije page */
.user-menu-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.user-menu-link:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.user-menu-link svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.user-menu-divider {
  height: 1px;
  margin: 6px 0;
  background: var(--line);
}

.info-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 26px;
  margin-bottom: 20px;
}

.info-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--accent);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
}

.info-hero b {
  display: block;
  font-size: 19px;
  font-weight: 800;
  color: var(--text);
}

.info-hero p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13.5px;
}

.info-card {
  padding: 22px 26px;
}

.info-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
}

.info-row:last-child {
  border-bottom: 0;
  padding-bottom: 4px;
}

.info-row span {
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
}

.info-row b {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  text-align: right;
  overflow-wrap: anywhere;
}

/* Control Center & Grade Lock */
.grade-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.control-toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 24px;
  padding: 26px;
}

.control-toggle-card > div:first-child {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.control-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.control-toggle-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
  color: var(--text);
}

.control-toggle-card p {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.control-switch {
  position: relative;
  flex-shrink: 0;
  width: 52px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-3);
  cursor: pointer;
  transition: background 0.2s;
}

.control-switch.active {
  background: var(--accent);
}

.control-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}

.control-switch.active .control-switch-thumb {
  transform: translateX(24px);
}

.lock-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
  padding: 22px 26px;
}

.lock-panel-info {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.lock-panel-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}

.lock-panel-info h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.lock-panel-info p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
}

.lock-panel-info p b {
  color: var(--text);
}

.lock-panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.lock-grade-select {
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

/* Light theme — structural overrides for non-variable colors */
[data-theme="light"] .login-card {
  background: rgba(255, 255, 255, 0.96);
  border-color: #e2e2e8;
}

[data-theme="light"] .topbar {
  background: rgba(255, 255, 255, 0.92);
}

[data-theme="light"] .modal-backdrop {
  background: rgba(24, 24, 27, 0.4);
}

[data-theme="light"] .modal {
  background: #ffffff;
  border-color: #e2e2e8;
}

[data-theme="light"] .password-field button:hover,
[data-theme="light"] .icon-close:hover {
  background: rgba(24, 24, 27, 0.06);
}

[data-theme="light"] .card:hover {
  box-shadow: 0 10px 28px rgba(24, 24, 27, 0.08);
}

[data-theme="light"] .data-table th {
  background: #f4f4f6;
}

[data-theme="light"] .data-table tr:hover td {
  background: #fafafa;
}

[data-theme="light"] .calendar-day {
  background: #ffffff;
  border-color: #e2e2e8;
}

[data-theme="light"] .calendar-day:hover {
  border-color: #c8c8d0;
}

[data-theme="light"] .calendar-day.muted {
  background: #f7f7f9;
  border-color: #ececf0;
}

[data-theme="light"] .calendar-day.today {
  background: #fdf2f8;
  border-color: rgba(219, 39, 119, 0.45);
  box-shadow: inset 0 0 0 1px rgba(219, 39, 119, 0.12);
}

[data-theme="light"] .today .day-number {
  color: #ffffff;
}

[data-theme="light"] .event-pill {
  background: rgba(219, 39, 119, 0.08);
  border-color: rgba(219, 39, 119, 0.2);
  color: #9d174d;
}

[data-theme="light"] .date-card {
  background: #ffffff;
}

[data-theme="light"] .date-card:hover {
  background: #fafafa;
}

[data-theme="light"] .date-card-tile {
  background: #f4f4f6;
  border-color: #e2e2e8;
}

[data-theme="light"] .date-card.is-today {
  background: #fdf2f8;
}

[data-theme="light"] .date-card.is-today .date-card-tile b,
[data-theme="light"] .date-card.is-today .date-card-tile small {
  color: #ffffff;
}

[data-theme="light"] .date-card.is-today .date-card-tile small {
  color: rgba(255, 255, 255, 0.8);
}

[data-theme="light"] .date-card.is-today .date-card-status {
  color: #9d174d;
}

[data-theme="light"] .notification-panel {
  background: #ffffff;
  border-color: #e2e2e8;
  box-shadow: 0 20px 50px rgba(24, 24, 27, 0.12);
}

[data-theme="light"] .user-menu-popover {
  background: #ffffff;
  border-color: #e2e2e8;
  box-shadow: 0 20px 50px rgba(24, 24, 27, 0.12);
}

[data-theme="light"] .theme-switch-thumb {
  box-shadow: 0 1px 4px rgba(24, 24, 27, 0.25);
}

[data-theme="light"] .schedule-empty-action:hover,
[data-theme="light"] .mini-button:hover {
  box-shadow: 0 4px 16px rgba(219, 39, 119, 0.2);
}