:root {
  --font-sans: "DM Sans", "Aptos", "Segoe UI", "Trebuchet MS", sans-serif;
  --control-height: 40px;
  --bg: #eef3f8;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: #f8fbff;
  --surface-accent: #eef6ff;
  --text: #122033;
  --muted: #5c6b7d;
  --accent: #0f766e;
  --accent-dark: #0b5b55;
  --accent-soft: #dff6f3;
  --line: rgba(160, 180, 201, 0.28);
  --shadow: 0 18px 50px rgba(31, 52, 84, 0.12);
  --radius: 24px;
}

.docs-body .docs-hero.card,
.docs-body .docs-hero.card-elevated {
  align-items: center;
  padding: clamp(1.05rem, 2vw, 1.55rem);
  margin-bottom: 1rem;
  background:
    radial-gradient(circle at 8% 18%, rgba(20, 184, 166, 0.14), transparent 18rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 253, 251, 0.94)) !important;
  border: 1px solid rgba(15, 118, 110, 0.12);
  color: #0f172a !important;
  box-shadow: 0 24px 70px rgba(15, 118, 110, 0.13);
}

.docs-body .docs-hero .eyebrow {
  margin-bottom: 0.35rem;
  color: #0f766e !important;
}

.docs-body .docs-hero h1 {
  margin: 0 0 0.42rem;
  color: #0f172a !important;
}

.docs-body .docs-hero p {
  color: #475569 !important;
  font-size: clamp(1rem, 1.5vw, 1.14rem);
  line-height: 1.45;
}

.docs-body .docs-hero small {
  margin-top: 0.58rem;
  color: #64748b !important;
}

* {
  box-sizing: border-box;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html {
  font-family: var(--font-sans);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(27, 99, 184, 0.16), transparent 30%),
    linear-gradient(180deg, #f4f8fc 0%, #eaf1f8 100%);
  background-attachment: fixed;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(27, 99, 184, 0.16), transparent 30%),
    linear-gradient(180deg, #f4f8fc 0%, #eaf1f8 100%);
  background-attachment: fixed;
  display: flow-root;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: clip;
}

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

.page-shell {
  width: min(1220px, calc(100% - 40px));
  margin: 24px auto 0;
  position: relative;
  z-index: 1;
}

.page-shell-wide {
  width: min(1380px, calc(100% - 40px));
}

.app-footer {
  margin: 22px auto 0;
  padding-bottom: 28px;
  text-align: center;
  color: var(--muted);
  font-size: 0.86rem;
}

.app-footer p {
  margin: 0;
}

.app-footer-live {
  margin: 14px auto 22px;
  padding-bottom: 0;
  color: rgba(228, 240, 255, 0.72);
}

.docs-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 6%, rgba(20, 184, 166, 0.2), transparent 28rem),
    radial-gradient(circle at 88% 4%, rgba(15, 118, 110, 0.18), transparent 24rem),
    linear-gradient(180deg, #f4fbf8 0%, #eef7f3 42%, #f8fafc 100%);
  color: #0f172a;
  font-family: "DM Sans", "Inter", "Segoe UI", sans-serif;
  margin: 0;
}

.docs-body a,
.docs-body a:visited {
  color: #0f766e;
}

.docs-body .docs-toc a,
.docs-body .docs-page-toc a,
.docs-body .docs-toc a:visited,
.docs-body .docs-page-toc a:visited {
  color: #334155;
  text-decoration: none;
}

.docs-body .button-link,
.docs-body .button-link:visited {
  color: #ffffff;
}

.docs-shell {
  margin-bottom: 0;
  padding-bottom: 2rem;
}

.docs-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  background:
    linear-gradient(135deg, rgba(5, 46, 43, 0.96), rgba(15, 118, 110, 0.9)),
    radial-gradient(circle at top right, rgba(45, 212, 191, 0.34), transparent 18rem);
  color: #f8fafc;
  overflow: hidden;
}

.docs-hero .eyebrow {
  color: #ccfbf1;
}

.docs-hero h1 {
  margin: 0.15rem 0 0.45rem;
  font-size: clamp(2rem, 4vw, 3.5rem);
  letter-spacing: -0.06em;
  color: #ffffff !important;
}

.docs-hero p {
  max-width: 62rem;
  margin: 0;
  color: #ecfeff;
  font-size: 1.03rem;
}

.docs-hero small {
  display: inline-block;
  margin-top: 0.85rem;
  color: rgba(240, 253, 250, 0.82);
}

.docs-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.docs-lang-switcher {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.34);
  color: #f8fafc;
}

.docs-lang-switcher label {
  color: rgba(248, 250, 252, 0.92);
  font-weight: 800;
}

.docs-lang-switcher select {
  background-color: rgba(255, 255, 255, 0.94);
  color: #0f172a;
}

.docs-body .docs-lang-switcher {
  padding: 0.45rem 0.7rem 0.45rem 0.9rem;
  background: rgba(240, 253, 250, 0.9);
  border-color: rgba(15, 118, 110, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.74);
}

.docs-body .docs-lang-switcher label {
  color: #0f766e;
}

.docs-layout {
  display: grid;
  grid-template-columns: minmax(15rem, 20rem) minmax(0, 1fr) minmax(12rem, 16rem);
  gap: 1.25rem;
  align-items: start;
}

.docs-toc {
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 1rem;
}

.docs-page-toc {
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 1rem;
}

.docs-toc h2,
.docs-page-toc h2 {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #0f766e;
}

.docs-toc-groups {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.docs-toc-group {
  padding: 0.72rem;
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(240, 253, 250, 0.95), rgba(255, 255, 255, 0.82));
}

.docs-toc-group h3 {
  margin: 0 0 0.2rem;
  color: #0f766e;
  font-size: 0.92rem;
  letter-spacing: -0.01em;
}

.docs-toc-group p {
  margin: 0 0 0.48rem;
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.35;
}

.docs-toc-group div {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.docs-toc a.docs-toc-dot {
  width: 0.58rem;
  height: 0.58rem;
  min-height: 0;
  padding: 0;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.26);
}

.docs-toc a.docs-toc-dot:hover {
  transform: none;
  background: #0f766e;
}

.docs-toc nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.docs-tree {
  display: grid;
  gap: 0.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.docs-tree .docs-tree {
  margin: 0.15rem 0 0.35rem 0.75rem;
  padding-left: 0.65rem;
  border-left: 2px solid rgba(15, 118, 110, 0.12);
}

.docs-tree li {
  margin: 0;
  padding: 0;
}

.docs-toc a,
.docs-page-toc a {
  display: block;
  padding: 0.45rem 0.55rem;
  border-radius: 0.8rem;
  color: #334155;
  text-decoration: none;
  font-size: 0.93rem;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.docs-toc a:hover,
.docs-page-toc a:hover,
.docs-toc a.is-current {
  background: rgba(20, 184, 166, 0.12);
  color: #0f766e;
  transform: translateX(2px);
}

.docs-page-toc a.is-current {
  background: rgba(20, 184, 166, 0.14);
  color: #0f766e;
  font-weight: 900;
  box-shadow: inset 3px 0 0 #0f766e;
  transform: translateX(2px);
}

.docs-toc-level-1 {
  font-weight: 800;
}

.docs-toc-level-3 {
  padding-left: 1.1rem !important;
  font-size: 0.86rem !important;
}

.docs-content {
  padding: clamp(1.25rem, 3vw, 2.4rem);
  line-height: 1.72;
}

.docs-content h1,
.docs-content h2,
.docs-content h3,
.docs-content h4 {
  scroll-margin-top: 1rem;
  color: #0f172a;
  letter-spacing: -0.03em;
}

.docs-content h1 {
  margin-top: 0;
  font-size: clamp(1.9rem, 4vw, 3rem);
}

.docs-content h2 {
  margin: 2.2rem 0 0.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(15, 118, 110, 0.14);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
}

.docs-content h3 {
  margin: 1.45rem 0 0.4rem;
  color: #0f766e;
}

.docs-content p {
  margin: 0.65rem 0;
  color: #334155;
}

.docs-content ul,
.docs-content ol {
  margin: 0.75rem 0 1rem;
  padding-left: 1.25rem;
}

.docs-content li {
  margin: 0.35rem 0;
  color: #334155;
}

.docs-content code {
  display: inline-block;
  padding: 0.08rem 0.35rem;
  border-radius: 0.45rem;
  background: rgba(15, 118, 110, 0.1);
  color: #0f766e;
  font-size: 0.92em;
}

.docs-content a {
  color: #0f766e;
  font-weight: 700;
}

.docs-content blockquote {
  margin: 1.1rem 0;
  padding: 0.9rem 1rem;
  border-left: 4px solid #0f766e;
  border-radius: 0 1rem 1rem 0;
  background: rgba(20, 184, 166, 0.1);
}

.docs-content blockquote p {
  margin: 0;
  color: #0f766e;
  font-weight: 700;
}

.docs-image {
  margin: 22px 0;
  padding: 10px;
  border: 1px solid rgba(120, 139, 160, 0.22);
  border-radius: 22px;
  background: rgba(248, 250, 252, 0.86);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.docs-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid rgba(120, 139, 160, 0.18);
}

.docs-image figcaption {
  margin: 9px 4px 2px;
  color: #64748b;
  font-size: 0.86rem;
  font-weight: 700;
}

.docs-page-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(15, 118, 110, 0.14);
}

.docs-page-nav a {
  display: grid;
  gap: 0.2rem;
  padding: 1rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(240, 253, 250, 0.95), rgba(255, 255, 255, 0.86));
  border: 1px solid rgba(15, 118, 110, 0.14);
  text-decoration: none;
}

.docs-page-nav a:last-child {
  text-align: right;
}

.docs-page-nav span {
  color: #64748b;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.toast-viewport {
  position: fixed;
  top: auto;
  right: 0;
  left: 0;
  bottom: 18px;
  z-index: 1200;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 10px;
  width: auto;
  padding: 0 18px;
  box-sizing: border-box;
  pointer-events: none;
}

.toast {
  width: min(410px, calc(100vw - 32px));
  pointer-events: auto;
  position: relative;
  overflow: hidden;
  padding: 16px 18px 16px 30px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.96), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94));
  color: var(--text);
  box-shadow:
    0 24px 56px rgba(15, 23, 42, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.72) inset;
  backdrop-filter: blur(20px) saturate(1.18);
  transform: translateX(28px) scale(0.985);
  opacity: 0;
  transition: opacity 0.24s ease, transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.toast::before {
  content: "";
  position: absolute;
  inset: 10px auto 10px 10px;
  width: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), #1b63b8);
  box-shadow: 0 0 22px rgba(15, 118, 110, 0.24);
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.toast.is-hiding {
  opacity: 0;
  transform: translateX(18px) scale(0.985);
}

.toast-success {
  background:
    radial-gradient(circle at 12% 8%, rgba(220, 252, 231, 0.94), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 253, 244, 0.94));
}

.toast-success::before {
  background: linear-gradient(180deg, #22c55e, #0f766e);
  box-shadow: 0 0 24px rgba(34, 197, 94, 0.28);
}

.toast-error {
  background:
    radial-gradient(circle at 12% 8%, rgba(254, 226, 226, 0.98), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 241, 242, 0.94));
}

.toast-error::before {
  background: linear-gradient(180deg, #fb7185, #be123c);
  box-shadow: 0 0 24px rgba(225, 29, 72, 0.28);
}

.toast-info {
  background:
    radial-gradient(circle at 12% 8%, rgba(219, 234, 254, 0.96), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.94));
}

.toast-info::before {
  background: linear-gradient(180deg, #38bdf8, #2563eb);
  box-shadow: 0 0 24px rgba(37, 99, 235, 0.26);
}

.toast-loading {
  padding-left: 54px;
  background:
    radial-gradient(circle at 12% 8%, rgba(204, 251, 241, 0.92), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 253, 250, 0.94));
}

.toast-loading::before {
  background: linear-gradient(180deg, hsl(var(--p)), hsl(var(--s)));
}

.toast-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 22px;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  border-radius: 20px;
  border: 2px solid rgba(15, 118, 110, 0.16);
  border-top-color: hsl(var(--p));
  animation: toastSpin 0.78s linear infinite;
}

.toast-title {
  display: block;
  margin: 0 0 4px;
  font-size: 0.74rem;
  letter-spacing: 0.105em;
  text-transform: uppercase;
  color: #475569;
  font-weight: 900;
}

.toast-message {
  display: block;
  margin: 0;
  color: #0f172a;
  font-size: 0.96rem;
  font-weight: 650;
  line-height: 1.38;
}

@keyframes toastSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 720px) {
  .toast-viewport {
    top: 14px;
    right: 12px;
    left: 12px;
    padding: 0;
    width: auto;
  }
}

.bg-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(26px);
  pointer-events: none;
  opacity: 0.7;
}

.bg-orb-a {
  width: 280px;
  height: 280px;
  top: 32px;
  right: 4vw;
  background: rgba(15, 118, 110, 0.14);
}

.bg-orb-b {
  width: 320px;
  height: 320px;
  left: 2vw;
  bottom: 6vh;
  background: rgba(27, 99, 184, 0.12);
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
  padding: 28px 30px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(245, 249, 253, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-saas {
  align-items: center;
}

.top-nav {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line);
}

.lang-switcher label {
  color: var(--muted);
  font-size: 0.9rem;
}

.lang-switcher select,
.live-lang-switcher select {
  min-height: 38px;
  border-radius: 12px;
  padding: 6px 10px;
}

.top-nav a,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 15px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.top-nav a:hover,
.button-link:hover,
.top-nav a.is-current {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.35);
  background: rgba(255, 255, 255, 0.96);
}

.top-nav a.top-nav-docs {
  font-weight: 800;
  color: #0f766e;
  background: linear-gradient(135deg, rgba(240, 253, 250, 0.98), rgba(209, 250, 229, 0.92));
  border-color: rgba(20, 184, 166, 0.38);
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.12);
}

.top-nav a.top-nav-docs:hover {
  color: #064e3b;
  background: linear-gradient(135deg, #ffffff, #ccfbf1);
}

.button-link-accent {
  background: linear-gradient(135deg, var(--accent), #1b63b8);
  color: #fff;
  border: none;
}

.button-link-accent:hover,
.button-link-accent:focus-visible,
.top-nav a.button-link-accent:hover,
.top-nav a.button-link-accent.is-current {
  background: linear-gradient(135deg, #0d6b64, #195ca9);
  color: #fff;
  border: none;
}

.hero-copy-wrap {
  display: grid;
  gap: 12px;
}

.hero-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-tag {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.inline-form {
  margin: 0;
}

.flash {
  margin-top: 14px;
  padding: 13px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(14px);
}

.flash-success {
  border-color: #b6d7b9;
  background: #eef8ee;
}

.flash-error {
  border-color: #e8b8b8;
  background: #fff0f0;
}

.flash-warning {
  border-color: #ead9a6;
  background: #fff8df;
}

.is-toast-flash {
  display: none;
}

.single-column,
.marketing-grid {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.single-column {
  max-width: 720px;
}

.marketing-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.auth-card {
  max-width: 520px;
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr);
  gap: 18px;
  margin-top: 18px;
  align-items: stretch;
}

.login-showcase,
.login-card {
  min-height: 100%;
}

.login-showcase {
  padding: 28px;
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.16), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(242, 248, 255, 0.92));
}

.login-showcase h2,
.login-card h2 {
  margin: 0 0 10px;
}

.login-secondary-action {
  margin: 14px 0 0;
}

.login-highlights {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.login-highlight {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(160, 180, 201, 0.18);
}

.login-highlight-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.14), rgba(27, 99, 184, 0.16));
  color: var(--accent-dark);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.login-highlight strong {
  display: block;
  margin-bottom: 6px;
}

.login-highlight p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.login-card {
  padding: 26px;
  display: grid;
  align-content: center;
}

.card-feature h2,
.card-elevated h2 {
  margin-top: 0;
}

.section-kicker {
  margin-bottom: 10px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-dark);
}

.section-copy {
  margin-top: -6px;
  margin-bottom: 18px;
  color: var(--muted);
}

.dashboard-toolbar {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  position: relative;
  overflow: hidden;
  padding: 22px 24px;
}

.dashboard-toolbar::after {
  content: "";
  position: absolute;
  inset: auto -8% -40% auto;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(15, 118, 110, 0.18), transparent 66%);
  pointer-events: none;
}

.toolbar-copy h2 {
  margin: 0 0 8px;
}

.dashboard-filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  min-width: min(320px, 100%);
  justify-content: flex-end;
}

.dashboard-filters label {
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0;
  text-align: right;
}

.dashboard-filter-field {
  display: grid;
  grid-template-columns: auto minmax(180px, 220px);
  gap: 10px 12px;
  align-items: center;
  justify-content: end;
}

.user-admin-list {
  display: grid;
  gap: 18px;
}

.scrollable-panel {
  max-height: 980px;
  overflow: auto;
  padding-right: 6px;
}

.subscription-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fffaf3;
}

.subscription-card h3,
.subscription-card p {
  margin: 0;
}

