:root {
  color-scheme: dark;
  --ink: #f8fbff;
  --muted: rgba(248, 251, 255, 0.66);
  --soft: rgba(248, 251, 255, 0.46);
  --line: rgba(255, 255, 255, 0.2);
  --glass: rgba(255, 255, 255, 0.012);
  --glass-strong: rgba(255, 255, 255, 0.05);
  --field: rgba(4, 13, 17, 0.22);
  --mint: #a9ffd4;
  --cyan: #9ceaff;
  --gold: #ffe1a4;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.22);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #08161c;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: -20%;
  z-index: -3;
  content: "";
  background:
    linear-gradient(102deg, rgba(156, 234, 255, 0.28), transparent 30%),
    linear-gradient(220deg, transparent 20%, rgba(255, 225, 164, 0.2) 46%, transparent 70%),
    linear-gradient(328deg, rgba(169, 255, 212, 0.2), transparent 36%);
  filter: blur(42px) saturate(125%);
  animation: drift 18s ease-in-out infinite alternate;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app {
  min-height: 100vh;
  padding: 28px;
}

.screen {
  display: none;
  min-height: calc(100vh - 56px);
}

.screen.is-active {
  display: grid;
}

body.home-mode {
  overflow: hidden;
  background: #edf8ff;
}

body.home-mode::before {
  display: none;
}

body.home-mode.home-night {
  background: #08161f;
}

body.home-mode .app {
  padding: 0;
}

.home-screen {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
  align-content: start;
  background: #edf8ff;
  isolation: isolate;
}

.home-screen::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0, transparent 165px),
    radial-gradient(circle at 73% 27%, rgba(255, 247, 214, 0.14), transparent 26%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05), transparent 18%, transparent 80%, rgba(255, 255, 255, 0.04)),
    linear-gradient(180deg, transparent 0, rgba(255, 255, 255, 0.04) 100%);
  animation: skyLuminance 12s ease-in-out infinite alternate;
}

.home-screen::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 116px),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 92px);
  mix-blend-mode: soft-light;
  opacity: 0.42;
}

.home-screen > * {
  position: relative;
  z-index: 1;
}

.home-backdrop {
  position: absolute !important;
  inset: 0;
  z-index: 0 !important;
  overflow: hidden;
  pointer-events: none;
}

.home-backdrop::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  background: url("../lx-home-bg-day-canvas-hq.png") center center / cover no-repeat;
  filter: none;
  transform: none;
}

.home-backdrop::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background:
    radial-gradient(circle at 43% 39%, rgba(255, 255, 255, 0.04), transparent 20%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0.025));
  mix-blend-mode: screen;
  opacity: 0.36;
}

.cloud-drift {
  position: absolute;
  z-index: 1;
  width: 52vw;
  height: 20vw;
  min-width: 520px;
  min-height: 220px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 22% 50%, rgba(255, 255, 255, 0.44), transparent 34%),
    radial-gradient(circle at 52% 44%, rgba(255, 255, 255, 0.3), transparent 40%),
    radial-gradient(circle at 78% 56%, rgba(156, 234, 255, 0.16), transparent 44%);
  filter: blur(30px);
  opacity: 0.42;
  mix-blend-mode: screen;
}

.cloud-drift-a {
  top: 18%;
  left: -12%;
  animation: cloudDriftA 32s linear infinite;
}

.cloud-drift-b {
  right: -18%;
  bottom: 16%;
  opacity: 0.34;
  animation: cloudDriftB 38s linear infinite;
}

.cloud-drift-c {
  top: 42%;
  left: 34%;
  width: 42vw;
  height: 16vw;
  opacity: 0.22;
  animation: cloudDriftC 44s linear infinite;
}

body.home-night .home-screen {
  background: #07131d;
}

body.home-night .home-backdrop::before {
  background-image: url("../lx-home-bg-night-canvas-hq.png");
  filter: none;
}

