@import url("https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;500;600;700;800;900&display=swap");

:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --ink: #17202e;
  --muted: #677487;
  --line: #d9e0ea;
  --blue: #2563eb;
  --blue-2: #dbeafe;
  --green: #15803d;
  --green-2: #dcfce7;
  --amber: #b45309;
  --amber-2: #ffedd5;
  --red: #b91c1c;
  --red-2: #fee2e2;
  --teal: #0f766e;
  --teal-2: #ccfbf1;
  --shadow: 0 16px 42px rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans", "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

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

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
}

textarea {
  min-height: 84px;
  resize: vertical;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.landing-page {
  min-height: 100vh;
  overflow-x: hidden;
  background: #f7fbff;
  color: #071633;
}

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  min-height: 78px;
  padding: 0 clamp(22px, 4vw, 54px);
  border-bottom: 1px solid rgba(15, 23, 42, .08);
  background: rgba(248, 251, 255, .86);
  box-shadow: 0 14px 36px rgba(15, 23, 42, .045);
  backdrop-filter: blur(16px);
}

.landing-brand img {
  display: block;
  width: 168px;
  height: auto;
}

.landing-nav nav {
  display: flex;
  justify-content: center;
  gap: clamp(18px, 3vw, 42px);
  min-width: 0;
}

.landing-nav nav a {
  color: #0f1b33;
  font-size: 14px;
  font-weight: 850;
}

.landing-nav nav a:hover {
  color: var(--blue);
}

.landing-actions,
.landing-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.landing-actions .button-link,
.landing-hero-actions .button-link,
.landing-cta .button-link {
  min-height: 46px;
  padding-inline: 22px;
}

.landing-hero {
  position: relative;
  min-height: calc(100vh - 78px);
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: clamp(42px, 5.2vw, 72px) clamp(22px, 4vw, 54px);
}

.landing-hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(247, 251, 255, .98) 0%, rgba(247, 251, 255, .92) 28%, rgba(247, 251, 255, .42) 52%, rgba(247, 251, 255, .1) 100%),
    url("./assets/landing/hero-corridor-optimized.jpg") center right / cover no-repeat;
}

.landing-hero-bg::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  background: linear-gradient(0deg, #f7fbff 0%, rgba(247, 251, 255, 0) 100%);
}

.landing-hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.landing-kicker,
.landing-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: #eef5ff;
  color: #2563eb;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 850;
}

.landing-hero h1 {
  max-width: 700px;
  margin: 28px 0 18px;
  color: #071633;
  font-size: clamp(40px, 5.4vw, 74px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.landing-hero h1 span {
  background: linear-gradient(90deg, #2563eb, #0f9f9a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.landing-hero p {
  max-width: 590px;
  margin: 0 0 28px;
  color: #53627a;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.7;
}

.landing-hero-actions .light {
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}

.landing-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  margin-top: 34px;
}

.landing-trust-row span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #0f766e;
  font-size: 13px;
  font-weight: 850;
}

.landing-feature-band {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  width: min(1720px, calc(100% - 72px));
  margin: -48px auto 72px;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #041747, #082462);
  color: #fff;
  box-shadow: 0 24px 70px rgba(4, 23, 71, .28);
}

.landing-feature-band article {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 154px;
  border-right: 1px solid rgba(255, 255, 255, .12);
  padding: 28px 24px;
}

.landing-feature-band article:last-child {
  border-right: 0;
}

.landing-feature-band span {
  color: #57e6df;
}

.landing-feature-band span svg {
  width: 30px;
  height: 30px;
}

.landing-feature-band strong {
  font-size: 16px;
  font-weight: 900;
}

.landing-feature-band p {
  margin: 0;
  color: rgba(255, 255, 255, .74);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
}

.landing-section {
  width: min(1600px, calc(100% - 72px));
  margin: 0 auto 72px;
}

.landing-showcase {
  display: grid;
  grid-template-columns: minmax(320px, .8fr) minmax(520px, 1.2fr);
  gap: 42px;
  align-items: center;
}

.landing-showcase h2,
.landing-section-head h2,
.landing-pricing h2,
.landing-faq h2,
.landing-cta h2 {
  margin: 14px 0 12px;
  color: #071633;
  font-size: clamp(30px, 4vw, 54px);
  font-weight: 900;
  line-height: 1.06;
}

.landing-showcase p,
.landing-pricing p,
.landing-faq .landing-section-head p,
.landing-cta p {
  margin: 0;
  color: #53627a;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.65;
}

.landing-showcase img {
  width: 100%;
  border-radius: 18px;
  filter: drop-shadow(0 24px 58px rgba(15, 23, 42, .16));
}

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

.landing-cards article,
.landing-price-card,
.landing-how {
  border: 1px solid rgba(15, 23, 42, .1);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .06);
}

.landing-cards article {
  overflow: hidden;
}

.landing-cards img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.landing-cards h3 {
  margin: 20px 22px 8px;
  color: #071633;
  font-size: 22px;
  font-weight: 900;
}

.landing-cards p {
  margin: 0 22px 24px;
  color: #53627a;
  font-weight: 650;
  line-height: 1.55;
}

.landing-how {
  padding: 34px;
}

.landing-section-head {
  text-align: center;
}

.landing-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 30px;
}

.landing-steps article {
  position: relative;
  display: grid;
  gap: 10px;
  border: 1px solid rgba(37, 99, 235, .12);
  border-radius: 12px;
  background: #f8fbff;
  padding: 24px;
  text-align: center;
}

.landing-steps article > span {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto;
  border-radius: 50%;
  background: #eef5ff;
  color: var(--blue);
  font-size: 20px;
  font-weight: 900;
}

.landing-steps h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
}

.landing-steps p {
  margin: 0;
  color: #53627a;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
}

.landing-pricing {
  display: grid;
  gap: 28px;
}

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

.landing-price-card {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 30px;
}

.landing-price-card.featured {
  border-color: rgba(37, 99, 235, .36);
  box-shadow: 0 24px 58px rgba(37, 99, 235, .14);
}

.landing-plan-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  color: #0891b2;
  font-size: 12px;
  font-weight: 900;
}

.landing-price-card strong {
  color: #071633;
  font-size: 34px;
  font-weight: 900;
}

.landing-price-card > span {
  color: var(--blue);
  font-size: 16px;
  font-weight: 850;
}

.landing-price-card p {
  margin: 0;
  color: #53627a;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
}

.landing-price-card ul {
  display: grid;
  gap: 12px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.landing-price-card li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #334155;
  font-weight: 750;
}

.landing-price-card li svg {
  color: #0f9f9a;
}

.landing-faq {
  display: grid;
  gap: 28px;
}

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

.landing-faq-grid article {
  min-height: 178px;
  border: 1px solid rgba(15, 23, 42, .1);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, .045), transparent 42%),
    linear-gradient(145deg, #fff, #f8fbff);
  box-shadow: 0 18px 42px rgba(15, 23, 42, .055);
  padding: 24px;
}

.landing-faq-grid h3 {
  margin: 0 0 10px;
  color: #071633;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
}

.landing-faq-grid p {
  margin: 0;
  color: #53627a;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.6;
}

.landing-cta {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  width: min(1600px, calc(100% - 72px));
  margin: 0 auto 36px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 85% 20%, rgba(20, 184, 166, .28), transparent 32%),
    linear-gradient(135deg, #041747, #082462);
  color: #fff;
  padding: 34px 42px;
  box-shadow: 0 24px 70px rgba(4, 23, 71, .28);
}

.landing-cta h2 {
  color: #fff;
  margin-top: 0;
  font-size: clamp(26px, 3vw, 42px);
}

.landing-cta p {
  color: rgba(255, 255, 255, .74);
}

.landing-demo-form {
  width: min(720px, 100%);
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 14px;
  background: rgba(255, 255, 255, .08);
  backdrop-filter: blur(14px);
}

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

.landing-demo-form label {
  display: grid;
  gap: 6px;
  color: rgba(255, 255, 255, .76);
  font-size: 12px;
  font-weight: 800;
}

.landing-demo-form input,
.landing-demo-form select,
.landing-demo-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 10px;
  background: rgba(255, 255, 255, .96);
  color: #071633;
  padding: 12px 13px;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  outline: none;
}

.landing-demo-form textarea {
  resize: vertical;
  min-height: 82px;
}

.landing-demo-form .button-link {
  justify-content: center;
  border: 0;
}

.landing-demo-form small {
  color: rgba(255, 255, 255, .66);
  font-weight: 700;
}

.demo-request-contact {
  display: grid;
  gap: 4px;
}

.demo-request-contact a {
  color: #2563eb;
  font-weight: 800;
  text-decoration: none;
}

.demo-request-note {
  display: block;
  max-width: 480px;
  margin-top: 6px;
  color: #64748b;
  font-weight: 700;
  line-height: 1.45;
}

.status-text {
  font-weight: 900;
}

.status-text.blue {
  color: #2563eb;
}

.status-text.green {
  color: #059669;
}

.status-text.amber {
  color: #d97706;
}

.compact-empty {
  min-height: 120px;
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(340px, 460px) 1fr;
  background: #eef4f8;
}

.login-panel {
  display: grid;
  align-content: center;
  gap: 26px;
  margin: 32px;
  padding: 44px;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 22px 54px rgba(15, 23, 42, .09);
}

.login-visual {
  position: relative;
  display: grid;
  align-content: end;
  min-height: 100vh;
  padding: 56px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(7, 22, 51, .28), rgba(7, 22, 51, .82)),
    url("./assets/login/school-background.jpg") center / cover;
}

.login-visual h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(34px, 4.8vw, 64px);
  line-height: 1.12;
}

.login-visual p {
  max-width: 620px;
  margin-top: 16px;
  color: rgba(255, 255, 255, .88);
  font-size: 17px;
  line-height: 1.6;
}

.login-panel .brand-logo img {
  width: 136px;
}

.login-eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 850;
  font-size: 20px;
}

.brand-logo {
  display: inline-flex;
  gap: 0;
}

.brand-logo img {
  display: block;
  width: 150px;
  height: auto;
}

.sidebar-collapsed .brand-logo img {
  width: 44px;
  content: url("assets/logo-icon-set/e-pano-icon-transparent.png");
}