.subscription-card textarea {
  min-height: 90px;
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 10px 12px;
  font: inherit;
}

.scrollable-list {
  max-height: 220px;
  overflow-y: auto;
}

.admin-grid .table-wrap,
.admin-section .table-wrap {
  max-height: 420px;
  overflow: auto;
}

.manual-availability-panel {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(15, 118, 110, 0.12);
}

.compact-card-header {
  margin-bottom: 0.75rem;
}

.compact-card-header h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 850;
}

.manual-availability-grid {
  display: grid;
  gap: 0.75rem;
}

.manual-availability-period {
  display: grid;
  gap: 0.55rem;
  padding: 0.75rem;
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 1rem;
  background:
    linear-gradient(135deg, rgba(240, 253, 250, 0.78), rgba(255, 255, 255, 0.86));
}

.manual-availability-period-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.manual-availability-period-header strong {
  color: #0f766e;
}

.manual-availability-period-header span {
  color: var(--muted);
  font-size: 0.86rem;
}

.manual-availability-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.manual-availability-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 118, 110, 0.12);
  color: #0f172a;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.manual-availability-chip:hover,
.manual-availability-chip:focus-visible {
  border-color: rgba(15, 118, 110, 0.32);
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.12);
  outline: none;
  transform: translateY(-1px);
}

.manual-availability-chip small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.manual-availability-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.eyebrow {
  margin: 0 0 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #155e75;
  font-size: 0.8rem;
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.hero-copy {
  max-width: 56ch;
  color: var(--muted);
  margin-bottom: 0;
}

.date-panel,
.card,
.stat-card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(18px);
}

.date-panel {
  min-width: 220px;
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 20px;
}

.stats-grid,
.content-grid,
.admin-grid {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

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

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

#resourcesSection .content-grid,
#dailySection .content-grid,
#timetableSection .content-grid {
  grid-template-columns: 1fr;
  align-items: start;
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
}

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

.admin-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}

.admin-main {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.admin-section {
  display: none;
  gap: 18px;
}

.admin-section.is-active {
  display: grid;
}

.admin-section > .card {
  width: 100%;
}

.admin-section .stats-grid {
  margin-top: 0;
}

.view-switcher {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.view-button {
  background: rgba(255, 255, 255, 0.75);
  color: var(--text);
  border: 1px solid var(--line);
}

.view-button.is-active {
  background: var(--accent);
  color: #fff;
}

.stat-card,
.card {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat-card {
  padding: 16px 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(243, 249, 255, 0.86));
}

.stat-label {
  display: block;
  color: var(--muted);
  margin-bottom: 10px;
}

.stat-value {
  font-size: 2rem;
}

.card {
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 251, 255, 0.84));
}

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

.card-header h2 {
  margin: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.login-form.form-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 6px;
}

.login-form input[type="hidden"] {
  display: none;
}

.login-form > * {
  width: 100%;
}

.form-stack {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
}

.field-stack {
  display: grid;
  gap: 8px;
}

.field-stack label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}

.settings-panel {
  display: grid;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(245, 250, 255, 0.84));
}

.settings-panel-header {
  display: grid;
  gap: 6px;
}

.settings-panel-header h3 {
  margin: 0;
  font-size: 1rem;
}

.settings-panel-header .helper-text {
  margin: 0;
}

.settings-panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.co-presence-settings-grid {
  align-items: start;
}

.co-presence-settings-grid select[multiple] {
  min-height: 112px;
  padding-block: 10px;
}

.co-presence-picker-stack {
  gap: 8px;
}

.co-presence-picker-stack .helper-text {
  margin: -2px 0 0;
}

.co-presence-checklist {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  max-height: 210px;
  padding: 6px;
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
}

.co-presence-class-checklist {
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
}

.co-presence-check-item {
  grid-template-columns: 22px 1fr;
  align-items: center;
  padding: 9px 10px;
}

.co-presence-check-item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.co-presence-checkmark {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid rgba(15, 118, 110, 0.26);
  background: rgba(255, 255, 255, 0.86);
  color: transparent;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.co-presence-check-item.is-selected .co-presence-checkmark {
  border-color: rgba(15, 118, 110, 0.92);
  background: linear-gradient(135deg, #0f766e, #13a06f);
  color: #fff;
  transform: scale(1.04);
}

.pwa-install-grid {
  display: grid;
  gap: 14px;
}

.pwa-install-option {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.9), rgba(240, 253, 250, 0.68));
}

.pwa-install-option img {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  box-shadow: 0 14px 28px rgba(15, 118, 110, 0.18);
}

.pwa-mobile-icon-preview-pair {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.pwa-mobile-icon-preview-pair img {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
}

.pwa-install-option h3 {
  margin: 0 0 5px;
  font-size: 1rem;
  font-weight: 800;
}

.pwa-install-option p {
  margin: 0 0 12px;
  color: var(--muted);
}

.pwa-install-option.is-disabled {
  opacity: 0.58;
}

#pwaMobileInstallOption {
  grid-template-columns: auto minmax(0, 1fr);
}

.field-stack.is-disabled,
button.is-disabled {
  opacity: 0.48;
  filter: grayscale(0.35);
}

.settings-panel.is-disabled {
  opacity: 0.62;
}

.settings-panel.is-disabled input,
.settings-panel.is-disabled select {
  cursor: not-allowed;
}

.form-warning {
  color: #b45309;
  font-weight: 700;
}

.mobile-token-expiry-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) max-content;
  gap: 10px;
  align-items: end;
}

.mobile-token-expiry-row .button-secondary {
  white-space: nowrap;
}

.mobile-token-expiry-row.mobile-push-time-row,
.class-variation-cutoff-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mobile-token-expiry-row.mobile-push-time-row .field-stack,
.class-variation-cutoff-row .field-stack {
  min-width: 0;
}

.mobile-token-expiry-row.mobile-push-time-row input,
.class-variation-cutoff-row input,
.class-variation-cutoff-row select {
  width: 100%;
}

.school-logo-settings-grid {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.school-logo-preview {
  min-height: 104px;
  display: grid;
  place-items: center;
  padding: 14px;
  border: 1px dashed rgba(15, 118, 110, 0.22);
  border-radius: 18px;
  background: rgba(236, 253, 245, 0.55);
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}

.school-logo-preview img {
  max-width: 100%;
  max-height: 92px;
  object-fit: contain;
}

.live-school-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

#liveSchoolName {
  margin: 0;
}

.live-shell:not(.live-kiosk-shell):not(.live-mobile-shell) #liveSchoolName {
  line-height: 1.08;
}

.live-shell:not(.live-kiosk-shell):not(.live-mobile-shell) .live-header .eyebrow {
  margin-bottom: 10px;
}

.live-shell:not(.live-kiosk-shell):not(.live-mobile-shell) .live-header .hero-copy {
  margin-top: 8px;
}

.live-school-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
  flex: 0 0 auto;
  padding: 5px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.13);
}

.live-kiosk-shell .live-school-logo {
  width: clamp(58px, 4.4vw, 92px);
  height: clamp(58px, 4.4vw, 92px);
  border-radius: 18px;
}

.live-mobile-shell .live-school-logo {
  width: 46px;
  height: 46px;
  border-radius: 13px;
}

@media (max-width: 720px) {
  .school-logo-settings-grid,
  .mobile-token-expiry-row {
    grid-template-columns: 1fr;
  }
}

.pwa-install-option .button-link[aria-disabled="true"] {
  pointer-events: none;
  filter: grayscale(1);
}

.pwa-mobile-install-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: fit-content;
  margin: 0 0 12px;
  padding: 5px 10px 5px 6px;
  gap: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.08);
  cursor: pointer;
}

.pwa-mobile-install-toggle input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 0 0 36px;
  width: 36px !important;
  height: 18px !important;
  min-height: 18px !important;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px !important;
  background: #d9e2ea;
  position: relative;
  transition: background 0.16s ease;
  color: transparent;
  font-size: 0;
  line-height: 0;
}

.pwa-mobile-install-toggle input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.22);
  transform: translateX(0);
  transition: transform 0.16s ease;
}

.pwa-mobile-install-toggle input[type="checkbox"]:checked {
  background: linear-gradient(135deg, hsl(var(--p)), hsl(var(--s)));
}

.pwa-mobile-install-toggle input[type="checkbox"]:checked::after {
  transform: translateX(18px);
}

.pwa-mobile-install-toggle input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(15, 118, 110, 0.22);
  outline-offset: 2px;
}

.pwa-mobile-install-toggle span {
  color: hsl(var(--bc));
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.2;
}

.pwa-mobile-expiry-settings {
  display: grid;
  gap: 10px;
  margin: 2px 0 12px;
}

.pwa-mobile-expiry-settings .pwa-mobile-install-toggle {
  margin-bottom: 0;
}

.pwa-mobile-expiry-settings .field-stack label {
  font-size: 0.78rem;
  font-weight: 700;
}

.pwa-install-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.pwa-install-shell {
  width: min(560px, 100%);
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 34px;
  text-align: center;
}

.pwa-install-hero-icon {
  width: 112px;
  height: 112px;
  border-radius: 28px;
  box-shadow: 0 22px 46px rgba(15, 118, 110, 0.26);
}

.pwa-install-shell h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.05em;
}

.pwa-install-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 6px;
}

.pwa-apple-install-card {
  width: 100%;
  margin-top: 4px;
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.88), rgba(255, 255, 255, 0.76));
  text-align: left;
}

.pwa-apple-install-card h2 {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.pwa-apple-install-card ol {
  margin: 0;
  padding-left: 1.35rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.pwa-apple-install-card li + li {
  margin-top: 7px;
}

#schoolSettingsForm {
  grid-template-columns: 1fr;
}

#schoolSettingsForm .settings-panel,
#schoolSettingsForm .form-span-2,
#schoolSettingsForm > button[type="submit"] {
  grid-column: 1 / -1;
}

.period-label-editor {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

#schoolSettingsForm .period-label-editor {
  grid-template-columns: 1fr;
}

.period-label-table {
  display: grid;
  gap: 10px;
}

.period-label-table-header,
.period-label-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.1fr) minmax(120px, 1fr) minmax(120px, 1fr) minmax(180px, 1.2fr);
  gap: 12px;
  align-items: start;
}

#schoolSettingsForm .period-label-table,
#schoolSettingsForm .period-label-table-header,
#schoolSettingsForm .period-label-row,
#schoolSettingsForm .period-label-cell,
#schoolSettingsForm .period-label-preview {
  min-width: 0;
}

#schoolSettingsForm .period-label-table-header,
#schoolSettingsForm .period-label-row {
  grid-template-columns: minmax(110px, 0.8fr) minmax(0, 1fr) minmax(0, 1fr) minmax(130px, 1fr);
}

#schoolSettingsForm .period-label-cell input {
  width: 100%;
  min-width: 0;
}

.period-label-table-header {
  padding: 0 4px;
}

.period-label-table-header span {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.period-label-row {
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
}

.period-label-period {
  display: flex;
  align-items: center;
  min-height: 46px;
}

.period-label-period strong {
  font-size: 0.94rem;
  color: var(--ink);
}

.period-label-cell small,
.period-label-preview small {
  font-size: 0.78rem;
  color: var(--muted);
}

.period-label-preview {
  display: grid;
  gap: 4px;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.04);
}

.period-label-preview strong {
  font-size: 0.92rem;
  color: var(--ink);
  font-weight: 700;
}

@media (max-width: 900px) {
  .period-label-table-header {
    display: none;
  }

  .period-label-row {
    grid-template-columns: 1fr;
  }
}

.teacher-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding: 4px;
}

.teacher-check-item {
  position: relative;
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.teacher-check-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.teacher-check-item.is-selected {
  border-color: rgba(11, 115, 91, 0.32);
  background: rgba(225, 247, 240, 0.95);
  box-shadow: 0 10px 24px rgba(11, 115, 91, 0.08);
}

.teacher-check-item input {
  margin-top: 2px;
}

.teacher-check-item strong {
  font-size: 0.95rem;
  line-height: 1.18;
}

.teacher-check-item small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.2;
  margin-top: 0;
}

.teacher-check-item-compact {
  padding: 8px 10px;
  gap: 9px;
  border-radius: 12px;
}

.teacher-check-item-compact strong {
  font-size: 0.9rem;
}

.teacher-check-item-compact small {
  font-size: 0.76rem;
}

.selection-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.selection-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 7px;
  padding: 5px 5px 5px 10px;
  border-radius: 999px;
  background: #eef1f4;
  color: #243244;
  border: 1px solid rgba(120, 139, 160, 0.22);
  line-height: 1;
}

.selection-pill-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selection-pill-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  min-width: 19px;
  min-height: 19px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.18);
  color: #334155;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
}

.selection-pill-remove:hover {
  background: rgba(100, 116, 139, 0.32);
  color: #0f172a;
}

.selection-pill .selection-pill-remove {
  width: 19px !important;
  height: 19px !important;
  min-width: 19px !important;
  min-height: 19px !important;
  padding: 0 !important;
  border-radius: 999px !important;
}

.admin-school-picker-field {
  max-width: 760px;
}

.admin-school-picker {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(120, 139, 160, 0.22);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.9));
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.admin-school-picker-search {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(120, 139, 160, 0.16);
  background: rgba(255, 255, 255, 0.84);
}

.admin-school-picker-search span {
  display: grid;
  place-items: center;
  color: #64748b;
}

.admin-school-picker-search svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-school-picker-search input {
  width: 100%;
  min-height: 36px;
  padding: 6px 2px;
  border: 0;
  background: transparent;
  color: #263445;
  font-weight: 600;
  box-shadow: none;
}

.admin-school-picker-search input:focus {
  outline: none;
  box-shadow: none;
}

.admin-school-picker-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 42px;
  max-height: 92px;
  overflow: auto;
  padding: 9px 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.72));
  box-shadow: 0 10px 20px rgba(255, 255, 255, 0.72);
  z-index: 1;
}

.admin-school-picker-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 7px;
  max-height: 150px;
  overflow: auto;
  padding: 9px;
}

