:root {
  --bg: #071022;
  --panel: rgba(15, 29, 56, 0.86);
  --panel-2: rgba(18, 34, 68, 0.82);
  --line: rgba(89, 126, 255, 0.22);
  --line-bright: rgba(72, 111, 255, 0.78);
  --text: #f6f8ff;
  --muted: #93a3c9;
  --blue: #3f6dff;
  --cyan: #32d7ff;
  --violet: #8a5cff;
  --pink: #ff5ca8;
  --warning: #f7b84b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 78% 8%, rgba(48, 83, 255, 0.18), transparent 28%),
    radial-gradient(circle at 18% 18%, rgba(31, 194, 255, 0.12), transparent 28%),
    linear-gradient(rgba(65, 91, 160, 0.06) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(90deg, rgba(65, 91, 160, 0.06) 1px, transparent 1px) 0 0 / 42px 42px,
    #060d1d;
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 15px 14px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(76, 137, 190, 0.62) rgba(3, 10, 25, 0.3);
  scrollbar-gutter: stable;
  background: linear-gradient(180deg, rgba(9, 18, 38, 0.96), rgba(10, 20, 42, 0.92));
  border-right: 1px solid rgba(99, 134, 255, 0.18);
  box-shadow: 12px 0 60px rgba(0, 0, 0, 0.22);
}

.sidebar::-webkit-scrollbar {
  width: 9px;
}

.sidebar::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(3, 10, 25, 0.28);
  box-shadow: inset 0 0 0 1px rgba(94, 145, 190, 0.06);
}

.sidebar::-webkit-scrollbar-thumb {
  min-height: 54px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(70, 151, 205, 0.72), rgba(50, 99, 157, 0.62)) padding-box;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(79, 195, 218, 0.9), rgba(67, 120, 201, 0.82)) padding-box;
}

html[data-theme="day"] .sidebar {
  scrollbar-color: rgba(38, 128, 136, 0.48) rgba(221, 239, 238, 0.48);
}

html[data-theme="day"] .sidebar::-webkit-scrollbar-track {
  background: rgba(221, 239, 238, 0.48);
  box-shadow: inset 0 0 0 1px rgba(38, 128, 136, 0.08);
}

html[data-theme="day"] .sidebar::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(53, 151, 157, 0.58), rgba(41, 116, 130, 0.5)) padding-box;
}

html[data-theme="day"] .sidebar::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(32, 143, 148, 0.76), rgba(36, 105, 132, 0.7)) padding-box;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 8px 8px;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(78, 118, 255, 0.42);
}

.brand-title {
  margin: 0;
  font-size: 21px;
  font-weight: 900;
  line-height: 1.05;
}

.brand-subtitle {
  margin: 2px 0 0;
  color: #d7e2ff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.9px;
}

.nav {
  display: grid;
  gap: 13px;
}

.nav-section {
  display: grid;
  gap: 6px;
}

.nav-label {
  margin: 0 0 1px;
  padding: 0 10px;
  color: #7182ad;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.nav button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #d6def7;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
  transition: 180ms ease;
}

.nav button.active,
.nav button:hover {
  border-color: rgba(83, 121, 255, 0.65);
  background: linear-gradient(135deg, #315dff, #4050e8);
  box-shadow: 0 14px 32px rgba(56, 98, 255, 0.28), inset 0 0 26px rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(181, 196, 255, 0.24);
  border-radius: 6px;
  color: #dce7ff;
  font-size: 13px;
}

.nav-icon .ui-icon {
  width: 14px;
  height: 14px;
}

.sidebar-card {
  margin-top: auto;
  min-height: 190px;
  padding: 24px 12px 12px;
  overflow: hidden;
  border: 1px solid rgba(80, 119, 255, 0.32);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(16, 37, 98, 0.42), rgba(16, 23, 48, 0.82)),
    url("https://images.unsplash.com/photo-1519608487953-e999c86e7455?auto=format&fit=crop&w=700&q=80") center / cover;
}

.sidebar-card strong,
.sidebar-card p {
  display: block;
  text-align: center;
}

.sidebar-card strong {
  font-size: 18px;
  letter-spacing: 1px;
}

.sidebar-card p {
  margin: 9px 0 0;
  color: #dce7ff;
  font-size: 17px;
}

.side-city {
  height: 140px;
}

.main {
  min-width: 0;
  padding: 18px 20px 18px 24px;
}

.topbar {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.top-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-btn {
  width: 30px;
  height: 30px;
  background: transparent;
  color: #ffffff;
  font-size: 20px;
}

.page-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ui-icon {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 320px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(121, 143, 210, 0.22);
  border-radius: 999px;
  background: rgba(22, 32, 62, 0.82);
  color: #9fb0d5;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #eef3ff;
  font-size: 13px;
}

.search-box input::placeholder {
  color: #8c9bc1;
}

.search-icon {
  display: grid;
  place-items: center;
  color: #7890ad;
  font-size: 16px;
}

.search-results {
  position: absolute;
  top: calc(100% + 9px);
  left: 0;
  z-index: 20;
  display: none;
  width: min(420px, calc(100vw - 40px));
  padding: 8px;
  border: 1px solid rgba(99, 134, 255, 0.3);
  border-radius: 12px;
  background: rgba(9, 18, 40, 0.96);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.36);
}

.search-results.show {
  display: grid;
  gap: 6px;
}

.search-results button {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  grid-template-areas:
    "icon title"
    "icon meta";
  column-gap: 9px;
  align-items: center;
  min-height: 54px;
  padding: 8px;
  border-radius: 8px;
  background: transparent;
  color: #ffffff;
  text-align: left;
}

.search-results button:hover {
  background: rgba(63, 109, 255, 0.16);
}

.search-results span {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(104, 141, 255, 0.28);
  border-radius: 8px;
  color: var(--cyan);
}

.search-results strong {
  grid-area: title;
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-results em {
  grid-area: meta;
  min-width: 0;
  overflow: hidden;
  color: #8797bf;
  font-size: 11px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bell-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(121, 143, 210, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  font-size: 22px;
}

.bell-icon {
  display: grid;
  place-items: center;
  transform: rotate(-12deg);
  transform-origin: 50% 7%;
  animation: bellRing 3.8s ease-in-out infinite;
}

.bell-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bell-btn:hover .bell-icon,
.bell-btn.active .bell-icon {
  animation: bellRing 1.2s ease-in-out infinite;
}

@keyframes bellRing {
  0%, 72%, 100% {
    transform: rotate(-12deg);
  }
  76% {
    transform: rotate(10deg);
  }
  80% {
    transform: rotate(-9deg);
  }
  84% {
    transform: rotate(7deg);
  }
  88% {
    transform: rotate(-5deg);
  }
  92% {
    transform: rotate(2deg);
  }
}

.bell-dot {
  display: none;
}

.bell-count {
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ff405d;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 118px;
  height: 42px;
  padding: 4px 10px 4px 5px;
  border: 1px solid rgba(121, 143, 210, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  text-align: left;
}

.user-chip:hover,
.bell-btn:hover,
.theme-toggle:hover {
  border-color: rgba(71, 203, 196, 0.34);
  background: rgba(255, 255, 255, 0.1);
}

.avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  background: linear-gradient(135deg, #2bc7ff, #8a5cff 62%, #ff68b7);
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.44);
  font-size: 17px;
}

.user-chip-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
  line-height: 1.1;
}

.user-chip-copy strong {
  max-width: 72px;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-shortcut {
  flex: 0 0 auto;
  padding: 3px 8px;
  border: 1px solid rgba(106, 147, 190, 0.2);
  border-radius: 999px;
  background: rgba(102, 149, 192, 0.1);
  color: #8fa9c8;
  font-size: 11px;
  line-height: 1;
  user-select: none;
}

.command-center-panel {
  max-height: min(480px, calc(100vh - 110px));
  overflow: auto;
  border-color: rgba(82, 201, 205, 0.22);
  background: rgba(7, 20, 45, 0.96);
  backdrop-filter: blur(18px);
}

.search-results button.active,
.search-results button:hover {
  background: linear-gradient(135deg, rgba(30, 157, 164, 0.22), rgba(65, 103, 211, 0.18));
}

.search-results button.active {
  outline: 1px solid rgba(84, 212, 210, 0.35);
}

.search-results button span svg {
  width: 17px;
  height: 17px;
}

.search-empty {
  margin: 0;
  padding: 14px 12px;
  color: #9bb0ca;
  font-size: 13px;
  text-align: center;
}

html[data-theme="day"] .search-shortcut {
  border-color: rgba(38, 119, 126, 0.18);
  background: rgba(32, 153, 149, 0.08);
  color: #36727a;
}

html[data-theme="day"] .command-center-panel {
  border-color: rgba(35, 135, 140, 0.2);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 42px rgba(31, 88, 94, 0.16);
}

html[data-theme="day"] .search-results button {
  color: #1e4d57;
}

html[data-theme="day"] .search-results em,
html[data-theme="day"] .search-empty {
  color: #6b8991;
}

html[data-theme="day"] .search-results button.active,
html[data-theme="day"] .search-results button:hover {
  background: linear-gradient(135deg, rgba(74, 206, 191, 0.16), rgba(86, 137, 240, 0.12));
}

.user-chip-copy small {
  color: rgba(222, 231, 255, 0.68);
  font-size: 10px;
  font-weight: 700;
}

.chevron {
  display: grid;
  place-items: center;
  margin-left: auto;
  color: #dfe7ff;
  font-size: 14px;
}

.home-hero {
  position: relative;
  min-height: 274px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background:
    url("/assets/target-hero.png") center / 100% 100% no-repeat;
  box-shadow: var(--shadow);
}

.home-hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: 1px;
  top: 1px;
  width: 520px;
  height: 240px;
  border-radius: 13px 0 18px 0;
  background: linear-gradient(90deg, rgba(7, 18, 56, 0.98) 0%, rgba(8, 26, 76, 0.92) 62%, rgba(8, 26, 76, 0) 100%);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: auto;
  height: auto;
  padding: 42px 40px;
  overflow: visible;
  clip-path: none;
}

.hero-copy h2 {
  margin: 0 0 12px;
  font-size: 34px;
  line-height: 1.18;
  font-weight: 900;
}

.hero-copy p {
  margin: 0;
  color: #dbe7ff;
  font-size: 17px;
}

.hero-widgets {
  display: flex;
  gap: 16px;
  margin-top: 28px;
}

.weather-card,
.date-card {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 140px;
  height: 82px;
  padding: 14px 18px;
  border: 1px solid rgba(104, 139, 255, 0.36);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(64, 82, 196, 0.55), rgba(22, 42, 96, 0.7));
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.2);
}

.weather-card {
  cursor: pointer;
  transition: border-color 160ms ease, opacity 160ms ease, transform 160ms ease;
}

.weather-card:hover {
  border-color: rgba(112, 218, 225, 0.46);
}

.weather-card.loading {
  opacity: 0.72;
}

.weather-copy {
  min-width: 0;
}

.weather-copy > span {
  display: block;
}

.weather-copy > span b {
  color: inherit;
  font-weight: 700;
}

.weather-copy small {
  display: block;
  margin-top: 4px;
  color: #93aac7;
  font-size: 9px;
  white-space: nowrap;
}

.moon {
  color: #ffe58a;
  font-size: 36px;
}

.weather-card strong,
.date-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 20px;
}

.weather-card span,
.date-card span {
  color: #d9e2ff;
  font-size: 12px;
  line-height: 1.45;
}

.hero-dots {
  display: none;
}

.hero-dots span {
  width: 28px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.hero-dots span:nth-child(2),
.hero-dots span:nth-child(3) {
  width: 14px;
  opacity: 0.48;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.92fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.dash-card {
  min-height: 190px;
  padding: 18px;
  border: 1px solid rgba(99, 134, 255, 0.18);
  border-radius: 9px;
  background: linear-gradient(150deg, rgba(16, 31, 60, 0.88), rgba(12, 24, 50, 0.82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), var(--shadow);
}

.apps-card {
  grid-column: span 2;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 16px;
}

.section-title span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.section-title button {
  background: transparent;
  color: #8d9cc3;
  font-size: 12px;
}

.week-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 10px;
  color: #7f8ead;
  font-size: 12px;
  text-align: center;
}

.week-row span {
  line-height: 1.45;
}

.week-row .active {
  color: #ffffff;
  font-weight: 900;
}

.week-row .active::first-line {
  background: #3f6dff;
}

.course-list {
  display: grid;
  gap: 7px;
}

.course-item {
  display: grid;
  grid-template-columns: 58px 1fr 112px 70px;
  align-items: center;
  min-height: 43px;
  padding: 7px 10px;
  border: 1px solid rgba(114, 138, 203, 0.16);
  border-left: 3px solid #3f6dff;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
  color: #b7c3df;
  font-size: 12px;
}

.course-item:nth-child(2) {
  border-left-color: #9b5cff;
}

.course-item:nth-child(3) {
  border-left-color: #38bdf8;
}

.course-item:nth-child(4) {
  border-left-color: #f7b84b;
}

.course-item strong {
  color: #ffffff;
  font-size: 14px;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px 18px;
}

.app-grid button {
  display: grid;
  justify-items: center;
  gap: 8px;
  background: transparent;
  color: #d6dff7;
  font-size: 13px;
}

.app-grid button span {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border: 1px solid rgba(113, 135, 205, 0.22);
  border-radius: 12px;
  background: rgba(21, 38, 75, 0.72);
  color: #52cfff;
  font-size: 32px;
  box-shadow: inset 0 0 20px rgba(84, 117, 255, 0.08);
}

.app-grid button:nth-child(1) span,
.app-grid button:nth-child(3) span,
.app-grid button:nth-child(7) span {
  color: #9b69ff;
}

.app-grid button:nth-child(5) span {
  color: #ff6bab;
}

.module-groups {
  display: grid;
  gap: 12px;
}

.module-group {
  display: grid;
  gap: 9px;
  padding: 11px;
  border: 1px solid rgba(91, 126, 255, 0.16);
  border-radius: 10px;
  background: rgba(7, 18, 44, 0.32);
}

.module-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.module-group-title strong {
  color: #ffffff;
  font-size: 14px;
}

.module-group-title span {
  color: #7f8ead;
  font-size: 12px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.module-card {
  min-height: 74px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-areas:
    "icon title"
    "icon desc";
  column-gap: 9px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(113, 135, 205, 0.18);
  border-radius: 9px;
  background: rgba(13, 28, 60, 0.7);
  color: #ffffff;
  text-align: left;
  transition: 180ms ease;
}

.module-card:hover {
  transform: translateY(-1px);
  border-color: rgba(50, 215, 255, 0.42);
  background: rgba(63, 109, 255, 0.14);
}

.module-icon {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(104, 141, 255, 0.28);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(49, 93, 255, 0.18), rgba(50, 215, 255, 0.1));
  color: #59d7ff;
  font-size: 20px;
}

.module-card strong {
  grid-area: title;
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: 13px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-card em {
  grid-area: desc;
  min-width: 0;
  overflow: hidden;
  color: #91a1c7;
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice-list {
  display: grid;
  gap: 18px;
  padding-top: 6px;
}

.notice-list div {
  display: grid;
  grid-template-columns: 12px 1fr 46px;
  align-items: center;
  gap: 8px;
  color: #dce5fb;
  font-size: 13px;
}

.notice-list span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3f6dff;
  box-shadow: 0 0 12px rgba(63, 109, 255, 0.8);
}

.notice-list p {
  margin: 0;
}

.campus-news-preview .notice-list p {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.campus-news-preview .notice-list p b {
  overflow: hidden;
  font-size: 13px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.campus-news-preview .notice-list p small {
  overflow: hidden;
  color: #8296b8;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-theme="day"] .campus-news-preview .notice-list p small {
  color: #6b858a;
}

.notice-list time {
  color: #7e8aaa;
  text-align: right;
}

.reserve-layout {
  display: grid;
  grid-template-columns: 218px 1fr;
  gap: 16px;
  align-items: center;
}

.section-title span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.section-title .ui-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.reserve-summary {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 118px;
  padding: 12px;
  border: 1px solid rgba(77, 205, 207, 0.16);
  border-radius: 8px;
  background: rgba(24, 99, 113, 0.08);
}

.ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: conic-gradient(#42c8ba 0 var(--reserve-progress, 0%), rgba(90, 142, 155, 0.18) var(--reserve-progress, 0%) 100%);
  box-shadow: 0 8px 22px rgba(27, 146, 148, 0.18);
  text-align: center;
}

.ring::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: #102b3b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.ring-value {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0;
}

.ring-value strong {
  color: #f0fbfc;
  font-size: 24px;
  line-height: 1.05;
}

.ring-value span {
  color: #a8d8dc;
  font-size: 10px;
}

.reserve-summary-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.reserve-summary-copy span {
  color: #9ebcc5;
  font-size: 10px;
}

.reserve-summary-copy strong {
  color: #82dec5;
  font-size: 13px;
}

.reserve-summary-copy small {
  color: #7596a1;
  font-size: 9px;
}

.reserve-list {
  display: grid;
  gap: 8px;
}

.reserve-list div {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 10px 10px 14px;
  overflow: hidden;
  border: 1px solid rgba(94, 172, 184, 0.14);
  border-radius: 7px;
  background: rgba(30, 98, 116, 0.07);
  color: #b4cbd2;
  font-size: 12px;
  line-height: 1.45;
}

.reserve-list div::before {
  content: "";
  position: absolute;
  inset: 8px auto 8px 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #46c5bb;
}

.reserve-list div:nth-child(2)::before {
  background: #e8af55;
}

.reserve-list span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.reserve-list time {
  color: #86aab5;
  font-size: 10px;
}

.reserve-list b {
  overflow-wrap: anywhere;
  color: #eefafb;
}

.reserve-list em {
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(55, 190, 164, 0.13);
  color: #83e2c5;
  font-size: 10px;
  font-style: normal;
  white-space: nowrap;
}

.reserve-list .warn {
  background: rgba(232, 175, 85, 0.13);
  color: #efc275;
}

.reserve-list em.warning {
  background: rgba(232, 175, 85, 0.13);
  color: #efc275;
}

.reserve-list em.danger {
  background: rgba(224, 86, 105, 0.13);
  color: #f59aaa;
}

.reserve-list em.success {
  background: rgba(55, 190, 164, 0.13);
  color: #83e2c5;
}

/* Learning tools switcher: one visual system, tuned separately for both themes. */
.shell .tools-subnav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 18px;
  padding: 6px;
  border: 1px solid rgba(101, 168, 205, 0.17);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(8, 27, 53, 0.72), rgba(13, 31, 63, 0.52));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 12px 30px rgba(1, 9, 26, 0.12);
  backdrop-filter: blur(16px) saturate(1.12);
  -webkit-backdrop-filter: blur(16px) saturate(1.12);
}

.shell .tools-subnav button {
  position: relative;
  min-width: 0;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 8px 14px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 7px;
  background: rgba(31, 63, 98, 0.24);
  box-shadow: none;
  color: #b9ccdc;
  font-size: 14px;
  font-weight: 750;
  transition: transform 170ms ease, border-color 170ms ease, background 170ms ease, color 170ms ease, box-shadow 170ms ease;
}

.shell .tools-subnav button strong {
  position: relative;
  z-index: 1;
  color: inherit;
  font: inherit;
  letter-spacing: 0;
}

.shell .tools-subnav-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 1px solid rgba(101, 205, 216, 0.18);
  border-radius: 7px;
  background: rgba(31, 128, 151, 0.1);
  color: #73d2dc;
}

.shell .tools-subnav-icon .ui-icon {
  width: 16px;
  height: 16px;
}

.shell .tools-subnav button:hover {
  transform: translateY(-1px);
  border-color: rgba(82, 202, 211, 0.25);
  background: rgba(35, 87, 119, 0.38);
  box-shadow: 0 8px 20px rgba(2, 16, 35, 0.15);
  color: #eefbff;
}

.shell .tools-subnav button.active {
  transform: translateY(-1px);
  border-color: rgba(102, 231, 222, 0.42);
  background: linear-gradient(135deg, rgba(17, 151, 148, 0.96), rgba(42, 104, 177, 0.96));
  box-shadow: 0 10px 24px rgba(9, 87, 126, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.17);
  color: #ffffff;
}

.shell .tools-subnav button.active::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 26%, rgba(255, 255, 255, 0.18) 46%, transparent 64%);
  transform: translateX(-130%);
  animation: toolsTabSheen 4.6s ease-in-out infinite;
}

.shell .tools-subnav button.active .tools-subnav-icon {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

@keyframes toolsTabSheen {
  0%, 58% { transform: translateX(-130%); }
  82%, 100% { transform: translateX(130%); }
}

html[data-theme="day"] .shell .tools-subnav {
  border-color: rgba(37, 119, 127, 0.15);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(232, 247, 245, 0.62));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 10px 28px rgba(43, 91, 96, 0.07);
}

html[data-theme="day"] .shell .tools-subnav button,
html[data-theme="day"] .shell .tools-subnav button:nth-child(1),
html[data-theme="day"] .shell .tools-subnav button:nth-child(2),
html[data-theme="day"] .shell .tools-subnav button:nth-child(3) {
  border-color: transparent;
  background: rgba(239, 249, 247, 0.54);
  box-shadow: none;
  color: #385e65;
}

html[data-theme="day"] .shell .tools-subnav-icon {
  border-color: rgba(28, 134, 137, 0.16);
  background: rgba(24, 145, 140, 0.07);
  color: #237d82;
}

html[data-theme="day"] .shell .tools-subnav button:hover,
html[data-theme="day"] .shell .tools-subnav button:nth-child(1):hover,
html[data-theme="day"] .shell .tools-subnav button:nth-child(2):hover,
html[data-theme="day"] .shell .tools-subnav button:nth-child(3):hover {
  transform: translateY(-1px);
  border-color: rgba(24, 139, 137, 0.2);
  background: rgba(224, 244, 241, 0.88);
  box-shadow: 0 8px 18px rgba(39, 102, 105, 0.08);
  color: #174f56;
}