.agent-card .brand-logo img,
.tv-pair-card .brand-logo img {
  width: 164px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
}

[data-lucide] {
  width: 18px;
  height: 18px;
  stroke-width: 2.25;
}

.brand-mark [data-lucide] {
  width: 23px;
  height: 23px;
}

.login-panel h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.22;
}

.login-panel .hint {
  max-width: 340px;
  margin-top: 10px;
}

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

.media-upload-policy {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: -2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.media-upload-policy div {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 5px 8px;
}

.media-upload-policy span {
  font-weight: 800;
}

.media-upload-policy strong {
  border-radius: 999px;
  background: var(--blue-2);
  color: var(--blue);
  padding: 2px 7px;
  font-weight: 900;
}

.media-upload-policy em {
  color: var(--ink);
  font-style: normal;
  font-weight: 850;
}

.form {
  display: grid;
  gap: 14px;
}

.login-panel .form {
  gap: 16px;
  padding-top: 4px;
}

.login-panel label {
  color: #475569;
}

.login-panel input {
  min-height: 44px;
  border-color: #cbd5e1;
  background: #f8fafc;
}

.login-panel input:focus {
  border-color: var(--blue);
  background: #fff;
  outline: 3px solid rgba(37, 99, 235, .14);
}

.login-panel .primary {
  min-height: 46px;
  margin-top: 2px;
  background: #1d4ed8;
  box-shadow: 0 12px 24px rgba(37, 99, 235, .18);
}

.login-local-hint {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.loading-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(219, 234, 254, .72), transparent 34%),
    #eef4f8;
}

.loading-card {
  display: grid;
  justify-items: center;
  gap: 18px;
  width: min(100%, 360px);
  padding: 34px 28px;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 54px rgba(15, 23, 42, .09);
  text-align: center;
}

.loading-card .brand-logo img {
  width: 136px;
}

.loading-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

.loading-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid #dbeafe;
  border-top-color: var(--teal);
  border-radius: 999px;
  animation: loading-spin .9s linear infinite;
}

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

.primary, .secondary, .ghost, .danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  border-radius: 8px;
  padding: 0 12px;
  font-weight: 800;
}

.primary { background: var(--blue); color: #fff; }
.secondary { background: var(--surface-2); color: var(--ink); }
.ghost { border: 1px solid var(--line); background: transparent; color: var(--ink); }
.danger { background: var(--red-2); color: var(--red); }

.button-link {
  width: auto;
}

.icon-only {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
}

.icon-only:hover {
  color: var(--blue);
  background: var(--blue-2);
}

.splash {
  min-height: 100vh;
  display: grid;
  place-content: center;
  gap: 14px;
  text-align: center;
}

.splash p {
  margin: 0;
  color: var(--muted);
}

.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 74px 1fr;
}

.sidebar {
  border-right: 1px solid var(--line);
  background: var(--surface);
  padding: 14px;
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sidebar-collapsed .sidebar-head {
  display: grid;
  justify-content: center;
  justify-items: center;
}

.sidebar-collapsed .sidebar-head .brand span:last-child,
.sidebar-collapsed .school-card,
.sidebar-collapsed .nav button span {
  display: none;
}

.sidebar-collapsed .brand {
  gap: 0;
}

.sidebar-collapsed .nav {
  justify-items: center;
}

.sidebar-collapsed .nav button {
  justify-content: center;
  width: 46px;
  padding: 0;
}

.sidebar-collapsed .nav button [data-lucide] {
  flex: 0 0 18px;
}

.sidebar-collapsed #sidebarToggle {
  position: static;
}

.school-card {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-2);
}

.school-card strong,
.school-card span {
  display: block;
}

.school-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.nav {
  display: grid;
  gap: 7px;
  margin-top: 18px;
}

.nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
  text-align: left;
  font-weight: 750;
}

.nav button.active,
.nav button:hover {
  background: var(--blue-2);
  color: var(--blue);
}

.nav button [data-lucide] {
  flex: 0 0 18px;
}

.content {
  min-width: 0;
  padding: 18px 18px 86px;
}

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

.topbar h1 {
  margin: 0;
  color: #233044;
  font-size: clamp(20px, 2vw, 27px);
  font-weight: 760;
  line-height: 1.12;
}

.topbar .hint {
  max-width: 760px;
  margin-top: 4px;
  color: #6b778a;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}

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

.runtime-mode-control {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.runtime-mode-control button {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 10px 12px;
}

.runtime-mode-control button.active {
  background: var(--blue-2);
  color: var(--blue);
}

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

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

.two-col {
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
}

.quick-sound-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.quick-sound-button {
  justify-content: center;
  min-height: 40px;
  padding: 8px 10px;
  font-size: 14px;
}

.quick-sound-stop {
  justify-content: center;
  min-height: 40px;
  padding: 8px 10px;
  font-size: 14px;
}

.quick-sound-button.playing {
  border-color: var(--green);
  background: var(--green-2);
  color: var(--green);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .14);
}

.quick-sound-status {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin: 0 14px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 10px 12px;
}

.quick-sound-status[hidden] {
  display: none;
}

.quick-sound-status.playing {
  border-color: var(--green);
  background: var(--green-2);
}

.quick-sound-status strong,
.quick-sound-status span {
  display: block;
}

.quick-sound-status span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.quick-sound-status .quick-sound-stop {
  flex: 0 0 auto;
}

.emergency-card {
  border-color: rgba(220, 38, 38, .24);
}

.emergency-control {
  display: grid;
  gap: 14px;
  align-items: stretch;
}

.emergency-preview {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b1220;
}

.emergency-preview video {
  display: none;
  width: 100%;
  height: 100%;
  min-height: 190px;
  object-fit: cover;
}

.emergency-preview.active video {
  display: block;
}

.emergency-preview.active .emergency-preview-empty {
  display: none;
}

.emergency-preview-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  color: rgba(255,255,255,.7);
  text-align: center;
  font-weight: 800;
}

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

.emergency-actions.active {
  border: 1px solid rgba(220, 38, 38, .22);
  border-radius: 8px;
  background: rgba(220, 38, 38, .06);
  padding: 12px;
}

.emergency-primary-action {
  display: flex;
  width: 100%;
}

.emergency-main-button {
  justify-content: center;
  width: 100%;
}

.emergency-actions .hint {
  flex-basis: 100%;
}

.emergency-status-message {
  margin: 0;
  font-weight: 800;
}

.emergency-peer-list {
  display: flex;
  flex-basis: 100%;
  flex-wrap: wrap;
  gap: 8px;
}

.emergency-secondary-control {
  opacity: .78;
}

.emergency-log-toggle {
  flex: 0 0 auto;
}

.emergency-log-list {
  display: grid;
  flex-basis: 100%;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.emergency-log-list[hidden] {
  display: none;
}

.emergency-log-list > strong {
  font-size: 13px;
}

.emergency-log-row {
  display: grid;
  grid-template-columns: auto minmax(90px, 1fr) auto minmax(160px, 1.4fr);
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.device-monitor {
  padding-bottom: 0;
}

.device-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.device-table td {
  vertical-align: middle;
}

.device-table th,
.device-table td {
  white-space: nowrap;
}

.device-table td:first-child {
  min-width: 170px;
  white-space: normal;
}

.device-subline {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  white-space: normal;
}

.device-diagnostics {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.device-diagnostics summary {
  width: fit-content;
  cursor: pointer;
  color: var(--teal);
  font-weight: 900;
}

.device-diagnostics span {
  display: block;
  margin-top: 2px;
}

.device-history-row td {
  background: rgba(148, 163, 184, 0.08);
  white-space: normal;
}

.device-history {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.device-history summary {
  width: fit-content;
  cursor: pointer;
  color: var(--teal);
  font-weight: 900;
}

.device-history-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.device-history-card {
  display: grid;
  grid-template-columns: minmax(140px, 1.2fr) auto minmax(130px, 0.7fr) minmax(150px, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.section-kicker,
.plain-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.section-kicker [data-lucide] {
  width: 15px;
  height: 15px;
}

.plain-status {
  color: var(--muted);
  letter-spacing: .01em;
}

.plain-status.online {
  color: #0891b2;
}

.plain-status.offline {
  color: #dc2626;
}

.plain-status.muted {
  color: var(--muted);
}

.tv-pair-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(420px, 1.4fr);
  gap: 16px;
  align-items: end;
  border-top: 1px solid var(--line);
}

.tv-pair-panel h3 {
  margin: 8px 0 4px;
  font-size: 20px;
}

.tv-pair-form {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(190px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.tv-pair-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.tv-pair-form input,
.tv-pair-form select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 11px;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.tv-pair-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  background: #07111f;
  color: #fff;
  padding: 24px;
}

.tv-pair-card {
  display: grid;
  gap: 16px;
  width: min(720px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: #111b2b;
  padding: 34px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.tv-pair-card h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 56px);
  letter-spacing: 0;
}

.tv-pair-card p {
  margin: 0;
  color: #c7d2e3;
  font-size: 20px;
  font-weight: 750;
}

.tv-activation-code {
  width: max-content;
  min-width: 360px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: #eaf2ff;
  color: #0b1320;
  padding: 18px 28px;
  font-size: clamp(46px, 8vw, 84px);
  font-weight: 950;
  letter-spacing: 8px;
  line-height: 1;
}

.tv-pair-help {
  display: grid;
  gap: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 14px;
  color: #c7d2e3;
  font-weight: 750;
}

.tv-pair-help strong {
  color: #fff;
}

.muted-text {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.section-gap {
  margin-top: 12px;
}

.setup-shell {
  display: grid;
  gap: 12px;
}

.setup-progress-card {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.setup-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 50px;
  padding: 10px 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .86), rgba(240, 253, 244, .68)),
    #fff;
}

.setup-progress-head strong,
.setup-progress-head span {
  display: block;
}

.setup-progress-head strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 15px;
}

.setup-progress-head strong [data-lucide] {
  width: 17px;
  height: 17px;
  color: #15803d;
}

.setup-progress-head span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.setup-progress-toggle {
  flex: 0 0 auto;
}

.setup-progress-body {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 12px 14px;
}

.setup-progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.setup-progress-top h2 {
  margin: 6px 0 3px;
  font-size: 20px;
}

.setup-progress-top p {
  margin: 0;
  color: var(--muted);
  font-weight: 650;
}

.setup-progress-action {
  flex: 0 0 auto;
}

.setup-progress-meta {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.setup-checklist {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.setup-check-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--muted);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 850;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
}

.setup-check-item.done {
  border-color: rgba(34, 197, 94, .34);
  background: linear-gradient(180deg, #dcfce7, #bbf7d0);
  color: #166534;
}

.setup-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 6px;
}

.setup-tabs button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  padding: 7px 9px;
  font-weight: 850;
  text-align: center;
}

.setup-tabs button.active,
.setup-tabs button:hover {
  border-color: transparent;
  background: var(--blue-2);
  color: var(--blue);
}

.compact-tabs {
  grid-template-columns: repeat(2, minmax(0, 180px));
  justify-content: start;
}

.dashboard-tabs {
  grid-template-columns: repeat(4, minmax(0, 190px));
}

.settings-tabs {
  grid-template-columns: repeat(6, minmax(0, 170px));
  justify-content: start;
}

.settings-placeholder {
  display: flex;
  align-items: center;
  gap: 14px;
}

.settings-placeholder h2 {
  margin: 0 0 4px;
}

.settings-grid-single {
  max-width: 860px;
}

.security-settings-card .card-head {
  align-items: center;
}

.security-settings-body {
  display: grid;
  gap: 18px;
}

.security-account-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, .08), rgba(20, 184, 166, .06)),
    var(--surface-soft);
}