.admin-school-check-item {
  display: grid;
  grid-template-columns: 0 22px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px 9px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.admin-school-check-item input {
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.admin-school-checkmark {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(100, 116, 139, 0.28);
  background: #fff;
  color: transparent;
}

.admin-school-checkmark svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-school-check-item strong {
  overflow: hidden;
  color: #253347;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-school-check-item.is-selected {
  border-color: rgba(11, 115, 91, 0.28);
  background: rgba(225, 247, 240, 0.96);
  box-shadow: 0 10px 22px rgba(11, 115, 91, 0.08);
}

.admin-school-check-item.is-selected .admin-school-checkmark {
  border-color: rgba(11, 115, 91, 0.55);
  background: linear-gradient(135deg, #0f766e, #16a34a);
  color: #fff;
}

.admin-school-picker-empty {
  align-self: center;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.admin-school-picker-source {
  display: none !important;
}

.form-stack:has(#absenceTeacherSearch),
.form-stack:has(#outdoorClassSearch),
.form-stack:has(#outdoorTeacherSearch) {
  gap: 0;
  padding: 12px;
  border: 1px solid rgba(120, 139, 160, 0.22);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.86));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.form-stack:has(#absenceTeacherSearch) > label,
.form-stack:has(#outdoorClassSearch) > label,
.form-stack:has(#outdoorTeacherSearch) > label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.form-stack:has(#absenceTeacherSearch) > input,
.form-stack:has(#outdoorClassSearch) > input,
.form-stack:has(#outdoorTeacherSearch) > input {
  display: block;
  width: 100%;
  max-width: none;
  border-radius: 10px 10px 0 0;
  border-color: rgba(120, 139, 160, 0.28);
  background-color: rgba(255, 255, 255, 0.94);
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E");
  background-position: 12px center;
  background-repeat: no-repeat;
  background-size: 17px 17px;
  padding-left: 38px;
  color: #020617;
  box-shadow: none;
}

.form-stack:has(#absenceTeacherSearch) > input::placeholder,
.form-stack:has(#outdoorClassSearch) > input::placeholder,
.form-stack:has(#outdoorTeacherSearch) > input::placeholder {
  color: #475569;
  opacity: 1;
}

.form-stack:has(#absenceTeacherSearch) > .helper-text,
.form-stack:has(#outdoorClassSearch) > .helper-text,
.form-stack:has(#outdoorTeacherSearch) > .helper-text {
  position: relative;
  z-index: 2;
  min-height: 38px;
  margin: 0;
  padding: 8px 10px;
  border-right: 1px solid rgba(120, 139, 160, 0.24);
  border-left: 1px solid rgba(120, 139, 160, 0.24);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 6px 10px rgba(255, 255, 255, 0.72);
}

.form-stack:has(#absenceTeacherSearch) > .helper-text:not(.selection-pill-list),
.form-stack:has(#outdoorClassSearch) > .helper-text:not(.selection-pill-list),
.form-stack:has(#outdoorTeacherSearch) > .helper-text:not(.selection-pill-list) {
  display: flex;
  align-items: center;
}

.form-stack:has(#absenceTeacherSearch) > .teacher-checklist,
.form-stack:has(#outdoorClassSearch) > .teacher-checklist,
.form-stack:has(#outdoorTeacherSearch) > .teacher-checklist {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 10px;
  border: 1px solid rgba(120, 139, 160, 0.24);
  border-radius: 0 0 10px 10px;
  border-top: 0;
  background: rgba(255, 255, 255, 0.54);
}

.form-stack:has(#absenceTeacherSearch) .teacher-check-item,
.form-stack:has(#outdoorClassSearch) .teacher-check-item,
.form-stack:has(#outdoorTeacherSearch) .teacher-check-item {
  border-color: rgba(120, 139, 160, 0.18);
  background: rgba(255, 255, 255, 0.7);
}

.form-stack:has(#absenceTeacherSearch) .teacher-check-item.is-selected,
.form-stack:has(#outdoorClassSearch) .teacher-check-item.is-selected,
.form-stack:has(#outdoorTeacherSearch) .teacher-check-item.is-selected {
  background: rgba(225, 247, 240, 0.92);
}

#outdoorClassChecklist {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.search-field {
  display: grid;
}

.search-field.has-teacher-suggestions {
  position: relative;
}

.teacher-suggest {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 40;
  display: grid;
  gap: 2px;
  max-height: 220px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: hsl(var(--b1));
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
}

.teacher-suggest-item {
  display: block;
  width: 100%;
  min-height: 30px;
  height: auto;
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: hsl(var(--bc));
  box-shadow: none;
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.2;
  text-align: left;
}

.teacher-suggest-item:hover,
.teacher-suggest-item.is-active {
  transform: none;
  background: hsl(var(--b2));
  color: hsl(var(--p));
}

.auto-substitution-bar {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 18px;
  justify-content: flex-end;
}

.auto-substitution-bar label {
  color: var(--muted);
  font-size: 0.9rem;
  margin-right: auto;
}

input,
select,
button {
  min-height: 44px;
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.94);
}

button {
  background: linear-gradient(135deg, var(--accent), #1b63b8);
  color: white;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
  font-weight: 700;
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(0.96);
}

.table-wrap {
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid rgba(160, 180, 201, 0.18);
}

.dashboard-group .table-wrap {
  max-height: 420px;
  overflow: auto;
}

#resourcesSection #schoolSettingsCard {
  order: 1;
}

#resourcesSection #teachersCard {
  order: 2;
}

#resourcesSection #classesCard {
  order: 3;
}

#timetableSection .table-wrap {
  max-height: 560px;
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
}

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

th {
  color: var(--muted);
  font-weight: 600;
  background: rgba(238, 246, 255, 0.8);
  position: sticky;
  top: 0;
  z-index: 3;
  backdrop-filter: blur(10px);
}

.sort-button {
  width: 100%;
  min-height: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  border: none;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  font-weight: 700;
  box-shadow: none;
}

.sort-button::after {
  content: "↕";
  font-size: 0.82rem;
  opacity: 0.45;
}

.sort-button.is-active::after {
  content: "↑";
  opacity: 0.9;
}

.sort-button.is-active.is-desc::after {
  content: "↓";
}

.sort-button:hover {
  transform: none;
  filter: none;
}

.is-uncovered-row td {
  background: rgba(255, 238, 238, 0.78);
}

.copresence-replacement-note {
  display: inline-block;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.35;
}

.table-action-button {
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  border: 1px solid var(--line);
  font-size: 0.9rem;
}

.table-action-button.is-danger,
.button-danger {
  background: linear-gradient(135deg, #b42318, #d92d20);
  color: #fff;
  border-color: rgba(151, 18, 18, 0.32);
}

.table-actions-inline,
.form-actions-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

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

.danger-panel {
  margin: 14px 0 18px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(217, 45, 32, 0.22);
  background: linear-gradient(180deg, rgba(255, 241, 240, 0.96), rgba(255, 232, 229, 0.92));
}

.danger-panel strong {
  display: block;
  margin-bottom: 6px;
  color: #8f1d14;
}

.danger-panel p {
  margin: 0 0 12px;
}

.section-divider {
  margin: 18px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.chip-list {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, var(--surface-strong));
  border: 1px solid var(--line);
}

.chip small {
  color: var(--muted);
}

.helper-text {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.95rem;
}

.localized-date-field {
  position: relative;
  width: 100%;
}

.date-native-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}

.localized-date-proxy {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  font-weight: 500;
}

.localized-date-proxy:hover {
  transform: none;
  filter: none;
  border-color: rgba(15, 118, 110, 0.3);
}

.localized-date-text {
  flex: 1 1 auto;
  line-height: 1.2;
}

.localized-date-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--accent);
  flex: 0 0 26px;
}

.localized-date-icon svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 1.9;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.operations-stage,
.control-grid,
.workflow-strip {
  margin-top: 16px;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}

.dashboard-sidebar {
  position: sticky;
  top: 20px;
  padding: 16px;
}

.dashboard-side-nav {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.dashboard-side-group {
  display: grid;
  gap: 6px;
}

.dashboard-side-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 10px 14px 10px 16px;
  border-radius: 12px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 251, 255, 0.66));
  border: 1px solid rgba(148, 163, 184, 0.1);
  text-align: left;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.62) inset,
    0 6px 14px rgba(15, 23, 42, 0.025);
  font-weight: 700;
  position: relative;
  overflow: hidden;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.dashboard-side-link span:last-child {
  display: flex;
  align-items: center;
  align-self: stretch;
  flex: 1 1 auto;
  min-height: 1.2em;
  line-height: 1;
}

.dashboard-side-link::before {
  content: "";
  position: absolute;
  inset: 9px auto 9px 6px;
  width: 5px;
  border-radius: 999px;
  background: transparent;
}

.dashboard-side-link:hover,
.dashboard-side-link.is-active {
  border-color: rgba(15, 118, 110, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 253, 250, 0.68));
  transform: none;
  filter: none;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.76) inset,
    0 8px 18px rgba(15, 23, 42, 0.045);
}

.dashboard-side-link.is-active {
  background:
    linear-gradient(180deg, rgba(236, 253, 245, 0.98), rgba(255, 255, 255, 0.9));
  border-color: rgba(15, 118, 110, 0.18);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.82) inset,
    0 7px 16px rgba(15, 118, 110, 0.065);
}

.dashboard-side-link.is-active::before {
  background: linear-gradient(180deg, #22c55e, var(--accent), #1b63b8);
}

.dashboard-subnav {
  display: grid;
  gap: 5px;
  margin: 4px 0 2px 18px;
  padding: 6px 0 6px 16px;
  border-left: 1px solid rgba(15, 118, 110, 0.14);
}

.dashboard-sub-link {
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.38);
  color: var(--muted);
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: none;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.dashboard-sub-link:hover {
  transform: translateX(2px);
  filter: none;
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(15, 118, 110, 0.08);
  color: var(--text);
}

.dashboard-sub-link.is-active {
  background: rgba(15, 118, 110, 0.12);
  border-color: rgba(15, 118, 110, 0.1);
  box-shadow: inset 4px 0 0 rgba(15, 118, 110, 0.42);
  color: var(--accent-dark);
  font-weight: 800;
}

.nav-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  color: var(--accent);
  font-size: 1.08rem;
  background: rgba(15, 118, 110, 0.09);
  align-self: center;
  justify-self: center;
  line-height: 1;
}

.nav-icon svg {
  display: block;
}

.dashboard-side-link.is-active .nav-icon {
  background: rgba(15, 118, 110, 0.16);
  color: var(--accent-dark);
}

.dashboard-main {
  min-width: 0;
}

.dashboard-group {
  display: none;
  animation: dashboardSectionIn 0.2s ease;
}

.dashboard-group.is-active {
  display: block;
}

.dashboard-group .dashboard-subsection-active {
  animation: dashboardSectionIn 0.2s ease;
}

.dashboard-group .card[hidden],
.dashboard-group [hidden] {
  display: none !important;
}

.dashboard-group-heading {
  margin-bottom: 14px;
}

.dashboard-group-heading h2 {
  margin: 0 0 6px;
}

.dashboard-group-heading p {
  margin: 0;
  color: var(--muted);
}

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

.operations-stage {
  display: grid;
  gap: 14px;
}

.operations-hero {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 14px;
  align-items: stretch;
}

.operations-hero h2 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
}

.operations-hero p {
  margin: 0;
  max-width: 60ch;
  color: var(--muted);
}

.operations-hero-status {
  display: grid;
  gap: 10px;
}

.status-tile {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(248, 251, 255, 0.8);
  border: 1px solid rgba(160, 180, 201, 0.2);
}

.status-tile span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

.status-tile strong {
  font-size: 1.08rem;
}

.status-tile-accent {
  background: linear-gradient(135deg, rgba(223, 246, 243, 0.86), rgba(238, 246, 255, 0.84));
}

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

.workflow-step {
  padding: 15px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(243, 248, 255, 0.86));
  border: 1px solid rgba(160, 180, 201, 0.22);
  box-shadow: var(--shadow);
}

.workflow-step strong {
  display: block;
  margin: 12px 0 10px;
  font-size: 1.05rem;
}

.workflow-step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.workflow-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(27, 99, 184, 0.12));
  color: var(--accent-dark);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.control-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 14px;
}

.panel-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.84rem;
}

.panel-badge-live {
  background: rgba(27, 99, 184, 0.12);
  color: #17417a;
}

.control-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.control-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
}

.control-item strong,
.publication-metric strong {
  display: block;
  margin-top: 6px;
  font-size: 1.15rem;
}

.control-label {
  color: var(--muted);
  font-size: 0.92rem;
}

.control-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 34px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.control-item.is-ok .control-state {
  background: #e6f8ef;
  color: #0a6b45;
}

.control-item.is-warning .control-state {
  background: #fff1dc;
  color: #9a6300;
}

.attention-panel {
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.84), rgba(238, 246, 255, 0.9));
  border: 1px solid rgba(160, 180, 201, 0.18);
}

.attention-panel strong {
  display: block;
  margin-bottom: 12px;
}

.attention-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.55;
}

.publication-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.publication-metric {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(160, 180, 201, 0.2);
  background: rgba(255, 255, 255, 0.86);
}

.publication-metric span {
  color: var(--muted);
  font-size: 0.9rem;
}

.publication-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

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

.legend-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(160, 180, 201, 0.18);
  background: rgba(248, 251, 255, 0.72);
}

.legend-card p,
.legend-card strong {
  margin: 0;
}

.legend-card p {
  margin-top: 4px;
  color: var(--muted);
}

.legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  margin-top: 4px;
  flex: 0 0 auto;
}

.legend-class {
  background: #1b63b8;
}

.legend-disp {
  background: #0f766e;
}

.legend-other {
  background: #c38a21;
}

textarea {
  width: 100%;
  min-height: 96px;
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.94);
  font: inherit;
}

.import-preview {
  margin-bottom: 18px;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(238, 246, 255, 0.92), rgba(255, 255, 255, 0.92));
  border: 1px solid rgba(15, 118, 110, 0.16);
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.preview-grid ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.preview-banner {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(15, 118, 110, 0.08);
  border: 1px solid rgba(15, 118, 110, 0.16);
}

.preview-banner strong,
.preview-banner p {
  margin: 0;
}

.preview-banner p {
  margin-top: 6px;
  color: var(--muted);
}

.preview-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  border: 1px solid var(--line);
}

.checkbox-field {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text);
}

.checkbox-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

html:has(.live-body),
.live-body {
  background:
    radial-gradient(circle at top left, rgba(17, 185, 129, 0.18), transparent 22%),
    radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.16), transparent 26%),
    linear-gradient(180deg, #08131f 0%, #102133 100%);
  background-attachment: fixed;
}

.live-body {
  color: #eef6ff;
  min-height: 100vh;
  overscroll-behavior: none;
}

.live-shell {
  width: min(1380px, calc(100% - 40px));
  margin: 22px auto 36px;
}

.live-gate-shell {
  min-height: calc(100vh - 120px);
  display: grid;
  place-items: center;
}

.live-gate-card {
  width: min(560px, 100%);
  padding: 34px 32px;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(236, 245, 255, 0.95));
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 26px 64px rgba(4, 10, 20, 0.34);
}

.live-gate-card h1 {
  margin-bottom: 10px;
}

.live-gate-card .hero-copy {
  margin-bottom: 22px;
}

.live-gate-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-bottom: 20px;
}

.live-gate-form {
  margin-top: 10px;
}

.live-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  justify-content: stretch;
  align-items: end;
  gap: 18px;
  padding: 24px 26px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(9, 22, 36, 0.96), rgba(14, 41, 66, 0.94));
  color: #f5fbff;
  border: 1px solid rgba(125, 211, 252, 0.18);
  box-shadow: 0 24px 60px rgba(4, 10, 20, 0.36);
}

.live-header .hero-copy,
.live-header .eyebrow {
  color: rgba(228, 240, 255, 0.76);
}

.live-controls {
  display: grid;
  grid-template-columns: 170px repeat(4, max-content);
  gap: 8px 10px;
  align-items: end;
  justify-content: end;
  width: max-content;
  max-width: 100%;
}

.live-controls label {
  color: rgba(228, 240, 255, 0.76);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.live-controls input,
.live-controls select {
  background: rgba(255, 255, 255, 0.92);
}

.live-control-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 14px;
  text-decoration: none;
  border: 1px solid rgba(16, 77, 129, 0.22);
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #1b63b8);
  color: #fff;
  box-shadow: 0 12px 26px rgba(9, 28, 52, 0.22);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.live-control-button:hover,
.live-control-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(125, 211, 252, 0.3);
  background: linear-gradient(135deg, #0d6b64, #195ca9);
  box-shadow: 0 14px 30px rgba(9, 28, 52, 0.28);
}

.live-control-button:focus-visible {
  outline: 2px solid rgba(125, 211, 252, 0.45);
  outline-offset: 2px;
}

.live-button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.12);
  flex: 0 0 26px;
}

.live-button-icon svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 1.9;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.live-button-label {
  font-weight: 700;
  line-height: 1.1;
}

.live-export-split {
  position: relative;
  display: inline-flex;
  align-items: stretch;
}

.live-control-button-primary {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.live-control-button-toggle {
  min-width: 44px;
  padding: 8px 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.24);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  margin-left: 0;
}

.live-control-button-toggle svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.live-export-split.is-open .live-control-button-toggle,
.live-export-split.is-open .live-control-button-primary {
  transform: translateY(-1px);
  border-color: rgba(125, 211, 252, 0.3);
  background: linear-gradient(135deg, #0d6b64, #195ca9);
  box-shadow: 0 14px 30px rgba(9, 28, 52, 0.28);
}

.live-export-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 260px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(10, 27, 48, 0.96);
  border: 1px solid rgba(125, 211, 252, 0.22);
  box-shadow: 0 18px 40px rgba(2, 10, 23, 0.32);
  z-index: 20;
}

.live-export-menu-item {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  text-decoration: none;
  color: #f8fbff;
  transition: background 0.2s ease, transform 0.2s ease;
}

.live-export-menu-item:hover,
.live-export-menu-item:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
  outline: none;
}

.live-export-menu-title {
  font-weight: 700;
  line-height: 1.2;
}

.live-export-menu-copy {
  font-size: 0.83rem;
  color: rgba(228, 240, 255, 0.72);
  line-height: 1.35;
}

.live-lang-switcher {
  display: grid;
}

.live-shell .stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.live-shell .stat-card {
  background:
    linear-gradient(180deg, rgba(13, 31, 49, 0.94), rgba(14, 41, 66, 0.9));
  border: 1px solid rgba(125, 211, 252, 0.12);
  color: #f5fbff;
  box-shadow: 0 18px 50px rgba(4, 10, 20, 0.28);
}

.live-shell .stat-label {
  color: rgba(228, 240, 255, 0.7);
}

.live-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 20px;
}

.live-grid .card {
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(236, 245, 255, 0.95));
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.live-grid .card-header h2 {
  font-size: 1.35rem;
}

.live-grid .table-wrap {
  border: 1px solid rgba(125, 145, 168, 0.18);
}

.live-grid th {
  background: rgba(220, 234, 252, 0.82);
}

.live-grid td {
  font-size: 1rem;
}

.live-grid table th:nth-child(6),
.live-grid table td:nth-child(6) {
  display: none;
}

.live-kiosk-body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  padding-top: var(--kiosk-banner-height, 118px);
}

.live-kiosk-body.is-kiosk-fullscreen-active,
.live-kiosk-body.is-kiosk-fullscreen-active * {
  cursor: none !important;
}

.live-kiosk-body,
.live-kiosk-body *,
.live-mobile-body,
.live-mobile-body * {
  -webkit-user-select: none;
  user-select: none;
}

.live-kiosk-shell {
  width: 100%;
  height: calc(100vh - var(--kiosk-banner-height, 118px));
  height: calc(100dvh - var(--kiosk-banner-height, 118px));
  margin: 0;
  display: grid;
  grid-template-rows: 1fr;
  gap: 0;
  min-height: 0;
}