html[data-theme="day"] .shell .tools-subnav button.active,
html[data-theme="day"] .shell .tools-subnav button:nth-child(1).active,
html[data-theme="day"] .shell .tools-subnav button:nth-child(2).active,
html[data-theme="day"] .shell .tools-subnav button:nth-child(3).active {
  border-color: rgba(17, 130, 127, 0.32);
  background: linear-gradient(135deg, #15968f, #2d7ea3);
  box-shadow: 0 10px 22px rgba(27, 111, 116, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

html[data-theme="day"] .shell .tools-subnav button.active .tools-subnav-icon {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

@media (max-width: 760px) {
  .shell .tools-subnav {
    display: flex;
    grid-template-columns: none;
    gap: 6px;
    margin: 8px -10px 12px;
    padding: 6px 10px;
    overflow-x: auto;
  }

  .shell .tools-subnav button {
    flex: 0 0 156px;
    min-height: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shell .tools-subnav button.active::after {
    animation: none;
  }
}

.student-card {
  position: relative;
  min-height: 190px;
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(92, 205, 224, 0.3);
  border-radius: 8px;
  background:
    linear-gradient(118deg, rgba(7, 54, 82, 0.96), rgba(12, 83, 102, 0.9)),
    url("/assets/campus-card-youth-v1.png") center / cover;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 16px 34px rgba(0, 12, 34, 0.28);
}

.student-card::before,
.student-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.student-card::before {
  width: 180px;
  height: 180px;
  right: -72px;
  bottom: -105px;
  border: 24px solid rgba(132, 239, 235, 0.12);
  border-radius: 50%;
}

.student-card::after {
  inset: 0;
  background: linear-gradient(105deg, transparent 54%, rgba(255, 255, 255, 0.07));
}

.student-card-top,
.student-card-main,
.student-card-status {
  position: relative;
  z-index: 1;
}

.student-card-top,
.student-card-main,
.student-card-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.student-card-top > span {
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
}

.student-card-top em,
.student-card-status i {
  padding: 5px 8px;
  border: 1px solid rgba(174, 244, 240, 0.26);
  border-radius: 6px;
  background: rgba(5, 32, 53, 0.28);
  color: #c4f8f3;
  font-size: 10px;
  font-style: normal;
}

.student-card-person strong {
  display: block;
  color: #ffffff;
  font-size: 20px;
}

.student-card-person p,
.student-card-status > span {
  margin: 6px 0 0;
  color: #b9dfe3;
  font-size: 12px;
}

.student-card-balance {
  text-align: right;
}

.student-card-balance small {
  color: #a9d4d9;
  font-size: 10px;
}

.student-card-balance p {
  margin: 2px 0 0;
}

.student-card-balance b {
  color: #ffffff;
  font-size: 27px;
}

.student-card-balance p span {
  margin-left: 4px;
  color: #c7e9eb;
  font-size: 11px;
}

.student-card-status {
  padding-top: 10px;
  border-top: 1px solid rgba(190, 239, 241, 0.18);
}

.student-card-status > span {
  margin: 0;
}

.student-card-status i {
  border-color: rgba(97, 232, 183, 0.24);
  background: rgba(45, 198, 142, 0.12);
  color: #9cf1ca;
}

.card-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.card-actions button {
  min-height: 42px;
  border: 1px solid rgba(100, 176, 192, 0.14);
  border-radius: 7px;
  background: rgba(42, 107, 125, 0.08);
  color: #a9c7d1;
  font-size: 12px;
}

.card-actions .pay-entry {
  border: 1px solid rgba(63, 207, 200, 0.2);
  border-radius: 8px;
  background: rgba(32, 151, 153, 0.12);
  color: #d8f3f1;
}

.card-actions .pay-entry:first-child {
  border-color: rgba(74, 222, 161, 0.22);
  background: rgba(42, 178, 127, 0.14);
}

.card-actions .pay-entry:nth-child(2) {
  border-color: rgba(72, 178, 235, 0.24);
  background: rgba(42, 139, 198, 0.14);
}

.food-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.food-tile {
  overflow: hidden;
  border: 1px solid rgba(113, 135, 205, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.food-tile img {
  width: 100%;
  height: 78px;
  object-fit: cover;
}

.food-tile strong,
.food-tile span,
.food-tile b {
  display: block;
  padding: 0 10px;
}

.food-tile strong {
  margin-top: 9px;
  font-size: 14px;
}

.food-tile span {
  margin-top: 5px;
  color: #9cadcc;
  font-size: 12px;
}

.food-tile b {
  margin: 8px 0 10px;
  color: #f7b84b;
  font-size: 16px;
}

.site-footer {
  padding: 22px 0 0;
  color: rgba(166, 178, 210, 0.55);
  text-align: center;
  font-size: 13px;
}

.grid,
.card,
.metric,
.row,
.badge,
.primary-btn,
.ghost-btn,
.form,
.field,
.empty,
.toast,
.qr-box {
  /* Existing secondary pages reuse the new dark visual system. */
}

.grid {
  display: grid;
  gap: 14px;
}

.grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  padding: 18px;
  border: 1px solid rgba(99, 134, 255, 0.18);
  border-radius: 9px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(113, 135, 205, 0.16);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
}

.row-title {
  margin: 0;
  color: #ffffff;
  font-weight: 800;
}

.row-meta {
  margin: 5px 0 0;
  color: #9cadcc;
  font-size: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(63, 109, 255, 0.18);
  color: #8fc7ff;
  font-size: 12px;
  white-space: nowrap;
}

.badge.warning {
  background: rgba(247, 184, 75, 0.16);
  color: #f7b84b;
}

.badge.success {
  background: rgba(50, 215, 255, 0.16);
  color: #7de7ff;
}

.primary-btn,
.ghost-btn {
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 8px;
  color: #ffffff;
  font-weight: 800;
}

.primary-btn {
  background: linear-gradient(135deg, #24c6ff, #425cff);
}

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  color: #9cadcc;
  font-size: 13px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid rgba(113, 135, 205, 0.2);
  border-radius: 8px;
  background: rgba(7, 16, 34, 0.72);
  color: #ffffff;
}

.field textarea {
  min-height: 92px;
}

.pay-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.pay-methods label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 36px;
  border: 1px solid rgba(113, 135, 205, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #dbe7ff;
  font-size: 12px;
}

.payment-bind-list {
  display: grid;
  gap: 12px;
}

.payment-bind-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(113, 135, 205, 0.18);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
}

.payment-bind-item > div {
  display: grid;
  grid-template-columns: 42px 1fr;
  column-gap: 10px;
  align-items: center;
}

.payment-bind-item strong {
  color: #ffffff;
}

.payment-bind-item p {
  grid-column: 2;
  margin: 4px 0 0;
  color: #9cadcc;
  font-size: 12px;
}

.pay-logo {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: #ffffff;
  font-weight: 900;
}

.pay-logo.wechat {
  background: linear-gradient(135deg, #32d7ff, #3f6dff);
  box-shadow: 0 0 18px rgba(50, 215, 255, 0.26);
}

.pay-logo.alipay {
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.26);
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #060d1d;
}

.login-panel {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: 1fr 390px;
  overflow: hidden;
  border: 1px solid rgba(99, 134, 255, 0.3);
  border-radius: 14px;
  background: var(--panel);
}

.login-visual {
  min-height: 520px;
  padding: 46px;
  background:
    linear-gradient(90deg, rgba(11, 32, 87, 0.8), rgba(9, 17, 38, 0.65)),
    url("https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?auto=format&fit=crop&w=1400&q=80") center / cover;
}

.login-visual img {
  width: 74px;
  height: 74px;
  border-radius: 50%;
}

.login-visual h1 {
  margin: 170px 0 12px;
  font-size: 42px;
}

.login-visual p {
  color: #dbe7ff;
  line-height: 1.8;
}

.login-form {
  display: grid;
  align-content: center;
  gap: 14px;
  padding: 42px 34px;
}

.muted {
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #101d3a;
  color: #ffffff;
  z-index: 20;
}

.card-photo {
  height: 136px;
  margin: -18px -18px 16px;
  background-position: center;
  background-size: cover;
}

.lab-photo {
  background-image: url("https://images.unsplash.com/photo-1535223289827-42f1e9919769?auto=format&fit=crop&w=1200&q=80");
}

.food-photo {
  background-image: url("https://images.unsplash.com/photo-1555396273-367ea4eb4db5?auto=format&fit=crop&w=1200&q=80");
}

.qr-box {
  display: grid;
  place-items: center;
  min-height: 230px;
  border-radius: 8px;
  background: #101d3a;
}

.timetable-page {
  display: grid;
  gap: 14px;
}

.timetable-import {
  align-self: start;
  position: sticky;
  top: 18px;
}

.import-textarea {
  width: 100%;
  min-height: 150px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid rgba(113, 135, 205, 0.2);
  border-radius: 9px;
  outline: 0;
  background: rgba(7, 16, 34, 0.72);
  color: #ffffff;
  resize: vertical;
}

.import-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.import-stats span {
  padding: 10px;
  border: 1px solid rgba(113, 135, 205, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: #9cadcc;
  font-size: 12px;
}

.import-stats strong {
  display: block;
  color: #ffffff;
  font-size: 22px;
}

.timetable-main {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.timetable-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.timetable-toolbar button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(117, 156, 225, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #c9d7ef;
  font-weight: 800;
  cursor: pointer;
}

.timetable-toolbar button:hover {
  border-color: rgba(101, 225, 236, 0.42);
  color: #ffffff;
  background: rgba(75, 190, 220, 0.16);
}

.smart-timetable {
  min-height: auto;
  padding: 16px;
  background:
    radial-gradient(circle at 14% 4%, rgba(47, 173, 230, 0.2), transparent 30%),
    linear-gradient(180deg, rgba(13, 34, 72, 0.92), rgba(8, 22, 48, 0.95));
}

.timetable-board-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.timetable-board-head > div {
  display: grid;
  gap: 5px;
}

.timetable-board-head h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #f6fbff;
  font-size: 22px;
}

.timetable-board-head svg {
  width: 19px;
  height: 19px;
}

.timetable-board-kicker {
  color: #78e5ef;
  font-size: 12px;
  font-weight: 800;
}

.timetable-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.timetable-summary .dash-card {
  min-height: 104px;
}

.timetable-summary span {
  color: #9cadcc;
  font-size: 13px;
}

.timetable-summary strong {
  display: block;
  margin-top: 8px;
  color: #ffffff;
  font-size: 32px;
}

.timetable-summary p {
  margin: 4px 0 0;
  color: #9cadcc;
  font-size: 12px;
}

.week-board {
  display: grid;
  grid-template-columns: repeat(7, minmax(128px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.day-column {
  min-height: 360px;
  padding: 10px;
  border: 1px solid rgba(113, 135, 205, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.day-column.today {
  border-color: rgba(63, 109, 255, 0.55);
  box-shadow: inset 0 0 24px rgba(63, 109, 255, 0.12);
}

.day-column h3 {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 14px;
  text-align: center;
}

.day-courses {
  display: grid;
  gap: 8px;
}

.course-block {
  width: 100%;
  text-align: left;
  cursor: pointer;
  padding: 10px;
  border-left: 3px solid #32d7ff;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(63, 109, 255, 0.16), rgba(255, 255, 255, 0.035));
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.course-block:hover {
  border-left-color: #74f2ff;
  box-shadow: 0 10px 26px rgba(45, 102, 255, 0.2);
  transform: translateY(-1px);
}

.course-block time,
.course-block span,
.course-block small,
.course-block em {
  display: block;
  color: #9cadcc;
  font-size: 12px;
  line-height: 1.5;
}

.course-block strong {
  display: block;
  margin: 5px 0;
  color: #ffffff;
  font-size: 14px;
}

.course-block em {
  margin-top: 6px;
  color: #6fdfff;
  font-style: normal;
}

.timetable-studio {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.92fr);
  gap: 22px;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 12%, rgba(255, 190, 92, 0.22), transparent 28%),
    linear-gradient(135deg, rgba(24, 112, 156, 0.2), rgba(42, 214, 195, 0.08)),
    rgba(10, 24, 52, 0.86);
}

.timetable-studio-copy {
  display: flex;
  align-items: center;
  min-height: 100%;
}

.timetable-studio-copy h2 {
  margin: 0;
  font-size: clamp(26px, 3.6vw, 42px);
  line-height: 1.08;
}

.timetable-studio-copy p {
  max-width: 680px;
  margin: 0;
  color: #aebfda;
  line-height: 1.8;
}

.timetable-control-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(120, 225, 232, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
}

.timetable-control-grid label,
.schedule-switch {
  display: grid;
  gap: 7px;
  color: #dce9ff;
  font-size: 12px;
  font-weight: 800;
}

.week-one-start-field small {
  color: #7f93b8;
  font-size: 11px;
  font-weight: 600;
}

.week-one-start-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.week-one-start-control .ghost-btn {
  min-height: 42px;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .week-one-start-control {
    grid-template-columns: 1fr;
  }
}

.week-switcher,
.schedule-switch div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
}

.week-switcher button,
.schedule-switch button {
  min-height: 40px;
  border: 1px solid rgba(113, 135, 205, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: #dfe8ff;
  font-weight: 900;
  cursor: pointer;
}

.schedule-switch div {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.schedule-switch button.active {
  border-color: rgba(89, 231, 214, 0.6);
  background: linear-gradient(135deg, rgba(39, 173, 190, 0.9), rgba(63, 109, 255, 0.82));
  color: #fff;
  box-shadow: 0 12px 28px rgba(36, 146, 174, 0.24);
}

.timetable-note-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}

.timetable-note-row span {
  padding: 5px 9px;
  border: 1px solid rgba(113, 135, 205, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #b7c9e8;
  font-size: 12px;
}

.timetable-grid-wrap {
  max-width: 100%;
  overflow: hidden;
  border: 1px solid rgba(119, 151, 212, 0.22);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(180deg, rgba(38, 86, 140, 0.28), rgba(255, 255, 255, 0.025));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.timetable-grid {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 58px repeat(7, minmax(0, 1fr));
  grid-template-rows: 50px repeat(12, 70px);
}

.grid-corner,
.grid-day,
.grid-time,
.grid-slot {
  border-right: 1px solid rgba(113, 135, 205, 0.16);
  border-bottom: 1px solid rgba(113, 135, 205, 0.16);
}

.grid-corner,
.grid-day,
.grid-time {
  display: grid;
  place-items: center;
}

.grid-corner {
  color: #9cadcc;
  font-size: 13px;
  font-weight: 900;
  background: rgba(6, 17, 38, 0.36);
}

.grid-day {
  gap: 3px;
  background: linear-gradient(180deg, rgba(44, 110, 175, 0.18), rgba(255, 255, 255, 0.035));
  color: #e9f2ff;
}

.grid-day strong {
  font-size: 15px;
}

.grid-day span {
  color: #95a8c7;
  font-size: 11px;
}

.grid-day.today {
  background: linear-gradient(180deg, rgba(42, 214, 195, 0.22), rgba(63, 109, 255, 0.09));
}

.grid-time {
  gap: 4px;
  color: #dfe8ff;
  background: rgba(6, 17, 38, 0.26);
}

.grid-time strong {
  font-size: 18px;
  line-height: 1;
}

.grid-time span {
  color: #76dce7;
  font-size: 11px;
}

.grid-slot {
  appearance: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.018);
  cursor: pointer;
}

.grid-slot:hover {
  background: rgba(50, 215, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(50, 215, 255, 0.18);
}

.timetable-course-card {
  z-index: 2;
  display: grid;
  align-content: start;
  gap: 3px;
  margin: 4px;
  padding: 7px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-left: 4px solid var(--course-accent, #58d2cd);
  border-radius: 8px;
  text-align: left;
  color: #f8fbff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--course-start, #149f9a), var(--course-end, #2670a4));
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 0 20px var(--course-glow, rgba(30, 166, 169, 0.18));
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.timetable-course-card:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.3);
  filter: saturate(1.1);
}

.timetable-course-card span,
.timetable-course-card em,
.timetable-course-card small {
  display: block;
  color: rgba(255, 255, 255, 0.82);
  font-size: 10.5px;
  font-style: normal;
  line-height: 1.35;
}

.timetable-course-card strong {
  display: block;
  color: #fff;
  overflow-wrap: anywhere;
  font-size: 13.5px;
  line-height: 1.28;
}

.timetable-course-card .course-teacher {
  margin-top: auto;
  color: rgba(255, 255, 255, 0.94);
  font-weight: 700;
}

.timetable-course-card.teal {
  background: linear-gradient(135deg, rgba(20, 159, 154, 0.94), rgba(38, 112, 164, 0.9));
}

.timetable-course-card.blue {
  background: linear-gradient(135deg, rgba(37, 115, 207, 0.94), rgba(38, 74, 162, 0.9));
}

.timetable-course-card.violet {
  background: linear-gradient(135deg, rgba(113, 93, 213, 0.94), rgba(153, 83, 186, 0.9));
}

.timetable-course-card.orange {
  background: linear-gradient(135deg, rgba(226, 139, 47, 0.95), rgba(199, 91, 84, 0.9));
}

.timetable-course-card.green {
  background: linear-gradient(135deg, rgba(41, 154, 103, 0.94), rgba(35, 132, 154, 0.9));
}

.timetable-course-card.rose {
  background: linear-gradient(135deg, rgba(207, 82, 135, 0.94), rgba(111, 91, 205, 0.9));
}

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

.timetable-image-panel {
  min-height: auto;
  display: grid;
  gap: 14px;
  padding: 16px;
  background:
    radial-gradient(circle at 6% 10%, rgba(88, 210, 224, 0.16), transparent 34%),
    rgba(10, 24, 52, 0.82);
}

.timetable-image-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.timetable-image-head h2 {
  margin: 4px 0;
  color: #f7fbff;
  font-size: 18px;
}

.timetable-image-head p {
  margin: 0;
  color: #9fb2d3;
  font-size: 12px;
}

.timetable-image-frame {
  max-height: 520px;
  overflow: auto;
  border: 1px solid rgba(116, 159, 216, 0.24);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.timetable-image-frame img {
  display: block;
  width: min(100%, 720px);
  margin: 0 auto;
  height: auto;
}

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

.import-format-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px dashed rgba(97, 211, 222, 0.34);
  border-radius: 8px;
  background: rgba(97, 211, 222, 0.08);
}

.import-format-card strong {
  color: #8bf0f4;
}

.import-format-card span {
  color: #b9cbe8;
  font-size: 12px;
  line-height: 1.6;
}

.timetable-edit-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(3, 8, 22, 0.66);
  backdrop-filter: blur(12px);
}

.required-password-modal {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 12, 28, 0.76);
  backdrop-filter: blur(16px);
}

.required-password-card {
  width: min(430px, 100%);
  display: grid;
  gap: 15px;
  padding: 24px;
  border: 1px solid rgba(87, 201, 230, 0.36);
  border-radius: 8px;
  background: rgba(8, 28, 52, 0.96);
  box-shadow: 0 28px 90px rgba(0, 4, 18, 0.48);
}

.required-password-card > div span {
  color: #65d9e6;
  font-size: 12px;
  font-weight: 800;
}

.required-password-card h2 {
  margin: 8px 0 6px;
  color: #fff;
}

.required-password-card p {
  margin: 0;
  color: #a9bfd0;
  line-height: 1.7;
}

html[data-theme="day"] .required-password-modal {
  background: rgba(225, 242, 243, 0.78);
}

html[data-theme="day"] .required-password-card {
  border-color: rgba(28, 141, 153, 0.28);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 28px 80px rgba(40, 99, 105, 0.22);
}

html[data-theme="day"] .required-password-card h2 {
  color: #173e42;
}

html[data-theme="day"] .required-password-card p {
  color: #5c7378;
}

.timetable-edit-card {
  width: min(460px, 100%);
  display: grid;
  gap: 13px;
  padding: 20px;
  border: 1px solid rgba(79, 140, 255, 0.34);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(11, 22, 52, 0.98), rgba(5, 13, 33, 0.98));
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.48);
}

.timetable-import-card {
  width: min(420px, 100%);
}

.modal-title-row,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-title-row h2 {
  margin: 0;
  color: #ffffff;
  font-size: 18px;
}

.modal-title-row button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(155, 180, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #dfe8ff;
  cursor: pointer;
}

.modal-actions {
  justify-content: flex-end;
  margin-top: 4px;
}

.empty-day {
  display: grid;
  place-items: center;
  min-height: 74px;
  border: 1px dashed rgba(113, 135, 205, 0.2);
  border-radius: 8px;
  color: #6f7e9d;
  font-size: 12px;
}

.reference-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.reference-links a {
  padding: 8px 10px;
  border: 1px solid rgba(63, 109, 255, 0.28);
  border-radius: 999px;
  background: rgba(63, 109, 255, 0.12);
  color: #9fd3ff;
  font-size: 12px;
  text-decoration: none;
}

.news-page {
  display: grid;
  gap: 14px;
}

.news-source-card .section-title a,
.news-item a {
  color: #9fd3ff;
  font-size: 13px;
  text-decoration: none;
}

.source-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.source-meta span {
  padding: 7px 10px;
  border: 1px solid rgba(63, 109, 255, 0.22);
  border-radius: 999px;
  background: rgba(63, 109, 255, 0.1);
  color: #c7d5ff;
  font-size: 12px;
}

.news-source-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 12px;
}

.news-source-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid rgba(113, 135, 205, 0.18);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  color: #dce7ff;
  text-decoration: none;
}

.news-source-chip strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.news-source-chip span {
  flex: 0 0 auto;
  color: #8fa0c7;
  font-size: 11px;
}

.news-source-chip.ok {
  border-color: rgba(50, 215, 255, 0.28);
  background: rgba(50, 215, 255, 0.07);
}

.news-source-chip.ok span {
  color: #7de7ff;
}

.news-source-chip.locked {
  border-color: rgba(247, 184, 75, 0.24);
  background: rgba(247, 184, 75, 0.08);
}

.news-source-chip.locked span {
  color: #f7b84b;
}

.news-source-chip.error {
  border-color: rgba(255, 92, 168, 0.18);
  background: rgba(255, 92, 168, 0.06);
}

.news-import-form {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(140px, 0.8fr) minmax(220px, 1.4fr) 120px auto;
  gap: 8px;
  margin-top: 12px;
}

.news-import-form input,
.news-import-form select {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(113, 135, 205, 0.2);
  border-radius: 8px;
  outline: 0;
  background: rgba(7, 16, 34, 0.72);
  color: #ffffff;
  font-size: 12px;
}

.news-filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
}

.news-filter-search {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(113, 135, 205, 0.2);
  border-radius: 8px;
  background: rgba(7, 16, 34, 0.52);
}

.news-filter-search .ui-icon {
  width: 17px;
  color: var(--cyan);
}

.news-filter-search input,
.news-filter-bar select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.news-filter-bar select {
  padding: 0 10px;
  border: 1px solid rgba(113, 135, 205, 0.2);
  border-radius: 8px;
  background: rgba(7, 16, 34, 0.72);
}

.news-filter-bar > span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.news-load-more {
  justify-self: center;
  min-width: 220px;
}

.news-list-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.news-item {
  min-height: 178px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.news-item > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.news-item time {
  color: #8594bd;
  font-size: 12px;
  white-space: nowrap;
}

.news-item h3 {
  margin: 16px 0 10px;
  color: #ffffff;
  font-size: 17px;
  line-height: 1.55;
}

.news-item p {
  margin: 0 0 14px;
  color: #9cadcc;
  font-size: 13px;
}

html[data-theme="day"] .news-filter-search,
html[data-theme="day"] .news-filter-bar select {
  border-color: rgba(83, 143, 155, 0.24);
  background: rgba(255, 255, 255, 0.64);
  color: #173f47;
}

@media (max-width: 700px) {
  .news-filter-bar {
    grid-template-columns: 1fr;
  }

  .news-filter-bar > span {
    white-space: normal;
  }
}

.exam-page {
  display: grid;
  gap: 14px;
}

.exam-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(63, 109, 255, 0.22), rgba(138, 92, 255, 0.14)),
    radial-gradient(circle at 86% 8%, rgba(50, 215, 255, 0.26), transparent 34%),
    rgba(12, 25, 52, 0.9);
}

.exam-kicker {
  margin: 0 0 8px;
  color: #7ddcff;
  font-size: 12px;
  font-weight: 800;
}

.exam-hero h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.18;
}

.exam-hero p:not(.exam-kicker) {
  max-width: 820px;
  margin: 10px 0 14px;
  color: #b8c6ec;
  line-height: 1.75;
}

.exam-toolbar {
  display: grid;
  grid-template-columns: minmax(250px, 340px) 190px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.exam-search {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(93, 130, 255, 0.26);
  border-radius: 10px;
  background: rgba(8, 17, 36, 0.62);
}

.exam-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #ffffff;
  font-size: 13px;
}

.exam-sort {
  display: grid;
  gap: 6px;
}

.exam-sort span {
  color: #8fa0c7;
  font-size: 11px;
  font-weight: 800;
}

.exam-sort select {
  width: 100%;
  height: 40px;
  padding: 0 10px;
  border: 1px solid rgba(93, 130, 255, 0.26);
  border-radius: 10px;
  outline: 0;
  background: rgba(8, 17, 36, 0.76);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.exam-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.exam-filter {
  height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(91, 122, 218, 0.24);
  border-radius: 999px;
  background: rgba(63, 109, 255, 0.08);
  color: #b7c5ee;
  font-size: 12px;
  font-weight: 700;
}

.exam-filter.active,
.exam-filter:hover {
  border-color: rgba(50, 215, 255, 0.52);
  background: linear-gradient(135deg, rgba(63, 109, 255, 0.48), rgba(50, 215, 255, 0.18));
  color: #ffffff;
}

.exam-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.exam-card {
  min-height: 372px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.exam-card[hidden] {
  display: none;
}

.exam-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.exam-card h3 {
  margin: 10px 0 0;
  color: #ffffff;
  font-size: 19px;
  line-height: 1.35;
}

.exam-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.exam-meta-row span {
  padding: 6px 8px;
  border: 1px solid rgba(50, 215, 255, 0.16);
  border-radius: 999px;
  background: rgba(50, 215, 255, 0.06);
  color: #a9d8ff;
  font-size: 11px;
  font-weight: 800;
}

.exam-timeline {
  display: grid;
  gap: 10px;
  margin-top: 2px;
}

.exam-timeline div {
  position: relative;
  padding: 10px 12px 10px 15px;
  border: 1px solid rgba(113, 135, 205, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.exam-timeline div::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--cyan), var(--violet));
}

.exam-timeline span,
.exam-source {
  color: #8fa0c7;
  font-size: 12px;
}

.exam-timeline strong {
  display: block;
  margin-top: 4px;
  color: #dce6ff;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 700;
}

.exam-source {
  margin: auto 0 0;
}

.exam-risk {
  margin: -8px 0 0;
  color: #7485aa;
  font-size: 12px;
  line-height: 1.55;
}

.exam-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.exam-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(63, 109, 255, 0.32);
  border-radius: 9px;
  background: rgba(63, 109, 255, 0.12);
  color: #a9d8ff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.exam-actions a:first-child {
  border-color: rgba(50, 215, 255, 0.38);
  background: linear-gradient(135deg, rgba(63, 109, 255, 0.34), rgba(138, 92, 255, 0.24));
  color: #ffffff;
}

.library-page {
  display: grid;
  gap: 14px;
}

.library-hero {
  background:
    radial-gradient(circle at 86% 12%, rgba(50, 215, 255, 0.2), transparent 30%),
    linear-gradient(135deg, rgba(63, 109, 255, 0.22), rgba(138, 92, 255, 0.12)),
    rgba(12, 25, 52, 0.9);
}

.library-hero h2 {
  margin: 0;
  font-size: 30px;
}

.library-hero p:not(.exam-kicker) {
  max-width: 860px;
  color: #b8c6ec;
  line-height: 1.75;
}

.library-floor-tabs {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
}

.library-floor-tabs button {
  min-height: 70px;
  padding: 10px;
  border: 1px solid rgba(113, 135, 205, 0.18);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  color: #dce7ff;
  text-align: left;
}

.library-floor-tabs button.active,
.library-floor-tabs button:hover {
  border-color: rgba(50, 215, 255, 0.48);
  background: linear-gradient(135deg, rgba(63, 109, 255, 0.42), rgba(50, 215, 255, 0.12));
}

.library-floor-tabs strong,
.library-floor-tabs span {
  display: block;
}

.library-floor-tabs strong {
  font-size: 15px;
}

.library-floor-tabs span {
  margin-top: 5px;
  color: #91a3cc;
  font-size: 11px;
  line-height: 1.35;
}

.library-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
  align-items: start;
}

.library-map-card {
  overflow: hidden;
}

.library-map {
  position: relative;
  min-height: 520px;
  overflow: auto;
  border: 1px solid rgba(113, 135, 205, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
}

.library-map img {
  display: block;
  width: 100%;
  min-width: 720px;
}

.library-zone-marker {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 6px;
  border: 1px solid rgba(50, 215, 255, 0.82);
  border-radius: 8px;
  background: rgba(20, 52, 120, 0.72);
  color: #ffffff;
  box-shadow: 0 0 24px rgba(50, 215, 255, 0.28);
}

.library-zone-marker.busy {
  border-color: rgba(247, 184, 75, 0.84);
  background: rgba(107, 72, 19, 0.78);
}

.library-zone-marker span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.library-zone-marker strong {
  font-size: 20px;
}

.library-seat-dot {
  position: absolute;
  z-index: 4;
  width: 13px;
  height: 13px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  background: #31d7ff;
  box-shadow: 0 0 12px rgba(49, 215, 255, 0.75);
  color: transparent;
  font-size: 0;
}

.library-seat-dot:hover,
.library-seat-dot.selected {
  width: 19px;
  height: 19px;
  border-color: #ffffff;
  background: #8a5cff;
  box-shadow: 0 0 18px rgba(138, 92, 255, 0.9);
}

.library-seat-dot.occupied {
  background: #6c7695;
  box-shadow: none;
  opacity: 0.62;
}

.library-seat-dot.reserved {
  background: #f7b84b;
  box-shadow: 0 0 12px rgba(247, 184, 75, 0.7);
}

.library-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.library-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #9cadcc;
  font-size: 12px;
}

.library-map-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.library-map-legend .available {
  background: #31d7ff;
}

.library-map-legend .occupied {
  background: #6c7695;
}

.library-map-legend .reserved {
  background: #f7b84b;
}

.library-side {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 18px;
}

.library-zone-list {
  display: grid;
  gap: 9px;
}

.library-zone-row {
  display: grid;
  gap: 5px;
  padding: 11px;
  border: 1px solid rgba(113, 135, 205, 0.18);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  color: #ffffff;
  text-align: left;
}

.library-zone-row:hover {
  border-color: rgba(50, 215, 255, 0.38);
  background: rgba(63, 109, 255, 0.12);
}

.library-zone-row span,
.library-zone-row em {
  color: #9cadcc;
  font-size: 12px;
  font-style: normal;
}

.ai-page {
  display: grid;
  grid-template-columns: 306px minmax(0, 1fr);
  gap: 14px;
}

.ai-side-panel,
.ai-chat-panel {
  min-height: calc(100vh - 92px);
}

.ai-side-panel {
  display: flex;
  flex-direction: column;
  gap: 13px;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 0%, rgba(50, 215, 255, 0.12), transparent 26%),
    linear-gradient(160deg, rgba(12, 25, 54, 0.95), rgba(8, 16, 34, 0.9));
}

.ai-brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(104, 141, 255, 0.18);
}

.ai-orbit {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(50, 215, 255, 0.92), rgba(63, 109, 255, 0.26) 62%, rgba(138, 92, 255, 0.08));
  box-shadow: 0 0 32px rgba(50, 215, 255, 0.4);
  color: #ffffff;
  font-size: 24px;
}

.ai-brand-row strong {
  color: #ffffff;
  font-size: 17px;
}

.ai-brand-row p {
  margin: 4px 0 0;
  color: #8f9fc8;
  font-size: 12px;
}

.ai-side-action,
.ai-capability-list button,
.ai-recents button {
  width: 100%;
  border: 1px solid rgba(113, 135, 205, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  color: #dbe5ff;
  text-align: left;
}

.ai-side-action {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 10px 12px;
  font-weight: 800;
}

.ai-side-action.active,
.ai-side-action:hover,
.ai-recents button.active,
.ai-recents button:hover {
  border-color: rgba(50, 215, 255, 0.38);
  background: linear-gradient(135deg, rgba(63, 109, 255, 0.25), rgba(50, 215, 255, 0.08));
}

.ai-capability-list {
  display: grid;
  gap: 8px;
}

.ai-capability-list button {
  display: grid;
  gap: 4px;
  padding: 10px;
}

.ai-capability-list strong {
  color: #ffffff;
  font-size: 13px;
}

.ai-capability-list span,
.ai-recents p {
  color: #8898bf;
  font-size: 12px;
}

.ai-recents {
  display: grid;
  gap: 7px;
  margin-top: auto;
}

.ai-recents p {
  margin: 0;
}

.ai-recents button {
  min-height: 34px;
  padding: 8px 10px;
}

.ai-chat-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(420px, 1fr) auto auto;
  gap: 14px;
  overflow: hidden;
  background:
    radial-gradient(circle at 74% 16%, rgba(50, 215, 255, 0.16), transparent 28%),
    radial-gradient(circle at 35% 66%, rgba(138, 92, 255, 0.14), transparent 34%),
    linear-gradient(150deg, rgba(13, 29, 61, 0.95), rgba(5, 11, 26, 0.9));
}

.ai-chat-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(87, 122, 255, 0.08) 1px, transparent 1px) 0 0 / 38px 38px,
    linear-gradient(90deg, rgba(87, 122, 255, 0.08) 1px, transparent 1px) 0 0 / 38px 38px;
  mask-image: radial-gradient(circle at 50% 45%, black, transparent 74%);
}

.ai-chat-head,
.ai-message-stage,
.ai-suggestion-row,
.ai-composer,
.ai-disclaimer {
  position: relative;
  z-index: 1;
}

.ai-chat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.ai-chat-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #ffffff;
  font-size: 26px;
}

.ai-chat-head p {
  margin: 8px 0 0;
  color: #97a8d1;
  line-height: 1.7;
}

.ai-config-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(50, 215, 255, 0.38);
  border-radius: 999px;
  background: rgba(50, 215, 255, 0.11);
  color: #bfeeff;
  font-size: 13px;
  font-weight: 900;
}

.ai-status-stack {
  display: grid;
  justify-items: end;
  gap: 5px;
  color: #8d9cc3;
  font-size: 12px;
}

.ai-status-stack span {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(50, 215, 255, 0.12);
  color: #8ff0ff;
  font-weight: 900;
}

.ai-status-stack strong {
  color: #dce6ff;
  font-size: 12px;
}

.ai-message-stage {
  display: grid;
  place-items: center;
  min-height: 420px;
}

.ai-glow-core {
  position: absolute;
  top: 38px;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  width: 118px;
  height: 82px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), rgba(88, 103, 166, 0.13));
  box-shadow: 0 0 80px rgba(50, 215, 255, 0.16);
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.ai-messages {
  width: min(760px, 100%);
  max-height: 430px;
  display: grid;
  gap: 12px;
  margin-top: 92px;
  overflow-y: auto;
  padding: 8px;
}

.ai-message {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.ai-message.user {
  grid-template-columns: minmax(0, 1fr) 38px;
}

.ai-message.user span {
  grid-column: 2;
  grid-row: 1;
}

.ai-message.user div {
  grid-column: 1;
  grid-row: 1;
}

.ai-message span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #315dff, #32d7ff);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.ai-message div {
  padding: 12px 14px;
  border: 1px solid rgba(105, 139, 255, 0.18);
  border-radius: 12px;
  background: rgba(9, 19, 42, 0.76);
}

.ai-message.user div {
  background: rgba(63, 109, 255, 0.2);
}

.ai-message p {
  margin: 0;
  color: #eef3ff;
  line-height: 1.75;
}

.ai-message em {
  display: block;
  margin-top: 8px;
  color: #7f8ead;
  font-size: 11px;
  font-style: normal;
}

.ai-suggestion-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.ai-suggestion-row button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(113, 135, 205, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #cbd6f2;
}

.ai-composer {
  width: min(860px, 100%);
  min-height: 68px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 110px 86px;
  align-items: center;
  gap: 10px;
  margin: 0 auto;
  padding: 10px;
  border: 1px solid rgba(105, 139, 255, 0.22);
  border-radius: 999px;
  background: rgba(247, 249, 255, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

.ai-composer input,
.ai-composer textarea,
.ai-composer select {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #ffffff;
}

.ai-composer textarea {
  max-height: 150px;
  resize: none;
  font: inherit;
  line-height: 1.55;
}

.ai-composer select option {
  color: #0f172a;
}

.ai-composer button {
  min-height: 46px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-weight: 900;
}

.ai-composer button[type="submit"] {
  background: linear-gradient(135deg, #315dff, #32d7ff);
}

.ai-disclaimer {
  margin: 0;
  color: #8191ba;
  font-size: 12px;
  text-align: center;
}

.ai-config-guide {
  grid-column: 1 / -1;
}

.ai-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.ai-guide-grid article {
  padding: 14px;
  border: 1px solid rgba(113, 135, 205, 0.18);
  border-radius: 10px;
  background: rgba(7, 18, 44, 0.42);
}

.ai-guide-grid strong {
  color: #ffffff;
}

.ai-guide-grid p {
  margin: 8px 0 0;
  color: #9caad0;
  line-height: 1.7;
}

.ai-provider-cloud {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}

.ai-provider-cloud a {
  min-height: 74px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 10px;
  border: 1px solid rgba(105, 139, 255, 0.18);
  border-radius: 9px;
  background: rgba(9, 19, 42, 0.56);
  color: #dce6ff;
  text-decoration: none;
}

.ai-provider-cloud a:hover {
  border-color: rgba(50, 215, 255, 0.42);
  background: rgba(63, 109, 255, 0.14);
}

.ai-provider-cloud span {
  color: #8c9bc1;
  font-size: 12px;
}

.ai-config-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 8, 20, 0.72);
  backdrop-filter: blur(12px);
}

.ai-config-card {
  width: min(680px, 100%);
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(50, 215, 255, 0.28);
  border-radius: 14px;
  background:
    radial-gradient(circle at 84% 12%, rgba(50, 215, 255, 0.16), transparent 26%),
    linear-gradient(160deg, rgba(15, 31, 64, 0.98), rgba(8, 15, 34, 0.98));
  box-shadow: 0 28px 100px rgba(0, 0, 0, 0.5);
}

.ai-config-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ai-config-head strong {
  color: #ffffff;
  font-size: 20px;
}

.ai-config-head p {
  margin: 5px 0 0;
  color: #9caad0;
}

.ai-config-head button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 20px;
}

.ai-config-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.tools-page {
  display: grid;
  gap: 14px;
}

.tools-hero {
  min-height: 210px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  align-items: center;
  gap: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 18%, rgba(50, 215, 255, 0.22), transparent 28%),
    radial-gradient(circle at 58% 72%, rgba(138, 92, 255, 0.2), transparent 32%),
    linear-gradient(135deg, rgba(20, 44, 94, 0.96), rgba(8, 16, 37, 0.94));
}

.tools-hero h2 {
  margin: 8px 0 10px;
  font-size: 30px;
  line-height: 1.25;
}

.tools-hero p:not(.exam-kicker) {
  max-width: 720px;
  margin: 0;
  color: #c8d5ff;
  line-height: 1.8;
}

.tools-hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.tools-hero-metrics span {
  min-height: 108px;
  display: grid;
  place-items: center;
  padding: 16px;
  border: 1px solid rgba(91, 140, 255, 0.26);
  border-radius: 10px;
  background: rgba(7, 18, 44, 0.62);
  color: #aebded;
  text-align: center;
}

.tools-hero-metrics strong {
  display: block;
  color: #ffffff;
  font-size: 31px;
}

.tools-grid {
  display: grid;
  grid-template-columns: 1.08fr 1fr 1fr;
  gap: 14px;
  align-items: stretch;
}

.tool-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tool-panel .section-title a,
.engine-panel .section-title a {
  color: #8fb7ff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.tool-form {
  gap: 10px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tool-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #bfcaef;
  font-size: 13px;
  line-height: 1.6;
}

.tool-check input {
  margin-top: 4px;
  accent-color: var(--blue);
}

.tool-result {
  min-height: 88px;
  display: grid;
  gap: 6px;
  align-content: center;
  margin-top: auto;
  padding: 14px;
  border: 1px solid rgba(80, 119, 255, 0.24);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(52, 100, 255, 0.16), rgba(50, 215, 255, 0.08));
  color: #dce6ff;
  line-height: 1.65;
}

.tool-result strong {
  color: #ffffff;
}

.tool-result span,
.tool-result small {
  color: #9fb0d8;
}

.engineering-form {
  padding-top: 10px;
  border-top: 1px solid rgba(105, 139, 255, 0.16);
}

.engineering-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.engineering-fields[data-mode="base"],
.engineering-fields[data-mode="unit"] {
  grid-template-columns: 1fr 120px;
}

.hidden {
  display: none !important;
}

.engine-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.engine-card {
  min-height: 158px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(86, 128, 255, 0.24);
  border-radius: 10px;
  background: rgba(7, 18, 44, 0.52);
}

.engine-card strong {
  display: block;
  margin-bottom: 4px;
  color: #ffffff;
  font-size: 15px;
}

.engine-card span {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
}

.engine-card p {
  flex: 1;
  margin: 0;
  color: #aebadd;
  font-size: 13px;
  line-height: 1.65;
}

.engine-card a {
  color: #9fc0ff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 720px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .nav {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .nav-section {
    flex: 0 0 auto;
    min-width: 150px;
  }

  .nav button {
    flex: 0 0 auto;
    width: auto;
    min-width: 142px;
  }

  .sidebar-card {
    display: none;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .apps-card {
    grid-column: auto;
  }

  .timetable-page,
  .timetable-summary,
  .timetable-studio,
  .news-list-grid,
  .news-source-grid,
  .news-import-form,
  .exam-hero,
  .exam-toolbar,
  .exam-grid,
  .library-layout,
  .library-floor-tabs,
  .ai-page,
  .ai-guide-grid,
  .ai-provider-cloud,
  .tools-hero,
  .tools-grid,
  .engine-list {
    grid-template-columns: 1fr;
  }

  .tools-hero-metrics {
    grid-template-columns: repeat(3, 1fr);
  }

  .library-side {
    position: static;
  }

  .ai-side-panel,
  .ai-chat-panel {
    min-height: auto;
  }

  .ai-chat-head {
    flex-direction: column;
  }

  .ai-status-stack {
    justify-items: start;
  }

  .ai-config-guide {
    grid-column: auto;
  }

  .timetable-import {
    position: static;
  }

  .timetable-grid {
    min-width: 0;
  }

  .search-box {
    width: 240px;
  }
}

@media (max-width: 720px) {
  .main {
    padding: 14px;
  }

  .topbar {
    height: auto;
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
  }

  .search-box {
    order: 3;
    width: 100%;
  }

  .home-hero {
    min-height: 300px;
    padding: 28px 22px;
  }

  .hero-copy h2 {
    font-size: 28px;
  }

  .hero-widgets,
  .reserve-layout,
  .food-list,
  .grid.cols-2,
  .grid.cols-3,
  .login-panel {
    grid-template-columns: 1fr;
  }

  .student-card {
    min-height: 176px;
    gap: 14px;
    padding: 15px;
  }

  .student-card-balance b {
    font-size: 23px;
  }

  .reserve-summary {
    grid-template-columns: 92px minmax(0, 1fr);
    min-height: 112px;
  }

  .card-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-widgets {
    display: grid;
  }

  .course-item {
    grid-template-columns: 54px 1fr;
  }

  .course-item span:nth-of-type(2),
  .course-item span:nth-of-type(3) {
    display: none;
  }

  .app-grid {
    grid-template-columns: repeat(4, minmax(68px, 1fr));
    overflow-x: auto;
  }

  .module-grid {
    grid-template-columns: 1fr;
  }

  .ai-composer {
    grid-template-columns: 42px minmax(0, 1fr);
    border-radius: 18px;
  }

  .ai-composer select,
  .ai-composer button[type="submit"] {
    grid-column: 1 / -1;
    width: 100%;
  }

  .ai-messages {
    margin-top: 76px;
  }

  .form-row,
  .engineering-fields,
  .engineering-fields[data-mode="base"],
  .engineering-fields[data-mode="unit"],
  .tools-hero-metrics {
    grid-template-columns: 1fr;
  }
}

/* AI assistant panel v2: Gemini-inspired light glass surface inside the campus shell. */
.ai-page {
  min-height: calc(100vh - 82px);
  grid-template-columns: 348px minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(180, 207, 238, 0.34);
  border-radius: 18px;
  background: #f9fbff;
  box-shadow: 0 28px 100px rgba(5, 18, 42, 0.26);
}