.security-account-summary > span {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.security-account-summary strong,
.security-account-summary small {
  display: block;
}

.security-account-summary small {
  color: var(--muted);
  font-weight: 700;
}

.security-password-form {
  max-width: 520px;
}

.color-grid {
  display: grid;
  gap: 12px;
}

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

.theme-select-field {
  max-width: 360px;
}

.color-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 6px 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--soft);
}

.color-field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.color-field input {
  grid-row: span 2;
  width: 42px;
  height: 34px;
  border: 0;
  background: transparent;
  padding: 0;
}

.color-field strong {
  font-size: 14px;
}

.theme-preview {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--display-text, #f8fafc) 16%, transparent);
  border-radius: 8px;
  background: var(--display-bg, #07111f);
  color: var(--display-text, #f8fafc);
  padding: 18px;
}

.theme-preview div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.theme-preview span {
  color: var(--display-accent, #8af5e4);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.theme-preview strong {
  font-size: 24px;
}

.theme-preview p {
  margin: 0;
  opacity: .78;
}

.theme-preview mark {
  border-radius: 8px;
  background: var(--display-card, #1f2937);
  color: var(--display-accent, #8af5e4);
  padding: 12px 16px;
  font-weight: 900;
}

.segmented-control {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.segmented-control button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0 10px;
  font-weight: 800;
}

.segmented-control button.active,
.segmented-control button:hover {
  background: var(--blue-2);
  color: var(--blue);
}

.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.schedule-hours-card {
  width: 100%;
}

.setup-data-card {
  width: 100%;
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.card-head h2,
.card-head h3,
.stat h3 {
  margin: 0;
}

.card-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.card-body {
  padding: 14px;
}

.card-footer-actions {
  display: flex;
  justify-content: flex-start;
  padding: 0 16px 16px;
}

.fixed-page-action {
  position: fixed;
  bottom: 22px;
  z-index: 20;
  display: flex;
  pointer-events: none;
}

.fixed-page-action .primary {
  min-width: 150px;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .22);
  pointer-events: auto;
}

.fixed-page-action-left {
  left: calc(260px + 24px);
}

.fixed-page-action-right {
  right: 24px;
}

.stat {
  position: relative;
  padding: 16px;
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  margin-bottom: 12px;
  background: var(--blue-2);
  color: var(--blue);
}

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

.stat strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.admin-metric {
  position: relative;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    radial-gradient(circle at 92% 12%, rgba(37, 99, 235, .08), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(248, 250, 252, .95));
  padding: 18px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, .055);
}

.admin-metric strong,
.admin-metric span,
.admin-metric small {
  display: block;
}

.admin-metric strong {
  color: #0f172a;
  font-size: 25px;
  line-height: 1.1;
}

.admin-metric span {
  margin-top: 3px;
  color: #344256;
  font-size: 12px;
  font-weight: 800;
}

.admin-metric small {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.admin-metric em,
.insight-total em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.admin-metric em.positive,
.insight-total em.positive {
  background: var(--green-2);
  color: var(--green);
}

.metric-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 0;
  flex: 0 0 24px;
  background: transparent;
  color: var(--blue);
}

.metric-icon svg,
.school-avatar svg {
  display: block;
  width: 21px;
  height: 21px;
  margin: 0;
}

.metric-icon.small {
  width: 24px;
  height: 24px;
  border-radius: 0;
  flex-basis: 24px;
  background: transparent;
}

.metric-icon.small svg {
  width: 21px;
  height: 21px;
}

.metric-icon.green { background: var(--green-2); color: var(--green); }
.metric-icon.amber { background: var(--amber-2); color: var(--amber); }
.metric-icon.red { background: var(--red-2); color: var(--red); }
.metric-icon.teal { background: var(--teal-2); color: var(--teal); }

.platform-shell .metric-icon.green,
.platform-shell .metric-icon.amber,
.platform-shell .metric-icon.red,
.platform-shell .metric-icon.teal,
.platform-shell .metric-icon.blue {
  background: transparent;
}

.platform-shell .content {
  background:
    radial-gradient(circle at 80% 0%, rgba(37, 99, 235, .08), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, #f4f7fb 100%);
}

.platform-topbar {
  align-items: flex-start;
  margin-bottom: 16px;
}

.platform-topbar h1 {
  font-size: clamp(28px, 2.8vw, 36px);
  font-weight: 850;
}

.platform-api-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .045);
}

.platform-api-status.green {
  border-color: rgba(21, 128, 61, .18);
  color: var(--green);
}

.platform-api-status.amber {
  border-color: rgba(180, 83, 9, .18);
  color: var(--amber);
}

.platform-card {
  overflow: hidden;
}

.platform-count-text {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.platform-dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(360px, .92fr);
  gap: 16px;
  align-items: start;
}

.platform-card,
.admin-insight-card {
  border-radius: 12px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .065);
}

.platform-card-head {
  padding: 16px 18px;
}

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

.section-title-row h2,
.section-title-row h3 {
  margin: 0;
}

.platform-table {
  min-width: 0;
  table-layout: fixed;
}

.platform-table th {
  background: #f8fafc;
}

.platform-table td {
  overflow: hidden;
  vertical-align: middle;
}

.platform-table th:nth-child(1),
.platform-table td:nth-child(1) {
  width: 30%;
}

.platform-table th:nth-child(2),
.platform-table td:nth-child(2) {
  width: 16%;
}

.platform-table th:nth-child(3),
.platform-table td:nth-child(3) {
  width: 14%;
}

.platform-table th:nth-child(4),
.platform-table td:nth-child(4) {
  width: 12%;
}

.platform-table th:nth-child(5),
.platform-table td:nth-child(5) {
  width: 10%;
}

.platform-table th:nth-child(6),
.platform-table td:nth-child(6) {
  width: 18%;
}

.table-subtext {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

.platform-actions .small-action {
  min-height: 32px;
  padding: 0 9px;
  font-size: 12px;
  white-space: nowrap;
}

.platform-action-select {
  width: min(122px, 100%);
  min-height: 34px;
  margin-left: auto;
  padding: 0 24px 0 9px;
  border-radius: 8px;
  background-color: #fff;
  color: var(--ink);
  font-size: 11px;
  font-weight: 850;
}

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

.platform-panel-link {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
  white-space: nowrap;
}

.credential-popup {
  border-radius: 14px;
}

.credential-box {
  text-align: left;
  color: var(--text);
}

.credential-box p {
  margin: 0 0 14px;
  color: var(--muted);
}

.credential-box dl {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    repeating-linear-gradient(135deg, rgba(37, 99, 235, .035) 0 1px, transparent 1px 9px),
    #f8fbff;
}

.credential-box dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.credential-box dd {
  margin: -4px 0 6px;
  font-weight: 800;
  word-break: break-word;
}

.credential-box code {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 7px;
  background: #eaf2ff;
  color: #0f3c88;
  font-size: 15px;
}

.credential-box small {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-weight: 700;
}

.platform-school-cell {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.platform-school-cell > div {
  min-width: 0;
}

.platform-school-cell strong,
.platform-school-cell .table-subtext {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.school-avatar {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--blue);
  box-shadow: none;
}

.school-avatar svg {
  width: 22px;
  height: 22px;
}

.admin-insights {
  display: grid;
  gap: 16px;
}

.card-head.compact {
  padding: 14px 16px;
}

.admin-chart-body {
  padding: 16px;
}

.insight-total {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  margin-bottom: 14px;
}

.insight-total strong {
  color: #0f172a;
  font-size: 28px;
  line-height: 1;
}

.insight-total span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.revenue-chart {
  width: 100%;
  height: auto;
}

.revenue-chart path {
  fill: none;
  stroke: #e5ebf3;
  stroke-dasharray: 4 6;
}

.revenue-chart polyline {
  fill: none;
  stroke: var(--blue);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.revenue-chart circle {
  fill: #fff;
  stroke: var(--blue);
  stroke-width: 3;
}

.growth-bars {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  min-height: 170px;
  padding: 18px 16px 8px;
}

.growth-bar {
  display: grid;
  justify-items: center;
  gap: 8px;
  align-self: end;
}

.growth-bar strong {
  color: #0f172a;
  font-size: 14px;
}

.growth-bar span {
  display: block;
  width: min(42px, 76%);
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #b9d1ff, #7ea8ff);
  box-shadow: 0 10px 20px rgba(37, 99, 235, .14);
}

.growth-bar-level-1 {
  height: 14px;
}

.growth-bar-level-2 {
  height: 29px;
}

.growth-bar-level-3 {
  height: 43px;
}

.growth-bar-level-4 {
  height: 57px;
}

.growth-bar-level-5 {
  height: 72px;
}

.growth-bar-level-6 {
  height: 86px;
}

.growth-bar small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-align: center;
}

.growth-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 8px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}

.growth-summary > div {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
}

.growth-summary strong,
.growth-summary small {
  display: block;
}

.growth-summary strong {
  color: #0f172a;
  font-size: 21px;
}

.growth-summary small {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.small-action {
  min-height: 32px;
  padding: 0 9px;
  font-size: 12px;
  white-space: nowrap;
}

.readonly-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 6px 22px;
}

.readonly-info {
  display: grid;
  gap: 3px;
  min-width: 0;
  border-left: 3px solid #d7e0ec;
  background: transparent;
  padding: 4px 0 4px 12px;
}

.readonly-info span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.readonly-info strong {
  min-width: 0;
  color: #17202e;
  font-size: 16px;
  font-weight: 760;
  line-height: 1.25;
}

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

.teacher-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 8px;
}

.teacher-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 9px;
  min-height: 72px;
}

.teacher-row span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.teacher-card-main {
  min-width: 0;
}

.teacher-card-main strong {
  display: block;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-editor {
  display: grid;
  gap: 12px;
}

.photo-drop {
  display: grid;
  place-items: center;
  width: 156px;
  height: 156px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  overflow: hidden;
  cursor: pointer;
  touch-action: none;
}

.photo-drop.panning {
  cursor: grabbing;
}

.photo-drop img,
.photo-drop .teacher-avatar {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
  font-size: 38px;
}

.duty-schedule-form {
  gap: 14px;
}

.duty-toolbar {
  margin: 0;
}

.between-actions {
  justify-content: space-between;
}

.inline-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 14px;
}

.school-logo-editor {
  align-items: start;
}

.school-logo-settings-card {
  max-width: 760px;
}

.school-logo-settings-form {
  max-width: 560px;
}

.school-logo-drop img,
.school-logo-drop .school-logo-placeholder {
  object-fit: contain;
}

.school-logo-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--blue);
}

