:root {
  --bg: #f5faf8;
  --panel: #ffffff;
  --ink: #15181e;
  --muted: #69707d;
  --line: #dce8e4;
  --accent: #0f7b6c;
  --accent-dark: #075d52;
  --accent-soft: #e6f5f1;
  --warm: #fff8df;
  --gold-soft: #fff3bd;
  --sunny: #ffd46b;
  --danger: #b85b35;
  --danger-dark: #914426;
  --nav: #eaf8f1;
  --nav-soft: #d8f0e7;
  --nav-panel: #f7fcfa;
  --nav-hover: rgba(15, 123, 108, 0.1);
  --nav-active: #0f7b6c;
  --nav-active-2: #22a894;
  --nav-orange: #f17b3a;
  --green-glow: rgba(15, 123, 108, 0.18);
  --gold-glow: rgba(241, 123, 58, 0.24);
  --ai-cyan: #21d4fd;
  --ai-cyan-soft: rgba(33, 212, 253, 0.18);
  --ai-violet: #8b5cf6;
  --ai-ink: #08121c;
  --ai-panel: rgba(9, 22, 34, 0.82);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(33, 212, 253, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(15, 123, 108, 0.05) 1px, transparent 1px),
    linear-gradient(135deg, rgba(33, 212, 253, 0.08), transparent 28%, rgba(241, 123, 58, 0.05) 72%, transparent),
    var(--bg);
  background-size: 28px 28px;
  color: var(--ink);
  font-family: Arial, "Microsoft YaHei", sans-serif;
}