body.home-night .home-screen::before {
  background:
    linear-gradient(180deg, rgba(30, 70, 112, 0.1) 0, transparent 165px),
    linear-gradient(180deg, rgba(10, 28, 54, 0.02) 0, rgba(5, 18, 34, 0.08) 100%);
  mix-blend-mode: normal;
}

body.home-night .home-backdrop::after {
  background:
    linear-gradient(180deg, rgba(120, 180, 235, 0.04), rgba(6, 24, 54, 0.04));
  mix-blend-mode: screen;
  opacity: 0.32;
}

body.home-night .cloud-drift {
  background:
    radial-gradient(circle at 24% 50%, rgba(175, 212, 242, 0.26), transparent 34%),
    radial-gradient(circle at 58% 46%, rgba(88, 152, 208, 0.18), transparent 42%),
    radial-gradient(circle at 82% 54%, rgba(255, 255, 255, 0.1), transparent 42%);
  opacity: 0.32;
}

.petal-field,
.leaf-field {
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: hidden;
  pointer-events: none;
}

.petal-field i,
.leaf-field i {
  position: absolute;
  display: block;
  top: -12vh;
  left: var(--x);
  width: var(--size);
  height: calc(var(--size) * 0.58);
  opacity: 0;
  transform: translate3d(0, 0, 0) rotate(var(--rotate));
  transform-origin: 50% 50%;
  animation-delay: var(--delay);
  animation-duration: var(--duration);
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}

.petal-field i {
  border-radius: 72% 28% 68% 32%;
  background:
    radial-gradient(circle at 72% 40%, rgba(255, 255, 255, 0.9), transparent 24%),
    linear-gradient(135deg, rgba(255, 227, 236, 0.92), rgba(255, 172, 202, 0.78));
  box-shadow: 0 0 10px rgba(255, 198, 219, 0.32);
  animation-name: petalFall;
}

.leaf-field i {
  border-radius: 4px 78% 4px 78%;
  background:
    linear-gradient(135deg, rgba(255, 224, 142, 0.9), rgba(183, 124, 46, 0.72));
  box-shadow: 0 0 8px rgba(255, 205, 120, 0.24);
  animation-name: leafWind;
}

body.home-night .petal-field i {
  background:
    radial-gradient(circle at 72% 40%, rgba(255, 255, 255, 0.58), transparent 24%),
    linear-gradient(135deg, rgba(214, 230, 255, 0.62), rgba(144, 180, 238, 0.42));
  box-shadow: 0 0 10px rgba(164, 210, 255, 0.24);
}

body.home-night .leaf-field i {
  background:
    linear-gradient(135deg, rgba(184, 198, 202, 0.64), rgba(82, 116, 134, 0.52));
}

.petal-field i:nth-child(1) { --x: 8%; --size: 18px; --delay: -1s; --duration: 15s; --rotate: 16deg; }
.petal-field i:nth-child(2) { --x: 17%; --size: 12px; --delay: -9s; --duration: 19s; --rotate: -28deg; }
.petal-field i:nth-child(3) { --x: 28%; --size: 15px; --delay: -5s; --duration: 17s; --rotate: 44deg; }
.petal-field i:nth-child(4) { --x: 38%; --size: 10px; --delay: -12s; --duration: 21s; --rotate: -12deg; }
.petal-field i:nth-child(5) { --x: 49%; --size: 16px; --delay: -3s; --duration: 18s; --rotate: 70deg; }
.petal-field i:nth-child(6) { --x: 58%; --size: 11px; --delay: -15s; --duration: 22s; --rotate: -46deg; }
.petal-field i:nth-child(7) { --x: 67%; --size: 14px; --delay: -7s; --duration: 16s; --rotate: 24deg; }
.petal-field i:nth-child(8) { --x: 79%; --size: 18px; --delay: -18s; --duration: 24s; --rotate: -60deg; }
.petal-field i:nth-child(9) { --x: 88%; --size: 13px; --delay: -4s; --duration: 20s; --rotate: 34deg; }
.petal-field i:nth-child(10) { --x: 95%; --size: 10px; --delay: -13s; --duration: 18s; --rotate: -38deg; }
.petal-field i:nth-child(11) { --x: 23%; --size: 17px; --delay: -20s; --duration: 25s; --rotate: 12deg; }
.petal-field i:nth-child(12) { --x: 73%; --size: 12px; --delay: -11s; --duration: 19s; --rotate: -18deg; }
.petal-field i:nth-child(13) { --x: 43%; --size: 13px; --delay: -16s; --duration: 23s; --rotate: 52deg; }
.petal-field i:nth-child(14) { --x: 4%; --size: 11px; --delay: -6s; --duration: 17s; --rotate: -24deg; }