.school-logo-placeholder [data-lucide] {
  width: 38px;
  height: 38px;
}

.photo-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.photo-tools label {
  min-width: 180px;
}

.photo-tools input[type="range"] {
  padding: 0;
}

.personnel-photo-editor {
  gap: 8px;
  justify-items: center;
}

.personnel-photo-drop {
  width: 132px;
  height: 132px;
}

.personnel-photo-tools {
  justify-content: center;
  gap: 6px;
}

.personnel-photo-tools .icon-only {
  width: 30px;
  height: 30px;
}

.personnel-photo-tools label {
  min-width: 130px;
  font-size: 12px;
}

.personnel-list {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: start;
}

.item {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #fff;
}

.item-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.item-title strong {
  min-width: 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 24px;
  border-radius: 8px;
  padding: 0 10px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.tag [data-lucide] {
  width: 14px;
  height: 14px;
}

.tag.green { background: var(--green-2); color: var(--green); }
.tag.amber { background: var(--amber-2); color: var(--amber); }
.tag.red { background: var(--red-2); color: var(--red); }
.tag.teal { background: var(--teal-2); color: var(--teal); }

.bell-auto-builder {
  display: grid;
  grid-template-columns: minmax(220px, .9fr) minmax(520px, 2fr);
  gap: 14px;
  align-items: end;
  border-top: 1px solid var(--line);
  padding: 14px 18px;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, .78), rgba(255, 255, 255, .92)),
    var(--surface);
}

.bell-auto-builder strong,
.bell-auto-builder span {
  display: block;
}

.bell-auto-builder span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.bell-auto-form {
  display: grid;
  grid-template-columns: repeat(6, minmax(92px, 1fr)) auto;
  gap: 8px;
  align-items: end;
}

.bell-auto-form label {
  gap: 5px;
  font-size: 12px;
}

.bell-auto-form input,
.bell-auto-form select,
.bell-auto-form button {
  min-height: 38px;
}

@media (max-width: 1180px) {
  .bell-auto-builder,
  .bell-auto-form {
    grid-template-columns: 1fr;
  }
}

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

.span-2 { grid-column: 1 / -1; }

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1100px;
}

.compact-table {
  min-width: 720px;
}

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

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

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

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

.row-actions .icon-only {
  width: 36px;
  height: 36px;
  background: #fff;
}

.news-admin-grid {
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, .8fr);
}

.news-list {
  display: grid;
  gap: 12px;
}

.news-list.compact .news-item {
  min-height: auto;
}

.news-item {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.news-item.archived {
  background: #f8fafc;
}

.news-thumb {
  width: 82px;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.empty-thumb {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.news-item-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.news-item-main p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.news-form-actions {
  justify-content: flex-end;
}

.news-image-preview img {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.public-news-link-box {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
}

.public-news-link-box code {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 12px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.public-news-page {
  min-height: 100vh;
  background: #eef4f8;
  padding: 20px;
}

.public-news-header,
.public-news-content {
  width: min(100%, 860px);
  margin: 0 auto;
}

.public-news-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 0;
}

.public-news-header h1 {
  margin: 6px 0;
  font-size: clamp(28px, 5vw, 44px);
}

.public-news-header p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.public-news-header img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 8px;
}

.public-news-list {
  display: grid;
  gap: 14px;
}

.public-news-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, .08);
}

.public-news-card > img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--surface-2);
}

.public-news-card-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.public-news-card-body h2,
.public-news-card-body p {
  margin: 0;
}

.public-news-card-body p {
  color: var(--muted);
  line-height: 1.55;
}

.public-news-card details {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.public-news-card summary {
  cursor: pointer;
  color: var(--blue);
  font-weight: 900;
}

.danger-icon {
  color: var(--red);
}

.danger-icon:hover {
  background: var(--red-2);
  color: var(--red);
}

.inline-filter-form {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto;
  gap: 8px;
  min-width: 250px;
}

.inline-filter-form input {
  min-height: 36px;
  padding: 7px 9px;
}

.inline-filter-form button {
  min-height: 36px;
}

.panel-flow-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 8px;
  min-width: 360px;
}

.panel-flow-form textarea {
  min-height: 58px;
  padding: 7px 9px;
  font-size: 13px;
}

.panel-flow-form button {
  min-height: 36px;
  align-self: start;
}

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

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, .46);
  backdrop-filter: blur(2px);
}

.modal-card {
  width: min(560px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 28px 90px rgba(15, 23, 42, .26);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 10px 0 0;
}

.modal-body {
  padding: 18px;
}

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

.confirm-card {
  width: min(460px, 100%);
}

.confirm-message {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.field-group {
  display: grid;
  gap: 10px;
}

.type-section {
  display: none;
}

.type-section.active {
  display: block;
}

.field-group > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.panel-option-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.panel-option-choice .check-line {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 850;
}

.check-card small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.location-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.location-results {
  display: grid;
  gap: 8px;
}

.location-result {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  text-align: left;
}

.location-result:hover {
  border-color: var(--blue);
  background: var(--blue-2);
}

.location-result [data-lucide] {
  color: var(--blue);
}

.announcement-editor-section {
  display: none;
  gap: 10px;
}

.announcement-editor-section.active {
  display: grid;
}

.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.check-line input {
  width: 18px;
  height: 18px;
}

.image-preview {
  display: grid;
  min-height: 170px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 800;
}

.image-preview img {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
}

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

.repeatable-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-2);
}

.personnel-form-card {
  position: relative;
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.82), rgba(255,255,255,.52)),
    var(--surface-2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65);
}

.personnel-remove {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

.repeatable-remove {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}

.repeatable-remove:hover {
  color: var(--danger);
  border-color: rgba(220, 38, 38, 0.35);
}

.sound-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  align-items: start;
  gap: 12px;
}

.sound-card {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  background: #fff;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.sound-card.expanded {
  background: var(--surface-2);
}

.sound-card.drag-over {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
  transform: translateY(-2px);
}

.sound-card-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 78px;
  padding: 14px 14px 12px 44px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .82), rgba(226, 232, 240, .72)),
    color-mix(in srgb, var(--surface-2) 72%, #fff);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    inset 0 -1px 0 rgba(15, 23, 42, .04);
}

.sound-card-head::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 14%, rgba(37, 99, 235, .08), transparent 26%),
    radial-gradient(circle at 86% 0%, rgba(20, 184, 166, .08), transparent 24%),
    repeating-linear-gradient(135deg, rgba(15, 23, 42, .025) 0 1px, transparent 1px 8px);
  opacity: .75;
}

.sound-card-head > * {
  position: relative;
  z-index: 1;
}

.sound-card-title {
  min-width: 0;
  flex: 1;
}

.sound-drag-handle.icon-only {
  display: inline-grid;
  place-items: center;
  position: absolute;
  top: 12px;
  left: 12px;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  line-height: 1;
  border-radius: 6px;
  color: var(--muted);
  cursor: grab;
}

.sound-drag-handle [data-lucide] {
  display: block;
  width: 14px;
  height: 14px;
  margin: 0;
}

.sound-drag-handle:active {
  cursor: grabbing;
}

.sound-card-head strong,
.sound-status {
  display: block;
}