.ai-page .dash-card {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.ai-side-panel {
  min-height: calc(100vh - 82px);
  padding: 18px 8px 22px;
  background: linear-gradient(180deg, #ffffff, #f6f7fb);
  color: #101828;
}

.ai-brand-row {
  min-height: 52px;
  padding: 0 10px 16px;
  border-bottom: 0;
}

.ai-orbit {
  width: 30px;
  height: 30px;
  background: conic-gradient(from 30deg, #4285f4, #7c3aed, #06b6d4, #fbbc04, #4285f4);
  box-shadow: 0 8px 24px rgba(66, 133, 244, 0.22);
  font-size: 17px;
}

.ai-brand-row strong {
  color: #111827;
  font-size: 20px;
}

.ai-brand-row p {
  color: #667085;
}

.ai-side-action,
.ai-capability-list button,
.ai-recents button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #0f172a;
}

.ai-side-action {
  min-height: 42px;
  padding: 10px 14px;
  font-weight: 800;
}

.ai-side-action.active,
.ai-side-action:hover,
.ai-recents button.active,
.ai-recents button:hover {
  background: #f0eeee;
  border-color: transparent;
}

.ai-capability-list {
  margin-top: 14px;
  gap: 4px;
}

.ai-capability-list button {
  grid-template-columns: 1fr auto;
  padding: 9px 14px;
  border-radius: 10px;
}

.ai-capability-list strong {
  color: #101828;
  font-size: 15px;
}

.ai-capability-list span {
  color: #667085;
  font-size: 12px;
}

.ai-recents {
  align-content: start;
  margin-top: 28px;
  padding: 0 8px;
}

.ai-recents p {
  padding: 0 2px;
  color: #697586;
  font-size: 15px;
}

.ai-recents button {
  min-height: 38px;
  padding: 8px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-chat-panel {
  min-height: calc(100vh - 82px);
  grid-template-rows: auto minmax(440px, 1fr) auto auto;
  padding: 16px 18px 20px;
  background:
    radial-gradient(circle at 50% 52%, rgba(186, 225, 255, 0.95), rgba(232, 245, 255, 0.82) 28%, rgba(255, 255, 255, 0.97) 57%),
    #ffffff;
}

.ai-chat-panel::before {
  display: none;
}

.ai-chat-head {
  color: #111827;
}

.ai-chat-head h2 {
  color: #111827;
  font-size: 18px;
}

.ai-chat-head p {
  color: #667085;
  font-size: 12px;
}

.ai-config-button {
  min-height: 34px;
  border: 0;
  background: linear-gradient(135deg, #c5e7ff, #a7d8ff);
  color: #064c7a;
}

.ai-status-stack span {
  background: linear-gradient(135deg, #c5e7ff, #a7d8ff);
  color: #064c7a;
}

.ai-status-stack strong {
  color: #667085;
}

.ai-message-stage {
  min-height: 440px;
  place-items: center;
}

.ai-message-stage.empty .ai-glow-core {
  display: none;
}

.ai-landing {
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
}

.ai-message-stage.has-messages .ai-landing {
  display: none;
}

.ai-landing h3 {
  margin: 0;
  color: #2b2f38;
  font-size: 42px;
  font-weight: 400;
  line-height: 1.25;
}

.ai-landing p {
  margin: 0;
  color: #667085;
  font-size: 15px;
}

.ai-glow-core {
  top: 28px;
  width: 112px;
  height: 82px;
  background: rgba(240, 238, 238, 0.92);
  box-shadow: 0 26px 80px rgba(89, 156, 224, 0.2);
  color: #111827;
}

.ai-messages {
  width: min(830px, 100%);
  max-height: 460px;
}

.ai-message span {
  background: linear-gradient(135deg, #1f87ff, #8b5cf6);
}

.ai-message div {
  border: 1px solid rgba(194, 211, 230, 0.72);
  background: rgba(255, 255, 255, 0.86);
}

.ai-message.user div {
  background: rgba(218, 238, 255, 0.92);
}

.ai-message p {
  color: #1f2937;
  line-height: 1.72;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ai-message em {
  color: #667085;
}

.ai-suggestion-row button {
  border: 1px solid rgba(183, 207, 232, 0.74);
  background: rgba(255, 255, 255, 0.72);
  color: #344054;
}

.ai-composer {
  width: min(826px, 100%);
  min-height: 80px;
  grid-template-columns: 46px minmax(0, 1fr) 112px 44px;
  border: 1px solid rgba(207, 216, 226, 0.88);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 34px rgba(24, 39, 75, 0.16);
}

.ai-composer input,
.ai-composer textarea,
.ai-composer select {
  color: #111827;
  font-size: 18px;
}

.ai-composer button {
  background: transparent;
  color: #111827;
  font-size: 24px;
}

.ai-composer button[type="submit"] {
  background: transparent;
  color: #0f172a;
}

.ai-disclaimer {
  color: #667085;
}

.ai-config-guide {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(207, 216, 226, 0.72) !important;
  background: #ffffff !important;
}

.ai-guide-grid article,
.ai-provider-cloud a {
  border-color: rgba(207, 216, 226, 0.8);
  background: #f8fbff;
}

.ai-guide-grid strong,
.ai-provider-cloud strong {
  color: #111827;
}

.ai-guide-grid p,
.ai-provider-cloud span {
  color: #667085;
}

@media (max-width: 900px) {
  .ai-page {
    grid-template-columns: 1fr;
  }

  .ai-side-panel,
  .ai-chat-panel {
    min-height: auto;
  }

  .ai-side-panel {
    display: none;
  }

  .ai-landing h3 {
    font-size: 30px;
  }
}

/* AI assistant panel v3: dark futuristic workspace matching the supplied reference. */
.shell.ai-shell {
  display: block;
  min-height: 100vh;
  background: #02091d;
}

.shell.ai-shell .main {
  min-height: 100vh;
  padding: 0;
}

.shell.ai-shell .ai-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #02091d;
  box-shadow: none;
}

.shell.ai-shell .ai-side-panel {
  min-height: 100vh;
  padding: 30px 22px;
  border-right: 1px solid rgba(75, 117, 255, 0.2);
  background:
    linear-gradient(180deg, rgba(7, 20, 51, 0.98), rgba(2, 11, 32, 0.98)),
    #07142e;
  color: #d9e7ff;
}

.shell.ai-shell .ai-brand-row {
  min-height: 58px;
  padding: 0 0 28px;
  border-bottom: 0;
}

.shell.ai-shell .ai-orbit {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background:
    linear-gradient(135deg, #43f2ff, #1e73ff 48%, #8057ff),
    #1d4ed8;
  box-shadow: 0 0 26px rgba(42, 136, 255, 0.52);
  color: transparent;
}

.shell.ai-shell .ai-brand-row strong {
  color: #ffffff;
  font-size: 22px;
  letter-spacing: 0;
}

.shell.ai-shell .ai-brand-row p {
  color: #6f85b6;
}

.shell.ai-shell .ai-side-action,
.shell.ai-shell .ai-capability-list button,
.shell.ai-shell .ai-recents button {
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #9eb3df;
}

.shell.ai-shell .ai-side-action {
  min-height: 64px;
  padding: 0 20px;
  gap: 14px;
  font-size: 19px;
}

.shell.ai-shell .ai-side-action span {
  color: #58a5ff;
  font-size: 22px;
}

.shell.ai-shell .ai-side-action.active,
.shell.ai-shell .ai-side-action:hover {
  border-color: rgba(40, 103, 255, 0.28);
  background: linear-gradient(90deg, rgba(31, 92, 255, 0.24), rgba(17, 42, 115, 0.84));
  box-shadow: inset -3px 0 0 #2366ff, 0 14px 34px rgba(19, 72, 229, 0.18);
  color: #4d8fff;
}

.shell.ai-shell .ai-capability-list {
  margin-top: 12px;
  gap: 14px;
}

.shell.ai-shell .ai-capability-list button {
  min-height: 54px;
  padding: 8px 20px;
}

.shell.ai-shell .ai-capability-list strong {
  color: #aabbdf;
  font-size: 18px;
  font-weight: 700;
}

.shell.ai-shell .ai-capability-list span {
  display: none;
}

.shell.ai-shell .ai-vip-card {
  display: grid;
  gap: 12px;
  margin-top: auto;
  padding: 20px 22px;
  border: 1px solid rgba(71, 112, 255, 0.22);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(18, 36, 81, 0.74), rgba(10, 22, 52, 0.78));
}

.shell.ai-shell .ai-vip-card strong {
  color: #ffffff;
  font-size: 17px;
}

.shell.ai-shell .ai-vip-card span {
  color: #8397c0;
  font-size: 14px;
}

.shell.ai-shell .ai-vip-card button {
  min-height: 46px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(32, 100, 255, 0.86), rgba(21, 56, 153, 0.94));
  color: #87bdff;
  font-weight: 900;
}

.shell.ai-shell .ai-recents {
  display: none;
}

.shell.ai-shell .ai-user-footer {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
}

.shell.ai-shell .ai-user-footer .avatar {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #122556, #2e7cff);
  box-shadow: 0 0 24px rgba(33, 109, 255, 0.32);
}

.shell.ai-shell .ai-user-footer strong {
  color: #ffffff;
}

.shell.ai-shell .ai-user-footer em {
  color: #3c7cff;
  font-style: normal;
}

.shell.ai-shell .ai-chat-panel {
  min-height: 100vh;
  position: relative;
  display: grid;
  grid-template-rows: 86px minmax(0, 1fr) auto auto;
  gap: 0;
  padding: 0 54px 32px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 51% 26%, rgba(27, 100, 255, 0.34), transparent 26%),
    radial-gradient(ellipse at 52% 82%, rgba(0, 119, 255, 0.78), rgba(0, 35, 111, 0.48) 18%, transparent 43%),
    linear-gradient(180deg, rgba(0, 4, 22, 0.6), rgba(1, 11, 37, 0.96)),
    #02091d;
}

.shell.ai-shell .ai-chat-panel::before {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 37% 16%, rgba(255, 255, 255, 0.7) 0 1px, transparent 2px),
    radial-gradient(circle at 66% 23%, rgba(255, 255, 255, 0.55) 0 1px, transparent 2px),
    radial-gradient(ellipse at 52% 34%, transparent 0 23%, rgba(35, 126, 255, 0.85) 24%, transparent 25%),
    linear-gradient(to top, rgba(15, 82, 220, 0.7), transparent 19%);
  opacity: 0.82;
}

.shell.ai-shell .ai-chat-panel::after {
  content: "";
  position: absolute;
  left: -4%;
  right: -4%;
  bottom: 0;
  height: 205px;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 34%, rgba(44, 150, 255, 0.9), transparent 20%),
    repeating-radial-gradient(ellipse at 50% 100%, rgba(48, 104, 255, 0.26) 0 2px, transparent 3px 18px);
  opacity: 0.82;
}

.shell.ai-shell .ai-chat-head {
  z-index: 2;
  align-items: center;
  padding-top: 26px;
}

.shell.ai-shell .ai-chat-head h2 {
  color: #ffffff;
  font-size: 0;
}

.shell.ai-shell .ai-chat-head p,
.shell.ai-shell .ai-status-stack {
  display: none;
}

.shell.ai-shell .ai-config-button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(91, 141, 255, 0.4);
  background: rgba(8, 22, 58, 0.62);
  color: #bcd6ff;
  box-shadow: 0 0 20px rgba(42, 113, 255, 0.2);
  font-size: 14px;
}

.shell.ai-shell .ai-top-icons {
  position: absolute;
  z-index: 4;
  top: 26px;
  right: 34px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.shell.ai-shell .ai-top-icons button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: transparent;
  color: #e6efff;
  font-size: 24px;
}

.shell.ai-shell .ai-top-icons span {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 22%, rgba(144, 181, 255, 0.9), transparent 18%),
    linear-gradient(135deg, #122b7a, #7a52ff);
  box-shadow: 0 0 30px rgba(89, 119, 255, 0.44);
}

.shell.ai-shell .ai-message-stage {
  z-index: 2;
  min-height: 0;
  align-content: center;
  padding-top: 48px;
}

.shell.ai-shell .ai-landing {
  gap: 18px;
  margin-top: -60px;
}

.shell.ai-shell .ai-landing h3 {
  color: #ffffff;
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 0 28px rgba(43, 133, 255, 0.24);
}

.shell.ai-shell .ai-landing h3::first-letter {
  color: #ffffff;
}

.shell.ai-shell .ai-landing p {
  color: #93a4ca;
  font-size: 20px;
}

.shell.ai-shell .ai-message-stage.has-messages {
  align-content: stretch;
  padding-top: 20px;
}

.shell.ai-shell .ai-messages {
  width: min(920px, 100%);
  max-height: 52vh;
  margin: 0 auto;
  align-self: end;
}

.shell.ai-shell .ai-message div {
  border: 1px solid rgba(70, 113, 255, 0.22);
  border-radius: 14px;
  background: rgba(8, 21, 55, 0.74);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

.shell.ai-shell .ai-message.user div {
  background: rgba(28, 80, 186, 0.36);
}

.shell.ai-shell .ai-message p {
  color: #eaf2ff;
}

.shell.ai-shell .ai-suggestion-row {
  z-index: 2;
  margin: 0 auto 22px;
  gap: 22px;
}

.shell.ai-shell .ai-suggestion-row button {
  min-width: 190px;
  min-height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 1px solid rgba(102, 139, 255, 0.22);
  border-radius: 999px;
  background: rgba(21, 41, 86, 0.72);
  color: #dce8ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  font-size: 18px;
}

.shell.ai-shell .ai-composer {
  z-index: 2;
  width: min(1100px, 86%);
  min-height: 98px;
  grid-template-columns: 54px minmax(0, 1fr) 48px 72px;
  padding: 12px 20px;
  border: 1px solid rgba(46, 99, 255, 0.88);
  border-radius: 999px;
  background: rgba(9, 25, 66, 0.86);
  box-shadow: 0 0 0 1px rgba(73, 127, 255, 0.14), 0 0 44px rgba(31, 104, 255, 0.42);
}

.shell.ai-shell .ai-composer input,
.shell.ai-shell .ai-composer textarea,
.shell.ai-shell .ai-composer select {
  color: #dbe7ff;
  font-size: 20px;
}

.shell.ai-shell .ai-composer input::placeholder,
.shell.ai-shell .ai-composer textarea::placeholder {
  color: #6f82ad;
}

.shell.ai-shell .ai-composer select {
  display: none;
}

.shell.ai-shell .ai-composer button {
  min-height: 54px;
  background: transparent;
  color: #93b5ff;
  font-size: 30px;
}

.shell.ai-shell .ai-composer button[type="submit"] {
  width: 58px;
  height: 58px;
  min-height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1d8bff, #2661ff);
  color: #ffffff;
  box-shadow: 0 0 24px rgba(44, 127, 255, 0.5);
  font-size: 26px;
}

.shell.ai-shell .ai-disclaimer {
  z-index: 2;
  color: #7f8fb4;
  font-size: 14px;
}

.shell.ai-shell .ai-config-guide {
  z-index: 2;
  grid-column: 1 / -1;
  border-top: 1px solid rgba(60, 104, 228, 0.2) !important;
  background: linear-gradient(180deg, rgba(4, 12, 32, 0.92), rgba(4, 12, 32, 0.98)) !important;
}

.shell.ai-shell .ai-guide-grid article,
.shell.ai-shell .ai-provider-cloud a {
  border-color: rgba(72, 112, 255, 0.22);
  background: rgba(10, 24, 57, 0.72);
}

.shell.ai-shell .ai-guide-grid strong,
.shell.ai-shell .ai-provider-cloud strong {
  color: #ffffff;
}

.shell.ai-shell .ai-guide-grid p,
.shell.ai-shell .ai-provider-cloud span {
  color: #91a4cf;
}

@media (max-width: 900px) {
  .shell.ai-shell .ai-page {
    grid-template-columns: 1fr;
  }

  .shell.ai-shell .ai-side-panel {
    display: none;
  }

  .shell.ai-shell .ai-chat-panel {
    padding: 0 18px 24px;
  }

  .shell.ai-shell .ai-suggestion-row button {
    min-width: 142px;
  }
}

/* AI assistant panel v4: keep the campus navigation, render the dark AI workspace inside main. */
.shell .ai-page {
  min-height: calc(100vh - 78px);
  display: grid;
  grid-template-columns: 282px minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(50, 91, 185, 0.34);
  border-radius: 14px;
  background: #02091d;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
}

.shell .ai-page .dash-card {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.shell .ai-side-panel {
  min-height: calc(100vh - 78px);
  padding: 24px 20px;
  border-right: 1px solid rgba(75, 117, 255, 0.2);
  background: linear-gradient(180deg, rgba(7, 20, 51, 0.98), rgba(2, 11, 32, 0.98));
  color: #d9e7ff;
}

.shell .ai-brand-row {
  min-height: 54px;
  padding: 0 0 24px;
  border-bottom: 0;
}

.shell .ai-orbit {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #43f2ff, #1e73ff 48%, #8057ff);
  box-shadow: 0 0 26px rgba(42, 136, 255, 0.52);
  color: transparent;
}

.shell .ai-brand-row strong {
  color: #ffffff;
  font-size: 21px;
}

.shell .ai-brand-row p {
  color: #6f85b6;
}

.shell .ai-side-action,
.shell .ai-capability-list button,
.shell .ai-recents button {
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #9eb3df;
}

.shell .ai-side-action {
  min-height: 58px;
  padding: 0 18px;
  gap: 14px;
  font-size: 18px;
}

.shell .ai-side-action.active,
.shell .ai-side-action:hover {
  border-color: rgba(40, 103, 255, 0.28);
  background: linear-gradient(90deg, rgba(31, 92, 255, 0.24), rgba(17, 42, 115, 0.84));
  box-shadow: inset -3px 0 0 #2366ff, 0 14px 34px rgba(19, 72, 229, 0.18);
  color: #4d8fff;
}

.shell .ai-capability-list {
  margin-top: 12px;
  gap: 12px;
}

.shell .ai-capability-list button {
  min-height: 50px;
  padding: 8px 18px;
}

.shell .ai-capability-list strong {
  color: #aabbdf;
  font-size: 17px;
}

.shell .ai-capability-list span,
.shell .ai-recents {
  display: none;
}

.shell .ai-vip-card {
  display: grid;
  gap: 11px;
  margin-top: auto;
  padding: 18px 20px;
  border: 1px solid rgba(71, 112, 255, 0.22);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(18, 36, 81, 0.74), rgba(10, 22, 52, 0.78));
}

.shell .ai-vip-card strong {
  color: #ffffff;
}

.shell .ai-vip-card span {
  color: #8397c0;
}

.shell .ai-vip-card button {
  min-height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(32, 100, 255, 0.86), rgba(21, 56, 153, 0.94));
  color: #87bdff;
  font-weight: 900;
}

.shell .ai-user-footer {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  margin-top: 22px;
}

.shell .ai-user-footer .avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #122556, #2e7cff);
}

.shell .ai-user-footer strong {
  color: #ffffff;
}

.shell .ai-user-footer em {
  color: #3c7cff;
  font-style: normal;
}

.shell .ai-chat-panel {
  min-height: calc(100vh - 78px);
  position: relative;
  display: grid;
  grid-template-rows: 76px minmax(0, 1fr) auto auto;
  gap: 0;
  padding: 0 42px 28px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 51% 26%, rgba(27, 100, 255, 0.34), transparent 26%),
    radial-gradient(ellipse at 52% 82%, rgba(0, 119, 255, 0.78), rgba(0, 35, 111, 0.48) 18%, transparent 43%),
    linear-gradient(180deg, rgba(0, 4, 22, 0.6), rgba(1, 11, 37, 0.96)),
    #02091d;
}

.shell .ai-chat-panel::before {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 37% 16%, rgba(255, 255, 255, 0.7) 0 1px, transparent 2px),
    radial-gradient(circle at 66% 23%, rgba(255, 255, 255, 0.55) 0 1px, transparent 2px),
    radial-gradient(ellipse at 52% 34%, transparent 0 23%, rgba(35, 126, 255, 0.85) 24%, transparent 25%),
    linear-gradient(to top, rgba(15, 82, 220, 0.7), transparent 19%);
  opacity: 0.82;
}

.shell .ai-chat-panel::after {
  content: "";
  position: absolute;
  left: -4%;
  right: -4%;
  bottom: 0;
  height: 180px;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 34%, rgba(44, 150, 255, 0.9), transparent 20%),
    repeating-radial-gradient(ellipse at 50% 100%, rgba(48, 104, 255, 0.26) 0 2px, transparent 3px 18px);
  opacity: 0.82;
}

.shell .ai-chat-head {
  z-index: 2;
  align-items: center;
  padding-top: 22px;
}

.shell .ai-chat-head h2 {
  color: #ffffff;
  font-size: 0;
}

.shell .ai-chat-head p,
.shell .ai-status-stack {
  display: none;
}

.shell .ai-config-button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(91, 141, 255, 0.4);
  background: rgba(8, 22, 58, 0.62);
  color: #bcd6ff;
  box-shadow: 0 0 20px rgba(42, 113, 255, 0.2);
  font-size: 14px;
}

.shell .ai-top-icons {
  position: absolute;
  z-index: 4;
  top: 22px;
  right: 28px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.shell .ai-top-icons button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: transparent;
  color: #e6efff;
  font-size: 24px;
}

.shell .ai-top-icons span {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #122b7a, #7a52ff);
  box-shadow: 0 0 30px rgba(89, 119, 255, 0.44);
}

.shell .ai-message-stage {
  z-index: 2;
  min-height: 0;
  align-content: center;
}

.shell .ai-landing {
  gap: 18px;
  margin-top: -44px;
}

.shell .ai-landing h3 {
  color: #ffffff;
  font-size: clamp(30px, 3.6vw, 50px);
  font-weight: 900;
}

.shell .ai-landing p {
  color: #93a4ca;
  font-size: 18px;
}

.shell .ai-message-stage.has-messages {
  align-content: stretch;
  padding-top: 14px;
}

.shell .ai-messages {
  width: min(840px, 100%);
  max-height: 48vh;
  margin: 0 auto;
  align-self: end;
}

.shell .ai-message div {
  border: 1px solid rgba(70, 113, 255, 0.22);
  border-radius: 14px;
  background: rgba(8, 21, 55, 0.74);
}

.shell .ai-message.user div {
  background: rgba(28, 80, 186, 0.36);
}

.shell .ai-message p {
  color: #eaf2ff;
}

.shell .ai-suggestion-row {
  z-index: 2;
  margin: 0 auto 18px;
  gap: 16px;
}

.shell .ai-suggestion-row button {
  min-width: 160px;
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid rgba(102, 139, 255, 0.22);
  border-radius: 999px;
  background: rgba(21, 41, 86, 0.72);
  color: #dce8ff;
  font-size: 16px;
}

.shell .ai-composer {
  z-index: 2;
  width: min(980px, 90%);
  min-height: 84px;
  grid-template-columns: 50px minmax(0, 1fr) 46px 64px;
  padding: 10px 18px;
  border: 1px solid rgba(46, 99, 255, 0.88);
  border-radius: 999px;
  background: rgba(9, 25, 66, 0.86);
  box-shadow: 0 0 0 1px rgba(73, 127, 255, 0.14), 0 0 44px rgba(31, 104, 255, 0.42);
}

.shell .ai-composer input,
.shell .ai-composer textarea,
.shell .ai-composer select {
  color: #dbe7ff;
  font-size: 18px;
}

.shell .ai-composer input::placeholder,
.shell .ai-composer textarea::placeholder {
  color: #6f82ad;
}

.shell .ai-composer select {
  display: none;
}

.shell .ai-composer button {
  min-height: 50px;
  background: transparent;
  color: #93b5ff;
  font-size: 28px;
}

.shell .ai-composer button[type="submit"] {
  width: 54px;
  height: 54px;
  min-height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1d8bff, #2661ff);
  color: #ffffff;
}

.shell .ai-disclaimer {
  z-index: 2;
  color: #7f8fb4;
}

.shell .ai-config-guide,
.shell .ai-provider-cloud {
  display: none !important;
}

@media (max-width: 1180px) {
  .shell .ai-page {
    grid-template-columns: 1fr;
  }

  .shell .ai-side-panel {
    display: none;
  }
}

/* Global motion system: lightweight campus-tech effects inspired by particles, AOS and timeline animation libraries. */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

body::before {
  background:
    radial-gradient(circle at 16% 22%, rgba(50, 215, 255, 0.12), transparent 24%),
    radial-gradient(circle at 78% 18%, rgba(138, 92, 255, 0.14), transparent 22%),
    radial-gradient(circle at 52% 86%, rgba(63, 109, 255, 0.1), transparent 28%);
  animation: campusAurora 16s ease-in-out infinite alternate;
}

body::after {
  z-index: -1;
  opacity: 0.38;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.8) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(50, 215, 255, 0.55) 0 1px, transparent 1.6px);
  background-size: 140px 140px, 220px 220px;
  background-position: 0 0, 60px 80px;
  animation: starDrift 42s linear infinite;
}

.main {
  position: relative;
  isolation: isolate;
}

.main::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle 280px at var(--pointer-x, 70%) var(--pointer-y, 20%), rgba(50, 215, 255, 0.09), transparent 65%);
  transition: background 160ms ease;
}

.motion-reveal {
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  transition:
    opacity 560ms ease,
    transform 560ms cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
  transition-delay: calc(var(--motion-index, 0) * 28ms);
}

.motion-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.dash-card,
.card,
.module-card,
.tool-panel,
.engine-card,
.app-grid button {
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
}

.dash-card::after,
.card::after,
.module-card::after,
.tool-panel::after,
.engine-card::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background:
    radial-gradient(circle 180px at var(--card-x, 50%) var(--card-y, 50%), rgba(50, 215, 255, 0.16), transparent 60%),
    linear-gradient(120deg, transparent 22%, rgba(255, 255, 255, 0.08), transparent 42%);
  transition: opacity 180ms ease;
}

.dash-card:hover::after,
.card:hover::after,
.module-card:hover::after,
.tool-panel:hover::after,
.engine-card:hover::after {
  opacity: 1;
}

.dash-card:hover,
.card:hover,
.tool-panel:hover,
.engine-card:hover {
  transform: translateY(-2px);
  border-color: rgba(72, 132, 255, 0.42);
  box-shadow: 0 26px 80px rgba(12, 42, 120, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.nav button.active::after,
.primary-btn::after,
.ghost-btn::after,
.ai-config-button::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.18) 42%, transparent 62%);
  transform: translateX(-120%);
  animation: shimmerSweep 3.8s ease-in-out infinite;
}

.nav button,
.primary-btn,
.ghost-btn,
.ai-config-button {
  position: relative;
  overflow: hidden;
}

.bell-dot,
.bell-count,
.badge.warning,
.badge.success {
  animation: softPulse 2.4s ease-in-out infinite;
}

.home-hero {
  position: relative;
  overflow: hidden;
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: -40%;
  pointer-events: none;
  background: conic-gradient(from 0deg, transparent, rgba(50, 215, 255, 0.16), transparent 34%, rgba(138, 92, 255, 0.14), transparent);
  animation: haloSpin 18s linear infinite;
}

.hero-copy,
.hero-dots {
  position: relative;
  z-index: 1;
}

.hero-dots span,
.library-seat-dot.available,
.ai-orbit,
.module-icon {
  animation: floatGlow 3.2s ease-in-out infinite;
}

.course-item,
.notice-list div,
.row,
.library-zone-row,
.exam-card {
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.course-item:hover,
.notice-list div:hover,
.row:hover,
.library-zone-row:hover,
.exam-card:hover {
  transform: translateX(4px);
}

.library-seat-dot.available {
  box-shadow: 0 0 0 rgba(50, 215, 255, 0.45);
}

.library-seat-dot.available:nth-child(3n) {
  animation-delay: 420ms;
}

.exam-card .badge,
.engine-card span,
.tool-result strong {
  text-shadow: 0 0 18px rgba(50, 215, 255, 0.28);
}

.ai-chat-panel::before {
  animation: starDrift 48s linear infinite;
}

.ai-chat-panel::after {
  animation: horizonPulse 5.5s ease-in-out infinite alternate;
}

.ai-suggestion-row button,
.ai-composer,
.tools-hero,
.library-map {
  animation: panelBreath 5.6s ease-in-out infinite;
}

@keyframes campusAurora {
  0% {
    filter: hue-rotate(0deg);
    transform: scale(1);
  }
  100% {
    filter: hue-rotate(18deg);
    transform: scale(1.05);
  }
}

@keyframes starDrift {
  from {
    background-position: 0 0, 60px 80px;
  }
  to {
    background-position: 360px 260px, -280px 420px;
  }
}

@keyframes shimmerSweep {
  0%, 58% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(120%);
  }
}

@keyframes softPulse {
  0%, 100% {
    filter: brightness(1);
    transform: scale(1);
  }
  50% {
    filter: brightness(1.22);
    transform: scale(1.045);
  }
}

@keyframes haloSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes floatGlow {
  0%, 100% {
    transform: translateY(0);
    filter: brightness(1);
  }
  50% {
    transform: translateY(-3px);
    filter: brightness(1.24);
  }
}

@keyframes horizonPulse {
  from {
    opacity: 0.68;
    transform: translateY(0);
  }
  to {
    opacity: 0.92;
    transform: translateY(-8px);
  }
}