.live-kiosk-shell .live-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 10px 30px 10px 30px;
  align-items: center;
  border-radius: 0;
  border-width: 0 0 1px;
  box-shadow: 0 18px 42px rgba(3, 10, 22, 0.32);
}

.live-kiosk-shell .live-header > div:first-child {
  padding: 8px 0;
}

.live-display-banner-aside {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: 12px;
  min-width: min(56vw, 940px);
}

.live-kiosk-shell .card,
.live-kiosk-shell .du-card,
.live-kiosk-shell .bg-base-100 {
  padding: 0;
}

.live-kiosk-shell .live-header h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3.1vw, 3.8rem);
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.live-kiosk-shell .eyebrow {
  margin: 0 0 18px;
  font-size: clamp(0.82rem, 1.1vw, 1.05rem);
}

.live-kiosk-shell .hero-copy {
  margin: 9px 0 6px;
  font-size: clamp(0.92rem, 1.25vw, 1.45rem);
}

.live-kiosk-shell .stats-grid {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.live-kiosk-shell .stat-card {
  flex: 1 1 0;
  min-width: 0;
  align-self: center;
  padding: 8px 14px;
  border-radius: 16px;
  box-shadow: none;
}

.live-kiosk-shell .stat-value {
  font-size: clamp(1.35rem, 2.2vw, 2.7rem);
  line-height: 0.95;
}

.live-kiosk-shell .stat-label {
  font-size: clamp(0.72rem, 0.9vw, 1rem);
  line-height: 1.15;
}

.live-kiosk-shell .live-grid {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  margin-top: 0;
  gap: 0;
  overflow: hidden;
  background: #fff;
  padding-bottom: var(--kiosk-bottom-banner-height, 62px);
}

.live-kiosk-shell .live-grid .card {
  min-height: 0;
  height: 100%;
  align-self: stretch;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  border-radius: 0;
  border: 0;
  box-shadow: none;
}

.live-kiosk-shell .live-grid .card-header {
  display: none;
}

.live-kiosk-shell .live-grid .card-header h2 {
  font-size: clamp(1.4rem, 2.1vw, 2.4rem);
}

.live-kiosk-shell .live-grid .table-wrap {
  min-height: 0;
  height: 100%;
  align-self: stretch;
  max-height: none;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
  border-radius: 0;
  border: 0;
  background: #fff;
  padding-bottom: 0;
  scroll-padding-bottom: var(--kiosk-bottom-banner-height, 62px);
}

.live-kiosk-shell .live-grid table {
  font-size: clamp(1.05rem, 1.35vw, 1.7rem);
  width: 100%;
}

.kiosk-split-table-wrap {
  display: none;
  height: 100%;
  min-height: 0;
}

.live-kiosk-shell .live-grid th,
.live-kiosk-shell .live-grid td {
  padding: 16px 18px;
}

.live-kiosk-shell .live-grid td {
  font-size: inherit;
  line-height: 1.25;
}

.live-kiosk-shell .sort-button {
  font-size: inherit;
}

.kiosk-bottom-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  height: var(--kiosk-bottom-banner-height, 62px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 30px;
  background: #fff;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: 0 -14px 34px rgba(15, 23, 42, 0.08);
  color: #475569;
}

.kiosk-bottom-copyright {
  min-width: 0;
  font-size: clamp(0.82rem, 0.9vw, 1rem);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kiosk-page-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.kiosk-page-indicator {
  min-width: 150px;
  color: #0f172a;
  font-size: clamp(0.98rem, 1.12vw, 1.32rem);
  font-weight: 800;
  text-align: center;
}

.kiosk-page-button {
  width: 42px;
  height: 42px;
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  margin: 0;
  line-height: 1;
  border-radius: 999px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  background: linear-gradient(135deg, #ecfdf5, #dbeafe);
  color: #0f766e;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.11);
}

.kiosk-page-button svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (orientation: landscape) {
  .live-kiosk-shell .live-grid .table-wrap:has(.kiosk-split-table-wrap.is-single-column) > .sortable-table,
  .live-kiosk-shell .live-grid .table-wrap:has(.kiosk-split-table-wrap.is-split-column) > .sortable-table {
    display: none;
  }

  .live-kiosk-shell .kiosk-split-table-wrap {
    display: none;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0;
    height: 100%;
    min-height: 0;
    background: #fff;
  }

  .live-kiosk-shell .kiosk-split-table-wrap.is-single-column,
  .live-kiosk-shell .kiosk-split-table-wrap.is-split-column {
    display: grid;
  }

  .live-kiosk-shell .kiosk-split-table {
    display: table;
    width: 100%;
    height: 100%;
    min-width: 0;
    table-layout: fixed;
  }

  .live-kiosk-shell .kiosk-split-table thead {
    height: clamp(42px, 3.1vw, 56px);
  }

  .live-kiosk-shell .kiosk-split-table tbody {
    height: calc(100% - clamp(42px, 3.1vw, 56px));
  }

  .live-kiosk-shell .kiosk-split-table:first-child {
    border-right: 3px solid rgba(14, 41, 66, 0.68);
  }

  .live-kiosk-shell .kiosk-split-table-wrap.is-single-column {
    grid-template-columns: minmax(0, min(960px, 56vw));
    justify-content: center;
    position: relative;
    overflow: hidden;
  }

  .live-kiosk-shell .kiosk-split-table-wrap.is-single-column .kiosk-split-table:first-child {
    border-right: 0;
  }

  .live-kiosk-shell .kiosk-split-table-wrap.is-single-column::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: clamp(42px, 3.1vw, 56px);
    background: rgba(220, 234, 252, 0.92);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
    pointer-events: none;
  }

  .live-kiosk-shell .kiosk-split-table-wrap.is-single-column .kiosk-split-table {
    position: relative;
    z-index: 1;
  }

  .live-kiosk-shell .kiosk-split-table-wrap.is-single-column .kiosk-split-table th {
    background: transparent;
  }

  .live-kiosk-shell .kiosk-split-table-wrap.is-single-column .kiosk-split-table:last-child {
    display: none;
  }

  .live-kiosk-shell .kiosk-split-table th,
  .live-kiosk-shell .kiosk-split-table td {
    padding: clamp(8px, 0.9vw, 14px) clamp(8px, 0.9vw, 13px);
    font-size: clamp(0.78rem, 0.92vw, 1.1rem);
  }

  .live-kiosk-shell .kiosk-split-table th {
    height: clamp(42px, 3.1vw, 56px);
    box-sizing: border-box;
  }

  .live-kiosk-shell .kiosk-split-table th:nth-child(6),
  .live-kiosk-shell .kiosk-split-table td:nth-child(6) {
    display: none;
  }

  .live-kiosk-shell .kiosk-split-table-wrap.has-empty-right-half .kiosk-split-table:last-child thead {
    visibility: hidden;
  }

  .live-kiosk-shell .kiosk-split-table-wrap.is-measuring {
    position: absolute;
    inset: auto auto auto 0;
    width: 50%;
    height: auto;
    visibility: hidden;
    pointer-events: none;
  }

  .live-kiosk-shell .kiosk-split-table-wrap.is-measuring .kiosk-split-table,
  .live-kiosk-shell .kiosk-split-table-wrap.is-measuring .kiosk-split-table tbody {
    height: auto;
  }
}

.kiosk-mobile-qr {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  align-items: center;
  justify-items: center;
  align-self: stretch;
  justify-self: end;
  margin: 10px 0 10px 20px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.96);
  color: #0d3b4f;
  text-decoration: none;
  box-shadow: 0 16px 38px rgba(3, 10, 22, 0.22), inset 0 0 0 1px rgba(15, 118, 110, 0.08);
}

.kiosk-mobile-qr[hidden] {
  display: none;
}

.kiosk-mobile-qr-code,
.kiosk-mobile-qr-code svg {
  display: block;
  width: clamp(92px, 6.8vw, 128px);
  height: clamp(92px, 6.8vw, 128px);
}

.kiosk-mobile-qr-label {
  width: 100%;
  max-width: 128px;
  margin: 2px 0 3px;
  text-align: center;
  font-size: clamp(0.62rem, 0.72vw, 0.78rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.025em;
}

.live-kiosk-body .app-footer-live {
  display: none;
}

.kiosk-fullscreen-wall {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 18%, rgba(45, 212, 191, 0.26), transparent 34%),
    radial-gradient(circle at 86% 78%, rgba(20, 184, 166, 0.24), transparent 36%),
    linear-gradient(135deg, #061722 0%, #083336 48%, #0f766e 100%);
  color: #f4fffb;
}

.mobile-token-wall {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 14%, rgba(52, 211, 153, 0.24), transparent 34%),
    radial-gradient(circle at 82% 82%, rgba(56, 189, 248, 0.2), transparent 36%),
    linear-gradient(145deg, #061722 0%, #092f35 48%, #0f766e 100%);
  color: #f4fffb;
}

.mobile-token-wall[hidden] {
  display: none;
}

.mobile-token-card {
  position: relative;
  width: min(420px, 100%);
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: clamp(24px, 7vw, 38px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.08));
  box-shadow: 0 28px 76px rgba(3, 10, 22, 0.42);
  text-align: center;
  backdrop-filter: blur(18px);
}

.mobile-token-card h2 {
  margin: 0;
  font-size: clamp(2rem, 10vw, 3.4rem);
  line-height: 0.94;
  letter-spacing: -0.07em;
}

.mobile-token-card p:not(.eyebrow) {
  margin: 0;
  color: rgba(234, 255, 250, 0.78);
  font-size: clamp(1rem, 4vw, 1.16rem);
  line-height: 1.42;
}

.mobile-token-card .mobile-wall-time {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #f4fffb;
  font-weight: 700;
}

.mobile-qr-scanner-video {
  width: min(100%, 320px);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 18px 44px rgba(3, 10, 22, 0.28);
}

.kiosk-fullscreen-wall[hidden] {
  display: none;
}

.kiosk-wall-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(2px);
  opacity: 0.7;
  pointer-events: none;
}

.kiosk-wall-orb-a {
  width: 340px;
  height: 340px;
  left: -90px;
  top: -80px;
  background: rgba(167, 243, 208, 0.18);
}

.kiosk-wall-orb-b {
  width: 420px;
  height: 420px;
  right: -120px;
  bottom: -150px;
  background: rgba(125, 211, 252, 0.16);
}

.kiosk-wall-card {
  position: relative;
  width: min(620px, 100%);
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: clamp(28px, 5vw, 52px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 34px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.08));
  box-shadow: 0 34px 90px rgba(3, 10, 22, 0.42);
  text-align: center;
  backdrop-filter: blur(18px);
}

.kiosk-wall-icon {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  box-shadow: 0 18px 44px rgba(3, 10, 22, 0.28);
}

.kiosk-wall-card .eyebrow {
  margin: 0;
  color: rgba(224, 255, 247, 0.78);
}

.kiosk-wall-card h2 {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(2.35rem, 6vw, 4.8rem);
  line-height: 0.92;
  letter-spacing: -0.07em;
}

.kiosk-wall-card p:not(.eyebrow) {
  max-width: 42ch;
  margin: 0;
  color: rgba(234, 255, 250, 0.78);
  font-size: clamp(1rem, 1.7vw, 1.22rem);
  line-height: 1.45;
}

.kiosk-fullscreen-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
  padding: 0 22px;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #d1fae5, #67e8f9);
  color: #073b3a;
  font-weight: 850;
  box-shadow: 0 18px 34px rgba(3, 10, 22, 0.24);
}

.kiosk-fullscreen-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.live-mobile-shell .live-header {
  grid-template-columns: 1fr;
  padding: clamp(8px, 2.7vw, 12px) clamp(9px, 3.2vw, 14px) clamp(6px, 1.8vw, 9px);
}

.live-mobile-shell .live-display-banner-aside {
  display: none;
}

.live-mobile-shell .stats-grid {
  display: none;
}

.live-mobile-body {
  padding-bottom: 0;
}

.mobile-pwa-viewport-forced,
.mobile-pwa-viewport-forced body {
  overflow-x: hidden;
}

body.live-mobile-body.mobile-pwa-viewport-forced {
  width: 100%;
  min-width: 0;
}

body.live-mobile-body.mobile-pwa-desktop-viewport-fallback {
  width: calc(100% / var(--mobile-pwa-desktop-zoom, 1));
  min-height: calc(100dvh / var(--mobile-pwa-desktop-zoom, 1));
  zoom: var(--mobile-pwa-desktop-zoom, 1);
}

.mobile-pwa-viewport-forced .live-mobile-shell {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin-inline: 0;
}

.live-mobile-shell {
  height: calc(100vh - var(--kiosk-banner-height, 86px));
  height: calc(100dvh - var(--kiosk-banner-height, 86px));
  min-height: 0;
  grid-template-rows: minmax(0, 1fr);
}

.live-mobile-shell.has-daily-notice {
  grid-template-rows: auto minmax(0, 1fr);
}

.live-mobile-shell .live-header > div:first-child {
  padding: 2px 0;
}

.live-mobile-shell .live-header h1 {
  font-size: clamp(1.45rem, 8.2vw, 2.35rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.live-mobile-shell .eyebrow {
  margin-bottom: clamp(8px, 2.6vw, 12px);
  font-size: clamp(0.78rem, 3.65vw, 0.92rem);
}

.live-mobile-shell .hero-copy {
  margin: clamp(1px, 0.35vw, 3px) 0 0;
  font-size: clamp(0.94rem, 4.25vw, 1.12rem);
}

.mobile-daily-notice-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(8px, 2.6vw, 12px);
  align-items: start;
  margin: 0;
  padding: clamp(9px, 2.7vw, 12px) clamp(11px, 3.5vw, 15px);
  background:
    linear-gradient(135deg, rgba(236, 253, 245, 0.98), rgba(219, 234, 254, 0.94));
  border-bottom: 1px solid rgba(15, 118, 110, 0.18);
  color: #0f2f2b;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.mobile-daily-notice-banner[hidden] {
  display: none;
}

.mobile-daily-notice-icon,
.mobile-daily-notice-icon svg {
  width: clamp(20px, 5.8vw, 25px);
  height: clamp(20px, 5.8vw, 25px);
}

.mobile-daily-notice-icon {
  display: inline-grid;
  place-items: center;
  color: hsl(var(--p));
  margin-top: 1px;
}

.mobile-daily-notice-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-daily-notice-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
  font-size: clamp(0.95rem, 4.05vw, 1.12rem);
  line-height: 1.23;
}

.mobile-daily-notice-copy strong {
  font-size: clamp(0.76rem, 3.1vw, 0.88rem);
  text-transform: uppercase;
  letter-spacing: 0.075em;
  color: rgba(15, 118, 110, 0.88);
}