.sound-status {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.sound-status.server {
  color: #16a34a;
}

.sound-status.default {
  color: #16a34a;
}

.sound-status.custom {
  color: #2563eb;
}

.sound-status.local {
  color: #d97706;
}

.sound-status.missing {
  color: #ef6b6b;
}

.sound-preview-toggle {
  flex: 0 0 auto;
}

.sound-preview-toggle.active {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
}

.sound-preview-toggle:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.sound-expand-toggle {
  flex: 0 0 auto;
}

.sound-card-body {
  border-top: 1px solid var(--line);
  padding: 14px;
}

.sound-file-meta {
  display: grid;
  gap: 2px;
  margin-bottom: 12px;
  min-width: 0;
}

.sound-file-meta span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.sound-file-meta strong {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sound-card-footer {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  padding: 10px 14px;
  background: color-mix(in srgb, var(--surface-2) 72%, #fff);
}

.sound-file-button {
  cursor: pointer;
}

.sound-preview {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.sound-preview audio {
  width: 100%;
  min-width: 0;
}

.sound-preview input[type="range"] {
  padding: 0;
}

.sound-duration-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.sound-duration-control input {
  width: 72px;
  padding: 7px 9px;
}

.hidden {
  display: none !important;
}

.inline-add {
  justify-self: start;
}

.checkbox-grid,
.panel-catalog,
.screen-catalog,
.bell-catalog,
.setup-catalog {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

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

.bell-catalog {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 7px;
}

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

.screen-catalog {
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  align-items: start;
}

.check-card,
.panel-catalog-card,
.screen-card,
.bell-card,
.setup-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.check-card {
  grid-template-columns: auto 26px 1fr;
  align-items: center;
  cursor: pointer;
}

.check-card input {
  width: 18px;
  height: 18px;
}

.check-card span {
  display: grid;
  place-items: center;
  color: var(--blue);
}

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

.panel-selection-groups {
  display: grid;
  gap: 12px;
}

.panel-selection-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    repeating-linear-gradient(135deg, rgba(37, 99, 235, .025) 0 1px, transparent 1px 12px),
    linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(248, 250, 252, .94));
}

.panel-selection-head {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.panel-selection-icon {
  display: grid;
  place-items: center;
  color: var(--blue);
}

.panel-selection-head strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.panel-selection-head small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

.panel-selection-card {
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 45px;
  background: rgba(255, 255, 255, .86);
}

.panel-catalog-card,
.screen-card,
.setup-card {
  grid-template-columns: 44px 1fr;
  align-items: start;
}

.panel-catalog-card {
  position: relative;
  grid-template-columns: 30px minmax(0, 1fr);
  min-height: 112px;
  overflow: hidden;
  background:
    repeating-linear-gradient(135deg, rgba(37, 99, 235, .035) 0 1px, transparent 1px 11px),
    linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(248, 250, 252, .9)),
    #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    0 10px 22px rgba(15, 23, 42, .035);
}

.screen-card {
  position: relative;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: start;
  min-height: 118px;
  overflow: hidden;
  padding: 12px;
  background:
    repeating-linear-gradient(135deg, rgba(37, 99, 235, .03) 0 1px, transparent 1px 11px),
    linear-gradient(135deg, rgba(255, 255, 255, .97), rgba(248, 250, 252, .9)),
    #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    0 10px 22px rgba(15, 23, 42, .035);
}

.screen-card .stat-icon {
  width: 28px;
  height: 28px;
  margin: 0;
  border-radius: 0;
  background: transparent;
  color: var(--blue);
}

.screen-card .stat-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.4;
}

.panel-catalog-card .stat-icon {
  width: 28px;
  height: 28px;
  margin: 0;
  border-radius: 0;
  background: transparent;
  color: var(--blue);
}

.panel-catalog-card .stat-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.4;
}

.panel-catalog-card .card-actions,
.setup-card .card-actions {
  grid-column: 1 / -1;
}

.screen-card .card-actions {
  align-self: end;
  grid-column: 3;
  grid-row: 2;
  padding-top: 0;
}

.screen-card > .screen-status {
  grid-column: 2;
  justify-self: start;
}

.screen-card strong,
.screen-card span,
.bell-card strong,
.bell-card span,
.setup-card strong,
.setup-card span {
  display: block;
}

.screen-card > div:nth-child(2) span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.screen-card small {
  display: -webkit-box;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.screen-panel-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
}

.screen-panel-list span {
  color: var(--teal);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
}

.screen-panel-list span:not(:last-child)::after {
  content: ",";
  color: var(--muted);
}

.screen-status {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .05em;
  line-height: 1.2;
}

.screen-status.online {
  color: #0891b2;
}

.screen-status.offline {
  color: #dc2626;
}

.card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 6px;
}

.panel-catalog-card strong,
.panel-catalog-card span {
  display: block;
}

.panel-catalog-card span,
.bell-card > div:nth-child(2) span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.bell-card {
  position: relative;
  gap: 3px;
  min-height: 86px;
  padding: 8px 10px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .92), rgba(241, 245, 249, .78)),
    #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .88),
    0 10px 24px rgba(15, 23, 42, .04);
}

.bell-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 10% 0%, rgba(37, 99, 235, .055), transparent 28%),
    radial-gradient(circle at 96% 12%, rgba(245, 158, 11, .055), transparent 24%),
    repeating-linear-gradient(135deg, rgba(15, 23, 42, .018) 0 1px, transparent 1px 8px);
}

.bell-card > * {
  position: relative;
  z-index: 1;
}

.bell-card-main {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.bell-card-main .stat-icon {
  width: 30px;
  height: 30px;
}

.bell-event-icon {
  margin-bottom: 0;
  background: transparent;
  border-radius: 0;
}

.bell-event-icon [data-lucide] {
  width: 24px;
  height: 24px;
  stroke-width: 2.25;
}

.bell-event-icon.lesson {
  color: var(--blue);
}

.bell-event-icon.break {
  color: #f59e0b;
}

.bell-event-icon.assembly {
  color: #0d9488;
}

.bell-event-icon.exit {
  color: #64748b;
}

.bell-card-main strong {
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bell-card-main .card-actions {
  grid-column: auto;
  padding-top: 0;
}

.bell-card-main .icon-only {
  width: 31px;
  height: 31px;
  border-radius: 7px;
}

.bell-card-time {
  display: block;
  margin-left: 38px;
  color: #1f2937;
  font-size: 16px;
  font-weight: 760;
  line-height: 1.15;
}

.bell-card > .tag {
  grid-column: 1 / -1;
  justify-self: start;
  margin-left: 38px;
  height: auto;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: 0;
  padding: 0;
  color: var(--teal);
  font-size: 12px;
  line-height: 1.2;
}

.setup-card > .tag {
  grid-column: 1 / -1;
  justify-self: start;
  height: auto;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: 0;
  padding: 0;
  color: var(--teal);
  font-size: 13px;
  line-height: 1.2;
  text-align: left;
}

.bell-card strong {
  font-size: 14px;
  line-height: 1.2;
}

.setup-card > div:nth-child(2) span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.schedule-catalog {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

.schedule-builder {
  display: grid;
  gap: 12px;
}

.schedule-builder-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 400px) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.schedule-builder-toolbar label {
  grid-template-columns: auto minmax(180px, 1fr);
  align-items: center;
}

.schedule-builder-toolbar .hint {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.schedule-builder-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 12px;
  align-items: start;
}

.schedule-table-wrap {
  overflow-x: auto;
}

.schedule-matrix {
  min-width: 1680px;
  table-layout: fixed;
}

.schedule-matrix th,
.schedule-matrix td {
  padding: 10px 12px;
}

.schedule-matrix th {
  background: var(--surface-2);
}

.schedule-matrix th:first-child {
  width: 140px;
}

.schedule-matrix th:not(:first-child),
.schedule-matrix td:not(:first-child) {
  width: 190px;
}

.schedule-matrix tbody th {
  color: var(--ink);
  text-transform: none;
}

.schedule-matrix thead th span,
.schedule-matrix tbody th span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  text-transform: none;
}

.schedule-drop-cell {
  height: 104px;
  vertical-align: top;
  background: #fff;
}

.schedule-drop-cell.drag-over {
  outline: 2px solid var(--blue);
  outline-offset: -3px;
  background: var(--blue-2);
}

.drop-hint {
  display: grid;
  place-items: center;
  min-height: 82px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.schedule-cell-card {
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 2px;
  height: 86px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px;
  background: var(--surface-2);
  overflow: hidden;
}

.schedule-cell-card span,
.schedule-cell-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-cell-card strong {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  font-size: 13px;
  line-height: 1.05;
}

.schedule-cell-card span,
.schedule-cell-card small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.05;
}

.schedule-cell-card .row-actions {
  justify-content: flex-start;
  gap: 4px;
  align-self: end;
}

.schedule-cell-card .icon-only {
  width: 24px;
  height: 24px;
}

.schedule-cell-card .icon-only [data-lucide] {
  width: 14px;
  height: 14px;
}

.teacher-palette {
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 190px);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.teacher-palette h3 {
  margin: 0 0 10px;
}

.teacher-palette > div {
  display: grid;
  gap: 8px;
}

.teacher-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 7px;
  text-align: left;
  cursor: grab;
}

.teacher-chip strong {
  overflow: hidden;
  font-size: 13px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.teacher-chip:hover {
  border-color: var(--blue);
  background: var(--blue-2);
}

.teacher-chip span {
  display: grid;
  gap: 6px;
  min-width: 0;
  flex: 1;
  max-width: 100%;
}

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

.teacher-chip select {
  width: 100%;
  max-width: 100%;
  min-height: 32px;
  padding: 5px 7px;
  font-size: 11px;
  font-weight: 700;
}

.teacher-chip .teacher-avatar {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
}

.duty-builder-layout {
  grid-template-columns: minmax(0, 1fr) 260px;
}

.duty-matrix {
  min-width: 760px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  border-collapse: separate;
  border-spacing: 0;
}

.duty-matrix th:first-child {
  width: 112px;
}

.duty-matrix th:not(:first-child),
.duty-matrix td:not(:first-child) {
  width: 130px;
}

.duty-matrix th,
.duty-matrix td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.duty-matrix tr > *:last-child {
  border-right: 0;
}

.duty-matrix tbody tr:last-child > * {
  border-bottom: 0;
}

.duty-matrix thead th {
  padding: 8px 10px;
  text-align: center;
}

.duty-matrix thead th:first-child,
.duty-matrix tbody th {
  text-align: left;
}

.duty-matrix tbody th span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.duty-drop-cell {
  min-width: 130px;
  height: 122px;
  padding: 6px;
  text-align: center;
  vertical-align: middle;
  background: #fff;
}

.duty-cell-card {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  justify-items: center;
  gap: 4px;
  width: 92px;
  height: 106px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 6px;
  text-align: center;
}

.duty-card-photo {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 0;
  border-radius: 6px;
  background: #dbe3e8;
  overflow: hidden;
}

.duty-cell-card .duty-avatar {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  font-size: 22px;
  object-fit: cover;
}

.duty-cell-card strong {
  overflow: hidden;
  width: 100%;
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.duty-drop-cell .drop-hint {
  min-height: 96px;
  border-radius: 7px;
  font-size: 12px;
}

.teacher-card {
  position: relative;
  align-items: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .92), rgba(241, 245, 249, .78)),
    #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .035);
}