.leaf-field i:nth-child(1) { --x: 3%; --size: 20px; --delay: -2s; --duration: 18s; --rotate: -18deg; }
.leaf-field i:nth-child(2) { --x: 13%; --size: 15px; --delay: -10s; --duration: 23s; --rotate: 32deg; }
.leaf-field i:nth-child(3) { --x: 31%; --size: 18px; --delay: -5s; --duration: 20s; --rotate: -42deg; }
.leaf-field i:nth-child(4) { --x: 46%; --size: 14px; --delay: -14s; --duration: 25s; --rotate: 20deg; }
.leaf-field i:nth-child(5) { --x: 61%; --size: 19px; --delay: -8s; --duration: 22s; --rotate: -8deg; }
.leaf-field i:nth-child(6) { --x: 77%; --size: 16px; --delay: -18s; --duration: 27s; --rotate: 48deg; }
.leaf-field i:nth-child(7) { --x: 91%; --size: 22px; --delay: -4s; --duration: 24s; --rotate: -32deg; }
.leaf-field i:nth-child(8) { --x: 54%; --size: 13px; --delay: -21s; --duration: 28s; --rotate: 12deg; }

.glass-panel,
.glass-nav {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.008)),
    var(--glass);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.44),
    inset 0 -1px 0 rgba(255, 255, 255, 0.1),
    inset 0 0 42px rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(36px) saturate(190%) contrast(112%);
  -webkit-backdrop-filter: blur(36px) saturate(190%) contrast(112%);
  isolation: isolate;
}

.glass-panel::before,
.glass-nav::before {
  position: absolute;
  inset: -55%;
  z-index: -1;
  content: "";
  opacity: 0.14;
  background:
    linear-gradient(122deg, transparent 9%, rgba(255, 255, 255, 0.36) 17%, transparent 28%),
    linear-gradient(286deg, transparent 20%, rgba(156, 234, 255, 0.2) 38%, transparent 60%),
    linear-gradient(24deg, transparent 34%, rgba(255, 255, 255, 0.14) 52%, transparent 74%);
  filter: url("#liquid-warp") blur(0.5px);
  transform: rotate(-8deg);
  animation: sheen 9s ease-in-out infinite alternate;
}

.glass-panel::after,
.glass-nav::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  border-radius: inherit;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.52),
    inset 0 -1px 0 rgba(255, 255, 255, 0.1),
    inset 0 0 36px rgba(255, 255, 255, 0.018);
}

.site-nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  width: 100%;
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 54px);
  border-top: 0;
  border-right: 0;
  border-left: 0;
  border-bottom-color: rgba(255, 255, 255, 0.18);
  border-radius: 0 0 8px 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.026)),
    rgba(255, 255, 255, 0.018);
  box-shadow:
    0 18px 62px rgba(47, 80, 92, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.52),
    inset 0 -1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(36px) saturate(180%) contrast(108%);
  -webkit-backdrop-filter: blur(36px) saturate(180%) contrast(108%);
}