button, input, textarea, select { font: inherit; }
button {
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
button:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(15, 123, 108, 0.18);
}
button:active {
  transform: translateY(0) scale(0.98);
}
button.secondary {
  color: var(--ink);
  background: #eef2f5;
}
button.secondary:hover { background: #dde5ec; }
button.danger {
  color: #fff;
  background: var(--danger);
}
button.danger:hover {
  background: var(--danger-dark);
  box-shadow: 0 10px 22px rgba(184, 91, 53, 0.2);
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
  box-shadow: none;
}
input, select, textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
input:hover, select:hover, textarea:hover {
  border-color: rgba(15, 123, 108, 0.35);
}
.hidden { display: none !important; }

.global-controls {
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: 500;
  display: flex;
  gap: 8px;
}
.control-pill {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(33, 212, 253, 0.26);
  border-radius: 999px;
  color: #e8fcff;
  background: rgba(7, 18, 28, 0.66);
  box-shadow: 0 14px 34px rgba(2, 9, 15, 0.22), inset 0 0 16px rgba(33, 212, 253, 0.08);
  backdrop-filter: blur(14px);
  font-size: 14px;
  font-weight: 900;
}
.control-pill:hover {
  color: #06111c;
  background: linear-gradient(135deg, #21d4fd, #9dffb3);
  box-shadow: 0 16px 38px rgba(33, 212, 253, 0.24);
}

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(33, 212, 253, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(33, 212, 253, 0.06) 1px, transparent 1px),
    linear-gradient(115deg, rgba(33, 212, 253, 0.2), transparent 24%),
    linear-gradient(250deg, rgba(241, 123, 58, 0.16), transparent 28%),
    linear-gradient(135deg, #050b12 0%, #0a1c27 42%, #092f35 100%);
  background-size: 46px 46px, 46px 46px, auto, auto, auto;
}
.login-view::before,
.login-view::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 0;
}
.login-view::before {
  inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 8px),
    linear-gradient(100deg, transparent 0 38%, rgba(33, 212, 253, 0.12) 44%, transparent 52% 100%);
  mix-blend-mode: screen;
  animation: scanBeam 7s linear infinite;
}
.login-view::after {
  width: min(620px, 70vw);
  height: min(620px, 70vw);
  right: -180px;
  top: -160px;
  border: 1px solid rgba(33, 212, 253, 0.18);
  background:
    linear-gradient(90deg, rgba(33, 212, 253, 0.12) 1px, transparent 1px),
    linear-gradient(rgba(33, 212, 253, 0.12) 1px, transparent 1px);
  background-size: 34px 34px;
  transform: rotate(12deg);
  opacity: 0.5;
}
.login-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.login-backdrop span {
  position: absolute;
  padding: 10px 14px;
  border: 1px solid rgba(33, 212, 253, 0.34);
  border-radius: 8px;
  color: rgba(232, 252, 255, 0.86);
  background: rgba(7, 18, 28, 0.48);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 50px rgba(3, 12, 20, 0.28), inset 0 0 18px rgba(33, 212, 253, 0.08);
  animation: floatCard 6.8s ease-in-out infinite;
}
.login-backdrop span:nth-child(1) { left: 10%; top: 18%; }
.login-backdrop span:nth-child(2) { right: 13%; top: 26%; animation-delay: 0.8s; }
.login-backdrop span:nth-child(3) { right: 16%; bottom: 17%; animation-delay: 1.5s; }
.login-vfx {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.vfx-orbit {
  position: absolute;
  left: 8%;
  bottom: 12%;
  width: 280px;
  height: 280px;
  border: 1px solid rgba(33, 212, 253, 0.18);
  border-radius: 999px;
  animation: orbitSpin 18s linear infinite;
}
.vfx-orbit::before,
.vfx-orbit::after {
  content: "";
  position: absolute;
  inset: 42px;
  border: 1px dashed rgba(33, 212, 253, 0.18);
  border-radius: 999px;
}
.vfx-orbit::after {
  inset: 88px;
  border-color: rgba(241, 123, 58, 0.2);
  animation: orbitSpin 12s linear infinite reverse;
}
.vfx-orbit i {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #21d4fd;
  box-shadow: 0 0 18px rgba(33, 212, 253, 0.75);
}
.vfx-orbit i:nth-child(1) { left: 50%; top: -5px; }
.vfx-orbit i:nth-child(2) { right: 14%; top: 18%; background: #9dffb3; }
.vfx-orbit i:nth-child(3) { right: 24%; bottom: 4%; background: #f17b3a; }
.vfx-orbit i:nth-child(4) { left: 8%; bottom: 28%; }
.vfx-timeline {
  position: absolute;
  left: 50%;
  bottom: 9%;
  display: grid;
  grid-template-columns: repeat(5, 76px);
  gap: 12px;
  transform: translateX(-50%);
  opacity: 0.72;
}
.vfx-timeline span {
  position: relative;
  height: 54px;
  border: 1px solid rgba(33, 212, 253, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(33, 212, 253, 0.2), rgba(93, 95, 239, 0.12)),
    rgba(255, 255, 255, 0.055);
  overflow: hidden;
  animation: framePulse 2.8s ease-in-out infinite;
}
.vfx-timeline span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: translateX(-120%);
  animation: frameSweep 2.8s ease-in-out infinite;
}
.vfx-timeline span:nth-child(2) { animation-delay: 0.2s; }
.vfx-timeline span:nth-child(3) { animation-delay: 0.4s; }
.vfx-timeline span:nth-child(4) { animation-delay: 0.6s; }
.vfx-timeline span:nth-child(5) { animation-delay: 0.8s; }
.vfx-nodes {
  position: absolute;
  right: 8%;
  top: 12%;
  width: 320px;
  height: 320px;
  opacity: 0.78;
  background:
    linear-gradient(28deg, transparent 0 46%, rgba(33, 212, 253, 0.26) 47% 48%, transparent 49%),
    linear-gradient(136deg, transparent 0 42%, rgba(33, 212, 253, 0.2) 43% 44%, transparent 45%),
    linear-gradient(84deg, transparent 0 53%, rgba(241, 123, 58, 0.18) 54% 55%, transparent 56%);
  animation: nodeFloat 7s ease-in-out infinite;
}
.vfx-nodes i {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: rgba(33, 212, 253, 0.9);
  box-shadow: 0 0 24px rgba(33, 212, 253, 0.72);
  animation: nodePulse 2.2s ease-in-out infinite;
}
.vfx-nodes i:nth-child(1) { left: 12%; top: 18%; }
.vfx-nodes i:nth-child(2) { left: 48%; top: 8%; animation-delay: 0.25s; }
.vfx-nodes i:nth-child(3) { right: 12%; top: 42%; animation-delay: 0.5s; background: rgba(157, 255, 179, 0.9); }
.vfx-nodes i:nth-child(4) { left: 28%; bottom: 16%; animation-delay: 0.75s; }
.vfx-nodes i:nth-child(5) { right: 32%; bottom: 30%; animation-delay: 1s; background: rgba(241, 123, 58, 0.9); }
.vfx-render-card {
  position: absolute;
  right: 9%;
  bottom: 18%;
  width: min(280px, 36vw);
  padding: 14px;
  border: 1px solid rgba(33, 212, 253, 0.24);
  border-radius: 10px;
  color: rgba(232, 252, 255, 0.88);
  background: rgba(7, 18, 28, 0.58);
  box-shadow: 0 24px 70px rgba(2, 9, 15, 0.24), inset 0 0 22px rgba(33, 212, 253, 0.08);
  backdrop-filter: blur(14px);
  animation: floatCard 7.4s ease-in-out infinite 0.35s;
}
.vfx-render-card strong,
.vfx-render-card span {
  display: block;
}
.vfx-render-card strong {
  margin-bottom: 6px;
  color: #ffffff;
}
.vfx-render-card span {
  color: rgba(220, 247, 255, 0.62);
  font-size: 12px;
}
.vfx-render-card em {
  position: relative;
  display: block;
  height: 7px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
}
.vfx-render-card em::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, #21d4fd, #9dffb3, #f17b3a);
  animation: renderProgress 2.6s ease-in-out infinite;
}
.login-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  padding: 30px;
  border: 1px solid rgba(33, 212, 253, 0.34);
  border-radius: 18px;
  color: #f5fbff;
  background:
    linear-gradient(135deg, rgba(10, 24, 37, 0.92), rgba(7, 19, 30, 0.78)),
    rgba(7, 18, 28, 0.86);
  box-shadow: 0 24px 80px rgba(2, 9, 15, 0.42), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  backdrop-filter: blur(18px);
  animation: cardIn 0.5s ease both;
}
.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(33, 212, 253, 0.32), transparent) top left / 100% 1px no-repeat,
    linear-gradient(180deg, transparent, rgba(241, 123, 58, 0.26), transparent) top right / 1px 100% no-repeat;
}
.login-mark, .brand-mark {
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #fff;
}
.login-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.login-mark {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  padding: 7px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 28px rgba(33, 212, 253, 0.22), 0 0 0 1px rgba(33, 212, 253, 0.22);
}
.login-mark img,
.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.df-glyph {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  color: #fffdf8;
  background:
    linear-gradient(135deg, #07111d 0%, #0b5864 52%, #21d4fd 100%),
    #0b5864;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.45);
}
.login-mark .df-glyph {
  font-size: 24px;
}
.brand-mark .df-glyph {
  font-size: 22px;
}
.login-card h1 { margin: 0 0 6px; color: #ffffff; }
.login-card p { margin: 0; color: rgba(220, 247, 255, 0.72); }
.login-note {
  margin: 0 0 22px;
  padding: 12px 14px;
  border: 1px solid rgba(33, 212, 253, 0.18);
  border-radius: 12px;
  color: rgba(227, 250, 255, 0.82);
  background: rgba(33, 212, 253, 0.08);
  line-height: 1.5;
}
.login-card label { display: grid; gap: 8px; margin-bottom: 14px; color: rgba(227, 250, 255, 0.78); }
.login-card input {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(33, 212, 253, 0.22);
}
.login-card input::placeholder { color: rgba(227, 250, 255, 0.46); }
.login-card input:focus,
.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus,
textarea:focus {
  outline: none;
  border-color: rgba(15, 123, 108, 0.72);
  box-shadow: 0 0 0 3px rgba(15, 123, 108, 0.12);
}
.login-card button {
  width: 100%;
  margin-top: 8px;
  border-radius: 12px;
  background: linear-gradient(135deg, #21d4fd, #0f7b6c 58%, #f17b3a);
  box-shadow: 0 14px 34px rgba(33, 212, 253, 0.2);
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px 1fr;
  transition: grid-template-columns 0.22s ease;
}
.shell.sidebar-collapsed {
  grid-template-columns: 84px 1fr;
}
.sidebar {
  min-height: 100vh;
  max-height: 100vh;
  padding: 24px 18px;
  background:
    linear-gradient(90deg, rgba(33, 212, 253, 0.07) 1px, transparent 1px),
    linear-gradient(rgba(33, 212, 253, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, #07121d 0%, #0b2530 52%, #092f35 100%);
  background-size: 26px 26px, 26px 26px, auto;
  color: rgba(232, 252, 255, 0.88);
  position: sticky;
  top: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(33, 212, 253, 0.12), transparent 22%, rgba(241, 123, 58, 0.08));
}
.sidebar > * {
  position: relative;
  z-index: 1;
}
.brand {
  position: relative;
  display: grid;
  gap: 10px;
  margin-bottom: 28px;
  padding: 10px;
  border: 1px solid rgba(33, 212, 253, 0.24);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 14px 34px rgba(2, 10, 16, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}
.brand::after {
  content: "✦";
  position: absolute;
  left: 32px;
  top: -9px;
  color: var(--ai-cyan);
  font-size: 14px;
  filter: drop-shadow(0 0 8px rgba(33, 212, 253, 0.6));
  animation: twinkle 1.9s ease-in-out infinite;
}
.brand-mark {
  width: 68px;
  height: 68px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 24px rgba(33, 212, 253, 0.16), 0 0 0 1px rgba(33, 212, 253, 0.2);
  animation: brandPop 3.2s ease-in-out infinite;
}
.brand strong, .brand small { display: block; }
.brand small { color: rgba(220, 247, 255, 0.66); margin-top: 4px; }
.brand-logo-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}
.brand-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding-top: 8px;
  border-top: 1px solid rgba(33, 212, 253, 0.16);
}
.brand-text {
  min-width: 0;
  overflow: hidden;
  flex: 1;
}
.brand-text strong,
.brand-text small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.brand-title {
  min-width: 0;
  color: #ffffff;
  font-size: 19px;
  font-weight: 900;
  white-space: nowrap;
}
.sidebar-logout {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(241, 123, 58, 0.5);
  border-radius: 12px;
  color: #fff7f0;
  background: linear-gradient(135deg, rgba(241, 123, 58, 0.92), rgba(191, 69, 50, 0.9));
  box-shadow: 0 10px 22px rgba(241, 123, 58, 0.18);
}
.sidebar-logout:hover {
  color: #ffffff;
  background: linear-gradient(135deg, var(--nav-active), var(--nav-active-2));
  box-shadow: 0 14px 26px rgba(25, 167, 143, 0.28);
}
.collapse-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 10px;
  color: rgba(232, 252, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(33, 212, 253, 0.18);
}
.nav-groups {
  display: grid;
  gap: 8px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 18px;
  scrollbar-width: thin;
  scrollbar-color: rgba(33, 212, 253, 0.28) transparent;
}
.nav-groups::-webkit-scrollbar { width: 6px; }
.nav-groups::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(33, 212, 253, 0.28);
}
.sidebar-footer {
  position: sticky;
  bottom: 0;
  margin-top: 6px;
  padding: 4px 0 0;
  background: linear-gradient(180deg, rgba(7, 18, 29, 0), #07121d 42%);
}
.sidebar-logout {
  width: 100%;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 800;
}
.logout-icon {
  line-height: 1;
  font-size: 14px;
}
.nav-section {
  display: grid;
  gap: 4px;
}
.nav-groups > .nav-section + .nav-section {
  padding-top: 8px;
  border-top: 1px solid rgba(33, 212, 253, 0.1);
}
.nav-subsection {
  margin-left: 0;
  padding-left: 0;
  border-left: 0;
}
.nav-toggle,
.nav {
  position: relative;
  width: 100%;
  min-height: 42px;
  color: rgba(220, 247, 255, 0.76);
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  overflow: hidden;
}
.nav-toggle {
  justify-content: space-between;
  padding: 9px 10px;
  font-weight: 800;
}
.nav-toggle:hover,
.nav-toggle:focus-visible,
.nav:hover,
.nav.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(33, 212, 253, 0.16), rgba(255, 255, 255, 0.08));
  box-shadow: inset 3px 0 0 var(--ai-cyan), 0 10px 26px rgba(2, 10, 16, 0.12);
}
.nav-toggle:hover .nav-icon,
.nav.active .nav-dot,
.nav.active .nav-leaf {
  transform: scale(1.12);
  background: var(--ai-cyan);
}
.nav::after,
.nav-toggle::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: translateX(-120%);
  transition: transform 0.48s ease;
}
.nav:hover::after,
.nav-toggle:hover::after {
  transform: translateX(120%);
}
.nav-toggle-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.nav-caret {
  color: rgba(220, 247, 255, 0.6);
  transition: transform 0.18s ease;
}
.nav-section.open > .nav-toggle .nav-caret {
  transform: rotate(180deg);
}
.nav-children {
  display: none;
  gap: 4px;
}
.nav-section.open > .nav-children {
  display: grid;
  animation: menuIn 0.2s ease both;
}
.nav {
  padding-left: 18px;
}
.nav-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex: 0 0 26px;
  color: #06111c;
  background: linear-gradient(135deg, var(--ai-cyan), #7cf4ff);
  font-family: "Segoe UI Symbol", Arial, sans-serif;
  font-size: 13px;
  font-weight: 800;
  transition: transform 0.18s ease, background 0.18s ease;
}
.nav-dot,
.nav-leaf {
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(33, 212, 253, 0.52);
  transition: transform 0.18s ease, background 0.18s ease;
}
.nav-dot {
  width: 7px;
  height: 7px;
  margin-left: 9px;
}
.nav-leaf {
  width: 5px;
  height: 5px;
  margin-left: 22px;
}
.nav-depth-3 {
  min-height: 34px;
  color: rgba(220, 247, 255, 0.68);
  font-size: 14px;
}
.nav-depth-3.active {
  color: #ffffff;
}
.nav-text {
  min-width: 0;
  white-space: nowrap;
}
.sidebar.collapsed {
  padding-inline: 14px;
}
.sidebar.collapsed .brand {
  justify-content: center;
  padding: 10px 8px;
}
.sidebar.collapsed .brand-text,
.sidebar.collapsed .brand-title,
.sidebar.collapsed .nav-caret,
.sidebar.collapsed .nav-dot,
.sidebar.collapsed .nav-leaf,
.sidebar.collapsed .nav-text,
.sidebar.collapsed .logout-text {
  display: none;
}
.sidebar.collapsed .brand-logo-row,
.sidebar.collapsed .brand-user-row {
  justify-content: center;
}
.sidebar.collapsed .brand-user-row {
  border-top: 0;
  padding-top: 0;
}
.sidebar.collapsed .sidebar-footer {
  padding-top: 4px;
}
.sidebar.collapsed .sidebar-logout {
  width: 34px;
  margin-inline: auto;
  padding: 0;
}
.sidebar.collapsed .collapse-btn {
  position: static;
}
.sidebar.collapsed .nav-toggle,
.sidebar.collapsed .nav {
  justify-content: center;
  padding-inline: 8px;
}
.sidebar.collapsed .nav-subsection {
  margin-left: 0;
  padding-left: 0;
  border-left: 0;
}