.teacher-card .teacher-avatar {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  font-size: 14px;
}

.teacher-card .card-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
  padding-top: 0;
}

.teacher-card .icon-only {
  width: 31px;
  height: 31px;
  border-radius: 7px;
}

.content > .grid {
  width: 100%;
}

.screen-page {
  --display-bg: #07111f;
  --display-card: #1f2937;
  --display-text: #f8fafc;
  --display-accent: #8af5e4;
  --display-line: color-mix(in srgb, var(--display-text) 16%, transparent);
  --display-muted: color-mix(in srgb, var(--display-text) 72%, transparent);
  --display-glass: color-mix(in srgb, var(--display-card) 72%, transparent);
  --display-glow: color-mix(in srgb, var(--display-accent) 34%, transparent);
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 8%, color-mix(in srgb, var(--display-accent) 14%, transparent), transparent 28%),
    radial-gradient(circle at 88% 0%, color-mix(in srgb, #2563eb 12%, transparent), transparent 30%),
    linear-gradient(145deg, color-mix(in srgb, var(--display-bg) 90%, #000), var(--display-bg) 56%, color-mix(in srgb, var(--display-bg) 86%, #0f766e));
  color: var(--display-text);
}

.screen-page::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(112deg, transparent 18%, color-mix(in srgb, var(--display-accent) 8%, transparent) 38%, transparent 64%),
    linear-gradient(28deg, transparent 20%, color-mix(in srgb, #2563eb 7%, transparent) 48%, transparent 78%);
  opacity: .56;
  transform: translateZ(0);
}

.screen-page::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.032) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.022) 0 1px, transparent 1px 46px),
    linear-gradient(180deg, rgba(255,255,255,.035), transparent 28%, rgba(0,0,0,.16));
  mask-image: linear-gradient(180deg, rgba(0,0,0,.72), rgba(0,0,0,.2) 42%, rgba(0,0,0,.62));
  opacity: .46;
}

@media (prefers-reduced-motion: reduce) {
  .screen-page::before {
    animation: none;
  }
}

.screen-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 24px 34px;
  border-bottom: 1px solid var(--display-line);
}

.screen-header h1 {
  margin: 0;
  font-size: clamp(24px, 4vw, 46px);
}

.clock {
  text-align: right;
}

.clock strong {
  display: block;
  font-size: clamp(34px, 7vw, 86px);
  line-height: .95;
}

.clock span {
  color: var(--display-muted);
  font-size: 18px;
}

.screen-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
  padding: 28px 34px;
}

.announcement-stage {
  display: grid;
  align-content: center;
  min-height: 430px;
  border-radius: 8px;
  padding: clamp(24px, 5vw, 58px);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, .9), rgba(15, 118, 110, .86)),
    url("https://images.unsplash.com/photo-1577896851231-70ef18881754?auto=format&fit=crop&w=1600&q=80") center / cover;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .28);
}

.announcement-stage h2 {
  max-width: 960px;
  margin: 0;
  font-size: clamp(42px, 7vw, 92px);
  line-height: 1;
}

.announcement-stage p {
  max-width: 900px;
  font-size: clamp(22px, 3vw, 38px);
  line-height: 1.25;
}

.display-repair-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}

.display-repair-actions span {
  color: rgba(255, 255, 255, .84);
  font-size: clamp(15px, 1.4vw, 20px);
  font-weight: 800;
}

.display-repair-button {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(37, 99, 235, .28);
}

.screen-side {
  display: grid;
  gap: 18px;
}

.screen-box {
  border: 1px solid var(--display-line);
  border-radius: 8px;
  padding: 18px;
  background: var(--display-card);
}

.screen-box h3 {
  margin: 0 0 14px;
  color: var(--display-muted);
  font-size: 15px;
  text-transform: uppercase;
}

.bell-now {
  font-size: 42px;
  font-weight: 850;
}

.schedule-screen {
  background: var(--display-bg);
}

.schedule-header {
  background: color-mix(in srgb, var(--display-card) 72%, var(--display-bg));
}

.composed-screen {
  --school-logo-size: clamp(56px, 8vh, 90px);
  grid-template-rows: minmax(clamp(64px, 10vh, 112px), auto) minmax(0, 1fr) minmax(clamp(40px, 5.4vh, 52px), auto);
  overflow: hidden;
}

.fixed-bar {
  position: relative;
  z-index: 2;
}

.screen-page > * {
  position: relative;
  z-index: 1;
}

.main-container {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 0;
  overflow: hidden;
  padding: clamp(10px, 1.5vh, 16px) clamp(16px, 1.8vw, 24px) clamp(12px, 1.8vh, 18px);
}

.screen-page,
.screen-page * {
  box-sizing: border-box;
}

.screen-page .panel-view {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.composed-screen .screen-header {
  display: grid;
  grid-template-columns: var(--school-logo-size) minmax(0, 1fr) minmax(clamp(260px, 27vw, 360px), max-content);
  padding: clamp(8px, 1.3vh, 14px) clamp(18px, 1.8vw, 28px);
}

.composed-screen .screen-header h1 {
  margin: 0;
  overflow: hidden;
  font-size: clamp(20px, 2.35vw, 36px);
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composed-screen .clock strong {
  font-size: clamp(28px, 3.7vw, 52px);
}

.composed-screen .clock span {
  font-size: clamp(12px, 1vw, 14px);
  white-space: nowrap;
}

.top-school-logo {
  display: grid;
  place-items: center;
  width: var(--school-logo-size, 104px);
  height: var(--school-logo-size, 104px);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--display-accent);
  backdrop-filter: none;
}

.top-school-logo img {
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: contain;
}

.top-school-logo [data-lucide] {
  width: 32px;
  height: 32px;
}

.top-school-title {
  min-width: 0;
  text-align: center;
}

.top-school-title span {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--display-muted);
  font-size: 14px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-status {
  display: flex;
  justify-content: flex-end;
  gap: clamp(10px, 1.1vw, 16px);
  align-items: center;
  min-width: 0;
}

.top-status .clock {
  flex: 0 0 auto;
  white-space: nowrap;
}

.current-event {
  display: block;
  align-items: center;
  min-width: 120px;
  max-width: clamp(170px, 16vw, 240px);
  flex: 1 1 auto;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  text-align: left;
}

.current-event strong,
.current-event span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.current-event strong {
  font-size: 15px;
  line-height: 1.05;
}

.current-event span {
  margin-top: 3px;
  color: var(--display-muted);
  font-size: 12px;
  font-weight: 750;
}

.panel-slide {
  animation: panelFlow 680ms ease both;
}

@keyframes panelFlow {
  from {
    opacity: .15;
    transform: translateX(70px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.bell-visual-overlay {
  position: fixed;
  inset: min(96px, 10vh) 0 min(70px, 8vh);
  z-index: 6;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 420ms ease;
}

.bell-visual-overlay.show {
  opacity: 1;
}

.bell-visual-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  min-width: min(820px, 86vw);
  border: 1px solid var(--display-line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--display-card) 88%, var(--display-bg));
  box-shadow: 0 34px 90px rgba(0,0,0,.42);
  padding: clamp(28px, 5vw, 58px);
  text-align: center;
  animation: bellVisualPulse 1500ms ease-in-out infinite;
}

.bell-visual-kicker {
  border-radius: 999px;
  background: color-mix(in srgb, var(--display-accent) 18%, transparent);
  color: var(--display-accent);
  padding: 7px 14px;
  font-size: clamp(15px, 1.8vw, 22px);
  font-weight: 900;
}

.bell-visual-mode-badge {
  border-radius: 999px;
  border: 1px solid var(--display-line);
  background: color-mix(in srgb, var(--display-card) 80%, var(--display-bg));
  color: var(--display-muted);
  padding: 5px 11px;
  font-size: clamp(12px, 1.2vw, 16px);
  font-weight: 850;
}

.bell-visual-mode-badge[hidden] {
  display: none;
}

.bell-visual-card strong {
  font-size: clamp(44px, 7vw, 104px);
  line-height: .95;
  letter-spacing: 0;
}

.bell-visual-card span:last-child {
  max-width: 760px;
  color: var(--display-muted);
  font-size: clamp(18px, 2.4vw, 30px);
  font-weight: 850;
}

@keyframes bellVisualPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.018);
  }
}

.emergency-display-overlay {
  position: fixed;
  inset: 0;
  z-index: 12;
  display: grid;
  place-items: stretch;
  background: #020617;
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms ease;
}

.emergency-display-overlay.show {
  opacity: 1;
}

.emergency-display-overlay video {
  width: 100vw;
  height: 100vh;
  object-fit: contain;
  background: #020617;
}

.emergency-display-label {
  position: absolute;
  left: 24px;
  top: 24px;
  display: grid;
  gap: 4px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  background: rgba(8, 17, 32, .76);
  padding: 12px 16px;
  color: #fff;
}

.emergency-display-label span {
  color: #fecaca;
  font-size: clamp(13px, 1.3vw, 20px);
  font-weight: 900;
}

.emergency-display-label strong {
  font-size: clamp(22px, 2.5vw, 44px);
  line-height: 1;
}

.emergency-display-label small {
  color: rgba(255,255,255,.7);
  font-size: clamp(12px, 1.1vw, 18px);
  font-weight: 800;
}

.panel-view {
  min-width: 0;
  display: grid;
  gap: 16px;
  align-content: start;
}

.panel-title h2 {
  margin: 8px 0 0;
  font-size: clamp(32px, 5vw, 64px);
}

.panel-compact-title {
  margin: 0;
  overflow: hidden;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.05;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-board-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
}

.schedule-board-head h2 {
  margin: 8px 0 0;
  font-size: clamp(28px, 4vw, 52px);
}

.schedule-board-head p {
  margin: 6px 0 0;
  color: var(--display-muted);
  font-size: 18px;
  font-weight: 800;
}

.next-lesson {
  min-width: 190px;
  border: 1px solid var(--display-line);
  border-radius: 8px;
  padding: 12px 14px;
  text-align: right;
  background: var(--display-card);
}