.home-nav-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.home-nav {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 6px;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.012);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 12px 32px rgba(47, 80, 92, 0.08);
}

.home-nav a {
  display: grid;
  min-width: 54px;
  height: 32px;
  padding: 0 12px;
  place-items: center;
  color: rgba(248, 251, 255, 0.92);
  border-radius: 7px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.home-nav a:hover {
  color: #061014;
  background: rgba(255, 255, 255, 0.72);
  transform: translateY(-1px);
}

.theme-toggle {
  position: relative;
  display: inline-grid;
  width: 66px;
  height: 44px;
  padding: 0;
  place-items: center;
  color: rgba(248, 251, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.024)),
    rgba(255, 255, 255, 0.012);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 18px 46px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.theme-toggle:hover {
  border-color: rgba(255, 255, 255, 0.42);
  transform: translateY(-1px);
}

.theme-toggle::before {
  position: absolute;
  left: 8px;
  width: 28px;
  height: 28px;
  content: "";
  border-radius: 7px;
  background:
    radial-gradient(circle at 42% 38%, #fff7ba 0 28%, #ffe1a4 29% 54%, rgba(255, 225, 164, 0.34) 55% 100%);
  box-shadow:
    0 0 18px rgba(255, 225, 164, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: left 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.toggle-sun,
.toggle-moon {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  pointer-events: none;
}

.toggle-sun {
  left: 15px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
  opacity: 0.48;
}

.toggle-moon {
  right: 15px;
  border: 2px solid rgba(248, 251, 255, 0.78);
  border-left-color: transparent;
  opacity: 0.76;
}

body.home-night .theme-toggle::before {
  left: 29px;
  background:
    radial-gradient(circle at 62% 34%, rgba(255, 255, 255, 0.92) 0 18%, transparent 19%),
    radial-gradient(circle at 45% 48%, #d9efff 0 44%, rgba(156, 234, 255, 0.42) 45% 100%);
  box-shadow:
    0 0 18px rgba(156, 234, 255, 0.44),
    inset 0 1px 0 rgba(255, 255, 255, 0.66);
}

.brand-lockup {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.mini-mark {
  display: grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  color: #071319;
  background: linear-gradient(135deg, rgba(169, 255, 212, 0.92), rgba(156, 234, 255, 0.72) 52%, rgba(255, 225, 164, 0.86));
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 14px 34px rgba(16, 62, 73, 0.16);
}

.brand-title {
  min-width: 0;
}

.brand-title strong,
.user-chip strong {
  display: block;
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-title span,
.user-chip span {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.glass-button,
.icon-button {
  display: inline-grid;
  min-width: 42px;
  height: 42px;
  padding: 0 15px;
  place-items: center;
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.008)),
    rgba(255, 255, 255, 0.008);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    0 12px 32px rgba(0, 0, 0, 0.08);
  text-decoration: none;
  backdrop-filter: blur(20px) saturate(170%);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.glass-button:hover,
.icon-button:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.018);
  transform: translateY(-1px);
}

.home-login {
  min-width: 82px;
  height: 44px;
  padding: 0 18px;
  color: rgba(248, 251, 255, 0.94);
  border-color: rgba(255, 255, 255, 0.28);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.028)),
    rgba(3, 12, 14, 0.08);
  font-weight: 800;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 18px 46px rgba(0, 0, 0, 0.12);
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 30;
  min-height: 100vh;
  min-height: 100svh;
  padding: 22px;
  place-items: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.08), transparent 34%),
    rgba(2, 8, 10, 0.16);
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  animation: modalFade 180ms ease both;
}

.login-screen:target {
  display: grid;
}

.login-card {
  width: min(420px, calc(100vw - 34px));
  padding: 58px 26px 28px;
  animation: modalRise 220ms ease both;
}

.modal-back {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: rgba(248, 251, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.01)),
    rgba(255, 255, 255, 0.01);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 10px 28px rgba(0, 0, 0, 0.08);
  text-decoration: none;
  backdrop-filter: blur(18px) saturate(170%);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.modal-back:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.025);
  transform: translateY(-1px);
}