.app {
  position: relative;
  min-width: 0;
  padding: 28px;
  background:
    linear-gradient(90deg, rgba(33, 212, 253, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(15, 123, 108, 0.04) 1px, transparent 1px),
    linear-gradient(135deg, rgba(33, 212, 253, 0.08), transparent 34%, rgba(241, 123, 58, 0.05));
  background-size: 32px 32px, 32px 32px, auto;
}
.app::before {
  content: "";
  position: fixed;
  inset: 0 0 0 248px;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 0 54%, rgba(33, 212, 253, 0.08) 58%, transparent 64% 100%);
  opacity: 0.55;
  animation: scanBeam 9s linear infinite;
}
.shell.sidebar-collapsed .app::before {
  inset: 0 0 0 84px;
}
.hint { margin: 0; color: var(--muted); }
.view { display: none; }
.view.active {
  position: relative;
  z-index: 1;
  display: block;
  animation: fadeUp 0.28s ease both;
}

.dashboard-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 22px;
  border: 1px solid rgba(33, 212, 253, 0.24);
  border-radius: 14px;
  color: #f8fdff;
  background:
    linear-gradient(90deg, rgba(33, 212, 253, 0.12) 1px, transparent 1px),
    linear-gradient(rgba(33, 212, 253, 0.08) 1px, transparent 1px),
    linear-gradient(135deg, #08121c 0%, #0b2935 58%, #12342f 100%);
  background-size: 30px 30px, 30px 30px, auto;
  box-shadow: 0 18px 44px rgba(4, 15, 24, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.dashboard-hero::after {
  content: "";
  position: absolute;
  right: -46px;
  top: -62px;
  width: 260px;
  height: 260px;
  background:
    linear-gradient(90deg, rgba(33, 212, 253, 0.2) 1px, transparent 1px),
    linear-gradient(rgba(33, 212, 253, 0.16) 1px, transparent 1px);
  background-size: 20px 20px;
  transform: rotate(12deg);
  opacity: 0.5;
}
.dashboard-hero h2 {
  margin: 8px 0 8px;
  font-size: 24px;
}
.dashboard-hero p {
  max-width: 680px;
  margin: 0;
  color: rgba(220, 247, 255, 0.74);
  line-height: 1.6;
}
.hero-kicker {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  color: #bff7ff;
  background: rgba(33, 212, 253, 0.12);
  border: 1px solid rgba(33, 212, 253, 0.22);
  font-size: 13px;
  font-weight: 800;
}
.hero-chips {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.hero-chips span {
  padding: 9px 12px;
  border-radius: 8px;
  color: rgba(232, 252, 255, 0.86);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(33, 212, 253, 0.18);
  box-shadow: 0 10px 24px rgba(3, 12, 20, 0.16);
}

.video-workbench {
  color: #f6fbff;
}
.workbench-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(93, 95, 239, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(33, 212, 253, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(33, 212, 253, 0.05) 1px, transparent 1px),
    linear-gradient(135deg, rgba(18, 17, 40, 0.96), rgba(10, 9, 26, 0.96));
  background-size: 28px 28px, 28px 28px, auto;
  box-shadow: 0 18px 44px rgba(2, 6, 18, 0.16);
}
.workbench-topbar h2 {
  margin: 8px 0 6px;
  color: #ffffff;
  font-size: 30px;
}
.workbench-topbar p {
  margin: 0;
  color: rgba(226, 244, 255, 0.66);
}
.workbench-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.video-studio-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(420px, 1.35fr) minmax(280px, 0.8fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}
.generator-panel,
.preview-stage,
.rail-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(93, 95, 239, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(33, 212, 253, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(33, 212, 253, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(18, 17, 40, 0.95), rgba(10, 9, 26, 0.96));
  background-size: 28px 28px, 28px 28px, auto;
  box-shadow: 0 22px 56px rgba(2, 6, 18, 0.24);
}
.generator-panel,
.preview-stage {
  min-height: 520px;
  padding: 20px;
}
.studio-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.studio-panel-head span,
.rail-card h3 {
  color: rgba(178, 190, 255, 0.76);
  font-size: 13px;
  font-weight: 800;
}
.studio-panel-head h3,
.rail-card h3 {
  margin: 5px 0 0;
  color: #ffffff;
}
.studio-panel-head strong {
  padding: 8px 10px;
  border-radius: 8px;
  color: #9dffb3;
  background: rgba(157, 255, 179, 0.1);
  border: 1px solid rgba(157, 255, 179, 0.18);
}
.prompt-box {
  min-height: 150px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: rgba(246, 251, 255, 0.86);
  background: rgba(255, 255, 255, 0.06);
  line-height: 1.7;
}
.prompt-box p {
  margin: 0;
}
.control-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0;
}
.control-grid label {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(93, 95, 239, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}
.control-grid span,
.queue-list small,
.frame-caption span {
  color: rgba(226, 244, 255, 0.56);
  font-size: 12px;
}
.control-grid strong {
  color: #ffffff;
  font-size: 13px;
}
.generation-toolbar {
  display: flex;
  gap: 10px;
  margin-top: auto;
}
.generation-toolbar button {
  flex: 1;
}
.preview-stage {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 14px;
}
.stage-screen {
  display: grid;
  place-items: center;
  min-height: 0;
}
.video-frame {
  position: relative;
  width: min(320px, 72%);
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(33, 212, 253, 0.32);
  background:
    radial-gradient(circle at 48% 30%, rgba(255, 255, 255, 0.24), transparent 12%),
    linear-gradient(160deg, rgba(33, 212, 253, 0.28), rgba(93, 95, 239, 0.18) 42%, rgba(241, 123, 58, 0.16)),
    #0a0b19;
  box-shadow: 0 26px 60px rgba(33, 212, 253, 0.12);
}
.video-frame::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 8px;
}
.scene-lines {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 110px;
  display: grid;
  gap: 8px;
}
.scene-lines span {
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}
.scene-lines span:nth-child(2) { width: 70%; }
.scene-lines span:nth-child(3) { width: 46%; }
.play-core {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 74px;
  height: 74px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: rgba(33, 212, 253, 0.16);
  border: 1px solid rgba(33, 212, 253, 0.4);
  box-shadow: 0 0 36px rgba(33, 212, 253, 0.26);
}
.play-core::after {
  content: "";
  position: absolute;
  left: 30px;
  top: 22px;
  border-left: 18px solid #ffffff;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
}
.frame-caption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 8px;
  color: #ffffff;
  background: rgba(4, 8, 18, 0.72);
  backdrop-filter: blur(10px);
}
.stage-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.stage-strip span {
  padding: 10px 8px;
  border-radius: 8px;
  text-align: center;
  color: rgba(226, 244, 255, 0.58);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.stage-strip .done {
  color: #9dffb3;
  border-color: rgba(157, 255, 179, 0.22);
}
.stage-strip .active {
  color: #ffffff;
  background: linear-gradient(135deg, #3f39d6, #21d4fd);
}
.insight-rail {
  display: grid;
  gap: 14px;
}
.rail-card {
  padding: 16px;
}
.studio-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.studio-metrics article {
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}
.studio-metrics span {
  display: block;
  margin-bottom: 8px;
  color: rgba(226, 244, 255, 0.58);
  font-size: 12px;
}
.studio-metrics strong {
  color: #ffffff;
  font-size: 24px;
}
.insight-tags {
  margin-top: 12px;
}
.video-workbench .empty-state {
  color: rgba(226, 244, 255, 0.66);
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(33, 212, 253, 0.18);
}
.video-workbench .empty-state strong {
  color: #ffffff;
}
.compact-chart {
  height: 126px;
  padding-bottom: 0;
}
.workbench-lower {
  display: grid;
  grid-template-columns: minmax(380px, 1.1fr) minmax(300px, 0.9fr);
  gap: 16px;
}
.video-workbench .panel {
  color: #f6fbff;
  background: linear-gradient(180deg, rgba(18, 17, 40, 0.94), rgba(10, 9, 26, 0.95));
  border-color: rgba(93, 95, 239, 0.2);
}
.video-workbench .panel h2,
.video-workbench .table-title {
  color: #ffffff;
}
.video-workbench .hint,
.video-workbench th,
.video-workbench td {
  color: rgba(226, 244, 255, 0.68);
}
.video-workbench tbody tr:hover {
  background: rgba(33, 212, 253, 0.08);
}
.queue-list {
  display: grid;
  gap: 10px;
}
.queue-list article {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}
.queue-thumb {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  color: #06111c;
  background: linear-gradient(135deg, #21d4fd, #8dffdd);
  font-weight: 900;
}
.queue-thumb.hot {
  color: #ffffff;
  background: linear-gradient(135deg, #7c3aed, #21d4fd);
}
.queue-thumb.warm {
  color: #ffffff;
  background: linear-gradient(135deg, #f17b3a, #7c3aed);
}
.queue-list strong,
.queue-list small {
  display: block;
}
.queue-list em {
  justify-self: end;
  padding: 6px 9px;
  border-radius: 999px;
  color: #9dffb3;
  background: rgba(157, 255, 179, 0.1);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}
.event-console .list-row {
  color: rgba(246, 251, 255, 0.86);
  background: rgba(255, 255, 255, 0.055);
  border-radius: 8px;
  padding: 11px 12px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.metric-grid.compact { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
.metric, .panel {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 255, 253, 0.92));
  border: 1px solid rgba(33, 212, 253, 0.14);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(25, 34, 45, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.82);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.metric::before,
.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--ai-cyan), rgba(15, 123, 108, 0.1), var(--nav-orange));
  opacity: 0.72;
}
.panel:hover {
  border-color: rgba(33, 212, 253, 0.26);
  box-shadow: 0 14px 34px rgba(25, 34, 45, 0.08), 0 0 22px rgba(33, 212, 253, 0.08);
}
.metric {
  padding: 18px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.metric:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(25, 34, 45, 0.08), 0 0 22px rgba(33, 212, 253, 0.08);
}
.metric span { display: block; color: var(--muted); margin-bottom: 10px; }
.metric strong {
  font-size: 30px;
  color: #0a6870;
  text-shadow: 0 0 18px rgba(33, 212, 253, 0.2);
}
.content-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 16px;
}
.panel { padding: 18px; min-width: 0; margin-bottom: 16px; }
.panel.wide { grid-column: 1 / -1; }
.panel h2 { margin: 0 0 14px; font-size: 18px; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.panel-head h2 { margin: 0; }
.actions, .row-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.filter-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr)) auto auto;
  gap: 10px;
  align-items: center;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid rgba(33, 212, 253, 0.16);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(33, 212, 253, 0.05) 1px, transparent 1px),
    #fbfffd;
  background-size: 24px 24px;
}

.filter-bar input,
.filter-bar select {
  min-width: 0;
}

.filter-bar button {
  white-space: nowrap;
}

.settings-form {
  max-width: 760px;
}

.settings-actions {
  margin-top: 14px;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.pager button {
  padding: 7px 10px;
  color: var(--ink);
  background: #eef2f5;
}

.pager button:hover,
.pager button.active {
  color: #fff;
  background: var(--accent);
}

.pager button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.pager .pager-info {
  margin-right: 6px;
}

.compact-pager {
  justify-content: space-between;
}

body.modal-open {
  overflow: hidden;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  padding: 32px;
  display: grid;
  place-items: center;
  align-items: center;
  justify-items: center;
  background: rgba(16, 24, 32, 0.48);
  backdrop-filter: blur(6px);
  animation: modalFade 0.18s ease both;
}

.modal-card {
  width: min(760px, 100%);
  max-height: min(84vh, 860px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  background: #fffdf9;
  box-shadow: 0 28px 90px rgba(15, 24, 34, 0.24);
  overflow: hidden;
  animation: modalIn 0.22s ease both;
}

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

.modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.94);
  backdrop-filter: blur(12px);
}

.modal-head h2 {
  margin: 0 0 5px;
  font-size: 19px;
}

.modal-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.modal-body {
  max-height: calc(min(84vh, 860px) - 78px);
  overflow: auto;
  padding: 18px 20px 22px;
}

.modal-actions {
  justify-content: flex-end;
  padding-top: 8px;
}

.icon-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
  color: var(--ink);
  background: #eef2f5;
  font-size: 22px;
  line-height: 34px;
}