.next-lesson span {
  display: block;
  color: var(--display-muted);
  font-weight: 750;
}

.next-lesson strong {
  display: block;
  margin-top: 4px;
  font-size: 34px;
}

.next-lesson small {
  display: block;
  margin-top: 2px;
  color: rgba(255,255,255,.68);
  font-size: 13px;
  font-weight: 750;
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.duty-grid,
.announcement-widget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 16px;
  min-height: 0;
  overflow: hidden;
}

.duty-grid {
  align-content: start;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.personnel-display-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-content: start;
  gap: 16px;
  min-height: 0;
  overflow: hidden;
}

.duty-card,
.personnel-display-card,
.announcement-widget {
  min-width: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--display-accent) 20%, var(--display-line));
  border-radius: 8px;
  padding: 22px;
  background:
    linear-gradient(155deg, rgba(255,255,255,.065), transparent 36%),
    linear-gradient(135deg, var(--display-glass), color-mix(in srgb, var(--display-bg) 42%, transparent));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    0 18px 50px rgba(0,0,0,.2),
    0 0 30px color-mix(in srgb, var(--display-glow) 22%, transparent);
}

.duty-card {
  display: grid;
  grid-template-columns: clamp(54px, 5vw, 76px) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 128px;
  padding: 18px;
}

.personnel-display-card {
  display: grid;
  grid-template-columns: clamp(62px, 5.5vw, 84px) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 120px;
  padding: 18px;
}

.duty-avatar {
  display: grid;
  place-items: center;
  width: clamp(54px, 5vw, 76px);
  height: clamp(54px, 5vw, 76px);
  border-radius: 8px;
  color: #fff;
  font-size: clamp(18px, 2vw, 28px);
  font-weight: 950;
  object-fit: cover;
}

.personnel-display-avatar {
  width: clamp(62px, 5.5vw, 84px);
  height: clamp(62px, 5.5vw, 84px);
  border-radius: 8px;
  object-fit: cover;
  background: color-mix(in srgb, var(--display-card) 70%, #fff);
}

.duty-card-text {
  min-width: 0;
}

.personnel-display-text {
  min-width: 0;
}

.duty-card span,
.announcement-widget span {
  color: var(--display-accent);
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
}

.announcement-widget strong {
  display: block;
  margin-top: 14px;
  font-size: clamp(27px, 4vw, 48px);
  line-height: 1.05;
}

.announcement-widget p {
  margin: 12px 0 0;
  color: var(--display-muted);
  font-size: clamp(19px, 2vw, 28px);
  font-weight: 750;
  line-height: 1.25;
}

.announcement-board-panel {
  place-items: center;
  text-align: center;
}

.announcement-text-panel {
  align-content: center;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--display-accent) 20%, var(--display-line));
  border-radius: 8px;
  padding: clamp(28px, 5vw, 70px);
  background:
    linear-gradient(155deg, rgba(255,255,255,.065), transparent 36%),
    linear-gradient(135deg, var(--display-glass), color-mix(in srgb, var(--display-bg) 42%, transparent));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    0 20px 56px rgba(0,0,0,.22),
    0 0 32px color-mix(in srgb, var(--display-glow) 20%, transparent);
}

.announcement-text-panel h2 {
  margin: 0;
  font-size: clamp(34px, 4vw, 68px);
  line-height: 1.02;
}

.announcement-text-panel p,
.announcement-text-panel ul {
  max-width: 1100px;
  max-height: 100%;
  margin: 18px 0 0;
  overflow: hidden;
  color: var(--display-muted);
  line-height: 1.18;
}

.announcement-text-panel ul {
  display: grid;
  gap: 12px;
  padding-left: 1.2em;
  text-align: left;
}

.text-size-small p,
.text-size-small ul { font-size: clamp(24px, 2.4vw, 38px); }
.text-size-normal p,
.text-size-normal ul { font-size: clamp(30px, 3vw, 48px); }
.text-size-large p,
.text-size-large ul { font-size: clamp(38px, 4vw, 64px); }
.text-size-xlarge p,
.text-size-xlarge ul { font-size: clamp(48px, 5vw, 82px); }

.text-weight-normal p,
.text-weight-normal li { font-weight: 600; }
.text-weight-bold p,
.text-weight-bold li { font-weight: 800; }
.text-weight-heavy p,
.text-weight-heavy li { font-weight: 950; }

.announcement-image-panel,
.announcement-video-panel {
  align-content: stretch;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.announcement-image-panel {
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
}

.announcement-video-panel {
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
}

.announcement-image-panel img,
.announcement-video-panel video {
  width: 100%;
  height: 100%;
  max-height: 100%;
  border: 1px solid color-mix(in srgb, var(--display-accent) 18%, var(--display-line));
  border-radius: 8px;
  background: var(--display-glass);
  box-shadow: 0 18px 46px rgba(0,0,0,.22);
}

.announcement-image-panel img.fit-cover {
  object-fit: cover;
}

.announcement-image-panel img.fit-contain {
  object-fit: contain;
}

.announcement-video-panel video {
  object-fit: contain;
}

.announcement-image-panel p,
.announcement-video-panel p {
  margin: 0;
  overflow: hidden;
  color: var(--display-muted);
  font-size: clamp(18px, 1.6vw, 28px);
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.duty-card strong {
  display: block;
  overflow: hidden;
  color: var(--display-text);
  font-size: clamp(18px, 1.75vw, 27px);
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.personnel-display-card strong {
  display: block;
  overflow: hidden;
  color: var(--display-text);
  font-size: clamp(18px, 1.6vw, 26px);
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.duty-card p {
  margin: 8px 0 0;
  color: var(--display-accent);
  font-size: clamp(17px, 1.65vw, 25px);
  font-weight: 850;
  line-height: 1.16;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.personnel-display-card p {
  margin: 8px 0 0;
  overflow: hidden;
  color: var(--display-accent);
  font-size: clamp(15px, 1.25vw, 20px);
  font-weight: 850;
  line-height: 1.16;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.simple-panel {
  place-items: center;
}

.weather-panel {
  place-items: center;
}

.weather-card {
  display: grid;
  justify-items: center;
  width: min(720px, 100%);
  max-height: 100%;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--display-accent) 20%, var(--display-line));
  border-radius: 8px;
  padding: clamp(24px, 5vw, 54px);
  background:
    linear-gradient(155deg, rgba(255,255,255,.065), transparent 36%),
    linear-gradient(135deg, var(--display-glass), color-mix(in srgb, var(--display-bg) 42%, transparent));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    0 20px 56px rgba(0,0,0,.22),
    0 0 32px color-mix(in srgb, var(--display-glow) 20%, transparent);
  text-align: center;
}

.weather-location {
  color: var(--display-accent);
  font-size: clamp(20px, 2vw, 30px);
  font-weight: 850;
}

.weather-temp {
  margin-top: 12px;
  color: var(--display-text);
  font-size: clamp(76px, 10vw, 150px);
  line-height: .9;
}

.weather-state {
  margin: 14px 0 0;
  color: var(--display-muted);
  font-size: clamp(24px, 3vw, 42px);
  font-weight: 850;
}

.weather-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  margin-top: 24px;
}

.weather-details > span {
  border: 1px solid var(--display-line);
  border-radius: 8px;
  padding: 12px;
  background: color-mix(in srgb, var(--display-card) 78%, var(--display-bg));
  color: var(--display-muted);
  font-size: 15px;
  font-weight: 800;
}

.weather-details strong {
  display: block;
  margin-top: 4px;
  color: var(--display-text);
  font-size: clamp(20px, 2vw, 30px);
}

.simple-panel-card {
  width: min(920px, 100%);
  border: 1px solid color-mix(in srgb, var(--display-accent) 20%, var(--display-line));
  border-radius: 8px;
  padding: clamp(28px, 5vw, 64px);
  text-align: center;
  background:
    linear-gradient(155deg, rgba(255,255,255,.065), transparent 36%),
    linear-gradient(135deg, var(--display-glass), color-mix(in srgb, var(--display-bg) 42%, transparent));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    0 20px 56px rgba(0,0,0,.22),
    0 0 32px color-mix(in srgb, var(--display-glow) 20%, transparent);
}

.simple-panel-icon {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  margin: 0 auto 22px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--display-accent) 18%, transparent);
  color: var(--display-accent);
}

.simple-panel-icon [data-lucide] {
  width: 44px;
  height: 44px;
}

.simple-panel-card h2 {
  margin: 0;
  font-size: clamp(38px, 6vw, 76px);
}

.simple-panel-card p {
  max-width: 760px;
  margin: 18px auto 0;
  color: var(--display-muted);
  font-size: clamp(20px, 2.4vw, 32px);
}

.schedule-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
  border: 1px solid color-mix(in srgb, var(--display-accent) 20%, var(--display-line));
  border-radius: 8px;
  padding: 10px;
  background:
    linear-gradient(155deg, rgba(255,255,255,.062), transparent 36%),
    linear-gradient(135deg, var(--display-glass), color-mix(in srgb, var(--display-bg) 42%, transparent));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.11),
    0 18px 50px rgba(0,0,0,.2),
    0 0 28px color-mix(in srgb, var(--display-glow) 20%, transparent);
}

.schedule-card-main {
  min-width: 0;
}

.class-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.class-line strong {
  font-size: 23px;
  line-height: 1;
}