.login-form,
.admin-form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: rgba(248, 251, 255, 0.78);
  font-size: 13px;
}

.field input,
.field select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  outline: none;
  background: var(--field);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(248, 251, 255, 0.72) 50%),
    linear-gradient(135deg, rgba(248, 251, 255, 0.72) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 20px,
    calc(100% - 12px) 20px;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}

.field input:focus,
.field select:focus {
  border-color: rgba(156, 234, 255, 0.78);
  background-color: rgba(4, 13, 17, 0.32);
  box-shadow:
    0 0 0 4px rgba(156, 234, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.primary-action {
  height: 48px;
  border: 0;
  border-radius: 8px;
  color: #061014;
  font-weight: 900;
  background: linear-gradient(135deg, var(--mint), var(--cyan) 54%, var(--gold));
  box-shadow: 0 18px 42px rgba(156, 234, 255, 0.22);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.primary-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 52px rgba(156, 234, 255, 0.28);
}

.primary-action:disabled,
.icon-button:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.message {
  min-height: 20px;
  color: rgba(248, 251, 255, 0.72);
  font-size: 13px;
}

.message.is-error {
  color: #ffd1c9;
}

.message.is-success {
  color: #b9ffd8;
}

.dashboard-screen {
  align-content: start;
  gap: 18px;
}

.dashboard-top {
  display: grid;
  grid-template-columns: auto minmax(160px, 360px) auto;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding: 12px 14px;
}

.search {
  display: flex;
  align-items: center;
  height: 42px;
  padding: 0 12px;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.search svg {
  flex: 0 0 auto;
  opacity: 0.72;
}

.search input {
  width: 100%;
  min-width: 0;
  color: var(--ink);
  border: 0;
  outline: 0;
  background: transparent;
}

.account {
  display: flex;
  align-items: center;
  justify-content: end;
  min-width: 0;
  gap: 10px;
}

.user-chip {
  min-width: 0;
  text-align: right;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 18px;
  min-height: calc(100vh - 166px);
}

.news-column,
.stage {
  min-height: 520px;
  padding: 18px;
}

.panel-head,
.stage-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.panel-head {
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.panel-head h2,
.stage-title h2 {
  margin: 0;
}

.panel-head h2 {
  font-size: 17px;
}

.stage-title h2 {
  font-size: 24px;
}

.stage-title span {
  color: var(--muted);
  font-size: 13px;
}

.count-badge,
.role-badge {
  min-width: 34px;
  padding: 5px 9px;
  color: #071318;
  text-align: center;
  border-radius: 8px;
  background: rgba(169, 255, 212, 0.86);
  font-size: 12px;
  font-weight: 800;
}

.role-badge {
  min-width: 58px;
  color: rgba(248, 251, 255, 0.88);
  background: rgba(255, 255, 255, 0.12);
}

.role-badge.is-admin {
  color: #061014;
  background: rgba(156, 234, 255, 0.84);
}

.empty-news {
  display: grid;
  min-height: 420px;
  place-items: center;
  align-content: center;
  text-align: center;
}

.empty-ring {
  display: grid;
  width: 88px;
  height: 88px;
  margin: 0 auto 18px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 20px 44px rgba(0, 0, 0, 0.24);
}

.empty-news strong {
  display: block;
  font-size: 16px;
}

.empty-news span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
}

.stage {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 18px;
}

.admin-panel {
  display: none;
  gap: 18px;
  grid-template-columns: minmax(240px, 320px) 1fr;
}

.admin-panel.is-visible {
  display: grid;
}

.admin-box {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.admin-box h3 {
  margin: 0 0 14px;
  font-size: 15px;
}

.user-list {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(5, 12, 16, 0.2);
}

.user-row strong,
.user-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-row strong {
  font-size: 14px;
}

.user-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.blank-field {
  min-height: 100%;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018));
}

@keyframes skyLuminance {
  from {
    opacity: 0.56;
  }
  to {
    opacity: 0.82;
  }
}

@keyframes cloudDriftA {
  from {
    transform: translate3d(-18vw, 0, 0);
  }
  to {
    transform: translate3d(118vw, 2vh, 0);
  }
}

@keyframes cloudDriftB {
  from {
    transform: translate3d(18vw, 0, 0);
  }
  to {
    transform: translate3d(-118vw, -2vh, 0);
  }
}

@keyframes cloudDriftC {
  from {
    transform: translate3d(-60vw, 0, 0);
  }
  to {
    transform: translate3d(82vw, 1vh, 0);
  }
}

@keyframes petalFall {
  0% {
    opacity: 0;
    transform: translate3d(0, -12vh, 0) rotate(var(--rotate));
  }
  8% {
    opacity: 0.82;
  }
  46% {
    transform: translate3d(8vw, 48vh, 0) rotate(calc(var(--rotate) + 190deg));
  }
  100% {
    opacity: 0;
    transform: translate3d(-4vw, 112vh, 0) rotate(calc(var(--rotate) + 520deg));
  }
}

@keyframes leafWind {
  0% {
    opacity: 0;
    transform: translate3d(0, -10vh, 0) rotate(var(--rotate));
  }
  10% {
    opacity: 0.72;
  }
  50% {
    transform: translate3d(-10vw, 52vh, 0) rotate(calc(var(--rotate) - 220deg));
  }
  100% {
    opacity: 0;
    transform: translate3d(12vw, 112vh, 0) rotate(calc(var(--rotate) + 420deg));
  }
}

@keyframes drift {
  from {
    transform: translate3d(-2%, -1%, 0) rotate(0deg);
  }
  to {
    transform: translate3d(2%, 1%, 0) rotate(3deg);
  }
}

@keyframes sheen {
  from {
    transform: translate3d(-3%, -1%, 0) rotate(-8deg);
  }
  to {
    transform: translate3d(3%, 2%, 0) rotate(7deg);
  }
}

@keyframes modalFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalRise {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 980px) {
  .admin-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 840px) {
  .app {
    padding: 16px;
  }

  body.home-mode .app {
    padding: 0;
  }

  .screen {
    min-height: calc(100vh - 32px);
  }

  .home-screen {
    min-height: 560px;
    background-position: 56% center;
  }

  .site-nav {
    min-height: 68px;
    padding: 12px 18px;
  }

  .home-nav-group {
    gap: 10px;
  }

  .home-nav a {
    min-width: 50px;
    padding: 0 10px;
  }

  .dashboard-top {
    grid-template-columns: 1fr auto;
  }

  .search {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .news-column,
  .stage {
    min-height: 360px;
  }
}

@media (max-width: 520px) {
  .home-screen {
    min-height: 520px;
  }

  .site-nav {
    padding: 10px 12px;
  }

  .site-nav-space {
    display: none;
  }

  .home-nav-group {
    width: 100%;
    gap: 7px;
  }

  .home-nav {
    height: 40px;
    padding: 0 4px;
    gap: 2px;
  }

  .home-nav a {
    min-width: 42px;
    height: 30px;
    padding: 0 7px;
    font-size: 12px;
  }

  .home-login {
    min-width: 62px;
    height: 40px;
    padding: 0 12px;
  }

  .theme-toggle {
    width: 54px;
    height: 40px;
  }

  .theme-toggle::before {
    left: 7px;
    width: 24px;
    height: 24px;
  }

  body.home-night .theme-toggle::before {
    left: 23px;
  }

  .user-chip {
    display: none;
  }

  .stage-title {
    align-items: start;
    flex-direction: column;
  }
}