.mobile-push-notice-banner {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.mobile-push-enable-button {
  min-height: 32px;
  padding: 0 clamp(10px, 3vw, 14px);
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 999px;
  background: linear-gradient(135deg, #0f766e, #10b981);
  color: #fff;
  font-size: clamp(0.78rem, 3vw, 0.9rem);
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.2);
}

.mobile-push-enable-button:disabled {
  opacity: 0.68;
}

.live-mobile-shell .live-grid .card {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.live-mobile-shell .mobile-live-table-head {
  display: grid;
  grid-template-columns: 14% 16% 35% 35%;
  align-items: stretch;
  position: relative;
  z-index: 10;
  background: rgba(220, 234, 252, 0.96);
  border-bottom: 1px solid rgba(120, 139, 160, 0.22);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.live-mobile-shell .mobile-live-head-cell {
  min-width: 0;
  padding: clamp(6px, 2.1vw, 9px) clamp(3px, 1.2vw, 5px);
  color: var(--muted);
  font-weight: 600;
  text-align: left;
}

.live-mobile-shell .mobile-live-head-type,
.live-mobile-shell .mobile-live-head-notes {
  display: none;
}

.live-mobile-shell .mobile-live-head-period {
  text-align: center;
}

.live-mobile-shell .mobile-live-head-period .sort-button {
  justify-content: center;
  text-align: center;
}

.live-mobile-shell .live-grid .table-wrap {
  min-height: 0;
  height: 100%;
  max-height: none;
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
  padding-bottom: clamp(88px, 24vw, 112px);
  scroll-padding-bottom: clamp(88px, 24vw, 112px);
}

.live-mobile-shell .live-grid tbody td {
  height: auto;
  vertical-align: top;
}

.mobile-live-list-footer {
  margin: 18px 10px 0;
  padding: 14px 8px 4px;
  color: rgba(71, 85, 105, 0.72);
  font-size: clamp(0.82rem, 3.35vw, 0.96rem);
  font-weight: 650;
  line-height: 1.25;
  text-align: center;
}

.live-mobile-shell .live-grid table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: clamp(0.88rem, 3.95vw, 1.15rem);
}

.live-mobile-shell .live-grid thead {
  display: none;
}

.live-mobile-shell .live-grid th,
.live-mobile-shell .live-grid td {
  padding: clamp(6px, 2.1vw, 9px) clamp(3px, 1.2vw, 5px);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.18;
}

.live-mobile-shell .live-grid table th:nth-child(1),
.live-mobile-shell .live-grid table td:nth-child(1) {
  display: none;
}

.live-mobile-shell .live-grid table th:nth-child(2),
.live-mobile-shell .live-grid table td:nth-child(2) {
  width: 14%;
  text-align: center;
}

.live-mobile-shell .live-grid table th:nth-child(2) .sort-button {
  justify-content: center;
  text-align: center;
  width: 100%;
}

.live-mobile-shell .live-grid table th:nth-child(3),
.live-mobile-shell .live-grid table td:nth-child(3) {
  width: 16%;
}

.live-mobile-shell .live-grid table th:nth-child(4),
.live-mobile-shell .live-grid table td:nth-child(4) {
  width: 35%;
}

.live-mobile-shell .live-grid table th:nth-child(5),
.live-mobile-shell .live-grid table td:nth-child(5) {
  width: 35%;
}

.mobile-live-tabbar {
  position: fixed;
  left: clamp(7px, 3vw, 12px);
  right: clamp(7px, 3vw, 12px);
  bottom: clamp(6px, 2.5vw, 10px);
  z-index: 50;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(5px, 2vw, 8px);
  padding: clamp(5px, 1.8vw, 6px);
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: 0 20px 52px rgba(3, 10, 22, 0.3);
  backdrop-filter: blur(18px);
}

.mobile-pwa-viewport-forced .mobile-live-tabbar {
  left: clamp(7px, 3vw, 12px);
  right: clamp(7px, 3vw, 12px);
}

.mobile-live-tab {
  display: grid;
  justify-items: center;
  gap: clamp(1px, 0.8vw, 3px);
  min-height: clamp(46px, 14vw, 54px);
  height: auto;
  padding: clamp(4px, 1.6vw, 6px) clamp(5px, 2vw, 8px);
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #4c6172;
  font-size: clamp(0.78rem, 3.55vw, 0.92rem);
  font-weight: 800;
  line-height: 1.05;
}

.mobile-live-tab.is-active {
  background: #fff;
  color: hsl(var(--p));
  border-radius: 20px;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.22), inset 0 0 0 1px rgba(15, 118, 110, 0.08);
}

.mobile-live-tab-icon,
.mobile-live-tab-icon svg {
  display: block;
  width: clamp(17px, 5vw, 20px);
  height: clamp(17px, 5vw, 20px);
}

.mobile-live-tab-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 14mm 13mm 16mm;
  }

  html,
  body,
  .live-body,
  .live-shell,
  .live-grid,
  .live-grid table,
  .live-grid thead,
  .live-grid tbody,
  .live-grid tr,
  .live-grid th,
  .live-grid td {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .app-footer,
  .live-controls,
  .live-controls button,
  .live-controls a,
  .live-controls input,
  .live-controls label,
  .live-lang-switcher,
  .live-shell .stats-grid,
  .live-grid > article:last-child,
  .localized-date-proxy {
    display: none;
  }

  .date-native-input {
    position: static;
    opacity: 1;
    pointer-events: auto;
  }

  .live-body {
    background: #fff;
    color: #000;
  }

  .live-shell {
    width: 100%;
    margin: 0;
    padding: 0 1mm;
  }

  .live-header {
    padding: 0 1mm 7mm;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: #000;
    box-shadow: none;
  }

  .live-header .hero-copy,
  .live-header .eyebrow {
    color: #444;
    margin: 0;
  }

  .live-header h1 {
    font-size: 18pt;
    margin: 0 0 2.5mm;
  }

  .live-grid {
    display: block;
    margin-top: 0;
  }

  .live-grid .card {
    padding: 0 1mm;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: #000;
    box-shadow: none;
  }

  .live-grid .card-header {
    margin-bottom: 3mm;
    align-items: baseline;
    padding-bottom: 2mm;
    border-bottom: 1px solid #cfd6de;
  }

  .live-grid .card-header span {
    display: none;
  }

  .live-grid .card-header h2 {
    font-size: 12pt;
    margin: 0;
  }

  .live-grid .table-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
  }

  .live-grid table {
    font-size: 10pt;
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
  }

  .live-grid thead {
    display: table-header-group;
  }

  .live-grid th,
  .live-grid td {
    padding: 7px 8px;
    color: #000;
    border-bottom: 1px solid #cfd6de;
    font-size: 10pt;
    line-height: 1.28;
    vertical-align: top;
  }

  .live-grid th {
    background: #e8edf3;
    font-size: 9pt;
  }

  .live-grid .sort-button {
    width: auto;
    display: inline;
    padding: 0;
    margin: 0;
    min-height: 0;
    background: transparent;
    color: inherit;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    font: inherit;
    font-weight: 700;
    text-align: left;
  }

  .live-grid tbody tr:nth-child(even) td {
    background: #f4f7fa !important;
  }

  .live-grid tbody tr:nth-child(odd) td {
    background: #fff !important;
  }

  .live-grid .sort-button::after {
    display: none;
  }

  .live-grid tr,
  .live-grid td,
  .live-grid th {
    page-break-inside: avoid;
  }

  .live-grid tbody tr.is-uncovered-row:nth-child(odd) td {
    background: #fdf2f2 !important;
  }

  .live-grid tbody tr.is-uncovered-row:nth-child(even) td {
    background: #f7e9ea !important;
  }

  .live-grid tbody tr.is-uncovered-row td:first-child {
    box-shadow: inset 3px 0 0 #cc5b5b;
  }

  .app-footer-live {
    display: block;
    margin: 7mm 0 0;
    padding-top: 3mm;
    text-align: center;
    color: #555;
    font-size: 8.5pt;
    border-top: 1px solid #d8dee6;
  }

  .app-footer-live p {
    margin: 0;
  }
}

.is-hidden {
  display: none;
}

@media (max-width: 800px) {
  .hero {
    align-items: start;
    flex-direction: column;
  }

  .page-shell {
    width: min(100% - 20px, 1200px);
    margin-top: 16px;
  }

  .dashboard-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

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

  .dashboard-filters {
    width: 100%;
    min-width: 0;
  }

  .dashboard-filter-field {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .dashboard-filters label {
    text-align: left;
  }

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

  .dashboard-sidebar {
    position: static;
    padding: 14px;
  }

  .dashboard-side-nav {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    overflow-x: visible;
    padding-bottom: 0;
  }

  .dashboard-side-link {
    min-width: 0;
  }

  .operations-hero,
  .workflow-strip,
  .control-grid,
  .control-checklist,
  .publication-metrics {
    grid-template-columns: 1fr;
  }

  .live-header {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .live-controls,
  .live-grid,
  .preview-grid {
    grid-template-columns: 1fr;
  }
}

/* daisyUI integration layer */
:root,
[data-theme="sostituzioni"] {
  color-scheme: light;
  --p: 174 77% 26%;
  --pf: 174 77% 20%;
  --pc: 0 0% 100%;
  --s: 211 74% 41%;
  --sf: 211 74% 32%;
  --sc: 0 0% 100%;
  --a: 38 92% 50%;
  --af: 38 92% 40%;
  --ac: 215 28% 17%;
  --n: 215 28% 17%;
  --nf: 215 28% 12%;
  --nc: 210 40% 98%;
  --b1: 0 0% 100%;
  --b2: 210 30% 96%;
  --b3: 214 24% 90%;
  --bc: 215 28% 17%;
  --in: 198 93% 42%;
  --inc: 0 0% 100%;
  --su: 160 84% 30%;
  --suc: 0 0% 100%;
  --wa: 38 92% 50%;
  --wac: 215 28% 17%;
  --er: 4 74% 49%;
  --erc: 0 0% 100%;
  --rounded-box: 0.5rem;
  --rounded-btn: 0.45rem;
  --rounded-badge: 0.45rem;
  --animation-btn: 0.15s;
  --btn-text-case: none;
  --btn-focus-scale: 0.98;
  --border-btn: 1px;
  --tab-radius: 0.45rem;
  --bg: hsl(var(--b2));
  --surface: hsl(var(--b1));
  --surface-strong: hsl(var(--b1));
  --surface-accent: #eef7f5;
  --text: hsl(var(--bc));
  --muted: #657386;
  --accent: hsl(var(--p));
  --accent-dark: hsl(var(--pf));
  --accent-soft: #dff5f1;
  --line: rgba(120, 139, 160, 0.24);
  --shadow: 0 10px 30px rgba(35, 49, 69, 0.08);
  --radius: 8px;
}

.bg-orb {
  display: none;
}

html:has(.saas-body),
body.saas-body {
  background:
    linear-gradient(180deg, #f8fafc 0%, #eef3f7 100%);
  background-attachment: fixed;
}

body.saas-body {
  color: hsl(var(--bc));
}

.page-shell,
.page-shell-wide {
  width: min(1440px, calc(100% - 32px));
}

.hero,
.dashboard-toolbar,
.dashboard-sidebar,
.du-card,
.date-panel,
.stat-card,
.card {
  border-radius: 8px;
  background: hsl(var(--b1));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: none;
}

.hero {
  padding: 20px 22px;
  align-items: center;
}

.hero h1 {
  margin: 0;
  letter-spacing: 0;
  font-size: clamp(1.6rem, 2vw, 2.35rem);
}

.hero-copy {
  max-width: 760px;
  color: var(--muted);
}

.eyebrow,
.section-kicker,
.dashboard-filters label,
.lang-switcher label {
  letter-spacing: 0.08em;
  color: hsl(var(--p));
  font-weight: 800;
}

.top-nav {
  gap: 8px;
}

.top-nav a,
.button-link,
.du-btn,
button {
  min-height: 38px;
  border-radius: 7px;
  padding: 0 13px;
  border: 1px solid transparent;
  box-shadow: none;
  font-weight: 600;
}

button,
.button-link-accent,
.top-nav a.is-current {
  background: hsl(var(--p));
  color: hsl(var(--pc));
}

button:hover,
.button-link:hover,
.top-nav a:hover {
  transform: translateY(-1px);
  filter: none;
}

.top-nav a,
.button-link,
.button-secondary,
.du-btn-secondary {
  background: hsl(var(--b1));
  color: hsl(var(--bc));
  border-color: var(--line);
}

.page-home .marketing-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 18px;
  margin-top: 18px;
  align-items: stretch;
}

.page-home .card-feature {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 24px;
  min-height: 230px;
}

.page-home .card-feature h2 {
  margin: 0;
  max-width: 18ch;
  font-size: clamp(1.55rem, 2.2vw, 2.1rem);
  line-height: 1.05;
}

.page-home .card-feature p {
  margin: 0;
  max-width: 66ch;
  color: var(--muted);
  line-height: 1.55;
}

.page-home .card-feature .button-link {
  margin-top: 4px;
  width: fit-content;
}

.button-link-accent,
.button-link-accent:hover,
.button-link-accent:focus-visible {
  background: linear-gradient(135deg, hsl(var(--p)), hsl(var(--s)));
  color: hsl(var(--pc));
  border-color: transparent;
}

.button-danger,
.table-action-button.is-danger,
.du-btn-danger {
  background: hsl(var(--er));
  color: hsl(var(--erc));
  border-color: transparent;
}

.table-action-button {
  min-height: 32px;
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 0.84rem;
}

input,
select,
textarea,
.du-input,
.du-select,
.du-file-input {
  min-height: 40px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: hsl(var(--b1));
  color: hsl(var(--bc));
  box-shadow: none;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(15, 118, 110, 0.18);
  border-color: rgba(15, 118, 110, 0.55);
}

.du-checkbox,
input[type="checkbox"] {
  accent-color: hsl(var(--p));
}

.lang-switcher,
.dashboard-filter-field,
.settings-panel,
.danger-panel,
.preview-banner,
.attention-panel,
.teacher-check-item,
.legend-card,
.publication-metric,
.workflow-step,
.login-highlight,
.subscription-card {
  border-radius: 8px;
  background: hsl(var(--b1));
  border: 1px solid var(--line);
  box-shadow: none;
}

.card,
.stat-card {
  padding: 16px;
}

.card-header {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(120, 139, 160, 0.18);
  margin-bottom: 12px;
}

.card-header h2,
.card-header h3,
.dashboard-group-heading h2,
.toolbar-copy h2 {
  line-height: 1.18;
  letter-spacing: 0;
}

.card-header h2,
.card-header h3 {
  color: hsl(var(--bc));
  font-size: 1.22rem;
  font-weight: 850;
  letter-spacing: -0.015em;
}

.content-grid,
#resourcesSection .content-grid,
#dailySection .content-grid,
#timetableSection .content-grid {
  gap: 16px;
  grid-template-columns: 1fr;
  align-items: start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.dashboard-layout,
.dashboard-main,
.dashboard-group,
.content-grid > *,
.dashboard-toolbar,
.dashboard-sidebar,
.card,
.stat-card,
.table-wrap,
.form-grid {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
}

#schoolSettingsCard,
#substitutionsCard,
#timetableUploadCard {
  grid-column: 1 / -1;
}

#substitutionsCard > .card-header,
#substitutionsCard .manual-availability-panel .compact-card-header {
  border-bottom: 0;
  padding-bottom: 0;
}

#absencesCard,
#outdoorActivitiesCard,
#classTimeChangesCard,
#teacherTimeAdjustmentsCard,
#substitutionsCard {
  position: relative;
  display: grid;
  gap: 14px;
}

#absencesCard.has-dropdown-drawer::before,
#outdoorActivitiesCard.has-dropdown-drawer::before,
#classTimeChangesCard.has-dropdown-drawer::before,
#teacherTimeAdjustmentsCard.has-dropdown-drawer::before,
#substitutionsCard.has-dropdown-drawer::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(7px);
  animation: classVariationBackdropIn 0.18s ease-out both;
}

.absence-action-row,
.outdoor-action-row,
.class-variation-action-row,
.teacher-shift-action-row {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  position: relative;
  z-index: 1;
}

.substitution-top-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
  position: relative;
  z-index: 1;
}

.teacher-shift-top-actions {
  display: flex;
  align-items: stretch;
  gap: 14px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

#absencesCard.has-dropdown-drawer .absence-action-row,
#outdoorActivitiesCard.has-dropdown-drawer .outdoor-action-row,
#classTimeChangesCard.has-dropdown-drawer .class-variation-action-row,
#teacherTimeAdjustmentsCard.has-dropdown-drawer .teacher-shift-top-actions,
#substitutionsCard.has-dropdown-drawer .substitution-top-actions,
#substitutionsCard.has-popup-drawer .substitution-top-actions {
  z-index: 36;
}

.teacher-shift-bulk-actions {
  display: flex;
  align-items: stretch;
  gap: 14px;
  flex: 1 1 560px;
  flex-wrap: wrap;
}

#absencesCard .absence-add-action,
#outdoorActivitiesCard .outdoor-add-action,
#classTimeChangesCard .class-variation-add-action,
#teacherTimeAdjustmentsCard .teacher-shift-add-action {
  grid-template-columns: 46px minmax(0, 1fr);
  width: min(100%, 224px) !important;
  min-height: 96px !important;
  height: 100% !important;
  justify-items: start;
  border-color: rgba(20, 184, 166, 0.2);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.28), transparent 36%),
    linear-gradient(135deg, #0f766e, #0f3f46 58%, #1d4ed8);
  box-shadow: 0 18px 38px rgba(15, 118, 110, 0.2);
}

#substitutionsCard .substitution-add-action,
#substitutionsCard .substitution-ai-action,
#substitutionsCard .substitution-light-action,
#substitutionsCard .substitution-live-action {
  grid-template-columns: 42px minmax(0, 1fr);
  min-height: 96px !important;
  height: auto !important;
  justify-items: start;
}

#substitutionsCard .substitution-add-action,
#substitutionsCard .substitution-live-action {
  border-color: rgba(20, 184, 166, 0.2);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.28), transparent 36%),
    linear-gradient(135deg, #0f766e, #0f3f46 58%, #1d4ed8);
  box-shadow: 0 18px 38px rgba(15, 118, 110, 0.2);
}

#substitutionsCard .substitution-ai-action {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(45, 212, 191, 0.36) !important;
  background:
    radial-gradient(circle at 14% 18%, rgba(45, 212, 191, 0.34), transparent 28%),
    radial-gradient(circle at 84% 22%, rgba(56, 189, 248, 0.18), transparent 30%),
    radial-gradient(circle at 72% 88%, rgba(99, 102, 241, 0.28), transparent 34%),
    linear-gradient(135deg, #031b2d 0%, #07363a 36%, #172554 74%, #1e1b4b 100%) !important;
  box-shadow:
    0 24px 52px rgba(15, 23, 42, 0.22),
    0 18px 42px rgba(14, 165, 233, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.18) inset;
}

#substitutionsCard .substitution-ai-action::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, #22d3ee, #14b8a6, #38bdf8, #6366f1, #a855f7, #ec4899);
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  pointer-events: none;
}

#substitutionsCard .substitution-ai-action::after {
  content: "";
  position: absolute;
  inset: -45% auto auto -20%;
  width: 70%;
  height: 220%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.26), transparent);
  transform: rotate(18deg);
  animation: substitutionAiSweep 4.2s ease-in-out infinite;
  pointer-events: none;
}