.icon-btn:hover {
  color: #fff;
  background: var(--accent);
}

.bar-chart {
  display: flex;
  align-items: end;
  gap: 8px;
  height: 180px;
  padding-top: 12px;
  border-bottom: 1px solid var(--line);
}
.bar { flex: 1; min-width: 14px; max-width: 44px; display: flex; flex-direction: column; justify-content: end; align-items: center; gap: 6px; }
.bar i { display: block; width: 100%; min-height: 4px; border-radius: 4px 4px 0 0; background: var(--accent); }
.bar i {
  background: linear-gradient(180deg, var(--sunny), var(--accent));
  animation: growBar 0.42s ease both;
}
.bar small { color: var(--muted); font-size: 11px; white-space: nowrap; }

.list { display: grid; gap: 10px; }
.list-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  transition: transform 0.18s ease, background 0.18s ease;
}
.list-row:hover {
  transform: translateX(3px);
  background: linear-gradient(90deg, rgba(230, 245, 241, 0.7), transparent);
}
.table-wrap {
  overflow-x: auto;
  border-radius: 8px;
}
table { width: 100%; border-collapse: collapse; }
th, td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
  vertical-align: top;
}
th { color: var(--muted); font-weight: 600; }
tbody tr {
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
tbody tr:hover {
  background: #fffdf4;
  box-shadow: inset 3px 0 0 var(--sunny);
}
.status {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  background: #edf4f2;
  color: var(--accent-dark);
}
.status.draft { background: #fff2df; color: #a45c00; }
.status.archived, .status.disabled { background: #f2f4f3; color: #606774; }
.status.active {
  background: #e4f7ef;
  color: #08725f;
}
.status.planning,
.status.writing,
.status.ready,
.status.reviewing,
.status.generated {
  background: #e4f7ef;
  color: #08725f;
}
.status.generating,
.status.publishing {
  background: #e8f1ff;
  color: #235c9f;
}
.status.completed,
.status.published {
  background: #e4f7ef;
  color: #08725f;
}
.status.paused,
.status.todo,
.status.empty,
.status.offline {
  background: #f2f4f3;
  color: #606774;
}
.status.needs_rewrite,
.status.failed {
  background: #fff1e9;
  color: var(--danger-dark);
}
.row-actions button { padding: 7px 10px; color: var(--ink); background: #eef2f5; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list span {
  padding: 8px 10px;
  border-radius: 8px;
  color: #0e4f48;
  background: #e3f4ef;
  transition: transform 0.18s ease, background 0.18s ease;
}
.tag-list span:hover {
  transform: translateY(-2px) rotate(-1deg);
  background: var(--gold-soft);
}

.permission-box {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}
.permission-box h3 {
  margin: 0 0 12px;
  font-size: 15px;
}
.permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.permission-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.permission-item input {
  width: auto;
  margin: 0;
}
.permission-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.permission-tags span {
  padding: 4px 7px;
  border-radius: 6px;
  color: var(--accent-dark);
  background: #e7f4f0;
  font-size: 12px;
}
td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.editor-panel textarea {
  width: 100%;
  min-height: 520px;
  margin-top: 12px;
  line-height: 1.5;
  resize: vertical;
  font-family: Consolas, "Courier New", monospace;
}
.editor-tabs {
  display: flex;
  gap: 8px;
  margin: 4px 0 16px;
}
.editor-tab {
  color: var(--ink);
  background: #eef2f5;
}
.editor-tab.active {
  color: #fff;
  background: var(--accent);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
}
.form-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}
.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  color: var(--ink);
}
.form-grid select[multiple] {
  min-height: 132px;
  padding: 8px;
}
.form-grid select[multiple] option {
  padding: 7px 9px;
  border-radius: 7px;
}
.form-grid select[multiple] option:checked {
  color: #fff;
  background: var(--accent);
}
.check-dropdown {
  position: relative;
  width: 100%;
}
.check-dropdown-btn {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  box-shadow: none;
  transform: none;
}
.check-dropdown-btn:hover {
  border-color: rgba(15, 123, 108, 0.35);
  color: var(--ink);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(15, 123, 108, 0.08);
  transform: none;
}
.check-dropdown-caret {
  color: var(--muted);
  transition: transform 0.18s ease;
}
.check-dropdown[data-open="true"] .check-dropdown-caret {
  transform: rotate(180deg);
}
.check-dropdown-menu {
  display: none;
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid rgba(15, 123, 108, 0.18);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 24, 30, 0.16);
}
.check-dropdown[data-open="true"] .check-dropdown-menu {
  display: grid;
  gap: 6px;
}
.check-dropdown-option {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: flex-start;
  gap: 10px !important;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--ink) !important;
  cursor: pointer;
}
.check-dropdown-option:hover {
  background: var(--accent-soft);
}
.check-dropdown-option input {
  width: auto;
  margin: 3px 0 0;
  accent-color: var(--accent);
}
.check-dropdown-option strong {
  display: block;
  font-size: 14px;
}
.check-dropdown-option small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.4;
}
.span-2 { grid-column: 1 / -1; }
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.drama-project-card {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.9fr);
  gap: 18px;
  margin-bottom: 18px;
  padding: 20px;
  border: 1px solid rgba(15, 123, 108, 0.2);
  border-radius: 8px;
  background: linear-gradient(135deg, #f6fbfa 0%, #fffaf0 100%);
}
.drama-project-card h3 {
  margin: 8px 0 8px;
  font-size: 24px;
}
.drama-project-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}
.drama-status {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 800;
}
.drama-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.drama-tags span {
  padding: 7px 9px;
  border-radius: 8px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: 13px;
  font-weight: 700;
}
.drama-meta {
  padding: 16px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
}
.drama-project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  padding: 0;
  border-radius: 8px;
  background: transparent;
}
.drama-project-tile {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fbfefd;
  box-shadow: 0 8px 18px rgba(25, 34, 45, 0.05);
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.drama-project-tile:hover,
.drama-project-tile:focus-visible {
  outline: none;
  border-color: rgba(15, 123, 108, 0.28);
  box-shadow: 0 14px 26px rgba(25, 34, 45, 0.08);
  transform: translateY(-2px);
}
.drama-project-cover {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  box-shadow: none;
}
.drama-project-cover.empty {
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(15, 123, 108, 0.16), rgba(255, 248, 223, 0.74)),
    repeating-linear-gradient(45deg, rgba(15, 123, 108, 0.06) 0 8px, transparent 8px 18px);
}
.drama-project-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 46%, rgba(0, 0, 0, 0.42) 100%);
}
.drama-cover-logo {
  position: relative;
  z-index: 1;
  padding: 8px 10px;
  border: 1px solid rgba(15, 123, 108, 0.18);
  border-radius: 8px;
  color: var(--accent-dark);
  background: rgba(255, 255, 255, 0.72);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
}
.drama-cover-badge,
.drama-cover-episodes {
  position: absolute;
  z-index: 2;
  border-radius: 8px;
  font-weight: 800;
}
.drama-cover-badge {
  right: 8px;
  top: 8px;
  padding: 5px 8px;
  color: #075d52;
  background: #dff8ed;
  font-size: 12px;
}
.drama-cover-episodes {
  right: 8px;
  bottom: 8px;
  color: #fff;
  font-size: 13px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}