.class-line span {
  border-radius: 999px;
  padding: 4px 7px;
  background: color-mix(in srgb, var(--display-card) 78%, var(--display-text));
  color: var(--display-text);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.schedule-card h3 {
  margin: 9px 0 4px;
  overflow: hidden;
  font-size: clamp(17px, 1.5vw, 23px);
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-card p {
  margin: 0;
  overflow: hidden;
  color: var(--display-muted);
  font-size: 14px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room {
  display: inline-flex;
  margin-top: 7px;
  border-radius: 999px;
  padding: 4px 7px;
  background: color-mix(in srgb, var(--display-accent) 18%, transparent);
  color: var(--display-accent);
  font-size: 12px;
  font-weight: 850;
}

.schedule-avatar,
.teacher-avatar {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  color: #fff;
  font-weight: 900;
}

.schedule-avatar {
  width: 46px;
  height: 70px;
  font-size: 17px;
}

.teacher-avatar {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
}

img.schedule-avatar,
img.teacher-avatar {
  object-fit: cover;
}

.avatar-man {
  background: linear-gradient(145deg, #2563eb, #0f172a);
}

.avatar-woman {
  background: linear-gradient(145deg, #0f766e, #111827);
}

.ticker {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border-top: 1px solid color-mix(in srgb, var(--display-accent) 20%, var(--display-line));
  background: color-mix(in srgb, var(--display-card) 88%, var(--display-bg));
  box-shadow: 0 -8px 22px rgba(0,0,0,.14);
  contain: paint;
  white-space: nowrap;
}

.ticker span {
  display: inline-block;
  padding: clamp(8px, 1.25vh, 12px) 0;
  animation: ticker 28s linear infinite;
  font-size: clamp(18px, 1.55vw, 22px);
  transform: translate3d(100vw, 0, 0);
  will-change: transform;
}

@keyframes ticker {
  from { transform: translate3d(100vw, 0, 0); }
  to { transform: translate3d(-100%, 0, 0); }
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  padding: 12px 14px;
  box-shadow: var(--shadow);
}

.swal2-popup {
  border-radius: 8px;
  font-family: inherit;
}

.swal2-title {
  color: var(--ink);
  font-size: 22px;
}

.swal2-html-container {
  color: var(--muted);
  font-weight: 650;
}

.swal2-toast {
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.agent-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #0b1220;
}

.agent-card {
  width: min(720px, 100%);
  display: grid;
  gap: 16px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
  background: #111827;
  color: #fff;
  padding: 24px;
  box-shadow: 0 28px 70px rgba(0,0,0,.32);
}

.agent-card .hint {
  color: rgba(255,255,255,.68);
}

.agent-card h1 {
  margin: 0;
  font-size: 34px;
}

.agent-status {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  padding: 16px;
}

.agent-status strong {
  font-size: 24px;
}

.agent-status span {
  color: rgba(255,255,255,.72);
  font-weight: 700;
}

.agent-start-button {
  justify-self: start;
}

.agent-card .list-item {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.12);
}

.modal-card-wide {
  width: min(920px, 100%);
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

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

  .landing-nav nav {
    display: none;
  }

  .landing-hero {
    min-height: min(720px, calc(100svh - 78px));
  }

  .landing-feature-band {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .landing-feature-band article:nth-child(3) {
    border-right: 0;
  }

  .landing-showcase,
  .landing-pricing,
  .landing-cta {
    grid-template-columns: 1fr;
  }

  .landing-cards,
  .landing-price-grid,
  .landing-faq-grid {
    grid-template-columns: 1fr;
  }

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

  .landing-cta {
    align-items: stretch;
    flex-direction: column;
  }

  .stats,
  .admin-metrics,
  .platform-dashboard-layout,
  .quick-sound-actions,
  .two-col,
  .tv-pair-panel,
  .tv-pair-form,
  .screen-main {
    grid-template-columns: 1fr;
  }

  .quick-sound-status {
    align-items: stretch;
    flex-direction: column;
  }

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

  .emergency-log-toggle {
    width: 100%;
  }

  .emergency-log-row {
    grid-template-columns: 1fr;
  }

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

  .schedule-builder-toolbar,
  .schedule-builder-layout {
    grid-template-columns: 1fr;
  }

  .schedule-builder-toolbar .hint {
    white-space: normal;
  }

  .teacher-palette {
    position: static;
    max-height: 320px;
  }

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

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

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

  .platform-table {
    min-width: 860px;
  }

  .composed-screen .screen-header {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .top-status {
    grid-column: 1 / -1;
    justify-content: space-between;
  }

  .schedule-board-head {
    align-items: start;
    flex-direction: column;
  }

  .next-lesson {
    text-align: left;
  }
}

@media (max-width: 760px) {
  .landing-nav {
    position: static;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px;
  }

  .landing-actions {
    justify-content: stretch;
  }

  .landing-actions .button-link,
  .landing-hero-actions .button-link,
  .landing-cta .button-link {
    width: 100%;
  }

  .landing-hero {
    min-height: auto;
    padding: 40px 18px 72px;
  }

  .landing-hero-bg {
    background:
      linear-gradient(180deg, rgba(247, 251, 255, .98) 0%, rgba(247, 251, 255, .8) 48%, rgba(247, 251, 255, .3) 100%),
      url("./assets/landing/hero-corridor-optimized.jpg") center / cover no-repeat;
  }

  .landing-hero h1 {
    margin: 22px 0 16px;
    font-size: clamp(34px, 12vw, 48px);
    line-height: 1.04;
  }

  .landing-hero p {
    margin-bottom: 22px;
    font-size: 16px;
    line-height: 1.58;
  }

  .landing-feature-band,
  .landing-section,
  .landing-cta {
    width: calc(100% - 28px);
  }

  .landing-feature-band {
    grid-template-columns: 1fr;
    margin-top: -72px;
  }

  .landing-feature-band article {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
  }

  .landing-feature-band article:last-child {
    border-bottom: 0;
  }

  .landing-how {
    padding: 22px;
  }

  .landing-steps {
    grid-template-columns: 1fr;
  }

  .landing-demo-grid {
    grid-template-columns: 1fr;
  }

  .landing-cta {
    align-items: stretch;
    flex-direction: column;
    padding: 26px;
  }

  .login-page,
  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-shell.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 320px;
    padding: 32px 22px;
    order: -1;
  }

  .login-panel {
    margin: 16px;
    padding: 28px 22px;
  }

  .login-visual h1 {
    font-size: 34px;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .fixed-page-action-left,
  .fixed-page-action-right {
    right: 18px;
    left: 18px;
  }

  .fixed-page-action .primary {
    width: 100%;
  }

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

  .sidebar-collapsed .school-card,
  .sidebar-collapsed .nav button span,
  .sidebar-collapsed .sidebar-head .brand span:last-child {
    display: block;
  }

  .sidebar-collapsed .sidebar-head {
    display: flex;
    justify-content: space-between;
  }

  .sidebar-collapsed .nav {
    justify-items: stretch;
  }

  .sidebar-collapsed .nav button {
    width: auto;
    justify-content: flex-start;
    padding: 0 12px;
  }

  .setup-tabs {
    grid-template-columns: 1fr;
  }

  .setup-progress-top {
    align-items: stretch;
    flex-direction: column;
  }

  .setup-progress-action {
    width: 100%;
  }

  .setup-checklist {
    grid-template-columns: 1fr;
  }

  .panel-catalog {
    grid-template-columns: 1fr;
  }

  .growth-bars {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .growth-summary {
    grid-template-columns: 1fr;
  }

  .panel-selection-grid {
    grid-template-columns: 1fr;
  }

  .tv-pair-card {
    padding: 22px;
  }

  .tv-activation-code {
    width: 100%;
    min-width: 0;
    text-align: center;
  }

  .topbar,
  .screen-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .composed-screen .screen-header {
    grid-template-columns: 1fr;
  }

  .top-school-logo {
    display: none;
  }

  .top-school-title {
    text-align: left;
  }

  .top-status {
    align-items: flex-start;
    flex-direction: column;
  }

  .actions {
    justify-content: flex-start;
  }

  .split-form,
  .admin-metrics,
  .platform-dashboard-layout,
  .location-search,
  .repeatable-row,
  .screen-side,
  .news-admin-grid {
    grid-template-columns: 1fr;
  }

  .news-item {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .news-item .row-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .news-thumb {
    width: 64px;
  }

  .device-history-card {
    grid-template-columns: 1fr;
  }

  .content,
  .screen-header,
  .screen-main {
    padding: 14px;
  }

  .clock {
    text-align: left;
  }

  .main-container {
    padding: 14px;
  }

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

  .schedule-card {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .schedule-avatar {
    width: 46px;
    height: 70px;
  }

  .class-line {
    align-items: start;
    flex-direction: column;
  }
}

@media (orientation: landscape) and (min-aspect-ratio: 4 / 3) {
  .composed-screen {
    --school-logo-size: clamp(54px, 7.2vh, 82px);
    grid-template-rows: minmax(clamp(58px, 10.5vh, 96px), auto) minmax(0, 1fr) minmax(clamp(38px, 5vh, 48px), auto);
  }

  .composed-screen .screen-header {
    display: grid;
    grid-template-columns: var(--school-logo-size) minmax(0, 1fr) clamp(220px, 26vw, 320px);
    align-items: center;
    gap: clamp(10px, 1.2vw, 18px);
    padding: clamp(7px, 1.1vh, 12px) clamp(16px, 1.7vw, 26px);
  }

  .top-school-logo {
    display: grid;
  }

  .top-school-title {
    text-align: center;
  }

  .top-status {
    grid-column: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: end;
    gap: 3px;
    text-align: right;
  }

  .top-status .clock {
    text-align: right;
  }

  .current-event {
    min-width: 0;
    max-width: 100%;
    text-align: right;
  }

  .main-container {
    padding: clamp(8px, 1.25vh, 14px) clamp(14px, 1.6vw, 22px) clamp(10px, 1.45vh, 16px);
  }

  .panel-view {
    gap: clamp(8px, 1.35vh, 14px);
  }

  .panel-compact-title {
    font-size: clamp(24px, 3.8vh, 36px);
  }

  .duty-grid {
    grid-template-columns: repeat(auto-fit, minmax(clamp(220px, 24vw, 300px), 1fr));
    gap: clamp(8px, 1.25vh, 14px);
  }

  .duty-card {
    grid-template-columns: clamp(46px, 5.6vh, 64px) minmax(0, 1fr);
    gap: clamp(10px, 1vw, 14px);
    min-height: clamp(84px, 13vh, 112px);
    padding: clamp(12px, 1.7vh, 16px);
  }

  .duty-avatar {
    width: clamp(46px, 5.6vh, 64px);
    height: clamp(46px, 5.6vh, 64px);
    font-size: clamp(16px, 2vh, 24px);
  }

  .duty-card strong {
    font-size: clamp(16px, 2.8vh, 23px);
  }

  .duty-card p {
    margin-top: 5px;
    font-size: clamp(15px, 2.45vh, 21px);
  }
}