#substitutionsCard .substitution-light-action {
  color: #0f172a !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  background:
    radial-gradient(circle at top right, rgba(20, 184, 166, 0.12), transparent 42%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94)) !important;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08) !important;
}

#substitutionsCard .substitution-light-action span:last-child {
  color: #0f172a !important;
}

#substitutionsCard .substitution-light-action .nav-icon {
  color: #0f766e;
  background: rgba(15, 118, 110, 0.1);
}

#substitutionsCard .substitution-danger-action {
  border-color: rgba(244, 63, 94, 0.24) !important;
  background:
    radial-gradient(circle at top right, rgba(244, 63, 94, 0.14), transparent 42%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 241, 242, 0.95)) !important;
  box-shadow: 0 16px 34px rgba(190, 18, 60, 0.1) !important;
}

#substitutionsCard .substitution-danger-action span:last-child {
  color: #9f1239 !important;
}

#substitutionsCard .substitution-danger-action .nav-icon {
  color: #be123c;
  background: rgba(244, 63, 94, 0.12);
}

#substitutionsCard .substitution-add-action .nav-icon,
#substitutionsCard .substitution-ai-action .nav-icon,
#substitutionsCard .substitution-live-action .nav-icon {
  color: #ecfeff;
  background: rgba(255, 255, 255, 0.14);
}

#substitutionsCard .substitution-ai-action .nav-icon {
  background: rgba(255, 255, 255, 0.13);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18) inset,
    0 0 28px rgba(45, 212, 191, 0.26);
}

#substitutionsCard .substitution-add-action.is-open .nav-icon svg {
  transform: rotate(45deg);
}

#substitutionsCard.has-dropdown-drawer .substitution-top-actions > :not(#substitutionDrawerToggle) {
  opacity: 0.42;
  filter: blur(3px) saturate(0.72);
  transform: scale(0.985);
  pointer-events: none;
  user-select: none;
}

#substitutionsCard.has-popup-drawer .substitution-top-actions > * {
  opacity: 0.42;
  filter: blur(3px) saturate(0.72);
  transform: scale(0.985);
  pointer-events: none;
  user-select: none;
}

#substitutionsCard.has-dropdown-drawer .substitution-top-actions > #substitutionDrawerToggle {
  filter: none;
  opacity: 1;
}

#substitutionsCard .is-action-disabled-by-drawer {
  cursor: default !important;
}

@keyframes substitutionAiSweep {
  0%, 55% {
    transform: translateX(-80%) rotate(18deg);
    opacity: 0;
  }
  70% {
    opacity: 0.9;
  }
  100% {
    transform: translateX(230%) rotate(18deg);
    opacity: 0;
  }
}

#absencesCard .absence-add-action .nav-icon,
#outdoorActivitiesCard .outdoor-add-action .nav-icon,
#classTimeChangesCard .class-variation-add-action .nav-icon,
#teacherTimeAdjustmentsCard .teacher-shift-add-action .nav-icon,
#substitutionsCard .substitution-add-action .nav-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #ecfeff;
  background: rgba(255, 255, 255, 0.14);
}

#absencesCard .absence-add-action .nav-icon svg,
#outdoorActivitiesCard .outdoor-add-action .nav-icon svg,
#classTimeChangesCard .class-variation-add-action .nav-icon svg,
#teacherTimeAdjustmentsCard .teacher-shift-add-action .nav-icon svg,
#substitutionsCard .substitution-add-action .nav-icon svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.8;
  transition: transform 0.22s ease;
}

#absencesCard .absence-add-action.is-open,
#outdoorActivitiesCard .outdoor-add-action.is-open,
#classTimeChangesCard .class-variation-add-action.is-open,
#teacherTimeAdjustmentsCard .teacher-shift-add-action.is-open,
#substitutionsCard .substitution-add-action.is-open {
  box-shadow: 0 22px 44px rgba(15, 118, 110, 0.26);
}

#absencesCard .absence-add-action.is-open .nav-icon svg,
#outdoorActivitiesCard .outdoor-add-action.is-open .nav-icon svg,
#classTimeChangesCard .class-variation-add-action.is-open .nav-icon svg,
#teacherTimeAdjustmentsCard .teacher-shift-add-action.is-open .nav-icon svg,
#substitutionsCard .substitution-add-action.is-open .nav-icon svg {
  transform: rotate(45deg);
}

#teacherTimeAdjustmentsCard .teacher-shift-bulk-action {
  grid-template-columns: 42px minmax(0, 1fr);
  width: min(100%, 224px) !important;
  min-height: 96px !important;
  height: auto !important;
  justify-items: start;
  color: #0f172a !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  background:
    radial-gradient(circle at top right, rgba(20, 184, 166, 0.12), transparent 42%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94)) !important;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08) !important;
}

#teacherTimeAdjustmentsCard .teacher-shift-bulk-action:hover {
  color: #0f172a !important;
  border-color: rgba(20, 184, 166, 0.3) !important;
  background:
    radial-gradient(circle at top right, rgba(20, 184, 166, 0.16), transparent 42%),
    linear-gradient(135deg, #ffffff, #f8fafc) !important;
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.12) !important;
  transform: translateY(-1px);
}

#teacherTimeAdjustmentsCard .teacher-shift-bulk-action .nav-icon {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  color: #0f766e;
  background: rgba(15, 118, 110, 0.1);
}

#teacherTimeAdjustmentsCard .teacher-shift-bulk-action .nav-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.6;
}

#teacherTimeAdjustmentsCard .teacher-shift-bulk-action span:last-child {
  color: #0f172a !important;
  font-weight: 760;
}

#teacherTimeAdjustmentsCard.has-dropdown-drawer .teacher-shift-bulk-actions > *,
#teacherTimeAdjustmentsCard.has-popup-drawer .teacher-shift-bulk-actions > * {
  opacity: 0.42;
  filter: blur(3px) saturate(0.72);
  transform: scale(0.985);
  pointer-events: none;
  user-select: none;
}

#teacherTimeAdjustmentsCard .is-action-disabled-by-drawer {
  cursor: default !important;
}

#absencesCard .absences-list-card > .card-header:first-child,
#outdoorActivitiesCard .outdoor-list-card > .card-header:first-child,
#classTimeChangesCard .class-variations-list-card > .card-header:first-child,
#teacherTimeAdjustmentsCard .teacher-shifts-list-card > .card-header:first-child,
#substitutionsCard > .card-header {
  display: none;
}

#absencesCard .absences-list-card,
#outdoorActivitiesCard .outdoor-list-card,
#classTimeChangesCard .class-variations-list-card,
#teacherTimeAdjustmentsCard .teacher-shifts-list-card {
  position: relative;
  z-index: 2;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

#absencesCard .absences-list-card .table-wrap,
#outdoorActivitiesCard .outdoor-list-card .table-wrap,
#classTimeChangesCard .class-variations-list-card .table-wrap,
#teacherTimeAdjustmentsCard .teacher-shifts-list-card .table-wrap,
#substitutionsCard > .table-wrap {
  min-height: clamp(320px, calc(100dvh - 360px), 760px);
  max-height: calc(100dvh - 300px);
  overflow: auto;
}

#absencesCard .absences-list-card table,
#outdoorActivitiesCard .outdoor-list-card table,
#classTimeChangesCard .class-variations-list-card table,
#teacherTimeAdjustmentsCard .teacher-shifts-list-card table,
#substitutionsCard > .table-wrap table {
  min-height: 100%;
}

#absencesTable .table-placeholder-row td,
#outdoorActivitiesTable .table-placeholder-row td,
#classTimeAdjustmentsTable .table-placeholder-row td,
#teacherTimeAdjustmentsTable .table-placeholder-row td,
#substitutionsTable .table-placeholder-row td {
  height: clamp(240px, calc(100dvh - 470px), 620px);
  border-bottom: 0;
  vertical-align: middle;
}

.table-empty-placeholder {
  display: grid;
  place-items: center;
  min-height: 100%;
  padding: 36px 18px;
  border-radius: 18px;
  color: #64748b;
  font-size: 0.96rem;
  font-weight: 750;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(241, 245, 249, 0.78), rgba(255, 255, 255, 0.62));
}

#absencesTable.is-loading td,
#outdoorActivitiesTable.is-loading td,
#classTimeAdjustmentsTable.is-loading td,
#teacherTimeAdjustmentsTable.is-loading td,
#substitutionsTable.is-loading td {
  height: 54px;
}

.table-skeleton-line,
.table-skeleton-button {
  display: block;
  height: 13px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(226, 232, 240, 0.72), rgba(248, 250, 252, 0.94), rgba(226, 232, 240, 0.72));
  background-size: 220% 100%;
  animation: tableSkeletonShimmer 1.18s ease-in-out infinite;
}

.table-skeleton-line {
  width: min(100%, 170px);
}

.table-skeleton-line.short {
  width: 58px;
}

.table-skeleton-line.medium {
  width: min(100%, 120px);
}

.table-skeleton-button {
  width: 92px;
  height: 28px;
}

@keyframes tableSkeletonShimmer {
  from {
    background-position: 100% 50%;
  }
  to {
    background-position: -100% 50%;
  }
}

.absence-form-drawer,
.outdoor-form-drawer,
.class-variation-form-drawer,
.teacher-shift-form-drawer {
  position: absolute;
  top: 112px;
  left: 0;
  right: 0;
  z-index: 40;
  width: 100%;
  padding: 16px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(240, 253, 250, 0.94), rgba(255, 255, 255, 0.98));
  box-shadow: 0 26px 64px rgba(15, 23, 42, 0.18);
  transform-origin: 28px top;
}

.absence-form-drawer::before,
.outdoor-form-drawer::before,
.class-variation-form-drawer::before,
.teacher-shift-form-drawer::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 30px;
  width: 16px;
  height: 16px;
  border-top: 1px solid rgba(15, 118, 110, 0.14);
  border-left: 1px solid rgba(15, 118, 110, 0.14);
  background: rgba(240, 253, 250, 0.98);
  transform: rotate(45deg);
}

#substitutionsCard.has-popup-drawer::before,
#classTimeChangesCard.has-popup-drawer::before,
#teacherTimeAdjustmentsCard.has-popup-drawer::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 48;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(8px);
  animation: classVariationBackdropIn 0.18s ease-out both;
}

.substitution-manual-drawer {
  position: absolute;
  top: 112px;
  left: 0;
  right: 0;
  z-index: 40;
  width: 100%;
  padding: 16px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 22px;
  background: rgba(240, 253, 250, 0.98);
  box-shadow: 0 24px 52px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(18px);
  animation: absenceDrawerIn 0.2s ease-out both;
}

.substitution-manual-drawer::before {
  content: "";
  position: absolute;
  top: -8px;
  left: var(--drawer-arrow-left, 30px);
  width: 16px;
  height: 16px;
  border-top: 1px solid rgba(15, 118, 110, 0.14);
  border-left: 1px solid rgba(15, 118, 110, 0.14);
  background: rgba(240, 253, 250, 0.98);
  transform: rotate(45deg);
}

.substitution-manual-drawer.is-closing {
  animation: absenceDrawerOut 0.18s ease-in both;
}

#substitutionsCard .manual-availability-panel {
  margin-top: 14px;
  padding-top: 14px;
}

#substitutionsCard .manual-availability-panel .compact-card-header {
  margin-bottom: 10px;
}

#substitutionsCard.substitutions-workspace {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#substitutionsCard.substitutions-workspace > .table-wrap {
  position: relative;
  z-index: 2;
  border-radius: 18px;
}

#substitutionsCard .manual-availability-panel {
  position: relative;
  z-index: 2;
}

.substitution-manual-drawer.is-popup,
.class-variation-form-drawer.is-popup,
.teacher-shift-form-drawer.is-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  right: auto;
  width: min(920px, calc(100vw - 40px));
  max-height: min(760px, calc(100dvh - 48px));
  overflow: auto;
  z-index: 52;
  padding: 22px;
  border-color: rgba(255, 255, 255, 0.34);
  background:
    linear-gradient(135deg, rgba(248, 250, 252, 0.97), rgba(240, 253, 250, 0.98));
  box-shadow: 0 34px 90px rgba(2, 6, 23, 0.38);
  transform-origin: center;
}

.substitution-manual-drawer.is-popup::before,
.class-variation-form-drawer.is-popup::before,
.teacher-shift-form-drawer.is-popup::before {
  display: none;
}

.substitution-manual-drawer.is-popup.is-open,
.class-variation-form-drawer.is-popup.is-open,
.teacher-shift-form-drawer.is-popup.is-open {
  animation: classVariationPopupIn 0.2s ease-out both;
}

.substitution-manual-drawer.is-popup.is-closing,
.class-variation-form-drawer.is-popup.is-closing,
.teacher-shift-form-drawer.is-popup.is-closing {
  animation: classVariationPopupOut 0.18s ease-in both;
}

.absence-form-drawer.is-open,
.outdoor-form-drawer.is-open,
.class-variation-form-drawer.is-open,
.teacher-shift-form-drawer.is-open {
  animation: absenceDrawerIn 0.2s ease-out both;
}

.absence-form-drawer.is-closing,
.outdoor-form-drawer.is-closing,
.class-variation-form-drawer.is-closing,
.teacher-shift-form-drawer.is-closing {
  animation: absenceDrawerOut 0.18s ease-in both;
  pointer-events: none;
}

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

@keyframes classVariationPopupIn {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 12px)) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes classVariationPopupOut {
  from {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  to {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 12px)) scale(0.97);
  }
}

@keyframes absenceDrawerIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes absenceDrawerOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-8px) scale(0.985);
  }
}

#absenceForm,
#outdoorActivityForm,
#classTimeAdjustmentForm,
#teacherTimeAdjustmentForm {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

#absenceForm .field-stack:has(#absenceDateInput),
#absenceForm .field-stack:has(#absenceUntilDateInput),
#outdoorActivityForm .field-stack:has(#outdoorActivityDateInput),
#outdoorActivityForm .field-stack:has(#outdoorActivityUntilDateInput),
#classTimeAdjustmentForm > input[name="adjustment_date"],
#classTimeAdjustmentForm > select {
  order: 1;
}

#absenceForm .form-stack:has(#absenceTeacherSearch) {
  grid-column: 1 / -1;
  order: 2;
}

#outdoorActivityForm .form-stack:has(#outdoorClassSearch),
#outdoorActivityForm .form-stack:has(#outdoorTeacherSearch) {
  grid-column: 1 / -1;
  order: 2;
}

#absenceForm > :not(.field-stack):not(.form-stack:has(#absenceTeacherSearch)) {
  order: 3;
}

#outdoorActivityForm > :not(.field-stack):not(.form-stack:has(#outdoorClassSearch)):not(.form-stack:has(#outdoorTeacherSearch)) {
  order: 3;
}

#classTimeAdjustmentForm > input[name="notes"],
#classTimeAdjustmentForm .checkbox-field,
#classTimeAdjustmentForm .form-actions-inline {
  order: 3;
}

#teacherTimeAdjustmentForm > input[name="adjustment_date"],
#teacherTimeAdjustmentForm > select {
  order: 1;
}

#teacherTimeAdjustmentForm > input[name="notes"],
#teacherTimeAdjustmentForm .form-actions-inline {
  order: 3;
}

#absenceForm button[type="submit"],
#outdoorActivityForm button[type="submit"],
#classTimeAdjustmentForm button[type="submit"],
#teacherTimeAdjustmentForm button[type="submit"] {
  min-height: 42px;
}

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

#substitutionForm {
  display: grid;
  grid-template-columns: minmax(0, 0.55fr) minmax(0, 0.65fr) repeat(2, minmax(0, 1fr)) minmax(150px, 0.6fr);
  gap: 8px;
  align-items: center;
  padding: 10px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: hsl(var(--b2));
}

#substitutionForm > input[type="hidden"] {
  display: none;
}

#substitutionForm .search-field {
  min-width: 0;
}

#substitutionForm #substitutionAbsentTeacherSearch,
#substitutionForm #substitutionReplacementTeacherSearch,
#substitutionForm #substitutionNotesInput {
  width: 100%;
}

#substitutionForm #substitutionNotesInput {
  grid-column: span 2;
}

#substitutionForm .checkbox-field,
#classTimeAdjustmentForm .checkbox-field {
  grid-column: span 2;
  align-items: center;
  min-height: 32px;
  justify-content: flex-start;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: hsl(var(--b1));
  gap: 12px;
  cursor: pointer;
  min-width: 0;
}

#substitutionForm .checkbox-field input[type="checkbox"],
#classTimeAdjustmentForm .checkbox-field input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  order: 1;
  display: inline-block;
  flex: 0 0 36px;
  width: 36px !important;
  height: 18px !important;
  min-height: 18px !important;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px !important;
  background: #d9e2ea;
  position: relative;
  transition: background 0.16s ease, border-color 0.16s ease;
  color: transparent;
  font-size: 0;
  line-height: 0;
}

#substitutionForm .checkbox-field input[type="checkbox"]::after,
#classTimeAdjustmentForm .checkbox-field input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.22);
  transform: translateX(0);
  transition: transform 0.16s ease;
}