.drama-project-info h3 {
  margin: 0 0 5px;
  font-size: 16px;
  color: var(--ink);
}
.drama-project-info p {
  margin: 0;
  min-height: 40px;
  color: var(--muted);
  line-height: 1.45;
  font-size: 13px;
}
.drama-project-tile .drama-tags {
  margin-top: 0;
  gap: 6px;
}
.drama-project-tile .drama-tags span {
  padding: 5px 7px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: 12px;
}
.drama-project-tile .row-actions {
  margin-top: 0;
}
.drama-project-tile .row-actions button {
  padding: 6px 9px;
  color: var(--ink);
  background: #eef2f5;
}
.drama-project-tile .row-actions button:hover {
  color: #fff;
  background: var(--accent);
}
.drama-content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.drama-content-grid.video-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.drama-content-grid .empty-state {
  grid-column: 1 / -1;
}
.drama-content-card {
  display: flex;
  min-width: 0;
  min-height: 220px;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(15, 123, 108, 0.14);
  border-radius: 8px;
  background: #fbfefd;
  box-shadow: 0 10px 22px rgba(25, 34, 45, 0.05);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.drama-content-card:hover {
  border-color: rgba(15, 123, 108, 0.28);
  box-shadow: 0 14px 28px rgba(25, 34, 45, 0.08);
  transform: translateY(-2px);
}
.drama-card-top,
.drama-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.drama-card-top {
  color: var(--muted);
  font-size: 13px;
}
.drama-card-project {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--accent-dark);
  font-weight: 800;
}
.drama-card-title {
  display: grid;
  gap: 6px;
}
.drama-card-title span {
  color: var(--muted);
  font-size: 13px;
}
.drama-card-title h3 {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.35;
}
.drama-card-summary {
  display: -webkit-box;
  min-height: 84px;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}