@keyframes panelBreath {
  0%, 100% {
    filter: saturate(1);
  }
  50% {
    filter: saturate(1.15);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .motion-reveal {
    opacity: 1;
    transform: none;
  }
}

/* AI calm visual pass v9: less glare, steadier motion, retained sci-tech mood. */
body::before {
  opacity: 0.42;
  filter: saturate(0.9);
  animation-duration: 42s;
}

body::after {
  opacity: 0.11;
  animation-duration: 120s;
}

.main::before {
  opacity: 0.46;
  background:
    radial-gradient(circle 220px at var(--pointer-x, 55%) var(--pointer-y, 28%), rgba(64, 180, 255, 0.05), transparent 68%),
    linear-gradient(120deg, transparent, rgba(120, 92, 255, 0.028), transparent);
}

.dash-card:hover,
.card:hover,
.tool-panel:hover,
.engine-card:hover {
  transform: translateY(-1px);
  border-color: rgba(88, 148, 255, 0.32);
  box-shadow: 0 18px 52px rgba(7, 20, 62, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.dash-card::after,
.card::after,
.module-card::after,
.tool-panel::after,
.engine-card::after {
  background:
    radial-gradient(circle 180px at var(--card-x, 50%) var(--card-y, 50%), rgba(64, 180, 255, 0.085), transparent 64%),
    linear-gradient(120deg, transparent 24%, rgba(255, 255, 255, 0.045), transparent 48%);
}

.nav button.active::after,
.primary-btn::after,
.ghost-btn::after,
.ai-config-button::after {
  animation-duration: 7.2s;
  opacity: 0.45;
}

.bell-dot,
.bell-count,
.badge.warning,
.badge.success {
  animation-duration: 4.8s;
}

.home-hero::before {
  opacity: 0.24;
  animation-duration: 46s;
}

.hero-dots span,
.library-seat-dot.available,
.ai-orbit,
.module-icon {
  animation-duration: 6.4s;
  filter: brightness(1.02);
}

.course-item:hover,
.notice-list div:hover,
.row:hover,
.library-zone-row:hover,
.exam-card:hover {
  transform: translateX(2px);
}

.exam-card .badge,
.engine-card span,
.tool-result strong {
  text-shadow: 0 0 10px rgba(64, 180, 255, 0.16);
}

.shell .ai-page,
.ai-page {
  min-height: calc(100vh - 118px);
  border: 1px solid rgba(82, 136, 255, 0.18);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(7, 12, 34, 0.92), rgba(3, 8, 24, 0.98)),
    radial-gradient(circle at 50% 18%, rgba(62, 170, 255, 0.1), transparent 36%);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.shell .ai-chat-panel,
.ai-chat-panel {
  background:
    radial-gradient(ellipse at 50% 30%, rgba(27, 106, 214, 0.2), transparent 44%),
    radial-gradient(ellipse at 50% 100%, rgba(26, 95, 206, 0.22), transparent 38%),
    linear-gradient(180deg, rgba(4, 9, 30, 0.96), rgba(3, 7, 21, 0.99));
}

.shell .ai-chat-panel::before,
.ai-chat-panel::before {
  opacity: 0.28;
  animation-duration: 110s;
}

.shell .ai-chat-panel::after,
.ai-chat-panel::after {
  opacity: 0.38;
  filter: blur(1px);
  animation-duration: 14s;
}

.shell .ai-landing h3,
.ai-landing h3 {
  color: #edf5ff;
  text-shadow: 0 0 18px rgba(56, 156, 255, 0.18);
}

.shell .ai-landing p,
.ai-landing p {
  color: rgba(205, 219, 246, 0.68);
}

.shell .ai-composer,
.ai-composer {
  animation: none;
  border-color: rgba(89, 147, 255, 0.42);
  background: linear-gradient(180deg, rgba(16, 29, 66, 0.82), rgba(9, 18, 46, 0.9));
  box-shadow: 0 0 0 1px rgba(64, 180, 255, 0.08), 0 16px 42px rgba(0, 0, 0, 0.2);
}

.shell .ai-composer:focus-within,
.ai-composer:focus-within {
  border-color: rgba(100, 170, 255, 0.62);
  box-shadow: 0 0 0 1px rgba(64, 180, 255, 0.14), 0 18px 52px rgba(8, 38, 96, 0.22);
}

.shell .ai-composer input,
.shell .ai-composer textarea,
.ai-composer input,
.ai-composer textarea {
  color: #f4f8ff;
}

.shell .ai-composer input::placeholder,
.shell .ai-composer textarea::placeholder,
.ai-composer input::placeholder,
.ai-composer textarea::placeholder {
  color: rgba(195, 209, 236, 0.48);
}

.shell .send-btn,
.send-btn {
  background: linear-gradient(145deg, #337cff, #1d55d9);
  box-shadow: 0 10px 26px rgba(34, 103, 235, 0.26);
}

.shell .send-btn:hover,
.send-btn:hover {
  filter: brightness(1.04);
  box-shadow: 0 12px 30px rgba(34, 103, 235, 0.3);
}

.shell .ai-suggestion-row button,
.ai-suggestion-row button {
  animation: none;
  border-color: rgba(97, 143, 226, 0.2);
  background: rgba(20, 34, 72, 0.56);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.shell .ai-suggestion-row button:hover,
.ai-suggestion-row button:hover {
  background: rgba(29, 48, 98, 0.68);
  border-color: rgba(114, 168, 255, 0.36);
  transform: translateY(-1px);
}

.shell .ai-side,
.ai-side {
  background: linear-gradient(180deg, rgba(6, 13, 37, 0.92), rgba(4, 10, 28, 0.98));
  border-right-color: rgba(95, 140, 220, 0.14);
  box-shadow: 14px 0 38px rgba(0, 0, 0, 0.16);
}

.shell .ai-menu button,
.ai-menu button {
  color: rgba(215, 225, 246, 0.72);
}

.shell .ai-menu button.active,
.ai-menu button.active {
  color: #dceaff;
  background: rgba(42, 91, 202, 0.28);
  box-shadow: inset 3px 0 0 rgba(76, 144, 255, 0.82), 0 10px 24px rgba(15, 65, 170, 0.12);
}

.shell .ai-plan-card,
.ai-plan-card {
  border-color: rgba(112, 151, 232, 0.16);
  background: rgba(9, 20, 52, 0.68);
  box-shadow: none;
}

.shell .ai-message,
.ai-message {
  border-color: rgba(107, 151, 236, 0.16);
  background: rgba(8, 17, 44, 0.64);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.13);
}

.shell .ai-message.user,
.ai-message.user {
  background: rgba(34, 76, 168, 0.44);
}

.shell .ai-message.assistant,
.ai-message.assistant {
  background: rgba(8, 18, 46, 0.76);
}

.ai-config-guide {
  display: none !important;
}

.tools-hero,
.library-map {
  animation: none;
}

/* Route stability v10: stop page-level flicker while keeping calm hover feedback. */
body::before,
body::after,
.main::before,
.home-hero::before,
.ai-chat-panel::before,
.ai-chat-panel::after,
.shell .ai-chat-panel::before,
.shell .ai-chat-panel::after,
.nav button.active::after,
.primary-btn::after,
.ghost-btn::after,
.ai-config-button::after,
.bell-dot,
.bell-count,
.badge.warning,
.badge.success,
.hero-dots span,
.library-seat-dot.available,
.ai-orbit,
.module-icon {
  animation: none !important;
}

body::after {
  opacity: 0.07;
}

.main::before,
.home-hero::before {
  transition: none;
}

.motion-reveal,
.motion-visible {
  opacity: 1 !important;
  transform: none !important;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    color 160ms ease !important;
  transition-delay: 0ms !important;
}

.dash-card,
.card,
.module-card,
.tool-panel,
.engine-card,
.app-grid button {
  transform-style: flat;
}

.dash-card:hover,
.card:hover,
.tool-panel:hover,
.engine-card:hover,
.module-card:hover,
.app-grid button:hover {
  transform: translateY(-1px);
}

.shell *,
.shell *::before,
.shell *::after {
  animation: none !important;
}

/* Fast route v11: emergency performance mode for reliable clicking. */
*,
*::before,
*::after {
  animation: none !important;
  scroll-behavior: auto !important;
}

.main::before,
.dash-card::after,
.card::after,
.module-card::after,
.tool-panel::after,
.engine-card::after {
  display: none !important;
}

.tools-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0 18px;
}

.tools-only {
  min-height: calc(100vh - 170px);
  display: grid;
  align-content: start;
}

.tools-only .tools-subnav {
  margin-top: 0;
}

.tools-subnav button {
  flex: 1 1 190px;
  min-height: 50px;
  border: 1px solid rgba(84, 145, 255, 0.34);
  border-radius: 8px;
  color: #edf5ff;
  background: linear-gradient(135deg, rgba(33, 83, 190, 0.84), rgba(18, 42, 98, 0.88));
  box-shadow: 0 14px 34px rgba(8, 28, 82, 0.24);
  font-weight: 800;
  cursor: pointer;
}

.tools-subnav button:hover {
  border-color: rgba(117, 181, 255, 0.72);
  background: linear-gradient(135deg, rgba(48, 106, 230, 0.92), rgba(22, 54, 125, 0.94));
}

.tools-subnav button.active {
  border-color: rgba(82, 211, 235, 0.72);
  background: linear-gradient(135deg, rgba(31, 145, 174, 0.92), rgba(48, 92, 218, 0.94));
  box-shadow: 0 12px 28px rgba(28, 93, 188, 0.26);
  color: #ffffff;
}

html[data-theme="day"] .tools-subnav {
  padding: 6px;
  border: 1px solid rgba(47, 134, 143, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.54);
  box-shadow: 0 12px 32px rgba(55, 111, 117, 0.09);
  backdrop-filter: blur(16px);
}

html[data-theme="day"] .tools-subnav button {
  border-color: rgba(47, 134, 143, 0.2);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(231, 247, 246, 0.9));
  box-shadow: 0 5px 14px rgba(55, 111, 117, 0.07);
  color: #24545d;
}

html[data-theme="day"] .tools-subnav button:nth-child(1) {
  border-color: rgba(42, 132, 196, 0.38);
  background: linear-gradient(135deg, #d4efff, #acd9f3);
  color: #135777;
}

html[data-theme="day"] .tools-subnav button:nth-child(2) {
  border-color: rgba(28, 151, 137, 0.36);
  background: linear-gradient(135deg, #d2f6ed, #a8dfd4);
  color: #0f625c;
}

html[data-theme="day"] .tools-subnav button:nth-child(3) {
  border-color: rgba(105, 89, 190, 0.34);
  background: linear-gradient(135deg, #e5e0ff, #c8bff0);
  color: #493f86;
}

html[data-theme="day"] .tools-subnav button:hover {
  border-color: rgba(25, 145, 153, 0.42);
  background: linear-gradient(180deg, #ffffff, rgba(215, 242, 240, 0.96));
  box-shadow: 0 8px 20px rgba(39, 124, 132, 0.12);
  color: #146b73;
}

html[data-theme="day"] .tools-subnav button:nth-child(1):hover {
  background: linear-gradient(135deg, #c5e9ff, #91cbea);
  color: #0d4f70;
}

html[data-theme="day"] .tools-subnav button:nth-child(2):hover {
  background: linear-gradient(135deg, #c0f0e5, #8ed4c7);
  color: #0b5954;
}

html[data-theme="day"] .tools-subnav button:nth-child(3):hover {
  background: linear-gradient(135deg, #d9d2ff, #b5a9e7);
  color: #403579;
}

html[data-theme="day"] .tools-subnav button.active {
  border-color: rgba(22, 140, 151, 0.58);
  background: linear-gradient(135deg, #159c96, #2d7fa7);
  box-shadow: 0 10px 24px rgba(31, 128, 139, 0.22);
  color: #ffffff;
}

.tool-detail-page {
  display: grid;
  gap: 16px;
}

.tool-backbar {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
}

.tool-backbar h2 {
  margin: 0;
  color: #f5f8ff;
  font-size: 24px;
}

.tool-backbar p {
  margin: 5px 0 0;
  color: rgba(205, 219, 246, 0.72);
}

.tool-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.tool-detail-grid .tool-panel {
  min-height: 520px;
}

.shell .tools-subnav {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

html[data-theme="day"] .tools-subnav button:nth-child(4) {
  border-color: rgba(221, 145, 43, 0.34);
  background: linear-gradient(135deg, #fff2cf, #ffdca5);
  color: #7a4b08;
}

html[data-theme="day"] .tools-subnav button:nth-child(4):hover {
  background: linear-gradient(135deg, #ffe8b2, #ffc877);
  color: #653c00;
}

.quality-score-panel {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 195, 88, 0.18), transparent 28%),
    radial-gradient(circle at 16% 86%, rgba(70, 215, 190, 0.16), transparent 30%),
    linear-gradient(135deg, rgba(14, 35, 72, 0.9), rgba(10, 23, 50, 0.92));
}

.quality-score-panel .section-title small {
  padding: 5px 10px;
  border: 1px solid rgba(111, 221, 210, 0.28);
  border-radius: 999px;
  color: var(--cyan);
  font-size: 12px;
}

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

.quality-weight-card {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(95, 181, 205, 0.22);
  border-radius: 10px;
  background: rgba(6, 20, 43, 0.32);
  color: #b9cbed;
}

.quality-weight-card strong {
  color: #ffffff;
}

.quality-weight-card span {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(56, 109, 170, 0.32);
}

.quality-score-result {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(89, 188, 205, 0.25);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(30, 133, 153, 0.22), rgba(71, 93, 205, 0.16));
}

.quality-score-main {
  display: grid;
  place-items: center;
  min-height: 170px;
  border-radius: 14px;
  background: radial-gradient(circle, rgba(87, 230, 216, 0.22), rgba(34, 78, 124, 0.34));
  text-align: center;
}

.quality-score-main span,
.quality-score-result small,
.quality-score-result p {
  color: #b9cbed;
}

.quality-score-main strong {
  color: #ffffff;
  font-size: 56px;
  line-height: 1;
}

.quality-score-main em {
  color: #80f0df;
  font-style: normal;
  font-weight: 900;
}

.quality-score-bars {
  display: grid;
  gap: 10px;
}

.quality-score-bars p {
  position: relative;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 0;
  padding: 9px 10px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(8, 23, 49, 0.34);
}

.quality-score-bars p::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  width: var(--score);
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(90deg, #48e0cf, #4f8cff, #ffc45a);
}

.quality-score-bars span,
.quality-score-bars b {
  position: relative;
  z-index: 1;
}

.quality-score-bars span {
  color: #ffffff;
  font-weight: 900;
}

.quality-score-bars b {
  color: #c5d8f0;
  font-weight: 700;
}

html[data-theme="day"] .quality-score-panel {
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 190, 74, 0.2), transparent 28%),
    radial-gradient(circle at 18% 82%, rgba(36, 177, 162, 0.18), transparent 28%),
    rgba(255, 255, 255, 0.72);
}

html[data-theme="day"] .quality-weight-card,
html[data-theme="day"] .quality-score-result {
  background: rgba(255, 255, 255, 0.62);
  border-color: rgba(33, 139, 145, 0.2);
}

html[data-theme="day"] .quality-weight-card strong,
html[data-theme="day"] .quality-score-bars span,
html[data-theme="day"] .quality-score-main strong {
  color: #123f47;
}

html[data-theme="day"] .quality-weight-card,
html[data-theme="day"] .quality-score-main span,
html[data-theme="day"] .quality-score-result small,
html[data-theme="day"] .quality-score-result p,
html[data-theme="day"] .quality-score-bars b {
  color: #42636b;
}

html[data-theme="day"] .quality-score-main {
  background: radial-gradient(circle, rgba(71, 207, 190, 0.26), rgba(255, 255, 255, 0.72));
}

html[data-theme="day"] .quality-score-main em {
  color: #08766d;
}

html[data-theme="day"] .quality-score-bars p {
  background: rgba(237, 249, 247, 0.72);
}

.quality-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid rgba(92, 205, 224, 0.24);
  border-radius: 14px;
  background:
    radial-gradient(circle at 18% 20%, rgba(88, 226, 214, 0.18), transparent 30%),
    linear-gradient(135deg, rgba(33, 80, 130, 0.3), rgba(14, 28, 60, 0.5));
}

.quality-hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -45% 35%;
  height: 150px;
  background: radial-gradient(circle, rgba(255, 189, 83, 0.22), transparent 62%);
  pointer-events: none;
}

.quality-hero .eyebrow {
  display: inline-flex;
  margin-bottom: 9px;
  color: #72efe2;
  font-size: 13px;
  font-weight: 900;
}

.quality-hero h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #f8fbff;
  font-size: clamp(30px, 4vw, 52px);
  letter-spacing: 0;
}

.quality-hero h2 .ui-icon {
  width: 34px;
  height: 34px;
}

.quality-hero p {
  max-width: 760px;
  margin: 10px 0 0;
  color: rgba(221, 234, 250, 0.78);
  line-height: 1.8;
}

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

.quality-rule-summary span {
  display: grid;
  align-content: center;
  min-height: 78px;
  padding: 14px;
  border: 1px solid rgba(120, 222, 232, 0.18);
  border-radius: 12px;
  background: rgba(7, 20, 45, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.quality-rule-summary b {
  color: #ffffff;
  font-size: 18px;
}

.quality-rule-summary em {
  margin-top: 4px;
  color: #8aeadd;
  font-style: normal;
  font-weight: 800;
}

.quality-toolbar,
.quality-section,
.quality-process-card {
  position: relative;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(101, 181, 205, 0.2);
  border-radius: 14px;
  background: rgba(7, 21, 48, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.quality-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) repeat(4, auto);
  gap: 12px;
  align-items: end;
}

.quality-toolbar .ghost-btn,
.quality-section > .ghost-btn,
.quality-submit {
  min-height: 42px;
}

.quality-toolbar .ghost-btn.danger {
  border-color: rgba(255, 120, 130, 0.28);
  color: #ffb3bd;
}

.quality-module-workbench {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.quality-module-card {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: 188px;
  padding: 15px;
  overflow: hidden;
  border: 1px solid rgba(103, 201, 221, 0.2);
  border-radius: 16px;
  background:
    radial-gradient(circle at 18% 10%, rgba(77, 226, 211, 0.18), transparent 34%),
    linear-gradient(145deg, rgba(12, 37, 75, 0.7), rgba(8, 23, 52, 0.46));
  box-shadow: 0 14px 34px rgba(0, 10, 30, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.quality-module-card:hover,
.quality-module-card.active {
  transform: translateY(-3px);
  border-color: rgba(82, 225, 214, 0.55);
  box-shadow: 0 18px 42px rgba(10, 32, 74, 0.22), 0 0 0 3px rgba(70, 223, 207, 0.08);
}

.quality-module-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.quality-module-card-head span {
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
}

.quality-module-card-head strong {
  color: #8cf0e1;
  font-size: 18px;
}

.quality-module-card p {
  margin: 0;
  color: rgba(215, 231, 249, 0.78);
  font-size: 13px;
  line-height: 1.65;
}

.quality-module-card em {
  color: rgba(255, 217, 137, 0.86);
  font-style: normal;
  font-size: 12px;
  line-height: 1.55;
}

.quality-module-card-foot {
  display: grid;
  gap: 9px;
  align-self: end;
}

.quality-module-card-foot small {
  color: rgba(200, 219, 238, 0.64);
  font-size: 11px;
}

.quality-module-card-foot button,
.quality-evidence-suggestions article button {
  min-height: 32px;
  border: 1px solid rgba(80, 216, 210, 0.26);
  border-radius: 10px;
  background: rgba(75, 210, 203, 0.12);
  color: #a9fff4;
  font-weight: 800;
}

.quality-evidence-section {
  overflow: hidden;
}

.quality-evidence-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.15fr);
  gap: 14px;
}

.quality-evidence-preview,
.quality-evidence-suggestions {
  display: grid;
  gap: 9px;
  min-height: 170px;
  padding: 14px;
  border: 1px dashed rgba(113, 210, 225, 0.32);
  border-radius: 14px;
  background: rgba(7, 22, 49, 0.34);
}

.quality-evidence-preview img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.quality-evidence-preview strong,
.quality-evidence-suggestions > strong {
  color: #ffffff;
  font-size: 17px;
}

.quality-evidence-preview span,
.quality-evidence-preview small,
.quality-evidence-suggestions > span {
  color: rgba(211, 228, 246, 0.72);
  line-height: 1.65;
}

.quality-evidence-suggestions article {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(117, 205, 219, 0.18);
  border-radius: 12px;
  background: rgba(10, 30, 64, 0.42);
}

.quality-evidence-suggestions article span {
  display: grid;
  place-items: center;
  min-height: 34px;
  border-radius: 10px;
  background: rgba(70, 223, 207, 0.13);
  color: #91fff4;
  font-weight: 900;
}

.quality-evidence-suggestions article b {
  overflow: hidden;
  color: #f7fbff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quality-evidence-suggestions article em {
  grid-column: 2;
  color: rgba(205, 221, 240, 0.68);
  font-style: normal;
  font-size: 12px;
}

.quality-section-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.quality-section h3,
.quality-process-card strong {
  margin: 0;
  color: #f8fbff;
  font-size: 19px;
}

.quality-section p {
  max-width: 760px;
  margin: 0;
  color: rgba(201, 218, 240, 0.72);
  line-height: 1.7;
}

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

.quality-auto-section {
  overflow: hidden;
}

.quality-auto-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 8% 20%, rgba(70, 223, 207, 0.16), transparent 34%),
    radial-gradient(circle at 92% 12%, rgba(76, 134, 255, 0.14), transparent 30%);
}

.quality-formula-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.quality-formula-grid article {
  position: relative;
  min-height: 126px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid rgba(117, 205, 219, 0.18);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(12, 36, 75, 0.72), rgba(10, 26, 56, 0.48));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.quality-formula-grid article::after {
  content: "";
  position: absolute;
  inset: auto 12px 12px 12px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #46dfcf, #4c86ff, #ffd16b);
  opacity: 0.72;
}

.quality-formula-grid strong {
  display: block;
  margin-bottom: 10px;
  color: #f8fbff;
  font-size: 17px;
}

.quality-formula-grid span {
  display: block;
  color: rgba(213, 229, 248, 0.74);
  font-size: 13px;
  line-height: 1.65;
}

.switch-field {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
}

.switch-field input {
  width: 20px;
  height: 20px;
}

.switch-field em {
  grid-column: 1 / -1;
  color: rgba(194, 212, 234, 0.66);
  font-style: normal;
  font-size: 12px;
}

.quality-items {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.quality-item-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.25fr) 92px minmax(180px, 1fr) 86px 72px minmax(180px, 1fr) 38px;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(104, 188, 211, 0.18);
  border-radius: 12px;
  background: rgba(9, 26, 57, 0.34);
}

.quality-item-row input,
.quality-item-row select {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(111, 181, 202, 0.22);
  border-radius: 9px;
  background: rgba(7, 18, 39, 0.72);
  color: #eaf6ff;
}

.quality-remove {
  width: 36px;
  height: 36px;
  color: #ffb5be;
}

.quality-risk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.quality-risk-grid label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px;
  border: 1px solid rgba(255, 180, 95, 0.2);
  border-radius: 10px;
  background: rgba(255, 170, 70, 0.08);
  color: #ffe3bd;
  line-height: 1.55;
}

.quality-score-result {
  grid-template-columns: 260px minmax(0, 1fr);
  margin-top: 18px;
}

.quality-result-body {
  display: grid;
  gap: 12px;
}

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

.quality-module-grid article {
  position: relative;
  min-height: 116px;
  padding: 12px;
  overflow: hidden;
  border: 1px solid rgba(117, 205, 219, 0.18);
  border-radius: 12px;
  background: rgba(7, 22, 49, 0.38);
}

.quality-module-grid header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.quality-module-grid strong {
  color: #ffffff;
}

.quality-module-grid span {
  color: #8cf0e1;
  font-weight: 900;
}

.quality-module-grid p {
  margin: 18px 0 0;
  color: rgba(205, 219, 240, 0.72);
}

.quality-module-grid i {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.quality-module-grid i::before {
  content: "";
  display: block;
  width: var(--score);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #46dfcf, #4c86ff, #ffd16b);
}

.quality-alerts,
.quality-proof-list {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid rgba(255, 190, 90, 0.22);
  border-radius: 12px;
  background: rgba(255, 178, 77, 0.08);
}

.quality-alerts.is-ok {
  border-color: rgba(87, 214, 178, 0.22);
  background: rgba(62, 204, 174, 0.08);
}

.quality-alerts strong,
.quality-proof-list strong {
  color: #ffffff;
}

.quality-alerts span,
.quality-proof-list span,
.quality-process-card span {
  color: rgba(216, 230, 248, 0.78);
  line-height: 1.65;
}

.quality-process-card {
  display: grid;
  gap: 8px;
}

html[data-theme="day"] .quality-hero {
  border-color: rgba(36, 139, 150, 0.16);
  background:
    radial-gradient(circle at 18% 20%, rgba(40, 189, 172, 0.18), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(232, 248, 246, 0.68));
}

html[data-theme="day"] .quality-hero h2,
html[data-theme="day"] .quality-section h3,
html[data-theme="day"] .quality-process-card strong,
html[data-theme="day"] .quality-rule-summary b,
html[data-theme="day"] .quality-module-grid strong,
html[data-theme="day"] .quality-alerts strong,
html[data-theme="day"] .quality-proof-list strong {
  color: #143f46;
}

html[data-theme="day"] .quality-hero p,
html[data-theme="day"] .quality-section p,
html[data-theme="day"] .quality-module-grid p,
html[data-theme="day"] .quality-alerts span,
html[data-theme="day"] .quality-proof-list span,
html[data-theme="day"] .quality-process-card span,
html[data-theme="day"] .switch-field em {
  color: #557078;
}

html[data-theme="day"] .quality-hero .eyebrow,
html[data-theme="day"] .quality-rule-summary em,
html[data-theme="day"] .quality-module-grid span {
  color: #0f8781;
}

html[data-theme="day"] .quality-rule-summary span,
html[data-theme="day"] .quality-toolbar,
html[data-theme="day"] .quality-section,
html[data-theme="day"] .quality-process-card,
html[data-theme="day"] .quality-item-row,
html[data-theme="day"] .quality-module-grid article,
html[data-theme="day"] .quality-formula-grid article,
html[data-theme="day"] .quality-module-card,
html[data-theme="day"] .quality-evidence-preview,
html[data-theme="day"] .quality-evidence-suggestions,
html[data-theme="day"] .quality-evidence-suggestions article {
  border-color: rgba(36, 139, 150, 0.16);
  background: rgba(255, 255, 255, 0.66);
}

html[data-theme="day"] .quality-module-card:hover,
html[data-theme="day"] .quality-module-card.active {
  border-color: rgba(18, 139, 135, 0.38);
  box-shadow: 0 16px 36px rgba(45, 84, 92, 0.12), 0 0 0 3px rgba(18, 139, 135, 0.08);
}

html[data-theme="day"] .quality-module-card-head span,
html[data-theme="day"] .quality-evidence-preview strong,
html[data-theme="day"] .quality-evidence-suggestions > strong,
html[data-theme="day"] .quality-evidence-suggestions article b {
  color: #143f46;
}

html[data-theme="day"] .quality-module-card p,
html[data-theme="day"] .quality-module-card-foot small,
html[data-theme="day"] .quality-evidence-preview span,
html[data-theme="day"] .quality-evidence-preview small,
html[data-theme="day"] .quality-evidence-suggestions > span,
html[data-theme="day"] .quality-evidence-suggestions article em {
  color: #557078;
}

html[data-theme="day"] .quality-module-card-head strong,
html[data-theme="day"] .quality-evidence-suggestions article span {
  color: #0f8781;
}

html[data-theme="day"] .quality-module-card em {
  color: #9a6a11;
}

html[data-theme="day"] .quality-module-card-foot button,
html[data-theme="day"] .quality-evidence-suggestions article button {
  border-color: rgba(18, 139, 135, 0.2);
  background: rgba(224, 247, 244, 0.8);
  color: #0f7776;
}

html[data-theme="day"] .quality-formula-grid strong {
  color: #143f46;
}

html[data-theme="day"] .quality-formula-grid span {
  color: #557078;
}

html[data-theme="day"] .quality-item-row input,
html[data-theme="day"] .quality-item-row select {
  border-color: rgba(30, 125, 134, 0.2);
  background: rgba(248, 253, 252, 0.9);
  color: #173f47;
}

html[data-theme="day"] .quality-risk-grid label {
  border-color: rgba(214, 145, 44, 0.2);
  background: rgba(255, 245, 222, 0.66);
  color: #704d12;
}

html[data-theme="day"] .quality-alerts,
html[data-theme="day"] .quality-proof-list {
  background: rgba(255, 250, 235, 0.62);
}

@media (max-width: 760px) {
  .tool-backbar {
    grid-template-columns: 1fr;
  }

  .tools-subnav button {
    flex-basis: 100%;
  }

  .quality-score-grid,
  .quality-score-result {
    grid-template-columns: 1fr;
  }

  .quality-hero,
  .quality-toolbar,
  .quality-rule-summary,
  .quality-module-workbench,
  .quality-module-grid,
  .quality-formula-grid,
  .quality-evidence-grid,
  .quality-risk-grid {
    grid-template-columns: 1fr;
  }

  .quality-evidence-suggestions article {
    grid-template-columns: 1fr;
  }

  .quality-evidence-suggestions article em {
    grid-column: auto;
  }

  .quality-item-row {
    grid-template-columns: 1fr;
  }
}

/* Day theme contrast pass v27 */
html[data-theme="day"] .menu-btn,
html[data-theme="day"] .chevron {
  color: #28535c;
}

html[data-theme="day"] .brand-subtitle,
html[data-theme="day"] .nav-label,
html[data-theme="day"] .module-group-title span,
html[data-theme="day"] .module-card em,
html[data-theme="day"] .week-row,
html[data-theme="day"] .food-tile span,
html[data-theme="day"] .news-item time,
html[data-theme="day"] .notice-list time,
html[data-theme="day"] .site-footer {
  color: #536970;
}

html[data-theme="day"] .module-icon {
  border-color: rgba(22, 108, 120, 0.24);
  background: rgba(22, 108, 120, 0.1);
  color: #166c78;
}

html[data-theme="day"] .notice-list div,
html[data-theme="day"] .reserve-list div {
  color: #365860;
}

html[data-theme="day"] .reserve-list div {
  border-color: rgba(45, 112, 119, 0.17);
  background: rgba(235, 245, 244, 0.72);
}

html[data-theme="day"] .reserve-summary {
  border-color: rgba(35, 128, 130, 0.16);
  background: rgba(229, 244, 242, 0.76);
}

html[data-theme="day"] .ring {
  background: conic-gradient(#259e94 0 78%, rgba(58, 128, 137, 0.14) 78% 100%);
  box-shadow: 0 0 22px rgba(37, 158, 148, 0.14);
}

html[data-theme="day"] .ring::before {
  background: #f4fbf9;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

html[data-theme="day"] .ring-value strong {
  color: #17474b;
}

html[data-theme="day"] .ring-value span,
html[data-theme="day"] .reserve-summary-copy span {
  color: #52777b;
}

html[data-theme="day"] .reserve-summary-copy strong {
  color: #247357;
}

html[data-theme="day"] .reserve-summary-copy small {
  color: #71878c;
}

html[data-theme="day"] .reserve-list time {
  color: #66858a;
}

html[data-theme="day"] .reserve-list b {
  color: #17353d;
}

html[data-theme="day"] .reserve-list em {
  background: rgba(30, 145, 102, 0.11);
  color: #286b53;
}

html[data-theme="day"] .reserve-list .warn,
html[data-theme="day"] .food-tile b {
  background: rgba(154, 91, 0, 0.1);
  color: #925700;
}

html[data-theme="day"] .section-title button,
html[data-theme="day"] .card-actions button {
  color: #285d67;
}

html[data-theme="day"] .card-actions .pay-entry {
  border-color: rgba(30, 111, 118, 0.24);
  background: rgba(218, 239, 237, 0.82);
  color: #245861;
}

html[data-theme="day"] .card-actions .pay-entry:first-child,
html[data-theme="day"] .card-actions .pay-entry:nth-child(2) {
  background: rgba(218, 239, 237, 0.82);
}

html[data-theme="day"] .student-card {
  border-color: rgba(29, 135, 135, 0.26);
  background:
    linear-gradient(118deg, rgba(218, 245, 240, 0.96), rgba(204, 235, 241, 0.92)),
    url("/assets/campus-card-youth-v1.png") center / cover;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 16px 32px rgba(55, 112, 117, 0.16);
}

html[data-theme="day"] .student-card::before {
  border-color: rgba(18, 137, 127, 0.1);
}

html[data-theme="day"] .student-card::after {
  background: linear-gradient(105deg, transparent 54%, rgba(255, 255, 255, 0.28));
}

html[data-theme="day"] .student-card-top > span,
html[data-theme="day"] .student-card-person strong,
html[data-theme="day"] .student-card-balance b {
  color: #17474b;
}

html[data-theme="day"] .student-card-person p,
html[data-theme="day"] .student-card-status > span,
html[data-theme="day"] .student-card-balance small,
html[data-theme="day"] .student-card-balance p span {
  color: #52777b;
}

html[data-theme="day"] .student-card-top em {
  border-color: rgba(24, 126, 126, 0.2);
  background: rgba(255, 255, 255, 0.54);
  color: #21696b;
}

html[data-theme="day"] .student-card-status {
  border-top-color: rgba(24, 126, 126, 0.16);
}

html[data-theme="day"] .student-card-status i {
  border-color: rgba(22, 143, 111, 0.2);
  background: rgba(206, 241, 227, 0.72);
  color: #247357;
}

html[data-theme="day"] .card-actions button {
  border-color: rgba(49, 110, 118, 0.16);
  background: rgba(240, 248, 247, 0.7);
  color: #365f66;
}

html[data-theme="day"] .card-actions .pay-entry:first-child {
  border-color: rgba(30, 145, 102, 0.2);
  background: rgba(220, 243, 232, 0.88);
  color: #286b53;
}

html[data-theme="day"] .card-actions .pay-entry:nth-child(2) {
  border-color: rgba(41, 126, 172, 0.2);
  background: rgba(222, 239, 248, 0.9);
  color: #316781;
}

html[data-theme="day"] .theme-toggle-icon {
  color: #9b6200;
}

/* Mobile layout v25: compact navigation, touch-first controls and readable cards. */
@media (max-width: 760px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    background:
      radial-gradient(circle at 90% 4%, rgba(48, 83, 255, 0.16), transparent 30%),
      #060d1d;
  }

  .shell {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    height: auto;
    gap: 8px;
    padding: 8px 10px 7px;
    overflow: hidden;
    border-right: 0;
    border-bottom: 1px solid rgba(99, 134, 255, 0.22);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.24);
  }

  .brand {
    min-height: 38px;
    gap: 8px;
    padding: 0 2px;
  }

  .brand img {
    width: 34px;
    height: 34px;
  }

  .brand-title {
    font-size: 17px;
  }

  .brand-subtitle {
    display: none;
  }

  .nav {
    display: flex;
    gap: 7px;
    width: 100%;
    padding: 0 0 3px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar,
  .exam-filters::-webkit-scrollbar,
  .tools-subnav::-webkit-scrollbar {
    display: none;
  }

  .nav-section {
    display: contents;
  }

  .nav-label {
    display: none;
  }

  .nav button {
    flex: 0 0 auto;
    width: auto;
    min-width: 92px;
    min-height: 42px;
    justify-content: center;
    gap: 7px;
    padding: 8px 10px;
    white-space: nowrap;
    font-size: 13px;
  }

  .nav-icon {
    width: 20px;
    height: 20px;
    border: 0;
    font-size: 11px;
  }

  .sidebar-card {
    display: none;
  }

  .main {
    width: 100%;
    min-width: 0;
    padding: 10px 10px 24px;
  }

  .topbar {
    height: auto;
    min-height: 42px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
  }

  .top-left {
    min-width: 0;
  }

  .menu-btn {
    display: none;
  }

  .page-title {
    overflow: hidden;
    font-size: 18px;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .top-actions {
    width: auto;
    gap: 8px;
  }

  .top-actions .search-box {
    display: none;
  }

  .bell-btn {
    width: 38px;
    height: 38px;
  }

  .user-chip {
    min-width: 0;
    padding: 4px;
    border-radius: 50%;
  }

  .user-chip-copy,
  .user-chip .chevron {
    display: none;
  }

  .avatar {
    width: 34px;
    height: 34px;
  }

  .dash-card,
  .card,
  .module-card,
  .tool-panel,
  .engine-card {
    border-radius: 10px;
  }

  .dashboard-grid,
  .grid.cols-2,
  .grid.cols-3,
  .reserve-layout,
  .food-list,
  .module-grid,
  .news-list-grid,
  .news-source-grid,
  .news-import-form,
  .library-layout,
  .ai-page,
  .tools-grid,
  .engine-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-hero {
    min-height: 260px;
    padding: 22px 16px;
  }

  .hero-copy h2,
  .exam-hero h2,
  .library-hero h2,
  .tools-hero h2 {
    font-size: 24px;
    line-height: 1.25;
  }

  .hero-copy p,
  .exam-hero p:not(.exam-kicker),
  .library-hero p:not(.exam-kicker) {
    font-size: 13px;
    line-height: 1.7;
  }

  .app-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
  }

  .exam-page {
    gap: 10px;
  }

  .exam-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 18px 15px;
  }

  .exam-hero .primary-btn {
    width: 100%;
    min-height: 44px;
  }

  .source-meta {
    display: flex;
    flex-wrap: nowrap;
    gap: 7px;
    margin-inline: -2px;
    padding-bottom: 3px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .source-meta span {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .exam-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .exam-search,
  .exam-sort select {
    min-height: 44px;
  }

  .exam-filters {
    flex-wrap: nowrap;
    width: calc(100% + 12px);
    margin-right: -12px;
    padding-right: 12px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .exam-filter {
    flex: 0 0 auto;
    height: 38px;
    padding: 0 13px;
  }

  .exam-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .exam-card {
    min-height: 0;
    gap: 11px;
    padding: 14px;
  }

  .exam-card-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .exam-card h3 {
    margin-top: 8px;
    font-size: 17px;
  }

  .exam-meta-row {
    gap: 6px;
  }

  .exam-meta-row span {
    padding: 5px 7px;
    font-size: 10px;
  }

  .exam-timeline {
    gap: 7px;
  }

  .exam-timeline div {
    padding: 9px 10px 9px 13px;
  }

  .exam-timeline strong {
    font-size: 12px;
  }

  .exam-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .exam-actions a {
    min-width: 0;
    min-height: 42px;
    padding: 7px 5px;
    text-align: center;
  }

  .library-floor-tabs,
  .tools-hero-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tools-subnav {
    flex-wrap: nowrap;
    margin: 10px -10px 12px;
    padding: 0 10px 3px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .tools-subnav button {
    flex: 0 0 150px;
    min-height: 44px;
  }

  .tool-backbar {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .tool-detail-grid .tool-panel {
    min-height: 0;
  }

  .timetable-edit-card,
  .timetable-import-card,
  .ai-config-card {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    overflow-y: auto;
  }

  .modal-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .field-pair,
  .timetable-control-grid,
  .import-action-row {
    grid-template-columns: 1fr;
  }

  .timetable-image-head {
    flex-direction: column;
  }

  .timetable-image-frame {
    max-height: 420px;
  }

  .timetable-studio {
    gap: 14px;
  }

  .timetable-studio-copy {
    min-height: auto;
  }

  .timetable-toolbar {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .timetable-grid {
    grid-template-columns: 48px repeat(7, minmax(38px, 1fr));
    grid-template-rows: 44px repeat(12, 38px);
  }

  .timetable-course-card strong {
    font-size: 11px;
  }

  table {
    min-width: 680px;
  }

  .table-wrap,
  .timetable-board,
  .library-map {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }
}

@media (max-width: 420px) {
  .main {
    padding-inline: 8px;
  }

  .sidebar {
    padding-inline: 8px;
  }

  .nav button {
    min-width: 86px;
    padding-inline: 8px;
  }

  .exam-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .exam-actions a {
    width: 100%;
  }

  .app-grid,
  .library-floor-tabs,
  .tools-hero-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Day / night theme v26. Night keeps the established dark visual system. */
.theme-toggle {
  min-width: 92px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid rgba(101, 139, 255, 0.3);
  border-radius: 9px;
  background: rgba(19, 32, 68, 0.8);
  color: #e9f1ff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.theme-toggle-icon {
  display: grid;
  place-items: center;
  color: #ffd66b;
  font-size: 17px;
  line-height: 1;
}

html[data-theme="day"] {
  color-scheme: light;
  --bg: #edf5f5;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-2: rgba(244, 249, 250, 0.94);
  --line: rgba(42, 102, 119, 0.18);
  --line-bright: rgba(15, 118, 110, 0.7);
  --text: #15313a;
  --muted: #667b82;
  --blue: #246f9b;
  --cyan: #0f9f92;
  --violet: #6f6ba8;
  --pink: #c45f81;
  --warning: #d79a35;
  --shadow: 0 18px 48px rgba(45, 84, 92, 0.14);
}

html[data-theme="day"] body {
  background:
    radial-gradient(circle at 82% 7%, rgba(93, 176, 192, 0.18), transparent 28%),
    radial-gradient(circle at 8% 16%, rgba(239, 190, 92, 0.15), transparent 25%),
    linear-gradient(rgba(66, 118, 126, 0.045) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(90deg, rgba(66, 118, 126, 0.045) 1px, transparent 1px) 0 0 / 42px 42px,
    #edf5f5;
  color: var(--text);
}

html[data-theme="day"] body::before,
html[data-theme="day"] body::after {
  display: none;
}

html[data-theme="day"] .sidebar {
  background: linear-gradient(180deg, rgba(250, 253, 252, 0.98), rgba(237, 247, 245, 0.96));
  border-right-color: rgba(49, 117, 120, 0.15);
  box-shadow: 10px 0 38px rgba(55, 94, 96, 0.1);
}

html[data-theme="day"] .brand-title,
html[data-theme="day"] .page-title,
html[data-theme="day"] .section-title,
html[data-theme="day"] .section-title span,
html[data-theme="day"] .card h2,
html[data-theme="day"] .dash-card h2,
html[data-theme="day"] .row-title,
html[data-theme="day"] .course-item strong,
html[data-theme="day"] .module-card strong,
html[data-theme="day"] .exam-card h3,
html[data-theme="day"] .tool-backbar h2 {
  color: #17353d;
}

html[data-theme="day"] .brand-subtitle,
html[data-theme="day"] .muted,
html[data-theme="day"] .row-meta,
html[data-theme="day"] .course-item span,
html[data-theme="day"] .module-card em,
html[data-theme="day"] .exam-source,
html[data-theme="day"] .exam-risk,
html[data-theme="day"] .tool-backbar p {
  color: #6a7f85;
}

html[data-theme="day"] .nav button {
  color: #456169;
}

html[data-theme="day"] .nav-icon {
  color: #277b82;
  border-color: rgba(39, 123, 130, 0.2);
}

html[data-theme="day"] .nav button.active,
html[data-theme="day"] .nav button:hover {
  border-color: rgba(24, 135, 126, 0.48);
  background: linear-gradient(135deg, #168f88, #297aa0);
  box-shadow: 0 12px 26px rgba(27, 118, 119, 0.2);
  color: #ffffff;
}

html[data-theme="day"] .nav button.active .nav-icon,
html[data-theme="day"] .nav button:hover .nav-icon {
  color: #ffffff;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.ghost-btn.danger {
  border-color: rgba(255, 109, 130, 0.34);
  background: rgba(255, 109, 130, 0.1);
  color: #ff9cab;
}

.ghost-btn.danger:hover {
  border-color: rgba(255, 109, 130, 0.58);
  background: rgba(255, 109, 130, 0.18);
  color: #ffffff;
}

.lab-approval-row {
  align-items: center;
}

.lab-approval-page {
  display: grid;
  gap: 18px;
  padding: clamp(18px, 2.4vw, 28px);
}

.lab-approval-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(126, 176, 255, 0.18);
}

.lab-approval-heading h2 {
  margin: 7px 0 6px;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: 0;
}

.lab-approval-heading .eyebrow {
  color: #63dbe2;
  font-weight: 800;
}

.lab-approval-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.lab-approval-filter {
  display: grid;
  gap: 3px;
  min-height: 82px;
  padding: 14px 16px;
  border: 1px solid rgba(126, 176, 255, 0.2);
  border-radius: 8px;
  background: rgba(20, 47, 91, 0.48);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.lab-approval-filter:hover,
.lab-approval-filter.active {
  transform: translateY(-2px);
  border-color: rgba(76, 218, 222, 0.62);
  background: linear-gradient(135deg, rgba(25, 151, 155, 0.34), rgba(65, 94, 213, 0.3));
}

.lab-approval-filter strong {
  font-size: 26px;
}

.lab-approval-filter span {
  color: var(--muted);
}

.lab-approval-list {
  gap: 10px;
}

.lab-approval-row[hidden] {
  display: none;
}

html[data-theme="day"] .lab-approval-heading {
  border-bottom-color: rgba(31, 125, 135, 0.16);
}

html[data-theme="day"] .lab-approval-heading .eyebrow {
  color: #087d82;
}

html[data-theme="day"] .lab-approval-filter {
  border-color: rgba(31, 125, 135, 0.18);
  background: rgba(245, 253, 253, 0.76);
  color: #173f47;
}

html[data-theme="day"] .lab-approval-filter:hover,
html[data-theme="day"] .lab-approval-filter.active {
  border-color: rgba(22, 143, 136, 0.46);
  background: linear-gradient(135deg, rgba(194, 241, 237, 0.9), rgba(211, 228, 255, 0.88));
}

@media (max-width: 760px) {
  .lab-approval-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .lab-approval-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lab-approval-row {
    align-items: stretch;
  }

  .lab-approval-row .row-actions {
    justify-content: stretch;
  }

  .lab-approval-row .row-actions button {
    flex: 1;
  }
}

html[data-theme="day"] .ghost-btn.danger {
  border-color: rgba(201, 65, 87, 0.28);
  background: rgba(255, 235, 238, 0.88);
  color: #a73b4f;
}

/* Global polished form controls v97 */
:where(select, textarea, input[type="text"], input[type="tel"], input[type="password"], input[type="number"], input[type="search"], input[type="date"], input[type="time"], input[type="email"]) {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(123, 174, 255, 0.22);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035)),
    rgba(13, 28, 58, 0.72);
  color: #f7fbff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 28px rgba(0, 0, 0, 0.12);
  font: inherit;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}

:where(input[type="text"], input[type="tel"], input[type="password"], input[type="number"], input[type="search"], input[type="date"], input[type="time"], input[type="email"], textarea) {
  padding: 10px 13px;
}

:where(select) {
  appearance: none;
  -webkit-appearance: none;
  padding: 10px 44px 10px 13px;
  cursor: pointer;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(170, 229, 255, 0.94) 50%),
    linear-gradient(135deg, rgba(170, 229, 255, 0.94) 50%, transparent 50%),
    linear-gradient(180deg, rgba(60, 120, 210, 0.22), rgba(36, 197, 214, 0.12));
  background-position:
    calc(100% - 22px) 50%,
    calc(100% - 16px) 50%,
    100% 0;
  background-size:
    7px 7px,
    7px 7px,
    42px 100%;
  background-repeat: no-repeat;
}

:where(select:hover, textarea:hover, input[type="text"]:hover, input[type="tel"]:hover, input[type="password"]:hover, input[type="number"]:hover, input[type="search"]:hover, input[type="date"]:hover, input[type="time"]:hover, input[type="email"]:hover) {
  border-color: rgba(111, 223, 238, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 14px 30px rgba(23, 165, 198, 0.14);
}

:where(select:focus, textarea:focus, input[type="text"]:focus, input[type="tel"]:focus, input[type="password"]:focus, input[type="number"]:focus, input[type="search"]:focus, input[type="date"]:focus, input[type="time"]:focus, input[type="email"]:focus) {
  outline: none;
  border-color: rgba(103, 225, 243, 0.82);
  box-shadow:
    0 0 0 3px rgba(64, 201, 236, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 18px 40px rgba(21, 160, 205, 0.18);
}

:where(select:disabled, textarea:disabled, input:disabled) {
  cursor: not-allowed;
  opacity: 0.62;
}

:where(select option) {
  background: #10213f;
  color: #f7fbff;
}

:where(input[type="date"], input[type="time"]) {
  color-scheme: dark;
}

:where(input::placeholder, textarea::placeholder) {
  color: rgba(214, 230, 244, 0.55);
}

input[type="file"] {
  width: 100%;
  min-height: 42px;
  padding: 8px;
  border: 1px dashed rgba(104, 210, 230, 0.32);
  border-radius: 12px;
  background: rgba(12, 27, 55, 0.68);
  color: rgba(236, 247, 255, 0.86);
  font: inherit;
}

input[type="file"]::file-selector-button {
  min-height: 30px;
  margin-right: 10px;
  border: 0;
  border-radius: 9px;
  padding: 0 13px;
  background: linear-gradient(135deg, #25bce0, #5269f6);
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

html[data-theme="day"] :where(select, textarea, input[type="text"], input[type="tel"], input[type="password"], input[type="number"], input[type="search"], input[type="date"], input[type="time"], input[type="email"]) {
  border-color: rgba(44, 126, 139, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 251, 251, 0.82)),
    rgba(255, 255, 255, 0.9);
  color: #173c43;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 12px 26px rgba(43, 103, 113, 0.1);
}

html[data-theme="day"] :where(select) {
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(24, 104, 120, 0.9) 50%),
    linear-gradient(135deg, rgba(24, 104, 120, 0.9) 50%, transparent 50%),
    linear-gradient(180deg, rgba(30, 163, 155, 0.14), rgba(57, 124, 218, 0.08));
}

html[data-theme="day"] :where(select:hover, textarea:hover, input[type="text"]:hover, input[type="tel"]:hover, input[type="password"]:hover, input[type="number"]:hover, input[type="search"]:hover, input[type="date"]:hover, input[type="time"]:hover, input[type="email"]:hover) {
  border-color: rgba(32, 151, 161, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 14px 30px rgba(38, 132, 143, 0.14);
}

html[data-theme="day"] :where(select:focus, textarea:focus, input[type="text"]:focus, input[type="tel"]:focus, input[type="password"]:focus, input[type="number"]:focus, input[type="search"]:focus, input[type="date"]:focus, input[type="time"]:focus, input[type="email"]:focus) {
  border-color: rgba(18, 145, 165, 0.72);
  box-shadow:
    0 0 0 3px rgba(29, 173, 189, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.7) inset,
    0 18px 40px rgba(34, 130, 144, 0.16);
}

html[data-theme="day"] :where(select option) {
  background: #f4fbfb;
  color: #173c43;
}

html[data-theme="day"] :where(input[type="date"], input[type="time"]) {
  color-scheme: light;
}

html[data-theme="day"] :where(input::placeholder, textarea::placeholder) {
  color: rgba(75, 105, 112, 0.58);
}

html[data-theme="day"] input[type="file"] {
  border-color: rgba(32, 146, 154, 0.26);
  background: rgba(255, 255, 255, 0.86);
  color: #315a62;
}

/* Global atmospheric glass pass v95 */
body {
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 82% 9%, rgba(66, 109, 255, 0.26), transparent 30%),
    radial-gradient(circle at 8% 18%, rgba(50, 215, 255, 0.18), transparent 31%),
    radial-gradient(circle at 54% 92%, rgba(138, 92, 255, 0.16), transparent 34%),
    linear-gradient(rgba(95, 130, 255, 0.055) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(90deg, rgba(95, 130, 255, 0.045) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(135deg, #071022 0%, #07172c 46%, #08111f 100%);
}

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

body::before {
  background:
    radial-gradient(circle at 22% 8%, rgba(255, 255, 255, 0.08), transparent 18%),
    radial-gradient(circle at 68% 24%, rgba(91, 217, 232, 0.12), transparent 22%),
    radial-gradient(circle at 35% 76%, rgba(138, 92, 255, 0.1), transparent 24%);
  filter: blur(10px);
  opacity: 0.9;
}

body::after {
  background:
    linear-gradient(115deg, transparent 0 18%, rgba(255, 255, 255, 0.045) 19%, transparent 31% 100%),
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.08), transparent 48%);
  mix-blend-mode: screen;
  opacity: 0.5;
}

.shell {
  position: relative;
  isolation: isolate;
}

.sidebar,
.topbar,
.dash-card,
.card,
.module-card,
.tool-panel,
.engine-card,
.software-card,
.software-category-nav,
.software-toolbar,
.student-list-card,
.login-form,
.theme-toggle,
.bell-btn,
.user-chip,
.search-box,
.modal > div,
.timetable-edit-card,
.ai-config-card,
.required-password-card {
  backdrop-filter: blur(18px) saturate(1.18);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(9, 18, 38, 0.84), rgba(9, 18, 38, 0.7)),
    radial-gradient(circle at 20% 0%, rgba(74, 117, 255, 0.18), transparent 38%);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 54px;
  padding: 5px 0;
  border-radius: 0 0 12px 12px;
  background: linear-gradient(180deg, rgba(7, 16, 34, 0.76), rgba(7, 16, 34, 0.42));
}

.dash-card,
.card,
.module-card,
.tool-panel,
.engine-card,
.software-card,
.student-list-card {
  border-color: rgba(154, 181, 255, 0.22);
  background:
    linear-gradient(145deg, rgba(20, 39, 76, 0.76), rgba(10, 22, 48, 0.62)),
    radial-gradient(circle at 100% 0%, rgba(91, 217, 232, 0.09), transparent 34%);
  box-shadow:
    0 24px 74px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(255, 255, 255, 0.03);
}

.search-box,
.bell-btn,
.user-chip,
.theme-toggle {
  border-color: rgba(162, 188, 255, 0.24);
  background: rgba(18, 33, 64, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 14px 32px rgba(0, 0, 0, 0.14);
}

.dash-card:hover,
.card:hover,
.module-card:hover,
.tool-panel:hover,
.engine-card:hover,
.software-card:hover {
  border-color: rgba(114, 211, 255, 0.38);
  box-shadow:
    0 26px 80px rgba(12, 42, 120, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

html[data-theme="day"] body {
  background:
    radial-gradient(circle at 84% 8%, rgba(95, 184, 202, 0.28), transparent 32%),
    radial-gradient(circle at 8% 18%, rgba(255, 199, 98, 0.2), transparent 28%),
    radial-gradient(circle at 52% 92%, rgba(112, 160, 255, 0.16), transparent 34%),
    linear-gradient(rgba(66, 118, 126, 0.052) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(90deg, rgba(66, 118, 126, 0.048) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(135deg, #edf7f6 0%, #f7fbff 48%, #eaf5f2 100%);
}

html[data-theme="day"] body::before,
html[data-theme="day"] body::after {
  display: block;
}

html[data-theme="day"] body::before {
  background:
    radial-gradient(circle at 20% 8%, rgba(255, 255, 255, 0.7), transparent 20%),
    radial-gradient(circle at 70% 28%, rgba(79, 179, 191, 0.17), transparent 23%),
    radial-gradient(circle at 30% 78%, rgba(255, 185, 83, 0.12), transparent 22%);
  filter: blur(12px);
  opacity: 0.82;
}

html[data-theme="day"] body::after {
  background:
    linear-gradient(115deg, transparent 0 17%, rgba(255, 255, 255, 0.46) 18%, transparent 31% 100%),
    radial-gradient(circle at 54% 0%, rgba(255, 255, 255, 0.46), transparent 50%);
  mix-blend-mode: normal;
  opacity: 0.42;
}

html[data-theme="day"] .sidebar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(239, 248, 246, 0.58)),
    radial-gradient(circle at 20% 0%, rgba(84, 180, 191, 0.16), transparent 38%);
}

html[data-theme="day"] .topbar {
  background: linear-gradient(180deg, rgba(237, 247, 246, 0.82), rgba(237, 247, 246, 0.42));
}

html[data-theme="day"] .dash-card,
html[data-theme="day"] .card,
html[data-theme="day"] .module-card,
html[data-theme="day"] .tool-panel,
html[data-theme="day"] .engine-card,
html[data-theme="day"] .software-card,
html[data-theme="day"] .student-list-card {
  border-color: rgba(48, 112, 119, 0.18);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(245, 252, 251, 0.58)),
    radial-gradient(circle at 100% 0%, rgba(87, 194, 196, 0.11), transparent 34%);
  box-shadow:
    0 20px 52px rgba(45, 84, 92, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    inset 0 -1px 0 rgba(36, 119, 127, 0.04);
}

html[data-theme="day"] .search-box,
html[data-theme="day"] .bell-btn,
html[data-theme="day"] .user-chip,
html[data-theme="day"] .theme-toggle {
  border-color: rgba(49, 110, 118, 0.2);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 14px 32px rgba(45, 84, 92, 0.08);
}

/* Notification bell is allowed to animate even in fast-mode UI. */
.shell .topbar .bell-btn .bell-icon {
  animation: bellRing 3.8s ease-in-out infinite !important;
}

.shell .topbar .bell-btn:hover .bell-icon,
.shell .topbar .bell-btn.active .bell-icon {
  animation: bellRing 1.05s ease-in-out infinite !important;
}

.shell .topbar .bell-btn .bell-count {
  animation: bellBadgeBounce 3.8s ease-in-out infinite !important;
}

@keyframes bellBadgeBounce {
  0%, 70%, 100% {
    transform: scale(1);
  }
  76% {
    transform: scale(1.16);
  }
  84% {
    transform: scale(0.94);
  }
  92% {
    transform: scale(1.06);
  }
}

/* MySQL student identity library v57 */
.ai-admin-page {
  display: grid;
  gap: 18px;
}

.ai-admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 20%, rgba(91, 217, 232, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(42, 139, 255, 0.16), rgba(127, 91, 255, 0.12)),
    var(--card);
}

.ai-admin-hero h2 {
  margin: 8px 0;
  font-size: clamp(24px, 3.2vw, 42px);
  letter-spacing: 0;
}

.ai-admin-hero p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.ai-admin-status {
  min-width: 250px;
  display: grid;
  gap: 7px;
  padding: 18px;
  border: 1px solid rgba(255, 184, 77, 0.3);
  border-radius: 8px;
  background: rgba(255, 184, 77, 0.08);
}

.ai-admin-status.ready {
  border-color: rgba(91, 217, 232, 0.38);
  background: rgba(91, 217, 232, 0.1);
}

.ai-admin-status span,
.ai-admin-status small {
  color: var(--muted);
  font-size: 12px;
}

.ai-admin-status strong {
  color: var(--text);
  font-size: 20px;
}

.ai-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.ai-admin-form textarea {
  min-height: 128px;
  resize: vertical;
}

.ai-admin-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.ai-provider-presets {
  display: grid;
  gap: 12px;
}

.ai-provider-presets button {
  display: grid;
  gap: 5px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel), transparent 10%);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.ai-provider-presets button:hover {
  transform: translateY(-2px);
  border-color: rgba(91, 217, 232, 0.52);
  background: rgba(91, 217, 232, 0.12);
}

.ai-provider-presets strong {
  font-size: 16px;
}

.ai-provider-presets span,
.ai-admin-note p {
  color: var(--muted);
  line-height: 1.7;
}

.ai-admin-note {
  margin-top: 16px;
  padding: 16px;
  border-radius: 8px;
  background: rgba(56, 128, 255, 0.08);
}

html[data-theme="day"] .ai-admin-status.ready {
  background: rgba(15, 160, 160, 0.1);
}

.student-admin-page {
  display: grid;
  gap: 18px;
}

.student-admin-toolbar,
.student-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.student-admin-toolbar h2 {
  margin: 7px 0 8px;
  font-size: 25px;
}

.student-admin-toolbar p,
.student-list-head p {
  margin: 0;
  color: var(--muted);
}

.admin-kicker {
  color: #5bd9e8;
  font-size: 11px;
  font-weight: 900;
}

.student-admin-toolbar form {
  width: min(360px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}

.admin-current-role {
  min-width: 190px;
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border: 1px solid rgba(91, 217, 232, 0.24);
  border-radius: 7px;
  background: rgba(45, 112, 160, 0.08);
}

.admin-current-role span,
.admin-current-role small {
  color: var(--muted);
  font-size: 11px;
}

.admin-current-role strong {
  color: #79e0ea;
}

.student-role-select {
  min-width: 112px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
}

html[data-theme="day"] .admin-current-role strong {
  color: #167a78;
}

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

.admin-stat-grid .card {
  min-height: 116px;
  display: grid;
  align-content: center;
  gap: 7px;
}

.admin-stat-grid span,
.admin-stat-grid small {
  color: var(--muted);
}

.admin-stat-grid strong {
  font-size: 23px;
}

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

.student-entry-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.student-entry-form .primary-btn {
  grid-column: 1 / -1;
}

.admin-import-guide {
  min-height: 120px;
  margin-bottom: 16px;
  padding: 18px;
  border: 1px dashed rgba(91, 217, 232, 0.28);
  border-radius: 7px;
  background: rgba(45, 112, 160, 0.08);
}

.admin-import-guide p {
  margin-top: 0;
  color: var(--muted);
}

.admin-import-guide code {
  color: #79e0ea;
  white-space: normal;
}

.admin-template-example {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--accent) 9%, var(--card));
}

.admin-template-example-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-template-example-copy span {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.admin-template-download {
  text-decoration: none;
  white-space: nowrap;
}

.admin-import-result,
.admin-alert {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.student-list-head {
  margin-bottom: 18px;
}

.student-role-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
  overflow-x: auto;
  scrollbar-width: none;
}

.student-role-filters button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.student-role-filters button.active {
  border-color: rgba(91, 217, 232, 0.54);
  background: rgba(49, 129, 180, 0.2);
  color: #8feaf2;
}

.student-role-filters button span {
  margin-left: 4px;
  color: inherit;
}

html[data-theme="day"] .student-role-filters button.active {
  border-color: rgba(22, 143, 136, 0.42);
  background: rgba(22, 143, 136, 0.1);
  color: #167a78;
}

.student-list-head form {
  display: flex;
  gap: 8px;
}

.student-list-head input {
  min-width: 280px;
}

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

.student-table th,
.student-table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.student-table th {
  color: var(--muted);
  font-size: 11px;
}

.student-table td {
  font-size: 12px;
}

.student-table td strong,
.student-table td small {
  display: block;
}

.student-table td small {
  margin-top: 5px;
  color: var(--muted);
}

html[data-theme="day"] .admin-kicker,
html[data-theme="day"] .admin-import-guide code {
  color: #167a78;
}

@media (max-width: 900px) {
  .student-admin-toolbar,
  .student-list-head {
    align-items: stretch;
    flex-direction: column;
  }

  .student-admin-toolbar form,
  .student-list-head form {
    width: 100%;
  }

  .student-list-head input {
    min-width: 0;
    flex: 1;
  }

  .admin-stat-grid,
  .admin-work-grid,
  .ai-admin-grid {
    grid-template-columns: 1fr;
  }

  .ai-admin-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .ai-admin-status {
    min-width: 0;
  }

  .ai-admin-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .admin-template-example {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-template-download {
    width: 100%;
    text-align: center;
  }

  .student-admin-toolbar form,
  .student-entry-form {
    grid-template-columns: 1fr;
  }

  .student-entry-form .primary-btn {
    grid-column: auto;
  }
}

/* Independent youth scene themes v50 */
.youth-intro { --scene: url("/assets/youth-summer.png"); min-height: 100svh; overflow-x: hidden; background: #10251e; color: #fff; }
.youth-theme-spring { --scene: url("/assets/youth-spring.png"); }
.youth-theme-summer { --scene: url("/assets/youth-summer.png"); }
.youth-theme-autumn { --scene: url("/assets/youth-autumn.png"); }
.youth-theme-winter { --scene: url("/assets/youth-winter.png"); }
.youth-theme-sunset { --scene: url("/assets/youth-sunset.png"); }
.youth-theme-starry { --scene: url("/assets/youth-starry.png"); }
.youth-hero { position: relative; isolation: isolate; min-height: 100svh; overflow: hidden; }
.youth-scene, .youth-vignette, .youth-atmosphere { position: absolute; inset: 0; }
.youth-scene { z-index: -4; background: var(--scene) center / cover no-repeat; animation: youth-scene-in 1.4s ease both, youth-scene-breathe 18s 1.4s ease-in-out infinite alternate; will-change: transform; }
.youth-vignette { z-index: -3; background: linear-gradient(90deg, rgba(3,17,18,.82), rgba(3,17,18,.42) 43%, transparent 76%), linear-gradient(180deg, rgba(3,13,18,.42), transparent 50%, rgba(3,13,18,.64)); }
.youth-theme-spring .youth-vignette { background: linear-gradient(90deg, rgba(44,25,39,.72), rgba(44,25,39,.3) 45%, transparent 76%), linear-gradient(180deg, rgba(26,13,23,.35), transparent 65%, rgba(35,20,30,.55)); }
.youth-theme-winter .youth-vignette, .youth-theme-starry .youth-vignette { background: linear-gradient(90deg, rgba(6,14,37,.82), rgba(6,14,37,.38) 46%, transparent 76%), linear-gradient(180deg, rgba(3,8,28,.45), transparent 60%, rgba(3,8,28,.72)); }
.youth-theme-sunset .youth-vignette { background: linear-gradient(90deg, rgba(48,19,30,.79), rgba(48,19,30,.32) 46%, transparent 76%), linear-gradient(180deg, rgba(34,13,26,.35), transparent 62%, rgba(35,15,28,.68)); }
.youth-atmosphere { z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.youth-motion-layers { position: absolute; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.youth-cloud { position: absolute; width: 280px; height: 64px; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(255,255,255,.28), transparent 70%); filter: blur(9px); opacity: 0; }
.youth-theme-spring .youth-cloud, .youth-theme-summer .youth-cloud, .youth-theme-sunset .youth-cloud { opacity: .72; }
.cloud-one { top: 16%; left: -300px; animation: youth-cloud-drift 38s linear infinite; }
.cloud-two { top: 28%; left: -360px; width: 380px; animation: youth-cloud-drift 52s 11s linear infinite; }
.youth-wind { position: absolute; left: -30%; width: 34%; height: 1px; border-radius: 50%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.42), transparent); opacity: 0; transform: rotate(-9deg); }
.youth-theme-spring .youth-wind, .youth-theme-summer .youth-wind, .youth-theme-autumn .youth-wind, .youth-theme-sunset .youth-wind { opacity: .55; }
.wind-one { top: 34%; animation: youth-wind-run 6.5s linear infinite; }.wind-two { top: 48%; animation: youth-wind-run 8s 2s linear infinite; }.wind-three { top: 63%; animation: youth-wind-run 7s 4.2s linear infinite; }
.youth-birds { position: absolute; top: 21%; right: 28%; display: flex; gap: 14px; opacity: 0; animation: youth-birds-fly 14s ease-in-out infinite; }
.youth-theme-spring .youth-birds, .youth-theme-summer .youth-birds, .youth-theme-sunset .youth-birds { opacity: .55; }
.youth-birds i { width: 13px; height: 7px; border-top: 1.5px solid rgba(255,255,255,.8); border-radius: 50%; transform: rotate(12deg); animation: youth-bird-wing .75s ease-in-out infinite alternate; }
.youth-birds i:nth-child(2) { animation-delay: -.2s; }.youth-birds i:nth-child(3) { animation-delay: -.4s; }
.youth-shooting-stars { position: absolute; inset: 0; opacity: 0; }
.youth-theme-starry .youth-shooting-stars { opacity: 1; }
.youth-shooting-stars i { position: absolute; top: var(--top); left: 76%; width: 130px; height: 1px; background: linear-gradient(90deg, rgba(255,255,255,.95), transparent); box-shadow: 0 0 10px rgba(184,200,255,.8); opacity: 0; transform: rotate(-28deg); animation: youth-shooting 8s var(--delay) ease-in infinite; }
.youth-foreground { position: absolute; right: -5%; bottom: -5%; left: -5%; height: 20%; background: radial-gradient(ellipse at 48% 100%, color-mix(in srgb, var(--youth-accent), transparent 68%), transparent 64%); transform-origin: bottom center; animation: youth-grass-sway 4.5s ease-in-out infinite alternate; opacity: .35; }
.youth-nav { position: absolute; top: 22px; left: 50%; z-index: 10; width: min(1360px, calc(100% - 42px)); min-height: 66px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding: 8px 10px 8px 15px; border: 1px solid rgba(255,255,255,.25); border-radius: 8px; background: rgba(8,22,23,.32); box-shadow: 0 16px 46px rgba(2,10,15,.16); backdrop-filter: blur(20px) saturate(1.2); transform: translateX(-50%); }
.youth-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.youth-brand img { width: 43px; height: 43px; border-radius: 50%; box-shadow: 0 5px 20px rgba(255,255,255,.2); }
.youth-brand span { display: grid; gap: 2px; }
.youth-brand strong { font-size: 17px; font-weight: 950; }
.youth-brand small { color: rgba(255,255,255,.72); font-size: 9px; font-weight: 700; }
.youth-nav nav { display: flex; align-items: center; gap: 30px; }
.youth-nav nav a { color: rgba(255,255,255,.84); font-size: 12px; font-weight: 800; text-decoration: none; }
.youth-nav-actions { display: flex; justify-content: flex-end; gap: 8px; }
.youth-mode-trigger, .youth-login, .youth-primary, .youth-secondary, .youth-signposts button, .youth-radio button, .youth-moments button { border: 0; cursor: pointer; font: inherit; }
.youth-mode-trigger, .youth-login { min-height: 44px; border-radius: 7px; color: #fff; }
.youth-mode-trigger { min-width: 112px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.1); font-size: 11px; }
.youth-mode-trigger b { font-size: 11px; font-weight: 500; }
.youth-login { padding: 0 18px; background: rgba(255,255,255,.92); color: #183b35; font-size: 11px; font-weight: 900; }
.youth-theme-popover { position: absolute; top: 76px; right: 0; width: 392px; padding: 10px; border: 1px solid rgba(255,255,255,.35); border-radius: 8px; background: rgba(248,252,250,.92); box-shadow: 0 20px 55px rgba(0,13,18,.22); color: #29433e; backdrop-filter: blur(24px) saturate(1.2); animation: youth-pop 180ms ease both; }
.youth-theme-popover > button { width: 100%; min-height: 48px; display: grid; grid-template-columns: 34px 52px 1fr; align-items: center; gap: 7px; padding: 5px 9px; border: 0; border-radius: 6px; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.youth-theme-popover > button.active { background: rgba(39,110,91,.1); }
.youth-theme-popover small { color: #71857f; font-size: 8px; line-height: 1.5; }
.auto-orbit { font-size: 18px; color: #309176; }
.youth-theme-options { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; margin-top: 7px; padding-top: 8px; border-top: 1px solid rgba(44,84,73,.12); }
.youth-theme-options button { min-width: 0; display: grid; justify-items: center; gap: 5px; padding: 8px 2px; border: 0; border-radius: 6px; background: transparent; color: #4a5e58; cursor: pointer; }
.youth-theme-options button span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--swatch), white 72%); color: color-mix(in srgb, var(--swatch), #26332f 26%); }
.youth-theme-options button strong { font-size: 9px; }
.youth-theme-options button.active { background: rgba(39,110,91,.1); color: #1c5f4e; }
.youth-copy { position: absolute; top: 50%; left: max(38px, calc((100vw - 1360px) / 2 + 22px)); z-index: 3; width: min(620px, 48vw); transform: translateY(-47%); animation: youth-copy-in .9s .15s ease both; }
.youth-eyebrow { margin: 0 0 18px; color: var(--youth-accent); font-size: 11px; font-weight: 950; letter-spacing: .8px; text-shadow: 0 2px 12px rgba(0,0,0,.3); }
.youth-copy h1 { margin: 0; color: #fff; font-family: "STKaiti", "KaiTi", "Microsoft YaHei", sans-serif; font-size: clamp(52px, 6vw, 88px); font-weight: 900; line-height: 1.05; text-shadow: 0 10px 38px rgba(0,0,0,.4); }
.youth-copy h1 em { color: var(--youth-accent); font-style: normal; text-shadow: 0 8px 36px rgba(0,0,0,.36), 0 0 30px color-mix(in srgb, var(--youth-accent), transparent 52%); }
.youth-summary { max-width: 520px; margin: 24px 0 0; color: rgba(255,255,255,.9); font-size: 14px; font-weight: 700; line-height: 1.8; text-shadow: 0 5px 22px rgba(0,0,0,.55); }
.youth-actions { display: flex; align-items: center; gap: 14px; margin-top: 30px; }
.youth-primary, .youth-secondary { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 28px; border-radius: 7px; font-size: 12px; font-weight: 950; text-decoration: none; transition: transform 180ms ease; }
.youth-primary { padding: 0 20px; background: var(--youth-accent); color: #172c27; box-shadow: 0 14px 34px color-mix(in srgb, var(--youth-accent), transparent 64%); }
.youth-secondary { padding: 0 19px; border: 1px solid rgba(255,255,255,.5); background: rgba(10,25,24,.18); color: #fff; backdrop-filter: blur(12px); }
.youth-primary:hover, .youth-secondary:hover { transform: translateY(-2px); }
.youth-signposts { position: absolute; top: 50%; right: max(32px, calc((100vw - 1360px) / 2 + 20px)); z-index: 3; width: 230px; display: grid; gap: 11px; transform: translateY(-43%); }
.youth-signposts button { position: relative; min-height: 66px; display: grid; grid-template-columns: 38px 1fr 16px; grid-template-rows: auto auto; align-items: center; column-gap: 10px; padding: 9px 12px; border: 1px solid rgba(255,255,255,.28); border-radius: 7px; background: rgba(13,30,28,.3); color: #fff; text-align: left; box-shadow: 0 12px 34px rgba(0,0,0,.12); backdrop-filter: blur(15px) saturate(1.2); transition: transform 180ms ease, background 180ms ease; animation: youth-float 5s ease-in-out infinite; }
.youth-signposts button:nth-child(2) { animation-delay: -1.2s; }.youth-signposts button:nth-child(3) { animation-delay: -2.4s; }.youth-signposts button:nth-child(4) { animation-delay: -3.6s; }
.youth-signposts button:hover { background: rgba(255,255,255,.22); transform: translateX(-5px); }
.youth-signposts button > span { grid-row: 1 / span 2; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.86); color: #365f53; font-size: 16px; }
.youth-signposts strong { font-size: 12px; }.youth-signposts small { color: rgba(255,255,255,.68); font-size: 8px; }.youth-signposts b { grid-column: 3; grid-row: 1 / span 2; font-size: 15px; }
.youth-scroll { position: absolute; bottom: 22px; left: 50%; z-index: 4; display: grid; justify-items: center; gap: 6px; color: rgba(255,255,255,.75); font-size: 8px; font-weight: 800; text-decoration: none; transform: translateX(-50%); }
.youth-scroll i { width: 18px; height: 30px; border: 1px solid rgba(255,255,255,.7); border-radius: 12px; }.youth-scroll i::after { content: ""; display: block; width: 3px; height: 6px; margin: 6px auto 0; border-radius: 2px; background: #fff; animation: youth-scroll 1.7s ease-in-out infinite; }
.youth-radio { position: absolute; right: max(32px, calc((100vw - 1360px) / 2 + 20px)); bottom: 20px; z-index: 5; width: min(420px, 38vw); min-height: 70px; display: grid; grid-template-columns: 48px 1fr 110px 40px; align-items: center; gap: 11px; padding: 8px 10px; border: 1px solid rgba(255,255,255,.38); border-radius: 8px; background: rgba(248,252,250,.76); color: #29433e; box-shadow: 0 18px 40px rgba(0,0,0,.17); backdrop-filter: blur(20px) saturate(1.3); }
.youth-radio-cover { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 6px; background: var(--scene) center / cover; box-shadow: inset 0 0 0 1px rgba(255,255,255,.55); }.youth-radio-cover span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.72); color: #42675e; }
.youth-radio-copy { display: grid; gap: 4px; }.youth-radio-copy small { color: #71857f; font-size: 8px; }.youth-radio-copy strong { font-size: 11px; }
.youth-wave { height: 28px; display: flex; align-items: center; gap: 3px; overflow: hidden; }.youth-wave i { width: 2px; height: var(--h); border-radius: 2px; background: #6b8e85; animation: youth-wave 1s ease-in-out infinite alternate; animation-play-state: paused; }.youth-radio.playing .youth-wave i { animation-play-state: running; }
.youth-radio button { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.72); color: #355c52; font-weight: 900; }
.youth-moments { min-height: 75vh; display: grid; grid-template-columns: minmax(0,.8fr) minmax(500px,1.2fr); gap: clamp(50px,8vw,120px); align-items: center; padding: 110px max(26px, calc((100vw - 1260px) / 2)); background: color-mix(in srgb, var(--youth-accent), #f8fbfa 90%); color: #24453d; }
.youth-moments-heading p { margin: 0 0 15px; color: color-mix(in srgb, var(--youth-accent), #315c51 40%); font-size: 11px; font-weight: 950; }.youth-moments-heading h2 { max-width: 520px; margin: 0; font-size: clamp(36px,4vw,58px); line-height: 1.2; }.youth-moments-heading button { min-height: 45px; margin-top: 28px; padding: 0 18px; border-radius: 6px; background: #244f44; color: #fff; font-size: 11px; font-weight: 900; }
.youth-moment-list { border-top: 1px solid rgba(44,87,76,.2); }.youth-moment-list article { display: grid; grid-template-columns: 72px 1fr; gap: 8px 18px; padding: 27px 4px; border-bottom: 1px solid rgba(44,87,76,.2); }.youth-moment-list span { grid-row: 1 / span 2; color: color-mix(in srgb, var(--youth-accent), #315c51 35%); font-size: 11px; font-weight: 950; }.youth-moment-list strong { font-size: 18px; }.youth-moment-list p { margin: 0; color: #617c75; font-size: 11px; line-height: 1.7; }
@keyframes youth-scene-in { from { opacity: 0; transform: translate(var(--scene-x,0),var(--scene-y,0)) scale(1.05); } to { opacity: 1; transform: translate(var(--scene-x,0),var(--scene-y,0)) scale(1.02); } }
@keyframes youth-scene-breathe { from { transform: translate(var(--scene-x,0),var(--scene-y,0)) scale(1.02); } to { transform: translate(var(--scene-x,0),var(--scene-y,0)) scale(1.055); } }
@keyframes youth-copy-in { from { opacity: 0; transform: translateY(-43%); } to { opacity: 1; transform: translateY(-47%); } }
@keyframes youth-pop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes youth-float { 0%,100% { margin-top: 0; } 50% { margin-top: -5px; } }
@keyframes youth-scroll { 0% { opacity: 0; transform: translateY(0); } 45% { opacity: 1; } 100% { opacity: 0; transform: translateY(10px); } }
@keyframes youth-wave { to { transform: scaleY(.35); } }
@keyframes youth-cloud-drift { to { transform: translateX(calc(100vw + 700px)); } }
@keyframes youth-wind-run { 0% { transform: translateX(0) rotate(-9deg); opacity: 0; } 20% { opacity: .55; } 80% { opacity: .35; } 100% { transform: translateX(165vw) rotate(-9deg); opacity: 0; } }
@keyframes youth-birds-fly { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-80px,-22px); } }
@keyframes youth-bird-wing { to { transform: rotate(-12deg) scaleY(.55); } }
@keyframes youth-shooting { 0%,72% { opacity: 0; transform: translate(0,0) rotate(-28deg); } 75% { opacity: 1; } 86%,100% { opacity: 0; transform: translate(-360px,190px) rotate(-28deg); } }
@keyframes youth-grass-sway { from { transform: skewX(-1deg); } to { transform: skewX(2deg); } }
@media (prefers-reduced-motion: reduce) { .youth-scene, .youth-copy, .youth-signposts button, .youth-wave i, .youth-scroll i::after, .youth-motion-layers * { animation: none; } }
@media (max-width: 980px) {
  .youth-nav { grid-template-columns: 1fr auto; }.youth-nav nav { display: none; }
  .youth-copy { top: auto; bottom: 118px; width: min(640px, calc(100% - 48px)); transform: none; }.youth-copy h1 { font-size: clamp(46px,9vw,70px); }
  .youth-signposts { top: 112px; right: 24px; width: 190px; transform: none; }.youth-signposts button { min-height: 56px; grid-template-columns: 32px 1fr 13px; padding: 7px 9px; }.youth-signposts button > span { width: 32px; height: 32px; }
  .youth-radio { right: 22px; bottom: 18px; width: 350px; }.youth-scroll { display: none; }.youth-moments { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .youth-scene { background-position: 58% center; }.youth-vignette { background: linear-gradient(180deg, rgba(4,16,17,.52), transparent 35%, rgba(4,16,17,.12) 48%, rgba(4,16,17,.88) 100%); }
  .youth-nav { top: 10px; width: calc(100% - 20px); min-height: 58px; padding: 6px; }.youth-brand img { width: 38px; height: 38px; }.youth-brand strong { font-size: 14px; }.youth-brand small { display: none; }
  .youth-mode-trigger { min-width: 46px; width: 46px; padding: 0; }.youth-mode-trigger strong, .youth-mode-trigger b { display: none; }.youth-login { padding: 0 11px; }
  .youth-theme-popover { top: 66px; right: 0; width: min(360px, calc(100vw - 20px)); }.youth-theme-options { grid-template-columns: repeat(3,1fr); }
  .youth-copy { left: 18px; bottom: 94px; width: calc(100% - 36px); }.youth-eyebrow { margin-bottom: 10px; font-size: 9px; }.youth-copy h1 { font-size: clamp(38px,12vw,52px); }.youth-summary { max-width: 95%; margin-top: 12px; font-size: 10px; }
  .youth-actions { gap: 8px; margin-top: 17px; }.youth-primary, .youth-secondary { min-height: 40px; padding: 0 11px; gap: 8px; font-size: 9px; }
  .youth-signposts { top: 80px; right: 10px; width: 146px; gap: 4px; }.youth-signposts button { min-height: 40px; grid-template-columns: 25px 1fr 9px; padding: 4px 6px; }.youth-signposts button > span { width: 25px; height: 25px; font-size: 10px; }.youth-signposts strong { font-size: 8px; }.youth-signposts small { display: none; }
  .youth-radio { right: 10px; bottom: 10px; left: 10px; width: auto; min-height: 60px; grid-template-columns: 40px 1fr 65px 34px; }.youth-radio-cover { width: 40px; height: 40px; }.youth-wave { gap: 2px; }
  .youth-moments { min-height: auto; gap: 50px; padding: 72px 18px; }.youth-moment-list article { grid-template-columns: 54px 1fr; }
}

/* Cinematic natural motion layers v52 */
.youth-pointer-light { position: absolute; inset: 0; background: radial-gradient(circle 210px at var(--pointer-x, 52%) var(--pointer-y, 48%), rgba(255,255,255,.14), transparent 72%); mix-blend-mode: screen; transition: opacity .25s ease; opacity: .75; }
.youth-sun-glow { position: absolute; top: 7%; right: 18%; width: 180px; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(255,245,190,.42), rgba(255,220,120,.13) 34%, transparent 72%); filter: blur(3px); opacity: 0; animation: youth-sun-pulse 5s ease-in-out infinite alternate; }
.youth-theme-spring .youth-sun-glow, .youth-theme-summer .youth-sun-glow, .youth-theme-autumn .youth-sun-glow, .youth-theme-sunset .youth-sun-glow { opacity: 1; }
.youth-theme-sunset .youth-sun-glow { top: 29%; right: 29%; width: 260px; background: radial-gradient(circle, rgba(255,210,125,.5), rgba(255,105,85,.16) 38%, transparent 72%); }
.youth-light-rays { position: absolute; top: -28%; right: 2%; width: 58%; height: 130%; background: repeating-linear-gradient(104deg, transparent 0 9%, rgba(255,251,215,.07) 10% 12%, transparent 13% 21%); filter: blur(2px); opacity: 0; transform-origin: top right; animation: youth-rays 8s ease-in-out infinite alternate; }
.youth-theme-spring .youth-light-rays, .youth-theme-summer .youth-light-rays, .youth-theme-autumn .youth-light-rays, .youth-theme-sunset .youth-light-rays { opacity: .72; }
.youth-rain { position: absolute; inset: -12% 0 0; opacity: 0; transform: rotate(8deg); }
.youth-theme-spring .youth-rain { opacity: .3; }
.youth-rain i { position: absolute; top: -15%; left: var(--left); width: 1px; height: 38px; background: linear-gradient(transparent, rgba(235,250,255,.75)); animation: youth-rain-fall var(--duration) var(--delay) linear infinite; }
.youth-fireflies { position: absolute; inset: 0; opacity: 0; }
.youth-theme-summer .youth-fireflies { opacity: .22; }.youth-theme-sunset .youth-fireflies { opacity: .7; }.youth-theme-starry .youth-fireflies { opacity: .85; }
.youth-fireflies i { position: absolute; left: var(--left); top: var(--top); width: 4px; height: 4px; border-radius: 50%; background: #fff4a8; box-shadow: 0 0 8px 2px rgba(255,233,118,.8); animation: youth-firefly 4s var(--delay) ease-in-out infinite; }
.youth-constellations { position: absolute; top: 12%; right: 10%; width: 330px; height: 220px; opacity: 0; animation: youth-constellation-float 9s ease-in-out infinite alternate; }
.youth-theme-starry .youth-constellations { opacity: .48; }
.youth-constellations i { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #eaf0ff; box-shadow: 0 0 10px #b7c4ff; }
.youth-constellations i::after { content: ""; position: absolute; top: 2px; left: 3px; width: 110px; height: 1px; background: linear-gradient(90deg, rgba(205,217,255,.7), transparent); transform-origin: left center; }
.youth-constellations i:nth-child(1) { top: 15%; left: 4%; }.youth-constellations i:nth-child(1)::after { transform: rotate(22deg); width: 98px; }
.youth-constellations i:nth-child(2) { top: 34%; left: 31%; }.youth-constellations i:nth-child(2)::after { transform: rotate(-18deg); width: 94px; }
.youth-constellations i:nth-child(3) { top: 20%; left: 58%; }.youth-constellations i:nth-child(3)::after { transform: rotate(38deg); width: 104px; }
.youth-constellations i:nth-child(4) { top: 58%; left: 83%; }.youth-constellations i:nth-child(4)::after { transform: rotate(145deg); width: 128px; }
.youth-constellations i:nth-child(5) { top: 77%; left: 48%; }.youth-constellations i:nth-child(5)::after { display: none; }
.youth-mist { position: absolute; bottom: -8%; left: -18%; width: 60%; height: 24%; border-radius: 50%; background: radial-gradient(ellipse, rgba(235,248,255,.16), transparent 70%); filter: blur(16px); opacity: 0; animation: youth-mist-drift 13s ease-in-out infinite alternate; }
.mist-two { left: 52%; bottom: 2%; animation-delay: -6s; }
.youth-theme-winter .youth-mist { opacity: .9; }.youth-theme-starry .youth-mist { opacity: .25; }
.youth-film-grain { position: absolute; inset: 0; opacity: .08; background-image: repeating-radial-gradient(circle at 17% 23%, rgba(255,255,255,.5) 0 .4px, transparent .7px 3px); background-size: 7px 7px; mix-blend-mode: soft-light; animation: youth-grain .55s steps(2) infinite; }
.youth-copy h1 em { background-image: linear-gradient(105deg, var(--youth-accent) 20%, #fff 47%, var(--youth-accent) 72%); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: youth-title-shimmer 6s ease-in-out infinite; }
.youth-eyebrow::before { content: ""; display: inline-block; width: 28px; height: 1px; margin: 0 9px 3px 0; background: currentColor; box-shadow: 0 0 10px currentColor; animation: youth-eyebrow-line 2.4s ease-in-out infinite; }

@keyframes youth-sun-pulse { to { transform: scale(1.12); filter: blur(7px); } }
@keyframes youth-rays { to { transform: rotate(3deg) translateX(-3%); opacity: .42; } }
@keyframes youth-rain-fall { to { transform: translateY(125vh); } }
@keyframes youth-firefly { 0%,100% { opacity: .12; transform: translate(0,0) scale(.7); } 40% { opacity: 1; transform: translate(13px,-18px) scale(1.25); } 70% { opacity: .4; transform: translate(-9px,-28px) scale(.85); } }
@keyframes youth-constellation-float { to { transform: translate(-13px,9px) rotate(-1deg); } }
@keyframes youth-mist-drift { to { transform: translateX(24%) scale(1.15); } }
@keyframes youth-grain { 0% { transform: translate(0,0); } 25% { transform: translate(-1%,1%); } 50% { transform: translate(1%,-1%); } 75% { transform: translate(1%,1%); } }
@keyframes youth-title-shimmer { 0%,58%,100% { background-position: 100% 0; } 76% { background-position: 0 0; } }
@keyframes youth-eyebrow-line { 50% { width: 44px; opacity: .65; } }

@media (max-width: 640px) {
  .youth-light-rays { width: 100%; right: -35%; }
  .youth-constellations { top: 18%; right: -90px; transform: scale(.72); }
  .youth-film-grain { opacity: .04; }
}

@media (prefers-reduced-motion: reduce) {
  .youth-pointer-light, .youth-sun-glow, .youth-light-rays, .youth-rain i, .youth-fireflies i, .youth-constellations, .youth-mist, .youth-film-grain, .youth-copy h1 em, .youth-eyebrow::before { animation: none; }
}

/* Software library v32 */
.software-page {
  display: grid;
  gap: 14px;
}

.software-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 180px;
  background:
    radial-gradient(circle at 86% 12%, rgba(50, 215, 255, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(63, 109, 255, 0.2), rgba(13, 28, 60, 0.76));
}

.software-hero h2 {
  margin: 0;
  font-size: 30px;
}

.software-hero p:not(.exam-kicker) {
  max-width: 760px;
  margin: 10px 0 0;
  color: #b8c6ec;
  line-height: 1.75;
}

.software-stat {
  min-width: 130px;
  padding: 20px;
  border-left: 1px solid rgba(113, 135, 205, 0.2);
  text-align: center;
}

.software-stat strong,
.software-stat span {
  display: block;
}

.software-stat strong {
  color: #ffffff;
  font-size: 38px;
}

.software-stat span {
  margin-top: 5px;
  color: #9cadcc;
  font-size: 12px;
}

.software-toolbar {
  display: grid;
  gap: 12px;
  min-height: 0;
  padding: 10px;
}

.software-search {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid rgba(113, 135, 205, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: #8fa0c7;
}

.software-search input {
  width: 100%;
  border: 0;
  background: transparent;
  outline: 0;
  color: var(--text);
}

.software-filters {
  display: grid;
  gap: 4px;
}

.software-filters button {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #aebded;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
}

.software-filters button span {
  color: #7182ad;
  font-size: 10px;
}

.software-filters button.active,
.software-filters button:hover {
  border-color: rgba(50, 215, 255, 0.42);
  background: rgba(50, 215, 255, 0.12);
  color: #ffffff;
}

.software-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.software-browser {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}

.software-category-nav {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.software-category-nav > strong {
  padding: 4px 8px 10px;
  border-bottom: 1px solid rgba(113, 135, 205, 0.16);
  font-size: 13px;
}

.software-card {
  min-height: 148px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
}

.software-card[hidden] {
  display: none;
}

.software-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  color: #ffffff;
  font-size: 17px;
  font-weight: 900;
}

.software-icon.image {
  overflow: hidden;
  border: 1px solid rgba(113, 135, 205, 0.18);
  background: rgba(255, 255, 255, 0.96);
}

.software-icon.image img {
  width: 100%;
  height: 100%;
  padding: 6px;
  object-fit: contain;
}

.software-icon-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  color: #ffffff;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.34), transparent 32%),
    linear-gradient(135deg, var(--software-accent, #2f8cff), color-mix(in srgb, var(--software-accent, #2f8cff) 58%, #18245f));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.notification-center {
  overflow: hidden;
}

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

.notification-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -2px -2px 14px;
  padding: 4px 2px 14px;
  border-bottom: 1px solid rgba(111, 151, 190, 0.2);
}

.notification-toolbar > div {
  display: grid;
  gap: 4px;
}

.notification-toolbar strong {
  font-size: 18px;
}

.notification-toolbar span {
  color: var(--muted);
  font-size: 13px;
}

.notification-toolbar b {
  color: var(--cyan);
}

.notification-row {
  position: relative;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  justify-content: initial;
  width: 100%;
  min-height: 74px;
  padding: 15px 16px;
  text-align: left;
  cursor: default;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.notification-row:hover {
  transform: none;
}

.notification-row .row-main {
  min-width: 0;
  text-align: left;
}

.notification-row .row-title {
  font-size: 16px;
  line-height: 1.35;
}

.notification-row .row-meta {
  overflow-wrap: anywhere;
  line-height: 1.55;
}

.notification-row .badge {
  justify-self: end;
  white-space: nowrap;
}

.notification-row.unread {
  cursor: pointer;
  border-color: color-mix(in srgb, var(--cyan) 36%, transparent);
  background: color-mix(in srgb, var(--cyan) 8%, var(--panel));
}

.notification-row.unread:hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--cyan) 12%, var(--panel));
}

.notification-status-dot {
  width: 7px;
  height: 7px;
  align-self: center;
  border-radius: 50%;
  background: transparent;
}

.notification-row.unread .notification-status-dot {
  background: var(--cyan);
  box-shadow: 0 0 10px color-mix(in srgb, var(--cyan) 64%, transparent);
}

@media (max-width: 640px) {
  .notification-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .notification-toolbar .ghost-btn {
    width: 100%;
  }

  .notification-row {
    grid-template-columns: 7px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 14px 12px;
  }

  .notification-row .row-title {
    font-size: 15px;
  }

  .notification-row .row-meta {
    font-size: 12px;
  }
}

.software-icon.blue { background: linear-gradient(135deg, #2586c7, #315de0); }
.software-icon.red { background: linear-gradient(135deg, #e85252, #a92745); }
.software-icon.orange { background: linear-gradient(135deg, #eb963a, #d45d25); }
.software-icon.gold { background: linear-gradient(135deg, #d5a127, #3978a5); }
.software-icon.violet { background: linear-gradient(135deg, #7467bc, #b94d86); }
.software-icon.teal { background: linear-gradient(135deg, #168f88, #297aa0); }

.software-card-copy {
  min-width: 0;
}

.software-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.software-card h3 {
  margin: 0;
  color: #ffffff;
  font-size: 16px;
}

.software-card-head span {
  flex: 0 0 auto;
  color: #7de7ff;
  font-size: 10px;
}

.software-card p {
  margin: 10px 0 8px;
  color: #a9b8d8;
  font-size: 12px;
  line-height: 1.6;
}

.software-card small {
  color: #7f8ead;
}

.software-card > a,
.software-card > button {
  grid-column: 1 / -1;
  min-height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(50, 215, 255, 0.24);
  border-radius: 7px;
  background: rgba(50, 215, 255, 0.08);
  color: #9ddfff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

#softwareDetailModal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 12px;
  overflow: hidden;
  background: rgba(3, 9, 20, 0.72);
  backdrop-filter: blur(10px);
}

.software-detail-card {
  position: relative;
  width: min(780px, calc(100vw - 24px));
  max-height: min(760px, calc(100vh - 24px));
  padding: 26px;
  overflow-y: auto;
  border: 1px solid rgba(99, 134, 255, 0.24);
  border-radius: 8px;
  background: #0c1934;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.46);
}

.software-detail-card .modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(155, 180, 255, 0.24);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.07);
  color: #dfe8ff;
  font-size: 20px;
  line-height: 1;
}

.software-detail-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-right: 40px;
}

.software-detail-head img,
.software-detail-icon {
  width: 64px;
  height: 64px;
  padding: 7px;
  border-radius: 8px;
  background: #ffffff;
  object-fit: contain;
}

.software-detail-icon {
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(130, 155, 205, 0.22);
}

.software-detail-icon .software-icon-fallback {
  font-size: 20px;
}

.software-detail-head span,
.software-detail-head p {
  color: #8fa0c7;
  font-size: 12px;
}

.software-detail-head h2 {
  margin: 5px 0;
}

.software-detail-description {
  margin: 0;
  color: #b8c6e4;
  line-height: 1.75;
}

.software-detail-section {
  margin-top: 22px;
}

.software-detail-section > h3,
.software-section-heading h3 {
  margin: 0 0 10px;
}

.software-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.software-section-heading h3 {
  margin: 0;
}

.software-section-heading span {
  color: #8fa0c7;
  font-size: 11px;
}

.software-version-list {
  display: grid;
  gap: 7px;
}

.software-version-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(113, 135, 205, 0.16);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
}

.software-version-info {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.software-version-info strong {
  overflow-wrap: anywhere;
}

.software-version-info span {
  color: #8fa0c7;
  font-size: 11px;
}

.software-download-slots {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 112px);
  gap: 7px;
}

.software-download-slot {
  min-height: 42px;
  display: grid;
  place-content: center;
  gap: 2px;
  padding: 5px 9px;
  border: 1px dashed rgba(50, 215, 255, 0.3);
  border-radius: 7px;
  background: rgba(50, 215, 255, 0.06);
  color: #9ddfff;
  cursor: not-allowed;
  opacity: 0.72;
  text-decoration: none;
}

.software-download-slot:not([disabled]),
a.software-download-slot {
  cursor: pointer;
  opacity: 1;
}

.software-download-slot:not([disabled]):hover,
a.software-download-slot:hover {
  border-style: solid;
  filter: brightness(1.2);
}

.software-download-slot.secondary {
  border-color: rgba(130, 150, 215, 0.32);
  background: rgba(130, 150, 215, 0.07);
  color: #b8c6e4;
}

.software-download-slot.official {
  grid-column: 1 / -1;
  border-style: solid;
  border-color: rgba(74, 222, 161, 0.28);
  background: rgba(42, 178, 127, 0.14);
  color: #b9f3d7;
}

.software-download-slot span {
  font-size: 11px;
  font-weight: 800;
}

.software-download-slot small {
  color: #7f8ead;
  font-size: 9px;
}

.software-download-slot.fallback {
  border-style: dotted;
  opacity: 0.85;
}

.software-download-slot.fallback:hover {
  border-style: solid;
  opacity: 1;
}

html[data-theme="day"] .software-download-slot.fallback {
  border-style: dotted;
  opacity: 0.88;
}

.software-show-more {
  width: 100%;
  min-height: 40px;
  margin-top: 9px;
  border: 1px solid rgba(50, 215, 255, 0.2);
  border-radius: 7px;
  background: rgba(50, 215, 255, 0.06);
  color: #9ddfff;
  font-size: 11px;
  font-weight: 800;
}

.software-no-versions {
  margin: 0;
  padding: 16px;
  color: #8fa0c7;
  text-align: center;
}

.software-legal-note {
  margin: 18px 0 0;
  padding: 11px 12px;
  border-left: 3px solid #32d7ff;
  background: rgba(50, 215, 255, 0.07);
  color: #9cadcc;
  font-size: 11px;
  line-height: 1.6;
}

html[data-theme="day"] .software-hero {
  background:
    radial-gradient(circle at 86% 12%, rgba(238, 184, 83, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(214, 241, 237, 0.96), rgba(230, 241, 248, 0.96));
}

html[data-theme="day"] .software-hero h2,
html[data-theme="day"] .software-stat strong,
html[data-theme="day"] .software-card h3 {
  color: #173e42;
}

html[data-theme="day"] .software-hero p:not(.exam-kicker),
html[data-theme="day"] .software-stat span,
html[data-theme="day"] .software-card p,
html[data-theme="day"] .software-card small {
  color: #536d74;
}

html[data-theme="day"] .software-stat {
  border-left-color: rgba(42, 102, 119, 0.16);
}

html[data-theme="day"] .software-search,
html[data-theme="day"] .software-filters button {
  border-color: rgba(49, 110, 118, 0.2);
  background: rgba(255, 255, 255, 0.82);
  color: #42656c;
}

html[data-theme="day"] .software-category-nav > strong {
  border-bottom-color: rgba(49, 110, 118, 0.16);
  color: #24464e;
}

html[data-theme="day"] .software-filters button {
  background: transparent;
}

html[data-theme="day"] .software-filters button span {
  color: #71878c;
}

html[data-theme="day"] .software-filters button.active,
html[data-theme="day"] .software-filters button:hover {
  border-color: rgba(22, 143, 136, 0.4);
  background: rgba(218, 243, 239, 0.94);
  color: #155f5c;
}

html[data-theme="day"] .software-card-head span {
  color: #176b67;
}

html[data-theme="day"] .software-card > a,
html[data-theme="day"] .software-card > button {
  border-color: rgba(22, 143, 136, 0.24);
  background: rgba(218, 243, 239, 0.82);
  color: #176b67;
}

html[data-theme="day"] .software-detail-card {
  border-color: rgba(42, 102, 119, 0.18);
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(45, 84, 92, 0.2);
}

html[data-theme="day"] #softwareDetailModal {
  background: rgba(34, 70, 75, 0.38);
}

html[data-theme="day"] .software-detail-card .modal-close {
  border-color: rgba(49, 110, 118, 0.2);
  background: rgba(240, 248, 247, 0.9);
  color: #24464e;
}

html[data-theme="day"] .software-detail-head h2,
html[data-theme="day"] .software-detail-section h3,
html[data-theme="day"] .software-version-list strong {
  color: #173e42;
}

html[data-theme="day"] .software-detail-head span,
html[data-theme="day"] .software-detail-head p,
html[data-theme="day"] .software-detail-description,
html[data-theme="day"] .software-version-info span,
html[data-theme="day"] .software-section-heading span {
  color: #536d74;
}

html[data-theme="day"] .software-version-row {
  border-color: rgba(49, 110, 118, 0.16);
  background: rgba(240, 248, 247, 0.82);
}

html[data-theme="day"] .software-download-slot {
  border-color: rgba(22, 143, 136, 0.32);
  background: rgba(218, 243, 239, 0.76);
  color: #176b67;
}

html[data-theme="day"] .software-download-slot.secondary {
  border-color: rgba(78, 112, 140, 0.25);
  background: rgba(236, 243, 247, 0.88);
  color: #42656c;
}

html[data-theme="day"] .software-download-slot.official {
  border-color: rgba(30, 145, 102, 0.24);
  background: rgba(220, 243, 232, 0.9);
  color: #286b53;
}

html[data-theme="day"] .software-download-slot small {
  color: #71878c;
}

html[data-theme="day"] .software-show-more {
  border-color: rgba(22, 143, 136, 0.24);
  background: rgba(218, 243, 239, 0.72);
  color: #176b67;
}

html[data-theme="day"] .software-legal-note {
  border-left-color: #168f88;
  background: rgba(218, 243, 239, 0.7);
  color: #536d74;
}

@media (max-width: 1100px) {
  .software-browser {
    grid-template-columns: 160px minmax(0, 1fr);
  }

  .software-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .software-hero,
  .software-browser,
  .software-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .software-hero {
    min-height: 0;
  }

  .software-stat {
    display: none;
  }

  .software-category-nav {
    position: static;
    overflow: hidden;
  }

  .software-filters {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .software-filters button {
    flex: 0 0 auto;
  }

  .software-filters button span {
    margin-left: 8px;
  }

  .software-detail-card {
    padding: 20px 14px;
  }

  .software-version-row {
    align-items: stretch;
    flex-direction: column;
  }

  .software-download-slots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Immersive dual-theme login v29 */
.login-wrap {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: clamp(28px, 5vw, 72px);
  background:
    linear-gradient(100deg, rgba(4, 11, 29, 0.9) 0%, rgba(4, 14, 34, 0.64) 52%, rgba(5, 13, 30, 0.82) 100%),
    url("/assets/target-hero.png") center / cover no-repeat;
}

.login-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(12, 23, 49, 0.08), rgba(3, 9, 24, 0.78)),
    linear-gradient(90deg, rgba(42, 215, 255, 0.08), transparent 45%, rgba(164, 75, 255, 0.08));
  pointer-events: none;
}

.login-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.login-theme-toggle {
  position: absolute;
  top: clamp(18px, 3vw, 34px);
  right: clamp(18px, 3vw, 38px);
  z-index: 3;
  min-width: 88px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid rgba(133, 180, 255, 0.24);
  border-radius: 8px;
  background: rgba(8, 19, 42, 0.58);
  box-shadow: 0 12px 32px rgba(1, 7, 22, 0.2);
  color: #edf6ff;
  font-size: 12px;
  backdrop-filter: blur(18px);
  transition: 180ms ease;
}

.login-theme-toggle:hover {
  border-color: rgba(83, 220, 255, 0.56);
  background: rgba(15, 33, 67, 0.76);
  transform: translateY(-1px);
}

.login-theme-toggle span {
  color: #ffd56a;
  font-size: 17px;
}

.login-theme-toggle strong {
  font-size: 12px;
}

.login-panel {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  min-height: min(650px, calc(100svh - 80px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  align-items: stretch;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.login-visual {
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(18px, 3vw, 38px) clamp(24px, 5vw, 68px) clamp(28px, 4vw, 52px) 0;
  background: none;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.login-brand img {
  width: 58px;
  height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
  box-shadow: 0 10px 32px rgba(18, 150, 217, 0.3);
}

.login-brand div {
  display: grid;
  gap: 4px;
}

.login-brand strong {
  color: #ffffff;
  font-size: 23px;
  font-weight: 900;
}

.login-brand span {
  color: #b9d2e9;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.6px;
}

.login-welcome {
  max-width: 610px;
  padding: 80px 0;
}

.login-welcome h1 {
  margin: 0 0 20px;
  color: #ffffff;
  font-size: clamp(42px, 5.2vw, 68px);
  font-weight: 900;
  line-height: 1.16;
  text-shadow: 0 14px 42px rgba(0, 13, 38, 0.52);
}

.login-welcome p {
  max-width: 470px;
  margin: 0;
  color: #d4e6f3;
  font-size: 16px;
  line-height: 1.8;
  text-shadow: 0 8px 24px rgba(0, 10, 28, 0.54);
}

.login-visual-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #b9d0e3;
  font-size: 12px;
  font-weight: 700;
}

.login-visual-footer span {
  width: 34px;
  height: 1px;
  background: #50d9ef;
  box-shadow: 0 0 10px rgba(80, 217, 239, 0.78);
}

.login-form {
  align-self: center;
  min-height: 520px;
  display: grid;
  align-content: center;
  gap: 18px;
  padding: clamp(32px, 4vw, 52px);
  border: 1px solid rgba(143, 179, 237, 0.22);
  border-radius: 8px;
  background: rgba(9, 20, 43, 0.76);
  box-shadow: 0 30px 90px rgba(0, 6, 24, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px) saturate(1.12);
}

.login-form-heading {
  margin-bottom: 4px;
}

.login-form-heading h2 {
  margin: 0;
  color: #ffffff;
  font-size: 32px;
  line-height: 1.2;
}

.login-form-heading p {
  margin: 10px 0 0;
  color: #aebfd6;
  font-size: 13px;
}

.login-role-switch,
.login-auth-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(127, 211, 230, 0.18);
  border-radius: 7px;
  background: rgba(11, 40, 69, 0.42);
}

.login-role-switch button,
.login-auth-switch button {
  min-height: 40px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: rgba(205, 226, 238, 0.72);
  font-weight: 700;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.login-role-switch button.active,
.login-auth-switch button.active {
  background: linear-gradient(135deg, #24a6d9, #5b69f2);
  color: #fff;
  box-shadow: 0 7px 18px rgba(42, 135, 218, 0.28);
}

.login-form [hidden] {
  display: none;
}

.login-field {
  gap: 8px;
}

.login-field span {
  color: #c8d7e9;
  font-size: 12px;
  font-weight: 800;
}

.login-field input {
  height: 48px;
  border: 1px solid rgba(136, 172, 226, 0.24);
  border-radius: 7px;
  background: rgba(7, 16, 35, 0.58);
  color: #ffffff;
  outline: none;
  transition: 180ms ease;
}

.login-field input:focus {
  border-color: rgba(75, 218, 235, 0.72);
  box-shadow: 0 0 0 3px rgba(50, 215, 255, 0.11);
}

.login-submit {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  padding: 0 18px 0 21px;
  border-radius: 7px;
  background: linear-gradient(135deg, #168fc2, #3f6dff);
  color: #ffffff;
}

.login-submit b {
  font-size: 20px;
  font-weight: 400;
}

.login-help {
  margin: 0;
  color: #8297b4;
  font-size: 11px;
  text-align: center;
}

html[data-theme="day"] .login-wrap {
  background:
    linear-gradient(100deg, rgba(234, 247, 245, 0.95) 0%, rgba(231, 246, 244, 0.63) 52%, rgba(239, 248, 247, 0.88) 100%),
    url("/assets/campus-hero-day-v26.png") center / cover no-repeat;
}

html[data-theme="day"] .login-wrap::before {
  background:
    linear-gradient(180deg, rgba(250, 255, 253, 0.02), rgba(210, 234, 232, 0.46)),
    linear-gradient(90deg, rgba(22, 143, 136, 0.06), transparent 46%, rgba(222, 163, 57, 0.07));
}

html[data-theme="day"] .login-theme-toggle {
  border-color: rgba(24, 115, 111, 0.2);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 30px rgba(51, 91, 91, 0.12);
  color: #27565d;
}

html[data-theme="day"] .login-theme-toggle:hover {
  border-color: rgba(20, 134, 126, 0.46);
  background: rgba(255, 255, 255, 0.96);
}

html[data-theme="day"] .login-theme-toggle span {
  color: #a96900;
}

html[data-theme="day"] .login-brand strong,
html[data-theme="day"] .login-welcome h1 {
  color: #173e42;
  text-shadow: 0 12px 32px rgba(255, 255, 255, 0.62);
}

html[data-theme="day"] .login-brand span,
html[data-theme="day"] .login-welcome p,
html[data-theme="day"] .login-visual-footer {
  color: #365e63;
  text-shadow: 0 6px 22px rgba(255, 255, 255, 0.74);
}

html[data-theme="day"] .login-visual-footer span {
  background: #168f88;
  box-shadow: 0 0 10px rgba(22, 143, 136, 0.38);
}

html[data-theme="day"] .login-form {
  border-color: rgba(44, 111, 113, 0.18);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 28px 80px rgba(47, 88, 89, 0.18), inset 0 1px 0 #ffffff;
}

html[data-theme="day"] .login-form-heading > span {
  color: #167a78;
}

html[data-theme="day"] .login-form-heading h2 {
  color: #173e42;
}

html[data-theme="day"] .login-form-heading p,
html[data-theme="day"] .login-help {
  color: #5c7378;
}

html[data-theme="day"] .login-role-switch,
html[data-theme="day"] .login-auth-switch {
  border-color: rgba(48, 132, 178, 0.2);
  background: rgba(231, 246, 252, 0.82);
}

html[data-theme="day"] .login-role-switch button,
html[data-theme="day"] .login-auth-switch button {
  color: #547386;
}

html[data-theme="day"] .login-role-switch button.active,
html[data-theme="day"] .login-auth-switch button.active {
  color: #fff;
}

html[data-theme="day"] .login-field span {
  color: #35575d;
}

html[data-theme="day"] .login-field input {
  border-color: rgba(43, 108, 113, 0.2);
  background: rgba(245, 251, 250, 0.88);
  color: #173e42;
}

html[data-theme="day"] .login-field input:focus {
  border-color: rgba(22, 143, 136, 0.64);
  box-shadow: 0 0 0 3px rgba(22, 143, 136, 0.1);
}

html[data-theme="day"] .login-submit {
  background: linear-gradient(135deg, #168f88, #297aa0);
}

/* Pre-login product introduction v48 */
.campus-intro {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  overflow-x: hidden;
  background: #07152d;
  color: #eef8ff;
}

.campus-intro > .login-particles {
  position: fixed;
  opacity: 0.72;
}

.intro-nav {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 20;
  width: min(1180px, calc(100% - 36px));
  min-height: 64px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 8px 10px 8px 14px;
  border: 1px solid rgba(142, 193, 226, 0.22);
  border-radius: 8px;
  background: rgba(5, 20, 43, 0.78);
  box-shadow: 0 16px 50px rgba(0, 6, 22, 0.3);
  backdrop-filter: blur(22px) saturate(1.18);
  transform: translateX(-50%);
}

.intro-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.intro-brand img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(23, 193, 219, 0.24);
}

.intro-brand span {
  display: grid;
  gap: 2px;
}

.intro-brand strong {
  font-size: 16px;
  font-weight: 900;
}

.intro-brand small {
  color: #9eb8ce;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1.4px;
}

.intro-nav nav {
  display: flex;
  gap: 30px;
}

.intro-nav nav a {
  color: #c1d5e5;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  transition: color 160ms ease;
}

.intro-nav nav a:hover {
  color: #66e2ee;
}

.intro-nav-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.intro-theme-btn,
.intro-login-btn,
.intro-primary,
.intro-footer button,
.login-back-btn {
  min-height: 42px;
  border: 0;
  border-radius: 7px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.intro-theme-btn {
  min-width: 56px;
  border: 1px solid rgba(148, 194, 226, 0.24);
  background: rgba(255, 255, 255, 0.06);
  color: #c6d9e8;
  font-size: 11px;
}

.intro-login-btn {
  padding: 0 18px;
  background: #ecfbff;
  color: #0a5863;
  font-size: 12px;
}

.intro-theme-btn:hover,
.intro-login-btn:hover,
.intro-primary:hover,
.intro-footer button:hover,
.login-back-btn:hover {
  transform: translateY(-2px);
}

.intro-hero {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(460px, 1.05fr);
  align-items: center;
  gap: clamp(28px, 5vw, 80px);
  padding: 126px max(28px, calc((100vw - 1180px) / 2)) 68px;
  background:
    linear-gradient(90deg, rgba(5, 19, 42, 0.97) 0%, rgba(5, 19, 42, 0.8) 46%, rgba(5, 19, 42, 0.24) 100%),
    linear-gradient(180deg, rgba(5, 18, 38, 0.05), #07152d 100%),
    url("/assets/target-hero.png") center / cover no-repeat;
}

.intro-hero-copy {
  position: relative;
  z-index: 3;
  max-width: 620px;
  animation: intro-rise 700ms ease both;
}

.intro-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  color: #75e4ed;
  font-size: 11px;
  font-weight: 900;
}

.intro-eyebrow span {
  width: 34px;
  height: 1px;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
}

.intro-hero h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(46px, 4.5vw, 64px);
  font-weight: 950;
  line-height: 1.08;
  text-shadow: 0 18px 55px rgba(0, 7, 26, 0.48);
}

.intro-hero h1 em {
  color: #77e5e7;
  font-style: normal;
}

.intro-summary {
  max-width: 570px;
  margin: 26px 0 0;
  color: #c4d9e8;
  font-size: 15px;
  line-height: 1.9;
  text-shadow: 0 8px 24px rgba(0, 7, 26, 0.5);
}

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

.intro-primary {
  min-width: 154px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 0 18px;
  background: #56d6df;
  color: #073d49;
  box-shadow: 0 14px 34px rgba(54, 205, 218, 0.22);
}

.intro-primary span {
  font-size: 18px;
  font-weight: 500;
}

.intro-secondary {
  color: #d4e5ef;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.intro-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 520px;
  margin: 46px 0 0;
}

.intro-metrics div {
  padding-left: 15px;
  border-left: 1px solid rgba(114, 225, 234, 0.36);
}

.intro-metrics dt {
  color: #ffffff;
  font-size: 24px;
  font-weight: 950;
}

.intro-metrics dd {
  margin: 5px 0 0;
  color: #9fb7ca;
  font-size: 10px;
  font-weight: 800;
}

.intro-orbit {
  position: relative;
  z-index: 2;
  width: min(560px, 46vw);
  aspect-ratio: 1;
  justify-self: end;
  animation: intro-rise 850ms 120ms ease both;
}

.intro-orbit-ring {
  position: absolute;
  border: 1px solid rgba(106, 222, 233, 0.24);
  border-radius: 50%;
}

.intro-orbit-ring-one {
  inset: 17%;
  animation: intro-spin 24s linear infinite;
}

.intro-orbit-ring-two {
  inset: 5%;
  border-style: dashed;
  border-color: rgba(139, 166, 255, 0.22);
  animation: intro-spin 34s linear infinite reverse;
}

.intro-orbit-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 168px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  border: 1px solid rgba(149, 218, 235, 0.24);
  border-radius: 50%;
  background: rgba(7, 29, 57, 0.78);
  box-shadow: 0 28px 80px rgba(0, 6, 24, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  transform: translate(-50%, -50%);
}

.intro-orbit-core img {
  width: 58px;
  height: 58px;
  border-radius: 50%;
}

.intro-orbit-core strong {
  font-size: 18px;
}

.intro-orbit-core span {
  color: #8fb4c9;
  font-size: 10px;
  font-weight: 800;
}

.intro-orbit-card {
  position: absolute;
  width: 172px;
  display: grid;
  gap: 4px;
  padding: 14px 15px;
  border: 1px solid rgba(145, 197, 229, 0.22);
  border-radius: 7px;
  background: rgba(6, 25, 51, 0.76);
  box-shadow: 0 18px 45px rgba(0, 7, 25, 0.3);
  backdrop-filter: blur(18px);
  animation: intro-float 5s ease-in-out infinite;
}

.intro-orbit-card small {
  color: #70dce7;
  font-size: 9px;
  font-weight: 900;
}

.intro-orbit-card strong {
  font-size: 14px;
}

.intro-orbit-card span {
  color: #9bb6c9;
  font-size: 9px;
  line-height: 1.5;
}

.orbit-course { top: 4%; left: 10%; }
.orbit-lab { top: 24%; right: -2%; animation-delay: -1.2s; }
.orbit-ai { bottom: 9%; right: 8%; animation-delay: -2.4s; }
.orbit-software { bottom: 18%; left: -1%; animation-delay: -3.6s; }

.intro-service-band {
  position: relative;
  z-index: 2;
  padding: 100px max(28px, calc((100vw - 1180px) / 2)) 110px;
  background: #07152d;
}

.intro-section-heading {
  max-width: 720px;
  margin-bottom: 46px;
}

.intro-section-heading p {
  margin: 0 0 12px;
  color: #68dbe5;
  font-size: 11px;
  font-weight: 900;
}

.intro-section-heading h2,
.intro-experience-copy h2 {
  margin: 0;
  color: #f4fbff;
  font-size: clamp(32px, 4.2vw, 52px);
  line-height: 1.2;
}

.intro-service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(139, 186, 215, 0.2);
  border-bottom: 1px solid rgba(139, 186, 215, 0.2);
}

.intro-service-grid article {
  min-height: 230px;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 32px 34px;
  border-right: 1px solid rgba(139, 186, 215, 0.2);
  transition: background 180ms ease, transform 180ms ease;
}

.intro-service-grid article:first-child {
  border-left: 1px solid rgba(139, 186, 215, 0.2);
}

.intro-service-grid article:hover {
  background: rgba(68, 205, 215, 0.06);
  transform: translateY(-4px);
}

.intro-service-grid span {
  color: #5ed9e4;
  font-size: 11px;
  font-weight: 900;
}

.intro-service-grid strong {
  color: #ffffff;
  font-size: 21px;
}

.intro-service-grid p {
  margin: 0;
  color: #9fb7c9;
  font-size: 12px;
  line-height: 1.8;
}

.intro-experience {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(380px, 0.9fr);
  align-items: center;
  gap: clamp(44px, 7vw, 100px);
  padding: 110px max(28px, calc((100vw - 1180px) / 2));
  background: #0b2035;
}

.intro-experience-media {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  border-radius: 8px;
}

.intro-experience-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(4, 21, 38, 0.9));
}

.intro-experience-media img {
  width: 100%;
  height: 100%;
  min-height: 500px;
  object-fit: cover;
  transition: transform 700ms ease;
}

.intro-experience-media:hover img {
  transform: scale(1.03);
}

.intro-experience-media div {
  position: absolute;
  right: 26px;
  bottom: 28px;
  left: 26px;
  z-index: 2;
  display: grid;
  gap: 8px;
}

.intro-experience-media span {
  color: #71e0e7;
  font-size: 10px;
  font-weight: 900;
}

.intro-experience-media strong {
  max-width: 470px;
  color: #ffffff;
  font-size: 24px;
  line-height: 1.35;
}

.intro-experience-copy > p:not(.intro-eyebrow) {
  margin: 22px 0 0;
  color: #a7bfce;
  font-size: 13px;
  line-height: 1.9;
}

.intro-experience-copy ul {
  display: grid;
  gap: 0;
  margin: 30px 0 32px;
  padding: 0;
  border-top: 1px solid rgba(143, 188, 215, 0.2);
  list-style: none;
}

.intro-experience-copy li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 18px;
  padding: 15px 0;
  border-bottom: 1px solid rgba(143, 188, 215, 0.2);
}

.intro-experience-copy li strong {
  color: #eef9ff;
  font-size: 12px;
}

.intro-experience-copy li span {
  color: #8faabb;
  font-size: 11px;
}

.intro-footer {
  position: relative;
  z-index: 2;
  min-height: 108px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px max(28px, calc((100vw - 1180px) / 2));
  border-top: 1px solid rgba(139, 186, 215, 0.18);
  background: #07152d;
}

.intro-footer button {
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid rgba(108, 220, 230, 0.36);
  background: transparent;
  color: #81e5ec;
}

.login-back-btn {
  position: absolute;
  top: clamp(18px, 3vw, 34px);
  left: clamp(18px, 3vw, 38px);
  z-index: 3;
  padding: 0 14px;
  border: 1px solid rgba(133, 180, 255, 0.24);
  background: rgba(8, 19, 42, 0.58);
  color: #edf6ff;
  font-size: 11px;
  backdrop-filter: blur(18px);
}

html[data-theme="day"] .campus-intro {
  background: #edf7f5;
  color: #173f43;
}

html[data-theme="day"] .intro-nav {
  border-color: rgba(24, 115, 111, 0.18);
  background: rgba(250, 255, 254, 0.86);
  box-shadow: 0 16px 44px rgba(48, 93, 91, 0.14);
}

html[data-theme="day"] .intro-brand small,
html[data-theme="day"] .intro-nav nav a {
  color: #517177;
}

html[data-theme="day"] .intro-theme-btn {
  border-color: rgba(24, 115, 111, 0.18);
  background: rgba(22, 143, 136, 0.06);
  color: #37636a;
}

html[data-theme="day"] .intro-login-btn {
  background: #147f7c;
  color: #ffffff;
}

html[data-theme="day"] .intro-hero {
  background:
    linear-gradient(90deg, rgba(240, 250, 248, 0.98) 0%, rgba(237, 249, 247, 0.84) 47%, rgba(237, 249, 247, 0.22) 100%),
    linear-gradient(180deg, rgba(238, 249, 247, 0.03), #edf7f5 100%),
    url("/assets/campus-hero-day-v26.png") center / cover no-repeat;
}

html[data-theme="day"] .intro-hero h1,
html[data-theme="day"] .intro-section-heading h2,
html[data-theme="day"] .intro-experience-copy h2,
html[data-theme="day"] .intro-service-grid strong {
  color: #173f43;
  text-shadow: none;
}

html[data-theme="day"] .intro-hero h1 em,
html[data-theme="day"] .intro-eyebrow,
html[data-theme="day"] .intro-section-heading p {
  color: #087f83;
}

html[data-theme="day"] .intro-summary,
html[data-theme="day"] .intro-secondary,
html[data-theme="day"] .intro-metrics dd,
html[data-theme="day"] .intro-service-grid p,
html[data-theme="day"] .intro-experience-copy > p:not(.intro-eyebrow),
html[data-theme="day"] .intro-experience-copy li span {
  color: #496c72;
  text-shadow: none;
}

html[data-theme="day"] .intro-metrics dt,
html[data-theme="day"] .intro-orbit-card strong,
html[data-theme="day"] .intro-orbit-core strong,
html[data-theme="day"] .intro-experience-copy li strong {
  color: #173f43;
}

html[data-theme="day"] .intro-primary {
  background: #147f7c;
  color: #ffffff;
}

html[data-theme="day"] .intro-orbit-core,
html[data-theme="day"] .intro-orbit-card {
  border-color: rgba(26, 118, 116, 0.18);
  background: rgba(250, 255, 254, 0.82);
  box-shadow: 0 20px 50px rgba(43, 87, 87, 0.14);
}

html[data-theme="day"] .intro-orbit-card span,
html[data-theme="day"] .intro-orbit-core span {
  color: #5c7b80;
}

html[data-theme="day"] .intro-service-band,
html[data-theme="day"] .intro-footer {
  background: #edf7f5;
}

html[data-theme="day"] .intro-service-grid,
html[data-theme="day"] .intro-service-grid article,
html[data-theme="day"] .intro-service-grid article:first-child,
html[data-theme="day"] .intro-experience-copy ul,
html[data-theme="day"] .intro-experience-copy li,
html[data-theme="day"] .intro-footer {
  border-color: rgba(34, 108, 108, 0.18);
}

html[data-theme="day"] .intro-service-grid article:hover {
  background: rgba(22, 143, 136, 0.06);
}

html[data-theme="day"] .intro-experience {
  background: #e3f1ef;
}

html[data-theme="day"] .intro-footer button {
  border-color: rgba(20, 127, 124, 0.32);
  color: #147f7c;
}

html[data-theme="day"] .login-back-btn {
  border-color: rgba(24, 115, 111, 0.2);
  background: rgba(255, 255, 255, 0.78);
  color: #27565d;
}

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

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

@keyframes intro-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .intro-orbit-ring,
  .intro-orbit-card,
  .intro-hero-copy,
  .intro-orbit {
    animation: none;
  }
}

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

  .intro-nav nav {
    display: none;
  }

  .intro-hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 130px;
  }

  .intro-hero-copy {
    max-width: 680px;
  }

  .intro-orbit {
    width: min(620px, 100%);
    justify-self: center;
  }

  .intro-service-grid {
    grid-template-columns: 1fr;
  }

  .intro-service-grid article,
  .intro-service-grid article:first-child {
    min-height: 0;
    border-right: 1px solid rgba(139, 186, 215, 0.2);
    border-bottom: 1px solid rgba(139, 186, 215, 0.2);
  }

  .intro-service-grid article:last-child {
    border-bottom: 0;
  }

  .intro-experience {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .intro-nav {
    top: 10px;
    width: calc(100% - 20px);
    min-height: 58px;
    padding: 7px;
  }

  .intro-brand img {
    width: 38px;
    height: 38px;
  }

  .intro-brand strong {
    font-size: 14px;
  }

  .intro-brand small,
  .intro-theme-btn {
    display: none;
  }

  .intro-login-btn {
    padding: 0 13px;
  }

  .intro-hero {
    gap: 46px;
    padding: 108px 18px 58px;
    background-position: 58% center;
  }

  .intro-hero h1 {
    font-size: clamp(38px, 11vw, 44px);
  }

  .intro-summary {
    font-size: 13px;
  }

  .intro-hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .intro-secondary {
    padding: 10px 0;
    text-align: center;
  }

  .intro-metrics {
    gap: 4px;
    margin-top: 34px;
  }

  .intro-metrics div {
    padding-left: 9px;
  }

  .intro-metrics dt {
    font-size: 20px;
  }

  .intro-metrics dd {
    font-size: 8px;
  }

  .intro-orbit {
    width: 100%;
    min-height: 420px;
    aspect-ratio: auto;
  }

  .intro-orbit-ring-one { inset: 23% 16%; }
  .intro-orbit-ring-two { inset: 13% 5%; }

  .intro-orbit-core {
    width: 132px;
  }

  .intro-orbit-core img {
    width: 46px;
    height: 46px;
  }

  .intro-orbit-card {
    width: 144px;
    padding: 11px;
  }

  .orbit-course { top: 2%; left: 0; }
  .orbit-lab { top: 21%; right: 0; }
  .orbit-ai { right: 3%; bottom: 2%; }
  .orbit-software { bottom: 15%; left: 0; }

  .intro-service-band,
  .intro-experience {
    padding: 72px 18px;
  }

  .intro-service-grid article {
    padding: 25px 20px;
  }

  .intro-experience-media,
  .intro-experience-media img {
    min-height: 340px;
  }

  .intro-experience-copy li {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .intro-footer {
    align-items: stretch;
    flex-direction: column;
    padding: 24px 18px;
  }

  .intro-footer button {
    width: 100%;
  }

  .login-back-btn {
    min-height: 40px;
    width: 40px;
    overflow: hidden;
    padding: 0;
    color: transparent;
  }

  .login-back-btn::before {
    content: "←";
    color: #edf6ff;
    font-size: 17px;
  }

  html[data-theme="day"] .login-back-btn::before {
    color: #27565d;
  }
}

@media (min-width: 821px) {
  .login-form {
    min-height: 0;
    max-height: none;
    height: auto;
    gap: 5px;
    padding: 12px 30px;
  }

  .login-form-heading p {
    margin-top: 3px;
  }

  .login-role-switch,
  .login-auth-switch {
    min-height: 32px;
  }

  .login-role-switch button,
  .login-auth-switch button {
    min-height: 27px;
  }

  .login-identity-grid {
    gap: 6px 12px;
  }

  .login-field {
    gap: 3px;
  }

  .login-field input {
    height: 34px;
  }

  .login-submit,
  .login-guest-btn {
    min-height: 35px;
  }
}

@media (max-width: 820px) {
  .login-wrap {
    place-items: stretch;
    padding: 82px 18px 24px;
    overflow-y: auto;
  }

  .login-panel {
    min-height: calc(100svh - 106px);
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 220px;
    padding: 0 4px 24px;
  }

  .login-welcome {
    padding: 38px 0 18px;
  }

  .login-welcome h1 {
    margin-bottom: 12px;
    font-size: clamp(34px, 11vw, 48px);
  }

  .login-welcome p {
    font-size: 13px;
  }

  .login-visual-footer {
    display: none;
  }

  .login-form {
    min-height: 0;
    align-self: end;
    padding: 28px 22px;
  }
}

@media (max-width: 460px) {
  .login-theme-toggle {
    min-width: 40px;
    width: 40px;
    padding: 0;
  }

  .login-theme-toggle strong {
    display: none;
  }

  .login-brand img {
    width: 48px;
    height: 48px;
  }

  .login-brand strong {
    font-size: 20px;
  }

  .login-welcome h1 {
    font-size: 36px;
  }

  .login-form-heading h2 {
    font-size: 27px;
  }
}

/* Exam page day-theme contrast v30 */

/* Campus identity and SMS login v54 */
.login-form {
  min-height: 620px;
  gap: 14px;
}

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

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

.login-code-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 8px;
}

.login-code-control button {
  border: 1px solid rgba(75, 218, 235, 0.36);
  border-radius: 7px;
  background: rgba(35, 150, 184, 0.16);
  color: #89e9f5;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  transition: 180ms ease;
}

.login-code-control button:hover:not(:disabled) {
  border-color: rgba(75, 218, 235, 0.7);
  background: rgba(35, 150, 184, 0.28);
}

.login-code-control button:disabled {
  cursor: wait;
  opacity: 0.66;
}

.login-guest-btn {
  min-height: 45px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 17px;
  border: 1px solid rgba(137, 233, 245, 0.24);
  border-radius: 7px;
  background: rgba(8, 21, 46, 0.42);
  color: #dcecff;
  font: inherit;
  cursor: pointer;
  transition: 180ms ease;
}

.login-guest-btn span {
  font-size: 12px;
  font-weight: 900;
}

.login-guest-btn small {
  color: #829ab8;
  font-size: 10px;
}

.login-guest-btn:hover:not(:disabled) {
  border-color: rgba(137, 233, 245, 0.52);
  background: rgba(28, 65, 102, 0.46);
  transform: translateY(-1px);
}

.login-guest-btn:disabled {
  cursor: wait;
  opacity: 0.62;
}

html[data-theme="day"] .login-code-control button {
  border-color: rgba(22, 143, 136, 0.28);
  background: rgba(22, 143, 136, 0.08);
  color: #167a78;
}

html[data-theme="day"] .login-guest-btn {
  border-color: rgba(22, 143, 136, 0.2);
  background: rgba(241, 250, 249, 0.74);
  color: #24585b;
}

html[data-theme="day"] .login-guest-btn small {
  color: #6a8588;
}

@media (max-width: 820px) {
  .login-form {
    min-height: 0;
  }
}

/* Final desktop login fit override: keep after legacy login rules. */
@media (min-width: 821px) {
  .login-form {
    min-height: 0;
    max-height: none;
    height: auto;
    gap: 5px;
    padding: 12px 30px;
  }

  .login-form-heading p {
    margin-top: 3px;
  }

  .login-role-switch,
  .login-auth-switch {
    min-height: 32px;
  }

  .login-role-switch button,
  .login-auth-switch button {
    min-height: 27px;
  }

  .login-identity-grid {
    gap: 6px 12px;
  }

  .login-field {
    gap: 3px;
  }

  .login-field input {
    height: 34px;
  }

  .login-submit,
  .login-guest-btn {
    min-height: 35px;
  }
}

@media (max-width: 540px) {
  .login-identity-grid {
    grid-template-columns: 1fr;
  }

  .login-field-wide {
    grid-column: auto;
  }

  .login-code-control {
    grid-template-columns: minmax(0, 1fr) 104px;
  }
}

html[data-theme="day"] .exam-kicker {
  color: #167b82;
}

/* Login identity card polish v88 */
.login-form {
  position: relative;
  overflow: hidden;
}

.login-form::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background:
    radial-gradient(circle at 14% 0%, rgba(79, 218, 235, 0.16), transparent 30%),
    radial-gradient(circle at 100% 22%, rgba(91, 105, 242, 0.14), transparent 26%);
  pointer-events: none;
}

.login-form-heading {
  position: relative;
  padding-left: 15px;
}

.login-form-heading::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 4px;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(180deg, #31d7ff, #3f6dff);
  box-shadow: 0 0 18px rgba(49, 215, 255, 0.36);
}

.login-form-heading h2 {
  letter-spacing: 0;
}

.login-role-switch,
.login-auth-switch {
  border-radius: 10px;
  background: rgba(6, 20, 42, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.login-role-switch button,
.login-auth-switch button {
  border-radius: 8px;
  font-size: 14px;
}

.login-role-switch button.active,
.login-auth-switch button.active {
  background: linear-gradient(135deg, #28a8dc, #5067f1);
  box-shadow: 0 10px 24px rgba(39, 126, 220, 0.26);
}

.login-identity-grid {
  padding: 2px;
}

.login-field span {
  letter-spacing: 0;
}

.login-field input {
  border-radius: 9px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.login-field input::placeholder {
  color: rgba(174, 191, 214, 0.68);
}

.login-code-control button {
  min-height: 100%;
  border-radius: 9px;
}

.login-submit {
  border: 0;
  border-radius: 9px;
  box-shadow: 0 16px 30px rgba(17, 117, 157, 0.24);
}

.login-submit span {
  font-size: 15px;
  font-weight: 950;
}

.login-guest-btn {
  border-radius: 9px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

html[data-theme="day"] .login-form {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 253, 252, 0.82));
  box-shadow: 0 28px 70px rgba(41, 91, 94, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

html[data-theme="day"] .login-form::before {
  background:
    radial-gradient(circle at 14% 0%, rgba(22, 143, 136, 0.11), transparent 31%),
    radial-gradient(circle at 100% 22%, rgba(41, 122, 160, 0.1), transparent 28%);
}

html[data-theme="day"] .login-form-heading::before {
  background: linear-gradient(180deg, #16a39c, #2b7d9e);
  box-shadow: 0 0 18px rgba(22, 143, 136, 0.24);
}

html[data-theme="day"] .login-role-switch,
html[data-theme="day"] .login-auth-switch {
  border-color: rgba(43, 108, 113, 0.18);
  background: rgba(231, 246, 246, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

html[data-theme="day"] .login-role-switch button,
html[data-theme="day"] .login-auth-switch button {
  color: #486d73;
}

html[data-theme="day"] .login-role-switch button.active,
html[data-theme="day"] .login-auth-switch button.active {
  background: linear-gradient(135deg, #28a8dc, #5067f1);
  color: #fff;
  box-shadow: 0 10px 22px rgba(41, 122, 160, 0.18);
}

html[data-theme="day"] .login-field input {
  background: rgba(250, 254, 253, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

html[data-theme="day"] .login-field input::placeholder {
  color: #8ca0a4;
}

html[data-theme="day"] .login-code-control button {
  background: rgba(238, 251, 250, 0.9);
}

html[data-theme="day"] .login-submit {
  background: linear-gradient(135deg, #139891, #287ea4);
  box-shadow: 0 16px 30px rgba(31, 125, 132, 0.2);
}

@media (min-width: 821px) {
  .login-form {
    border-radius: 14px;
  }

  .login-role-switch,
  .login-auth-switch {
    min-height: 44px;
  }
}

/* Login one-screen fit v87 */
@media (min-width: 821px) {
  .login-wrap {
    height: 100svh;
    min-height: 100svh;
    max-height: 100svh;
    padding: 24px clamp(28px, 4vw, 54px);
    place-items: center;
    overflow: hidden;
  }

  .login-panel {
    width: min(1120px, calc(100vw - 96px));
    min-height: 0;
    height: min(650px, calc(100svh - 48px));
    grid-template-columns: minmax(0, 1fr) minmax(360px, 464px);
    align-items: center;
  }

  .login-visual {
    height: 100%;
    padding: 64px clamp(34px, 5vw, 72px) 54px 0;
  }

  .login-brand img {
    width: 52px;
    height: 52px;
  }

  .login-brand strong {
    font-size: 22px;
  }

  .login-welcome {
    max-width: 580px;
    padding: 34px 0 22px;
  }

  .login-welcome h1 {
    margin-bottom: 16px;
    font-size: clamp(44px, 4.8vw, 62px);
    line-height: 1.1;
  }

  .login-welcome p {
    font-size: 14px;
    line-height: 1.72;
  }

  .login-form {
    width: 100%;
    min-height: 0;
    max-height: calc(100svh - 128px);
    align-content: start;
    gap: 10px;
    padding: 28px 36px;
    overflow: hidden;
  }

  .login-form-heading {
    margin-bottom: 2px;
  }

  .login-form-heading h2 {
    font-size: 28px;
  }

  .login-form-heading p {
    margin-top: 6px;
    font-size: 12px;
  }

  .login-role-switch,
  .login-auth-switch {
    gap: 3px;
    padding: 3px;
  }

  .login-role-switch button,
  .login-auth-switch button {
    min-height: 36px;
  }

  .login-identity-grid {
    gap: 9px 12px;
  }

  .login-field {
    gap: 5px;
  }

  .login-field span {
    font-size: 11px;
  }

  .login-field input {
    height: 42px;
    padding: 0 12px;
  }

  .login-code-control {
    grid-template-columns: minmax(0, 1fr) 108px;
    gap: 8px;
  }

  .login-submit {
    min-height: 46px;
    margin-top: 2px;
  }

  .login-guest-btn {
    min-height: 42px;
  }

  .login-form {
    border-radius: 14px;
  }

  .login-role-switch,
  .login-auth-switch {
    min-height: 42px;
    border-radius: 10px;
  }

  .login-role-switch button,
  .login-auth-switch button {
    border-radius: 8px;
    font-size: 13px;
    font-weight: 900;
  }
}

@media (min-width: 821px) and (max-height: 700px) {
  .login-wrap {
    padding-block: 18px;
  }

  .login-panel {
    height: calc(100svh - 36px);
  }

  .login-visual {
    padding-top: 44px;
    padding-bottom: 34px;
  }

  .login-welcome h1 {
    font-size: clamp(38px, 4.3vw, 52px);
  }

  .login-visual-footer {
    display: none;
  }

  .login-form {
    max-height: calc(100svh - 92px);
    gap: 8px;
    padding: 24px 32px;
  }

  .login-field input {
    height: 39px;
  }

  .login-role-switch button,
  .login-auth-switch button {
    min-height: 34px;
  }

  .login-submit,
  .login-guest-btn {
    min-height: 40px;
  }
}

html[data-theme="day"] .exam-hero .source-meta span {
  border-color: rgba(24, 111, 122, 0.32);
  background: rgba(222, 241, 241, 0.92);
  color: #245c66;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
  font-weight: 800;
}

html[data-theme="day"] .exam-meta-row span {
  border-color: rgba(24, 116, 132, 0.27);
  background: rgba(226, 245, 246, 0.9);
  color: #28616c;
}

html[data-theme="day"] .exam-timeline span,
html[data-theme="day"] .exam-source,
html[data-theme="day"] .exam-risk {
  color: #536c73;
}

html[data-theme="day"] .exam-timeline strong {
  color: #24464e;
}

html[data-theme="day"] .exam-card .badge {
  border-color: rgba(35, 100, 150, 0.3);
  background: rgba(223, 238, 250, 0.92);
  color: #285f86;
}

html[data-theme="day"] .exam-card .badge.warning {
  border-color: rgba(157, 94, 0, 0.3);
  background: rgba(255, 241, 216, 0.94);
  color: #925700;
}

/* Global day-theme information contrast v31 */
html[data-theme="day"] .badge {
  border: 1px solid rgba(35, 100, 150, 0.26);
  background: rgba(223, 238, 250, 0.92);
  color: #285f86;
  text-shadow: none;
}

html[data-theme="day"] .badge.success {
  border-color: rgba(17, 119, 112, 0.28);
  background: rgba(218, 243, 239, 0.94);
  color: #176b67;
}

html[data-theme="day"] .badge.warning {
  border-color: rgba(157, 94, 0, 0.28);
  background: rgba(255, 241, 216, 0.94);
  color: #925700;
}

html[data-theme="day"] .source-meta span {
  border-color: rgba(24, 111, 122, 0.3);
  background: rgba(222, 241, 241, 0.92);
  color: #245c66;
  font-weight: 800;
}

html[data-theme="day"] .news-source-chip {
  border-color: rgba(49, 110, 118, 0.2);
  background: rgba(255, 255, 255, 0.82);
  color: #24464e;
}

html[data-theme="day"] .news-source-chip span {
  color: #526d74;
}

html[data-theme="day"] .news-source-chip.ok {
  border-color: rgba(17, 119, 112, 0.28);
  background: rgba(218, 243, 239, 0.82);
}

html[data-theme="day"] .news-source-chip.ok span {
  color: #176b67;
}

html[data-theme="day"] .news-source-chip.locked {
  border-color: rgba(157, 94, 0, 0.24);
  background: rgba(255, 241, 216, 0.82);
}

html[data-theme="day"] .news-source-chip.locked span {
  color: #925700;
}

html[data-theme="day"] .news-source-card .section-title,
html[data-theme="day"] .news-item h3 {
  color: #15313a;
}

html[data-theme="day"] .news-source-card .muted,
html[data-theme="day"] .news-item p {
  color: #405f67;
}

html[data-theme="day"] .news-item time {
  color: #5d737a;
  font-weight: 700;
}

html[data-theme="day"] .news-item a,
html[data-theme="day"] .news-source-card .section-title button {
  color: #0d6f73;
  font-weight: 800;
}

html[data-theme="day"] .news-import-form input,
html[data-theme="day"] .news-import-form select {
  border-color: rgba(34, 106, 115, 0.24);
  background: rgba(255, 255, 255, 0.94);
  color: #17353d;
}

html[data-theme="day"] .news-import-form input::placeholder {
  color: #788d92;
}

html[data-theme="day"] .library-floor-tabs button {
  border-color: rgba(49, 110, 118, 0.2);
  background: rgba(255, 255, 255, 0.82);
  color: #24464e;
}

html[data-theme="day"] .library-floor-tabs span {
  color: #526d74;
}

html[data-theme="day"] .library-floor-tabs button.active,
html[data-theme="day"] .library-floor-tabs button:hover {
  border-color: rgba(22, 143, 136, 0.44);
  background: rgba(218, 243, 239, 0.94);
  color: #155f5c;
}

html[data-theme="day"] .tools-hero-metrics span {
  border-color: rgba(49, 110, 118, 0.2);
  background: rgba(255, 255, 255, 0.78);
  color: #526d74;
}

html[data-theme="day"] .tools-hero-metrics strong {
  color: #204c54;
}

html[data-theme="day"] .sidebar-card {
  border-color: rgba(41, 125, 124, 0.26);
  background:
    linear-gradient(180deg, rgba(19, 105, 103, 0.18), rgba(14, 62, 72, 0.58)),
    url("/assets/campus-hero-day-v26.png") center / cover;
}

html[data-theme="day"] .dash-card,
html[data-theme="day"] .card,
html[data-theme="day"] .module-card,
html[data-theme="day"] .tool-panel,
html[data-theme="day"] .engine-card,
html[data-theme="day"] .row,
html[data-theme="day"] .course-item {
  border-color: rgba(48, 112, 119, 0.16);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 35px rgba(45, 84, 92, 0.09);
}

html[data-theme="day"] .search-box,
html[data-theme="day"] .exam-search,
html[data-theme="day"] input,
html[data-theme="day"] select,
html[data-theme="day"] textarea {
  border-color: rgba(49, 110, 118, 0.2);
  background: rgba(255, 255, 255, 0.84);
  color: #17353d;
}

html[data-theme="day"] input::placeholder,
html[data-theme="day"] textarea::placeholder {
  color: #91a1a5;
}

/* Timetable day-theme contrast v84 */
html[data-theme="day"] .timetable-summary .dash-card {
  border-color: rgba(25, 129, 136, 0.18);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(232, 248, 247, 0.84));
}

html[data-theme="day"] .timetable-summary span,
html[data-theme="day"] .timetable-summary p,
html[data-theme="day"] .import-stats span {
  color: #526f77;
}

html[data-theme="day"] .timetable-summary strong,
html[data-theme="day"] .import-stats strong {
  color: #123f48;
}

html[data-theme="day"] .smart-timetable {
  background: rgba(255, 255, 255, 0.91);
}

html[data-theme="day"] .timetable-image-panel {
  background: rgba(255, 255, 255, 0.92);
}

html[data-theme="day"] .timetable-image-head h2 {
  color: #173f45;
}

html[data-theme="day"] .timetable-image-head p {
  color: #60787e;
}

html[data-theme="day"] .timetable-image-frame {
  border-color: rgba(31, 125, 132, 0.2);
  background: rgba(247, 252, 250, 0.84);
}

html[data-theme="day"] .timetable-toolbar button {
  border-color: rgba(22, 126, 132, 0.24);
  background: rgba(235, 249, 248, 0.92);
  color: #17666f;
  box-shadow: 0 8px 18px rgba(45, 116, 122, 0.08);
}

html[data-theme="day"] .timetable-board-head h2 {
  color: #173f45;
}

html[data-theme="day"] .timetable-board-kicker {
  color: #16818d;
}

html[data-theme="day"] .week-one-start-field small {
  color: #6f8589;
}

html[data-theme="day"] .week-board {
  scrollbar-color: rgba(38, 128, 136, 0.42) transparent;
}

html[data-theme="day"] .day-column {
  border-color: rgba(41, 121, 129, 0.2);
  background: linear-gradient(180deg, rgba(249, 253, 253, 0.95), rgba(235, 248, 247, 0.74));
}

html[data-theme="day"] .day-column.today {
  border-color: rgba(18, 143, 141, 0.58);
  box-shadow: inset 0 0 24px rgba(38, 166, 154, 0.14), 0 12px 28px rgba(45, 116, 122, 0.08);
}

html[data-theme="day"] .day-column h3 {
  color: #17464e;
}

html[data-theme="day"] .course-block {
  border-left-color: #149d9a;
  background: linear-gradient(135deg, rgba(227, 248, 247, 0.96), rgba(255, 255, 255, 0.92));
  box-shadow: inset 0 0 0 1px rgba(32, 130, 135, 0.08);
}

html[data-theme="day"] .course-block:hover {
  border-left-color: #0f7fb2;
  box-shadow: 0 14px 30px rgba(38, 121, 138, 0.16);
}

html[data-theme="day"] .course-block time,
html[data-theme="day"] .course-block span,
html[data-theme="day"] .course-block small {
  color: #4e6b73;
}

html[data-theme="day"] .course-block strong {
  color: #123b43;
}

html[data-theme="day"] .course-block em {
  color: #147883;
  font-weight: 800;
}

html[data-theme="day"] .empty-day {
  border-color: rgba(34, 123, 130, 0.24);
  background: rgba(245, 251, 251, 0.76);
  color: #6a8086;
}

html[data-theme="day"] .timetable-edit-modal {
  background: rgba(225, 242, 243, 0.78);
}

html[data-theme="day"] .timetable-edit-card {
  border-color: rgba(26, 127, 137, 0.24);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 249, 248, 0.98));
  box-shadow: 0 28px 80px rgba(40, 99, 105, 0.2);
}

html[data-theme="day"] .timetable-studio {
  background:
    radial-gradient(circle at 92% 12%, rgba(255, 178, 74, 0.22), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(221, 246, 245, 0.9));
}

html[data-theme="day"] .timetable-studio-copy h2 {
  color: #123f48;
}

html[data-theme="day"] .timetable-studio-copy p {
  color: #536f76;
}

html[data-theme="day"] .timetable-control-grid {
  border-color: rgba(30, 127, 135, 0.18);
  background: rgba(255, 255, 255, 0.72);
}

html[data-theme="day"] .timetable-control-grid label,
html[data-theme="day"] .schedule-switch {
  color: #245760;
}

html[data-theme="day"] .week-switcher button,
html[data-theme="day"] .schedule-switch button {
  border-color: rgba(31, 125, 132, 0.2);
  background: rgba(245, 252, 251, 0.92);
  color: #245760;
}

html[data-theme="day"] .schedule-switch button.active {
  background: linear-gradient(135deg, #168f88, #297aa0);
  color: #fff;
}

html[data-theme="day"] .timetable-note-row span {
  border-color: rgba(33, 124, 132, 0.17);
  background: rgba(236, 249, 248, 0.88);
  color: #557178;
}

html[data-theme="day"] .timetable-grid-wrap {
  border-color: rgba(31, 125, 132, 0.2);
  background:
    linear-gradient(90deg, rgba(56, 124, 130, 0.055) 1px, transparent 1px) 0 0 / 28px 28px,
    #fffef3;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.76);
}

html[data-theme="day"] .grid-corner,
html[data-theme="day"] .grid-day,
html[data-theme="day"] .grid-time,
html[data-theme="day"] .grid-slot {
  border-color: rgba(63, 91, 76, 0.19);
}

html[data-theme="day"] .grid-corner,
html[data-theme="day"] .grid-time {
  background: rgba(247, 250, 238, 0.84);
  color: #52645e;
}

html[data-theme="day"] .grid-time strong {
  color: #4b5c57;
}

html[data-theme="day"] .grid-time span {
  color: #258198;
}

html[data-theme="day"] .grid-day {
  background: linear-gradient(180deg, rgba(244, 250, 241, 0.94), rgba(255, 253, 238, 0.82));
  color: #344d48;
}

html[data-theme="day"] .grid-day span {
  color: #79857f;
}

html[data-theme="day"] .grid-day.today {
  background: linear-gradient(180deg, rgba(206, 244, 240, 0.94), rgba(255, 250, 225, 0.86));
}

html[data-theme="day"] .grid-slot {
  background: rgba(255, 254, 243, 0.55);
}

html[data-theme="day"] .grid-slot:hover {
  background: rgba(25, 143, 140, 0.09);
}

html[data-theme="day"] .import-format-card {
  border-color: rgba(31, 125, 132, 0.26);
  background: rgba(237, 249, 248, 0.9);
}

html[data-theme="day"] .import-format-card strong {
  color: #17666f;
}

html[data-theme="day"] .import-format-card span {
  color: #60777d;
}

html[data-theme="day"] .modal-title-row h2 {
  color: #173e42;
}

html[data-theme="day"] .modal-title-row button {
  border-color: rgba(31, 125, 132, 0.22);
  background: rgba(236, 249, 248, 0.9);
  color: #27535d;
}

html[data-theme="day"] .import-textarea,
html[data-theme="day"] .import-stats span {
  border-color: rgba(41, 121, 129, 0.2);
  background: rgba(255, 255, 255, 0.9);
}

html[data-theme="day"] .theme-toggle {
  border-color: rgba(31, 130, 121, 0.25);
  background: #ffffff;
  color: #31565e;
  box-shadow: 0 8px 22px rgba(47, 101, 103, 0.1);
}

html[data-theme="day"] .bell-btn,
html[data-theme="day"] .user-chip {
  border-color: rgba(47, 112, 119, 0.18);
  background: rgba(255, 255, 255, 0.84);
  color: #27535d;
}

html[data-theme="day"] .user-chip-copy small {
  color: rgba(39, 83, 93, 0.58);
}

html[data-theme="day"] .avatar {
  border-color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(35, 109, 115, 0.18);
}

/* Global utility bar: quiet, consistent, and shared by every authenticated page. */
.shell .topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 62px;
  height: auto;
  margin: 0 0 18px;
  padding: 9px 10px 9px 12px;
  border: 0;
  border-bottom: 1px solid rgba(135, 169, 235, 0.2);
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(7, 18, 40, 0.78), rgba(10, 24, 52, 0.58) 58%, rgba(17, 32, 64, 0.72));
  box-shadow: 0 14px 34px rgba(2, 9, 24, 0.12);
  isolation: isolate;
}

.shell .topbar::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 10px;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(67, 221, 216, 0.55), rgba(92, 130, 255, 0.42), transparent);
}

.shell .top-left {
  min-width: 170px;
  gap: 10px;
}

.shell .menu-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #d9e7ff;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.shell .menu-btn:hover {
  border-color: rgba(107, 213, 226, 0.25);
  background: rgba(82, 137, 215, 0.12);
  color: #75e1e0;
}

.shell .page-title {
  letter-spacing: 0;
  color: #f5f8ff;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.15;
}

.shell .top-actions {
  min-width: 0;
  gap: 9px;
}

.shell .topbar .search-box {
  width: clamp(260px, 30vw, 380px);
  height: 42px;
  padding: 0 13px;
  border-color: rgba(143, 174, 235, 0.22);
  border-radius: 8px;
  background: rgba(7, 18, 41, 0.48);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.shell .topbar .search-box:focus-within {
  border-color: rgba(69, 212, 210, 0.52);
  background: rgba(9, 23, 51, 0.74);
  box-shadow: 0 0 0 3px rgba(45, 192, 192, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.shell .topbar .theme-toggle,
.shell .topbar .bell-btn,
.shell .topbar .user-chip {
  min-height: 42px;
  height: 42px;
  border-color: rgba(143, 174, 235, 0.2);
  border-radius: 8px;
  background: rgba(12, 27, 56, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.shell .topbar .theme-toggle {
  min-width: 92px;
  padding: 0 13px;
}

.shell .topbar .bell-btn {
  width: 42px;
}

.shell .topbar .user-chip {
  min-width: 126px;
  padding: 4px 9px 4px 5px;
}

.shell .topbar .theme-toggle:hover,
.shell .topbar .bell-btn:hover,
.shell .topbar .user-chip:hover {
  border-color: rgba(76, 215, 211, 0.38);
  background: rgba(34, 67, 105, 0.58);
  box-shadow: 0 8px 22px rgba(1, 10, 27, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.shell .topbar .avatar {
  width: 32px;
  height: 32px;
  box-shadow: 0 0 0 2px rgba(92, 222, 219, 0.08), 0 6px 16px rgba(89, 90, 240, 0.28);
}

html[data-theme="day"] .shell .topbar {
  border-bottom-color: rgba(43, 117, 125, 0.16);
  background: linear-gradient(90deg, rgba(249, 253, 252, 0.86), rgba(239, 249, 249, 0.68) 58%, rgba(246, 252, 251, 0.82));
  box-shadow: 0 12px 30px rgba(45, 84, 92, 0.07);
}

html[data-theme="day"] .shell .topbar::after {
  background: linear-gradient(90deg, transparent, rgba(18, 145, 141, 0.42), rgba(63, 116, 220, 0.25), transparent);
}

html[data-theme="day"] .shell .page-title {
  color: #183f46;
}

html[data-theme="day"] .shell .menu-btn {
  color: #315e66;
}

html[data-theme="day"] .shell .menu-btn:hover {
  border-color: rgba(28, 139, 137, 0.22);
  background: rgba(26, 143, 139, 0.08);
  color: #137a79;
}

html[data-theme="day"] .shell .topbar .search-box,
html[data-theme="day"] .shell .topbar .theme-toggle,
html[data-theme="day"] .shell .topbar .bell-btn,
html[data-theme="day"] .shell .topbar .user-chip {
  border-color: rgba(43, 111, 119, 0.16);
  background: rgba(255, 255, 255, 0.68);
  color: #27535d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

html[data-theme="day"] .shell .topbar .search-box:focus-within {
  border-color: rgba(18, 139, 135, 0.44);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 3px rgba(24, 144, 140, 0.08);
}

html[data-theme="day"] .shell .topbar .theme-toggle:hover,
html[data-theme="day"] .shell .topbar .bell-btn:hover,
html[data-theme="day"] .shell .topbar .user-chip:hover {
  border-color: rgba(18, 139, 135, 0.3);
  background: rgba(235, 248, 246, 0.94);
  box-shadow: 0 8px 22px rgba(39, 91, 96, 0.09);
}

@media (max-width: 1000px) {
  .shell .topbar .search-box {
    display: none;
  }
}

@media (max-width: 760px) {
  .shell .topbar {
    min-height: 54px;
    padding: 6px 5px 7px 8px;
    margin-bottom: 10px;
  }

  .shell .top-left {
    min-width: 0;
  }

  .shell .menu-btn {
    display: none;
  }

  .shell .page-title {
    font-size: 18px;
  }

  .shell .topbar .theme-toggle,
  .shell .topbar .bell-btn,
  .shell .topbar .user-chip {
    min-height: 38px;
    height: 38px;
  }

  .shell .topbar .theme-toggle {
    min-width: 38px;
    width: 38px;
    padding: 0;
  }
}

/* Theme-aware sidebar shared by every authenticated page. */
.shell .sidebar {
  border-right-color: rgba(80, 198, 214, 0.18);
  background:
    radial-gradient(circle at 18% 4%, rgba(47, 190, 200, 0.18), transparent 28%),
    radial-gradient(circle at 88% 82%, rgba(90, 88, 220, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(5, 23, 43, 0.97), rgba(7, 24, 49, 0.95) 52%, rgba(8, 19, 41, 0.97));
  box-shadow: 14px 0 44px rgba(1, 9, 24, 0.22), inset -1px 0 0 rgba(255, 255, 255, 0.025);
  scrollbar-color: rgba(62, 182, 196, 0.58) rgba(6, 25, 46, 0.3);
  transition: background 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.shell .brand {
  min-height: 58px;
  margin: 0 2px 2px;
  padding: 0 7px 12px;
  border-bottom: 1px solid rgba(105, 191, 210, 0.13);
}

.shell .brand img {
  border: 2px solid rgba(214, 251, 255, 0.72);
  box-shadow: 0 8px 24px rgba(21, 181, 201, 0.24);
}

.shell .brand-title {
  color: #f5fbff;
  letter-spacing: 0;
}

.shell .brand-subtitle {
  color: rgba(160, 221, 231, 0.72);
  letter-spacing: 1.1px;
}

.shell .nav {
  gap: 15px;
}

.shell .nav-section {
  gap: 5px;
}

.shell .nav-label {
  padding: 0 9px;
  color: rgba(123, 174, 195, 0.72);
  font-size: 10.5px;
}

.shell .nav button {
  min-height: 44px;
  padding: 9px 10px;
  border-radius: 8px;
  color: #c7d9e8;
  font-weight: 750;
}

.shell .nav button .nav-icon {
  border-color: rgba(93, 183, 202, 0.2);
  background: rgba(32, 112, 137, 0.1);
  color: #8ad6e0;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.shell .nav button:hover {
  border-color: rgba(73, 195, 202, 0.22);
  background: rgba(30, 109, 139, 0.14);
  box-shadow: inset 3px 0 0 rgba(72, 215, 210, 0.68);
  color: #f2fbff;
}

.shell .nav button.active {
  border-color: rgba(83, 225, 220, 0.36);
  background: linear-gradient(135deg, rgba(16, 156, 153, 0.96), rgba(37, 111, 174, 0.96));
  box-shadow: 0 12px 26px rgba(5, 93, 128, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.shell .nav button.active .nav-icon,
.shell .nav button:hover .nav-icon {
  border-color: rgba(220, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.11);
  color: #ffffff;
}

.shell .sidebar::-webkit-scrollbar-track {
  background: rgba(5, 25, 45, 0.28);
}

.shell .sidebar::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(67, 194, 199, 0.68), rgba(57, 103, 176, 0.62)) padding-box;
}

html[data-theme="day"] .shell .sidebar {
  border-right-color: rgba(35, 119, 125, 0.15);
  background:
    radial-gradient(circle at 12% 3%, rgba(66, 185, 190, 0.14), transparent 27%),
    radial-gradient(circle at 92% 78%, rgba(99, 139, 224, 0.09), transparent 32%),
    radial-gradient(circle at 18% 96%, rgba(242, 184, 89, 0.09), transparent 22%),
    linear-gradient(180deg, rgba(250, 254, 252, 0.98), rgba(237, 248, 246, 0.97) 55%, rgba(242, 249, 248, 0.98));
  box-shadow: 12px 0 38px rgba(43, 88, 93, 0.09), inset -1px 0 0 rgba(255, 255, 255, 0.68);
  scrollbar-color: rgba(37, 137, 145, 0.46) rgba(220, 239, 237, 0.42);
}

html[data-theme="day"] .shell .brand {
  border-bottom-color: rgba(43, 121, 128, 0.13);
}

html[data-theme="day"] .shell .brand img {
  border-color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 22px rgba(38, 126, 133, 0.18);
}

html[data-theme="day"] .shell .brand-title {
  color: #163f47;
}

html[data-theme="day"] .shell .brand-subtitle {
  color: #55777d;
}

html[data-theme="day"] .shell .nav-label {
  color: #6a858a;
}

html[data-theme="day"] .shell .nav button {
  color: #365a61;
}

html[data-theme="day"] .shell .nav button .nav-icon {
  border-color: rgba(33, 125, 132, 0.18);
  background: rgba(29, 137, 139, 0.07);
  color: #207981;
}

html[data-theme="day"] .shell .nav button:hover {
  border-color: rgba(27, 137, 136, 0.2);
  background: rgba(222, 244, 241, 0.82);
  box-shadow: inset 3px 0 0 rgba(23, 148, 142, 0.58);
  color: #174e55;
}

html[data-theme="day"] .shell .nav button.active {
  border-color: rgba(21, 132, 129, 0.32);
  background: linear-gradient(135deg, #15958f, #287fa4);
  box-shadow: 0 12px 26px rgba(27, 112, 118, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

html[data-theme="day"] .shell .nav button.active .nav-icon,
html[data-theme="day"] .shell .nav button:hover .nav-icon {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
}

html[data-theme="day"] .shell .sidebar::-webkit-scrollbar-track {
  background: rgba(219, 239, 237, 0.42);
}

html[data-theme="day"] .shell .sidebar::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(42, 151, 155, 0.58), rgba(46, 111, 145, 0.5)) padding-box;
}

/* Frameless command strip: content floats without another full-width card. */
.shell .topbar {
  min-height: 56px;
  margin: 0 0 14px;
  padding: 6px 0;
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(6, 17, 37, 0.54), rgba(6, 17, 37, 0.18) 72%, transparent);
  box-shadow: none;
  backdrop-filter: blur(12px) saturate(1.08);
  -webkit-backdrop-filter: blur(12px) saturate(1.08);
}

.shell .topbar::after {
  display: none;
}

.shell .top-left {
  min-width: 150px;
  gap: 8px;
}

.shell .top-left::before {
  content: "";
  width: 3px;
  height: 24px;
  border-radius: 3px;
  background: linear-gradient(180deg, #54d9d1, #5272e9);
  box-shadow: 0 0 14px rgba(72, 204, 209, 0.24);
}

.shell .menu-btn {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
}

.shell .page-title {
  font-size: 20px;
}

.shell .topbar .search-box {
  height: 40px;
  border-color: rgba(135, 171, 226, 0.16);
  border-radius: 999px;
  background: rgba(9, 23, 48, 0.42);
  box-shadow: none;
}

.shell .topbar .theme-toggle,
.shell .topbar .bell-btn,
.shell .topbar .user-chip {
  min-height: 40px;
  height: 40px;
  border-color: rgba(132, 172, 226, 0.17);
  background: rgba(11, 27, 55, 0.44);
  box-shadow: none;
}

.shell .topbar .theme-toggle {
  min-width: 84px;
  padding: 0 11px;
}

.shell .topbar .bell-btn {
  width: 40px;
}

.shell .topbar .user-chip {
  min-width: 120px;
  padding-right: 8px;
}

.shell .topbar .avatar {
  width: 30px;
  height: 30px;
}

.shell .topbar .theme-toggle:hover,
.shell .topbar .bell-btn:hover,
.shell .topbar .user-chip:hover {
  border-color: rgba(74, 213, 207, 0.34);
  background: rgba(30, 62, 94, 0.6);
  box-shadow: 0 8px 20px rgba(1, 9, 25, 0.14);
}

html[data-theme="day"] .shell .topbar {
  background: linear-gradient(180deg, rgba(241, 250, 249, 0.64), rgba(241, 250, 249, 0.2) 72%, transparent);
  box-shadow: none;
}

html[data-theme="day"] .shell .top-left::before {
  background: linear-gradient(180deg, #20a59f, #4b75c9);
  box-shadow: 0 0 12px rgba(31, 147, 146, 0.17);
}

html[data-theme="day"] .shell .topbar .search-box,
html[data-theme="day"] .shell .topbar .theme-toggle,
html[data-theme="day"] .shell .topbar .bell-btn,
html[data-theme="day"] .shell .topbar .user-chip {
  border-color: rgba(42, 111, 119, 0.14);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: none;
}

html[data-theme="day"] .shell .topbar .theme-toggle:hover,
html[data-theme="day"] .shell .topbar .bell-btn:hover,
html[data-theme="day"] .shell .topbar .user-chip:hover {
  border-color: rgba(21, 139, 135, 0.27);
  background: rgba(237, 249, 247, 0.9);
  box-shadow: 0 7px 18px rgba(37, 89, 94, 0.07);
}

@media (max-width: 760px) {
  .shell .topbar {
    min-height: 48px;
    padding: 4px 0 5px;
    margin-bottom: 9px;
  }

  .shell .top-left::before {
    height: 20px;
  }

  .shell .topbar .theme-toggle,
  .shell .topbar .bell-btn,
  .shell .topbar .user-chip {
    min-height: 38px;
    height: 38px;
  }
}

html[data-theme="day"] .home-hero {
  background: url("/assets/campus-hero-day-v26.png") center / cover no-repeat;
  box-shadow: 0 18px 46px rgba(42, 91, 91, 0.18);
}

html[data-theme="day"] .home-hero::after {
  width: 58%;
  height: 100%;
  background: linear-gradient(90deg, rgba(246, 252, 249, 0.98) 0%, rgba(242, 250, 247, 0.9) 62%, rgba(242, 250, 247, 0) 100%);
}

html[data-theme="day"] .hero-copy h2 {
  color: #173b42;
  text-shadow: none;
}

html[data-theme="day"] .hero-copy p {
  color: #4d696f;
}

html[data-theme="day"] .weather-card,
html[data-theme="day"] .date-card {
  border-color: rgba(35, 124, 120, 0.2);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 28px rgba(46, 91, 92, 0.12);
  color: #1e4c54;
}

html[data-theme="day"] .weather-card span,
html[data-theme="day"] .date-card span {
  color: #557078;
}

html[data-theme="day"] .weather-copy small {
  color: #6d858a;
}

html[data-theme="day"] .moon {
  color: #df9b2e;
}

html[data-theme="day"] .module-group {
  border-color: rgba(45, 112, 119, 0.14);
  background: rgba(230, 241, 239, 0.72);
}

html[data-theme="day"] .module-group-title strong {
  color: #214850;
}

html[data-theme="day"] .module-group-title span {
  color: #71868b;
}

html[data-theme="day"] .module-card {
  border-color: rgba(45, 112, 119, 0.14);
  background: rgba(255, 255, 255, 0.9);
  color: #17353d;
}

html[data-theme="day"] .primary-btn {
  background: linear-gradient(135deg, #168f88, #297aa0);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(26, 118, 119, 0.2);
}

html[data-theme="day"] .ghost-btn,
html[data-theme="day"] .exam-actions a,
html[data-theme="day"] .exam-filter {
  border-color: rgba(37, 122, 124, 0.24);
  background: rgba(229, 244, 241, 0.9);
  color: #27656b;
}

html[data-theme="day"] .exam-filter.active,
html[data-theme="day"] .exam-filter:hover {
  background: linear-gradient(135deg, #168f88, #297aa0);
  color: #ffffff;
}

html[data-theme="day"] .exam-hero,
html[data-theme="day"] .library-hero,
html[data-theme="day"] .tools-hero {
  background:
    radial-gradient(circle at 88% 8%, rgba(238, 184, 83, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(214, 241, 237, 0.96), rgba(230, 241, 248, 0.96));
}

html[data-theme="day"] .exam-hero p:not(.exam-kicker),
html[data-theme="day"] .library-hero p:not(.exam-kicker) {
  color: #557078;
}

@media (max-width: 760px) {
  .theme-toggle {
    min-width: 38px;
    width: 38px;
    padding: 0;
  }

  .theme-toggle-text {
    display: none;
  }

  html[data-theme="day"] .sidebar {
    border-bottom-color: rgba(49, 117, 120, 0.18);
  }

  html[data-theme="day"] .home-hero::after {
    width: 100%;
    background: linear-gradient(90deg, rgba(246, 252, 249, 0.96), rgba(242, 250, 247, 0.82) 70%, rgba(242, 250, 247, 0.35));
  }
}

html[data-theme="day"] .brand-subtitle,
html[data-theme="day"] .module-group-title span,
html[data-theme="day"] .module-card em {
  color: #536970;
}

html[data-theme="day"] .nav-icon {
  color: #236d73;
}

html[data-theme="day"] .nav button.active .nav-icon,
html[data-theme="day"] .nav button:hover .nav-icon {
  color: #ffffff;
}

/* AI Agent workspace v5: three-column production layout based on the selected reference. */
.shell .ai-agent-workspace {
  --agent-bg: #061127;
  --agent-panel: rgba(9, 24, 52, 0.94);
  --agent-panel-soft: rgba(14, 34, 70, 0.78);
  --agent-line: rgba(101, 153, 255, 0.2);
  --agent-text: #edf5ff;
  --agent-muted: #8ea4c9;
  min-height: calc(100vh - 96px);
  height: calc(100vh - 96px);
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 292px;
  overflow: hidden;
  border: 1px solid var(--agent-line);
  border-radius: 8px;
  background: var(--agent-bg);
  color: var(--agent-text);
  box-shadow: 0 24px 80px rgba(0, 6, 24, 0.34);
}

.shell .ai-agent-workspace .dash-card {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.shell .ai-agent-workspace svg {
  width: 18px;
  height: 18px;
}

.shell .ai-agent-workspace button {
  font: inherit;
}

.shell .ai-agent-workspace .ai-side-panel {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  border-right: 1px solid var(--agent-line);
  background: linear-gradient(180deg, rgba(8, 23, 52, 0.98), rgba(4, 14, 34, 0.98));
}

.ai-conversation-head,
.ai-conversation-head > div,
.ai-active-model,
.ai-service-pill,
.ai-current-model-card,
.ai-recycle-action {
  display: flex;
  align-items: center;
}

.ai-conversation-head {
  min-height: 42px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.ai-conversation-head > div {
  gap: 9px;
}

.ai-conversation-head strong {
  font-size: 16px;
}

.ai-panel-icon,
.ai-model-mark,
.ai-landing-mark {
  display: grid;
  place-items: center;
  color: #5de8ff;
}

.ai-conversation-head > button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--agent-muted);
}

.shell .ai-agent-workspace .ai-side-action {
  min-height: 40px;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--agent-line);
  border-radius: 6px;
  background: rgba(29, 55, 98, 0.58);
  color: var(--agent-text);
  font-size: 14px;
}

.shell .ai-agent-workspace .ai-side-action:hover,
.shell .ai-agent-workspace .ai-side-action.active {
  border-color: rgba(56, 203, 255, 0.52);
  background: linear-gradient(135deg, rgba(21, 99, 178, 0.66), rgba(23, 55, 124, 0.72));
  color: #ffffff;
  box-shadow: 0 8px 22px rgba(0, 128, 255, 0.14);
}

.shell .ai-agent-workspace .ai-recents {
  min-height: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
  overflow-y: auto;
}

.shell .ai-agent-workspace .ai-recents p {
  margin: 10px 7px 4px;
  color: #6e86ae;
  font-size: 12px;
}

.shell .ai-agent-workspace .ai-recents button {
  min-height: 36px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #aebdde;
  text-align: left;
}

.shell .ai-agent-workspace .ai-recents button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shell .ai-agent-workspace .ai-recents button time {
  color: #6685b6;
  font-size: 11px;
}

.shell .ai-agent-workspace .ai-recents button:hover,
.shell .ai-agent-workspace .ai-recents button.active {
  border-color: rgba(66, 160, 255, 0.28);
  background: rgba(23, 67, 127, 0.54);
  color: #ffffff;
}

.ai-conversation-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
}

.ai-conversation-item > button:first-child {
  width: 100%;
}

.shell .ai-agent-workspace .ai-conversation-item > button:last-child {
  width: 26px;
  height: 26px;
  min-height: 26px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #6980a6;
  opacity: 0;
}

.ai-conversation-item:hover > button:last-child,
.ai-conversation-item.active > button:last-child {
  opacity: 1;
}

.shell .ai-agent-workspace .ai-conversation-item > button:last-child:hover {
  background: rgba(230, 78, 104, 0.16);
  color: #ff92a4;
}

.ai-conversation-item.active {
  border-color: rgba(66, 160, 255, 0.28);
  background: rgba(23, 67, 127, 0.54);
}

.ai-recycle-action {
  min-height: 38px;
  gap: 8px;
  margin-top: 8px;
  padding: 0 9px;
  border: 0;
  border-top: 1px solid var(--agent-line);
  background: transparent;
  color: var(--agent-muted);
}

.shell .ai-agent-workspace .ai-chat-panel {
  min-width: 0;
  min-height: 0;
  position: relative;
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr) auto auto auto;
  padding: 0 18px 10px;
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 18%, rgba(35, 109, 236, 0.17), transparent 28%),
    linear-gradient(180deg, rgba(4, 14, 35, 0.98), rgba(3, 13, 31, 0.99));
}

.shell .ai-agent-workspace .ai-chat-panel::before,
.shell .ai-agent-workspace .ai-chat-panel::after {
  display: none;
}

.shell .ai-agent-workspace .ai-chat-head {
  position: relative;
  z-index: 2;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0;
  border-bottom: 1px solid var(--agent-line);
}

.ai-active-model {
  min-width: 0;
  gap: 10px;
}

.ai-model-mark {
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  border: 1px solid rgba(70, 211, 255, 0.34);
  border-radius: 50%;
  background: rgba(13, 58, 100, 0.64);
}

.shell .ai-agent-workspace .ai-chat-head h2 {
  margin: 0;
  color: var(--agent-text);
  font-size: 15px;
  line-height: 1.2;
}

.shell .ai-agent-workspace .ai-chat-head p {
  display: block;
  margin: 2px 0 0;
  color: var(--agent-muted);
  font-size: 11px;
}

.ai-service-pill {
  min-height: 32px;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid var(--agent-line);
  border-radius: 999px;
  background: rgba(13, 34, 67, 0.76);
  color: #b8c8e6;
  font-size: 12px;
}

.ai-service-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f5b84b;
  box-shadow: 0 0 10px currentColor;
}

.ai-service-pill i.online {
  background: #31d696;
}

.shell .ai-agent-workspace .ai-message-stage {
  min-height: 0;
  display: grid;
  align-content: center;
  padding: 18px 0 10px;
  overflow: hidden;
}

.shell .ai-agent-workspace .ai-message-stage.has-messages {
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-content: initial;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(70, 151, 205, 0.58) rgba(8, 28, 58, 0.18);
}

.shell .ai-agent-workspace .ai-message-stage.has-messages::-webkit-scrollbar {
  width: 8px;
}

.shell .ai-agent-workspace .ai-message-stage.has-messages::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(8, 28, 58, 0.18);
}

.shell .ai-agent-workspace .ai-message-stage.has-messages::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(70, 151, 205, 0.58) padding-box;
}

.shell .ai-agent-workspace .ai-landing {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: 0;
  text-align: center;
}

.ai-landing-mark {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(66, 211, 255, 0.36);
  border-radius: 50%;
  background: rgba(11, 61, 105, 0.45);
  box-shadow: 0 0 42px rgba(36, 135, 255, 0.22);
}

.shell .ai-agent-workspace .ai-landing h3 {
  margin: 4px 0 0;
  color: #f4f8ff;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.18;
}

.shell .ai-agent-workspace .ai-landing p {
  margin: 0;
  color: var(--agent-muted);
  font-size: 14px;
}

.shell .ai-agent-workspace .ai-message-stage.has-messages .ai-landing {
  display: none;
}

.shell .ai-agent-workspace .ai-messages {
  width: 100%;
  max-height: none;
  min-height: auto;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: visible;
  padding: 2px 4px 12px;
}

.shell .ai-agent-workspace .ai-message {
  width: 100%;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.shell .ai-agent-workspace .ai-message > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(74, 213, 255, 0.35);
  border-radius: 50%;
  background: #0b345d;
  color: #68e6ff;
  font-size: 11px;
  font-weight: 800;
}

.shell .ai-agent-workspace .ai-message > div {
  width: fit-content;
  min-width: 0;
  max-width: min(84%, 720px);
  justify-self: start;
  padding: 12px 14px;
  border: 1px solid var(--agent-line);
  border-radius: 7px;
  background: rgba(12, 31, 63, 0.76);
  box-shadow: none;
}

.shell .ai-agent-workspace .ai-message.user {
  grid-template-columns: minmax(0, 1fr) 30px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.shell .ai-agent-workspace .ai-message.user > span {
  grid-column: 2;
}

.shell .ai-agent-workspace .ai-message.user > div {
  grid-column: 1;
  grid-row: 1;
  justify-self: end;
  width: fit-content;
  min-width: 74px;
  max-width: min(72%, 620px);
  background: rgba(26, 70, 139, 0.6);
}

.shell .ai-agent-workspace .ai-message p {
  margin: 0;
  color: var(--agent-text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.shell .ai-agent-workspace .ai-message em {
  display: block;
  margin-top: 6px;
  color: #6e85aa;
  font-size: 11px;
  font-style: normal;
}

.shell .ai-agent-workspace .ai-message div.ai-message-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.shell .ai-agent-workspace .ai-message-actions button {
  width: 28px;
  height: 28px;
  min-height: 24px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #7188ad;
  font-size: 10px;
}

.shell .ai-agent-workspace .ai-message-actions button svg {
  width: 15px;
  height: 15px;
}

.shell .ai-agent-workspace .ai-message div.ai-thinking-progress {
  min-width: min(320px, 72vw);
  display: grid;
  gap: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.shell .ai-agent-workspace .ai-thinking-progress > div {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.ai-thinking-spinner {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border: 2px solid rgba(91, 213, 255, 0.22);
  border-top-color: #5bd5ff;
  border-radius: 50%;
  animation: ai-thinking-spin 0.8s linear infinite;
}

.ai-thinking-progress strong {
  color: var(--agent-text);
  font-size: 13px;
}

.ai-thinking-progress ol {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ai-thinking-progress li {
  position: relative;
  padding: 5px 8px 5px 20px;
  border: 1px solid var(--agent-line);
  border-radius: 999px;
  color: var(--agent-muted);
  font-size: 10px;
  animation: ai-thinking-step 2.4s ease-in-out infinite;
}

.ai-thinking-progress li::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  transform: translateY(-50%);
}

.ai-thinking-progress li:nth-child(2) {
  animation-delay: 0.8s;
}

.ai-thinking-progress li:nth-child(3) {
  animation-delay: 1.6s;
}

.ai-message-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.shell .ai-agent-workspace .ai-message div.ai-message-meta {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.shell .ai-agent-workspace .ai-message div.ai-thinking-summary {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  padding: 4px 7px;
  border: 1px solid var(--agent-line);
  border-radius: 6px;
  background: rgba(32, 83, 137, 0.16);
  box-shadow: none;
  color: #76cfff;
  font-size: 10px;
}

.shell .ai-agent-workspace .ai-thinking-summary svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.shell .ai-agent-workspace .ai-message .ai-thinking-summary span {
  display: inline;
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  color: inherit;
  white-space: nowrap;
}

html[data-theme="day"] .shell .ai-agent-workspace .ai-message div.ai-thinking-summary {
  border-color: rgba(22, 143, 136, 0.2);
  background: rgba(214, 241, 239, 0.7);
  color: #167b82;
}

/* Login legal consent gate v139 */
.login-legal-consent {
  display: grid;
  grid-template-columns: 18px auto auto auto auto;
  align-items: center;
  justify-content: start;
  gap: 4px;
  color: #c8d7e9;
  font-size: 11px;
}

.login-legal-consent input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #27b7c9;
}

.login-legal-consent input:disabled {
  opacity: 0.48;
}

.login-legal-consent label {
  cursor: pointer;
}

.login-legal-consent button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #75dff0;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.login-legal-consent button:hover {
  color: #fff;
  text-decoration: underline;
}

.login-legal-consent small {
  grid-column: 2 / -1;
  margin-top: 2px;
  color: #829ab8;
  font-size: 9px;
}

.login-submit:disabled,
.login-guest-btn:disabled {
  cursor: not-allowed;
  filter: saturate(0.45);
  opacity: 0.48;
  transform: none;
}

body.legal-reader-open {
  overflow: hidden;
}

.legal-reader[hidden] {
  display: none;
}

.legal-reader {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.legal-reader-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 9, 24, 0.72);
  backdrop-filter: blur(14px);
}

.legal-reader-panel {
  position: relative;
  width: min(780px, 100%);
  height: min(720px, calc(100svh - 48px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(95, 185, 230, 0.3);
  border-radius: 12px;
  background: rgba(7, 18, 41, 0.96);
  box-shadow: 0 32px 100px rgba(0, 5, 20, 0.56), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #e9f4ff;
}

.legal-reader-panel > header,
.legal-reader-panel > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
}

.legal-reader-panel > header {
  border-bottom: 1px solid rgba(116, 166, 218, 0.18);
}

.legal-reader-panel > header span {
  color: #54d7eb;
  font-size: 10px;
  font-weight: 900;
}

.legal-reader-panel > header h2 {
  margin: 4px 0 0;
  font-size: 21px;
}

.legal-reader-panel > header > button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(126, 177, 224, 0.22);
  border-radius: 7px;
  background: rgba(20, 48, 85, 0.7);
  color: #dcecff;
  font-size: 22px;
  cursor: pointer;
}

.legal-reader-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 22px;
  border-bottom: 1px solid rgba(116, 166, 218, 0.14);
}

.legal-reader-tabs button {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid rgba(126, 177, 224, 0.2);
  border-radius: 8px;
  background: rgba(17, 42, 77, 0.58);
  color: #b7cbe0;
  font-weight: 800;
  cursor: pointer;
}

.legal-reader-tabs button.active {
  border-color: rgba(70, 211, 230, 0.66);
  background: rgba(30, 131, 167, 0.28);
  color: #fff;
}

.legal-reader-tabs button span {
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 181, 75, 0.14);
  color: #ffc76e;
  font-size: 9px;
}

.legal-reader-tabs button span.read {
  background: rgba(55, 205, 148, 0.14);
  color: #70e3b0;
}

.legal-reader-content {
  overflow-y: auto;
  padding: 8px 26px 30px;
  outline: none;
  scrollbar-color: rgba(69, 184, 210, 0.68) rgba(13, 34, 63, 0.66);
  scrollbar-width: thin;
}

.legal-document {
  max-width: 680px;
  margin: 0 auto;
}

.legal-document h3 {
  margin: 18px 0 20px;
  font-size: 26px;
  text-align: center;
}

.legal-document h4 {
  margin: 24px 0 8px;
  color: #8ce7f2;
  font-size: 14px;
}

.legal-document p {
  margin: 8px 0;
  color: #bfd0e2;
  font-size: 13px;
  line-height: 1.85;
  text-align: justify;
}

.legal-document .legal-document-note {
  color: #8198b3;
  font-size: 10px;
  text-align: center;
}

.legal-document .legal-scroll-end {
  margin-top: 32px;
  padding: 14px;
  border: 1px dashed rgba(85, 209, 224, 0.32);
  border-radius: 8px;
  color: #74dce9;
  text-align: center;
}

.legal-reader-panel > footer {
  border-top: 1px solid rgba(116, 166, 218, 0.18);
  background: rgba(9, 23, 48, 0.88);
}

.legal-reader-panel > footer p {
  margin: 0;
  color: #91a8c0;
  font-size: 11px;
}

.legal-reader-confirm {
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #1aa8b8, #376ff0);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.legal-reader-confirm:disabled {
  cursor: not-allowed;
  filter: saturate(0.3);
  opacity: 0.45;
}

html[data-theme="day"] .login-legal-consent {
  color: #42686d;
}

html[data-theme="day"] .login-legal-consent button {
  color: #087d80;
}

html[data-theme="day"] .login-legal-consent small {
  color: #71898d;
}

html[data-theme="day"] .legal-reader-backdrop {
  background: rgba(31, 61, 67, 0.42);
}

html[data-theme="day"] .legal-reader-panel {
  border-color: rgba(38, 120, 126, 0.22);
  background: rgba(250, 255, 254, 0.98);
  box-shadow: 0 30px 90px rgba(38, 77, 80, 0.28), inset 0 1px 0 #fff;
  color: #183f44;
}

html[data-theme="day"] .legal-reader-panel > header,
html[data-theme="day"] .legal-reader-panel > footer,
html[data-theme="day"] .legal-reader-tabs {
  border-color: rgba(42, 111, 115, 0.15);
}

html[data-theme="day"] .legal-reader-panel > header > button,
html[data-theme="day"] .legal-reader-tabs button {
  border-color: rgba(39, 112, 116, 0.18);
  background: rgba(232, 246, 245, 0.86);
  color: #42666b;
}

html[data-theme="day"] .legal-reader-tabs button.active {
  border-color: rgba(20, 143, 138, 0.45);
  background: rgba(25, 157, 150, 0.12);
  color: #165d61;
}

html[data-theme="day"] .legal-document h4 {
  color: #167a78;
}

html[data-theme="day"] .legal-document p {
  color: #496a6e;
}

html[data-theme="day"] .legal-reader-panel > footer {
  background: rgba(240, 249, 248, 0.94);
}

@media (max-width: 620px) {
  .legal-reader {
    padding: 0;
  }

  .legal-reader-panel {
    width: 100%;
    height: 100svh;
    border: 0;
    border-radius: 0;
  }

  .legal-reader-panel > header,
  .legal-reader-panel > footer {
    padding: 14px 16px;
  }

  .legal-reader-tabs {
    padding: 10px 16px;
  }

  .legal-reader-content {
    padding-inline: 18px;
  }

  .legal-reader-panel > footer {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .login-legal-consent {
    grid-template-columns: 18px auto auto auto auto;
  }
}

@keyframes ai-thinking-spin {
  to { transform: rotate(360deg); }
}

@keyframes ai-thinking-step {
  0%, 68%, 100% {
    border-color: var(--agent-line);
    color: var(--agent-muted);
    background: transparent;
  }
  18%, 48% {
    border-color: rgba(75, 205, 255, 0.42);
    color: #70dcff;
    background: rgba(34, 116, 174, 0.14);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ai-thinking-spinner,
  .ai-thinking-progress li {
    animation: none;
  }
}

.shell .ai-agent-workspace .ai-message-actions button:hover {
  border-color: var(--agent-line);
  background: rgba(28, 61, 112, 0.42);
  color: #bcd4ff;
}

html[data-theme="day"] .shell .ai-agent-workspace .ai-message-stage.has-messages {
  scrollbar-color: rgba(38, 128, 136, 0.48) rgba(213, 234, 238, 0.42);
}

html[data-theme="day"] .shell .ai-agent-workspace .ai-message-stage.has-messages::-webkit-scrollbar-track {
  background: rgba(213, 234, 238, 0.42);
}

html[data-theme="day"] .shell .ai-agent-workspace .ai-message-stage.has-messages::-webkit-scrollbar-thumb {
  background: rgba(38, 128, 136, 0.48) padding-box;
}

.shell .ai-agent-workspace .ai-suggestion-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin: 6px 0 8px;
}

.shell .ai-agent-workspace .ai-suggestion-row button {
  min-width: 0;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid var(--agent-line);
  border-radius: 5px;
  background: rgba(14, 34, 67, 0.66);
  color: #bdcae2;
  font-size: 12px;
}

.shell .ai-agent-workspace .ai-suggestion-row button:hover {
  border-color: rgba(62, 204, 255, 0.5);
  color: #ffffff;
}

.shell .ai-agent-workspace .ai-composer {
  width: 100%;
  min-height: 84px;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  grid-template-rows: minmax(40px, auto) 32px;
  gap: 4px 10px;
  padding: 9px 10px;
  border: 1px solid rgba(67, 147, 255, 0.48);
  border-radius: 8px;
  background: rgba(10, 28, 57, 0.94);
  box-shadow: 0 14px 38px rgba(0, 6, 22, 0.28);
}

.shell .ai-agent-workspace .ai-composer textarea {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  min-height: 40px;
  padding: 4px 5px;
  border: 0;
  background: transparent;
  color: var(--agent-text);
  box-shadow: none;
  resize: none;
  font-size: 13px;
}

.shell .ai-agent-workspace .ai-composer textarea:focus {
  box-shadow: none;
}

.ai-composer-tools {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
}

.shell .ai-agent-workspace .ai-composer-tools button {
  min-height: 27px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: rgba(20, 40, 73, 0.78);
  color: #9fb1cf;
  font-size: 11px;
}

.shell .ai-agent-workspace .ai-composer-tools button.active,
.shell .ai-agent-workspace .ai-composer-tools button:hover {
  border-color: rgba(43, 186, 255, 0.48);
  color: #58dfff;
}

.shell .ai-agent-workspace .ai-send-button {
  width: 36px;
  height: 36px;
  min-height: 36px;
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  display: grid;
  place-items: center;
  border: 1px solid rgba(71, 155, 255, 0.52);
  border-radius: 50%;
  background: linear-gradient(135deg, #157fda, #3158d4);
  color: #ffffff;
  box-shadow: 0 0 20px rgba(34, 126, 255, 0.3);
}

.shell .ai-agent-workspace .ai-disclaimer {
  margin: 5px 0 0;
  color: #657b9d;
  font-size: 10px;
  text-align: center;
}

.shell .ai-agent-workspace .ai-config-modal {
  min-width: 0;
  min-height: 0;
  position: relative;
  inset: auto;
  z-index: 2;
  display: block;
  overflow-y: auto;
  border-left: 1px solid var(--agent-line);
  background: linear-gradient(180deg, rgba(10, 25, 54, 0.99), rgba(5, 16, 37, 0.99));
  backdrop-filter: none;
}

.shell .ai-agent-workspace .ai-config-card {
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.shell .ai-agent-workspace .ai-config-head {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--agent-line);
}

.shell .ai-agent-workspace .ai-config-head strong {
  color: var(--agent-text);
  font-size: 16px;
}

.shell .ai-agent-workspace .ai-config-head p {
  margin: 3px 0 0;
  color: var(--agent-muted);
  font-size: 11px;
}

.shell .ai-agent-workspace .ai-config-head button {
  color: #8297bb;
}

.ai-current-model-card {
  gap: 9px;
  padding: 11px;
  border: 1px solid rgba(80, 129, 255, 0.34);
  border-radius: 7px;
  background: linear-gradient(135deg, rgba(38, 61, 126, 0.78), rgba(24, 48, 102, 0.62));
}

.ai-provider-avatar {
  width: 30px;
  height: 30px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #f1f6ff;
  color: #18264b;
  font-weight: 900;
}

.ai-current-model-card > div {
  min-width: 0;
  flex: 1;
}

.ai-current-model-card p {
  margin: 2px 0 0;
  overflow: hidden;
  color: var(--agent-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shell .ai-agent-workspace .field {
  gap: 4px;
}

.ai-provider-list {
  display: grid;
  gap: 6px;
  max-height: 226px;
  overflow-y: auto;
}

.ai-provider-list button {
  min-height: 34px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 8px;
  align-items: center;
  gap: 8px;
  padding: 0 9px;
  border: 1px solid var(--agent-line);
  border-radius: 6px;
  background: rgba(15, 34, 65, 0.7);
  color: #aebddb;
  text-align: left;
}

.ai-provider-list button > span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(239, 246, 255, 0.96);
  color: #183055;
  font-size: 11px;
  font-weight: 900;
}

.ai-provider-list button strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-provider-list button i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3ad399;
}

.ai-provider-list button:hover,
.ai-provider-list button.active {
  border-color: rgba(57, 184, 255, 0.58);
  background: rgba(28, 65, 124, 0.72);
  color: #ffffff;
}

.shell .ai-agent-workspace .field > span {
  color: #aebddd;
  font-size: 11px;
}

.shell .ai-agent-workspace :where(input, select) {
  min-height: 36px;
  border-radius: 6px;
  border-color: var(--agent-line);
  background: rgba(6, 20, 45, 0.88);
  color: var(--agent-text);
  font-size: 12px;
}

.shell .ai-agent-workspace .ai-config-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 2px;
}

.shell .ai-agent-workspace .ai-config-actions button {
  min-height: 36px;
  border-radius: 6px;
  font-size: 12px;
}

.ai-connection-status {
  display: grid;
  gap: 7px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--agent-line);
}

.ai-connection-status > strong {
  font-size: 13px;
}

.ai-connection-status p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  color: var(--agent-muted);
  font-size: 11px;
}

.ai-connection-status b {
  color: #42d69b;
}

.ai-key-note {
  margin: auto 0 0;
  color: #667fa8;
  font-size: 10px;
  line-height: 1.5;
}

.shell .ai-agent-workspace:has(.ai-config-modal.hidden) {
  grid-template-columns: 210px minmax(0, 1fr);
}

html[data-theme="day"] .shell .ai-agent-workspace {
  --agent-bg: #eaf5ff;
  --agent-panel: rgba(245, 251, 255, 0.96);
  --agent-panel-soft: rgba(223, 240, 255, 0.82);
  --agent-line: rgba(44, 116, 169, 0.2);
  --agent-text: #153b59;
  --agent-muted: #617e98;
  background: #eaf5ff;
  box-shadow: 0 22px 70px rgba(41, 102, 137, 0.16);
}

html[data-theme="day"] .shell .ai-agent-workspace .ai-side-panel,
html[data-theme="day"] .shell .ai-agent-workspace .ai-config-modal {
  background: linear-gradient(180deg, rgba(242, 251, 255, 0.98), rgba(226, 242, 252, 0.98));
}

html[data-theme="day"] .shell .ai-agent-workspace .ai-chat-panel {
  background:
    radial-gradient(circle at 88% 14%, rgba(55, 156, 224, 0.15), transparent 30%),
    linear-gradient(180deg, rgba(248, 253, 255, 0.98), rgba(232, 245, 253, 0.98));
}

html[data-theme="day"] .shell .ai-agent-workspace .ai-chat-head h2,
html[data-theme="day"] .shell .ai-agent-workspace .ai-landing h3,
html[data-theme="day"] .shell .ai-agent-workspace .ai-message p,
html[data-theme="day"] .shell .ai-agent-workspace .ai-config-head strong {
  color: #123b57;
}

html[data-theme="day"] .shell .ai-agent-workspace .ai-message > div,
html[data-theme="day"] .shell .ai-agent-workspace .ai-composer,
html[data-theme="day"] .shell .ai-agent-workspace :where(input, select) {
  background: rgba(249, 253, 255, 0.9);
  color: #153b59;
}

html[data-theme="day"] .shell .ai-agent-workspace .ai-composer {
  border-color: rgba(42, 137, 160, 0.28);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 32px rgba(44, 111, 139, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

html[data-theme="day"] .shell .ai-agent-workspace .ai-composer textarea {
  color: #173f55;
}

html[data-theme="day"] .shell .ai-agent-workspace .ai-composer textarea::placeholder {
  color: #829ca9;
}

html[data-theme="day"] .shell .ai-agent-workspace .ai-composer-tools button {
  border-color: rgba(44, 126, 145, 0.12);
  background: rgba(230, 244, 247, 0.78);
  color: #527584;
}

html[data-theme="day"] .shell .ai-agent-workspace .ai-composer-tools button.active,
html[data-theme="day"] .shell .ai-agent-workspace .ai-composer-tools button:hover {
  border-color: rgba(19, 142, 151, 0.36);
  background: rgba(207, 239, 239, 0.9);
  color: #087c84;
}

html[data-theme="day"] .shell .ai-agent-workspace .ai-send-button {
  border-color: rgba(19, 142, 151, 0.3);
  background: linear-gradient(135deg, #1ba49f, #267fa6);
  box-shadow: 0 8px 20px rgba(25, 137, 148, 0.22);
}

html[data-theme="day"] .shell .ai-agent-workspace .ai-message.user > div {
  background: rgba(199, 230, 249, 0.9);
}

html[data-theme="day"] .shell .ai-agent-workspace .ai-message,
html[data-theme="day"] .shell .ai-agent-workspace .ai-message.user {
  border: 0;
  background: transparent;
  box-shadow: none;
}

html[data-theme="day"] .ai-provider-list button {
  background: rgba(247, 252, 255, 0.9);
  color: #365b75;
}

html[data-theme="day"] .ai-provider-list button:hover,
html[data-theme="day"] .ai-provider-list button.active {
  background: rgba(202, 233, 250, 0.92);
  color: #123b57;
}

@media (min-width: 1500px) {
  .shell .ai-agent-workspace {
    grid-template-columns: 226px minmax(0, 1fr) 320px;
  }
}

@media (max-width: 1080px) {
  .shell .ai-agent-workspace {
    grid-template-columns: 180px minmax(0, 1fr) 260px;
  }

  .shell .ai-agent-workspace .ai-composer-tools button:nth-child(n + 4) {
    display: none;
  }
}

/* Final desktop login fit override: keep after legacy login rules. */
@media (min-width: 821px) {
  .login-form {
    min-height: 0;
    max-height: none;
    height: auto;
    gap: 5px;
    padding: 12px 30px;
  }

  .login-form-heading p { margin-top: 3px; }

  .login-role-switch,
  .login-auth-switch { min-height: 32px; }

  .login-role-switch button,
  .login-auth-switch button { min-height: 27px; }

  .login-identity-grid { gap: 6px 12px; }
  .login-field { gap: 3px; }
  .login-field input { height: 34px; }

  .login-submit,
  .login-guest-btn { min-height: 35px; }
}

@media (max-width: 1050px) {
  .shell .ai-agent-workspace,
  .shell .ai-agent-workspace:has(.ai-config-modal.hidden) {
    grid-template-columns: minmax(0, 1fr);
  }

  .shell .ai-agent-workspace .ai-side-panel,
  .shell .ai-agent-workspace .ai-config-modal {
    display: none;
  }

  .shell .ai-agent-workspace .ai-config-modal.drawer-open {
    width: min(360px, calc(100vw - 24px));
    min-height: 0;
    position: fixed;
    inset: 78px 12px 12px auto;
    z-index: 120;
    display: block;
    border: 1px solid var(--agent-line);
    border-radius: 8px;
    box-shadow: 0 28px 80px rgba(0, 8, 28, 0.42);
  }

  .shell .ai-agent-workspace .ai-chat-panel {
    width: 100%;
    min-width: 0;
    padding-inline: 14px;
  }

  .shell .ai-agent-workspace .ai-composer {
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) 42px;
    grid-template-rows: minmax(42px, auto) 32px;
  }

  .shell .ai-agent-workspace .ai-composer textarea {
    min-width: 0;
    width: 100%;
    writing-mode: horizontal-tb;
    white-space: normal;
    line-height: 1.5;
    overflow-wrap: normal;
    word-break: normal;
  }

  .shell .ai-agent-workspace .ai-composer-tools {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .shell .ai-agent-workspace .ai-send-button {
    grid-column: 2;
    grid-row: 1 / 3;
    justify-self: center;
  }
}

@media (max-width: 820px) {
  .shell .ai-agent-workspace {
    min-height: calc(100vh - 78px);
    height: calc(100vh - 78px);
    grid-template-columns: minmax(0, 1fr);
  }

  .shell .ai-agent-workspace .ai-side-panel,
  .shell .ai-agent-workspace .ai-config-modal {
    display: none;
  }

  .shell .ai-agent-workspace .ai-chat-panel {
    padding: 0 10px 8px;
  }

  .shell .ai-agent-workspace .ai-suggestion-row button:nth-child(n + 4) {
    display: none;
  }

  .shell .ai-agent-workspace .ai-composer-tools button:nth-child(n + 4) {
    display: none;
  }
}