#substitutionForm .checkbox-field input[type="checkbox"]:checked,
#classTimeAdjustmentForm .checkbox-field input[type="checkbox"]:checked {
  border-color: hsl(var(--p));
  background: linear-gradient(135deg, hsl(var(--p)), hsl(var(--s)));
}

#substitutionForm .checkbox-field input[type="checkbox"]:checked::after,
#classTimeAdjustmentForm .checkbox-field input[type="checkbox"]:checked::after {
  transform: translateX(18px);
}

#substitutionForm .checkbox-field input[type="checkbox"]:focus-visible,
#classTimeAdjustmentForm .checkbox-field input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(15, 118, 110, 0.22);
  outline-offset: 2px;
}

#substitutionForm .checkbox-field span,
#classTimeAdjustmentForm .checkbox-field span {
  display: grid;
  gap: 1px;
  min-width: 0;
  order: 2;
}

#substitutionForm .checkbox-field strong,
#classTimeAdjustmentForm .checkbox-field strong {
  color: hsl(var(--bc));
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.15;
}

#substitutionForm .checkbox-field small,
#classTimeAdjustmentForm .checkbox-field small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.25;
  font-size: 0.76rem;
}

#schoolSettingsForm .checkbox-field {
  align-items: center;
  min-height: 32px;
  justify-content: flex-start;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: hsl(var(--b1));
  gap: 12px;
  cursor: pointer;
  min-width: 0;
}

#schoolSettingsForm .checkbox-field input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  order: 1;
  display: inline-block;
  flex: 0 0 36px;
  width: 36px !important;
  height: 18px !important;
  min-height: 18px !important;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px !important;
  background: #d9e2ea;
  position: relative;
  transition: background 0.16s ease, border-color 0.16s ease;
  color: transparent;
  font-size: 0;
  line-height: 0;
}

#schoolSettingsForm .checkbox-field input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.22);
  transform: translateX(0);
  transition: transform 0.16s ease;
}

#schoolSettingsForm .checkbox-field input[type="checkbox"]:checked {
  border-color: hsl(var(--p));
  background: linear-gradient(135deg, hsl(var(--p)), hsl(var(--s)));
}

#schoolSettingsForm .checkbox-field input[name="clear_live_board_password"]:checked {
  border-color: hsl(var(--er));
  background: linear-gradient(135deg, hsl(var(--er)), #f97316);
}

#schoolSettingsForm .checkbox-field input[type="checkbox"]:checked::after {
  transform: translateX(18px);
}

#schoolSettingsForm .checkbox-field input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(15, 118, 110, 0.22);
  outline-offset: 2px;
}

#schoolSettingsForm .checkbox-field span {
  display: block;
  min-width: 0;
  order: 2;
  color: hsl(var(--bc));
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.15;
}

#substitutionForm .form-actions-inline {
  grid-column: span 1;
  justify-content: flex-end;
  padding-top: 0;
  min-width: 0;
  justify-self: end;
  width: min(100%, 180px);
}

#substitutionForm .form-actions-inline button {
  display: block;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  padding-inline: 18px;
  line-height: var(--control-height);
  text-align: center;
}

#substitutionsCard .auto-substitution-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  align-items: center;
  padding: 12px;
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: hsl(var(--b1));
}

#substitutionsCard .auto-substitution-bar label {
  margin: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: hsl(var(--p));
}

#substitutionsCard .auto-substitution-bar select {
  min-width: 0;
}

#substitutionsCard .auto-substitution-bar button,
#substitutionsCard .auto-substitution-bar a {
  display: block;
  white-space: nowrap;
  min-height: var(--control-height);
  min-width: 0;
  width: 100%;
  max-width: 100%;
  line-height: var(--control-height);
  text-align: center;
}

button,
.du-btn,
.btn,
.button-link,
.table-action-button {
  min-width: 0;
  flex-shrink: 1;
  max-width: 100%;
}

button,
.du-btn,
.btn,
.button-link,
.table-action-button,
.sort-button {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .substitution-top-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #substitutionForm,
  #substitutionsCard .auto-substitution-bar {
    grid-template-columns: 1fr;
  }

  #substitutionForm .search-field,
  #substitutionForm #substitutionNotesInput,
  #substitutionForm .checkbox-field,
  #substitutionForm .form-actions-inline {
    grid-column: 1;
  }

  #substitutionForm .form-actions-inline {
    justify-content: stretch;
  }

  #substitutionForm .form-actions-inline button,
  #substitutionsCard .auto-substitution-bar button,
  #substitutionsCard .auto-substitution-bar a,
  #substitutionsCard .auto-substitution-bar select {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .substitution-top-actions {
    grid-template-columns: 1fr;
  }
}

.login-layout {
  gap: 16px;
  margin-top: 16px;
}

.login-showcase,
.login-card {
  border-radius: 8px;
}

.dashboard-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  margin-top: 16px;
}

.dashboard-toolbar::after {
  display: none;
}

.dashboard-toolbar .toolbar-copy {
  min-width: 0;
}

.dashboard-toolbar .section-kicker {
  margin-bottom: 4px;
  font-size: 0.72rem;
}

.dashboard-toolbar .toolbar-copy h2 {
  margin: 0;
  font-size: 1.12rem;
}

.dashboard-toolbar .toolbar-copy p {
  margin: 4px 0 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-toolbar .dashboard-filters {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(170px, 210px);
  gap: 10px;
  min-width: 0;
  align-items: center;
}

.dashboard-toolbar .dashboard-filter-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  justify-content: stretch;
  padding: 8px 10px;
}

.dashboard-toolbar .dashboard-filters label {
  font-size: 0.72rem;
  text-align: left;
}

.dashboard-toolbar .dashboard-filter-field select,
.dashboard-toolbar .dashboard-filter-field input {
  min-height: var(--control-height);
  height: var(--control-height);
}

@media (max-width: 980px) {
  .dashboard-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .dashboard-toolbar .toolbar-copy p {
    white-space: normal;
  }

  .dashboard-toolbar .dashboard-filters {
    grid-template-columns: 1fr;
  }
}

.dashboard-layout {
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.dashboard-sidebar {
  position: sticky;
  top: 16px;
  align-self: start;
  padding: 12px;
}

.dashboard-group .card {
  scroll-margin-top: 16px;
}

.dashboard-side-link,
.dashboard-sub-link {
  border-radius: 10px;
}

.dashboard-side-link {
  grid-template-columns: 38px minmax(0, 1fr);
  min-height: 46px;
  padding: 8px 11px 8px 16px;
}

.nav-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

.nav-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-subnav {
  margin-left: 16px;
  padding-left: 14px;
  border-left: 1px solid rgba(15, 118, 110, 0.14);
}

.dashboard-sub-link {
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 9px;
  color: var(--muted);
  justify-content: flex-start;
  text-align: left;
}

.table-wrap {
  border-radius: 8px;
  border: 1px solid var(--line);
  background: hsl(var(--b1));
}

table,
.du-table {
  font-size: 0.9rem;
}

th {
  background: hsl(var(--b2));
  color: #344154;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(120, 139, 160, 0.16);
}

tbody tr:hover td {
  background: #f8fbfd;
}

.dashboard-group .table-wrap table,
.admin-grid .table-wrap table {
  border-collapse: separate;
  border-spacing: 0;
}

.dashboard-group .table-wrap thead,
.admin-grid .table-wrap thead {
  position: sticky;
  top: 0;
  z-index: 12;
}

.dashboard-group .table-wrap th,
.admin-grid .table-wrap th {
  position: sticky;
  top: 0;
  z-index: 13;
  background: hsl(var(--b2));
  box-shadow: 0 1px 0 rgba(120, 139, 160, 0.22), 0 10px 16px rgba(15, 23, 42, 0.04);
}

.live-kiosk-body tbody tr:hover td {
  background: inherit;
}

.sort-button {
  color: inherit;
  font-weight: 650;
  min-height: 0;
}

.panel-badge,
.hero-tag,
.chip,
.du-badge {
  border-radius: 7px;
  background: hsl(var(--b2));
  color: #304052;
  border: 1px solid var(--line);
  font-weight: 700;
}

.flash,
.du-alert {
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.is-hidden {
  display: none !important;
}

.flash-success {
  border-color: rgba(16, 137, 98, 0.28);
  background: #eefbf5;
  color: #0d5f45;
}

.flash-error {
  border-color: rgba(211, 47, 47, 0.25);
  background: #fff1f1;
  color: #9f2323;
}

.flash-warning {
  border-color: rgba(217, 119, 6, 0.26);
  background: #fff7e7;
  color: #8a4b08;
}

.toast,
.localized-date-proxy {
  border-radius: 8px;
}

input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
select:not([multiple]),
button:not(.sort-button):not(.dashboard-side-link):not(.dashboard-sub-link):not(.table-action-button):not(.localized-date-proxy):not(.mobile-live-tab),
.button-link,
.du-btn,
.live-control-button,
.localized-date-proxy {
  min-height: var(--control-height);
  height: var(--control-height);
}

select:not([multiple]),
.du-select:not([multiple]) {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
}

input[type="file"] {
  height: auto;
  min-height: var(--control-height);
}

.table-inline-input {
  width: min(100%, 210px);
  min-height: 34px;
  height: 34px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 0.9rem;
}

.table-muted {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.sortable-table tr.is-active-version {
  background: rgba(20, 184, 166, 0.1);
}

.table-action-button.is-disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.live-control-button {
  padding-top: 0;
  padding-bottom: 0;
}

.live-control-button-toggle {
  min-width: var(--control-height);
  width: var(--control-height);
  padding-left: 0;
  padding-right: 0;
}

@media (max-width: 980px) {
  .docs-shell {
    width: min(100% - 18px, 860px);
    margin-top: 9px;
    padding-bottom: 1rem;
  }

  .docs-hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.95rem;
    margin-bottom: 0.85rem;
    padding: 1rem;
    border-radius: 20px;
  }

  .docs-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .docs-layout {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .docs-toc,
  .docs-page-toc {
    position: static;
    max-height: none;
  }

  .docs-page-toc {
    order: 1;
  }

  .docs-content {
    order: 2;
  }

  .docs-toc {
    order: 3;
  }

  .docs-page-nav {
    grid-template-columns: 1fr;
  }

  .content-grid,
  #resourcesSection .content-grid,
  #dailySection .content-grid,
  #timetableSection .content-grid,
  .login-layout {
    grid-template-columns: 1fr;
  }

  .page-home .page-shell {
    width: min(100% - 20px, 1200px);
  }

  .page-home .marketing-grid {
    grid-template-columns: 1fr;
  }

  .page-home .card-feature {
    min-height: 0;
  }
}

@media (max-width: 760px) {
  .docs-hero h1 {
    font-size: clamp(1.85rem, 10vw, 2.45rem);
    line-height: 1;
  }

  .docs-hero p {
    font-size: 0.96rem;
  }

  .docs-actions .button-link {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .docs-body .docs-lang-switcher {
    width: 100%;
  }

  .docs-body .docs-lang-switcher select {
    width: 100%;
  }

  .docs-page-toc {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    padding: 0.55rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px) saturate(1.12);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
    scrollbar-width: thin;
  }

  .docs-page-toc h2 {
    display: none;
  }

  .docs-page-toc a,
  .docs-page-toc a:visited {
    flex: 0 0 auto;
    max-width: 72vw;
    padding: 0.48rem 0.72rem;
    border: 1px solid rgba(15, 118, 110, 0.1);
    background: rgba(248, 250, 252, 0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .docs-page-toc a.is-current {
    box-shadow: inset 0 -3px 0 #0f766e;
    transform: none;
  }

  .docs-content {
    padding: 1rem;
    border-radius: 20px;
  }

  .docs-content h1,
  .docs-content h2,
  .docs-content h3,
  .docs-content h4 {
    scroll-margin-top: 5.25rem;
  }

  .docs-content h1 {
    font-size: clamp(1.75rem, 9vw, 2.35rem);
  }

  .docs-content h2 {
    margin-top: 1.45rem;
    padding-top: 1rem;
  }

  .docs-image {
    margin: 16px 0;
    padding: 8px;
    overflow-x: auto;
    border-radius: 18px;
  }

  .docs-image img {
    width: auto;
    min-width: min(760px, 190vw);
    max-width: none;
  }

  .docs-toc {
    padding: 0.85rem;
    border-radius: 20px;
  }
}

@media (max-width: 760px) {
  :root {
    --control-height: 44px;
    --radius: 18px;
  }

  body.page-dashboard,
  body.page-admin {
    background-attachment: scroll;
  }

  body.page-dashboard .page-shell,
  body.page-admin .page-shell {
    width: 100%;
    margin-top: 0;
    padding: 10px;
  }

  body.page-dashboard .hero-saas,
  body.page-admin .hero-saas {
    margin: 0 0 10px;
    padding: 12px;
    border-radius: 18px;
  }

  body.page-dashboard .hero-saas h1,
  body.page-admin .hero-saas h1 {
    font-size: clamp(1.55rem, 8vw, 2.15rem);
    line-height: 1.02;
  }

  body.page-dashboard .hero-copy,
  body.page-admin .hero-copy {
    font-size: 0.92rem;
    line-height: 1.35;
  }

  body.page-dashboard .top-nav,
  body.page-admin .top-nav {
    width: 100%;
    justify-content: flex-start;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  body.page-dashboard .top-nav::-webkit-scrollbar,
  body.page-admin .top-nav::-webkit-scrollbar {
    display: none;
  }

  body.page-dashboard .top-nav a,
  body.page-dashboard .language-select,
  body.page-admin .top-nav a,
  body.page-admin .language-select {
    flex: 0 0 auto;
    min-height: 38px;
    white-space: nowrap;
  }

  .dashboard-toolbar {
    position: relative;
    top: auto;
    z-index: 1;
    margin-top: 0;
    padding: 10px;
    border-radius: 18px;
  }

  .dashboard-toolbar .section-kicker,
  .dashboard-toolbar .toolbar-copy p {
    display: none;
  }

  .dashboard-toolbar .toolbar-copy h2 {
    font-size: 1rem;
  }

  .dashboard-toolbar .dashboard-filters {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .dashboard-toolbar .dashboard-filter-field {
    grid-template-columns: 4.6rem minmax(0, 1fr);
    padding: 6px 8px;
    border-radius: 12px;
  }

  .dashboard-layout {
    display: block;
    margin-top: 10px;
  }

  .dashboard-sidebar {
    position: sticky;
    top: 0;
    z-index: 70;
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 18px;
    overflow: hidden;
  }

  .dashboard-sidebar > .section-kicker {
    display: none;
  }

  .dashboard-side-nav {
    display: grid;
    gap: 8px;
    overflow: visible;
    padding: 2px;
    scroll-snap-type: none;
    scrollbar-width: auto;
  }

  .dashboard-side-nav::-webkit-scrollbar {
    display: initial;
  }

  .dashboard-side-group {
    flex: initial;
    scroll-snap-align: none;
  }

  .dashboard-side-link {
    min-width: 0;
    width: 100%;
    grid-template-columns: 34px minmax(0, 1fr);
    min-height: 42px;
    padding: 7px 8px;
  }

  .dashboard-subnav {
    display: grid;
    gap: 6px;
    margin: 7px 0 0;
    padding: 0 0 0 42px;
    border-left: 0;
    overflow-x: visible;
    scrollbar-width: auto;
  }

  .dashboard-subnav::-webkit-scrollbar {
    display: initial;
  }

  .dashboard-sub-link {
    flex: 0 0 auto;
    min-height: 34px;
    max-width: 13rem;
    padding: 7px 10px;
    border-radius: 10px;
    white-space: nowrap;
  }

  .dashboard-main,
  .dashboard-group,
  .admin-shell,
  .admin-main,
  .admin-section,
  .content-grid,
  .admin-grid,
  .stats-grid,
  .control-grid,
  .workflow-strip,
  .publication-metrics {
    min-width: 0;
    grid-template-columns: 1fr !important;
  }

  .admin-sidebar {
    position: sticky;
    top: 0;
    z-index: 12;
  }

  .dashboard-group-heading {
    margin: 10px 2px;
  }

  .dashboard-group-heading h2 {
    font-size: 1.28rem;
  }

  .card,
  .stat-card {
    padding: 12px;
    border-radius: 18px;
  }

  .card-header {
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
  }

  .card-header h2,
  .card-header h3 {
    font-size: 1.04rem;
    line-height: 1.18;
  }

  .form-grid,
  .settings-panel-grid,
  .mobile-token-expiry-row,
  .mobile-token-expiry-row.mobile-push-time-row {
    grid-template-columns: 1fr !important;
  }

  .form-span-2,
  .form-actions-inline,
  .field-stack,
  .search-field,
  .settings-panel {
    grid-column: 1 / -1;
    min-width: 0;
  }

  .form-actions-inline {
    justify-content: stretch;
  }

  .form-actions-inline > *,
  .auto-substitution-bar > *,
  .publication-actions > *,
  .preview-actions > * {
    width: 100%;
  }

  input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
  select:not([multiple]),
  textarea,
  button:not(.sort-button):not(.dashboard-side-link):not(.dashboard-sub-link):not(.table-action-button):not(.localized-date-proxy):not(.mobile-live-tab),
  .button-link {
    width: 100%;
    min-width: 0;
    font-size: 16px;
  }

  .checkbox-field {
    align-items: center;
    padding: 10px;
    border-radius: 14px;
  }

  .table-wrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 14px;
  }

  .table-wrap table {
    min-width: 720px;
  }

  #substitutionsCard .table-wrap table,
  #absencesCard .table-wrap table,
  #outdoorActivitiesCard .table-wrap table {
    min-width: 820px;
  }

  .table-action-button {
    min-height: 36px;
    padding: 7px 10px;
  }

  th,
  td {
    padding: 9px 10px;
  }

  .manual-availability-grid,
  .teacher-checklist,
  .picker-shell,
  .scrollable-panel {
    max-height: min(58vh, 520px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .teacher-suggest {
    position: fixed;
    left: 12px;
    right: 12px;
    max-height: 42vh;
    z-index: 1000;
  }

  .toast-viewport {
    top: auto;
    right: 10px;
    bottom: 12px;
    left: 10px;
    padding: 0;
    width: auto;
  }
}

@media (max-width: 420px) {
  body.page-dashboard .page-shell,
  body.page-admin .page-shell {
    padding: 8px;
  }

  .dashboard-toolbar .dashboard-filter-field {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .dashboard-toolbar .dashboard-filters label {
    font-size: 0.72rem;
  }

  .dashboard-side-group {
    flex-basis: auto;
  }
}

/* Standard admin workspace: app shell, not marketing chrome. */
body.page-dashboard {
  --dashboard-sidebar-width: 292px;
  --dashboard-topbar-height: 82px;
  --dashboard-brand-height: 66px;
}

body.page-dashboard .bg-orb,
body.page-dashboard .app-footer {
  display: none;
}

body.page-dashboard .page-shell,
body.page-dashboard .page-shell-wide {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

body.page-dashboard #dashboardApp {
  min-height: 100vh;
  min-height: 100dvh;
}

body.page-dashboard .dashboard-context-bar {
  position: fixed;
  top: 0;
  left: var(--dashboard-sidebar-width);
  right: 0;
  z-index: 85;
  min-height: var(--dashboard-topbar-height);
  height: var(--dashboard-topbar-height);
  box-sizing: border-box;
  margin: 0;
  padding: 14px 22px;
  border-radius: 0;
  border-width: 0 0 1px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  background: rgba(248, 251, 255, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.dashboard-mobile-menu-button,
.dashboard-sidebar-backdrop {
  display: none;
}

body.page-dashboard .dashboard-context-bar::after {
  display: none;
}

body.page-dashboard .dashboard-context-bar .dashboard-filters {
  width: 100%;
  margin-left: 0;
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(150px, 180px) minmax(0, 1fr) minmax(230px, 300px);
  gap: 14px;
  align-items: end;
}

body.page-dashboard .dashboard-context-bar .dashboard-filter-field:nth-child(3) {
  grid-column: 4;
}

body.page-dashboard .dashboard-context-bar .dashboard-filter-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
}

body.page-dashboard .dashboard-context-bar .dashboard-filters label {
  justify-self: start;
  padding-left: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  text-align: left;
  color: #64748b;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.page-dashboard .dashboard-context-bar label[for="schoolSelect"],
body.page-dashboard .dashboard-context-bar label[for="selectedDate"],
body.page-dashboard .dashboard-context-bar label[for="timetableVersionSelect"] {
  width: calc(100% - 12px);
  margin-left: 6px;
  padding-left: 0;
}

body.page-dashboard .dashboard-context-bar select,
body.page-dashboard .dashboard-context-bar input {
  --dashboard-context-control-radius: 12px;
  min-height: 38px;
  height: 38px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: var(--dashboard-context-control-radius);
}

body.page-dashboard .dashboard-context-bar select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 12px center;
  background-size: 16px 16px;
  background-repeat: no-repeat;
  color: #0f172a;
  font-weight: inherit;
  line-height: 1.1;
  padding-top: 0;
  padding-bottom: 0;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

body.page-dashboard .dashboard-context-bar input[type="date"] {
  color: #0f172a;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

body.page-dashboard .dashboard-context-bar select:focus,
body.page-dashboard .dashboard-context-bar input:focus {
  border-color: rgba(15, 118, 110, 0.48);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
  outline: none;
}

body.page-dashboard .dashboard-context-bar .localized-date-field,
body.page-dashboard .dashboard-context-bar .localized-date-proxy {
  border-radius: var(--dashboard-context-control-radius, 12px);
}

body.page-dashboard .dashboard-layout {
  display: block;
  margin: 0;
}

body.page-dashboard .dashboard-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 90;
  width: var(--dashboard-sidebar-width);
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  margin: 0;
  padding: 16px 14px;
  border-radius: 0;
  border-width: 0 1px 0 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 248, 246, 0.94));
  box-shadow: 16px 0 40px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

body.page-dashboard .dashboard-sidebar-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: var(--dashboard-brand-height);
  height: var(--dashboard-brand-height);
  box-sizing: border-box;
  padding: 0 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

body.page-dashboard .dashboard-sidebar-head img {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
  align-self: center;
  justify-self: center;
}

body.page-dashboard .dashboard-sidebar-head strong {
  min-width: 0;
  align-self: center;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 850;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

body.page-dashboard .dashboard-sidebar > .section-kicker {
  display: none;
}

body.page-dashboard .dashboard-side-nav {
  min-height: 0;
  overflow: auto;
  padding-right: 3px;
  align-content: start;
  grid-auto-rows: max-content;
}

body.page-dashboard .dashboard-side-group:not(.is-active) .dashboard-subnav {
  display: none;
}

body.page-dashboard .dashboard-side-group.is-active .dashboard-subnav {
  display: grid;
}

body.page-dashboard .dashboard-sidebar-tools {
  display: grid;
  gap: 8px;
  align-self: end;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

body.page-dashboard .dashboard-tool-link,
body.page-dashboard .dashboard-logout-form button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 40px;
  width: 100%;
  padding: 7px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  text-align: left;
  text-decoration: none;
  font-weight: 750;
  box-shadow: none;
}

body.page-dashboard .dashboard-tool-link:hover,
body.page-dashboard .dashboard-tool-link.is-current,
body.page-dashboard .dashboard-logout-form button:hover {
  background: #fff;
  border-color: rgba(15, 118, 110, 0.18);
  transform: none;
  filter: none;
}

body.page-dashboard .dashboard-tool-link .nav-icon,
body.page-dashboard .dashboard-logout-form .nav-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

body.page-dashboard .dashboard-language-form {
  display: grid;
  gap: 3px;
  margin: 2px 0;
}

body.page-dashboard .dashboard-language-form label {
  width: calc(100% - 12px);
  margin-left: 6px;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.page-dashboard .dashboard-language-form select {
  min-height: 38px;
  height: 38px;
  border-radius: var(--dashboard-context-control-radius, 12px);
  line-height: 1.1;
  padding-top: 0;
  padding-bottom: 0;
}

body.page-dashboard .dashboard-logout-form {
  margin: 0;
}

body.page-dashboard .dashboard-sidebar-copyright {
  margin: 6px 4px 0;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 650;
  line-height: 1.35;
  text-align: left;
}

body.page-dashboard .dashboard-main {
  margin-left: var(--dashboard-sidebar-width);
  padding: calc(var(--dashboard-topbar-height) + 18px) 22px 28px;
}

body.page-dashboard .dashboard-group-heading {
  display: none;
}

body.page-dashboard .control-grid,
body.page-dashboard .stats-grid {
  margin-top: 0;
}

body.page-dashboard .dashboard-quick-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 14px;
  align-items: stretch;
  margin: 0 0 14px;
}

body.page-dashboard .dashboard-overview-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 14px;
}

body.page-dashboard .dashboard-subsection-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 14px;
}

body.page-dashboard .dashboard-overview-header h2,
body.page-dashboard .dashboard-subsection-header h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(1.45rem, 2.2vw, 2.25rem);
  font-weight: 850;
  letter-spacing: -0.04em;
  line-height: 1;
}

body.page-dashboard .dashboard-subsection-heading-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
}

body.page-dashboard .dashboard-subsection-meta {
  color: #64748b;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

body.page-dashboard .dashboard-subsection-meta:not(:empty)::before {
  content: "•";
  margin-right: 10px;
  color: #94a3b8;
  font-weight: 850;
}

body.page-dashboard #resourcesSection .content-grid > article.card > .card-header:first-child,
body.page-dashboard #dailySection .content-grid > article.card > .card-header:first-child,
body.page-dashboard #timetableSection .content-grid > article.card > .card-header:first-child {
  display: none;
}

body.page-dashboard .dashboard-overview-kicker {
  display: block;
  margin-bottom: 6px;
  color: #0f766e;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.page-dashboard .dashboard-clock {
  display: grid;
  gap: 3px;
  color: #475569;
  font-size: 0.94rem;
  font-weight: 750;
  text-align: right;
  white-space: nowrap;
}

body.page-dashboard .dashboard-clock span,
body.page-dashboard .dashboard-clock strong {
  display: block;
}

body.page-dashboard .dashboard-clock strong {
  color: #0f172a;
  font-size: 1.18rem;
  font-weight: 850;
  letter-spacing: -0.02em;
}

body.page-dashboard .dashboard-quick-action {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 96px;
  height: 100%;
  align-self: stretch;
  box-sizing: border-box;
  padding: 16px;
  border: 1px solid rgba(125, 211, 252, 0.14);
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.22), transparent 32%),
    linear-gradient(135deg, #0a1f33, #0f332f 58%, #12385f);
  color: #f8fbff;
  text-align: left;
  text-decoration: none;
  box-shadow: 0 18px 40px rgba(6, 22, 38, 0.18);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

body.page-dashboard button.dashboard-quick-action,
body.page-dashboard a.dashboard-quick-action {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) !important;
  align-items: center !important;
  align-self: stretch !important;
  min-height: 108px !important;
  height: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 16px !important;
  line-height: 1.18 !important;
}

body.page-dashboard .dashboard-quick-action:hover,
body.page-dashboard .dashboard-quick-action:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(125, 211, 252, 0.36);
  box-shadow: 0 24px 48px rgba(6, 22, 38, 0.24);
  outline: none;
}

body.page-dashboard .dashboard-quick-action:nth-child(1) {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.2), transparent 32%),
    linear-gradient(135deg, #0f766e, #134e4a);
}

body.page-dashboard .dashboard-quick-action:nth-child(2) {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.2), transparent 32%),
    linear-gradient(135deg, #1d4ed8, #0f766e);
}

body.page-dashboard .dashboard-quick-action:nth-child(3) {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.2), transparent 32%),
    linear-gradient(135deg, #b45309, #0f766e);
}

body.page-dashboard .dashboard-quick-action:nth-child(4) {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.2), transparent 32%),
    linear-gradient(135deg, #075985, #155e75);
}