.drama-card-meta {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(15, 123, 108, 0.1);
  color: var(--muted);
  font-size: 13px;
}
.drama-card-meta a {
  color: var(--accent-dark);
  font-weight: 800;
}
.drama-card-meta button {
  padding: 7px 12px;
  color: var(--ink);
  background: #eef2f5;
}
.drama-card-meta button:hover {
  color: #fff;
  background: var(--accent);
}
.video-card {
  padding: 12px;
}
.video-cover {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(15, 123, 108, 0.12);
  border-radius: 8px;
  color: var(--muted);
  background:
    linear-gradient(135deg, rgba(15, 123, 108, 0.1), rgba(255, 248, 223, 0.54)),
    repeating-linear-gradient(45deg, rgba(15, 123, 108, 0.05) 0 8px, transparent 8px 18px);
  font-size: 13px;
}
.video-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-cover-badges {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.video-cover-badges .status {
  box-shadow: 0 8px 20px rgba(20, 32, 36, 0.12);
}
.asset-card {
  min-height: 0;
}
.asset-cover {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid rgba(15, 123, 108, 0.12);
  border-radius: 8px;
  background: #f3fbf7;
}
.asset-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.asset-cover.empty span {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-weight: 900;
}
.asset-thumbs,
.asset-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.asset-thumbs img {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(15, 123, 108, 0.14);
  border-radius: 8px;
  object-fit: cover;
}
.asset-tags span {
  padding: 4px 7px;
  border-radius: 8px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 800;
}
.asset-image-editor {
  display: grid;
  gap: 10px;
}
.asset-image-row {
  display: grid;
  grid-template-columns: 110px minmax(220px, 1fr) auto minmax(160px, 0.7fr) 86px auto;
  gap: 8px;
  align-items: center;
}
.asset-image-row.uploading {
  opacity: 0.72;
}
.asset-image-row .file-upload {
  justify-content: center;
  padding: 8px 10px;
}
.still-card .drama-card-summary {
  min-height: 62px;
  -webkit-line-clamp: 3;
}
.still-cover {
  background:
    linear-gradient(135deg, rgba(15, 123, 108, 0.12), rgba(255, 248, 223, 0.58)),
    repeating-linear-gradient(45deg, rgba(15, 123, 108, 0.06) 0 8px, transparent 8px 18px);
}
.still-cover-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #fff;
  background: transparent;
  box-shadow: none;
  cursor: zoom-in;
  transform: none;
}
.still-cover-preview:hover {
  background: transparent;
  box-shadow: none;
  transform: none;
}
.still-cover-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.18s ease, filter 0.18s ease;
}
.still-cover-preview:hover img {
  filter: brightness(0.86);
  transform: scale(1.025);
}
.still-cover-preview span {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(15, 24, 34, 0.62);
  font-size: 12px;
  font-weight: 800;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.still-cover-preview:hover span,
.still-cover-preview:focus-visible span {
  opacity: 1;
}
.still-form-preview-wrap {
  display: grid;
  grid-template-columns: minmax(160px, 260px) auto;
  align-items: end;
  gap: 12px;
}
.still-form-preview {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(15, 123, 108, 0.16);
  border-radius: 8px;
  color: var(--muted);
  background: #f4fbf8;
  font-size: 13px;
}
.still-form-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.still-form-preview.empty {
  background:
    linear-gradient(135deg, rgba(15, 123, 108, 0.08), rgba(255, 248, 223, 0.42)),
    repeating-linear-gradient(45deg, rgba(15, 123, 108, 0.05) 0 8px, transparent 8px 18px);
}
.drama-card-meta .row-actions {
  justify-content: flex-end;
  flex-wrap: nowrap;
}
.image-preview-modal {
  z-index: 280;
  padding: 24px;
  background: rgba(10, 18, 24, 0.72);
}
.image-preview-card {
  width: min(980px, 100%);
  max-height: min(92vh, 980px);
  background: #111b20;
  border-color: rgba(255, 255, 255, 0.18);
}
.image-preview-card .modal-head {
  color: #fff;
  background: rgba(17, 27, 32, 0.94);
  border-bottom-color: rgba(255, 255, 255, 0.14);
}
.image-preview-card .modal-head p {
  color: rgba(255, 255, 255, 0.72);
}
.image-preview-body {
  display: grid;
  place-items: center;
  max-height: calc(min(92vh, 980px) - 78px);
  padding: 16px;
  overflow: auto;
}
.image-preview-body img {
  max-width: 100%;
  max-height: calc(min(92vh, 980px) - 110px);
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}
.drama-detail {
  margin-top: 20px;
}
.drama-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.drama-detail-grid article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfefd;
}
.drama-detail-grid strong {
  display: block;
  margin-bottom: 8px;
}
.drama-detail-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  white-space: pre-wrap;
}
.drama-episode-wrap {
  max-height: 520px;
  overflow: auto;
}
.thumb {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  background: #eef5f2;
  color: var(--muted);
  font-size: 12px;
}
@media (max-width: 620px) {
  .drama-project-grid {
    grid-template-columns: 1fr;
  }
}
.drama-meta strong {
  display: block;
  margin-bottom: 8px;
}
.drama-section {
  margin-top: 18px;
}
.section-head.compact {
  margin-bottom: 10px;
}
.section-head.compact h3 {
  margin: 0;
  font-size: 18px;
}
.drama-spec-grid,
.drama-character-grid,
.drama-delivery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.drama-spec,
.drama-character,
.drama-delivery-grid article,
.drama-flow article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfefd;
}
.drama-spec span,
.drama-character span {
  display: inline-flex;
  margin-bottom: 9px;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 800;
}
.drama-spec p,
.drama-character p,
.drama-delivery-grid p,
.drama-flow p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}
.drama-character h4,
.drama-delivery-grid h4 {
  margin: 0 0 8px;
  font-size: 16px;
}
.drama-character.lead {
  border-color: rgba(15, 123, 108, 0.24);
  background: linear-gradient(135deg, #f4fffb 0%, #fffdf5 100%);
}
.drama-flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
  counter-reset: drama-flow;
}
.drama-flow article {
  position: relative;
}
.drama-flow strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
}
.drama-table th,
.drama-table td {
  min-width: 150px;
  vertical-align: top;
}
.drama-table td:first-child {
  min-width: 56px;
  color: var(--accent-dark);
  font-weight: 800;
}
.module-card {
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfb;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.module-card:hover {
  transform: translateY(-3px);
  border-color: rgba(15, 123, 108, 0.2);
  box-shadow: 0 18px 36px rgba(25, 34, 45, 0.1);
}
.module-card span {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #47615c;
  background: #e8f1ef;
  font-size: 12px;
  font-weight: 800;
}
.module-card.active span {
  color: var(--accent-dark);
  background: var(--accent-soft);
}
.module-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}
.module-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 12px;
}
.section-head h3 { margin: 0; font-size: 16px; }
.builder-list {
  display: grid;
  gap: 12px;
}
.builder-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.builder-card:hover {
  border-color: rgba(15, 123, 108, 0.22);
  box-shadow: 0 12px 26px rgba(25, 34, 45, 0.06);
}
.builder-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.builder-card h4 { margin: 0; }
.option-row, .rule-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 90px minmax(220px, 1fr) auto;
  gap: 8px;
  align-items: start;
  margin-bottom: 8px;
}
.rule-grid {
  grid-template-columns: 90px 90px 1fr 120px auto;
}
.json-field {
  font-family: Consolas, "Courier New", monospace;
}
.upload-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}
.file-upload {
  display: inline-flex !important;
  width: auto !important;
  align-items: center;
  gap: 8px !important;
  padding: 9px 12px;
  border: 1px solid rgba(15, 123, 108, 0.18);
  border-radius: 8px;
  color: var(--accent-dark) !important;
  background: var(--accent-soft);
  font-weight: 800;
  cursor: pointer;
}
.file-upload input {
  display: none;
}
.empty-state {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fbfcfd;
}
.empty-state strong {
  display: block;
  color: var(--ink);
  margin-bottom: 6px;
}
.admin-form {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}
.modal-card.admin-form {
  margin-bottom: 0;
  padding: 0;
  border-radius: 18px;
  background: #fffdf9;
}
.role-help {
  margin: 12px 0;
  padding: 12px;
  border-radius: 8px;
  color: #38514d;
  background: #e8f4f1;
}
.role-help div + div { margin-top: 8px; }
.table-title {
  max-width: 360px;
  white-space: normal;
  line-height: 1.4;
}
.table-tags {
  max-width: 520px;
  white-space: normal;
  line-height: 1.45;
}
.settings-list { display: grid; gap: 12px; }
.settings-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.settings-row span { color: var(--muted); }

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: 380px;
  padding: 13px 16px;
  border: 1px solid rgba(255, 212, 107, 0.42);
  border-radius: 14px;
  color: #24332f;
  background: linear-gradient(135deg, var(--warm), var(--accent-soft));
  box-shadow: 0 18px 44px rgba(25, 34, 45, 0.18);
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  pointer-events: none;
  transition: 0.2s ease;
}
.toast::before {
  content: "✦";
  margin-right: 8px;
  color: #b98509;
}
.toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: toastPop 0.26s ease both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes scanBeam {
  0% { transform: translateX(-30%); }
  100% { transform: translateX(30%); }
}