body.page-dashboard .dashboard-quick-action:nth-child(5) {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.2), transparent 32%),
    linear-gradient(135deg, #365314, #0f766e);
}

body.page-dashboard .dashboard-quick-action .nav-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  color: #ccfbf1;
  background: rgba(255, 255, 255, 0.12);
}

body.page-dashboard .dashboard-quick-action .nav-icon svg {
  width: 22px;
  height: 22px;
}

body.page-dashboard .dashboard-quick-action span:last-child {
  min-width: 0;
  color: #f8fbff;
  font-size: 0.95rem;
  font-weight: 850;
  line-height: 1.18;
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: normal;
}

body.page-dashboard #overviewSection .control-grid {
  gap: 18px;
  margin-top: 18px;
}

body.page-dashboard #overviewSection .stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 0;
}

body.page-dashboard #overviewSection .stat-card {
  min-width: 0;
  padding: 18px;
}

body.page-dashboard #overviewSection .stat-value {
  overflow: hidden;
  max-width: 100%;
  font-size: clamp(1.45rem, 1.9vw, 2.15rem);
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 980px) {
  body.page-dashboard {
    --dashboard-sidebar-width: 0px;
    --dashboard-topbar-height: auto;
  }

  body.page-dashboard .dashboard-context-bar {
    position: sticky;
    left: 0;
    top: 0;
    z-index: 110;
    min-height: 0;
    padding: 9px 10px;
    border-radius: 0;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    background: rgba(248, 251, 255, 0.96);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.1);
  }

  body.page-dashboard .dashboard-mobile-menu-button {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid rgba(15, 118, 110, 0.16);
    border-radius: 14px;
    background:
      linear-gradient(135deg, rgba(15, 118, 110, 0.96), rgba(20, 184, 166, 0.86));
    box-shadow: 0 12px 24px rgba(15, 118, 110, 0.2);
  }

  body.page-dashboard .dashboard-mobile-menu-button span {
    position: absolute;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: #fff;
    transition: transform 0.18s ease, opacity 0.18s ease;
  }

  body.page-dashboard .dashboard-mobile-menu-button span:nth-child(1) {
    transform: translateY(-6px);
  }

  body.page-dashboard .dashboard-mobile-menu-button span:nth-child(3) {
    transform: translateY(6px);
  }

  body.page-dashboard .dashboard-mobile-menu-button.is-open span:nth-child(1) {
    transform: rotate(45deg);
  }

  body.page-dashboard .dashboard-mobile-menu-button.is-open span:nth-child(2) {
    opacity: 0;
  }

  body.page-dashboard .dashboard-mobile-menu-button.is-open span:nth-child(3) {
    transform: rotate(-45deg);
  }

  body.page-dashboard .dashboard-context-bar .dashboard-filters {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 7px;
    width: 100%;
    align-items: end;
  }

  body.page-dashboard .dashboard-context-bar .dashboard-filter-field:first-child {
    grid-column: 1 / -1;
  }

  body.page-dashboard .dashboard-context-bar .dashboard-filter-field:nth-child(3) {
    grid-column: auto;
  }

  body.page-dashboard .dashboard-context-bar .dashboard-filter-field {
    gap: 2px;
  }

  body.page-dashboard .dashboard-context-bar .dashboard-filters label {
    padding-left: 4px;
    font-size: 0.66rem;
  }

  body.page-dashboard .dashboard-context-bar label[for="schoolSelect"],
  body.page-dashboard .dashboard-context-bar label[for="selectedDate"],
  body.page-dashboard .dashboard-context-bar label[for="timetableVersionSelect"] {
    margin-left: 4px;
    width: calc(100% - 8px);
  }

  body.page-dashboard .dashboard-context-bar select,
  body.page-dashboard .dashboard-context-bar input,
  body.page-dashboard .dashboard-context-bar .localized-date-proxy {
    min-height: 36px;
    height: 36px;
    font-size: 0.92rem;
  }

  body.page-dashboard .dashboard-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 118;
    display: block;
    background: rgba(15, 23, 42, 0.38);
    backdrop-filter: blur(4px);
  }

  body.page-dashboard .dashboard-sidebar-backdrop[hidden] {
    display: none;
  }

  body.page-dashboard .dashboard-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 120;
    width: min(86vw, 326px);
    max-width: 326px;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 12px;
    padding: 14px 12px;
    border-width: 0 1px 0 0;
    box-shadow: 22px 0 46px rgba(15, 23, 42, 0.2);
    transform: translateX(-105%);
    transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
  }

  body.page-dashboard .dashboard-sidebar.is-open {
    transform: translateX(0);
  }

  body.dashboard-menu-open {
    overflow: hidden;
  }

  body.page-dashboard .dashboard-sidebar-head {
    min-height: 58px;
    height: 58px;
  }

  body.page-dashboard .dashboard-side-nav {
    display: grid;
    gap: 8px;
    overflow: auto;
    padding: 0 3px 0 0;
  }

  body.page-dashboard .dashboard-side-group {
    flex: initial;
  }

  body.page-dashboard .dashboard-side-group:not(.is-active) .dashboard-subnav {
    display: none;
  }

  body.page-dashboard .dashboard-side-group.is-active .dashboard-subnav {
    display: grid;
  }

  body.page-dashboard .dashboard-sidebar-tools {
    grid-template-columns: 1fr;
  }

  body.page-dashboard .dashboard-language-form {
    grid-column: 1 / -1;
  }

  body.page-dashboard .dashboard-main {
    margin-left: 0;
    padding: 14px 10px 24px;
  }

  body.page-dashboard .dashboard-overview-header {
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }

  body.page-dashboard .dashboard-subsection-header {
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }

  body.page-dashboard .dashboard-clock {
    text-align: left;
    white-space: normal;
  }

  body.page-dashboard .dashboard-quick-actions,
  body.page-dashboard #overviewSection .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  body.page-dashboard .dashboard-context-bar .dashboard-filter-field {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  body.page-dashboard .dashboard-context-bar {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
  }

  body.page-dashboard .dashboard-mobile-menu-button {
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
  }

  body.page-dashboard .dashboard-sidebar-tools {
    grid-template-columns: 1fr;
  }

  body.page-dashboard .dashboard-quick-actions,
  body.page-dashboard #overviewSection .stats-grid {
    grid-template-columns: 1fr;
  }
}