@keyframes orbitSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes framePulse {
  0%, 100% { opacity: 0.45; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-6px); }
}

@keyframes frameSweep {
  0%, 35% { transform: translateX(-120%); }
  75%, 100% { transform: translateX(120%); }
}

@keyframes nodeFloat {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(14px) rotate(3deg); }
}

@keyframes nodePulse {
  0%, 100% { transform: scale(0.82); opacity: 0.62; }
  50% { transform: scale(1.22); opacity: 1; }
}

@keyframes renderProgress {
  0% { transform: translateX(-20%); width: 28%; }
  50% { transform: translateX(70%); width: 58%; }
  100% { transform: translateX(250%); width: 34%; }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.45; transform: scale(0.9) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.18) rotate(18deg); }
}

@keyframes brandPop {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-2px) rotate(-2deg); }
}

@keyframes menuIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toastPop {
  0% { transform: translateY(10px) scale(0.96); }
  65% { transform: translateY(-2px) scale(1.02); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes growBar {
  from { transform: scaleY(0.35); transform-origin: bottom; }
  to { transform: scaleY(1); transform-origin: bottom; }
}

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

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

@media (max-width: 980px) {
  .vfx-orbit {
    left: -120px;
    bottom: -80px;
    opacity: 0.5;
  }
  .vfx-nodes {
    right: -110px;
    top: 8%;
    opacity: 0.42;
  }
  .vfx-timeline,
  .vfx-render-card {
    display: none;
  }
  .shell,
  .shell.sidebar-collapsed { grid-template-columns: 1fr; }
  .sidebar {
    min-height: auto;
    max-height: none;
    position: static;
  }
  .sidebar.collapsed .brand-text,
  .sidebar.collapsed .nav-caret,
  .sidebar.collapsed .nav-dot,
  .sidebar.collapsed .nav-leaf,
  .sidebar.collapsed .nav-text,
  .sidebar.collapsed .logout-text {
    display: inline-flex;
  }
  .sidebar.collapsed .brand-user-row {
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid rgba(15, 123, 108, 0.12);
  }
  .sidebar.collapsed .sidebar-logout {
    width: 100%;
  }
  .sidebar.collapsed .nav-toggle,
  .sidebar.collapsed .nav {
    justify-content: flex-start;
  }
  .sidebar.collapsed .nav-subsection {
    margin-left: 12px;
    padding-left: 8px;
    border-left: 1px solid rgba(143, 226, 211, 0.14);
  }
  .sidebar.collapsed .collapse-btn {
    position: static;
  }
  .dashboard-hero {
    align-items: flex-start;
    flex-direction: column;
  }
  .workbench-topbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .workbench-actions {
    justify-content: flex-start;
  }
  .video-studio-grid,
  .workbench-lower {
    grid-template-columns: 1fr;
  }
  .generator-panel,
  .preview-stage {
    min-height: auto;
  }
  .video-frame {
    width: min(280px, 86%);
  }
  .control-grid,
  .studio-metrics {
    grid-template-columns: 1fr;
  }
  .stage-strip {
    grid-template-columns: repeat(3, 1fr);
  }
  .metric-grid, .metric-grid.compact, .content-grid, .form-grid, .option-row, .rule-grid { grid-template-columns: 1fr; }
  .still-form-preview-wrap {
    grid-template-columns: 1fr;
  }
  .filter-bar {
    grid-template-columns: 1fr;
  }
  .permission-grid {
    grid-template-columns: 1fr;
  }
  .panel.wide { grid-column: auto; }
  .modal {
    padding: 12px;
    place-items: center;
    align-items: center;
    justify-items: center;
  }
  .modal-card,
  .modal-card-large {
    width: 100%;
    max-height: 92vh;
    border-radius: 18px;
  }
  .modal-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .modal-head .actions {
    width: 100%;
  }
  .modal-head .actions button:not(.icon-btn) {
    flex: 1;
  }
  .modal-head .icon-btn {
    position: absolute;
    right: 14px;
    top: 14px;
  }
}

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