:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #f3f7ff;
  --surface-3: #fbfcff;
  --line: #e6ecf5;
  --text: #172033;
  --muted: #8a94a6;
  --primary: #3478f6;
  --primary-2: #1f5fd4;
  --accent: #5ac8fa;
  --accent-soft: #eaf2ff;
  --mint-soft: #eefaf5;
  --gold-soft: #fff7e8;
  --blue-soft: #eaf2ff;
  --danger: #ff3b30;
  --warning: #ff9500;
  --ok: #34c759;
  --neutral: #a0a8b8;
  --radius-card: 8px;
  --radius-panel: 8px;
  --focus-ring: 0 0 0 3px rgba(52, 120, 246, 0.13);
  --shadow: 0 8px 24px rgba(31, 64, 128, 0.06);
  --soft-shadow: 0 6px 18px rgba(31, 64, 128, 0.045);
  --bubble-shadow: 0 8px 24px rgba(31, 64, 128, 0.055), inset 0 1px 0 rgba(255, 255, 255, 0.92);
  --bubble-shadow-hover: 0 12px 30px rgba(31, 64, 128, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.96);
  --ease-soft: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-float: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-press: cubic-bezier(0.2, 0, 0, 1);
  --motion-fast: 160ms;
  --motion-base: 260ms;
  --motion-slow: 340ms;
  --sidebar-width: 264px;
  --sidebar-collapsed-width: 76px;
  --drawer-width: 260px;
  --font-main: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  --font-mono: "SF Mono", "Cascadia Mono", "Roboto Mono", Consolas, monospace;
  font-family: var(--font-main);
}

/* Login refinement: calmer production-ready sign-in surface. */
body:not(.is-authed) {
  --login-bg: #e8eef6;
  --login-panel: rgba(255, 255, 255, 0.82);
  --login-border: rgba(205, 216, 232, 0.88);
  --login-text: #172033;
  --login-muted: #68758d;
  --login-primary: #4d5fca;
  --login-primary-deep: #3f4fae;
  --login-focus: rgba(77, 95, 202, 0.18);
}

body:not(.is-authed) .login-screen {
  min-height: 100svh !important;
  padding: 42px !important;
  overflow: auto !important;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.26), rgba(190, 214, 238, 0.22)),
    var(--login-bg) !important;
}

body:not(.is-authed) .login-screen::before,
body:not(.is-authed) .login-screen::after,
body:not(.is-authed) .login-shell::before,
body:not(.is-authed) .login-shell::after {
  display: none !important;
}

body:not(.is-authed) .login-shell {
  display: grid !important;
  grid-template-columns: minmax(360px, 420px) minmax(360px, 1fr) !important;
  gap: clamp(42px, 7vw, 92px) !important;
  align-items: center !important;
  width: min(1080px, 100%) !important;
  min-height: calc(100svh - 84px) !important;
  margin: 0 auto !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body:not(.is-authed) .login-form-column {
  width: 100% !important;
  min-width: 0 !important;
}

body:not(.is-authed) .login-panel:not([hidden]),
body:not(.is-authed) .register-panel:not([hidden]) {
  display: grid !important;
  align-content: start !important;
  gap: 18px !important;
  width: 100% !important;
  max-height: none !important;
  min-height: 0 !important;
  padding: 34px !important;
  border: 1px solid var(--login-border) !important;
  border-radius: 8px !important;
  background: var(--login-panel) !important;
  color: var(--login-text) !important;
  box-shadow:
    0 22px 56px rgba(43, 64, 96, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: blur(18px) saturate(1.08) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.08) !important;
}

body:not(.is-authed) .login-panel .brand,
body:not(.is-authed) .register-panel .brand {
  gap: 12px !important;
  margin-bottom: 2px !important;
}

body:not(.is-authed) .login-panel .brand.large .brand-mark,
body:not(.is-authed) .register-panel .brand.large .brand-mark {
  width: 54px !important;
  height: 54px !important;
  border: 1px solid rgba(214, 224, 238, 0.86) !important;
  border-radius: 8px !important;
  background: linear-gradient(180deg, #ffffff, #f2f6fb) !important;
  box-shadow: 0 10px 22px rgba(43, 64, 96, 0.1) !important;
}

body:not(.is-authed) .login-panel .brand.large .brand-mark img,
body:not(.is-authed) .register-panel .brand.large .brand-mark img {
  width: 34px !important;
  height: 34px !important;
}

body:not(.is-authed) .login-panel .brand strong,
body:not(.is-authed) .register-panel .brand strong {
  color: #182133 !important;
  font-size: 18px !important;
  font-weight: 800 !important;
}

body:not(.is-authed) .login-panel .brand span,
body:not(.is-authed) .register-panel .brand span {
  color: var(--login-muted) !important;
  font-size: 12px !important;
  font-weight: 650 !important;
}

body:not(.is-authed) .login-kicker {
  width: fit-content !important;
  margin-top: 2px !important;
  padding: 5px 8px !important;
  border: 1px solid rgba(77, 95, 202, 0.14) !important;
  border-radius: 8px !important;
  background: rgba(77, 95, 202, 0.07) !important;
  color: #5362b9 !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
}

body:not(.is-authed) .login-panel h1,
body:not(.is-authed) .register-panel h1 {
  margin: 0 !important;
  color: #121b2c !important;
  font-size: clamp(30px, 4vw, 38px) !important;
  font-weight: 820 !important;
  line-height: 1.12 !important;
  letter-spacing: 0 !important;
}

body:not(.is-authed) .login-subtitle,
body:not(.is-authed) .auth-flow-head p {
  margin: -8px 0 2px !important;
  color: var(--login-muted) !important;
  font-size: 14px !important;
  font-weight: 620 !important;
  line-height: 1.6 !important;
}

body:not(.is-authed) .login-panel .auth-tabs {
  position: relative !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  height: 48px !important;
  padding: 4px !important;
  border: 1px solid rgba(207, 219, 235, 0.74) !important;
  border-radius: 8px !important;
  background: rgba(236, 242, 249, 0.78) !important;
  box-shadow: inset 0 1px 2px rgba(43, 64, 96, 0.08) !important;
}

body:not(.is-authed) .login-panel .auth-tabs::before {
  top: 4px !important;
  bottom: 4px !important;
  left: 4px !important;
  width: calc((100% - 8px) / 2) !important;
  border-radius: 6px !important;
  background: #ffffff !important;
  box-shadow: 0 5px 12px rgba(43, 64, 96, 0.11) !important;
}

body:not(.is-authed) .login-panel .auth-tabs.phone-active::before {
  transform: translateX(100%) !important;
}

body:not(.is-authed) .login-panel .auth-tabs button {
  min-width: 0 !important;
  min-height: 38px !important;
  border-radius: 6px !important;
  color: #7a8799 !important;
  font-size: 13px !important;
  font-weight: 760 !important;
  letter-spacing: 0 !important;
}

body:not(.is-authed) .login-panel .auth-tabs button.active {
  color: #1d2638 !important;
}

body:not(.is-authed) .login-panel .field {
  gap: 8px !important;
}

body:not(.is-authed) .login-panel .field > span,
body:not(.is-authed) .register-panel .field > span {
  color: #38455b !important;
  font-size: 12px !important;
  font-weight: 760 !important;
}

body:not(.is-authed) .login-panel .field input,
body:not(.is-authed) .login-panel .code-row input,
body:not(.is-authed) .register-panel .field input,
body:not(.is-authed) .register-panel .field select,
body:not(.is-authed) .register-panel .code-row input {
  height: 52px !important;
  min-height: 52px !important;
  padding: 0 15px !important;
  border: 1px solid rgba(205, 218, 235, 0.95) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.88) !important;
  color: #182133 !important;
  font-size: 15px !important;
  font-weight: 680 !important;
  box-shadow: inset 0 1px 2px rgba(43, 64, 96, 0.06) !important;
}

body:not(.is-authed) .login-panel .field input::placeholder,
body:not(.is-authed) .login-panel .code-row input::placeholder {
  color: #98a3b3 !important;
  font-weight: 520 !important;
}

body:not(.is-authed) .login-panel .field input:focus,
body:not(.is-authed) .login-panel .code-row input:focus,
body:not(.is-authed) .register-panel .field input:focus,
body:not(.is-authed) .register-panel .code-row input:focus {
  border-color: rgba(77, 95, 202, 0.68) !important;
  background: #ffffff !important;
  box-shadow:
    0 0 0 3px var(--login-focus),
    inset 0 1px 2px rgba(43, 64, 96, 0.05) !important;
  transform: none !important;
}

body:not(.is-authed) .login-panel .field input.is-invalid,
body:not(.is-authed) .register-panel .field input.is-invalid {
  border-color: rgba(220, 67, 67, 0.78) !important;
  box-shadow:
    0 0 0 3px rgba(220, 67, 67, 0.12),
    inset 0 1px 2px rgba(43, 64, 96, 0.05) !important;
}

body:not(.is-authed) .password-input #loginPass {
  padding-right: 48px !important;
}

body:not(.is-authed) .login-options {
  align-items: center !important;
  gap: 12px !important;
  min-height: 24px !important;
}

body:not(.is-authed) .remember-password {
  color: #6d7890 !important;
  font-size: 12px !important;
  font-weight: 620 !important;
}

body:not(.is-authed) .remember-password input {
  width: 17px !important;
  height: 17px !important;
  accent-color: var(--login-primary) !important;
}

body:not(.is-authed) .login-panel .text-btn,
body:not(.is-authed) .register-panel .text-btn {
  color: #4f5fc0 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

body:not(.is-authed) .login-panel .text-btn:hover,
body:not(.is-authed) .register-panel .text-btn:hover {
  color: #3446a4 !important;
}

body:not(.is-authed) .login-panel .primary-btn.wide,
body:not(.is-authed) .register-panel .primary-btn.wide,
body:not(.is-authed) .auth-captcha-actions .primary-btn {
  min-height: 52px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: linear-gradient(180deg, #5969d2 0%, #4658bd 100%) !important;
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 820 !important;
  letter-spacing: 0.02em !important;
  box-shadow:
    0 12px 22px rgba(71, 87, 191, 0.24),
    0 2px 4px rgba(45, 56, 145, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(37, 46, 123, 0.18) !important;
}

body:not(.is-authed) .login-panel .primary-btn.wide:hover,
body:not(.is-authed) .register-panel .primary-btn.wide:hover,
body:not(.is-authed) .auth-captcha-actions .primary-btn:hover {
  background: linear-gradient(180deg, #6171d9 0%, #4b5fc5 100%) !important;
  box-shadow:
    0 14px 26px rgba(71, 87, 191, 0.28),
    0 3px 7px rgba(45, 56, 145, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(37, 46, 123, 0.2) !important;
  transform: translateY(-1px) !important;
}

body:not(.is-authed) .login-panel .primary-btn.wide:active,
body:not(.is-authed) .register-panel .primary-btn.wide:active {
  background: linear-gradient(180deg, #4354b8 0%, #3d4ca7 100%) !important;
  box-shadow:
    0 6px 12px rgba(71, 87, 191, 0.2),
    inset 0 2px 6px rgba(37, 46, 123, 0.36) !important;
  transform: translateY(1px) !important;
}

body:not(.is-authed) .login-panel .primary-btn.wide:disabled,
body:not(.is-authed) .register-panel .primary-btn.wide:disabled,
body:not(.is-authed) .login-panel .ghost-btn:disabled {
  cursor: not-allowed !important;
  opacity: 0.68 !important;
  transform: none !important;
}

body:not(.is-authed) .login-panel .ghost-btn,
body:not(.is-authed) .register-panel .ghost-btn {
  min-height: 52px !important;
  border: 1px solid rgba(205, 218, 235, 0.95) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.82) !important;
  color: #334155 !important;
  font-size: 12px !important;
  font-weight: 780 !important;
  box-shadow: 0 6px 14px rgba(43, 64, 96, 0.07) !important;
}

body:not(.is-authed) .login-panel .ghost-btn:not(:disabled):hover,
body:not(.is-authed) .register-panel .ghost-btn:not(:disabled):hover {
  border-color: rgba(77, 95, 202, 0.28) !important;
  color: #4051b1 !important;
  transform: translateY(-1px) !important;
}

body:not(.is-authed) .form-error {
  min-height: 18px !important;
  margin: -2px 0 0 !important;
  color: #c53636 !important;
  font-size: 12px !important;
  font-weight: 720 !important;
}

body:not(.is-authed) .auth-footer {
  min-height: 20px !important;
  justify-content: center !important;
}

body:not(.is-authed) .login-showcase {
  min-height: 520px !important;
  opacity: 0.72 !important;
  filter: saturate(0.9) contrast(0.98) !important;
}

body:not(.is-authed) .login-art {
  width: min(520px, 100%) !important;
  transform: scale(0.94) !important;
}

body:not(.is-authed) .login-art-glow,
body:not(.is-authed) .login-fluid-ribbon {
  opacity: 0.42 !important;
}

body:not(.is-authed) .login-floating-files {
  opacity: 0.5 !important;
}

body:not(.is-authed) .login-visual-caption {
  opacity: 0.72 !important;
}

@media (prefers-reduced-motion: reduce) {
  body:not(.is-authed) .login-showcase *,
  body:not(.is-authed) .login-showcase *::before,
  body:not(.is-authed) .login-showcase *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 900px) {
  body:not(.is-authed) .login-screen {
    padding: 22px !important;
  }

  body:not(.is-authed) .login-shell {
    grid-template-columns: minmax(0, 480px) !important;
    justify-content: center !important;
    min-height: calc(100svh - 44px) !important;
  }

  body:not(.is-authed) .login-showcase {
    display: none !important;
  }
}

@media (max-width: 520px) {
  body:not(.is-authed) .login-screen {
    padding: 14px !important;
  }

  body:not(.is-authed) .login-shell {
    min-height: calc(100svh - 28px) !important;
  }

  body:not(.is-authed) .login-panel:not([hidden]),
  body:not(.is-authed) .register-panel:not([hidden]) {
    gap: 16px !important;
    padding: 22px !important;
  }

  body:not(.is-authed) .login-panel h1,
  body:not(.is-authed) .register-panel h1 {
    font-size: 28px !important;
  }

  body:not(.is-authed) .login-panel .auth-tabs {
    height: 46px !important;
  }

  body:not(.is-authed) .login-panel .field input,
  body:not(.is-authed) .login-panel .code-row input,
  body:not(.is-authed) .register-panel .field input,
  body:not(.is-authed) .register-panel .code-row input {
    height: 50px !important;
    min-height: 50px !important;
    font-size: 14px !important;
  }

  body:not(.is-authed) .code-row {
    grid-template-columns: 1fr !important;
  }

  body:not(.is-authed) .login-options {
    align-items: flex-start !important;
    flex-direction: column !important;
  }
}

/* Last word: original preview login values. */
body.locked:not(.is-authed) #passwordLoginBtn.neo-primary.primary-btn.wide {
  height: 56px !important;
  min-height: 56px !important;
  border-radius: 16px !important;
  margin-top: 4px !important;
  background:
    radial-gradient(circle at 18% 18%, rgb(255 255 255 / 0.34), transparent 28%),
    linear-gradient(135deg, var(--neo-accent-deep) 0%, var(--neo-accent) 48%, var(--neo-accent-light) 100%) !important;
  box-shadow:
    9px 9px 18px rgb(85 103 216 / 0.28),
    -8px -8px 16px rgb(255 255 255 / 0.58),
    inset 1px 1px 0 rgb(255 255 255 / 0.24) !important;
}

/* True final: original preview login design wins over every older override. */
body.locked:not(.is-authed) .neo-login-screen {
  --neo-bg: #e4ebf4;
  --neo-text: #3d4852;
  --neo-muted: #6b7280;
  --neo-soft-muted: #8290a2;
  --neo-accent: #5567d8;
  --neo-accent-light: #7584e8;
  --neo-accent-deep: #4655c4;
  --neo-teal: #23b7ad;
  --neo-sky: #64c7ff;
  --neo-shadow-dark: rgb(155 171 195 / 0.66);
  --neo-shadow-light: rgb(255 255 255 / 0.68);
  --neo-shadow-raised: 9px 9px 16px var(--neo-shadow-dark), -9px -9px 16px var(--neo-shadow-light);
  --neo-shadow-raised-hover: 12px 12px 20px rgb(155 171 195 / 0.74), -12px -12px 20px rgb(255 255 255 / 0.74);
  --neo-shadow-small: 5px 5px 10px rgb(155 171 195 / 0.62), -5px -5px 10px rgb(255 255 255 / 0.62);
  --neo-shadow-inset: inset 6px 6px 10px rgb(155 171 195 / 0.62), inset -6px -6px 10px rgb(255 255 255 / 0.62);
  --neo-shadow-inset-deep: inset 10px 10px 20px rgb(155 171 195 / 0.7), inset -10px -10px 20px rgb(255 255 255 / 0.72);
  --neo-shadow-inset-small: inset 3px 3px 6px rgb(155 171 195 / 0.6), inset -3px -3px 6px rgb(255 255 255 / 0.62);
  display: grid !important;
  min-height: 100vh !important;
  padding: 48px !important;
  overflow: hidden !important;
  background:
    radial-gradient(circle at 18% 16%, rgb(154 124 255 / 0.13), transparent 30%),
    radial-gradient(circle at 82% 74%, rgb(35 183 173 / 0.14), transparent 32%),
    var(--neo-bg) !important;
  color: var(--neo-text) !important;
}

body.locked:not(.is-authed) .neo-login-shell {
  display: grid !important;
  grid-template-columns: 416px minmax(300px, 1fr) !important;
  gap: 72px !important;
  align-items: center !important;
  width: min(1032px, 100%) !important;
  margin: auto !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.locked:not(.is-authed) #loginForm.neo-login-card {
  gap: 22px !important;
  min-height: 672px !important;
  padding: 40px !important;
  border-radius: 32px !important;
  background:
    linear-gradient(145deg, rgb(255 255 255 / 0.16), rgb(214 225 238 / 0.16)),
    var(--neo-bg) !important;
  box-shadow: var(--neo-shadow-raised), inset 1px 1px 0 rgb(255 255 255 / 0.32) !important;
}

body.locked:not(.is-authed) #loginForm .neo-login-kicker {
  display: none !important;
}

body.locked:not(.is-authed) #loginForm .neo-login-headline h1 {
  color: var(--neo-text) !important;
  font-size: 38px !important;
  font-weight: 760 !important;
  line-height: 1.12 !important;
}

body.locked:not(.is-authed) #loginForm .neo-auth-stage {
  min-height: 274px !important;
}

body.locked:not(.is-authed) #loginForm .neo-field input,
body.locked:not(.is-authed) #loginForm .neo-code-row input {
  height: 56px !important;
  min-height: 56px !important;
  border-radius: 16px !important;
  border: 0 !important;
  background:
    linear-gradient(145deg, rgb(255 255 255 / 0.1), transparent),
    var(--neo-bg) !important;
  box-shadow: var(--neo-shadow-inset) !important;
}

body.locked:not(.is-authed) #passwordLoginBtn.neo-primary {
  height: 56px !important;
  min-height: 56px !important;
  border-radius: 16px !important;
  margin-top: 4px !important;
  background:
    radial-gradient(circle at 18% 18%, rgb(255 255 255 / 0.34), transparent 28%),
    linear-gradient(135deg, var(--neo-accent-deep) 0%, var(--neo-accent) 48%, var(--neo-accent-light) 100%) !important;
  box-shadow:
    9px 9px 18px rgb(85 103 216 / 0.28),
    -8px -8px 16px rgb(255 255 255 / 0.58),
    inset 1px 1px 0 rgb(255 255 255 / 0.24) !important;
}

body.locked:not(.is-authed) .neo-sculpture {
  width: min(392px, 72vw) !important;
  background:
    radial-gradient(circle at 50% 50%, var(--neo-bg) 0 29%, transparent 30%),
    conic-gradient(from 28deg, rgb(97 87 255 / 0.13), rgb(35 183 173 / 0.12), rgb(100 199 255 / 0.1), rgb(97 87 255 / 0.13)),
    radial-gradient(circle at 36% 30%, rgb(255 255 255 / 0.32), transparent 32%),
    var(--neo-bg) !important;
  box-shadow:
    var(--neo-shadow-raised),
    inset 0 0 0 18px rgb(255 255 255 / 0.12),
    inset 0 0 0 34px rgb(97 87 255 / 0.025),
    0 28px 70px rgb(97 87 255 / 0.08) !important;
}

body.locked:not(.is-authed) #passwordLoginBtn.neo-primary.primary-btn.wide {
  height: 56px !important;
  min-height: 56px !important;
  border-radius: 16px !important;
  margin-top: 4px !important;
  background:
    radial-gradient(circle at 18% 18%, rgb(255 255 255 / 0.34), transparent 28%),
    linear-gradient(135deg, var(--neo-accent-deep) 0%, var(--neo-accent) 48%, var(--neo-accent-light) 100%) !important;
  box-shadow:
    9px 9px 18px rgb(85 103 216 / 0.28),
    -8px -8px 16px rgb(255 255 255 / 0.58),
    inset 1px 1px 0 rgb(255 255 255 / 0.24) !important;
}

/* Final login control sizing guard. */
body.locked:not(.is-authed) .login-form-column {
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.locked:not(.is-authed) #loginForm.login-panel:not([hidden]),
body.locked:not(.is-authed) #forgotForm.login-panel:not([hidden]),
body.locked:not(.is-authed) #registerForm.login-panel:not([hidden]) {
  width: 100% !important;
  max-width: 420px !important;
  padding: 34px !important;
  transform: none !important;
}

body.locked:not(.is-authed) #loginForm .auth-tabs {
  height: 48px !important;
  min-height: 48px !important;
  border-radius: 8px !important;
}

body.locked:not(.is-authed) #loginForm .auth-tabs::before {
  border-radius: 6px !important;
}

body.locked:not(.is-authed) #loginUser,
body.locked:not(.is-authed) #loginPass,
body.locked:not(.is-authed) #loginEmail,
body.locked:not(.is-authed) #loginCode,
body.locked:not(.is-authed) #forgotForm input,
body.locked:not(.is-authed) #registerForm input {
  height: 52px !important;
  min-height: 52px !important;
  border-radius: 8px !important;
}

body.locked:not(.is-authed) #passwordLoginBtn.primary-btn.wide,
body.locked:not(.is-authed) #forgotSubmitBtn.primary-btn.wide,
body.locked:not(.is-authed) #registerForm .primary-btn.wide {
  height: 52px !important;
  min-height: 52px !important;
  border-radius: 8px !important;
  padding: 0 16px !important;
}

/* New login redesign. This replaces the old cat/aquarium login surface. */
body:not(.is-authed) .neo-login-screen {
  --neo-bg: #e4ebf4;
  --neo-text: #3d4852;
  --neo-muted: #6b7280;
  --neo-soft-muted: #8290a2;
  --neo-accent: #5567d8;
  --neo-accent-light: #7584e8;
  --neo-accent-deep: #4655c4;
  --neo-teal: #23b7ad;
  --neo-sky: #64c7ff;
  --neo-shadow-dark: rgb(155 171 195 / 0.66);
  --neo-shadow-light: rgb(255 255 255 / 0.68);
  --neo-shadow-raised: 9px 9px 16px var(--neo-shadow-dark), -9px -9px 16px var(--neo-shadow-light);
  --neo-shadow-small: 5px 5px 10px rgb(155 171 195 / 0.5), -5px -5px 10px rgb(255 255 255 / 0.6);
  --neo-shadow-inset: inset 6px 6px 10px rgb(155 171 195 / 0.56), inset -6px -6px 10px rgb(255 255 255 / 0.62);
  display: grid !important;
  min-height: 100svh !important;
  padding: 48px !important;
  overflow: auto !important;
  background:
    radial-gradient(circle at 18% 16%, rgb(154 124 255 / 0.08), transparent 30%),
    radial-gradient(circle at 82% 74%, rgb(35 183 173 / 0.08), transparent 32%),
    var(--neo-bg) !important;
  color: var(--neo-text) !important;
}

body:not(.is-authed) .neo-login-screen::before,
body:not(.is-authed) .neo-login-screen::after {
  display: none !important;
}

body:not(.is-authed) .neo-login-shell {
  position: relative !important;
  z-index: 1 !important;
  display: grid !important;
  grid-template-columns: minmax(360px, 416px) minmax(300px, 1fr) !important;
  gap: 72px !important;
  align-items: center !important;
  width: min(1032px, 100%) !important;
  min-height: auto !important;
  margin: auto !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body:not(.is-authed) .neo-login-card-stack {
  position: relative !important;
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body:not(.is-authed) .neo-login-card {
  display: grid !important;
  gap: 21px !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 0 !important;
  max-height: none !important;
  align-content: start !important;
  padding: 38px !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 24px !important;
  background:
    linear-gradient(145deg, rgb(255 255 255 / 0.16), rgb(214 225 238 / 0.16)),
    var(--neo-bg) !important;
  box-shadow: var(--neo-shadow-raised), inset 1px 1px 0 rgb(255 255 255 / 0.32) !important;
  color: var(--neo-text) !important;
  transform: none !important;
}

body:not(.is-authed) .neo-login-card[hidden] {
  display: none !important;
}

body:not(.is-authed) .neo-flow-card {
  gap: 15px !important;
}

body:not(.is-authed) .neo-brand {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body:not(.is-authed) .neo-brand-mark {
  display: grid !important;
  width: 58px !important;
  height: 58px !important;
  flex: 0 0 auto !important;
  place-items: center !important;
  border: 0 !important;
  border-radius: 20px !important;
  background:
    radial-gradient(circle at 35% 30%, rgb(255 255 255 / 0.56), transparent 38%),
    var(--neo-bg) !important;
  box-shadow: var(--neo-shadow-small), 0 12px 26px rgb(97 87 255 / 0.08) !important;
}

body:not(.is-authed) .neo-brand-mark img {
  width: 37px !important;
  height: 37px !important;
  object-fit: contain !important;
}

body:not(.is-authed) .neo-brand strong,
body:not(.is-authed) .neo-login-headline h1,
body:not(.is-authed) .neo-flow-head h1 {
  color: var(--neo-text) !important;
  font-weight: 780 !important;
  letter-spacing: 0 !important;
}

body:not(.is-authed) .neo-brand strong {
  display: block !important;
  font-size: 18px !important;
  line-height: 1.12 !important;
}

body:not(.is-authed) .neo-brand span {
  display: block !important;
  margin-top: 4px !important;
  color: var(--neo-muted) !important;
  font-size: 12px !important;
  font-weight: 560 !important;
  line-height: 1.35 !important;
}

body:not(.is-authed) .neo-login-headline,
body:not(.is-authed) .neo-flow-head {
  display: grid !important;
  gap: 9px !important;
}

body:not(.is-authed) .neo-login-kicker,
body:not(.is-authed) .neo-flow-head > span {
  width: fit-content !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--neo-soft-muted) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
}

body:not(.is-authed) .neo-login-headline h1,
body:not(.is-authed) .neo-flow-head h1 {
  margin: 0 !important;
  font-size: 36px !important;
  line-height: 1.12 !important;
  text-shadow: none !important;
}

body:not(.is-authed) .neo-flow-head h1 {
  font-size: 30px !important;
}

body:not(.is-authed) .neo-login-headline p,
body:not(.is-authed) .neo-flow-head p {
  max-width: 25em !important;
  margin: 0 !important;
  color: var(--neo-muted) !important;
  font-size: 14px !important;
  font-weight: 560 !important;
  line-height: 1.6 !important;
}

body:not(.is-authed) .neo-login-headline p::before {
  content: \"\" !important;
  display: inline-block !important;
  width: 8px !important;
  height: 8px !important;
  margin-right: 8px !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, var(--neo-teal), var(--neo-sky)) !important;
  box-shadow: 0 4px 10px rgb(35 183 173 / 0.22) !important;
  vertical-align: 1px !important;
}

body:not(.is-authed) .neo-auth-tabs {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  height: 52px !important;
  min-height: 52px !important;
  padding: 6px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--neo-bg) !important;
  box-shadow: var(--neo-shadow-inset) !important;
}

body:not(.is-authed) .neo-auth-tabs::before {
  content: \"\" !important;
  position: absolute !important;
  top: 6px !important;
  bottom: 6px !important;
  left: 6px !important;
  width: calc((100% - 12px) / 2) !important;
  border-radius: 999px !important;
  background:
    linear-gradient(145deg, rgb(255 255 255 / 0.22), rgb(214 225 238 / 0.1)),
    var(--neo-bg) !important;
  box-shadow: var(--neo-shadow-small), inset 0 1px 0 rgb(255 255 255 / 0.34) !important;
  transition: transform 360ms cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

body:not(.is-authed) .neo-auth-tabs.phone-active::before {
  transform: translateX(100%) !important;
}

body:not(.is-authed) .neo-auth-tabs button {
  position: relative !important;
  z-index: 1 !important;
  min-height: 40px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: var(--neo-muted) !important;
  cursor: pointer !important;
  font-size: 13px !important;
  font-weight: 760 !important;
}

body:not(.is-authed) .neo-auth-tabs button.active {
  color: var(--neo-text) !important;
}

body:not(.is-authed) .neo-auth-stage {
  display: grid !important;
  grid-template: 1fr / 1fr !important;
  min-height: 266px !important;
  align-items: start !important;
}

body:not(.is-authed) .neo-auth-pane {
  display: grid !important;
  grid-area: 1 / 1 !important;
  gap: 16px !important;
}

body:not(.is-authed) .neo-auth-pane[hidden] {
  display: none !important;
}

body:not(.is-authed) .neo-field {
  display: grid !important;
  gap: 8px !important;
  margin: 0 !important;
}

body:not(.is-authed) .neo-field > span {
  color: var(--neo-text) !important;
  font-size: 12px !important;
  font-weight: 760 !important;
}

body:not(.is-authed) .neo-field input,
body:not(.is-authed) .neo-code-row input {
  width: 100% !important;
  height: 54px !important;
  min-height: 54px !important;
  border: 0 !important;
  border-radius: 14px !important;
  outline: none !important;
  background:
    linear-gradient(145deg, rgb(255 255 255 / 0.08), transparent),
    var(--neo-bg) !important;
  box-shadow: var(--neo-shadow-inset) !important;
  color: var(--neo-text) !important;
  padding: 0 16px !important;
  font-size: 15px !important;
  font-weight: 680 !important;
}

body:not(.is-authed) .neo-field input:focus,
body:not(.is-authed) .neo-code-row input:focus {
  box-shadow:
    inset 7px 7px 12px rgb(155 171 195 / 0.6),
    inset -7px -7px 12px rgb(255 255 255 / 0.64),
    0 0 0 2px rgb(85 103 216 / 0.9),
    0 0 0 7px rgb(85 103 216 / 0.08) !important;
}

body:not(.is-authed) .neo-code-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 120px !important;
  gap: 12px !important;
}

body:not(.is-authed) .neo-login-options {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  min-height: 24px !important;
  color: var(--neo-muted) !important;
  font-size: 12px !important;
  font-weight: 560 !important;
}

body:not(.is-authed) .neo-login-options label {
  display: inline-flex !important;
  align-items: center !important;
  gap: 9px !important;
}

body:not(.is-authed) .neo-login-options input {
  width: 18px !important;
  height: 18px !important;
  accent-color: var(--neo-accent) !important;
}

body:not(.is-authed) .neo-text-btn {
  border: 0 !important;
  background: transparent !important;
  color: var(--neo-accent) !important;
  cursor: pointer !important;
  font-size: 12px !important;
  font-weight: 820 !important;
  padding: 0 !important;
}

body:not(.is-authed) .neo-primary,
body:not(.is-authed) .neo-secondary {
  min-height: 54px !important;
  border: 0 !important;
  border-radius: 14px !important;
  cursor: pointer !important;
  font-weight: 820 !important;
}

body:not(.is-authed) .neo-primary {
  width: 100% !important;
  height: 54px !important;
  margin-top: 2px !important;
  background: linear-gradient(180deg, rgb(92 107 214) 0%, rgb(72 86 196) 100%) !important;
  color: #fff !important;
  font-size: 15px !important;
  box-shadow:
    0 12px 22px rgb(77 91 196 / 0.24),
    0 2px 4px rgb(55 66 160 / 0.16),
    inset 0 1px 0 rgb(255 255 255 / 0.2),
    inset 0 -1px 0 rgb(39 48 130 / 0.18) !important;
}

body:not(.is-authed) .neo-primary:hover {
  background: linear-gradient(180deg, rgb(99 114 220) 0%, rgb(76 91 202) 100%) !important;
  transform: translateY(-1px) !important;
}

body:not(.is-authed) .neo-secondary {
  background: var(--neo-bg) !important;
  color: var(--neo-text) !important;
  font-size: 12px !important;
  box-shadow: var(--neo-shadow-small) !important;
}

body:not(.is-authed) .neo-form-error {
  min-height: 18px !important;
  margin: -4px 0 0 !important;
  color: #c94b4b !important;
  font-size: 12px !important;
  font-weight: 760 !important;
}

body:not(.is-authed) .neo-auth-footer {
  display: flex !important;
  justify-content: center !important;
  min-height: 20px !important;
}

body:not(.is-authed) .neo-login-visual {
  position: relative !important;
  display: grid !important;
  min-height: 560px !important;
  place-items: center !important;
  perspective: 900px !important;
}

body:not(.is-authed) .neo-sculpture {
  position: relative !important;
  width: min(392px, 72vw) !important;
  aspect-ratio: 1 !important;
  border-radius: 999px !important;
  background:
    radial-gradient(circle at 50% 50%, var(--neo-bg) 0 29%, transparent 30%),
    conic-gradient(from 28deg, rgb(97 87 255 / 0.13), rgb(35 183 173 / 0.12), rgb(100 199 255 / 0.1), rgb(97 87 255 / 0.13)),
    radial-gradient(circle at 36% 30%, rgb(255 255 255 / 0.32), transparent 32%),
    var(--neo-bg) !important;
  box-shadow:
    var(--neo-shadow-raised),
    inset 0 0 0 18px rgb(255 255 255 / 0.12),
    inset 0 0 0 34px rgb(97 87 255 / 0.025),
    0 28px 70px rgb(97 87 255 / 0.08) !important;
  animation: neoSculptureBreath 8s ease-in-out infinite !important;
}

body:not(.is-authed) .neo-sculpture::before,
body:not(.is-authed) .neo-sculpture::after,
body:not(.is-authed) .neo-sculpture i {
  content: \"\" !important;
  position: absolute !important;
  display: block !important;
  border-radius: 999px !important;
  background: var(--neo-bg) !important;
}

body:not(.is-authed) .neo-sculpture::before {
  inset: 13% !important;
  z-index: 1 !important;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 44%, var(--neo-bg) 45% 100%),
    conic-gradient(from 0deg, rgb(255 255 255 / 0.22), rgb(85 103 216 / 0.09), rgb(35 183 173 / 0.1), rgb(255 255 255 / 0.22)) !important;
  box-shadow:
    inset 10px 10px 20px rgb(155 171 195 / 0.62),
    inset -10px -10px 20px rgb(255 255 255 / 0.68),
    inset 0 0 0 12px rgb(255 255 255 / 0.16) !important;
  animation: neoCounterTurn 48s linear infinite !important;
}

body:not(.is-authed) .neo-sculpture::after {
  inset: 32% !important;
  z-index: 3 !important;
  background:
    radial-gradient(circle at 38% 30%, rgb(255 255 255 / 0.3), transparent 34%),
    var(--neo-bg) !important;
  box-shadow: var(--neo-shadow-raised), inset 0 0 0 10px rgb(255 255 255 / 0.12) !important;
  animation: neoClockTurn 42s linear infinite reverse !important;
}

body:not(.is-authed) .neo-sculpture i {
  inset: 44% !important;
  z-index: 4 !important;
  box-shadow: var(--neo-shadow-inset), inset 0 0 0 8px rgb(35 183 173 / 0.045) !important;
}

body:not(.is-authed) .neo-sweep,
body:not(.is-authed) .neo-ticks,
body:not(.is-authed) .neo-orbit-path {
  position: absolute !important;
  display: block !important;
  border-radius: 999px !important;
}

body:not(.is-authed) .neo-sweep {
  inset: 6% !important;
  z-index: 2 !important;
  background: conic-gradient(from 0deg, transparent 0 62%, rgb(255 255 255 / 0.42) 67%, rgb(100 199 255 / 0.12) 70%, transparent 76% 100%) !important;
  opacity: 0.5 !important;
  animation: neoClockTurn 18s linear infinite !important;
}

body:not(.is-authed) .neo-ticks {
  inset: -4% !important;
  z-index: 0 !important;
  background: repeating-conic-gradient(from 0deg, rgb(85 103 216 / 0.16) 0 1deg, transparent 1deg 15deg) !important;
  mask-image: radial-gradient(circle, transparent 0 48%, #000 49% 51%, transparent 52%) !important;
  opacity: 0.62 !important;
  animation: neoCounterTurn 72s linear infinite !important;
}

body:not(.is-authed) .neo-orbit-path {
  inset: 10% !important;
  z-index: 4 !important;
  animation: neoClockTurn 28s linear infinite !important;
}

body:not(.is-authed) .neo-orbit-path::before {
  content: \"\" !important;
  position: absolute !important;
  width: 44px !important;
  height: 44px !important;
  right: 5% !important;
  top: 7% !important;
  border-radius: 999px !important;
  background:
    radial-gradient(circle at 34% 28%, rgb(255 255 255 / 0.42), transparent 36%),
    linear-gradient(145deg, rgb(228 235 244), rgb(213 224 238 / 0.9)) !important;
  box-shadow: var(--neo-shadow-small), 0 10px 22px rgb(35 183 173 / 0.08) !important;
}

body:not(.is-authed) .neo-visual-word {
  position: absolute !important;
  right: 5% !important;
  bottom: 11% !important;
  color: var(--neo-soft-muted) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

body:not(.is-authed) .neo-visual-dot {
  position: absolute !important;
  left: 12% !important;
  top: 19% !important;
  width: 24px !important;
  height: 24px !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, var(--neo-teal), var(--neo-sky)) !important;
  box-shadow: 5px 5px 10px rgb(50 139 135 / 0.28), -5px -5px 10px rgb(255 255 255 / 0.62) !important;
}

@keyframes neoClockTurn {
  to { transform: rotate(1turn); }
}

@keyframes neoCounterTurn {
  to { transform: rotate(-1turn); }
}

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

@media (max-width: 900px) {
  body:not(.is-authed) .neo-login-screen {
    padding: 20px !important;
  }

  body:not(.is-authed) .neo-login-shell {
    grid-template-columns: minmax(0, 480px) !important;
    gap: 24px !important;
    width: min(480px, 100%) !important;
  }

  body:not(.is-authed) .neo-login-visual {
    display: none !important;
  }
}

@media (max-width: 520px) {
  body:not(.is-authed) .neo-login-card {
    gap: 18px !important;
    padding: 24px !important;
    border-radius: 22px !important;
  }

  body:not(.is-authed) .neo-login-headline h1,
  body:not(.is-authed) .neo-flow-head h1 {
    font-size: 30px !important;
  }

  body:not(.is-authed) .neo-code-row {
    grid-template-columns: 1fr !important;
  }

  body:not(.is-authed) .neo-login-options {
    align-items: flex-start !important;
    flex-direction: column !important;
  }
}

/* New login final fit and button guard. */
body:not(.is-authed) .neo-login-screen {
  padding: 32px !important;
}

body:not(.is-authed) .neo-login-card {
  gap: 16px !important;
  max-height: calc(100svh - 64px) !important;
  padding: 32px !important;
}

body:not(.is-authed) #loginForm.neo-login-card {
  overflow: visible !important;
}

body:not(.is-authed) #forgotForm.neo-login-card,
body:not(.is-authed) #registerForm.neo-login-card {
  overflow: auto !important;
}

body:not(.is-authed) .neo-auth-stage {
  min-height: 238px !important;
}

body:not(.is-authed) #passwordLoginBtn.neo-primary,
body:not(.is-authed) #forgotSubmitBtn.neo-primary,
body:not(.is-authed) #registerForm .neo-primary {
  height: 54px !important;
  min-height: 54px !important;
  border-radius: 14px !important;
  background: linear-gradient(180deg, rgb(92 107 214) 0%, rgb(72 86 196) 100%) !important;
  box-shadow:
    0 12px 22px rgb(77 91 196 / 0.24),
    0 2px 4px rgb(55 66 160 / 0.16),
    inset 0 1px 0 rgb(255 255 255 / 0.2),
    inset 0 -1px 0 rgb(39 48 130 / 0.18) !important;
}

body:not(.is-authed) #passwordLoginBtn.neo-primary:hover,
body:not(.is-authed) #forgotSubmitBtn.neo-primary:hover,
body:not(.is-authed) #registerForm .neo-primary:hover {
  background: linear-gradient(180deg, rgb(99 114 220) 0%, rgb(76 91 202) 100%) !important;
}

body:not(.is-authed) .neo-secondary {
  border-radius: 14px !important;
}

@media (max-width: 900px) {
  body:not(.is-authed) .neo-login-card {
    max-height: none !important;
  }
}

/* Restore the original preview mood: cooler neutral background and clearer clock sculpture. */
body:not(.is-authed) .neo-login-screen {
  --neo-bg: #e4ebf4;
  --neo-text: #3d4852;
  --neo-muted: #6b7280;
  --neo-soft-muted: #8290a2;
  --neo-accent: #5567d8;
  --neo-accent-light: #7584e8;
  --neo-accent-deep: #4655c4;
  --neo-teal: #23b7ad;
  --neo-sky: #64c7ff;
  --neo-shadow-dark: rgb(155 171 195 / 0.66);
  --neo-shadow-light: rgb(255 255 255 / 0.68);
  --neo-shadow-raised: 9px 9px 16px var(--neo-shadow-dark), -9px -9px 16px var(--neo-shadow-light);
  --neo-shadow-raised-hover: 12px 12px 20px rgb(155 171 195 / 0.74), -12px -12px 20px rgb(255 255 255 / 0.74);
  --neo-shadow-small: 5px 5px 10px rgb(155 171 195 / 0.62), -5px -5px 10px rgb(255 255 255 / 0.62);
  --neo-shadow-inset: inset 6px 6px 10px rgb(155 171 195 / 0.62), inset -6px -6px 10px rgb(255 255 255 / 0.62);
  --neo-shadow-inset-deep: inset 10px 10px 20px rgb(155 171 195 / 0.7), inset -10px -10px 20px rgb(255 255 255 / 0.72);
  background:
    radial-gradient(circle at 18% 16%, rgb(154 124 255 / 0.13), transparent 30%),
    radial-gradient(circle at 82% 74%, rgb(35 183 173 / 0.14), transparent 32%),
    var(--neo-bg) !important;
}

body:not(.is-authed) .neo-login-card {
  background:
    linear-gradient(145deg, rgb(255 255 255 / 0.16), rgb(214 225 238 / 0.16)),
    var(--neo-bg) !important;
  box-shadow: var(--neo-shadow-raised), inset 1px 1px 0 rgb(255 255 255 / 0.32) !important;
}

body:not(.is-authed) .neo-sculpture {
  background:
    radial-gradient(circle at 50% 50%, var(--neo-bg) 0 29%, transparent 30%),
    conic-gradient(from 28deg, rgb(97 87 255 / 0.13), rgb(35 183 173 / 0.12), rgb(100 199 255 / 0.1), rgb(97 87 255 / 0.13)),
    radial-gradient(circle at 36% 30%, rgb(255 255 255 / 0.32), transparent 32%),
    var(--neo-bg) !important;
  box-shadow:
    var(--neo-shadow-raised),
    inset 0 0 0 18px rgb(255 255 255 / 0.12),
    inset 0 0 0 34px rgb(97 87 255 / 0.025),
    0 28px 70px rgb(97 87 255 / 0.08) !important;
}

body:not(.is-authed) .neo-sculpture::before {
  background:
    radial-gradient(circle at 50% 50%, transparent 0 44%, var(--neo-bg) 45% 100%),
    conic-gradient(from 0deg, rgb(255 255 255 / 0.22), rgb(85 103 216 / 0.09), rgb(35 183 173 / 0.1), rgb(255 255 255 / 0.22)) !important;
  box-shadow:
    var(--neo-shadow-inset-deep),
    inset 0 0 0 12px rgb(255 255 255 / 0.16),
    inset 0 0 0 28px rgb(100 199 255 / 0.035) !important;
}

body:not(.is-authed) .neo-sculpture::after {
  background:
    radial-gradient(circle at 38% 30%, rgb(255 255 255 / 0.34), transparent 34%),
    var(--neo-bg) !important;
  box-shadow:
    var(--neo-shadow-raised-hover),
    inset 0 0 0 10px rgb(255 255 255 / 0.12),
    0 18px 38px rgb(97 87 255 / 0.07) !important;
}

body:not(.is-authed) .neo-sculpture i {
  background:
    radial-gradient(circle at 35% 30%, rgb(255 255 255 / 0.28), transparent 35%),
    var(--neo-bg) !important;
  box-shadow:
    var(--neo-shadow-inset),
    inset 0 0 0 8px rgb(35 183 173 / 0.045) !important;
}

body:not(.is-authed) .neo-sweep {
  background: conic-gradient(from 0deg, transparent 0 62%, rgb(255 255 255 / 0.42) 67%, rgb(100 199 255 / 0.12) 70%, transparent 76% 100%) !important;
  opacity: 0.5 !important;
  mix-blend-mode: soft-light !important;
}

body:not(.is-authed) .neo-ticks {
  background: repeating-conic-gradient(from 0deg, rgb(85 103 216 / 0.16) 0 1deg, transparent 1deg 15deg) !important;
  opacity: 0.62 !important;
}

body:not(.is-authed) .neo-orbit-path::before {
  background:
    radial-gradient(circle at 34% 28%, rgb(255 255 255 / 0.42), transparent 36%),
    linear-gradient(145deg, rgb(228 235 244 / 1), rgb(213 224 238 / 0.9)) !important;
  box-shadow:
    var(--neo-shadow-small),
    0 10px 22px rgb(35 183 173 / 0.08) !important;
}

body:not(.is-authed) .neo-visual-dot {
  background: linear-gradient(135deg, var(--neo-teal), var(--neo-sky)) !important;
  box-shadow: 5px 5px 10px rgb(50 139 135 / 0.34), -5px -5px 10px rgb(255 255 255 / 0.62) !important;
}

/* Final override: unified date/month fields site-wide. */
body.is-authed input[type="date"],
body.is-authed input[type="month"],
body.is-authed #monthInput {
  box-sizing: border-box !important;
  width: auto !important;
  min-width: 172px !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 8px 38px 8px 13px !important;
  border: 1px solid rgba(209, 222, 240, 0.92) !important;
  border-radius: var(--radius-card) !important;
  outline: none !important;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,251,255,0.96)) !important;
  color: #243047 !important;
  font-family: var(--font-main) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.92), 0 1px 2px rgba(15, 23, 42, 0.035) !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease !important;
}

body.is-authed input[type="date"]::-webkit-date-and-time-value,
body.is-authed input[type="month"]::-webkit-date-and-time-value,
body.is-authed #monthInput::-webkit-date-and-time-value {
  min-height: 22px !important;
  text-align: left !important;
}

body.is-authed input[type="date"]::-webkit-calendar-picker-indicator,
body.is-authed input[type="month"]::-webkit-calendar-picker-indicator,
body.is-authed #monthInput::-webkit-calendar-picker-indicator {
  width: 18px !important;
  height: 18px !important;
  margin: 0 -28px 0 8px !important;
  padding: 0 !important;
  opacity: 0.58 !important;
  cursor: pointer !important;
  filter: saturate(0.7) contrast(0.95) !important;
}

body.is-authed input[type="date"]:hover,
body.is-authed input[type="month"]:hover,
body.is-authed #monthInput:hover {
  border-color: rgba(171, 196, 230, 0.96) !important;
  background: linear-gradient(180deg, #ffffff, rgba(245, 249, 255, 0.98)) !important;
}

body.is-authed input[type="date"]:focus,
body.is-authed input[type="month"]:focus,
body.is-authed #monthInput:focus {
  border-color: rgba(52, 120, 246, 0.62) !important;
  box-shadow: var(--focus-ring), inset 0 1px 0 rgba(255,255,255,0.94) !important;
}

body.is-authed .records-toolbar #monthInput,
body.is-authed .energy-overview-actions #monthInput,
body.is-authed .month-tools #monthInput {
  width: 100% !important;
}

body.is-authed .field input[type="date"],
body.is-authed .field input[type="month"] {
  width: 100% !important;
  min-width: 0 !important;
}

@media (max-width: 640px) {
  body.is-authed input[type="date"],
  body.is-authed input[type="month"],
  body.is-authed #monthInput {
    min-width: 0 !important;
    width: 100% !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 9px 38px 9px 12px !important;
    border-radius: 13px !important;
    font-size: 15px !important;
  }
}

/* Energy popover final: anchored beside "查看中", compact, all frosted glass. */
body.is-authed .energy-day-floating-panel.energy-day-floating-panel {
  position: fixed !important;
  box-sizing: border-box !important;
  z-index: 9999 !important;
  width: 278px !important;
  min-width: 0 !important;
  max-width: 278px !important;
  max-height: none !important;
  overflow: visible !important;
  border: 1px solid rgba(190, 213, 239, 0.16) !important;
  border-radius: 12px !important;
  background: rgba(220, 238, 255, 0.34) !important;
  box-shadow: 0 12px 30px rgba(35, 66, 105, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.42) !important;
  backdrop-filter: blur(22px) saturate(1.12) !important;
  -webkit-backdrop-filter: blur(22px) saturate(1.12) !important;
}

body.is-authed .energy-day-floating-panel *,
body.is-authed .energy-day-floating-panel *::before,
body.is-authed .energy-day-floating-panel *::after {
  box-sizing: border-box !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-head {
  padding: 6px 8px 5px !important;
  border-bottom: 1px solid rgba(195, 215, 238, 0.22) !important;
  background: transparent !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-head span {
  color: rgba(41, 109, 210, 0.82) !important;
  font-size: 8px !important;
  line-height: 1.1 !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-head strong {
  max-width: 220px !important;
  overflow: hidden !important;
  color: #18243a !important;
  font-size: 13px !important;
  line-height: 1.15 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-close {
  width: 21px !important;
  height: 21px !important;
  flex: 0 0 auto !important;
  border-color: rgba(157, 183, 214, 0.26) !important;
  background: rgba(255, 255, 255, 0.18) !important;
  color: #65758e !important;
  font-size: 15px !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-total {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 5px !important;
  padding: 6px 8px 3px !important;
  background: transparent !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-total p {
  min-width: 0 !important;
  padding: 5px 6px !important;
  border: 1px solid rgba(195, 215, 238, 0.18) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.14) !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-total span {
  color: #6d7e96 !important;
  font-size: 9px !important;
  line-height: 1.1 !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-total b {
  overflow: hidden !important;
  color: #162238 !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-body {
  display: grid !important;
  gap: 3px !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 4px 8px 8px !important;
  background: transparent !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-section {
  display: grid !important;
  min-width: 0 !important;
  gap: 1px !important;
  background: transparent !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-section header {
  display: flex !important;
  min-width: 0 !important;
  gap: 5px !important;
  align-items: center !important;
  background: transparent !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-section header strong {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
  color: #253149 !important;
  font-size: 10px !important;
  line-height: 1.1 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-section header em {
  flex: 0 1 auto !important;
  max-width: 96px !important;
  overflow: hidden !important;
  color: rgba(41, 109, 210, 0.82) !important;
  font-size: 9px !important;
  line-height: 1.1 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-table {
  display: table !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  table-layout: fixed !important;
  border: 0 !important;
  border-spacing: 0 !important;
  border-collapse: collapse !important;
  background: transparent !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-table tbody {
  display: table-row-group !important;
  background: transparent !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-table tr {
  display: table-row !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  background: transparent !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-table td {
  display: table-cell !important;
  box-sizing: border-box !important;
  width: auto !important;
  max-width: none !important;
  padding: 2px 4px !important;
  overflow: hidden !important;
  border-top: 1px solid rgba(195, 215, 238, 0.18) !important;
  background: transparent !important;
  color: #253149 !important;
  font-size: 9px !important;
  line-height: 1.15 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-table td:first-child {
  width: 58% !important;
  text-align: left !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-table td:last-child {
  width: 42% !important;
  font-weight: 800 !important;
  text-align: right !important;
}

@media (max-width: 640px) {
  body.is-authed .energy-day-floating-panel.energy-day-floating-panel {
    width: min(278px, calc(100vw - 24px)) !important;
    max-width: min(278px, calc(100vw - 24px)) !important;
  }
}

/* True final visual tone: white translucent popover, no blur. */
body.is-authed .energy-day-floating-panel.energy-day-floating-panel {
  border-color: rgba(205, 220, 238, 0.42) !important;
  background: rgba(255, 255, 255, 0.74) !important;
  box-shadow: 0 12px 26px rgba(35, 66, 105, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.70) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-total p {
  border-color: rgba(205, 220, 238, 0.36) !important;
  background: rgba(255, 255, 255, 0.42) !important;
}

/* True final: logistics detail inputs read like table cells, not capsules. */
body.is-authed .logistics-lines-table input,
body.is-authed .logistics-lines-table input:focus,
body.is-authed .logistics-lines-table input:hover {
  min-height: 30px !important;
  padding: 4px 6px !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.is-authed .logistics-lines-table td:focus-within {
  background: rgba(235, 244, 255, 0.78) !important;
  box-shadow: inset 0 0 0 1px rgba(83, 137, 230, 0.35) !important;
}

/* True final: logistics add rows control stays below the table. */
body.is-authed .logistics-lines-add {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 7px 0 2px !important;
  color: #748299 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

body.is-authed .logistics-plus-btn {
  display: inline-grid !important;
  width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
  place-items: center !important;
  border: 1px solid rgba(181, 204, 235, 0.8) !important;
  border-radius: 8px !important;
  background: rgba(247, 250, 255, 0.86) !important;
  color: #2f75df !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  box-shadow: none !important;
}

body.is-authed .logistics-lines-add select {
  width: auto !important;
  min-width: 76px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 3px 26px 3px 8px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 750 !important;
}

/* Absolute final: notes/action headers must not look or behave like sort controls. */
body.is-authed .interactive-table th[data-sortable="0"],
body.is-authed .interactive-table th.is-not-sortable {
  cursor: default !important;
}

body.is-authed .interactive-table th[data-sortable="0"] span,
body.is-authed .interactive-table th.is-not-sortable span {
  color: inherit !important;
}

/* Operation logs in system management. */
body.is-authed .operation-log-table table {
  min-width: 760px;
}

body.is-authed .operation-log-table td {
  vertical-align: top;
}

body.is-authed .operation-log-user {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

/* Final table affordance: notes and action headers are not sortable controls. */
body.is-authed .interactive-table th[data-sortable="0"],
body.is-authed .interactive-table th.is-not-sortable {
  cursor: default !important;
}

body.is-authed .interactive-table th[data-sortable="0"] span,
body.is-authed .interactive-table th.is-not-sortable span {
  color: inherit !important;
}

body.is-authed .logistics-lines-add {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 7px 0 2px !important;
  color: #748299 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

body.is-authed .logistics-plus-btn {
  display: inline-grid !important;
  width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
  place-items: center !important;
  border: 1px solid rgba(181, 204, 235, 0.8) !important;
  border-radius: 8px !important;
  background: rgba(247, 250, 255, 0.86) !important;
  color: #2f75df !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  box-shadow: none !important;
}

body.is-authed .logistics-lines-add select {
  width: auto !important;
  min-width: 76px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 3px 26px 3px 8px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 750 !important;
}

/* Final visual tone: white translucent popover, no blur. */
body.is-authed .energy-day-floating-panel.energy-day-floating-panel {
  border-color: rgba(205, 220, 238, 0.42) !important;
  background: rgba(255, 255, 255, 0.74) !important;
  box-shadow: 0 12px 26px rgba(35, 66, 105, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.70) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-total p {
  border-color: rgba(205, 220, 238, 0.36) !important;
  background: rgba(255, 255, 255, 0.42) !important;
}

/* Logistics reimbursement modal: compact editable multi-destination table. */
.modal-panel:has(.logistics-lines) {
  width: min(880px, calc(100vw - 28px));
}

.logistics-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.logistics-form .field {
  min-width: 0;
}

.logistics-lines {
  display: grid;
  gap: 8px;
}

.logistics-lines-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logistics-lines-head strong {
  color: var(--text);
  font-size: 15px;
}

.logistics-lines-head span {
  margin-right: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.logistics-lines-table {
  overflow: visible;
  border: 1px solid rgba(219, 230, 242, 0.9);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.logistics-lines-table table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
}

.logistics-lines-table th,
.logistics-lines-table td {
  padding: 5px 4px;
  border-bottom: 1px solid rgba(226, 234, 244, 0.82);
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
}

.logistics-lines-table th {
  color: #748299;
  font-weight: 800;
  background: rgba(245, 248, 252, 0.72);
}

.logistics-lines-table th:nth-child(1),
.logistics-lines-table td:nth-child(1) {
  width: 30px;
}

.logistics-lines-table th:nth-child(2),
.logistics-lines-table td:nth-child(2) {
  width: 92px;
}

.logistics-lines-table th:nth-child(8),
.logistics-lines-table td:nth-child(8) {
  width: 82px;
}

.logistics-lines-table th:nth-child(9),
.logistics-lines-table td:nth-child(9) {
  width: 58px;
}

.logistics-lines-table th:nth-child(10),
.logistics-lines-table td:nth-child(10) {
  width: 48px;
}

.logistics-lines-table input {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  padding: 5px 6px;
  border-radius: 4px;
  background: rgba(248, 251, 255, 0.72);
  font-size: 12px;
}

.logistics-lines-table b {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logistics-lines-table .row-icon-btn {
  min-width: 38px;
  min-height: 28px;
  padding: 0 6px;
  font-size: 11px;
}

.logistics-lines-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 0 2px;
  color: #748299;
  font-size: 12px;
  font-weight: 700;
}

.logistics-plus-btn {
  display: inline-grid;
  width: 30px;
  height: 30px;
  min-height: 30px;
  place-items: center;
  border: 1px solid rgba(181, 204, 235, 0.8);
  border-radius: 8px;
  background: rgba(247, 250, 255, 0.86);
  color: #2f75df;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.logistics-lines-add select {
  width: auto;
  min-width: 76px;
  height: 30px;
  min-height: 30px;
  padding: 3px 26px 3px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 750;
}

@media (max-width: 640px) {
  .modal-panel:has(.logistics-lines) {
    width: min(372px, calc(100vw - 18px));
  }

  .logistics-form {
    grid-template-columns: 1fr 1fr;
  }

  .logistics-lines-head {
    flex-wrap: wrap;
  }

  .logistics-lines-table th,
  .logistics-lines-table td {
    padding: 4px 2px;
    font-size: 9px;
  }

  .logistics-lines-table input {
    min-height: 28px;
    padding: 4px;
    font-size: 10px;
  }

  .logistics-lines-table th:nth-child(2),
  .logistics-lines-table td:nth-child(2),
  .logistics-lines-table th:nth-child(8),
  .logistics-lines-table td:nth-child(8) {
    width: 54px;
  }

  .logistics-lines-table th:nth-child(10),
  .logistics-lines-table td:nth-child(10) {
    width: 34px;
  }
}

/* Energy popover tone: white translucent, no frosted blur. */
body.is-authed .energy-day-floating-panel.energy-day-floating-panel {
  border-color: rgba(205, 220, 238, 0.45) !important;
  background: rgba(255, 255, 255, 0.72) !important;
  box-shadow: 0 12px 26px rgba(35, 66, 105, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-total p {
  border-color: rgba(205, 220, 238, 0.42) !important;
  background: rgba(255, 255, 255, 0.36) !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-close {
  background: rgba(255, 255, 255, 0.48) !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-table td {
  border-top-color: rgba(205, 220, 238, 0.34) !important;
  background: transparent !important;
}

/* Energy popover final: anchored beside "查看中", compact, all frosted glass. */
body.is-authed .energy-day-floating-panel.energy-day-floating-panel {
  position: fixed !important;
  box-sizing: border-box !important;
  z-index: 9999 !important;
  width: 278px !important;
  min-width: 0 !important;
  max-width: 278px !important;
  max-height: none !important;
  overflow: visible !important;
  border: 1px solid rgba(190, 213, 239, 0.16) !important;
  border-radius: 12px !important;
  background: rgba(220, 238, 255, 0.34) !important;
  box-shadow: 0 12px 30px rgba(35, 66, 105, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.42) !important;
  backdrop-filter: blur(22px) saturate(1.12) !important;
  -webkit-backdrop-filter: blur(22px) saturate(1.12) !important;
}

body.is-authed .energy-day-floating-panel *,
body.is-authed .energy-day-floating-panel *::before,
body.is-authed .energy-day-floating-panel *::after {
  box-sizing: border-box !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-head {
  padding: 6px 8px 5px !important;
  border-bottom: 1px solid rgba(195, 215, 238, 0.22) !important;
  background: transparent !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-head span {
  color: rgba(41, 109, 210, 0.82) !important;
  font-size: 8px !important;
  line-height: 1.1 !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-head strong {
  max-width: 220px !important;
  overflow: hidden !important;
  color: #18243a !important;
  font-size: 13px !important;
  line-height: 1.15 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-close {
  width: 21px !important;
  height: 21px !important;
  flex: 0 0 auto !important;
  border-color: rgba(157, 183, 214, 0.26) !important;
  background: rgba(255, 255, 255, 0.18) !important;
  color: #65758e !important;
  font-size: 15px !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-total {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 5px !important;
  padding: 6px 8px 3px !important;
  background: transparent !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-total p {
  min-width: 0 !important;
  padding: 5px 6px !important;
  border: 1px solid rgba(195, 215, 238, 0.18) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.14) !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-total span {
  color: #6d7e96 !important;
  font-size: 9px !important;
  line-height: 1.1 !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-total b {
  overflow: hidden !important;
  color: #162238 !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-body {
  display: grid !important;
  gap: 3px !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 4px 8px 8px !important;
  background: transparent !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-section {
  display: grid !important;
  min-width: 0 !important;
  gap: 1px !important;
  background: transparent !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-section header {
  display: flex !important;
  min-width: 0 !important;
  gap: 5px !important;
  align-items: center !important;
  background: transparent !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-section header strong {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
  color: #253149 !important;
  font-size: 10px !important;
  line-height: 1.1 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-section header em {
  flex: 0 1 auto !important;
  max-width: 96px !important;
  overflow: hidden !important;
  color: rgba(41, 109, 210, 0.82) !important;
  font-size: 9px !important;
  line-height: 1.1 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-table {
  display: table !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  table-layout: fixed !important;
  border: 0 !important;
  border-spacing: 0 !important;
  border-collapse: collapse !important;
  background: transparent !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-table tbody {
  display: table-row-group !important;
  background: transparent !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-table tr {
  display: table-row !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  background: transparent !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-table td {
  display: table-cell !important;
  box-sizing: border-box !important;
  width: auto !important;
  max-width: none !important;
  padding: 2px 4px !important;
  overflow: hidden !important;
  border-top: 1px solid rgba(195, 215, 238, 0.18) !important;
  background: transparent !important;
  color: #253149 !important;
  font-size: 9px !important;
  line-height: 1.15 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-table td:first-child {
  width: 58% !important;
  text-align: left !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-table td:last-child {
  width: 42% !important;
  font-weight: 800 !important;
  text-align: right !important;
}

@media (max-width: 640px) {
  body.is-authed .energy-day-floating-panel.energy-day-floating-panel {
    width: min(278px, calc(100vw - 24px)) !important;
    max-width: min(278px, calc(100vw - 24px)) !important;
  }
}

/* Absolute final override: compact no-scroll energy popover beside the detail button. */
body.is-authed .energy-day-floating-panel.energy-day-floating-panel {
  position: fixed !important;
  box-sizing: border-box !important;
  z-index: 999 !important;
  width: 270px !important;
  min-width: 0 !important;
  max-width: 270px !important;
  max-height: none !important;
  overflow: visible !important;
  border: 1px solid rgba(190, 211, 236, 0.14) !important;
  border-radius: 12px !important;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.5), rgba(232, 243, 255, 0.22)) !important;
  box-shadow: 0 12px 28px rgba(35, 66, 105, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.58) !important;
  backdrop-filter: blur(20px) saturate(1.08) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.08) !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-head {
  padding: 6px 8px 5px !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-head span {
  font-size: 8px !important;
  line-height: 1.1 !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-head strong {
  max-width: 210px !important;
  overflow: hidden !important;
  font-size: 13px !important;
  line-height: 1.15 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-close {
  width: 22px !important;
  height: 22px !important;
  flex: 0 0 auto !important;
  font-size: 16px !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-total {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 5px !important;
  padding: 6px 8px 2px !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-total p {
  min-width: 0 !important;
  padding: 5px 6px !important;
  border-radius: 8px !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-total span {
  font-size: 9px !important;
  line-height: 1.1 !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-total b {
  overflow: hidden !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-body {
  display: grid !important;
  gap: 3px !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 4px 8px 8px !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-section {
  display: grid !important;
  min-width: 0 !important;
  gap: 1px !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-section header {
  display: flex !important;
  min-width: 0 !important;
  gap: 5px !important;
  align-items: center !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-section header strong {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
  font-size: 10px !important;
  line-height: 1.1 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-section header em {
  flex: 0 1 auto !important;
  max-width: 96px !important;
  overflow: hidden !important;
  font-size: 9px !important;
  line-height: 1.1 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-table {
  display: table !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  table-layout: fixed !important;
  border-spacing: 0 !important;
  border-collapse: collapse !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-table tbody {
  display: table-row-group !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-table tr {
  display: table-row !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-table td {
  display: table-cell !important;
  box-sizing: border-box !important;
  width: auto !important;
  max-width: none !important;
  padding: 2px 4px !important;
  overflow: hidden !important;
  border-top: 1px solid rgba(219, 230, 242, 0.24) !important;
  background: transparent !important;
  color: #273449 !important;
  font-size: 9px !important;
  line-height: 1.15 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-table td:first-child {
  width: 58% !important;
  text-align: left !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-table td:last-child {
  width: 42% !important;
  font-weight: 800 !important;
  text-align: right !important;
}

@media (max-width: 640px) {
  body.is-authed .energy-day-floating-panel.energy-day-floating-panel {
    width: min(270px, calc(100vw - 24px)) !important;
    max-width: min(270px, calc(100vw - 24px)) !important;
  }
}

/* Final override: energy daily detail must stay as a narrow popover near the action. */
body.is-authed .energy-overview-layout {
  position: relative !important;
}

body.is-authed .energy-day-floating-panel {
  box-sizing: border-box !important;
  width: 288px !important;
  min-width: 0 !important;
  max-width: min(288px, calc(100vw - 24px)) !important;
  max-height: min(520px, calc(100vh - 32px)) !important;
  overflow: hidden !important;
  border: 1px solid rgba(190, 211, 236, 0.16) !important;
  border-radius: 12px !important;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.48), rgba(228, 241, 255, 0.24)) !important;
  box-shadow: 0 12px 26px rgba(35, 66, 105, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.52) !important;
}

body.is-authed .energy-day-float-head {
  min-width: 0 !important;
  padding: 7px 9px 6px !important;
}

body.is-authed .energy-day-float-head > div {
  min-width: 0 !important;
}

body.is-authed .energy-day-float-head strong {
  max-width: 220px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.is-authed .energy-day-float-total {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  padding: 6px 9px 2px !important;
}

body.is-authed .energy-day-float-total p {
  min-width: 0 !important;
  padding: 6px 7px !important;
}

body.is-authed .energy-day-float-total b {
  overflow: hidden !important;
  font-size: 12px !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.is-authed .energy-day-float-body {
  display: grid !important;
  gap: 5px !important;
  max-height: min(432px, calc(100vh - 120px)) !important;
  overflow: hidden !important;
  padding: 6px 9px 9px !important;
}

body.is-authed .energy-day-float-section {
  min-width: 0 !important;
  gap: 2px !important;
}

body.is-authed .energy-day-float-section header {
  min-width: 0 !important;
}

body.is-authed .energy-day-float-section header strong,
body.is-authed .energy-day-float-section header em {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.is-authed .energy-day-float-table {
  display: table !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  table-layout: fixed !important;
}

body.is-authed .energy-day-float-table tbody,
body.is-authed .energy-day-float-table tr {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

body.is-authed .energy-day-float-table td {
  box-sizing: border-box !important;
  max-width: 0 !important;
  padding: 3px 5px !important;
  overflow: hidden !important;
  background: transparent !important;
  font-size: 10px !important;
  line-height: 1.15 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.is-authed .energy-day-float-table td:first-child {
  width: 60% !important;
}

body.is-authed .energy-day-float-table td:last-child {
  width: 40% !important;
  text-align: right !important;
}

@media (max-width: 640px) {
  body.is-authed .energy-day-floating-panel {
    left: 14px !important;
    right: auto !important;
    width: calc(100vw - 28px) !important;
    max-width: calc(100vw - 28px) !important;
  }
}

/* Final mobile archive tables: compact rows instead of oversized cards. */
@media (max-width: 640px) {
  body.is-authed .material-inventory-groups + .grouped-mobile-records,
  body.is-authed .product-inventory-groups + .mobile-record-list {
    display: none !important;
  }

  body.is-authed .material-category-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body.is-authed .material-category-strip article {
    min-height: 74px !important;
    padding: 10px 12px !important;
    border-radius: 12px !important;
  }

  body.is-authed .material-category-strip strong,
  body.is-authed .material-category-strip b {
    font-size: 14px !important;
  }

  body.is-authed .material-category-strip span,
  body.is-authed .material-category-strip em {
    font-size: 12px !important;
  }

  body.is-authed .material-inventory-groups,
  body.is-authed .material-inventory-groups.material-warehouse-groups {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  body.is-authed .material-inventory-groups .material-warehouse-block {
    padding: 10px !important;
    border-radius: 12px !important;
  }

  body.is-authed .material-inventory-groups .material-warehouse-block > header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 6px 8px !important;
    align-items: center !important;
  }

  body.is-authed .material-inventory-groups .material-warehouse-block > header > div:first-child {
    min-width: 0 !important;
  }

  body.is-authed .material-inventory-groups .material-warehouse-block > header strong {
    font-size: 17px !important;
    line-height: 1.2 !important;
  }

  body.is-authed .material-inventory-groups .material-warehouse-block > header em {
    justify-self: end !important;
    font-size: 12px !important;
    white-space: nowrap !important;
  }

  body.is-authed .material-inventory-groups .category-filter,
  body.is-authed .material-inventory-groups .category-tools {
    grid-column: 1 / -1 !important;
    width: 100% !important;
  }

  body.is-authed .material-inventory-groups .category-filter input {
    min-height: 36px !important;
    padding: 0 11px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
  }

  body.is-authed .material-inventory-table {
    overflow: hidden !important;
    border: 1px solid rgba(219, 230, 242, 0.86) !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.72) !important;
  }

  body.is-authed .material-inventory-table table,
  body.is-authed .material-inventory-table thead,
  body.is-authed .material-inventory-table tbody {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  body.is-authed .material-inventory-table tr {
    display: grid !important;
    grid-template-columns: minmax(82px, 1.4fr) 56px 46px 46px 48px !important;
    gap: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
  }

  body.is-authed .material-inventory-table.product-inventory-table tr {
    grid-template-columns: minmax(82px, 1.35fr) 54px 56px 56px 48px !important;
  }

  body.is-authed .material-inventory-table thead tr {
    min-height: 30px !important;
    background: rgba(243, 247, 252, 0.92) !important;
  }

  body.is-authed .material-inventory-table tbody tr {
    min-height: 44px !important;
    border-top: 1px solid rgba(226, 234, 244, 0.88) !important;
  }

  body.is-authed .material-inventory-table th,
  body.is-authed .material-inventory-table td {
    display: flex !important;
    min-width: 0 !important;
    width: auto !important;
    padding: 5px 4px !important;
    border: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    color: #475569 !important;
    font-size: 11px !important;
    line-height: 1.15 !important;
    text-align: center !important;
    white-space: nowrap !important;
  }

  body.is-authed .material-inventory-table th {
    color: #708198 !important;
    font-size: 10px !important;
    font-weight: 800 !important;
  }

  body.is-authed .material-inventory-table th:nth-child(1),
  body.is-authed .material-inventory-table td:nth-child(1) {
    justify-content: flex-start !important;
    padding-left: 8px !important;
    text-align: left !important;
  }

  body.is-authed .material-inventory-table td:nth-child(2)::before,
  body.is-authed .material-inventory-table td:nth-child(3)::before,
  body.is-authed .material-inventory-table td:nth-child(4)::before {
    display: none !important;
    content: none !important;
  }

  body.is-authed .material-inventory-table strong {
    display: block !important;
    max-width: 100% !important;
    overflow: hidden !important;
    color: #172033 !important;
    font-size: 13px !important;
    line-height: 1.15 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.is-authed .material-inventory-table td > span,
  body.is-authed .material-inventory-table .product-batch-cell {
    display: block !important;
    max-width: 100% !important;
    margin-top: 2px !important;
    overflow: hidden !important;
    color: #8a96a8 !important;
    font-size: 10px !important;
    line-height: 1.1 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.is-authed .material-inventory-table b {
    color: #172033 !important;
    font-size: 12px !important;
    line-height: 1.1 !important;
  }

  body.is-authed .material-inventory-table button {
    min-width: 40px !important;
    min-height: 28px !important;
    padding: 0 7px !important;
    border-radius: 8px !important;
    font-size: 11px !important;
  }

  body.is-authed .material-inventory-table td.product-batch-cell {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

/* Unified date/month inputs across every authenticated page. */
body.is-authed input[type="date"],
body.is-authed input[type="month"],
body.is-authed #monthInput {
  box-sizing: border-box !important;
  width: auto !important;
  min-width: 172px !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 8px 38px 8px 13px !important;
  border: 1px solid rgba(209, 222, 240, 0.92) !important;
  border-radius: var(--radius-card) !important;
  outline: none !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,251,255,0.96)) !important;
  color: #243047 !important;
  font-family: var(--font-main) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.92), 0 1px 2px rgba(15, 23, 42, 0.035) !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease !important;
}

body.is-authed input[type="date"]::-webkit-date-and-time-value,
body.is-authed input[type="month"]::-webkit-date-and-time-value,
body.is-authed #monthInput::-webkit-date-and-time-value {
  min-height: 22px !important;
  text-align: left !important;
}

body.is-authed input[type="date"]::-webkit-calendar-picker-indicator,
body.is-authed input[type="month"]::-webkit-calendar-picker-indicator,
body.is-authed #monthInput::-webkit-calendar-picker-indicator {
  width: 18px !important;
  height: 18px !important;
  margin: 0 -28px 0 8px !important;
  padding: 0 !important;
  opacity: 0.58 !important;
  cursor: pointer !important;
  filter: saturate(0.7) contrast(0.95) !important;
}

body.is-authed input[type="date"]:hover,
body.is-authed input[type="month"]:hover,
body.is-authed #monthInput:hover {
  border-color: rgba(171, 196, 230, 0.96) !important;
  background: linear-gradient(180deg, #ffffff, rgba(245, 249, 255, 0.98)) !important;
}

body.is-authed input[type="date"]:focus,
body.is-authed input[type="month"]:focus,
body.is-authed #monthInput:focus {
  border-color: rgba(52, 120, 246, 0.62) !important;
  box-shadow: var(--focus-ring), inset 0 1px 0 rgba(255,255,255,0.94) !important;
}

body.is-authed .records-toolbar #monthInput,
body.is-authed .energy-overview-actions #monthInput,
body.is-authed .month-tools #monthInput {
  width: 100% !important;
}

body.is-authed .field input[type="date"],
body.is-authed .field input[type="month"] {
  width: 100% !important;
  min-width: 0 !important;
}

@media (max-width: 640px) {
  body.is-authed input[type="date"],
  body.is-authed input[type="month"],
  body.is-authed #monthInput {
    min-width: 0 !important;
    width: 100% !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 9px 38px 9px 12px !important;
    border-radius: 13px !important;
    font-size: 15px !important;
  }
}

/* Energy daily floating detail: table-style popover anchored beside the clicked action. */
body.is-authed .energy-overview.panel,
body.is-authed .energy-overview-layout {
  overflow: visible !important;
}

body.is-authed .energy-day-floating-panel {
  top: 28px;
  right: auto !important;
  width: min(390px, calc(100% - 24px)) !important;
  max-width: 390px !important;
  max-height: calc(100vh - 36px) !important;
  overflow: hidden !important;
  border-color: rgba(176, 202, 232, 0.18) !important;
  border-radius: 13px !important;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.42), rgba(232, 243, 255, 0.22)) !important;
  box-shadow: 0 14px 32px rgba(43, 72, 108, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.52) !important;
}

body.is-authed .energy-day-float-head {
  padding: 7px 9px 6px !important;
}

body.is-authed .energy-day-float-head strong {
  font-size: 13px !important;
  line-height: 1.15 !important;
}

body.is-authed .energy-day-float-close {
  width: 22px !important;
  height: 22px !important;
  font-size: 16px !important;
}

body.is-authed .energy-day-float-total {
  gap: 5px !important;
  padding: 7px 9px 2px !important;
}

body.is-authed .energy-day-float-total p {
  padding: 6px 7px !important;
  border-color: rgba(216, 228, 242, 0.24) !important;
  background: rgba(255, 255, 255, 0.26) !important;
}

body.is-authed .energy-day-float-body {
  gap: 5px !important;
  max-height: calc(100vh - 176px) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  padding: 6px 9px 9px !important;
  scrollbar-width: thin !important;
}

body.is-authed .energy-day-float-section {
  gap: 3px !important;
}

body.is-authed .energy-day-float-section header strong {
  font-size: 11px !important;
}

body.is-authed .energy-day-float-section header em {
  font-size: 9px !important;
}

body.is-authed .energy-day-float-section ul {
  display: none !important;
}

body.is-authed .energy-day-float-table {
  width: 100% !important;
  min-width: 0 !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  overflow: hidden !important;
  border: 1px solid rgba(219, 230, 242, 0.22) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.18) !important;
  table-layout: fixed !important;
}

body.is-authed .energy-day-float-table tr + tr td {
  border-top: 1px solid rgba(219, 230, 242, 0.18) !important;
}

body.is-authed .energy-day-float-table td {
  padding: 4px 6px !important;
  color: #607087 !important;
  font-size: 10px !important;
  line-height: 1.2 !important;
  background: transparent !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body.is-authed .energy-day-float-table td:first-child {
  width: auto !important;
  text-align: left !important;
}

body.is-authed .energy-day-float-table td:last-child {
  width: 86px !important;
  color: #1f2d43 !important;
  font-weight: 780 !important;
  text-align: right !important;
}

body.is-authed .energy-day-float-section li {
  min-height: 34px !important;
  padding: 4px 5px !important;
  border-color: rgba(219, 230, 242, 0.2) !important;
  background: rgba(255, 255, 255, 0.2) !important;
}

body.is-authed .energy-day-float-section li span {
  font-size: 9px !important;
}

body.is-authed .energy-day-float-section li b {
  font-size: 10px !important;
}

@media (max-width: 900px) {
  body.is-authed .energy-day-floating-panel {
    width: min(350px, calc(100% - 20px)) !important;
    max-width: calc(100% - 20px) !important;
  }
}

/* Mobile final polish: readable action bars, native date fields, and dashboard header fit. */
@media (max-width: 640px) {
  body.is-authed input[type="month"],
  body.is-authed #monthInput {
    box-sizing: border-box !important;
    min-width: 0 !important;
    min-height: 42px !important;
    border: 1px solid rgba(190, 211, 244, 0.86) !important;
    border-radius: 13px !important;
    padding: 8px 12px !important;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,250,255,0.94)) !important;
    color: #172033 !important;
    font-size: 15px !important;
    font-weight: 650 !important;
    line-height: 1.2 !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.94), 0 1px 2px rgba(15, 23, 42, 0.04) !important;
    appearance: none !important;
    -webkit-appearance: none !important;
  }

  body.is-authed input[type="month"]::-webkit-calendar-picker-indicator,
  body.is-authed #monthInput::-webkit-calendar-picker-indicator {
    width: 18px !important;
    height: 18px !important;
    margin-left: 6px !important;
    opacity: 0.72 !important;
    cursor: pointer !important;
  }

  body.is-authed input[type="month"]:focus,
  body.is-authed #monthInput:focus {
    border-color: rgba(52, 120, 246, 0.68) !important;
    box-shadow: 0 0 0 3px rgba(52, 120, 246, 0.12) !important;
  }

  body.is-authed .energy-overview-actions {
    align-items: stretch !important;
    justify-content: stretch !important;
    width: 100% !important;
    gap: 8px !important;
  }

  body.is-authed .energy-overview-actions .month-tools {
    flex: 1 1 0 !important;
    min-width: 0 !important;
  }

  body.is-authed .energy-overview-actions #monthInput {
    width: 100% !important;
  }

  body.is-authed .records-toolbar .toolbar-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
  }

  body.is-authed .records-toolbar .toolbar-actions .ghost-btn,
  body.is-authed .records-toolbar .toolbar-actions .soft-primary,
  body.is-authed .records-toolbar .toolbar-actions .file-action-btn {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 38px !important;
    padding: 7px 8px !important;
    white-space: normal !important;
    overflow: visible !important;
    overflow-wrap: anywhere !important;
    text-align: center !important;
    line-height: 1.2 !important;
  }

  body.is-authed .dashboard-title-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    width: 100% !important;
    flex-wrap: nowrap !important;
  }

  body.is-authed .dashboard-title-row h2 {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    font-size: 22px !important;
    line-height: 1.18 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
  }

  body.is-authed .dashboard-periods {
    flex: 0 0 auto !important;
    grid-template-columns: repeat(3, minmax(34px, 1fr)) !important;
    gap: 2px !important;
    padding: 3px !important;
    border-radius: 16px !important;
  }

  body.is-authed .dashboard-periods button {
    min-width: 0 !important;
    min-height: 28px !important;
    padding: 0 7px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
  }
}

* {
  box-sizing: border-box;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(140, 162, 204, 0.48) transparent;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(169, 190, 229, 0.52), rgba(130, 157, 210, 0.36));
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background-color: rgba(113, 145, 205, 0.58);
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background: var(--bg);
  color: var(--text);
}

body:not(.is-authed) .sidebar,
body:not(.is-authed) .main,
body:not(.is-authed) .drawer {
  visibility: hidden;
  pointer-events: none;
}

.fluid-bg-canvas,
.fluid-grain-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

.fluid-bg-canvas {
  z-index: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(164, 226, 198, 0.18), transparent 32%),
    radial-gradient(circle at 82% 18%, rgba(52, 120, 246, 0.32), transparent 38%),
    linear-gradient(135deg, #00144f, #012696 56%, #001b66);
}

.fluid-grain-overlay {
  z-index: 0;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23grain)' opacity='0.95'/%3E%3C/svg%3E");
  background-size: 220px 220px;
}

body.no-webgl .fluid-bg-canvas {
  background:
    radial-gradient(circle at 20% 20%, rgba(164, 226, 198, 0.24), transparent 34%),
    radial-gradient(circle at 76% 28%, rgba(52, 120, 246, 0.30), transparent 40%),
    radial-gradient(circle at 48% 84%, rgba(164, 226, 198, 0.14), transparent 34%),
    linear-gradient(135deg, #00144f, #012696 58%, #000d3d);
}

body.locked {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
  font-size: 13px;
  line-height: 1.35;
  letter-spacing: 0;
}

button,
.panel,
.mini-kpis section,
.record-card,
.mobile-stock-row,
.compact-row,
.mobile-record-row,
.nav button,
.welcome-chip {
  transition:
    transform var(--motion-base) var(--ease-soft),
    box-shadow var(--motion-base) var(--ease-soft),
    border-color 220ms ease,
    background 220ms ease,
    color 180ms ease,
    opacity var(--motion-base) ease,
    filter var(--motion-base) ease;
}

button:active {
  transform: scale(0.99);
  transition-duration: 90ms;
  transition-timing-function: var(--ease-press);
}

.app {
  min-height: 100vh;
  height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  position: relative;
  z-index: 1;
  isolation: isolate;
  overflow: hidden;
  transition: grid-template-columns 460ms var(--ease-soft);
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.88), rgba(249,251,255,0.78)),
    #ffffff;
  backdrop-filter: blur(16px);
  color: var(--text);
  padding: 16px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  border-right: 1px solid var(--line);
  box-shadow: 10px 0 30px rgba(44, 55, 83, 0.035);
  min-width: 220px;
  max-width: 420px;
  transition:
    min-width 460ms var(--ease-soft),
    max-width 460ms var(--ease-soft),
    padding 460ms var(--ease-soft);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  margin-bottom: 14px;
  border: 1px solid rgba(214, 223, 238, 0.92);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(243, 248, 255, 0.92));
  box-shadow:
    0 14px 28px rgba(44, 55, 83, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  position: relative;
  overflow: hidden;
  transition:
    transform 360ms var(--ease-float),
    box-shadow 360ms var(--ease-float),
    border-color 260ms ease,
    background 260ms ease;
}

.brand::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background:
    radial-gradient(circle at 22% 16%, rgba(255, 255, 255, 0.88), transparent 34%),
    linear-gradient(120deg, transparent 18%, rgba(255, 255, 255, 0.54) 42%, transparent 62%);
  opacity: 0.42;
  transform: translateX(-18%);
  pointer-events: none;
  transition: opacity 360ms ease, transform 520ms var(--ease-float);
}

.brand:hover {
  transform: translateY(-1px);
  border-color: rgba(142, 170, 224, 0.42);
  box-shadow:
    0 20px 42px rgba(44, 55, 83, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.brand:hover::after {
  opacity: 0.68;
  transform: translateX(8%);
}

.brand.large {
  padding: 0;
}

.brand.large .brand-mark {
  width: 46px;
  height: 46px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background:
    radial-gradient(circle at 35% 26%, rgba(255, 255, 255, 0.98) 0 18%, rgba(255, 255, 255, 0.48) 19% 34%, transparent 35%),
    linear-gradient(145deg, #eef7ff 0%, #dbeaff 52%, #f4f8ff 100%);
  color: var(--primary);
  font-weight: 700;
  border: 1px solid rgba(120, 151, 212, 0.24);
  box-shadow:
    0 10px 18px rgba(71, 96, 143, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -8px 14px rgba(91, 132, 205, 0.08);
  overflow: hidden;
  animation: fishFloat 5.6s var(--ease-float) infinite;
  transition:
    transform 360ms var(--ease-float),
    box-shadow 360ms var(--ease-float),
    background 260ms ease;
}

.brand-mark img {
  width: 86%;
  height: 86%;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.65));
  transition: transform 420ms var(--ease-float), filter 320ms ease;
}

.brand:hover .brand-mark {
  transform: translateY(-1px) scale(1.035);
}

.brand:hover .brand-mark img {
  transform: rotate(-2deg) scale(1.04);
  filter: drop-shadow(0 2px 2px rgba(67, 94, 148, 0.14));
}

.brand strong {
  display: block;
  font-size: 14px;
  line-height: 1.15;
  font-weight: 650;
}

.brand span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.brand-user {
  position: relative;
  display: block;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0;
  min-height: 0;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.15;
  font-weight: 700;
  text-align: left;
  transition:
    color 180ms ease,
    transform 180ms var(--ease-float);
}

.brand-user:hover {
  color: #2469b8;
  background: linear-gradient(100deg, #1f7bff, #12bfa4 48%, #8358ff);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transform: translateY(-1px);
}

.brand-user:focus-visible {
  outline: 2px solid rgba(52, 120, 246, 0.34);
  outline-offset: 2px;
}

.nav {
  display: grid;
  gap: 4px;
}

.nav-section {
  margin: 12px 8px 4px;
  color: #94a0b0;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav .nav-section {
  width: auto;
  min-height: 26px;
  padding: 4px 6px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  justify-content: space-between;
  text-align: left;
  line-height: 1;
}

.nav .nav-section:hover {
  color: #64748b;
  background: rgba(238, 245, 255, 0.66);
  transform: none;
  box-shadow: none;
}

.nav .nav-section::after {
  display: none;
}

.nav-section span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.nav-section span::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(122, 141, 168, 0.30);
  box-shadow: 0 0 0 3px rgba(122, 141, 168, 0.05);
}

.nav-section i {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border-radius: 999px;
  position: relative;
  background: rgba(238, 245, 255, 0.72);
}

.nav-section i::before {
  content: "";
  position: absolute;
  inset: 5px 4px 4px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform 180ms ease;
}

.nav-section.is-collapsed i::before {
  transform: rotate(-45deg) translate(-1px, 1px);
}

.nav-group-items {
  display: grid;
  gap: 4px;
}

.nav-group-items[hidden] {
  display: none;
}

.nav button {
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 600;
  position: relative;
  isolation: isolate;
  border: 1px solid transparent;
  overflow: hidden;
  transition:
    transform 260ms var(--ease-float),
    box-shadow 260ms var(--ease-float),
    border-color 220ms ease,
    background 220ms ease,
    color 180ms ease;
}

.nav button::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.54), transparent);
  opacity: 1;
  transform: translateX(-28%);
  pointer-events: none;
  transition: opacity 260ms ease, transform 420ms var(--ease-float);
}

.nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav button.renaming {
  cursor: text;
}

.nav-rename-input {
  min-width: 0;
  width: 100%;
  height: 28px;
  border: 1px solid rgba(108, 99, 255, 0.38);
  border-radius: 8px;
  padding: 0 7px;
  background: white;
  color: var(--text);
  font-weight: 600;
  outline: none;
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.12);
}

.nav button[draggable="true"] {
  user-select: none;
}

.nav button:active {
  cursor: grabbing;
}

.nav button:hover,
.nav button.active {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(244,248,252,0.88));
  border-color: rgba(214, 225, 238, 0.86);
}

@supports (color: color-mix(in srgb, red, white)) {
  .nav button:hover,
  .nav button.active {
  background:
    radial-gradient(circle at 14% 50%, color-mix(in srgb, var(--nav-soft, #eef3f8) 68%, transparent), transparent 38%),
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(246,249,252,0.9));
  border-color: color-mix(in srgb, var(--nav-accent, #7189a8) 18%, rgba(216, 226, 244, 0.9));
  }
}

.nav button:hover,
.nav button.active {
  color: #252a36;
  box-shadow: 0 12px 24px rgba(66, 83, 126, 0.07), inset 0 1px 0 rgba(255,255,255,0.9);
}

.nav button:hover {
  transform: translateX(2px);
}

.nav button:hover::after,
.nav button.active::after {
  opacity: 0.55;
  transform: translateX(18%);
}

.nav .nav-section:hover {
  color: #64748b;
  background: rgba(238, 245, 255, 0.66);
  border-color: transparent;
  box-shadow: none;
  transform: none;
}

.nav .nav-section.active {
  color: #48627e;
  background: rgba(238, 245, 255, 0.54);
  border-color: transparent;
  box-shadow: none;
}

.nav .nav-section:hover::after,
.nav .nav-section.active::after {
  display: none;
}

.nav .nav-section.active::before {
  display: none;
}

.nav button.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: var(--nav-accent, #7f93b8);
}

.nav .nav-icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 34% 24%, rgba(255,255,255,0.82), transparent 34%),
    linear-gradient(145deg, var(--nav-soft, #eef3f8), rgba(255,255,255,0.72));
  flex: 0 0 auto;
  color: var(--nav-accent, #68758d);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 6px 12px rgba(58, 79, 122, 0.05);
  transition:
    transform 260ms var(--ease-float),
    box-shadow 260ms var(--ease-float),
    background 220ms ease,
    color 180ms ease;
}

.nav button:hover .nav-icon,
.nav button.active .nav-icon {
  transform: translateY(-1px) scale(1.03);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.94), 0 10px 18px rgba(58, 79, 122, 0.10);
}

.nav button.active .nav-icon {
  background:
    radial-gradient(circle at 34% 24%, rgba(255,255,255,0.92), transparent 34%),
    linear-gradient(145deg, var(--nav-soft-active, var(--nav-soft, #eef3f8)), rgba(255,255,255,0.82));
  color: var(--nav-accent-strong, var(--nav-accent, #68758d));
}

.nav button[data-route="dashboard"] {
  --nav-soft: #eef5ff;
  --nav-soft-active: #e3efff;
  --nav-accent: #2f7ed8;
  --nav-accent-strong: #2469b8;
}

.nav button[data-route="materials"],
.nav button[data-route="customers"],
.nav button[data-route="materialIn"],
.nav button[data-route="salesOut"],
.nav button[data-route="trace"] {
  --nav-soft: #fff2e9;
  --nav-soft-active: #ffe8d9;
  --nav-accent: #d47843;
  --nav-accent-strong: #b96231;
}

.nav button[data-route="products"],
.nav button[data-route="reports"] {
  --nav-soft: #f0edff;
  --nav-soft-active: #e8e2ff;
  --nav-accent: #5967f3;
  --nav-accent-strong: #4755d8;
}

.nav button[data-route="formula"],
.nav button[data-route="production"],
.nav button[data-route="inventory"],
.nav button[data-route="settings"] {
  --nav-soft: #eefaf5;
  --nav-soft-active: #ddf4ea;
  --nav-accent: #17a978;
  --nav-accent-strong: #0e8b61;
}

.nav button[data-route="suppliers"],
.nav button[data-route="purchase"],
.nav button[data-route="finishedIn"],
.nav button[data-route="transactions"] {
  --nav-soft: #eef5ff;
  --nav-soft-active: #e3efff;
  --nav-accent: #2f7ed8;
  --nav-accent-strong: #2469b8;
}

.nav button[data-route="equipmentPurchase"],
.nav button[data-route="stocktake"] {
  --nav-soft: #f3f5fa;
  --nav-soft-active: #e8ebf2;
  --nav-accent: #596172;
  --nav-accent-strong: #444d5c;
}

.menu-resize-handle {
  position: absolute;
  top: 0;
  right: 0;
  width: 10px;
  height: 100%;
  cursor: ew-resize;
  z-index: 6;
}

.menu-resize-handle::after {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 4px;
  border-left: 2px solid transparent;
  border-radius: 999px;
}

.menu-resize-handle:hover::after,
body.resizing-menu .menu-resize-handle::after {
  border-left-color: rgba(108, 99, 255, 0.42);
}

.sidebar-collapse-btn {
  position: fixed;
  z-index: 12;
  left: calc(var(--sidebar-width) - 15px);
  top: 112px;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(202, 214, 231, 0.94);
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding: 0 0 2px;
  background: rgba(255, 255, 255, 0.94);
  color: #68758d;
  box-shadow: 0 8px 20px rgba(58, 79, 122, 0.13), inset 0 1px 0 rgba(255,255,255,0.94);
  cursor: pointer;
  font-size: 23px;
  line-height: 1;
  transition:
    left 460ms var(--ease-soft),
    transform 220ms var(--ease-float),
    box-shadow 220ms ease,
    border-color 220ms ease,
    color 180ms ease;
}

.sidebar-collapse-btn:hover {
  color: #2f7ed8;
  border-color: rgba(128, 168, 224, 0.74);
  box-shadow: 0 12px 24px rgba(58, 79, 122, 0.17), inset 0 1px 0 rgba(255,255,255,0.98);
  transform: translateX(-1px);
}

body.sidebar-collapsed:not(.sidebar-auto-expanded) .sidebar {
  min-width: var(--sidebar-collapsed-width);
  max-width: var(--sidebar-collapsed-width);
  padding-inline: 8px;
}

body.sidebar-collapsed:not(.sidebar-auto-expanded) .sidebar .brand {
  justify-content: center;
  gap: 0;
  padding: 7px;
  margin-bottom: 10px;
}

body.sidebar-collapsed:not(.sidebar-auto-expanded) .sidebar .brand > div:not(.brand-mark),
body.sidebar-collapsed:not(.sidebar-auto-expanded) .sidebar .nav-label {
  display: none;
}

body.sidebar-collapsed:not(.sidebar-auto-expanded) .sidebar .brand-mark {
  width: 38px;
  height: 38px;
}

body.sidebar-collapsed:not(.sidebar-auto-expanded) .sidebar .nav {
  gap: 4px;
}

body.sidebar-collapsed:not(.sidebar-auto-expanded) .sidebar .nav-section {
  display: none;
}

body.sidebar-collapsed:not(.sidebar-auto-expanded) .sidebar .nav-group-items {
  display: grid !important;
  gap: 4px;
}

body.sidebar-collapsed:not(.sidebar-auto-expanded) .sidebar .nav button {
  justify-content: center;
  gap: 0;
  padding: 8px 5px;
}

body.sidebar-collapsed:not(.sidebar-auto-expanded) .sidebar .nav button:hover {
  transform: translateY(-1px);
}

body.sidebar-collapsed:not(.sidebar-auto-expanded) .sidebar .menu-resize-handle {
  display: none;
}

body.sidebar-collapsed:not(.sidebar-auto-expanded) .sidebar-collapse-btn {
  left: calc(var(--sidebar-collapsed-width) - 15px);
}

body.sidebar-collapsed.sidebar-auto-expanded .sidebar {
  min-width: var(--sidebar-expanded-width, 264px);
  max-width: var(--sidebar-expanded-width, 264px);
  padding: 16px 12px;
  box-shadow: 14px 0 36px rgba(44, 55, 83, 0.08);
}

body.resizing-menu {
  user-select: none;
  cursor: ew-resize;
}

.nav .nav-icon svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 1.9;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.main {
  min-width: 0;
  min-height: 0;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.main::before {
  content: "";
  position: fixed;
  left: var(--sidebar-width);
  right: 0;
  top: 56px;
  height: 240px;
  pointer-events: none;
  opacity: 0.22;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.86), rgba(255,255,255,0.18) 58%, transparent 100%),
    radial-gradient(circle at 22% 0%, rgba(130, 183, 226, 0.10), transparent 260px);
  mask-image: linear-gradient(180deg, #000, transparent 88%);
  z-index: -1;
  transition: left 320ms var(--ease-soft);
}

.topbar {
  min-height: 52px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.86), rgba(248, 251, 255, 0.76)),
    #ffffff;
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 8px 16px;
  position: sticky;
  top: 0;
  z-index: 10;
  flex: 0 0 auto;
  flex-wrap: nowrap;
}

.title-block {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  margin-right: 0;
  white-space: nowrap;
}

.welcome-chip {
  margin-right: auto;
  color: #3a4050;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(44, 55, 83, 0.035);
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.title-block .eyebrow {
  order: 2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0;
  font-weight: 700;
}

.title-block h1 {
  order: 1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

h2 {
  font-size: 16px;
  line-height: 1.25;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

h3 {
  font-size: 15px;
  line-height: 1.3;
  font-weight: 700;
  margin-bottom: 10px;
}

.top-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.top-todo-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.user-chip,
.status,
.tag {
  border-radius: 999px;
  padding: 7px 10px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  white-space: nowrap;
}

button.user-chip {
  border: 0;
  cursor: pointer;
}

.content {
  padding: 14px 18px 36px;
  animation: contentSettle 360ms var(--ease-soft) both;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  view-transition-name: page-content;
  will-change: opacity, transform, filter;
}

.content.page-entering {
  animation: pageContentIn 300ms var(--ease-soft) both;
}

.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.toolbar-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.file-action-input {
  display: none;
}

.file-action-btn {
  min-height: 32px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid #dfe6f2;
  color: #506073;
  box-shadow: 0 8px 18px rgba(44, 55, 83, 0.035);
}

.file-action-btn:hover {
  color: #273142;
  border-color: rgba(89, 103, 243, 0.24);
  background: rgba(255, 255, 255, 0.95);
}

.records-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.records-toolbar .filters {
  display: grid;
  grid-template-columns: minmax(150px, 174px) minmax(200px, 1fr);
  align-items: center;
  width: auto;
  flex: 1 1 380px;
  min-width: 0;
}

.records-toolbar .filters:has(.month-tools:only-child) {
  flex: 0 0 auto;
  grid-template-columns: minmax(150px, 174px);
}

.records-toolbar.is-no-month {
  justify-content: flex-start;
}

.records-toolbar.is-no-month .filters {
  flex: 0 1 360px;
  grid-template-columns: minmax(240px, 1fr);
}

.records-toolbar.is-no-month .toolbar-actions {
  justify-content: flex-start;
}

.records-toolbar #monthInput {
  width: 100%;
}

.month-tools {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.records-toolbar .inline-filter {
  width: 100%;
}

.records-toolbar .toolbar-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  width: auto;
  flex: 0 0 auto;
}

.compact-toolbar {
  justify-content: flex-end;
  min-height: 32px;
  margin-bottom: -34px;
  pointer-events: none;
}

.compact-toolbar .primary-btn,
.compact-toolbar .toolbar-actions {
  pointer-events: auto;
  position: relative;
  z-index: 2;
}

.compact-toolbar + .table-tools {
  padding-right: 150px;
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
  --filter-control-width: 240px;
}

.filters input,
.filters select,
.field input,
.field select,
.field textarea {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 10px;
  padding: 7px 9px;
  min-height: 34px;
  color: var(--text);
  outline: none;
  font-size: 13px;
  transition:
    border-color 220ms ease,
    box-shadow 220ms ease,
    background 220ms ease,
    transform 220ms var(--ease-float);
}

.filters input {
  width: min(var(--filter-control-width), 100%);
  min-width: 0;
}

.filters select {
  width: min(var(--filter-control-width), 100%);
  min-width: 0;
}

.filters select,
.field select,
.modal-panel select,
.production-form .scroll-table select,
.user-role-select,
.mini-label select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #7d8796 50%),
    linear-gradient(135deg, #7d8796 50%, transparent 50%),
    linear-gradient(145deg, rgba(255,255,255,0.96), rgba(247,250,255,0.92));
  background-position:
    calc(100% - 15px) 50%,
    calc(100% - 10px) 50%,
    0 0;
  background-size: 5px 5px, 5px 5px, 100% 100%;
  background-repeat: no-repeat;
  padding-right: 30px;
}

.filters input:focus,
.filters select:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(108, 99, 255, 0.55);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.10), 0 10px 20px rgba(58, 79, 122, 0.06);
  transform: translateY(-1px);
  animation: control-pop 260ms var(--ease-float);
}

@keyframes control-pop {
  0% {
    transform: translateY(0) scale(0.985);
  }
  100% {
    transform: translateY(-1px) scale(1);
  }
}

.primary-btn,
.ghost-btn,
.danger-btn,
.icon-btn {
  border: 0;
  border-radius: 10px;
  min-height: 32px;
  padding: 0 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 600;
  white-space: nowrap;
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: white;
  box-shadow: 0 16px 32px rgba(94, 108, 255, 0.22);
}

.primary-btn.wide {
  width: 100%;
}

.primary-btn:hover {
  background: linear-gradient(135deg, #5260f5, #299cff);
  transform: translateY(-1px);
  box-shadow: 0 20px 38px rgba(94, 108, 255, 0.26);
}

.soft-primary,
#quickBatchBtn {
  background: linear-gradient(145deg, rgba(255,255,255,0.98), rgba(244,248,255,0.9));
  color: #273142;
  box-shadow: 0 10px 22px rgba(58, 79, 122, 0.05), inset 0 1px 0 rgba(255,255,255,0.9);
  border: 1px solid rgba(217, 225, 238, 0.92);
}

.soft-primary:hover,
#quickBatchBtn:hover {
  background: linear-gradient(145deg, rgba(255,255,255,1), rgba(239,246,255,0.95));
  color: #263247;
  border-color: rgba(108, 99, 255, 0.30);
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(58, 79, 122, 0.10), inset 0 1px 0 rgba(255,255,255,0.96);
}

.compact-toolbar .soft-primary {
  min-height: 30px;
  padding: 0 12px;
  font-size: 13px;
}

.ghost-btn {
  background: linear-gradient(145deg, rgba(255,255,255,0.98), rgba(247,250,255,0.92));
  border: 1px solid var(--line);
  color: var(--text);
  box-shadow: 0 8px 18px rgba(58, 79, 122, 0.04), inset 0 1px 0 rgba(255,255,255,0.88);
}

.ghost-btn.wide {
  width: 100%;
}

.text-btn {
  border: 0;
  background: transparent;
  color: #5260f5;
  min-height: 28px;
  padding: 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  padding: 4px;
  border: 1px solid #edf1f7;
  border-radius: 10px;
  background: #f8faff;
}

.auth-tabs button {
  border: 0;
  border-radius: 8px;
  min-height: 32px;
  background: transparent;
  color: #778194;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
}

.auth-tabs button.active {
  background: #ffffff;
  color: #263247;
  box-shadow: 0 8px 20px rgba(50, 61, 90, 0.08);
}

.auth-stage {
  display: grid;
  min-height: 128px;
  align-items: start;
}

.auth-pane {
  display: grid;
  gap: 10px;
  min-height: 128px;
  align-content: start;
}

.auth-pane[hidden] {
  display: none;
}

.auth-pane > input {
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 10px;
  padding: 7px 9px;
  min-height: 34px;
  color: var(--text);
  outline: none;
  font-size: 13px;
  width: 100%;
}

.auth-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 2px 0 16px;
}

.auth-footer span {
  width: 1px;
  height: 12px;
  background: #dfe5ef;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: -1px;
}

.remember-password {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #6e7c8d;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  user-select: none;
}

.remember-password input {
  width: 14px;
  height: 14px;
  accent-color: #3478f6;
}

.compact-action {
  margin: 2px;
}

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

.code-row input {
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 10px;
  padding: 7px 9px;
  min-height: 34px;
  color: var(--text);
  outline: none;
  font-size: 13px;
  width: 100%;
}

.code-row .ghost-btn {
  min-height: 34px;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.embedded-code-row {
  margin-top: 6px;
}

.danger-btn {
  background: rgba(217, 67, 67, 0.1);
  color: var(--danger);
}

.file-btn {
  position: relative;
  overflow: hidden;
}

.file-btn input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.maintenance-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.maintenance-actions > button,
.maintenance-actions > .file-btn {
  flex: 0 0 auto;
  min-height: 38px;
  white-space: nowrap;
}

.maintenance-actions > .file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 124px;
  max-width: 150px;
  padding: 0 14px;
}

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

  .maintenance-actions > button,
  .maintenance-actions > .file-btn {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 760px) {
  .maintenance-actions {
    grid-template-columns: 1fr;
  }
}

.maintenance-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  margin: 8px 0 0;
}

.backup-list ul,
.system-info dl {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.backup-list li,
.system-info div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.backup-list li {
  grid-template-columns: minmax(0, 1fr) auto auto;
  list-style: none;
}

.backup-restore-btn {
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.backup-list span,
.system-info dd {
  overflow-wrap: anywhere;
  min-width: 0;
}

.backup-list b,
.system-info dt {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 600;
}

.system-info dd {
  margin: 0;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.45;
  text-align: left;
}

.icon-btn {
  width: 40px;
  padding: 0;
  background: var(--surface-2);
  color: var(--text);
  font-size: 20px;
}

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

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

.dashboard-kpis {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 10px;
}

.dashboard-kpis .kpi {
  min-height: 128px;
  padding: 16px;
  border-color: rgba(224, 231, 239, 0.92);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 26px rgba(58, 79, 122, 0.065), inset 0 1px 0 rgba(255,255,255,0.92);
  align-content: space-between;
}

.dashboard-kpis .kpi::before {
  content: "";
  position: absolute;
  top: 15px;
  right: 16px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--primary-2);
  box-shadow: 0 0 0 5px rgba(47, 155, 255, 0.10);
  animation: kpiPulse 1.9s ease-in-out infinite;
}

.dashboard-kpis .kpi:nth-child(2)::before {
  background: #7c8cff;
  box-shadow: 0 0 0 5px rgba(124, 140, 255, 0.11);
}

.dashboard-kpis .kpi:nth-child(3)::before {
  background: #62c596;
  box-shadow: 0 0 0 5px rgba(98, 197, 150, 0.12);
}

@keyframes kpiPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.18);
    opacity: 1;
  }
}

.two-col {
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
}

.trace-toolbar {
  align-items: flex-start;
}

.trace-toolbar .filters {
  max-width: 520px;
}

.trace-toolbar .primary-btn {
  flex: 0 0 auto;
  min-height: 36px;
  padding-inline: 16px;
}

.trace-layout {
  grid-template-columns: minmax(360px, 0.9fr) minmax(340px, 1.1fr);
  align-items: stretch;
  min-height: max(360px, calc(100vh - 172px));
}

.trace-layout > .panel {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.trace-layout > .panel > .trace,
.trace-layout > .panel > .trace-material-table,
.trace-layout > .panel > .trace-material-list {
  flex: 1 1 auto;
}

.trace-material-table table {
  min-width: 0;
  table-layout: auto;
}

.trace-material-table th,
.trace-material-table td {
  padding: 10px 12px;
  white-space: nowrap;
}

.dashboard-stage {
  margin-bottom: 10px;
  border: 1px solid rgba(219, 228, 241, 0.86);
  border-radius: 22px;
  background:
    radial-gradient(circle at 18% 0%, rgba(232, 249, 255, 0.88), transparent 260px),
    radial-gradient(circle at 92% 18%, rgba(255, 246, 222, 0.7), transparent 240px),
    linear-gradient(135deg, rgba(248,250,252,0.96), rgba(236,243,247,0.9));
  box-shadow: 0 18px 44px rgba(58, 79, 122, 0.08), inset 0 1px 0 rgba(255,255,255,0.88);
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(250px, 0.92fr) minmax(420px, 1.55fr);
  gap: 12px;
  padding: 12px;
}

.dashboard-stage::before {
  content: "";
  position: absolute;
  inset: auto 26px 78px 26px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(137, 151, 170, 0.24), transparent);
  pointer-events: none;
}

.stage-card {
  border-radius: 18px;
  border: 1px solid rgba(225, 232, 241, 0.86);
  background: rgba(255,255,255,0.82);
  box-shadow: 0 12px 28px rgba(58, 79, 122, 0.07), inset 0 1px 0 rgba(255,255,255,0.92);
  padding: 18px;
  position: relative;
  z-index: 2;
}

.stage-order {
  display: grid;
  align-content: space-between;
  min-height: 232px;
}

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

.stage-card-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  line-height: 1.1;
  color: #151923;
}

.stage-card-head span {
  border-radius: 999px;
  padding: 5px 8px;
  background: #c9f0a9;
  color: #254a21;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.stage-card h2 {
  margin: 0 0 14px;
  font-size: 18px;
  line-height: 1.2;
}

.stage-progress {
  height: 5px;
  border-radius: 999px;
  background: #e8ecf1;
  overflow: hidden;
  margin-bottom: 14px;
}

.stage-progress span {
  display: block;
  width: 68%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5ab6c8, #9fd59a, #e5bc63);
}

.stage-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.stage-card dt {
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 3px;
}

.stage-card dd {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.stage-card p {
  margin: 0;
  color: #5f6878;
  font-size: 12px;
  line-height: 1.55;
}

.stage-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
  position: relative;
  z-index: 2;
}

.stage-metric {
  min-width: 0;
  min-height: 128px;
  border: 1px solid rgba(224, 231, 239, 0.86);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 12px 26px rgba(58, 79, 122, 0.065), inset 0 1px 0 rgba(255,255,255,0.9);
  padding: 16px;
  display: grid;
  align-content: space-between;
}

.stage-metric span,
.stage-metric small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #6b7484;
  font-size: 12px;
  line-height: 1.25;
}

.stage-metric strong {
  display: block;
  min-width: 0;
  color: #141923;
  font-size: 25px;
  line-height: 1.05;
  white-space: nowrap;
}

.stage-metric.metric-green {
  background:
    radial-gradient(circle at 18% 0%, rgba(255,255,255,0.82), transparent 54%),
    linear-gradient(150deg, rgba(215, 245, 206, 0.86), rgba(238, 249, 222, 0.78));
}

.stage-process {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(130px, 1fr) 44px minmax(130px, 1fr) 44px minmax(130px, 1fr);
  align-items: center;
  gap: 0;
  position: relative;
  z-index: 2;
  border: 1px solid rgba(223, 230, 239, 0.78);
  border-radius: 18px;
  background: rgba(255,255,255,0.58);
  padding: 10px;
}

.stage-process div {
  min-width: 0;
  border-radius: 14px;
  background: rgba(255,255,255,0.72);
  padding: 12px 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}

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

.stage-process strong {
  color: #26303d;
  font-size: 13px;
  line-height: 1.25;
}

.stage-process span {
  margin-top: 4px;
  color: #7b8594;
  font-size: 12px;
}

.stage-process i {
  display: block;
  height: 2px;
  margin-inline: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(91, 173, 195, 0.18), rgba(91, 173, 195, 0.72));
  position: relative;
}

.stage-process i::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-top: 2px solid rgba(91, 173, 195, 0.72);
  border-right: 2px solid rgba(91, 173, 195, 0.72);
  transform: translateY(-50%) rotate(45deg);
}

.stage-ticker {
  grid-column: 1 / -1;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(150px, 1fr);
  overflow-x: auto;
  border: 1px solid rgba(223, 230, 239, 0.70);
  border-radius: 18px;
  background: rgba(255,255,255,0.48);
  scrollbar-width: none;
  position: relative;
  z-index: 2;
}

.stage-ticker::-webkit-scrollbar {
  display: none;
}

.stage-ticker article {
  min-width: 0;
  padding: 12px 16px;
  border-right: 1px solid rgba(221, 227, 237, 0.72);
  background: rgba(255,255,255,0.34);
}

.stage-ticker article:nth-child(3n + 1) {
  background: rgba(234, 248, 252, 0.50);
}

.stage-ticker article:nth-child(3n + 2) {
  background: rgba(250, 244, 224, 0.54);
}

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

.stage-ticker strong {
  color: #252b36;
  font-size: 13px;
  line-height: 1.25;
}

.stage-ticker span {
  margin-top: 3px;
  color: #8a94a4;
  font-size: 11px;
}

@media (min-width: 1180px) {
  .content {
    padding-inline: 20px;
  }

  .inventory-dashboard .panel:first-child {
    grid-column: span 1;
  }
}

.inventory-dashboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.inventory-dashboard .panel {
  height: 100%;
  background:
    radial-gradient(circle at 18% 0%, rgba(255,255,255,0.95), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(250,253,255,0.9));
  border-color: rgba(219, 228, 243, 0.86);
  box-shadow: var(--bubble-shadow);
}

.inventory-dashboard .panel::after {
  height: 1px;
  background: linear-gradient(90deg, rgba(89,103,243,0.42), rgba(47,155,255,0.24), rgba(255,255,255,0.15));
}

.inventory-dashboard .dashboard-shanghai-panel {
  grid-column: 1 / -1;
  height: auto;
}

.dashboard-shanghai-panel h2 {
  margin-bottom: 8px;
}

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

.dashboard-shanghai-summary {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid rgba(221, 230, 245, 0.76);
  border-radius: 12px;
  background: rgba(248, 251, 255, 0.72);
}

.dashboard-shanghai-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.dashboard-shanghai-summary strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.dashboard-shanghai-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 6px;
}

.dashboard-shanghai-row {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 44px;
}

.category-section .dashboard-shanghai-row b {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
}

.mini-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(116px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
  justify-content: start;
}

.mini-kpis section {
  border: 1px solid rgba(219, 228, 243, 0.86);
  border-radius: 18px;
  background:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,0.92), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,0.96), rgba(246,250,255,0.9));
  min-height: 74px;
  padding: 11px 14px 10px;
  box-shadow: var(--bubble-shadow);
  display: grid;
  align-content: start;
  position: relative;
  overflow: hidden;
}

.mini-kpis section:hover,
.panel:hover,
.record-card:hover,
.mobile-stock-row:hover,
.compact-row:hover {
  transform: translateY(-2px);
  box-shadow: var(--bubble-shadow-hover);
  border-color: rgba(190, 211, 246, 0.84);
}

.mini-kpis section::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(120deg, transparent 10%, rgba(255,255,255,0.58) 44%, transparent 68%);
  opacity: 0;
  transform: translateX(-30%);
  transition: opacity 320ms ease, transform 560ms var(--ease-float);
  pointer-events: none;
}

.mini-kpis section:hover::after {
  opacity: 0.72;
  transform: translateX(16%);
}

.mini-kpis section::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--primary);
  position: absolute;
  top: 11px;
  right: 12px;
  box-shadow: 0 0 0 5px rgba(89, 103, 243, 0.08);
  animation: softPulse 3.8s ease-in-out infinite;
}

.mini-kpis section:nth-child(2) {
  background: #ffffff;
}

.mini-kpis section.featured {
  border-color: rgba(219, 228, 243, 0.86);
  background:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,0.92), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,0.96), rgba(246,250,255,0.9));
  box-shadow: var(--bubble-shadow);
}

.mini-kpis section:nth-child(3) {
  background: #ffffff;
}

.mini-kpis section:nth-child(2)::before {
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(255, 139, 84, 0.10);
}

.mini-kpis section:nth-child(3)::before {
  background: var(--primary-2);
  box-shadow: 0 0 0 5px rgba(47, 155, 255, 0.10);
}

.mini-kpis span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  margin-bottom: 5px;
}

.mini-kpis strong {
  color: var(--text);
  font-size: 21px;
  font-weight: 650;
  line-height: 1.1;
  margin-bottom: 8px;
}

.today-plan {
  margin-bottom: 10px;
  border: 1px solid rgba(219, 228, 243, 0.86);
  border-radius: 18px;
  background:
    radial-gradient(circle at 10% 0%, rgba(255,255,255,0.94), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,0.96), rgba(246,250,255,0.90));
  box-shadow: var(--bubble-shadow);
  padding: 13px 14px;
  position: relative;
  overflow: hidden;
}

.today-plan::before {
  content: "";
  position: absolute;
  top: 15px;
  right: 16px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--primary-2);
  box-shadow: 0 0 0 5px rgba(47, 155, 255, 0.10);
}

.today-plan-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding-right: 18px;
}

.today-plan-head span,
.plan-materials > span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.25;
}

.today-plan-head strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.15;
}

.today-plan-head small {
  color: #657285;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.today-plan-body {
  display: grid;
  gap: 10px;
}

.plan-batches {
  display: grid;
  gap: 10px;
}

.plan-materials {
  min-width: 0;
  border: 1px solid rgba(226, 233, 243, 0.84);
  border-radius: 14px;
  background: rgba(255,255,255,0.66);
  padding: 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.88);
}

.plan-category {
  min-width: 0;
  border: 1px solid rgba(226, 233, 243, 0.82);
  border-radius: 14px;
  background: rgba(255,255,255,0.62);
  padding: 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.86);
}

.plan-category-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.plan-category-title strong {
  color: #304058;
  font-size: 13px;
  line-height: 1.2;
}

.plan-category-title span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.plan-kettle-grid {
  display: grid;
  grid-template-columns: repeat(var(--kettle-count), minmax(0, 1fr));
  gap: 8px;
}

.plan-kettle-card {
  min-width: 0;
  min-height: 96px;
  border: 1px solid rgba(216, 226, 241, 0.84);
  border-radius: 12px;
  background: rgba(255,255,255,0.72);
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.plan-kettle-card.is-empty {
  background: rgba(248, 251, 255, 0.58);
  color: var(--muted);
}

.plan-kettle-card span,
.plan-kettle-card strong,
.plan-kettle-card small,
.plan-kettle-card dd {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-kettle-card span {
  color: #5f6b7d;
  font-size: 12px;
  font-weight: 700;
}

.plan-kettle-card strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.1;
}

.plan-kettle-card small {
  color: #758194;
  font-size: 12px;
}

.plan-kettle-card dl {
  display: grid;
  gap: 4px;
  margin: auto 0 0;
}

.plan-kettle-card dl div {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
}

.plan-kettle-card dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.plan-kettle-card dd {
  margin: 0;
  color: #34445b;
  font-size: 12px;
  font-weight: 750;
}

.plan-materials div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0 18px;
  margin-top: 8px;
}

.plan-materials p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  padding: 7px 0;
  border-bottom: 1px solid rgba(226, 233, 243, 0.78);
  color: #334257;
  font-size: 12px;
  line-height: 1.2;
}

.plan-materials p:last-child {
  border-bottom: 0;
}

.plan-materials p strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.plan-materials p em {
  flex: 0 0 auto;
  color: #334257;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

.kpi-trend {
  justify-self: start;
  align-self: end;
  color: #6b7280;
  font-size: 11px;
  font-weight: 550;
  line-height: 1;
  white-space: nowrap;
}

.kpi-trend.up {
  color: #6b7280;
}

.kpi-trend.down {
  color: #7f8aa0;
}

.energy-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.energy-summary article,
.energy-total-grid article {
  border: 1px solid rgba(219, 228, 243, 0.86);
  border-radius: 16px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255,255,255,0.92), transparent 38%),
    linear-gradient(145deg, rgba(255,255,255,0.96), rgba(247,250,255,0.90));
  box-shadow: var(--bubble-shadow);
  padding: 12px 14px;
  min-width: 0;
}

.energy-summary span,
.energy-summary small,
.energy-total-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.energy-summary strong {
  display: block;
  margin: 4px 0;
  color: var(--text);
  font-size: 22px;
  line-height: 1.1;
}

.energy-panel {
  margin-bottom: 10px;
}

.energy-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.energy-panel-head h2,
.energy-panel-head p {
  margin-bottom: 0;
}

.energy-panel-head p {
  max-width: 520px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.energy-panel-head .primary-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.energy-total-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.energy-total-grid article {
  padding: 10px 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}

.energy-total-grid strong,
.energy-total-grid span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.energy-total-grid strong {
  display: block;
  color: var(--text);
  font-size: 14px;
}

.energy-overview {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.energy-overview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.energy-overview-head h2,
.energy-overview-head p {
  margin-bottom: 0;
}

.energy-overview-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.energy-overview-head .meter-sync-message {
  color: #9a5b00;
  font-weight: 650;
}

.energy-overview-head .primary-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.energy-overview-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
  flex-wrap: wrap;
}

.energy-overview-actions .month-tools {
  flex: 0 0 172px;
}

.energy-overview-actions #monthInput {
  width: 100%;
}

.energy-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.energy-overview-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(219, 228, 243, 0.86);
  border-radius: 14px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255,255,255,0.92), transparent 38%),
    linear-gradient(145deg, rgba(255,255,255,0.96), rgba(247,250,255,0.90));
  box-shadow: var(--bubble-shadow);
}

.energy-overview-card > span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.energy-overview-card strong {
  display: block;
  margin: 5px 0 8px;
  color: var(--text);
  font-size: 24px;
  line-height: 1.05;
}

.energy-overview-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.energy-overview-breakdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.energy-overview-breakdown.is-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.energy-overview-breakdown p {
  min-width: 0;
  margin: 0;
  padding: 7px 8px;
  border: 1px solid rgba(225, 232, 242, 0.9);
  border-radius: 10px;
  background: rgba(248, 251, 255, 0.92);
}

.energy-overview-breakdown span,
.energy-overview-breakdown b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.energy-overview-breakdown span {
  color: #687587;
  font-size: 11px;
  line-height: 1.2;
}

.energy-overview-breakdown b {
  margin-top: 2px;
  color: #2b3445;
  font-size: 13px;
  line-height: 1.2;
}

.energy-daily-summary {
  display: grid;
  gap: 6px;
}

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

.energy-daily-head strong {
  color: var(--text);
  font-size: 14px;
}

.energy-daily-head span {
  color: var(--muted);
  font-size: 12px;
}

.energy-daily-table {
  overflow: hidden;
  border: 1px solid rgba(222, 230, 240, 0.92);
  border-radius: 10px;
}

.energy-overview-layout {
  position: relative;
}

.energy-daily-table table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.energy-daily-table th,
.energy-daily-table td {
  padding: 6px 8px;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.energy-daily-table th:not(:first-child),
.energy-daily-table td:not(:first-child) {
  text-align: right;
}

.energy-daily-table th:first-child,
.energy-daily-table td:first-child {
  width: 82px;
}

.energy-daily-table th:last-child,
.energy-daily-table td:last-child {
  width: 66px;
  text-align: center;
}

.energy-day-detail-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 1px;
  border: 0;
  color: #6b82a1;
  background: transparent;
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}

.energy-day-detail-btn::after {
  color: #9aabc0;
  content: "›";
  font-size: 13px;
  line-height: 0.8;
  transition: transform 180ms ease;
}

.energy-day-detail-btn[aria-expanded="true"]::after {
  transform: rotate(0deg);
}

.energy-day-detail-btn:hover {
  color: #3478f6;
  background: transparent;
}

.energy-day-detail-btn[aria-expanded="true"] {
  color: #3478f6;
}

.energy-day-floating-panel {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 20;
  width: min(348px, calc(100% - 36px));
  overflow: visible;
  border: 1px solid rgba(177, 204, 235, 0.26);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.5), rgba(231, 243, 255, 0.26));
  box-shadow: 0 16px 38px rgba(58, 91, 130, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(22px) saturate(1.12);
  -webkit-backdrop-filter: blur(22px) saturate(1.12);
}

.energy-day-floating-panel[hidden] {
  display: none;
}

.energy-day-float-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px 7px;
  border-bottom: 1px solid rgba(210, 224, 240, 0.34);
}

.energy-day-float-head span {
  display: block;
  color: #5e8dd6;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .12em;
}

.energy-day-float-head strong {
  display: block;
  margin-top: 1px;
  color: #172235;
  font-size: 14px;
}

.energy-day-float-close {
  width: 24px;
  height: 24px;
  border: 1px solid rgba(184, 205, 229, 0.38);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  color: #6d7b90;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.energy-day-float-total {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 8px 10px 3px;
}

.energy-day-float-total p {
  margin: 0;
  padding: 7px 8px;
  border: 1px solid rgba(216, 228, 242, 0.32);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.32);
}

.energy-day-float-total span,
.energy-day-float-total b {
  display: block;
}

.energy-day-float-total span {
  color: #7c8aa0;
  font-size: 10px;
}

.energy-day-float-total b {
  margin-top: 1px;
  color: #1d2a40;
  font-size: 13px;
}

.energy-day-float-body {
  display: grid;
  gap: 7px;
  max-height: none;
  overflow: visible;
  padding: 8px 10px 10px;
}

.energy-day-float-section {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.energy-day-float-section header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.energy-day-float-section header strong {
  color: #2c394d;
  font-size: 12px;
}

.energy-day-float-section header em {
  color: #5e8dd6;
  font-size: 10px;
  font-style: normal;
  font-weight: 780;
  white-space: nowrap;
}

.energy-day-float-section ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 5px;
  margin: 0;
  padding: 0;
}

.energy-day-float-section li {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  align-items: center;
  min-width: 0;
  padding: 5px 6px;
  border: 1px solid rgba(219, 230, 242, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.25);
}

.energy-day-float-section li span {
  min-width: 0;
  overflow: hidden;
  color: #607087;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.energy-day-float-section li b {
  color: #1f2d43;
  font-size: 11px;
  white-space: nowrap;
}

.energy-day-float-section li.is-empty {
  opacity: .62;
}

@media (max-width: 900px) {
  .energy-day-floating-panel {
    left: 14px;
    right: 14px;
    top: 14px;
    width: auto;
  }

  .energy-day-float-body {
    overflow: visible;
  }
}

.energy-day-detail-row td {
  padding: 0 7px 7px;
  background: rgba(247, 250, 255, 0.78);
}

.energy-day-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  padding: 7px;
  border: 1px solid rgba(222, 230, 240, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.energy-day-detail-grid p {
  min-width: 0;
  margin: 0;
}

.energy-day-detail-grid span,
.energy-day-detail-grid b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.energy-day-detail-grid span {
  color: #8794a6;
  font-size: 10px;
}

.energy-day-detail-grid b {
  margin-top: 2px;
  color: #3a4658;
  font-size: 11px;
}

.energy-gas-readings,
.energy-public-readings {
  display: grid;
  gap: 8px;
  box-sizing: border-box;
  justify-self: start;
  padding: 10px;
  border: 1px solid rgba(222, 230, 240, 0.92);
  border-radius: 12px;
  background: rgba(248, 251, 255, 0.86);
}

.energy-gas-readings {
  width: 100%;
}

.energy-public-readings {
  width: min(700px, 100%);
}

.energy-gas-readings[hidden],
.energy-public-readings[hidden] {
  display: none;
}

.energy-gas-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.energy-gas-head strong {
  color: var(--text);
  font-size: 14px;
}

.energy-gas-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.energy-gas-table {
  overflow-x: auto;
  border: 1px solid rgba(225, 232, 242, 0.9);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  width: 100%;
}

.energy-gas-layout {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(180px, 0.48fr);
  gap: 8px;
  align-items: stretch;
}

.energy-gas-table table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.energy-gas-table th,
.energy-gas-table td {
  padding: 6px 8px;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.energy-gas-table th {
  color: #647086;
  font-weight: 700;
}

.energy-gas-table th:nth-child(2),
.energy-gas-table td:nth-child(2) {
  text-align: center;
}

.energy-gas-table th:nth-child(1),
.energy-gas-table td:nth-child(1) {
  width: 46%;
}

.energy-public-table {
  width: min(680px, 100%);
}

.energy-public-table table {
  min-width: 560px;
}

.energy-public-table th,
.energy-public-table td {
  padding: 6px 7px;
}

.energy-public-table th:nth-child(1),
.energy-public-table td:nth-child(1) {
  width: 22%;
}

.energy-public-table th:nth-child(2),
.energy-public-table td:nth-child(2),
.energy-public-table th:nth-child(3),
.energy-public-table td:nth-child(3),
.energy-public-table th:nth-child(4),
.energy-public-table td:nth-child(4) {
  width: 17%;
  text-align: center;
}

.energy-public-table th:nth-child(5),
.energy-public-table td:nth-child(5) {
  width: 18%;
  text-align: right;
}

.energy-period-table td:nth-child(2),
.energy-period-table th:nth-child(2) {
  text-align: right;
}

.energy-gas-table td:first-child strong,
.energy-gas-table td:first-child span {
  display: block;
}

.energy-gas-table td:first-child strong {
  color: #253047;
  font-size: 12px;
  line-height: 1.15;
}

.energy-gas-table td:first-child span {
  margin-top: 2px;
  color: #758194;
  font-size: 11px;
  line-height: 1.15;
}

.energy-gas-table input {
  display: block;
  width: 100%;
  max-width: 150px;
  min-height: 28px;
  margin: 0 auto;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: #243047;
  text-align: right;
}

.modal-panel .energy-gas-table input {
  width: min(150px, 100%);
}

.energy-public-table input {
  max-width: 118px;
}

.modal-panel .energy-public-table input {
  width: min(118px, 100%);
}

.energy-gas-table b {
  color: #243047;
  font-size: 13px;
  font-weight: 750;
}

.energy-gas-table .muted-value {
  color: #94a0b2;
}

.energy-gas-table tfoot td {
  border-top: 1px solid rgba(216, 225, 238, 0.92);
  background: rgba(238, 247, 255, 0.88);
  font-weight: 700;
}

.energy-gas-balance {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.38fr);
  gap: 8px;
  align-items: stretch;
}

.energy-gas-balance label,
.energy-gas-balance-result {
  min-width: 0;
  border: 1px solid rgba(225, 232, 242, 0.9);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  padding: 8px 10px;
}

.energy-gas-balance label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.32fr);
  gap: 10px;
  align-items: center;
}

.energy-gas-balance label span,
.energy-gas-balance-result span,
.energy-gas-balance-result em {
  color: #647086;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.2;
}

.energy-gas-balance input {
  width: 100%;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: #243047;
  text-align: right;
  padding: 4px 8px;
}

.energy-gas-balance-result {
  display: grid;
  gap: 4px;
}

.energy-gas-balance-result strong {
  color: #1f2937;
  font-size: 18px;
  line-height: 1.1;
}

.energy-gas-balance-result b {
  font-size: 20px;
}

.energy-gas-balance-result.is-warning {
  border-color: rgba(236, 143, 78, 0.46);
  background: rgba(255, 248, 238, 0.96);
}

.energy-gas-balance-result.is-warning strong,
.energy-gas-balance-result.is-warning em {
  color: #a45a12;
}

.energy-form [data-field-key="note"] {
  grid-column: 1 / -1;
}

.energy-form .energy-gas-readings,
.energy-form .energy-public-readings {
  grid-column: 1 / -1;
}

.logistics-dashboard {
  display: grid;
  grid-template-columns: minmax(210px, 0.8fr) minmax(0, 1.5fr) minmax(190px, 0.7fr);
  gap: 10px;
  align-items: stretch;
  margin-bottom: 10px;
}

.logistics-hero {
  min-width: 0;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(210, 224, 246, 0.9);
  background: linear-gradient(145deg, rgba(240, 247, 255, 0.96), rgba(255, 255, 255, 0.92));
  display: grid;
  align-content: center;
  gap: 4px;
}

.logistics-hero span,
.logistics-hero small,
.logistics-expense-head span,
.logistics-side-metrics span,
.logistics-side-metrics small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.logistics-hero strong {
  color: var(--text);
  font-size: 32px;
  line-height: 1;
}

.logistics-expense {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(222, 230, 240, 0.92);
  border-radius: 12px;
  background: rgba(251, 253, 255, 0.9);
}

.logistics-expense-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.logistics-expense-head h2 {
  margin: 0;
  font-size: 14px;
}

.logistics-bars {
  display: grid;
  gap: 8px;
}

.logistics-bars p {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 82px;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.logistics-bars span {
  color: #435066;
  font-size: 12px;
  font-weight: 700;
}

.logistics-bars i {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}

.logistics-bars b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4aa3df, #55c49f);
}

.logistics-bars strong {
  color: #243047;
  font-size: 12px;
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
}

.logistics-side-metrics {
  display: grid;
  gap: 8px;
}

.logistics-side-metrics article {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(222, 230, 240, 0.92);
  border-radius: 12px;
  background: rgba(248, 251, 255, 0.9);
  display: grid;
  align-content: center;
  gap: 2px;
}

.logistics-side-metrics strong {
  color: var(--text);
  font-size: 20px;
  line-height: 1.1;
}

.panel {
  background:
    radial-gradient(circle at 18% 0%, rgba(255,255,255,0.92), transparent 32%),
    linear-gradient(180deg, rgba(255,255,255,0.95), rgba(250,253,255,0.88)),
    rgba(255, 255, 255, 0.90);
  border: 1px solid rgba(216, 224, 239, 0.72);
  border-radius: 16px;
  padding: 13px;
  box-shadow: var(--bubble-shadow);
  min-width: 0;
  position: relative;
  overflow: hidden;
  transition:
    transform 320ms var(--ease-float),
    box-shadow 320ms var(--ease-float),
    border-color 240ms ease,
    background 260ms ease;
}

.panel::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(108,99,255,0.36), rgba(79,143,232,0.18), rgba(255,255,255,0.1));
  pointer-events: none;
}

.panel h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: 0;
}

.panel h2::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--primary);
  flex: 0 0 auto;
  animation: dotPulse 2.4s ease-in-out infinite;
}

.kpi {
  display: grid;
  gap: 8px;
}

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

.kpi strong {
  font-size: 25px;
  font-weight: 650;
  line-height: 1.1;
}

.kpi small {
  color: var(--primary);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,251,255,0.94));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.86), 0 8px 18px rgba(58, 79, 122, 0.04);
}

.table-tools {
  margin-bottom: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.combo-filter {
  width: min(240px, 100%);
}

#monthInput {
  width: 140px;
  min-width: 140px;
}

.table-tools input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  min-height: 36px;
  padding: 7px 11px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  transition:
    border-color 220ms ease,
    box-shadow 220ms ease,
    background 220ms ease,
    transform 220ms var(--ease-float);
}

.table-tools input:focus {
  background: #ffffff;
  border-color: rgba(89, 103, 243, 0.42);
  box-shadow: 0 0 0 4px rgba(89, 103, 243, 0.10), 0 10px 20px rgba(58, 79, 122, 0.06);
  transform: translateY(-1px);
  outline: none;
}

.interactive-table th {
  cursor: grab;
  white-space: nowrap;
}

.interactive-table th[data-sort-dir="asc"]::after {
  content: " ↑";
  color: var(--primary);
}

.interactive-table th[data-sort-dir="desc"]::after {
  content: " ↓";
  color: var(--primary);
}

.scroll-table {
  max-height: 330px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,251,255,0.94));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.86);
}

.scroll-table .table-wrap {
  border: 0;
  border-radius: 0;
}

.scroll-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
  table-layout: fixed;
}

th,
td {
  padding: 9px 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
  line-height: 1.35;
  transition: background 180ms ease, color 180ms ease;
}

th {
  background: rgba(248, 251, 255, 0.88);
  color: #606879;
  font-weight: 600;
  position: relative;
  user-select: none;
  backdrop-filter: blur(8px);
}

th > span {
  display: inline-block;
  padding-right: 8px;
}

.table-wrap td > input,
.table-wrap td > select,
.scroll-table td > input,
.scroll-table td > select {
  display: block;
  width: 100%;
  box-sizing: border-box;
}

.col-resizer {
  position: absolute;
  top: 0;
  right: -3px;
  width: 7px;
  height: 100%;
  cursor: col-resize;
  z-index: 4;
}

.col-resizer::after {
  content: "";
  position: absolute;
  top: 22%;
  bottom: 22%;
  left: 3px;
  border-left: 1px solid rgba(96, 104, 121, 0.18);
}

th.action-col,
td.action-col {
  position: sticky;
  right: 0;
  z-index: 2;
  min-width: 76px;
  text-align: center;
  box-shadow: -8px 0 12px rgba(25, 32, 46, 0.05);
}

th.action-col {
  z-index: 3;
}

td.action-col {
  background: #fbfcff;
}

tr:hover td.action-col {
  background: rgba(241, 247, 255, 0.94);
}

tbody tr:hover {
  background: rgba(89, 103, 243, 0.045);
}

tbody tr:hover td {
  color: #172033;
}

tbody tr {
  transition: background 220ms ease, color 180ms ease;
}

tbody tr:nth-child(even) {
  background: #fafbfe;
}

td button {
  min-height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.user-name-input,
.user-role-select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 30px;
  padding: 5px 8px;
  font-size: 12px;
  background: #ffffff;
}

.compact-form {
  gap: 10px;
}

.form-actions-inline {
  display: flex;
  align-items: end;
}

.profile-page {
  max-width: 560px;
}

.profile-modal-body {
  display: block;
}

.profile-modal-body .profile-page {
  max-width: none;
}

.profile-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--soft-shadow);
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.profile-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #f1f4ff;
  color: var(--primary);
  font-size: 15px;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px #e4e9ff;
}

.profile-head h2 {
  margin: 0 0 3px;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--text);
}

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

.profile-meta {
  margin: 0;
  display: grid;
  gap: 0;
  border-block: 1px solid var(--line);
}

.profile-meta div {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.profile-meta div:last-child {
  border-bottom: 0;
}

.profile-meta dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.profile-meta dd {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.profile-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.profile-action-btn {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.profile-action-btn:hover {
  background: #f7f9ff;
  border-color: rgba(108, 99, 255, 0.26);
}

.profile-action-btn.logout {
  color: #4f5a6b;
}

tr:last-child td {
  border-bottom: 0;
}

.row-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.row-actions button {
  min-height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.mobile-list {
  display: none;
  gap: 10px;
}

.record-card {
  background:
    radial-gradient(circle at 18% 0%, rgba(255,255,255,0.92), transparent 34%),
    rgba(255, 255, 255, 0.90);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px;
  display: grid;
  gap: 10px;
  box-shadow: var(--bubble-shadow);
}

.compact-list {
  display: grid;
  gap: 8px;
}

.compact-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 10px;
}

.compact-row strong,
.compact-row b {
  font-size: 14px;
}

.compact-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.compact-row button {
  min-height: 32px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
}

.mobile-stock-list {
  display: none;
}

.mobile-record-list {
  display: none;
}

.mobile-record-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--line);
}

.mobile-record-row:last-child {
  border-bottom: 0;
}

.mobile-record-main {
  min-width: 0;
}

.mobile-record-main strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-record-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px 10px;
  margin-top: 4px;
}

.mobile-record-meta span {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: #5f6b7d;
  font-size: 12px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-record-meta em {
  flex: 0 0 auto;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  font-weight: 500;
}

.mobile-record-row button {
  width: 50px;
  min-height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.mobile-record-list[data-mobile-table-id="purchase-table"] .mobile-record-row {
  grid-template-columns: minmax(0, 1fr) 50px;
}

.mobile-stock-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 6px;
  min-height: 48px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #ffffff;
}

.category-section .mobile-stock-row {
  grid-template-columns: minmax(0, 1fr);
}

.category-section .mobile-stock-row b {
  grid-column: 1;
}

.mobile-stock-row:last-child {
  border-bottom: 1px solid var(--line);
}

.mobile-stock-row strong {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-stock-name {
  min-width: 0;
  grid-column: 1;
  grid-row: 1;
}

.mobile-stock-row b {
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  grid-column: 1;
  grid-row: 2;
}

.mobile-stock-row small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.15;
  margin-top: 2px;
}

.stock-subtle {
  color: var(--muted);
}

.stock-mark {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  grid-column: 2;
  grid-row: 1 / span 2;
  justify-self: end;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  border: 1px solid transparent;
}

.stock-mark.ok {
  color: #2f7d57;
  background: #eef8f2;
  border-color: #d9efe2;
}

.stock-mark.danger {
  color: #c73336;
  background: #fff0f0;
  border-color: #f6d8d8;
}

.stock-mark.neutral {
  color: #506079;
  background: #f4f5f7;
  border-color: #e7e8ec;
}

.category-stock-groups {
  display: grid;
  gap: 8px;
}

.material-warehouse-groups {
  display: none;
  gap: 10px;
}

.material-warehouse-block {
  border: 1px solid rgba(221, 230, 245, 0.86);
  border-radius: 16px;
  background:
    radial-gradient(circle at 16% 0%, rgba(255,255,255,0.94), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(250,253,255,0.90));
  padding: 10px;
  box-shadow: var(--bubble-shadow);
  transition:
    transform 320ms var(--ease-float),
    box-shadow 320ms var(--ease-float),
    border-color 220ms ease;
}

.material-warehouse-block:hover {
  transform: translateY(-1px);
  border-color: rgba(190, 211, 246, 0.84);
  box-shadow: var(--bubble-shadow-hover);
}

.material-warehouse-block > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.material-warehouse-block > header strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
}

.material-warehouse-block > header span,
.material-warehouse-block > header em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.material-warehouse-block .scroll-table {
  max-height: 228px;
  box-shadow: none;
}

.material-command {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(216, 226, 240, 0.92);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255,255,255,0.96), rgba(246,250,255,0.92));
  box-shadow: 0 10px 22px rgba(58, 79, 122, 0.055);
}

.material-command-main {
  min-width: 0;
}

.material-command-main span,
.material-insight span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.material-command-main strong {
  display: block;
  margin-top: 3px;
  color: #1f2937;
  font-size: 21px;
  line-height: 1.08;
}

.material-command-main p {
  display: block;
  max-width: 100%;
  margin: 4px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #667386;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-command-main p.warn {
  color: #b86b15;
}

.material-command-stats {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  min-width: 0;
}

.material-command-stats span {
  display: grid;
  grid-template-columns: auto auto;
  gap: 3px 8px;
  align-items: baseline;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid rgba(216, 226, 240, 0.86);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.material-command-stats b,
.material-command-stats em {
  color: #8a94a6;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.material-command-stats strong {
  margin: 0;
  color: #172033;
  font-size: 14px;
  line-height: 1.1;
}

.material-command-stats em {
  grid-column: 1 / -1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-command-stats .warn {
  border-color: rgba(236, 143, 78, 0.32);
  background: rgba(255, 248, 238, 0.78);
}

.material-command-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.shanghai-command {
  grid-template-columns: minmax(0, 1fr) auto;
}

.shanghai-stock-panel,
.shanghai-transfer-panel {
  margin-bottom: 8px;
  padding: 10px;
}

.shanghai-stock-panel .dashboard-section-head {
  margin-bottom: 8px;
}

.shanghai-stock-panel .table-wrap table,
.shanghai-transfer-panel .table-wrap table {
  min-width: 0;
}

.material-search input {
  width: 230px;
  min-height: 32px;
  border: 1px solid rgba(211, 224, 242, 0.96);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  padding: 0 10px;
  outline: none;
}

.material-insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.material-insight {
  min-width: 0;
  min-height: 94px;
  padding: 12px;
  border: 1px solid rgba(216, 226, 240, 0.92);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(58, 79, 122, 0.055);
}

.material-insight.primary {
  background: linear-gradient(145deg, rgba(239, 248, 255, 0.96), rgba(247, 253, 250, 0.94));
}

.material-insight.warn {
  border-color: rgba(236, 143, 78, 0.34);
  background: linear-gradient(145deg, rgba(255, 248, 238, 0.96), rgba(255, 255, 255, 0.92));
}

.material-insight strong {
  display: block;
  margin-top: 7px;
  color: #1f2937;
  font-size: 22px;
  line-height: 1.05;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-insight em {
  color: #7b8797;
  font-size: 12px;
  font-style: normal;
}

.material-insight small {
  display: block;
  margin-top: 7px;
  color: #667386;
  font-size: 11px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-category-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.material-category-strip article {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(216, 226, 240, 0.9);
  border-radius: 12px;
  background: rgba(251, 253, 255, 0.9);
}

.material-category-strip header,
.material-category-strip footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.material-category-strip strong,
.material-category-strip b {
  color: #263247;
  font-size: 12px;
}

.material-category-strip span,
.material-category-strip em {
  color: #7b8797;
  font-size: 11px;
  font-style: normal;
  white-space: nowrap;
}

.material-category-strip em.warn {
  color: #c96f16;
}

.material-category-strip div {
  height: 7px;
  margin: 9px 0;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}

.material-category-strip i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4aa3df, #55c49f);
}

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

.material-inventory-groups {
  gap: 10px;
}

.material-inventory-groups.material-warehouse-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.material-inventory-groups .material-warehouse-block {
  padding: 10px;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(58, 79, 122, 0.055);
}

.material-inventory-groups .material-warehouse-block > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 10px;
}

.material-inventory-groups .category-filter {
  grid-column: 1;
}

.category-tools {
  display: block;
  grid-column: 1 / -1;
}

.product-inventory-table th[data-product-sort-key] {
  cursor: pointer;
  user-select: none;
}

.product-inventory-table th[data-product-sort-key]::after {
  margin-left: 4px;
  color: #2f7ed8;
  font-size: 10px;
  opacity: 0;
  content: "↕";
}

.product-inventory-table th[data-product-sort-key]:hover::after {
  opacity: .58;
}

.product-inventory-table th[data-product-sort-key].is-sorted {
  color: #2f7ed8;
}

.product-inventory-table th[data-product-sort-key].is-sorted::after {
  opacity: 1;
  content: "↑";
}

.product-inventory-table th[data-product-sort-key].is-sorted[data-sort-dir="desc"]::after {
  content: "↓";
}

.material-inventory-table {
  overflow: hidden;
  border: 1px solid rgba(224, 232, 243, 0.9);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.86);
}

.material-inventory-table table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

.material-inventory-table th,
.material-inventory-table td {
  min-width: 0;
  box-sizing: border-box;
  padding: 5px 8px;
  border-bottom: 1px solid rgba(224, 232, 243, 0.72);
  color: #4a5568;
  font-size: 12px;
  line-height: 1.2;
  text-align: left;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-inventory-table th {
  padding-top: 5px;
  padding-bottom: 5px;
  background: #f8fafc;
  color: #8a94a6;
  font-size: 11px;
  font-weight: 800;
}

.material-inventory-table tr:last-child td {
  border-bottom: 0;
}

.material-inventory-table th:nth-child(1),
.material-inventory-table td:nth-child(1) {
  width: 29%;
}

.material-inventory-table th:nth-child(2),
.material-inventory-table td:nth-child(2) {
  width: 22%;
}

.material-inventory-table th:nth-child(3),
.material-inventory-table td:nth-child(3) {
  width: 19%;
  text-align: right;
}

.material-inventory-table th:nth-child(4),
.material-inventory-table td:nth-child(4) {
  width: 18%;
  text-align: right;
}

.material-inventory-table th:nth-child(5),
.material-inventory-table td:nth-child(5) {
  width: 12%;
  text-align: right;
  overflow: visible;
}

.material-inventory-table strong,
.material-inventory-table b {
  color: #172033;
  font-size: 13px;
}

.material-inventory-table td > span {
  display: block;
  margin-top: 1px;
  color: #8a94a6;
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-inventory-table td.danger {
  color: #c73336;
}

.material-inventory-table td.ok > span,
.material-inventory-table td.danger > span {
  display: block;
  margin-top: 1px;
  color: inherit;
  font-size: 11px;
}

.material-inventory-table .stock-mark {
  display: inline-grid;
  margin-right: 5px;
  vertical-align: middle;
}

.material-inventory-table button {
  min-width: 42px;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(196, 211, 232, 0.72);
  border-radius: 999px;
  background: rgba(246, 250, 255, 0.86);
  color: #40546f;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.92);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    transform 180ms var(--ease-soft),
    box-shadow 180ms ease;
}

.material-inventory-table button:hover {
  border-color: rgba(47, 126, 216, 0.32);
  background: rgba(237, 246, 255, 0.96);
  color: #2469b8;
  box-shadow: 0 8px 18px rgba(58, 79, 122, 0.08), inset 0 1px 0 rgba(255,255,255,0.98);
  transform: translateY(-1px);
}

.material-inventory-table.product-inventory-table th:nth-child(1),
.material-inventory-table.product-inventory-table td:nth-child(1) {
  width: 27%;
}

.material-inventory-table.product-inventory-table th:nth-child(2),
.material-inventory-table.product-inventory-table td:nth-child(2) {
  width: 25%;
  text-align: left;
}

.material-inventory-table.product-inventory-table th:nth-child(3),
.material-inventory-table.product-inventory-table td:nth-child(3),
.material-inventory-table.product-inventory-table th:nth-child(4),
.material-inventory-table.product-inventory-table td:nth-child(4) {
  width: 17%;
  text-align: right;
}

.material-inventory-table.product-inventory-table th:nth-child(5),
.material-inventory-table.product-inventory-table td:nth-child(5) {
  width: 14%;
  text-align: right;
  overflow: visible;
}

.material-inventory-table.product-inventory-table .product-batch-cell {
  color: #607086;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Material archive: compact, ledger-like layout. */
.material-command {
  min-height: 76px;
  padding: 9px 12px;
}

.material-command-main span {
  font-size: 12px;
  line-height: 1.15;
}

.material-command-main strong {
  margin-top: 2px;
  font-size: 20px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.material-command-main p {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.2;
}

.material-category-strip {
  gap: 7px;
  margin-bottom: 8px;
}

.material-category-strip article {
  min-height: 74px;
  padding: 8px 10px;
}

.material-category-strip header,
.material-category-strip footer {
  min-width: 0;
}

.material-category-strip strong,
.material-category-strip b {
  font-size: 12px;
  line-height: 1.15;
}

.material-category-strip span,
.material-category-strip em {
  font-size: 11px;
  line-height: 1.15;
}

.material-category-strip div {
  height: 6px;
  margin: 8px 0;
}

.material-inventory-groups.material-warehouse-groups {
  gap: 8px;
  align-items: start;
}

.material-inventory-groups .material-warehouse-block {
  padding: 9px 10px 10px;
  border-color: rgba(225, 233, 244, 0.82);
  border-radius: 13px;
  box-shadow: 0 8px 18px rgba(58, 79, 122, 0.045);
}

.material-inventory-groups .material-warehouse-block > header {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  margin-bottom: 7px;
}

.material-inventory-groups .material-warehouse-block > header strong {
  color: #172033;
  font-size: 16px;
  line-height: 1.15;
  font-weight: 800;
}

.material-inventory-groups .material-warehouse-block > header span {
  display: block;
  margin-top: 1px;
  font-size: 11px;
  line-height: 1.15;
}

.material-inventory-groups .material-warehouse-block > header em {
  color: #8a94a6;
  font-size: 12px;
  line-height: 1.15;
  font-weight: 700;
  white-space: nowrap;
}

.material-inventory-groups .category-filter input {
  min-height: 32px;
  border-radius: 10px;
  font-size: 12px;
}

.material-inventory-table {
  border-color: rgba(226, 233, 244, 0.78);
  border-radius: 10px;
}

.material-inventory-table table {
  table-layout: fixed;
}

.material-inventory-table th,
.material-inventory-table td {
  height: 38px;
  padding: 4px 8px;
  color: #445066;
  font-size: 12px;
  line-height: 1.15;
}

.material-inventory-table th {
  height: 30px;
  color: #7f8ca0;
  font-size: 11px;
  font-weight: 750;
}

.material-inventory-table th:nth-child(1),
.material-inventory-table td:nth-child(1) {
  width: 40%;
}

.material-inventory-table th:nth-child(2),
.material-inventory-table td:nth-child(2) {
  width: 22%;
  text-align: right;
}

.material-inventory-table th:nth-child(3),
.material-inventory-table td:nth-child(3) {
  width: 22%;
  text-align: right;
}

.material-inventory-table th:nth-child(4),
.material-inventory-table td:nth-child(4) {
  width: 16%;
  text-align: right;
  overflow: visible;
}

.material-inventory-table th:nth-child(5),
.material-inventory-table td:nth-child(5) {
  width: auto;
}

.material-inventory-table strong,
.material-inventory-table b {
  color: #172033;
  font-size: 13px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.material-inventory-table td:nth-child(2),
.material-inventory-table td:nth-child(3) {
  overflow: visible;
  color: #172033;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.material-inventory-table td:nth-child(2) b,
.material-inventory-table td:nth-child(3) b {
  font-size: 13px;
}

.material-inventory-table td > span {
  margin-top: 1px;
  font-size: 10px;
  line-height: 1.05;
}

.material-inventory-table td.ok > span,
.material-inventory-table td.danger > span {
  font-size: 10px;
  line-height: 1.05;
}

.material-inventory-table button {
  box-sizing: border-box;
  min-width: 34px;
  min-height: 24px;
  padding: 0 5px;
  border-radius: 9px;
  font-size: 12px;
}

.material-inventory-groups .empty-category {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin: 2px 0 0;
  padding: 5px 10px;
  color: #9aa6b8;
  font-size: 12px;
  border-color: rgba(210, 222, 240, 0.7);
  background: rgba(248, 251, 255, 0.55);
}

@media (min-width: 681px) {
  .material-warehouse-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

.material-warehouse-groups + .mobile-record-list,
.material-inventory-groups + .mobile-record-list {
  display: none;
}
}

.category-section {
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    radial-gradient(circle at 16% 0%, rgba(255,255,255,0.9), transparent 34%),
    rgba(251, 253, 255, 0.88);
  padding: 7px;
}

.category-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px 10px;
  margin-bottom: 6px;
}

.category-filter {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
}

.category-filter input {
  width: 100%;
  min-height: 28px;
  border: 1px solid #e3e8f2;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  padding: 0 10px;
  font-size: 12px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.category-filter input:focus {
  border-color: rgba(108, 99, 255, 0.42);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.10);
}

.category-section-head strong {
  font-size: 13px;
  color: var(--text);
}

.category-section-head span,
.empty-category {
  color: var(--muted);
  font-size: 12px;
}

.empty-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 0;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(241, 247, 255, 0.78);
}

.empty-category::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(89, 103, 243, 0.34);
  box-shadow: 0 0 0 4px rgba(89, 103, 243, 0.07);
}

.grouped-mobile-records {
  gap: 10px;
}

.mobile-category-block {
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(circle at 16% 0%, rgba(255,255,255,0.9), transparent 34%),
    rgba(255, 255, 255, 0.86);
  padding: 8px;
  box-shadow: var(--bubble-shadow);
}

.mobile-category-block > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px 10px;
  padding: 0 2px 8px;
}

.mobile-category-block > header strong {
  font-size: 14px;
  font-weight: 650;
  color: var(--text);
}

.mobile-category-block > header span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
}

.compact-category-row {
  min-height: 44px;
  padding: 8px 4px;
}

.compact-category-row .mobile-record-main strong {
  font-size: 14px;
}

.compact-category-row .mobile-record-meta {
  margin-top: 3px;
  gap: 3px 8px;
}

.record-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.record-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin: 0;
}

.record-card dt {
  color: var(--muted);
  font-size: 12px;
}

.record-card dd {
  margin: 2px 0 0;
  font-size: 14px;
  overflow-wrap: anywhere;
}

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

.stock-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255,255,255,0.92), transparent 34%),
    rgba(251, 252, 255, 0.92);
  display: grid;
  gap: 8px;
  box-shadow: var(--bubble-shadow);
}

.stock-card strong {
  font-size: 17px;
}

.stock-card > span {
  color: var(--muted);
  font-size: 13px;
}

.stock-card dl,
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.stock-card dt,
.detail-cell span {
  color: var(--muted);
  font-size: 12px;
}

.stock-card dd {
  margin: 2px 0 0;
  font-size: 14px;
}

.detail-body {
  display: grid;
  gap: 10px;
}

.detail-grid {
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
}

.detail-cell {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 8px 11px;
  background: transparent;
}

.detail-cell:last-child {
  border-bottom: 0;
}

.detail-cell strong {
  display: block;
  margin-top: 0;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.detail-cell[data-detail-key],
.editable-detail-table td[data-detail-key],
.mobile-summary-row[data-detail-key] {
  cursor: text;
}

.detail-cell[data-detail-key]:hover,
.editable-detail-table td[data-detail-key]:hover,
.mobile-summary-row[data-detail-key]:hover {
  background: rgba(94, 108, 255, 0.055);
}

.detail-edit-input {
  width: 100%;
  min-height: 32px;
  padding: 5px 8px;
  border: 1px solid rgba(94, 108, 255, 0.32);
  border-radius: 9px;
  background: #ffffff;
  color: var(--text);
  outline: none;
  box-shadow: 0 0 0 4px rgba(94, 108, 255, 0.10);
}

.detail-input-cell {
  cursor: text;
}

.detail-input-cell .detail-edit-input {
  margin-top: 0;
  font-weight: 700;
}

.detail-cell.editing,
.editable-detail-table td.editing,
.mobile-summary-row.editing {
  background: rgba(94, 108, 255, 0.075);
}

.detail-section {
  min-width: 0;
}

.status.ok {
  color: #3e5875;
  background: transparent;
  padding: 0;
  border-radius: 0;
  font-weight: 700;
}

.status.warn {
  color: var(--warning);
  background: transparent;
  padding: 0;
  border-radius: 0;
  font-weight: 700;
}

.status.danger {
  color: var(--danger);
  background: transparent;
  padding: 0;
  border-radius: 0;
  font-weight: 700;
}

.payment-action-btn {
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.08);
  color: #1d4ed8;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.payment-action-btn:hover {
  border-color: rgba(59, 130, 246, 0.38);
  background: rgba(59, 130, 246, 0.12);
}

.payment-modal.full {
  grid-column: 1 / -1;
}

.payment-summary-table {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.74);
}

.payment-summary-table div {
  display: grid;
  gap: 3px;
  padding: 9px 11px;
  border-right: 1px solid rgba(148, 163, 184, 0.14);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  min-width: 0;
}

.payment-summary-table div:nth-child(3n) {
  border-right: 0;
}

.payment-summary-table div:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.payment-summary-table span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.payment-summary-table strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-summary-table .payment-unpaid {
  color: var(--danger);
}

.production-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.production-status.confirmed {
  color: #13725c;
  border: 1px solid rgba(31, 166, 124, 0.25);
  background: rgba(225, 248, 239, 0.94);
}

.production-status.planned {
  color: #9a5b12;
  border: 1px solid rgba(236, 158, 76, 0.28);
  background: rgba(255, 244, 225, 0.95);
}

.batch-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
}

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

.field {
  display: grid;
  gap: 6px;
}

.field > span,
.field label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
}

.field.full {
  grid-column: 1 / -1;
}

.field textarea {
  min-height: 88px;
  resize: vertical;
}

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

.material-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) 92px 112px 122px;
  gap: 8px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfb;
}

.material-row.merged {
  grid-template-columns: minmax(120px, 1fr) 92px 112px 122px 110px;
}

.operation-sheet {
  display: grid;
  gap: 14px;
}

.mini-label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.mini-label strong {
  color: var(--text);
  font-size: 14px;
}

.mini-label input,
.mini-label select {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 34px;
  padding: 7px 8px;
}

.operation-sheet .scroll-table {
  max-height: 300px;
}

.mobile-batch-summary,
.mobile-material-list {
  display: none;
}

.operation-sheet table input {
  width: 100%;
  min-width: 92px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
}

.trace {
  display: grid;
  gap: 8px;
}

.trace-step {
  width: 100%;
  border: 0;
  border-left: 3px solid var(--primary);
  padding: 8px 10px 8px 12px;
  background: linear-gradient(90deg, rgba(108, 99, 255, 0.08), transparent);
  text-align: left;
  cursor: default;
  border-radius: 0 8px 8px 0;
}

.trace-step:hover {
  background: linear-gradient(90deg, rgba(108, 99, 255, 0.08), transparent);
}

.trace-step strong {
  display: block;
  margin-bottom: 3px;
  font-size: 13px;
}

.trace-step span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  line-height: 1.45;
}

.trace-material-list {
  display: none;
}

.chart-bars {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: 92px 1fr 54px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.bar {
  height: 12px;
  border-radius: 99px;
  background: #eef1f7;
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.drawer,
.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 50;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 16%, rgba(164, 226, 198, 0.18), transparent 32%),
    radial-gradient(circle at 78% 20%, rgba(52, 120, 246, 0.16), transparent 34%),
    linear-gradient(135deg, #f6f8fb 0%, #eef6fb 48%, #f7f9fc 100%);
  overflow: hidden;
}

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

.login-screen::before {
  inset: 0;
  background-image:
    linear-gradient(rgba(91, 169, 166, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(52, 120, 246, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.48;
  mask-image: radial-gradient(circle at 24% 24%, rgba(0,0,0,0.72), transparent 82%);
}

.login-screen::after {
  right: 8%;
  top: 8%;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(126, 221, 211, 0.16), transparent 68%);
  filter: blur(20px);
  animation: loginFloat 8s var(--ease-float) infinite;
}

.login-screen.open {
  display: grid;
}

.login-screen.leaving {
  animation: loginScreenLeave 580ms var(--ease-soft) both;
}

.login-screen.leaving .login-shell {
  animation: loginShellLeave 560ms var(--ease-soft) both;
}

.login-screen.leaving .login-art {
  animation: loginAquariumLeave 560ms var(--ease-soft) both;
}

.login-screen.leaving .aquarium-brand-fish {
  animation: loginBrandFishLeave 560ms var(--ease-soft) both;
}

body.auth-entering .main {
  animation: dashboardReveal 620ms var(--ease-soft) both;
}

.login-shell {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  min-height: 550px;
  display: grid;
  grid-template-columns: minmax(380px, 0.92fr) minmax(420px, 1.08fr);
  align-items: stretch;
  overflow: hidden;
  border: 1px solid rgba(190, 210, 215, 0.7);
  border-radius: 30px;
  background:
    radial-gradient(circle at 76% 18%, rgba(126, 221, 211, 0.12), transparent 40%),
    radial-gradient(circle at 24% 86%, rgba(52, 120, 246, 0.08), transparent 42%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.68));
  box-shadow: 0 24px 80px rgba(70, 100, 130, 0.12), inset 0 1px 0 rgba(255,255,255,0.98);
  backdrop-filter: blur(18px);
  animation: loginPanelIn 520ms var(--ease-soft) both;
}

.login-shell::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 76% 24%, rgba(255, 255, 255, 0.5), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.24), transparent 45%, rgba(255,255,255,0.16));
  animation: loginShellRefraction 8.5s ease-in-out infinite;
}

.login-shell::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: -18%;
  right: -18%;
  bottom: -18%;
  height: 45%;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(160, 199, 184, 0.1), transparent 70%);
  filter: blur(18px);
  animation: loginShellTide 10s ease-in-out infinite;
}

.login-form-column {
  position: relative;
  z-index: 1;
  display: grid;
  align-items: center;
  padding: 34px 36px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.08));
  border-right: 1px solid rgba(160, 180, 190, 0.28);
}

.login-panel {
  width: 100%;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  display: grid;
  gap: 13px;
  position: relative;
  z-index: 1;
}

.login-panel h1 {
  font-size: 27px;
  margin: 0;
  line-height: 1.2;
  font-weight: 800;
  color: #172033;
}

.login-panel .brand {
  margin-bottom: 2px;
  padding: 10px;
  border: 1px solid rgba(216, 229, 231, 0.78);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 12px 28px rgba(31, 64, 128, 0.055), inset 0 1px 0 rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px);
}

.login-panel .brand.large .brand-mark {
  width: 42px;
  height: 42px;
  border-color: rgba(126, 221, 211, 0.36);
  background:
    radial-gradient(circle at 35% 26%, rgba(255, 255, 255, 0.98) 0 18%, rgba(255, 255, 255, 0.46) 19% 34%, transparent 35%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(234, 247, 246, 0.82));
  box-shadow:
    0 10px 18px rgba(31, 64, 128, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -8px 14px rgba(121, 158, 150, 0.06);
}

.login-panel .brand strong {
  color: #172033;
  font-size: 15px;
}

.login-panel .brand span {
  color: #8a96a3;
  font-size: 12px;
}

.login-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 2px;
  color: #5ba9a6;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.login-kicker::before {
  content: "";
  width: 18px;
  height: 1px;
  background: linear-gradient(90deg, #7eddd3, #3478f6);
}

.login-panel .field {
  gap: 5px;
}

.register-panel {
  align-self: center;
  gap: 9px;
}

.register-panel .brand {
  margin-bottom: 4px;
}

.register-panel h1 {
  margin-bottom: 2px;
}

.register-panel .field {
  gap: 4px;
}

.login-panel .field > span {
  font-size: 12px;
  font-weight: 700;
  color: #6e7c8d;
}

.login-panel .field input,
.login-panel .code-row input {
  min-height: 52px;
  border-radius: 14px;
  border-color: #dde8ea;
  background-color: rgba(255, 255, 255, 0.72);
  color: #172033;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.92), 0 8px 18px rgba(31, 64, 128, 0.035);
  backdrop-filter: blur(14px);
}

.register-panel .field input,
.register-panel .code-row input {
  min-height: 45px;
}

.register-panel .code-row {
  grid-template-columns: minmax(0, 1fr) 116px;
}

.register-panel .code-row .ghost-btn {
  min-height: 45px;
  border-radius: 14px;
}

.register-panel .primary-btn.wide {
  min-height: 50px;
  margin-top: 5px;
}

.register-panel > .ghost-btn.wide {
  min-height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.56);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

#loginUser,
#loginPass,
#loginPhone,
#loginEmail,
#loginCode {
  padding-left: 44px;
  background-repeat: no-repeat;
  background-position: 16px center;
  background-size: 17px 17px;
}

#loginUser {
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 21a8 8 0 0 0-16 0' stroke='%238A96A3' stroke-width='1.8' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='7.5' r='4' stroke='%238A96A3' stroke-width='1.8'/%3E%3C/svg%3E");
}

#loginPass {
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='5' y='10' width='14' height='10' rx='3' stroke='%238A96A3' stroke-width='1.8'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3' stroke='%238A96A3' stroke-width='1.8' stroke-linecap='round'/%3E%3Cpath d='M12 14v2.2' stroke='%238A96A3' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}

#loginPhone,
#loginEmail {
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='7' y='3' width='10' height='18' rx='3' stroke='%238A96A3' stroke-width='1.8'/%3E%3Cpath d='M10.5 17.5h3' stroke='%238A96A3' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}

#loginEmail {
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='4' y='6' width='16' height='12' rx='3' stroke='%238A96A3' stroke-width='1.8'/%3E%3Cpath d='m5.5 8 6.5 5 6.5-5' stroke='%238A96A3' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

#loginCode {
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='4' y='5' width='16' height='14' rx='4' stroke='%238A96A3' stroke-width='1.8'/%3E%3Cpath d='M8 12h.01M12 12h.01M16 12h.01' stroke='%238A96A3' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
}

.login-panel .field input:focus,
.login-panel .code-row input:focus {
  border-color: rgba(91, 169, 166, 0.86);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 0 0 4px rgba(91, 169, 166, 0.12), 0 10px 20px rgba(31, 64, 128, 0.06);
}

.login-panel .auth-tabs {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #eef3f5;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.76);
}

.login-panel .auth-tabs::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 4px;
  left: 4px;
  width: calc((100% - 8px) / 2);
  height: calc(100% - 8px);
  border-radius: 999px;
  background: rgba(255,255,255,0.94);
  box-shadow: 0 4px 12px rgba(30, 60, 90, 0.08);
  transform: translateX(0);
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.login-panel .auth-tabs.phone-active::before {
  transform: translateX(100%);
}

.login-panel .auth-tabs button {
  position: relative;
  z-index: 1;
  min-height: 36px;
  color: #8a96a3;
  transition: color 180ms ease, font-weight 180ms ease;
}

.login-panel .auth-tabs button.active {
  color: #172033;
  background: transparent;
  box-shadow: none;
}

.login-panel .primary-btn.wide {
  position: relative;
  min-height: 54px;
  border-radius: 16px;
  border: 0;
  background: linear-gradient(135deg, #5ba9a6, #3478f6);
  box-shadow: 0 16px 34px rgba(52, 120, 246, 0.18), inset 0 1px 0 rgba(255,255,255,0.24);
  backdrop-filter: blur(12px);
  transition: transform 180ms ease, filter 180ms ease, box-shadow 180ms ease;
}

.login-panel .primary-btn.wide:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
  box-shadow: 0 20px 38px rgba(52, 120, 246, 0.22), inset 0 1px 0 rgba(255,255,255,0.24);
}

.login-panel .primary-btn.wide:active {
  transform: scale(0.98);
}

.login-panel .primary-btn.wide.is-loading,
.login-panel .primary-btn.wide.is-success {
  color: #ffffff;
}

.login-panel .primary-btn.wide.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 18px;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.42);
  border-top-color: #ffffff;
  animation: loginSpinner 780ms linear infinite;
}

.login-panel .primary-btn.wide.is-success {
  background: linear-gradient(135deg, #34c759, #5ba9a6);
  box-shadow: 0 16px 34px rgba(52, 199, 89, 0.18), inset 0 1px 0 rgba(255,255,255,0.24);
}

.login-panel .text-btn {
  color: #6e8582;
}

.login-panel .text-btn:hover {
  color: #3478f6;
}

.login-panel .auth-footer span {
  background: rgba(160, 180, 190, 0.34);
}

.login-panel .primary-btn.wide:disabled {
  cursor: wait;
  opacity: 0.74;
  filter: saturate(0.72);
}

.login-panel .primary-btn.wide.is-loading:disabled,
.login-panel .primary-btn.wide.is-success:disabled {
  opacity: 1;
  filter: none;
}

.login-showcase {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 22px 24px 24px;
  color: #172033;
  background:
    radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.48), transparent 32%),
    linear-gradient(145deg, rgba(234, 242, 255, 0.28), rgba(238, 249, 248, 0.16));
  border-left: 0;
  overflow: hidden;
}

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

.login-showcase::before {
  inset: -12%;
  background:
    radial-gradient(circle at 42% 62%, rgba(169, 205, 192, 0.08), transparent 40%);
  animation: loginWaterBreath 7s ease-in-out infinite;
}

.login-showcase::after {
  left: -18%;
  right: -18%;
  bottom: 8%;
  height: 42%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  filter: blur(18px);
  animation: loginWaterDrift 9s ease-in-out infinite;
}

.login-art {
  position: relative;
  z-index: 1;
  min-height: 390px;
  border-radius: 0;
  overflow: visible;
  background:
    radial-gradient(circle at 24% 18%, rgba(52, 120, 246, 0.12), transparent 34%),
    radial-gradient(circle at 76% 72%, rgba(126, 221, 211, 0.16), transparent 36%);
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  animation: loginAquariumFloat 7.4s ease-in-out infinite;
}

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

.login-art::before {
  inset: -4% 2% 0;
  background-image:
    linear-gradient(rgba(91, 169, 166, 0.038) 1px, transparent 1px),
    linear-gradient(90deg, rgba(52, 120, 246, 0.034) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.42;
  mask-image: radial-gradient(ellipse at center, #000 18%, transparent 70%);
  animation: loginGridMove 12s linear infinite;
}

.login-art::after {
  display: none;
}

.login-art-glow {
  position: absolute;
  inset: 54px 54px 62px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(126, 221, 211, 0.2), rgba(52, 120, 246, 0.07) 48%, transparent 68%);
  filter: blur(2px);
  animation: loginPulse 4.6s ease-in-out infinite;
}

.login-hero-image {
  position: absolute;
  z-index: 2;
  inset: 0 -12% 4%;
  width: 124%;
  height: 96%;
  object-fit: contain;
  opacity: 0.9;
  -webkit-mask-image: radial-gradient(ellipse 48% 44% at 52% 50%, #000 58%, rgba(0, 0, 0, 0.58) 72%, transparent 88%);
  mask-image: radial-gradient(ellipse 48% 44% at 52% 50%, #000 58%, rgba(0, 0, 0, 0.58) 72%, transparent 88%);
  filter: saturate(0.94) contrast(0.98) drop-shadow(0 22px 44px rgba(31, 64, 128, 0.06));
  animation: loginHeroFloat 6s ease-in-out infinite;
}

.login-hero-image,
.aquarium-caustics,
.login-art .aquarium-bubbles,
.login-art .aquarium-plant,
.login-art .aquarium-pebbles,
.login-art .aquarium-fish,
.login-art .aquarium-brand-fish,
.login-art .aquarium-water-floor {
  display: none;
}

.login-window {
  position: absolute;
  z-index: 2;
  border-radius: 18px;
  border: 1px solid rgba(207, 222, 242, 0.72);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 18px 36px rgba(51, 83, 130, 0.1), inset 0 1px 0 rgba(255,255,255,0.78);
  backdrop-filter: blur(12px);
}

.main-window {
  left: 58px;
  top: 78px;
  width: 268px;
  height: 176px;
  overflow: hidden;
  animation: loginFloatCard 6.2s ease-in-out infinite;
}

.side-window {
  right: 38px;
  bottom: 56px;
  width: 152px;
  height: 116px;
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 20px;
  animation: loginFloatCardSoft 6.8s ease-in-out infinite;
}

.side-window span,
.login-window-body span {
  display: block;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(74, 163, 223, 0.76), rgba(85, 196, 159, 0.76));
}

.side-window span:nth-child(2),
.login-window-body span:nth-child(2) {
  width: 72%;
  opacity: 0.72;
}

.side-window span:nth-child(3),
.login-window-body span:nth-child(3) {
  width: 54%;
  opacity: 0.54;
}

.login-window-top {
  display: flex;
  gap: 7px;
  height: 36px;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid rgba(218, 228, 241, 0.82);
}

.login-window-top i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(74, 163, 223, 0.5);
}

.login-window-body {
  display: grid;
  gap: 14px;
  padding: 28px 26px;
}

.login-window-body span:first-child {
  width: 88%;
}

.login-scan-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 46px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(72, 156, 225, 0.62), rgba(85, 196, 159, 0.5), transparent);
  box-shadow: 0 0 18px rgba(72, 156, 225, 0.28);
  animation: loginScan 4.6s ease-in-out infinite;
}

.login-shield {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  width: 104px;
  height: 104px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 32px;
  border: 1px solid rgba(198, 218, 244, 0.68);
  background: linear-gradient(145deg, rgba(255,255,255,0.76), rgba(235,247,255,0.54));
  box-shadow: 0 22px 44px rgba(44, 91, 144, 0.12);
  backdrop-filter: blur(10px);
  animation: loginShield 4.2s ease-in-out infinite;
}

.login-shield img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  opacity: 0.82;
}

.login-lock {
  position: absolute;
  z-index: 5;
  left: calc(50% + 42px);
  top: calc(50% + 38px);
  width: 40px;
  height: 32px;
  border-radius: 12px;
  background: linear-gradient(145deg, #4aa3df, #55c49f);
  box-shadow: 0 12px 24px rgba(44, 91, 144, 0.16);
  animation: loginLock 3.8s ease-in-out infinite;
}

.login-lock::before {
  content: "";
  position: absolute;
  left: 9px;
  top: -17px;
  width: 20px;
  height: 22px;
  border: 4px solid rgba(65, 150, 203, 0.9);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
}

.login-lock i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.82);
  transform: translate(-50%, -38%);
}

.login-orbit {
  position: absolute;
  z-index: 3;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #55c49f;
  box-shadow: 0 0 0 8px rgba(85, 196, 159, 0.12);
}

.login-orbit.one {
  left: 76px;
  bottom: 74px;
  animation: loginDotOne 5.4s ease-in-out infinite;
}

.login-orbit.two {
  right: 92px;
  top: 72px;
  background: #4aa3df;
  box-shadow: 0 0 0 8px rgba(74, 163, 223, 0.12);
  animation: loginDotTwo 5.8s ease-in-out infinite;
}

.login-visual-caption {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
  text-align: center;
}

.login-visual-caption strong {
  color: #172033;
  font-size: 18px;
  line-height: 1.15;
}

.login-visual-caption span {
  color: #8a96a3;
  font-size: 13px;
}

.aquarium-caustics {
  position: absolute;
  inset: -10%;
  opacity: 0.46;
  background:
    radial-gradient(ellipse at 20% 24%, rgba(255,255,255,0.52), transparent 18%),
    radial-gradient(ellipse at 62% 18%, rgba(255,255,255,0.38), transparent 16%),
    radial-gradient(ellipse at 84% 46%, rgba(255,255,255,0.34), transparent 18%);
  filter: blur(5px);
  animation: aquariumCaustics 9s ease-in-out infinite alternate;
}

.aquarium-bubbles {
  position: absolute;
  z-index: 3;
  display: grid;
  gap: 10px;
}

.aquarium-bubbles i {
  display: block;
  width: 13px;
  height: 13px;
  border: 1px solid rgba(164, 184, 190, 0.64);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 26%, rgba(255,255,255,0.84) 0 10%, transparent 12%),
    radial-gradient(circle at 42% 44%, rgba(255,255,255,0.2), rgba(239, 244, 244, 0.1) 58%, rgba(170, 195, 198, 0.14));
  box-shadow:
    inset 1px 1px 2px rgba(255, 255, 255, 0.72),
    inset -2px -2px 4px rgba(134, 166, 169, 0.16),
    0 4px 8px rgba(110, 139, 142, 0.1);
}

.aquarium-bubbles i:nth-child(2) {
  width: 8px;
  height: 8px;
  margin-left: 14px;
}

.aquarium-bubbles i:nth-child(3) {
  width: 17px;
  height: 17px;
  margin-left: 4px;
}

.aquarium-bubbles i:nth-child(4) {
  width: 7px;
  height: 7px;
  margin-left: 18px;
}

.bubble-cluster-one {
  left: 58px;
  top: 148px;
  animation: aquariumBubbles 7s ease-in-out infinite;
}

.bubble-cluster-two {
  right: 62px;
  top: 102px;
  transform: scale(0.74);
  animation: aquariumBubbles 8.4s 1.2s ease-in-out infinite;
}

.aquarium-plant {
  position: absolute;
  z-index: 4;
  bottom: 20px;
  width: 72px;
  height: 108px;
  transform-origin: 50% 100%;
  animation: aquariumSway 6.8s ease-in-out infinite alternate;
}

.aquarium-plant i {
  position: absolute;
  bottom: 0;
  width: 20px;
  border: 0;
  border-left: 2px solid rgba(130, 164, 157, 0.3);
  border-radius: 72% 0 0 0;
  transform-origin: 50% 100%;
  background: transparent;
  box-shadow: -1px 0 0 rgba(255,255,255,0.46);
}

.aquarium-plant i::after {
  content: "";
  position: absolute;
  left: -3px;
  top: 24%;
  width: 13px;
  height: 6px;
  border: 1px solid rgba(137, 170, 163, 0.22);
  border-radius: 100% 0 100% 0;
  background: linear-gradient(145deg, rgba(255,255,255,0.48), rgba(155, 187, 179, 0.18));
  transform: rotate(-30deg);
}

.aquarium-plant i:nth-child(1) {
  left: 29px;
  height: 96px;
  transform: rotate(-11deg);
}

.aquarium-plant i:nth-child(2) {
  left: 44px;
  height: 78px;
  transform: rotate(18deg);
}

.aquarium-plant i:nth-child(2)::after {
  top: 42%;
  transform: rotate(22deg);
}

.aquarium-plant i:nth-child(3) {
  left: 14px;
  height: 61px;
  transform: rotate(-29deg);
}

.aquarium-plant i:nth-child(3)::after {
  top: 54%;
}

.aquarium-plant i:nth-child(4) {
  left: 54px;
  height: 48px;
  transform: rotate(34deg);
}

.aquarium-plant i:nth-child(4)::after {
  top: 38%;
  transform: rotate(28deg);
}

.plant-left {
  left: 24px;
}

.plant-right {
  right: 18px;
  bottom: 18px;
  opacity: 0.66;
  transform: scale(0.82);
  animation-delay: 1s;
}

.aquarium-pebbles {
  position: absolute;
  z-index: 5;
  left: 60px;
  right: 58px;
  bottom: 15px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 8px;
}

.aquarium-pebbles i {
  width: 26px;
  height: 10px;
  border: 1px solid rgba(179, 193, 195, 0.42);
  border-radius: 55% 55% 44% 44%;
  background: linear-gradient(145deg, rgba(255,255,255,0.62), rgba(186, 199, 201, 0.2));
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.62), 0 4px 8px rgba(99, 121, 124, 0.05);
}

.aquarium-pebbles i:nth-child(2n) {
  width: 18px;
  height: 7px;
  transform: translateY(2px) rotate(-4deg);
}

.aquarium-pebbles i:nth-child(3n) {
  width: 32px;
  height: 12px;
  background: linear-gradient(145deg, rgba(255,255,255,0.66), rgba(169, 196, 185, 0.18));
  transform: rotate(3deg);
}

.aquarium-pebbles i:nth-child(4n) {
  border-radius: 62% 44% 58% 40%;
  transform: translateY(1px) rotate(-6deg);
}

.aquarium-fish {
  position: absolute;
  z-index: 4;
  width: 52px;
  height: 28px;
  filter: drop-shadow(0 8px 10px rgba(77, 95, 100, 0.08));
}

.aquarium-fish i {
  position: absolute;
  right: 0;
  top: 4px;
  width: 34px;
  height: 20px;
  border-radius: 56% 48% 48% 56%;
  background: linear-gradient(145deg, rgba(142, 158, 164, 0.66), rgba(143, 177, 164, 0.42));
}

.aquarium-fish i::after {
  content: "";
  position: absolute;
  right: 7px;
  top: 6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(31, 79, 102, 0.72);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.46);
}

.aquarium-fish span {
  position: absolute;
  left: 2px;
  top: 4px;
  width: 20px;
  height: 20px;
  background: rgba(144, 161, 166, 0.42);
  clip-path: polygon(0 0, 100% 50%, 0 100%, 25% 50%);
}

.fish-one {
  left: 38px;
  top: 96px;
  animation: aquariumFishOne 13s ease-in-out infinite;
}

.fish-two {
  right: 66px;
  top: 226px;
  transform: scale(0.76);
  opacity: 0.72;
  animation: aquariumFishTwo 15s ease-in-out infinite;
}

.fish-three {
  left: 118px;
  bottom: 94px;
  transform: scale(0.58);
  opacity: 0.62;
  animation: aquariumFishThree 12s ease-in-out infinite;
}

.aquarium-brand-fish {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 45%;
  width: 126px;
  height: 126px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border: 1px solid rgba(184, 211, 205, 0.72);
  border-radius: 46% 54% 50% 50%;
  background: linear-gradient(145deg, rgba(255,255,255,0.54), rgba(230,248,250,0.24));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.82), 0 22px 46px rgba(74, 105, 101, 0.09);
  backdrop-filter: blur(14px);
  animation: aquariumBrandFloat 6.4s ease-in-out infinite;
}

.aquarium-brand-halo {
  position: absolute;
  inset: -30px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(154, 196, 178, 0.1), transparent 68%);
  filter: blur(3px);
}

.aquarium-brand-fish img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  opacity: 0.82;
  filter: drop-shadow(0 8px 12px rgba(69, 96, 93, 0.1));
}

.aquarium-water-floor {
  position: absolute;
  z-index: 2;
  left: -12%;
  right: -12%;
  bottom: -34px;
  height: 94px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(151, 197, 177, 0.12), rgba(197, 213, 207, 0.05) 42%, transparent 72%);
  filter: blur(4px);
}

/* Login blue-flow theme */
.login-screen {
  background:
    radial-gradient(circle at 18% 18%, rgba(90, 200, 250, 0.24), transparent 34%),
    radial-gradient(circle at 82% 12%, rgba(52, 120, 246, 0.24), transparent 38%),
    radial-gradient(circle at 60% 90%, rgba(164, 226, 198, 0.18), transparent 36%),
    linear-gradient(135deg, #edf7ff 0%, #dfeeff 42%, #f6fbff 100%);
}

.login-screen::before {
  inset: -24%;
  background:
    linear-gradient(118deg, transparent 0 24%, rgba(52, 120, 246, 0.12) 34%, rgba(90, 200, 250, 0.16) 44%, transparent 58%),
    linear-gradient(302deg, transparent 0 34%, rgba(255, 255, 255, 0.24) 46%, transparent 62%),
    linear-gradient(rgba(52, 120, 246, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(52, 120, 246, 0.032) 1px, transparent 1px);
  background-size: 160% 160%, 150% 150%, 42px 42px, 42px 42px;
  opacity: 0.78;
  mask-image: none;
  animation: loginBlueFlow 14s ease-in-out infinite alternate;
}

.login-screen::after {
  right: auto;
  left: 52%;
  top: -12%;
  width: 620px;
  height: 620px;
  background:
    radial-gradient(circle, rgba(52, 120, 246, 0.22), transparent 60%),
    radial-gradient(circle at 30% 66%, rgba(90, 200, 250, 0.18), transparent 48%);
  filter: blur(34px);
  animation: loginBlueOrb 10s ease-in-out infinite;
}

.login-shell {
  border-color: rgba(132, 179, 240, 0.38);
  background:
    radial-gradient(circle at 78% 18%, rgba(52, 120, 246, 0.12), transparent 42%),
    radial-gradient(circle at 22% 82%, rgba(90, 200, 250, 0.1), transparent 40%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(239, 247, 255, 0.64));
  box-shadow: 0 28px 90px rgba(52, 120, 246, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

.login-shell::before {
  background:
    linear-gradient(105deg, transparent 10%, rgba(52, 120, 246, 0.08) 36%, rgba(255, 255, 255, 0.32) 48%, transparent 68%),
    radial-gradient(circle at 76% 24%, rgba(255, 255, 255, 0.58), transparent 34%);
  animation: loginShellBlueSweep 9s ease-in-out infinite;
}

.login-shell::after {
  background: radial-gradient(ellipse at center, rgba(52, 120, 246, 0.12), transparent 70%);
}

.login-form-column {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.42), rgba(235, 246, 255, 0.16)),
    radial-gradient(circle at 0% 100%, rgba(52, 120, 246, 0.08), transparent 48%);
  border-right-color: rgba(132, 179, 240, 0.26);
}

.login-panel .brand {
  border-color: rgba(180, 209, 247, 0.62);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 12px 28px rgba(52, 120, 246, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.login-panel .brand.large .brand-mark {
  border-color: rgba(52, 120, 246, 0.22);
  background:
    radial-gradient(circle at 35% 26%, rgba(255, 255, 255, 0.98) 0 18%, rgba(255, 255, 255, 0.5) 19% 34%, transparent 35%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(232, 242, 255, 0.9));
}

.login-kicker {
  color: #3478f6;
}

.login-kicker::before {
  background: linear-gradient(90deg, #5ac8fa, #3478f6);
}

.login-panel .field input,
.login-panel .code-row input {
  border-color: rgba(188, 213, 246, 0.74);
  background-color: rgba(255, 255, 255, 0.76);
}

.login-panel .field input:focus,
.login-panel .code-row input:focus {
  border-color: rgba(52, 120, 246, 0.72);
  box-shadow: 0 0 0 4px rgba(52, 120, 246, 0.12), 0 10px 20px rgba(31, 64, 128, 0.06);
}

.login-panel .auth-tabs {
  background: rgba(226, 239, 255, 0.72);
}

.login-panel .primary-btn.wide {
  background: linear-gradient(135deg, #5ac8fa, #3478f6 58%, #2563eb);
  box-shadow: 0 18px 38px rgba(52, 120, 246, 0.24), inset 0 1px 0 rgba(255,255,255,0.24);
}

.login-showcase {
  background:
    radial-gradient(circle at 68% 20%, rgba(52, 120, 246, 0.18), transparent 34%),
    linear-gradient(145deg, rgba(234, 244, 255, 0.54), rgba(222, 238, 255, 0.3));
}

.login-showcase::before {
  background:
    linear-gradient(122deg, transparent 12%, rgba(52, 120, 246, 0.08) 38%, rgba(90, 200, 250, 0.12) 48%, transparent 66%),
    radial-gradient(circle at 42% 62%, rgba(90, 200, 250, 0.1), transparent 40%);
  animation: loginBlueFlow 12s ease-in-out infinite alternate;
}

.login-art {
  background:
    radial-gradient(circle at 26% 16%, rgba(90, 200, 250, 0.18), transparent 34%),
    radial-gradient(circle at 74% 70%, rgba(52, 120, 246, 0.18), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(232, 244, 255, 0.08));
}

.login-art::before {
  background-image:
    linear-gradient(rgba(52, 120, 246, 0.044) 1px, transparent 1px),
    linear-gradient(90deg, rgba(52, 120, 246, 0.038) 1px, transparent 1px);
  opacity: 0.54;
}

.login-art-glow {
  background: radial-gradient(circle, rgba(90, 200, 250, 0.24), rgba(52, 120, 246, 0.12) 48%, transparent 68%);
  animation: loginPulse 4.6s ease-in-out infinite, loginGlowDrift 9s ease-in-out infinite;
}

.login-window {
  border-color: rgba(174, 207, 250, 0.76);
  background: rgba(246, 251, 255, 0.6);
  box-shadow: 0 18px 38px rgba(52, 120, 246, 0.1), inset 0 1px 0 rgba(255,255,255,0.78);
}

.side-window span,
.login-window-body span {
  background: linear-gradient(90deg, rgba(52, 120, 246, 0.66), rgba(90, 200, 250, 0.74));
}

.login-shield {
  border-color: rgba(174, 207, 250, 0.72);
  background: linear-gradient(145deg, rgba(255,255,255,0.78), rgba(229,243,255,0.6));
}

.login-lock {
  background: linear-gradient(145deg, #3478f6, #5ac8fa);
}

.login-lock::before {
  border-color: rgba(52, 120, 246, 0.9);
}

/* Login white-accent pass: keep blue as a restrained accent only. */
.login-screen {
  background:
    radial-gradient(circle at 78% 16%, rgba(52, 120, 246, 0.08), transparent 34%),
    radial-gradient(circle at 18% 86%, rgba(90, 200, 250, 0.06), transparent 34%),
    linear-gradient(135deg, #fbfdff 0%, #f7fafc 48%, #ffffff 100%);
}

.login-screen::before {
  background:
    linear-gradient(118deg, transparent 0 36%, rgba(52, 120, 246, 0.035) 46%, transparent 58%),
    linear-gradient(rgba(52, 120, 246, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(52, 120, 246, 0.022) 1px, transparent 1px);
  background-size: 180% 180%, 42px 42px, 42px 42px;
  opacity: 0.42;
}

.login-screen::after {
  background: radial-gradient(circle, rgba(52, 120, 246, 0.08), transparent 68%);
  opacity: 0.72;
}

.login-shell {
  border-color: rgba(197, 215, 237, 0.62);
  background:
    radial-gradient(circle at 78% 18%, rgba(52, 120, 246, 0.045), transparent 42%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(251, 253, 255, 0.78));
  box-shadow: 0 26px 78px rgba(55, 83, 116, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

.login-shell::before {
  background:
    linear-gradient(105deg, transparent 16%, rgba(52, 120, 246, 0.035) 42%, rgba(255, 255, 255, 0.34) 52%, transparent 70%),
    radial-gradient(circle at 76% 24%, rgba(255, 255, 255, 0.62), transparent 34%);
}

.login-shell::after {
  background: radial-gradient(ellipse at center, rgba(52, 120, 246, 0.055), transparent 72%);
}

.login-form-column {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0.16));
  border-right-color: rgba(197, 215, 237, 0.46);
}

.login-showcase {
  background:
    radial-gradient(circle at 70% 22%, rgba(52, 120, 246, 0.07), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.55), rgba(247, 251, 255, 0.28));
}

.login-showcase::before {
  background:
    linear-gradient(122deg, transparent 22%, rgba(52, 120, 246, 0.032) 46%, transparent 66%),
    radial-gradient(circle at 42% 62%, rgba(90, 200, 250, 0.045), transparent 40%);
  opacity: 0.66;
}

.login-art {
  background:
    radial-gradient(circle at 26% 16%, rgba(90, 200, 250, 0.075), transparent 34%),
    radial-gradient(circle at 74% 70%, rgba(52, 120, 246, 0.07), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(248, 251, 255, 0.1));
}

.login-art-glow {
  background: radial-gradient(circle, rgba(90, 200, 250, 0.12), rgba(52, 120, 246, 0.06) 48%, transparent 68%);
}

.login-window,
.login-shield {
  background: rgba(255, 255, 255, 0.64);
}

/* Login compact interaction pass. */
.login-shell {
  width: min(920px, calc(100vw - 48px));
  height: min(620px, calc(100vh - 48px));
  min-height: 0;
  grid-template-columns: 390px minmax(0, 1fr);
}

.login-form-column {
  min-height: 0;
  overflow: hidden;
  padding: 22px 34px;
  align-items: center;
}

.login-panel {
  max-width: 340px;
  margin: 0 auto;
  box-sizing: border-box;
}

.login-panel h1 {
  font-size: 25px;
}

.login-panel .field input,
.login-panel .code-row input {
  min-height: 46px;
}

.login-panel .primary-btn.wide {
  min-height: 50px;
}

.login-panel .auth-footer {
  margin-top: -2px;
}

@media (min-width: 821px) {
  #loginForm {
    transform: translateY(-4px);
  }
}

.password-input {
  position: relative;
  display: block;
}

.password-input #loginPass {
  width: 100%;
  padding-right: 46px;
}

.password-eye-btn {
  position: absolute;
  right: 7px;
  top: 50%;
  width: 34px;
  height: 34px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: transparent;
  color: #8a96a3;
  transform: translateY(-50%);
  box-shadow: none;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease;
}

.password-eye-btn::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 5c5.2 0 8.5 4.1 9.5 5.8.3.5.3.9 0 1.4C20.5 13.9 17.2 18 12 18s-8.5-4.1-9.5-5.8a1.36 1.36 0 0 1 0-1.4C3.5 9.1 6.8 5 12 5Zm0 2C8 7 5.4 10 4.5 11.5 5.4 13 8 16 12 16s6.6-3 7.5-4.5C18.6 10 16 7 12 7Zm0 1.8a2.7 2.7 0 1 1 0 5.4 2.7 2.7 0 0 1 0-5.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.password-eye-btn:hover,
.password-eye-btn.is-visible {
  color: #3478f6;
  background: rgba(234, 242, 255, 0.72);
}

.password-eye-btn.is-visible::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 2px;
  left: 8px;
  top: 16px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(-42deg);
}

.register-panel {
  gap: 3px;
}

.register-panel .brand {
  padding: 6px;
  margin-bottom: 0;
}

.register-panel .brand.large .brand-mark {
  width: 30px;
  height: 30px;
}

.register-panel h1 {
  font-size: 20px;
  margin-bottom: 0;
}

.register-panel .field {
  gap: 2px;
}

.register-panel .field > span {
  font-size: 11px;
}

.register-panel .field input,
.register-panel .code-row input,
.register-panel .code-row .ghost-btn {
  min-height: 32px;
  border-radius: 12px;
}

.register-panel .code-row {
  grid-template-columns: minmax(0, 1fr) 108px;
  gap: 7px;
}

.register-panel .primary-btn.wide {
  min-height: 36px;
  margin-top: 1px;
}

.register-panel > .ghost-btn.wide {
  min-height: 32px;
}

.register-panel .form-error {
  min-height: 14px;
  font-size: 12px;
}

.auth-flow-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: 3px;
}

.auth-flow-actions .primary-btn.wide,
.auth-flow-actions .ghost-btn.wide {
  width: 100%;
  min-height: 36px;
  margin: 0;
  border-radius: 13px;
}

.auth-flow-actions .ghost-btn.wide {
  background: rgba(255, 255, 255, 0.78);
  color: #607086;
}

.auth-flow-head {
  display: grid;
  gap: 2px;
  padding: 1px 0 3px;
  margin: 0 0 1px;
}

.auth-flow-head > span {
  color: #3478f6;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.14em;
}

.register-panel .auth-flow-head h1,
.auth-flow-head h1 {
  margin: 0;
  color: #172033;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.auth-flow-head p {
  margin: 0;
  color: #8a96a3;
  font-size: 12px;
  line-height: 1.35;
}

.register-panel .brand + .auth-flow-head {
  margin-top: 2px;
}

.auth-captcha-modal {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(8px);
}

.auth-captcha-modal.open {
  display: grid;
}

.auth-captcha-panel {
  width: min(380px, calc(100vw - 40px));
  padding: 18px;
  border: 1px solid rgba(197, 215, 237, 0.72);
  border-radius: 22px;
  background:
    radial-gradient(circle at 82% 12%, rgba(52, 120, 246, 0.08), transparent 36%),
    rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 70px rgba(31, 64, 128, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.96);
  animation: modalRise 320ms var(--ease-float) both;
}

.auth-captcha-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.auth-captcha-head span {
  color: #3478f6;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.auth-captcha-head h2 {
  margin: 3px 0 0;
  color: #172033;
  font-size: 18px;
  line-height: 1.25;
}

.auth-captcha-panel > p {
  margin: 0 0 12px;
  color: #8a96a3;
  font-size: 12px;
  line-height: 1.45;
}

.auth-captcha-body {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

.auth-captcha-image {
  height: 54px;
  min-height: 54px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(188, 213, 246, 0.74);
  border-radius: 16px;
  background: #f8fbff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.auth-captcha-image img {
  display: block;
  width: 100%;
  height: 100%;
}

.auth-captcha-panel .field {
  gap: 5px;
}

.auth-captcha-panel .field > span {
  color: #6e7c8d;
  font-size: 12px;
  font-weight: 700;
}

.auth-captcha-panel input {
  width: 100%;
  min-height: 54px;
  border: 1px solid rgba(188, 213, 246, 0.74);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  color: #172033;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-captcha-panel input:focus {
  border-color: rgba(52, 120, 246, 0.72);
  box-shadow: 0 0 0 4px rgba(52, 120, 246, 0.12);
}

.auth-captcha-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.auth-captcha-actions .ghost-btn,
.auth-captcha-actions .primary-btn {
  min-height: 36px;
  padding: 0 16px;
  border-radius: 12px;
}

@media (max-width: 520px) {
  .auth-captcha-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .login-screen {
    padding: 14px;
  }

  .login-shell {
    width: min(440px, 100%);
    height: min(620px, calc(100vh - 28px));
    grid-template-columns: 1fr;
    border-radius: 20px;
  }

  .login-form-column {
    padding: 22px;
    overflow: hidden;
  }

  .login-showcase {
    display: none;
  }
}

.register-panel[hidden],
.login-panel[hidden] {
  display: none;
}

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

@keyframes loginFloat {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(0.96);
    opacity: 0.46;
  }
  50% {
    transform: translate3d(12px, -10px, 0) scale(1.04);
    opacity: 0.68;
  }
}

@keyframes loginGridMove {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 32px 32px, 32px 32px;
  }
}

@keyframes loginLightSweep {
  0%, 100% {
    transform: translateX(-16%) rotate(-15deg);
    opacity: 0.18;
  }
  50% {
    transform: translateX(16%) rotate(-15deg);
    opacity: 0.5;
  }
}

@keyframes loginPulse {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(0.96);
    opacity: 0.58;
  }
  50% {
    transform: translate3d(8px, -6px, 0) scale(1.08);
    opacity: 0.86;
  }
}

@keyframes loginShellRefraction {
  0%, 100% {
    opacity: 0.54;
    transform: translate3d(-1.5%, 0, 0) scale(1);
  }
  50% {
    opacity: 0.86;
    transform: translate3d(1.5%, -1%, 0) scale(1.015);
  }
}

@keyframes loginShellTide {
  0%, 100% {
    opacity: 0.46;
    transform: translate3d(-2%, 0, 0) scaleX(1);
  }
  50% {
    opacity: 0.72;
    transform: translate3d(2%, -10px, 0) scaleX(1.06);
  }
}

@keyframes loginWaterBreath {
  0%, 100% {
    opacity: 0.62;
    transform: scale(1);
  }
  50% {
    opacity: 0.95;
    transform: scale(1.035);
  }
}

@keyframes loginWaterDrift {
  0%, 100% {
    transform: translate3d(-2%, 0, 0) rotate(-3deg);
    opacity: 0.42;
  }
  50% {
    transform: translate3d(3%, -10px, 0) rotate(3deg);
    opacity: 0.7;
  }
}

@keyframes loginAquariumFloat {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
    filter: saturate(1);
  }
  50% {
    transform: translate3d(0, -7px, 0) scale(1.012);
    filter: saturate(1.06);
  }
}

@keyframes loginHeroFloat {
  0%, 100% {
    transform: translate3d(0, 0, 0);
    opacity: 0.92;
  }
  50% {
    transform: translate3d(0, -4px, 0);
    opacity: 0.98;
  }
}

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

@keyframes loginFloatCard {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
    opacity: 0.88;
  }
  50% {
    transform: translate3d(0, -9px, 0) rotate(-0.6deg);
    opacity: 0.98;
  }
}

@keyframes loginFloatCardSoft {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
    opacity: 0.82;
  }
  48% {
    transform: translate3d(-6px, -7px, 0) rotate(0.8deg);
    opacity: 0.96;
  }
}

@keyframes loginScan {
  0%, 100% {
    transform: translateY(0);
    opacity: 0;
  }
  24%, 76% {
    opacity: 0.82;
  }
  50% {
    transform: translateY(112px);
  }
}

@keyframes loginShield {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
  50% {
    transform: translate(-50%, -54%) scale(1.035) rotate(0.8deg);
  }
}

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

@keyframes loginDotOne {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(24px, -18px, 0);
  }
}

@keyframes loginDotTwo {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(-22px, 18px, 0);
  }
}

@keyframes loginBlueFlow {
  0% {
    transform: translate3d(-3%, -1%, 0) scale(1) rotate(0deg);
    background-position: 0% 50%, 100% 50%, 0 0, 0 0;
  }
  50% {
    transform: translate3d(2%, -2%, 0) scale(1.035) rotate(1deg);
    background-position: 58% 44%, 42% 56%, 22px 22px, 22px 22px;
  }
  100% {
    transform: translate3d(3%, 1%, 0) scale(1.02) rotate(-0.6deg);
    background-position: 100% 50%, 0% 50%, 42px 42px, 42px 42px;
  }
}

@keyframes loginBlueOrb {
  0%, 100% {
    transform: translate3d(-2%, 0, 0) scale(0.98);
    opacity: 0.72;
  }
  50% {
    transform: translate3d(4%, 18px, 0) scale(1.06);
    opacity: 0.92;
  }
}

@keyframes loginShellBlueSweep {
  0%, 100% {
    transform: translate3d(-8%, 0, 0);
    opacity: 0.54;
  }
  50% {
    transform: translate3d(8%, -1%, 0);
    opacity: 0.88;
  }
}

@keyframes loginGlowDrift {
  0%, 100% {
    filter: blur(2px);
  }
  50% {
    filter: blur(6px);
  }
}

@keyframes aquariumCaustics {
  from {
    transform: translate3d(-3%, -1%, 0) scale(1);
    opacity: 0.34;
  }
  to {
    transform: translate3d(3%, 1%, 0) scale(1.06);
    opacity: 0.58;
  }
}

@keyframes aquariumBubbles {
  0%, 100% {
    transform: translate3d(0, 32px, 0) scale(0.82);
    opacity: 0.18;
  }
  45% {
    opacity: 0.86;
  }
  78% {
    transform: translate3d(10px, -74px, 0) scale(1.04);
    opacity: 0.54;
  }
}

@keyframes aquariumSway {
  from {
    transform: rotate(-3deg);
  }
  to {
    transform: rotate(5deg);
  }
}

@keyframes aquariumFishOne {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(0.86);
    opacity: 0.54;
  }
  50% {
    transform: translate3d(78px, 12px, 0) scale(0.92);
    opacity: 0.82;
  }
}

@keyframes aquariumFishTwo {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(-0.76, 0.76);
  }
  50% {
    transform: translate3d(-88px, -10px, 0) scale(-0.82, 0.82);
  }
}

@keyframes aquariumFishThree {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(0.58);
  }
  50% {
    transform: translate3d(96px, -14px, 0) scale(0.64);
  }
}

@keyframes aquariumBrandFloat {
  0%, 100% {
    transform: translate(-50%, -50%) rotate(-1deg);
  }
  50% {
    transform: translate(-50%, -56%) rotate(1.4deg);
  }
}

@keyframes loginScreenLeave {
  from {
    opacity: 1;
    backdrop-filter: blur(0);
  }
  to {
    opacity: 0;
    backdrop-filter: blur(10px);
  }
}

@keyframes loginShellLeave {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px) scale(1.025);
    filter: blur(4px);
  }
}

@keyframes loginAquariumLeave {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-16px) scale(1.045);
  }
}

@keyframes loginBrandFishLeave {
  from {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  to {
    opacity: 0;
    transform: translate(-42%, -70%) scale(1.12);
  }
}

@keyframes dashboardReveal {
  from {
    opacity: 0.36;
    transform: scale(0.992);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}

.form-error {
  min-height: 18px;
  margin: 0;
  color: var(--danger);
  font-size: 13px;
}

.drawer.open,
.modal.open {
  display: block;
}

.modal.open {
  display: grid;
  animation: overlayFade 260ms ease both;
}

.modal.open .modal-panel {
  animation: modalRise 380ms var(--ease-float) both;
}

.drawer.open {
  animation: overlayFade 260ms ease both;
}

.drawer.open .drawer-panel {
  animation: drawerSlide 360ms var(--ease-float) both;
}

.drawer {
  background: rgba(17, 24, 39, 0.18);
  backdrop-filter: blur(5px);
}

.drawer-panel {
  width: min(82vw, var(--drawer-width));
  background:
    radial-gradient(circle at 20% 0%, rgba(236, 246, 255, 0.78), transparent 220px),
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,253,0.94)),
    white;
  color: var(--text);
  height: 100%;
  padding: 12px;
  box-shadow: 16px 0 42px rgba(44, 55, 83, 0.14);
  position: relative;
  min-width: 248px;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid rgba(222, 230, 242, 0.82);
}

.drawer-resize-handle {
  right: -5px;
}

.drawer-head,
.modal-head,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.drawer-head {
  margin-bottom: 10px;
  padding: 6px 4px 12px;
  border-bottom: 1px solid rgba(224, 231, 242, 0.78);
  flex: 0 0 auto;
}

.drawer-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
  cursor: pointer;
  border-radius: 16px;
}

.drawer-brand:active {
  transform: scale(0.99);
}

.drawer-brand .brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  animation: none;
}

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

.drawer-brand strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.2;
  font-weight: 700;
}

.drawer-brand span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  margin-top: 2px;
}

.drawer-head .icon-btn {
  width: 34px;
  min-height: 34px;
  border-radius: 12px;
  background: rgba(245, 248, 252, 0.92);
  color: #263247;
  font-size: 19px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}

#mobileNav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 2px 24px 0;
  padding-bottom: 24px;
  -webkit-overflow-scrolling: touch;
}

#mobileNav.nav {
  gap: 2px;
}

#mobileNav .nav-section {
  margin: 12px 8px 5px;
  min-height: 24px;
  padding: 3px 6px;
  color: #9aa7b8;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

#mobileNav .nav-section span::before {
  width: 4px;
  height: 4px;
  background: rgba(122, 141, 168, 0.22);
  box-shadow: 0 0 0 3px rgba(122, 141, 168, 0.035);
}

#mobileNav .nav-section i {
  width: 15px;
  height: 15px;
}

#mobileNav.nav button {
  min-height: 38px;
  padding: 6px 8px;
  gap: 8px;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 650;
}

#mobileNav.nav button:hover {
  transform: none;
}

#mobileNav.nav button.active {
  background:
    radial-gradient(circle at 16% 50%, color-mix(in srgb, var(--nav-soft, #eef3f8) 54%, transparent), transparent 34%),
    linear-gradient(135deg, rgba(255,255,255,0.92), rgba(245,248,252,0.86));
  border-color: rgba(205, 217, 235, 0.86);
  box-shadow: 0 8px 18px rgba(66, 83, 126, 0.06), inset 0 1px 0 rgba(255,255,255,0.92);
}

#mobileNav.nav .nav-section {
  min-height: 24px;
  padding: 3px 6px;
  border-radius: 9px;
  font-size: 10px;
  box-shadow: none;
}

#mobileNav.nav .nav-icon {
  width: 30px;
  height: 30px;
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.92);
}

#mobileNav.nav .nav-icon svg {
  width: 16px;
  height: 16px;
}

.modal {
  background: rgba(17, 24, 39, 0.20);
  padding: 20px;
  overflow: auto;
  display: none;
  place-items: start center;
}

.modal-panel {
  width: min(720px, calc(100vw - 40px));
  max-height: min(88vh, 760px);
  margin: 4vh auto;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(229, 232, 238, 0.9);
  overflow: auto;
  overscroll-behavior: contain;
}

.modal-panel.meter-log-modal {
  width: min(820px, calc(100vw - 40px));
}

.meter-log-body {
  display: block;
}

.meter-log-table {
  max-height: min(64vh, 560px);
  overflow: auto;
  border: 1px solid rgba(222, 230, 240, 0.92);
  border-radius: 10px;
}

.meter-log-table table {
  width: 100%;
  min-width: 720px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.meter-log-table th,
.meter-log-table td {
  padding: 7px 8px;
  font-size: 12px;
  line-height: 1.25;
  white-space: nowrap;
}

.meter-log-table th:nth-child(1),
.meter-log-table td:nth-child(1) {
  width: 76px;
}

.meter-log-table th:nth-child(2),
.meter-log-table td:nth-child(2) {
  width: 72px;
}

.meter-log-table th:nth-child(3),
.meter-log-table td:nth-child(3) {
  width: 70px;
}

.meter-log-table th:nth-child(4),
.meter-log-table td:nth-child(4),
.meter-log-table th:nth-child(5),
.meter-log-table td:nth-child(5),
.meter-log-table th:nth-child(7),
.meter-log-table td:nth-child(7) {
  width: 78px;
  text-align: right;
}

.meter-log-table th:nth-child(6),
.meter-log-table td:nth-child(6) {
  width: 52px;
  text-align: right;
}

.meter-log-table th:nth-child(8),
.meter-log-table td:nth-child(8) {
  width: 216px;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

@keyframes modalRise {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes drawerSlide {
  from {
    opacity: 0;
    transform: translateX(-12px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes contentSettle {
  from {
    opacity: 0;
    transform: translateY(8px);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes pageContentIn {
  from {
    opacity: 0;
    transform: translateY(7px) scale(0.995);
    filter: blur(1.5px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes pageContentOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
  to {
    opacity: 0;
    transform: translateY(-4px) scale(0.998);
    filter: blur(1px);
  }
}

::view-transition-old(page-content) {
  animation: pageContentOut 150ms ease both;
}

::view-transition-new(page-content) {
  animation: pageContentIn 260ms var(--ease-soft) both;
}

@keyframes fishFloat {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-1px) scale(1.018);
  }
}

@keyframes softPulse {
  0%, 100% {
    opacity: 0.58;
    transform: scale(1);
  }
  50% {
    opacity: 0.88;
    transform: scale(1.16);
  }
}

.modal-head {
  margin-bottom: 10px;
}

.modal-head h2 {
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
}

.modal-panel input,
.modal-panel select,
.modal-panel textarea {
  width: 100%;
  max-width: 100%;
  min-height: 32px;
  padding: 6px 9px;
  font-size: 13px;
}

.modal-panel .form-grid {
  grid-template-columns: 1fr;
  gap: 8px 10px;
}

.modal-panel .field {
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

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

.modal-panel .table-wrap {
  max-width: 100%;
}

.production-form .full {
  min-width: 0;
  overflow: hidden;
}

.production-form .scroll-table table {
  min-width: 0;
  width: 100%;
  table-layout: fixed;
}

.production-form .scroll-table th,
.production-form .scroll-table td {
  padding: 5px;
  font-size: 12px;
  line-height: 1.18;
}

.production-form .scroll-table th {
  white-space: normal;
  text-align: center;
  color: var(--muted);
}

.production-form .scroll-table th:nth-child(1),
.production-form .scroll-table td:nth-child(1) {
  width: 34px;
}

.production-form .scroll-table th:nth-child(2),
.production-form .scroll-table td:nth-child(2) {
  width: 108px;
}

.production-form .scroll-table th:nth-child(3),
.production-form .scroll-table td:nth-child(3) {
  width: 170px;
}

.production-form .scroll-table th:nth-child(4),
.production-form .scroll-table td:nth-child(4),
.production-form .scroll-table th:nth-child(5),
.production-form .scroll-table td:nth-child(5) {
  width: 88px;
}

.production-form .scroll-table th:nth-child(6),
.production-form .scroll-table td:nth-child(6) {
  width: 74px;
  text-align: center;
}

.production-form .scroll-table input,
.production-form .scroll-table select {
  min-width: 0;
  min-height: 28px;
  padding: 4px 7px;
  font-size: 12px;
  text-overflow: ellipsis;
}

.production-form .scroll-table button {
  min-height: 28px;
  padding: 0 7px;
  font-size: 12px;
}

.modal-panel:has(.sales-out-lines) {
  width: min(920px, calc(100vw - 32px));
}

.sales-out-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.sales-out-form .field {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
}

.sales-out-lines {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.sales-out-lines-table table {
  min-width: 760px;
  width: 100%;
  table-layout: fixed;
}

.sales-out-lines-table th,
.sales-out-lines-table td {
  padding: 5px;
  font-size: 12px;
  line-height: 1.18;
}

.sales-out-lines-table th {
  color: var(--muted);
  text-align: center;
}

.sales-out-lines-table th:nth-child(1),
.sales-out-lines-table td:nth-child(1) {
  width: 42px;
  text-align: center;
}

.sales-out-lines-table th:nth-child(2),
.sales-out-lines-table td:nth-child(2) {
  width: 120px;
}

.sales-out-lines-table th:nth-child(3),
.sales-out-lines-table td:nth-child(3) {
  width: 210px;
}

.sales-out-lines-table th:nth-child(4),
.sales-out-lines-table td:nth-child(4) {
  width: 150px;
}

.sales-out-lines-table th:nth-child(5),
.sales-out-lines-table td:nth-child(5) {
  width: 120px;
}

.sales-out-lines-table th:nth-child(6),
.sales-out-lines-table td:nth-child(6) {
  width: 74px;
  text-align: center;
}

.sales-out-lines-table input,
.sales-out-lines-table select {
  min-width: 0;
  min-height: 28px;
  padding: 4px 7px;
  font-size: 12px;
  text-overflow: ellipsis;
}

.sales-out-lines-table button {
  min-height: 28px;
  padding: 0 7px;
  font-size: 12px;
}

.sales-out-line-actions {
  justify-content: flex-start;
}

.sales-out-line-actions .ghost-btn {
  min-height: 30px;
  padding: 0 10px;
}

.ocr-items-panel {
  display: grid;
  gap: 8px;
}

.ocr-items-panel h3 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
}

.ocr-items-table table {
  min-width: 620px;
}

.ocr-items-table th,
.ocr-items-table td {
  padding: 6px 7px;
}

.ocr-items-table th:nth-child(1),
.ocr-items-table td:nth-child(1) {
  width: 46px;
}

.ocr-items-table input {
  min-width: 0;
  min-height: 30px;
  padding: 5px 7px;
  font-size: 12px;
}

.ocr-purchase-cards {
  display: none;
}

.ocr-total-check {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.ocr-total-check span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.ocr-total-check strong {
  color: var(--text);
}

.ocr-total-check.ok {
  border-color: rgba(22, 163, 74, 0.28);
  background: #f0fdf4;
}

.ocr-total-check.warn {
  border-color: rgba(217, 119, 6, 0.32);
  background: #fffbeb;
}

.stocktake-workbench {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(360px, 1.05fr);
  gap: 10px;
  align-items: stretch;
  min-height: max(360px, calc(100vh - 130px));
}

.stocktake-workbench > .panel {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.stocktake-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.stocktake-panel-head h2 {
  margin: 0;
}

.stocktake-panel-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.stocktake-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.stocktake-head-actions .compact-action {
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.stocktake-form {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 10px;
  align-content: start;
}

.stocktake-form .field {
  margin: 0;
  min-width: 0;
}

.stocktake-form .field input,
.stocktake-form .field select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.stocktake-form .full,
.stocktake-submit {
  grid-column: 1 / -1;
}

.stocktake-adjust-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  color: #516173;
  font-size: 13px;
  font-weight: 650;
}

.stocktake-adjust-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--primary);
}

.batch-stocktake-toolbar .stocktake-adjust-toggle {
  justify-self: start;
  white-space: nowrap;
}

.stocktake-submit {
  min-height: 34px;
  margin-top: 2px;
}

.stocktake-numbers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(222, 230, 240, 0.92);
  border-radius: 10px;
  background: rgba(248, 251, 255, 0.78);
}

.stocktake-numbers .field {
  min-width: 0;
}

.batch-stocktake-form {
  grid-template-columns: 1fr;
  gap: 0;
}

.modal-panel .form-grid.batch-stocktake-form {
  grid-template-columns: minmax(0, 1fr);
}

.modal-panel.batch-stocktake-modal {
  width: min(880px, calc(100vw - 56px));
}

.batch-stocktake-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
}

.batch-stocktake-toolbar {
  display: grid;
  grid-template-columns: minmax(190px, 0.85fr) minmax(150px, 0.58fr) minmax(170px, auto) minmax(180px, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 0 2px 2px;
}

.batch-stocktake-toolbar .field {
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
}

.batch-stocktake-toolbar .field span {
  white-space: nowrap;
}

.batch-stocktake-toolbar .form-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  text-align: right;
}

.batch-stocktake-table {
  max-height: min(470px, 58vh);
  border: 1px solid rgba(226, 234, 244, 0.9);
  border-radius: 10px;
  min-width: 0;
  overflow: auto;
  background: rgba(255, 255, 255, 0.78);
}

.batch-stocktake-table table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.batch-col-index {
  width: 48px;
}

.batch-col-item {
  width: 150px;
}

.batch-col-book {
  width: 140px;
}

.batch-col-counted {
  width: 140px;
}

.batch-col-diff {
  width: 104px;
}

.batch-col-note {
  width: auto;
}

.batch-stocktake-table th,
.batch-stocktake-table td {
  height: 42px;
  padding: 7px 10px;
  vertical-align: middle;
}

.batch-stocktake-table th {
  background: rgba(247, 250, 253, 0.92);
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.batch-stocktake-table tbody tr {
  border-top: 1px solid rgba(226, 234, 244, 0.72);
}

.batch-stocktake-table th:nth-child(1),
.batch-stocktake-table td:nth-child(1) {
  text-align: center;
}

.batch-stocktake-table th:nth-child(3),
.batch-stocktake-table th:nth-child(5),
.batch-stocktake-table td:nth-child(3),
.batch-stocktake-table td:nth-child(5) {
  text-align: right;
}

.batch-stocktake-table td strong {
  font-size: 13px;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-stocktake-table input {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 7px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  font-size: 12px;
  line-height: 1.25;
  box-sizing: border-box;
}

.batch-stocktake-table .num {
  text-align: right;
  white-space: nowrap;
}

.batch-stocktake-table .muted {
  color: var(--muted);
}

@media (max-width: 920px) {
  .modal-panel.batch-stocktake-modal {
    width: min(680px, calc(100vw - 28px));
  }

  .batch-stocktake-layout {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .batch-stocktake-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 0;
  }

  .batch-stocktake-toolbar .field {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 6px;
  }

  .batch-stocktake-toolbar .form-hint {
    grid-column: 1 / -1;
    text-align: left;
    font-size: 12px;
    line-height: 1.35;
  }

  .batch-stocktake-table {
    max-height: min(380px, 52vh);
  }
}

.stocktake-history {
  min-width: 0;
}

.stocktake-history .stocktake-records,
.stocktake-empty {
  flex: 1 1 auto;
}

.stocktake-empty {
  display: grid;
  place-content: center;
  gap: 6px;
  min-height: 240px;
  border: 1px dashed rgba(192, 206, 226, 0.9);
  border-radius: 12px;
  background: rgba(248, 251, 255, 0.72);
  text-align: center;
}

.stocktake-empty strong {
  color: #3c475b;
  font-size: 14px;
}

.stocktake-empty span {
  color: var(--muted);
  font-size: 12px;
}

.stocktake-plus {
  color: var(--primary);
  font-weight: 650;
}

.stocktake-minus {
  color: var(--danger);
  font-weight: 650;
}

.stocktake-records table {
  min-width: 780px;
}

.formula-form .formula-items-table {
  max-height: 300px;
  border-radius: 12px;
}

.formula-form .formula-items-table table {
  min-width: 0;
  table-layout: fixed;
}

.formula-form .formula-items-table th,
.formula-form .formula-items-table td {
  padding: 6px 6px;
}

.formula-form .formula-items-table th:nth-child(1),
.formula-form .formula-items-table td:nth-child(1) {
  width: 42px;
  text-align: center;
  color: var(--muted);
}

.formula-form .formula-items-table th:nth-child(2),
.formula-form .formula-items-table td:nth-child(2) {
  width: 135px;
}

.formula-form .formula-items-table th:nth-child(3),
.formula-form .formula-items-table td:nth-child(3) {
  width: 110px;
}

.formula-form .formula-items-table input {
  min-height: 30px;
}

.formula-row-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.formula-row-actions .ghost-btn {
  min-height: 30px;
  padding: 0 12px;
  font-size: 12px;
}

@media (min-width: 681px) {
  .modal-panel {
    width: min(760px, calc(100vw - var(--sidebar-width) - 56px));
  }

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

  .modal-panel .field {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .modal-panel .field.full,
  .modal-panel .production-form .full,
  .modal-panel .formula-form .full,
  .modal-panel .logistics-form .full {
    grid-column: 1 / -1;
  }

  .production-form .scroll-table,
  .formula-form .formula-items-table,
  .stocktake-records,
  .ocr-items-table {
    max-height: 38vh;
    overflow: auto;
  }

  .production-form .scroll-table table,
  .formula-form .formula-items-table table,
  .ocr-items-table table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }

  .production-form .scroll-table th,
  .production-form .scroll-table td,
  .formula-form .formula-items-table th,
  .formula-form .formula-items-table td,
  .ocr-items-table th,
  .ocr-items-table td {
    padding: 5px;
    font-size: 12px;
    line-height: 1.16;
  }

  .production-form .scroll-table input,
  .production-form .scroll-table select,
  .formula-form .formula-items-table input,
  .ocr-items-table input {
    min-width: 0;
    min-height: 28px;
    padding: 4px 7px;
    font-size: 12px;
  }

  .production-form .scroll-table th:nth-child(1),
  .production-form .scroll-table td:nth-child(1) {
    width: 34px;
  }

  .production-form .scroll-table th:nth-child(2),
  .production-form .scroll-table td:nth-child(2) {
    width: 108px;
  }

  .production-form .scroll-table th:nth-child(3),
  .production-form .scroll-table td:nth-child(3) {
    width: auto;
  }

  .production-form .scroll-table th:nth-child(4),
  .production-form .scroll-table td:nth-child(4),
  .production-form .scroll-table th:nth-child(5),
  .production-form .scroll-table td:nth-child(5) {
    width: 88px;
  }

  .production-form .scroll-table th:nth-child(6),
  .production-form .scroll-table td:nth-child(6) {
    width: 70px;
    text-align: center;
  }

  .formula-form .formula-items-table th:nth-child(1),
  .formula-form .formula-items-table td:nth-child(1) {
    width: 36px;
  }

  .formula-form .formula-items-table th:nth-child(2),
  .formula-form .formula-items-table td:nth-child(2) {
    width: auto;
  }

  .formula-form .formula-items-table th:nth-child(3),
  .formula-form .formula-items-table td:nth-child(3) {
    width: 96px;
  }

  .formula-form .formula-items-table th:nth-child(5),
  .formula-form .formula-items-table td:nth-child(5) {
    width: 60px;
  }

  .ocr-items-table th:nth-child(1),
  .ocr-items-table td:nth-child(1) {
    width: 36px;
  }
}

.row-icon-btn {
  border: 0;
  border-radius: 8px;
  min-height: 28px;
  padding: 0 8px;
  background: #fff7f7;
  color: #cf4f4f;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.row-icon-btn:hover {
  background: #feecec;
  color: #b91c1c;
}

.modal-actions {
  justify-content: space-between;
  align-items: center;
  margin: 12px -2px -2px;
  padding-top: 10px;
  border-top: 1px solid rgba(226, 232, 240, 0.72);
  flex-wrap: nowrap;
}

.modal-actions-left,
.modal-actions-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.modal-actions .primary-btn,
.modal-actions .ghost-btn,
.modal-actions .danger-btn {
  min-height: 36px;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: none;
}

.modal-actions .primary-btn {
  background: #eef4ff;
  border: 1px solid rgba(99, 102, 241, 0.18);
  color: #3f5fd7;
}

.modal-actions .primary-btn:hover {
  background: #e4edff;
  border-color: rgba(99, 102, 241, 0.28);
}

.modal-actions .ghost-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #64748b;
}

.modal-actions .ghost-btn:hover {
  background: #f8fafc;
  border-color: rgba(226, 232, 240, 0.8);
}

.modal-actions .danger-btn {
  min-height: 34px;
  padding: 0 4px;
  background: transparent;
  border: 0;
  color: #d65a5a;
  font-weight: 700;
}

.modal-actions .danger-btn:hover {
  background: transparent;
  color: #b91c1c;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.form-helper-actions {
  display: flex;
  justify-content: flex-end;
  margin: -2px 0 2px;
}

.mobile-only {
  display: none;
}

@media (max-width: 960px) {
  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .sidebar-collapse-btn {
    display: none;
  }

  .mobile-only {
    display: inline-flex;
  }

  .topbar {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto auto;
    align-items: center;
    justify-content: start;
    gap: 8px;
    padding: 7px 8px;
    min-height: 48px;
  }

  .title-block {
    margin-right: 0;
    width: auto;
    min-width: 0;
    max-width: none;
  }

  .welcome-chip {
    justify-self: start;
    margin-right: 0;
    font-size: 12px;
    padding: 5px 8px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .top-actions {
    flex-wrap: nowrap;
  }

  .global-search {
    display: none;
  }

  .top-actions .primary-btn {
    white-space: nowrap;
    min-width: max-content;
  }

  .icon-btn.mobile-only {
    width: 32px;
    min-height: 32px;
    font-size: 17px;
  }

  .top-actions .user-chip {
    display: none;
  }

  .content {
    padding: 12px 10px 88px;
  }

  .compact-toolbar {
    min-height: auto;
    margin-bottom: 10px;
  }

  .compact-toolbar + .mobile-record-list {
    margin-top: 2px;
  }

  .kpi-grid,
  .two-col,
  .inventory-dashboard,
  .batch-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-stage {
    min-height: auto;
    grid-template-columns: 1fr;
    border-radius: 20px;
    gap: 10px;
    padding: 10px;
  }

  .stage-card {
    min-height: 0;
  }

  .stage-ticker {
    grid-auto-columns: minmax(132px, 46vw);
  }

  .mini-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .mini-kpis section {
    min-height: 70px;
    padding: 10px 9px;
  }

  .mini-kpis strong {
    font-size: 18px;
  }

  .today-plan-body {
    grid-template-columns: 1fr;
  }

  .energy-summary {
    grid-template-columns: 1fr;
  }

  .energy-panel-head {
    display: grid;
  }

  .energy-overview-head,
  .energy-daily-head {
    display: grid;
  }

  .energy-overview-grid,
  .energy-overview-breakdown.is-three {
    grid-template-columns: 1fr;
  }

  .energy-gas-head {
    display: grid;
  }

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

  .logistics-expense-head {
    display: grid;
  }

  .plan-batches {
    grid-template-columns: repeat(5, minmax(118px, 1fr));
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .mini-kpis span,
  .kpi-trend {
    font-size: 10px;
  }

  .trace-toolbar {
    align-items: flex-start;
  }

  .trace-toolbar .filters {
    flex: 1 1 260px;
    max-width: min(360px, calc(100vw - 130px));
  }

  .trace-toolbar .primary-btn {
    flex: 0 0 auto;
    width: auto;
  }

  .trace-material-table {
    display: none;
  }

  .trace-material-list {
    display: grid;
    gap: 8px;
  }

  .trace-material-card {
    display: grid;
    grid-template-columns: minmax(70px, 1fr) repeat(2, minmax(64px, .8fr));
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
  }

  .trace-material-card strong {
    color: var(--text);
    font-size: 14px;
    line-height: 1.2;
  }

  .trace-material-card span {
    display: grid;
    gap: 2px;
    color: var(--text);
    font-size: 12px;
    font-weight: 750;
    text-align: right;
  }

  .trace-material-card em {
    color: var(--muted);
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
  }

  .trace-material-card small {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 11px;
  }

  .trace-layout {
    min-height: 0;
  }

  .table-wrap {
    display: block;
  }

  .form-grid,
  .material-row {
    grid-template-columns: 1fr;
  }

  .stock-card dl,
  .detail-grid,
  .material-row.merged {
    grid-template-columns: 1fr;
  }

  .detail-body .table-wrap {
    display: block;
  }

  .scroll-table .table-wrap {
    display: block;
  }

  .compact-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .compact-row button {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .toolbar {
    align-items: stretch;
  }

  .filters {
    width: auto;
    flex: 0 1 auto;
  }

  .filters input,
  .filters select,
  .toolbar > .primary-btn {
    flex: 0 1 auto;
  }

  .combo-filter,
  .table-tools input {
    width: min(260px, 100%);
  }

  h1 {
    font-size: 16px;
  }
}

@media (max-width: 680px) {
  .topbar {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 8px;
  }

  .welcome-chip {
    display: inline-flex;
    justify-self: end;
    align-items: center;
    max-width: 116px;
    padding: 5px 8px;
    font-size: 11px;
    line-height: 1;
  }

  .top-actions {
    display: none;
  }

  .dashboard-stage {
    margin-bottom: 8px;
  }

  .stage-card {
    padding: 14px;
  }

  .stage-card dl {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .stage-metrics {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .stage-metric {
    min-height: 84px;
    padding: 12px 14px;
  }

  .stage-metric strong {
    font-size: 22px;
  }

  .stage-process {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .stage-process i {
    width: 2px;
    height: 18px;
    margin: 0 auto;
    background: linear-gradient(180deg, rgba(91, 173, 195, 0.18), rgba(91, 173, 195, 0.72));
  }

  .stage-process i::after {
    right: auto;
    left: 50%;
    top: auto;
    bottom: -1px;
    transform: translateX(-50%) rotate(135deg);
  }

  .today-plan {
    padding: 12px;
  }

  .today-plan-head strong,
  .plan-batches article strong {
    font-size: 16px;
  }

  .plan-batches {
    grid-template-columns: 1fr;
  }

  .inventory-dashboard .scroll-table {
    display: none;
  }

  .scroll-table.has-mobile-cards {
    display: none;
  }

  .table-tools:has(+ .scroll-table.has-mobile-cards) {
    display: none;
  }

  .mobile-record-list {
    display: grid;
  }

  .material-warehouse-groups {
    display: none;
  }

  .material-command,
  .material-command-actions {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .material-command-actions {
    display: grid;
  }

  .material-search input {
    width: 100%;
  }

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

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

  .inventory-dashboard .panel {
    padding: 12px 12px 8px;
  }

  .inventory-dashboard .panel h2 {
    margin-bottom: 10px;
    font-size: 16px;
  }

  .inventory-dashboard .dashboard-filter {
    margin-bottom: 6px;
  }

  .mobile-stock-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    max-height: 236px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 3px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .inventory-dashboard .panel:first-child .mobile-stock-list {
    max-height: 270px;
  }

  .category-stock-groups {
    max-height: 330px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 3px;
    -webkit-overflow-scrolling: touch;
  }

  .category-stock-groups .mobile-stock-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .category-section {
    padding: 7px 9px;
  }

  .category-section-head,
  .mobile-category-block > header {
    gap: 7px;
  }

  .category-filter input {
    min-height: 26px;
    padding: 0 9px;
    font-size: 11px;
  }

  .records-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    align-items: stretch;
    padding: 0;
    margin-bottom: 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .records-toolbar .filters,
  .records-toolbar .toolbar-actions,
  .records-toolbar .month-tools {
    width: 100%;
  }

  .records-toolbar .filters {
    display: grid;
    grid-template-columns: minmax(128px, 0.78fr) minmax(0, 1fr);
    gap: 6px;
  }

  .records-toolbar .month-tools {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .records-toolbar .month-tools:has(:only-child) {
    grid-template-columns: 1fr;
  }

  .records-toolbar #monthInput,
  .records-toolbar [data-export],
  .records-toolbar .inline-filter,
  .records-toolbar .inline-filter input {
    width: 100%;
  }

  .records-toolbar #monthInput,
  .records-toolbar .inline-filter input,
  .records-toolbar .toolbar-actions .ghost-btn,
  .records-toolbar .toolbar-actions .soft-primary {
    min-height: 32px;
    border-radius: 10px;
    box-shadow: none;
  }

  .records-toolbar .toolbar-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 6px;
  }

  .records-toolbar .toolbar-actions .ghost-btn,
  .records-toolbar .toolbar-actions .soft-primary {
    padding: 0 8px;
    font-size: 12px;
    width: 100%;
    min-width: 0;
  }

  .detail-body .panel {
    padding: 12px;
  }

  .detail-body .panel h2 {
    font-size: 15px;
    margin-bottom: 10px;
  }

  .operation-sheet {
    display: grid;
    gap: 10px;
  }

  .operation-sheet h3 {
    margin: 2px 0 0;
    font-size: 15px;
  }

  .desktop-batch-table,
  .desktop-material-table {
    display: none;
  }

  .mobile-batch-summary {
    display: grid;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.82);
  }

  .mobile-summary-row {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
  }

  .mobile-summary-row:last-child {
    border-bottom: 0;
  }

  .mobile-summary-row span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
  }

  .mobile-summary-row strong {
    min-width: 0;
    color: var(--text);
    font-size: 14px;
    overflow-wrap: anywhere;
  }

  .mobile-material-list {
    display: grid;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    background: white;
  }

  .mobile-material-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 9px 10px;
    border-bottom: 1px solid var(--line);
  }

  .mobile-material-item:last-child {
    border-bottom: 0;
  }

  .mobile-material-item strong {
    display: block;
    color: var(--text);
    font-size: 14px;
    line-height: 1.25;
  }

  .mobile-material-item span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.3;
  }

  .mobile-material-qty {
    text-align: right;
    min-width: 82px;
  }
}

@media (max-width: 520px) {
  .topbar {
    gap: 8px;
  }

  .record-card dl {
    grid-template-columns: 1fr;
  }

  .modal {
    padding: 8px;
  }

  .modal-panel {
    width: min(420px, calc(100vw - 28px));
    margin: 5vh auto;
    min-height: 0;
    max-height: 82vh;
    padding: 12px;
  }

  .modal-actions {
    gap: 10px;
  }

  .modal-actions-right {
    gap: 7px;
  }

  .modal-actions .primary-btn,
  .modal-actions .ghost-btn {
    min-width: 66px;
    padding: 0 14px;
  }

  .modal-head h2 {
    font-size: 17px;
  }

  .modal-panel .field {
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 7px;
  }

  .modal-panel .energy-gas-readings,
  .modal-panel .energy-public-readings {
    width: 100%;
    min-width: 0;
    padding: 8px;
    gap: 7px;
    overflow: hidden;
  }

  .modal-panel .energy-gas-head {
    gap: 3px;
  }

  .modal-panel .energy-gas-head strong {
    font-size: 13px;
  }

  .modal-panel .energy-gas-head span {
    font-size: 11px;
    line-height: 1.3;
  }

  .modal-panel .energy-gas-layout,
  .modal-panel .energy-gas-balance {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .modal-panel .energy-gas-table {
    overflow: hidden;
  }

  .modal-panel .energy-gas-table table,
  .modal-panel .energy-public-table table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }

  .modal-panel .energy-gas-table th,
  .modal-panel .energy-gas-table td {
    padding: 5px 7px;
    font-size: 11px;
  }

  .modal-panel .energy-gas-table input {
    max-width: none;
    min-height: 30px;
    padding: 4px 7px;
    font-size: 12px;
  }

  .modal-panel .energy-reading-table th:first-child,
  .modal-panel .energy-reading-table td:first-child {
    width: 42%;
  }

  .modal-panel .energy-gas-balance label {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .production-form .scroll-table {
    max-height: 42vh;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: white;
  }

  .production-form .scroll-table .table-wrap {
    overflow: visible;
    border: 0;
    box-shadow: none;
  }

  .production-form .scroll-table table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }

  .production-form .scroll-table th,
  .production-form .scroll-table td {
    padding: 5px 3px;
    font-size: 11px;
    line-height: 1.15;
  }

  .production-form .scroll-table th:nth-child(1),
  .production-form .scroll-table td:nth-child(1) {
    width: 28px;
    text-align: center;
  }

  .production-form .scroll-table th:nth-child(2),
  .production-form .scroll-table td:nth-child(2) {
    width: 76px;
  }

  .production-form .scroll-table th:nth-child(4),
  .production-form .scroll-table td:nth-child(4),
  .production-form .scroll-table th:nth-child(5),
  .production-form .scroll-table td:nth-child(5) {
    width: 62px;
  }

  .production-form .scroll-table input,
  .production-form .scroll-table select {
    min-width: 0;
    width: 100%;
    min-height: 30px;
    padding: 4px 4px;
    font-size: 11px;
  }

  .ocr-items-panel {
    gap: 7px;
  }

  .ocr-items-panel h3 {
    font-size: 13px;
  }

  .ocr-items-table {
    display: none;
  }

  .ocr-purchase-cards {
    display: grid;
    gap: 6px;
  }

  .ocr-purchase-card {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) minmax(0, .82fr);
    gap: 6px;
    align-items: start;
    padding: 7px 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
  }

  .ocr-purchase-card strong {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 12px;
    line-height: 1;
  }

  .ocr-line-field {
    display: grid;
    gap: 3px;
    min-width: 0;
  }

  .ocr-line-field span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
    line-height: 1;
  }

  .ocr-purchase-card input {
    min-width: 0;
    min-height: 28px;
    padding: 4px 6px;
    font-size: 12px;
  }

  .ocr-line-field.wide {
    grid-column: 2 / 4;
  }

  .ocr-line-field:not(.wide) {
    grid-column: auto;
  }

  .ocr-line-field.amount input {
    background: #f8fafc;
    color: var(--text);
    font-weight: 750;
  }

  .ocr-purchase-card [data-purchase-item-field="qty"] {
    grid-column: 2;
  }

  .ocr-purchase-card [data-purchase-item-field="unitPrice"],
  .ocr-purchase-card [data-purchase-item-field="amount"] {
    grid-column: auto;
  }

  .ocr-purchase-card [data-purchase-item-field="amount"] {
    grid-column: 2 / 4;
  }

  .ocr-total-check {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 7px 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
  }

  .ocr-total-check span {
    min-width: 0;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.25;
  }

  .ocr-total-check strong {
    display: block;
    margin-top: 2px;
    color: var(--text);
    font-size: 11px;
    white-space: nowrap;
  }

  .ocr-total-check.ok {
    border-color: rgba(22, 163, 74, 0.28);
    background: #f0fdf4;
  }

  .ocr-total-check.warn {
    border-color: rgba(217, 119, 6, 0.32);
    background: #fffbeb;
  }

  .stocktake-form {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .stocktake-workbench {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .stocktake-numbers {
    grid-template-columns: 1fr;
  }

  .modal-panel.batch-stocktake-modal {
    width: min(420px, calc(100vw - 28px));
  }

  .batch-stocktake-layout {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .batch-stocktake-toolbar {
    grid-template-columns: 1fr;
  }

  .batch-stocktake-toolbar .field {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .batch-stocktake-toolbar .form-hint {
    margin: 0;
  }

  .batch-stocktake-table table {
    min-width: 560px;
  }

  .stocktake-records table {
    min-width: 620px;
  }

  .formula-form .formula-items-table {
    max-height: 46vh;
    overflow: auto;
    background: white;
  }

  .formula-form .formula-items-table table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }

  .formula-form .formula-items-table th,
  .formula-form .formula-items-table td {
    padding: 6px 4px;
    font-size: 11px;
  }

  .formula-form .formula-items-table th:nth-child(1),
  .formula-form .formula-items-table td:nth-child(1) {
    width: 28px;
  }

  .formula-form .formula-items-table th:nth-child(2),
  .formula-form .formula-items-table td:nth-child(2) {
    width: 96px;
  }

  .formula-form .formula-items-table th:nth-child(3),
  .formula-form .formula-items-table td:nth-child(3) {
    width: 76px;
  }

  .formula-form .formula-items-table th:nth-child(5),
  .formula-form .formula-items-table td:nth-child(5) {
    width: 44px;
  }

  .formula-form .formula-items-table input {
    width: 100%;
    min-height: 30px;
    padding: 5px 6px;
    font-size: 12px;
  }

  .detail-body .detail-section table {
    min-width: 0;
  }
}

.app button,
.app input,
.app select,
.app textarea {
  font-family: var(--font-main);
  font-size: 13px;
  line-height: 1.35;
  letter-spacing: 0;
}

.app button,
.file-action-btn,
.profile-action-btn,
.row-actions button,
.compact-row button,
.mobile-record-row button {
  font-weight: 600;
}

.app .brand-user {
  font-weight: 700;
}

.panel h2,
.mobile-category-block > header strong,
.material-warehouse-block > header strong,
.record-card header strong,
.stock-card strong {
  font-size: 16px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: 0;
}

.field > span,
.field label,
.modal-panel .field span,
.mini-kpis span,
.stock-card dt,
.detail-cell span,
.record-card dt,
.mobile-record-meta em,
.category-section-head span,
.empty-category,
.maintenance-note,
.profile-head p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 500;
  letter-spacing: 0;
}

.table-wrap table th,
.table-wrap table td,
.scroll-table table th,
.scroll-table table td,
.user-name-input,
.user-role-select {
  font-size: 13px;
  line-height: 1.35;
}

.system-info dl {
  min-width: 0;
}

.system-info div {
  grid-template-columns: 96px minmax(0, 1fr);
}

.system-info dt {
  white-space: normal;
}

.system-info dd {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.45;
  text-align: left;
  word-break: break-all;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
  gap: 10px;
  align-items: start;
}

.settings-users-panel {
  grid-column: 1 / -1;
  max-width: none;
  padding-top: 8px;
  padding-bottom: 8px;
  justify-self: stretch;
}

.settings-users-panel h2 {
  margin-bottom: 4px;
}

.settings-users-panel .maintenance-note {
  margin-top: 4px;
  line-height: 1.35;
}

.user-list {
  display: grid;
  gap: 5px;
  margin-top: 6px;
}

.user-permission-head,
.user-permission-row {
  display: grid;
  grid-template-columns: minmax(78px, 0.75fr) minmax(66px, 0.58fr) minmax(88px, 0.72fr) minmax(122px, 0.96fr) minmax(100px, 0.8fr) 54px minmax(184px, 1.08fr);
  gap: 6px;
  align-items: center;
}

.user-permission-head {
  padding: 0 7px 1px;
  color: #7c8aa0;
  font-size: 12px;
  font-weight: 800;
}

.user-permission-row {
  min-width: 0;
  padding: 4px 7px;
  border: 1px solid rgba(226, 234, 246, 0.72);
  border-radius: 12px;
  background: rgba(248, 251, 255, 0.72);
}

.settings-users-panel .user-name-input,
.settings-users-panel .user-role-select {
  min-width: 0;
  min-height: 28px;
  padding: 4px 7px;
}

.user-permission-row strong {
  min-width: 0;
  overflow: hidden;
  color: #273142;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-status {
  color: #2f8f6b;
  font-size: 12px;
  font-weight: 800;
}

.user-status.is-pending {
  color: #b7791f;
}

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

.user-row-actions .compact-action {
  min-height: 26px;
  padding: 0 7px;
  font-size: 12px;
}

.user-row-actions .danger-action {
  color: #c24141;
  border-color: rgba(217, 67, 67, 0.24);
  background: rgba(217, 67, 67, 0.06);
}

.user-row-actions .danger-action:hover:not(:disabled) {
  color: #a83232;
  border-color: rgba(217, 67, 67, 0.36);
  background: rgba(217, 67, 67, 0.1);
}

.user-row-actions .danger-action:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

@media (max-width: 760px) {
  .settings-users-panel {
    max-width: none;
  }

  .user-permission-head {
    display: none;
  }

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

  .user-permission-row strong,
  .user-row-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

/* Compact density for daily data-entry screens. */
.content {
  padding: 6px 14px 24px;
}

.grid,
.two-col,
.inventory-dashboard,
.report-grid,
.energy-grid,
.energy-summary,
.category-stock-groups,
.material-warehouse-groups,
.grouped-mobile-records {
  gap: 8px;
}

.panel,
.energy-overview,
.logistics-dashboard,
.energy-panel,
.category-section,
.material-warehouse-block,
.record-card,
.mobile-record-row,
.stock-card {
  border-radius: 12px;
  padding: 10px;
}

.panel h2 {
  margin-bottom: 7px;
  font-size: 14px;
}

.toolbar,
.records-toolbar,
.table-tools,
.filters,
.month-tools,
.toolbar-actions {
  gap: 6px;
  margin-bottom: 6px;
}

.records-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.records-toolbar .filters {
  align-items: center;
  display: grid;
  grid-template-columns: minmax(136px, 174px) minmax(180px, 1fr);
  flex: 1 1 320px;
  min-width: 0;
  width: auto;
}

.records-toolbar .filters:has(.month-tools:only-child) {
  flex: 0 0 auto;
  grid-template-columns: minmax(136px, 174px);
}

.records-toolbar .toolbar-actions {
  display: inline-flex;
  justify-content: flex-end;
  flex: 0 0 auto;
  width: auto;
}

.records-toolbar .filters,
.records-toolbar .month-tools,
.records-toolbar .toolbar-actions {
  margin-bottom: 0;
}

.records-toolbar .inline-filter {
  display: flex;
  align-items: center;
  height: 34px;
  margin: 0;
  width: 100%;
  min-width: 0;
}

.records-toolbar .month-tools {
  align-items: center;
  flex-wrap: nowrap;
}

.records-toolbar #monthInput,
.records-toolbar .inline-filter input {
  box-sizing: border-box;
  height: 34px;
  min-height: 34px;
  margin: 0;
  display: inline-flex;
  align-items: center;
  width: 100%;
}

.filters {
  --filter-control-width: 210px;
}

.filters input,
.filters select,
.field input,
.field select,
.field textarea,
.table-tools input {
  min-height: 30px;
  border-radius: 8px;
  padding: 5px 8px;
}

.primary-btn,
.ghost-btn,
.danger-btn,
.file-action-btn,
.soft-primary,
.row-icon-btn,
.records-toolbar button,
.table-tools button {
  min-height: 30px;
  padding-block: 5px;
}

.scroll-table {
  max-height: 420px;
  border-radius: 10px;
}

th,
td {
  padding: 6px 9px;
  line-height: 1.25;
}

td button[data-edit],
.row-actions button[data-edit],
.compact-row button[data-edit],
.mobile-record-row button[data-edit],
.record-card button[data-edit] {
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(196, 211, 232, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.52);
  color: #40546f;
  box-shadow: none;
  font-size: 12px;
  font-weight: 600;
}

td button[data-edit]:hover,
.row-actions button[data-edit]:hover,
.compact-row button[data-edit]:hover,
.mobile-record-row button[data-edit]:hover,
.record-card button[data-edit]:hover {
  border-color: rgba(47, 126, 216, 0.30);
  background: rgba(239, 246, 255, 0.72);
  color: #2469b8;
}

.scroll-table[data-table-id="logistics-table"] table {
  min-width: 820px;
  table-layout: fixed;
}

.scroll-table[data-table-id="logistics-table"] th,
.scroll-table[data-table-id="logistics-table"] td {
  padding: 6px 8px;
  font-size: 12px;
  white-space: nowrap;
}

.scroll-table[data-table-id="logistics-table"] th:nth-child(1),
.scroll-table[data-table-id="logistics-table"] td:nth-child(1) {
  width: 58px;
}

.scroll-table[data-table-id="logistics-table"] th:nth-child(2),
.scroll-table[data-table-id="logistics-table"] td:nth-child(2) {
  width: 76px;
}

.scroll-table[data-table-id="logistics-table"] th:nth-child(3),
.scroll-table[data-table-id="logistics-table"] td:nth-child(3) {
  width: 82px;
}

.scroll-table[data-table-id="logistics-table"] th:nth-child(4),
.scroll-table[data-table-id="logistics-table"] td:nth-child(4) {
  width: 118px;
}

.scroll-table[data-table-id="logistics-table"] th:nth-child(n+5):nth-child(-n+10),
.scroll-table[data-table-id="logistics-table"] td:nth-child(n+5):nth-child(-n+10) {
  width: 70px;
  text-align: right;
}

.scroll-table[data-table-id="logistics-table"] th:nth-child(11),
.scroll-table[data-table-id="logistics-table"] td:nth-child(11) {
  width: 58px;
  min-width: 58px;
  text-align: center;
}

.scroll-table[data-table-id="logistics-table"] th.action-col,
.scroll-table[data-table-id="logistics-table"] td.action-col {
  position: static;
  min-width: 58px;
  box-shadow: none;
}

.scroll-table[data-table-id="energy-table"] table {
  min-width: 760px;
  table-layout: fixed;
}

.scroll-table[data-table-id="energy-table"] th,
.scroll-table[data-table-id="energy-table"] td {
  padding: 6px 8px;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.scroll-table[data-table-id="energy-table"] th {
  text-align: center;
}

.scroll-table[data-table-id="energy-table"] th:nth-child(1),
.scroll-table[data-table-id="energy-table"] td:nth-child(1) {
  width: 46px;
}

.scroll-table[data-table-id="energy-table"] th:nth-child(2),
.scroll-table[data-table-id="energy-table"] td:nth-child(2) {
  width: 76px;
}

.scroll-table[data-table-id="energy-table"] th:nth-child(3),
.scroll-table[data-table-id="energy-table"] td:nth-child(3) {
  width: 88px;
}

.scroll-table[data-table-id="energy-table"] th:nth-child(4),
.scroll-table[data-table-id="energy-table"] td:nth-child(4) {
  width: 78px;
}

.scroll-table[data-table-id="energy-table"] th:nth-child(5),
.scroll-table[data-table-id="energy-table"] td:nth-child(5) {
  width: 72px;
}

.scroll-table[data-table-id="energy-table"] th:nth-child(6),
.scroll-table[data-table-id="energy-table"] td:nth-child(6),
.scroll-table[data-table-id="energy-table"] th:nth-child(7),
.scroll-table[data-table-id="energy-table"] td:nth-child(7) {
  width: 86px;
  text-align: right;
}

.scroll-table[data-table-id="energy-table"] th:nth-child(8),
.scroll-table[data-table-id="energy-table"] td:nth-child(8) {
  width: 50px;
  text-align: right;
}

.scroll-table[data-table-id="energy-table"] th:nth-child(9),
.scroll-table[data-table-id="energy-table"] td:nth-child(9),
.scroll-table[data-table-id="energy-table"] th:nth-child(10),
.scroll-table[data-table-id="energy-table"] td:nth-child(10) {
  width: 68px;
  text-align: right;
}

.scroll-table[data-table-id="energy-table"] th:nth-child(11),
.scroll-table[data-table-id="energy-table"] td:nth-child(11) {
  width: 58px;
  min-width: 58px;
  text-align: center;
}

.scroll-table[data-table-id="energy-table"] th.action-col,
.scroll-table[data-table-id="energy-table"] td.action-col {
  position: static;
  min-width: 58px;
  box-shadow: none;
}

.table-wrap.interactive-table th.serial-col,
.table-wrap.interactive-table td.serial-col,
.scroll-table.interactive-table th.serial-col,
.scroll-table.interactive-table td.serial-col,
.scroll-table[data-table-id] th.serial-col,
.scroll-table[data-table-id] td.serial-col {
  width: 34px;
  min-width: 34px;
  max-width: 34px;
  padding-left: 5px;
  padding-right: 5px;
  text-align: center;
}

.table-wrap.interactive-table th.serial-col > span,
.scroll-table.interactive-table th.serial-col > span,
.scroll-table[data-table-id] th.serial-col > span {
  padding-right: 0;
}

.dashboard-hero {
  min-height: 104px;
  margin-bottom: 8px;
  padding: 14px 18px;
  border: 1px solid rgba(211, 223, 241, 0.92);
  border-radius: 16px;
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.96), transparent 46%),
    linear-gradient(118deg, rgba(247, 251, 255, 0.98) 0%, rgba(238, 246, 255, 0.94) 60%, rgba(244, 249, 255, 0.96) 100%);
  box-shadow: 0 18px 42px rgba(61, 91, 143, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.94);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  overflow: hidden;
  position: relative;
  isolation: isolate;
  animation: cardSettle 420ms var(--ease-soft) both;
}

.dashboard-hero::before,
.dashboard-hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 999px;
  z-index: -1;
}

.dashboard-hero::before {
  width: 150px;
  height: 150px;
  left: -64px;
  bottom: -118px;
  background: rgba(82, 183, 158, 0.11);
}

.dashboard-hero::after {
  width: 260px;
  height: 260px;
  right: -98px;
  top: -170px;
  background: rgba(74, 132, 236, 0.11);
}

.dashboard-hero-copy {
  position: relative;
  z-index: 2;
}

.dashboard-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #4b72b8;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.dashboard-hero-kicker::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #4b85ec, #60c8a5);
}

.dashboard-hero h2 {
  margin: 7px 0 0;
  color: #1f2c43;
  font-size: clamp(20px, 1.8vw, 27px);
  font-weight: 750;
  letter-spacing: -0.055em;
  line-height: 1.16;
}

.dashboard-hero h2 strong {
  color: #3871d8;
  font-weight: 780;
}

.dashboard-hero-meta {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.dashboard-hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid rgba(205, 219, 239, 0.82);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: #53657f;
  font-size: 11px;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.dashboard-hero-meta i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #5abf9f;
  box-shadow: 0 0 0 3px rgba(90, 191, 159, 0.12);
  animation: dotPulse 2.4s ease-in-out infinite;
}

.dashboard-hero-meta .is-alert i {
  background: #ec966c;
  box-shadow: 0 0 0 3px rgba(236, 150, 108, 0.14);
}

.dashboard-hero-art {
  display: none;
  align-self: stretch;
  min-width: 0;
  position: relative;
}

.dashboard-hero-art::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0 auto 0 -28%;
  width: 56%;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(240, 247, 255, 0.96), rgba(240, 247, 255, 0.42) 54%, transparent);
}

.dashboard-hero-art img {
  width: 126%;
  height: 100%;
  position: absolute;
  right: -12%;
  top: 0;
  display: block;
  object-fit: cover;
  object-position: center;
  mix-blend-mode: multiply;
  filter: saturate(0.86) contrast(0.98);
  opacity: 0.92;
  -webkit-mask-image: radial-gradient(ellipse 92% 112% at 66% 50%, #000 38%, rgba(0, 0, 0, 0.86) 62%, transparent 100%);
  mask-image: radial-gradient(ellipse 92% 112% at 66% 50%, #000 38%, rgba(0, 0, 0, 0.86) 62%, transparent 100%);
}

.dashboard-insights {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.58fr) minmax(230px, 0.62fr);
  gap: 8px;
  margin-bottom: 8px;
}

.dashboard-insights .panel {
  min-width: 0;
  padding: 11px 12px;
  overflow: hidden;
}

.dashboard-insights .dashboard-chart {
  padding-bottom: 6px;
}

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

.insight-head span {
  display: block;
  color: #8491a5;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.insight-head h2 {
  margin: 2px 0 0;
  color: #283750;
  font-size: 14px;
}

.insight-head > b {
  color: #315b9f;
  font-size: 18px;
  line-height: 1;
  white-space: nowrap;
}

.insight-head small {
  color: #8290a5;
  font-size: 10px;
}

.sales-trend-chart {
  width: 100%;
  height: 90px;
  margin-top: 3px;
  overflow: visible;
}

.sales-trend-chart .trend-grid {
  stroke: rgba(168, 183, 205, 0.24);
  stroke-width: 1;
}

.sales-trend-chart polyline {
  stroke: #5388ef;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sales-trend-chart circle {
  fill: #ffffff;
  stroke: #5388ef;
  stroke-width: 2;
}

.sales-trend-chart text {
  fill: #8995a7;
  font-size: 9px;
  text-anchor: middle;
}

.sales-trend-chart .trend-value-label {
  fill: #2f5fa8;
  font-size: 10px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translateY(2px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.sales-trend-chart .trend-value-label.is-fixed,
.sales-trend-chart .trend-point-group:hover .trend-value-label {
  opacity: 1;
  transform: translateY(0);
}

.sales-trend-chart .trend-date-label {
  fill: #8995a7;
  font-size: 8.5px;
  font-weight: 650;
}

.health-body {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  margin-top: 12px;
}

.health-ring {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(#59bea0 var(--health), #edf2f7 0);
  position: relative;
}

.health-ring::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: inherit;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.health-ring strong {
  position: relative;
  z-index: 1;
  color: #2c4860;
  font-size: 20px;
}

.health-ring small {
  font-size: 10px;
}

.health-legend {
  display: grid;
  gap: 8px;
}

.health-legend p {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  margin: 0;
  color: #738096;
  font-size: 11px;
}

.health-legend i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #59bea0;
  animation: dotPulse 2.4s ease-in-out infinite;
}

.health-legend .is-alert i {
  background: #ef9872;
}

.health-legend strong {
  color: #35445b;
  font-size: 11px;
}

.production-status-card {
  display: grid;
  align-content: start;
  gap: 12px;
}

.production-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.production-status-grid p {
  min-width: 0;
  margin: 0;
  padding: 10px 8px;
  border: 1px solid #e6ecf5;
  border-radius: 16px;
  background: #f8fbff;
}

.production-status-grid span,
.production-status-grid em {
  display: block;
  color: #8a94a6;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

.production-status-grid strong {
  display: inline-block;
  margin: 5px 3px 0 0;
  color: #172033;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.production-status-grid em {
  display: inline;
}

.production-status-note {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 14px;
  background: #f5f9ff;
  color: #4f6179;
  font-size: 11px;
  font-weight: 750;
}

.production-status-note i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #34c759;
  box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.12);
  animation: dotPulse 2.4s ease-in-out infinite;
}

.production-status-note.is-alert i {
  background: #ff9500;
  box-shadow: 0 0 0 3px rgba(255, 149, 0, 0.13);
}

.production-status-note strong {
  min-width: 0;
  color: #172033;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.dashboard-action-grid button {
  min-height: 43px;
  border: 1px solid rgba(218, 228, 241, 0.92);
  border-radius: 9px;
  background: rgba(249, 252, 255, 0.9);
  color: #52627a;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px;
  text-align: left;
}

.dashboard-action-grid button:hover {
  border-color: rgba(83, 136, 239, 0.34);
  background: rgba(239, 246, 255, 0.9);
  color: #315b9f;
  transform: translateY(-1px);
}

.dashboard-action-grid b {
  width: 19px;
  height: 19px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: #edf5ff;
  color: #4e83e7;
  font-size: 13px;
}

.dashboard-action-grid span {
  min-width: 0;
  font-size: 11px;
  font-weight: 700;
}

.quick-action-card {
  display: grid;
  align-content: start;
  gap: 12px;
}

.quick-action-card .dashboard-action-grid {
  margin-top: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.quick-action-card .dashboard-action-grid button {
  min-height: 48px;
  border-radius: 16px;
}

/* Shared visual polish for the daily-use modules. */
.topbar {
  box-shadow: 0 9px 26px rgba(57, 78, 112, 0.035);
}

.panel,
.category-section,
.material-warehouse-block,
.record-card,
.mobile-record-row {
  border-color: rgba(218, 227, 240, 0.9);
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 255, 255, 0.92), transparent 36%),
    rgba(255, 255, 255, 0.86);
}

.panel h2::before {
  background: linear-gradient(180deg, #5a7cf2, #52bea1);
  box-shadow: 0 0 0 4px rgba(90, 124, 242, 0.08);
}

.table-wrap,
.scroll-table {
  border-color: rgba(219, 228, 240, 0.92);
  background: rgba(255, 255, 255, 0.76);
}

th {
  color: #66748a;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(243, 247, 252, 0.95));
}

tbody tr {
  transition: background 160ms ease, box-shadow 160ms ease;
}

tbody tr:hover {
  background: rgba(238, 246, 255, 0.72);
}

.empty-category {
  border: 1px dashed rgba(177, 196, 224, 0.54);
}

.dashboard-kpis {
  gap: 8px;
  margin-bottom: 8px;
}

.dashboard-kpis .kpi {
  min-height: 92px;
  padding: 12px 14px;
  gap: 5px;
}

.kpi strong {
  font-size: 23px;
}

.today-plan {
  padding: 10px 12px;
  margin-bottom: 8px;
}

.today-plan-head {
  margin-bottom: 8px;
}

.today-plan-head strong {
  font-size: 17px;
}

.today-plan-body,
.plan-batches {
  gap: 8px;
}

.plan-category {
  padding: 8px;
  border-radius: 12px;
}

.plan-category-title {
  margin-bottom: 6px;
}

.plan-kettle-grid {
  gap: 6px;
}

.plan-kettle-card {
  min-height: 72px;
  padding: 7px 8px;
  border-radius: 10px;
  gap: 4px;
}

.plan-kettle-card strong {
  font-size: 13px;
}

.plan-kettle-card dl {
  gap: 2px;
}

.plan-materials {
  padding: 8px 10px;
  border-radius: 12px;
}

.plan-materials div {
  margin-top: 5px;
  gap: 0 14px;
}

.plan-materials p {
  padding: 5px 0;
}

.dashboard-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.today-plan {
  border: 1px solid rgba(218, 226, 238, 0.9);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 24px rgba(58, 79, 122, 0.055);
}

.today-plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(225, 232, 242, 0.9);
}

.today-plan-head span,
.dashboard-section-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.today-plan-head strong {
  display: block;
  margin-top: 1px;
  font-size: 16px;
  line-height: 1.15;
}

.today-plan-head small {
  color: #3b4455;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.today-plan-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.36fr);
  gap: 8px;
  align-items: start;
  margin-top: 8px;
}

.plan-board,
.plan-batches {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.plan-row-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  min-width: 0;
}

.plan-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  align-items: stretch;
  min-width: 0;
}

.plan-row header {
  display: flex;
  align-items: center;
  min-height: 18px;
  padding: 0 1px;
  background: transparent;
  border: 0;
}

.plan-row header strong {
  font-size: 12px;
  line-height: 1.15;
  color: #435066;
}

.plan-row header span {
  display: none;
}

.plan-row-cells {
  display: grid;
  grid-template-columns: repeat(var(--kettle-count), minmax(0, 1fr));
  gap: 4px;
  min-width: 0;
}

.plan-cell {
  min-width: 0;
  min-height: 54px;
  padding: 5px 7px;
  border-radius: 10px;
  border: 1px solid rgba(222, 230, 240, 0.9);
  background: #fbfcff;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1px 6px;
  align-content: center;
}

.plan-cell b,
.plan-cell strong,
.plan-cell span,
.plan-cell em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
}

.plan-cell b {
  color: #647086;
  font-size: 11px;
  font-weight: 700;
}

.plan-cell strong {
  color: #1d2431;
  font-size: 14px;
  line-height: 1.15;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  word-break: break-all;
}

.plan-cell span {
  grid-column: 1 / -1;
  color: #6d7789;
  font-size: 11px;
  line-height: 1.15;
}

.plan-cell em {
  grid-column: 1 / -1;
  color: #12705c;
  font-size: 11px;
  font-weight: 700;
}

.plan-cell.is-active {
  border-color: rgba(96, 179, 151, 0.34);
  background: linear-gradient(145deg, rgba(247, 253, 250, 0.96), rgba(239, 249, 245, 0.92));
  box-shadow: inset 3px 0 0 rgba(44, 174, 127, 0.62);
}

.plan-cell.is-empty {
  color: #9ba5b4;
  background: rgba(248, 250, 253, 0.76);
}

.plan-cell.is-empty strong,
.plan-cell.is-empty span,
.plan-cell.is-empty em {
  color: #9ba5b4;
  display: none;
}

.compact-materials {
  align-self: stretch;
  border-radius: 10px;
  border: 1px solid rgba(222, 230, 240, 0.92);
  background: #fbfcff;
  padding: 8px 9px;
}

.compact-materials > span {
  display: block;
  margin-bottom: 5px;
  color: #4a5568;
  font-size: 12px;
  font-weight: 700;
}

.compact-materials div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 0;
}

.compact-materials p {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 25px;
  margin: 0;
  padding: 4px 0;
  border-bottom: 1px dashed rgba(216, 225, 238, 0.92);
}

.compact-materials p:last-child {
  border-bottom: 0;
}

.compact-materials strong,
.compact-materials em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-style: normal;
}

.compact-materials em {
  color: #243047;
  font-weight: 700;
}

.dashboard-energy {
  padding: 10px;
  border-radius: 12px;
  display: grid;
  grid-template-columns: minmax(170px, 0.55fr) minmax(260px, 0.9fr) minmax(280px, 0.85fr);
  gap: 8px;
  align-items: center;
}

.dashboard-section-head {
  display: grid;
  gap: 8px;
  align-items: center;
  margin-bottom: 0;
}

.dashboard-section-head h2 {
  margin: 0;
  font-size: 14px;
}

.energy-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.energy-mini-grid article {
  min-width: 0;
  padding: 7px;
  border: 1px solid rgba(222, 230, 240, 0.9);
  border-radius: 10px;
  background: #fbfcff;
}

.energy-mini-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.energy-mini-grid strong {
  margin-top: 2px;
  display: inline-block;
  font-size: 17px;
  line-height: 1.05;
}

.energy-mini-grid em {
  margin-left: 3px;
  color: #8a95a6;
  font-size: 11px;
  font-style: normal;
}

.energy-bars {
  display: grid;
  gap: 4px;
  margin-top: 0;
}

.energy-bars-title {
  display: block;
  margin-bottom: 1px;
  color: #4a5568;
  font-size: 12px;
  line-height: 1.15;
}

.energy-bars p {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 54px;
  gap: 6px;
  align-items: center;
  margin: 0;
  color: #4a5568;
  font-size: 11px;
}

.energy-bars i {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f6;
}

.energy-bars b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4aa3df, #55c49f);
}

.energy-bars em {
  color: #263247;
  font-style: normal;
  font-weight: 700;
  text-align: right;
}

.dashboard-energy-grid {
  display: grid;
  grid-column: 2 / -1;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 8px;
  min-width: 0;
}

.energy-detail-card {
  min-width: 0;
  border: 1px solid rgba(222, 230, 240, 0.92);
  border-radius: 10px;
  background: #fbfcff;
  padding: 8px;
}

.energy-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.energy-detail-head strong {
  color: #243047;
  font-size: 13px;
  line-height: 1.15;
}

.energy-detail-head span {
  color: #5f6b7d;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.gas-detail-list {
  display: grid;
  gap: 6px;
}

.gas-detail-list article {
  display: grid;
  gap: 5px;
}

.gas-detail-list article header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.gas-detail-list article header strong,
.gas-detail-list article header b {
  color: #34445b;
  font-size: 12px;
  line-height: 1.15;
}

.gas-detail-list article header b {
  white-space: nowrap;
}

.gas-detail-list article div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.gas-detail-list span,
.power-detail-list p {
  min-width: 0;
  border-radius: 8px;
  background: rgba(246, 249, 253, 0.9);
  border: 1px solid rgba(225, 232, 242, 0.9);
}

.gas-detail-list span {
  display: grid;
  gap: 2px;
  padding: 5px 6px;
}

.gas-detail-list em {
  color: #758194;
  font-size: 10px;
  font-style: normal;
  line-height: 1.1;
  white-space: nowrap;
}

.gas-detail-list b {
  color: #1f2937;
  font-size: 12px;
  line-height: 1.1;
  white-space: nowrap;
}

.power-detail-groups {
  display: grid;
  gap: 6px;
}

.power-detail-group {
  display: grid;
  gap: 4px;
}

.power-detail-group > em {
  color: #758194;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.1;
}

.power-detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

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

.material-dashboard-groups .category-section {
  padding: 8px;
}

.material-dashboard-groups .mobile-stock-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.material-dashboard-groups .mobile-stock-row {
  min-height: 38px;
  padding: 6px 8px;
  border-radius: 9px;
}

.material-dashboard-groups .mobile-stock-row strong,
.material-dashboard-groups .mobile-stock-row b {
  font-size: 12px;
}

.material-dashboard-groups .stock-mark {
  width: 18px;
  height: 18px;
  font-size: 11px;
}

.today-plan,
.dashboard-energy,
.inventory-dashboard .panel,
.category-section,
.energy-detail-card,
.plan-cell {
  animation: cardSettle 380ms var(--ease-soft) both;
}

.plan-cell:nth-child(2),
.energy-detail-card:nth-child(2),
.inventory-dashboard .panel:nth-child(2) {
  animation-delay: 45ms;
}

.plan-cell:nth-child(3) {
  animation-delay: 80ms;
}

.plan-cell:nth-child(4) {
  animation-delay: 115ms;
}

.plan-cell:nth-child(5) {
  animation-delay: 150ms;
}

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

.today-plan:hover,
.dashboard-energy:hover,
.inventory-dashboard .panel:hover,
.energy-detail-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--bubble-shadow-hover);
}

.power-detail-list p {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  margin: 0;
  padding: 5px 6px;
}

.power-detail-list span {
  min-width: 0;
  color: #4a5568;
  font-size: 11px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.power-detail-list strong {
  color: #1f2937;
  font-size: 12px;
  line-height: 1.15;
  white-space: nowrap;
}

.inventory-dashboard .panel {
  padding: 10px;
}

.category-section {
  padding: 8px 10px;
}

.category-section-head {
  margin-bottom: 6px;
}

.form-grid {
  gap: 8px;
}

.field {
  gap: 4px;
}

.modal-panel {
  padding: 14px;
}

.detail-grid {
  gap: 8px;
}

.detail-cell {
  min-height: 58px;
  padding: 9px;
}

.mobile-record-row,
.record-card {
  gap: 6px;
}

.modal-panel.detail-modal {
  width: min(720px, calc(100vw - 32px));
  max-height: min(92vh, 820px);
  margin: 2vh auto;
  padding: 10px 12px;
  border-radius: 14px;
}

.modal-panel.detail-modal .modal-head {
  margin-bottom: 7px;
}

.modal-panel.detail-modal .modal-head h2 {
  font-size: 16px;
  line-height: 1.15;
}

.modal-panel.detail-modal .icon-btn {
  width: 32px;
  min-height: 32px;
  border-radius: 10px;
}

.modal-panel.detail-modal .detail-body {
  gap: 7px;
}

.modal-panel.detail-modal .detail-body .panel {
  padding: 9px;
  border-radius: 12px;
}

.modal-panel.detail-modal .detail-body .panel h2 {
  margin-bottom: 7px;
  font-size: 15px;
  line-height: 1.15;
}

.modal-panel.detail-modal .operation-sheet {
  gap: 7px;
}

.modal-panel.detail-modal .operation-sheet h3 {
  margin: 0;
  font-size: 14px;
  line-height: 1.2;
}

.modal-panel.detail-modal .detail-grid {
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid rgba(230, 236, 245, 0.86);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.72);
}

.modal-panel.detail-modal .detail-cell {
  min-height: 30px;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 8px;
  padding: 5px 8px;
  border: 0;
  border-bottom: 1px solid rgba(230, 236, 245, 0.7);
  border-radius: 0;
  background: transparent;
}

.modal-panel.detail-modal .detail-cell:last-child {
  border-bottom: 0;
}

.modal-panel.detail-modal .detail-cell span {
  color: #8a94a6;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 600;
}

.modal-panel.detail-modal .detail-cell strong {
  font-size: 13px;
  line-height: 1.25;
  font-weight: 700;
}

.modal-panel.detail-modal .scroll-table {
  max-height: 240px;
  border-radius: 10px;
}

.modal-panel.detail-modal .editable-detail-table {
  max-height: min(38vh, 250px);
}

.modal-panel.detail-modal .editable-detail-table table {
  min-width: 720px;
  table-layout: fixed;
}

.modal-panel.detail-modal .table-wrap table th,
.modal-panel.detail-modal .table-wrap table td,
.modal-panel.detail-modal .scroll-table table th,
.modal-panel.detail-modal .scroll-table table td {
  padding: 3px 6px;
  font-size: 12px;
  line-height: 1.18;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-panel.detail-modal .editable-detail-table td strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.2;
}

.modal-panel.detail-modal .row-icon-btn {
  min-height: 20px;
  padding: 0 6px;
  border-radius: 7px;
  font-size: 11px;
}

.modal-panel.detail-modal .formula-row-actions {
  margin-top: 5px;
}

.modal-panel.detail-modal .modal-actions {
  margin-top: 4px;
  gap: 8px;
}

.modal-panel.detail-modal .modal-actions .primary-btn,
.modal-panel.detail-modal .modal-actions .ghost-btn {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 10px;
}

@media (max-width: 720px) {
  .modal-panel.detail-modal {
    width: min(460px, calc(100vw - 18px));
    max-height: 88vh;
    margin: 4vh auto;
    padding: 10px;
  }

  .modal-panel.detail-modal .detail-grid {
    grid-template-columns: 1fr;
  }

  .modal-panel.detail-modal .detail-cell {
    grid-template-columns: 86px minmax(0, 1fr);
  }
}

/* Executive dashboard refinement: quieter chrome, stronger numbers. */
:root {
  --bg: #f6f8fb;
  --surface-2: #f3f7ff;
  --line: #e6ecf5;
  --text: #172033;
  --primary: #3478f6;
  --primary-2: #1f5fd4;
  --primary-soft: #eaf2ff;
  --accent: #5ac8fa;
  --danger: #ff3b30;
  --warning: #ff9500;
  --ok: #34c759;
  --neutral: #a0a8b8;
  --muted: #8a94a6;
  --shadow: 0 8px 24px rgba(31, 64, 128, 0.06);
  --soft-shadow: 0 6px 18px rgba(31, 64, 128, 0.045);
  --bubble-shadow: 0 8px 24px rgba(31, 64, 128, 0.055), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --bubble-shadow-hover: 0 12px 30px rgba(31, 64, 128, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

body {
  background: var(--bg);
}

.sidebar {
  padding: 14px 10px;
  border-right-color: rgba(232, 238, 246, 0.9);
  box-shadow: 8px 0 24px rgba(30, 60, 120, 0.025);
}

.brand {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: none;
}

.brand::after {
  display: none;
}

.nav-section {
  color: #a4adbb;
  font-size: 10px;
  letter-spacing: 0.11em;
}

.nav button {
  --nav-soft: #eef5ff !important;
  --nav-soft-active: #e8f1ff !important;
  --nav-accent: #3478f6 !important;
  --nav-accent-strong: #3478f6 !important;
  min-height: 42px;
  border-radius: 12px;
  color: #566275;
  font-weight: 650;
}

.nav button:hover,
.nav button.active {
  background: rgba(238, 246, 255, 0.72);
  border-color: transparent;
  box-shadow: none;
}

.nav button.active::before {
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: #3478f6;
}

.nav .nav-icon,
.nav button.active .nav-icon,
.nav button:hover .nav-icon {
  background: transparent;
  box-shadow: none;
  color: #8a94a6;
}

.nav button:hover .nav-icon,
.nav button.active .nav-icon {
  color: #3478f6;
}

.dashboard-hero {
  min-height: 86px;
  grid-template-columns: minmax(0, 1fr);
  padding: 13px 16px;
  border-color: rgba(230, 236, 245, 0.82);
  border-radius: 20px;
  background:
    radial-gradient(circle at 12% 0%, rgba(52, 120, 246, 0.055), transparent 260px),
    linear-gradient(135deg, rgba(255,255,255,0.98), rgba(247,249,252,0.96));
  box-shadow: var(--shadow);
}

.dashboard-hero::before,
.dashboard-hero::after {
  opacity: 0.18;
}

.dashboard-hero h2 {
  margin-top: 5px;
  color: #172033;
  font-size: clamp(20px, 1.55vw, 25px);
  letter-spacing: -0.045em;
}

.dashboard-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 5px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.dashboard-title-row h2 {
  margin-top: 0;
}

.dashboard-hero h2 strong {
  color: #172033;
}

.dashboard-hero-meta {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.dashboard-hero-meta span {
  min-height: 26px;
  border: 0;
  border-radius: 13px;
  background: rgba(248, 250, 252, 0.86);
  color: #7b8798;
  box-shadow: none;
  justify-content: center;
  white-space: nowrap;
}

.dashboard-periods {
  align-self: center;
  display: inline-grid;
  grid-template-columns: repeat(3, auto);
  gap: 3px;
  padding: 4px;
  border-radius: 999px;
  background: #eef3f8;
}

.dashboard-periods button {
  min-height: 26px;
  border: 0;
  border-radius: 999px;
  padding: 0 10px;
  background: transparent;
  color: #697589;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.dashboard-periods button.active {
  background: #ffffff;
  color: #3478f6;
  box-shadow: 0 4px 12px rgba(31, 64, 128, 0.06);
}

.dashboard-hero-art {
  display: none;
}

.dashboard-hero-copy,
.dashboard-hero-tools {
  position: relative;
  z-index: 2;
}

.dashboard-hero-copy {
  max-width: none;
}

.dashboard-hero-tools {
  justify-self: end;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.todo-bell {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(230, 236, 245, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: #6b7588;
  box-shadow: 0 6px 14px rgba(31, 64, 128, 0.05);
}

.todo-bell span {
  line-height: 1;
  filter: grayscale(0.25) saturate(0.75);
}

.todo-bell b {
  display: none;
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  place-items: center;
  padding: 0 5px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #ff9500;
  color: #ffffff;
  font-size: 10px;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(255, 149, 0, 0.18);
}

.todo-bell.has-alert {
  border-color: rgba(255, 149, 0, 0.24);
  background: #fffaf0;
  color: #b86600;
}

.todo-bell.has-alert b {
  display: grid;
}

.topbar-todo-bell {
  width: 34px;
  height: 34px;
  cursor: default;
  background: rgba(255, 255, 255, 0.88);
}

.top-todo-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 40;
  width: 280px;
  padding: 12px;
  border: 1px solid rgba(230, 236, 245, 0.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  color: #172033;
  box-shadow: 0 18px 42px rgba(31, 64, 128, 0.12);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 160ms ease, transform 160ms ease;
  backdrop-filter: blur(16px);
}

.top-todo-popover::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 14px;
  width: 10px;
  height: 10px;
  border-top: 1px solid rgba(230, 236, 245, 0.92);
  border-left: 1px solid rgba(230, 236, 245, 0.92);
  background: rgba(255, 255, 255, 0.96);
  transform: rotate(45deg);
}

.top-todo-wrap:hover .top-todo-popover,
.top-todo-wrap:focus-within .top-todo-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.top-todo-popover strong {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: #172033;
  font-size: 13px;
  line-height: 1.3;
}

.top-todo-popover strong em {
  color: #8a94a6;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.top-todo-popover p {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 4px 8px;
  margin: 0;
  padding: 9px 0;
  border-top: 1px solid #edf2f8;
}

.top-todo-popover i {
  grid-row: 1 / 3;
  width: 7px;
  height: 7px;
  margin-top: 6px;
  border-radius: 999px;
  background: #34c759;
}

.top-todo-popover .warn i,
.top-todo-popover .attention i {
  background: #ff9500;
}

.top-todo-popover span {
  min-width: 0;
  color: #172033;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.top-todo-popover em {
  min-width: 0;
  color: #8a94a6;
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.dashboard-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-kpis .kpi {
  min-height: 116px;
  border-radius: 22px;
  border-color: rgba(230, 236, 245, 0.86);
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.dashboard-kpis .kpi::before {
  opacity: 0.55;
}

.executive-kpi {
  position: relative;
}

.executive-kpi .kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.executive-kpi span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #7b8798;
  font-size: 13px;
}

.executive-kpi strong {
  color: #172033;
  font-size: clamp(28px, 2.35vw, 38px);
  letter-spacing: -0.055em;
}

.executive-kpi small {
  color: #8a94a6;
  font-size: 12px;
}

.executive-kpi .metric-scope {
  color: #a0a8b8;
  font-size: 11px;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  min-width: max-content;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(52, 199, 89, 0.08);
  color: #667085;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.25;
}

.status-dot::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #34c759;
  box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.11);
  animation: dotPulse 2.4s ease-in-out infinite;
}

.status-dot.warn {
  background: rgba(255, 149, 0, 0.10);
}

.status-dot.warn::before {
  background: #ff9500;
  box-shadow: 0 0 0 3px rgba(255, 149, 0, 0.13);
}

.executive-kpi.is-warning {
  background: linear-gradient(145deg, #ffffff, #fffbf2);
}

.dashboard-insights {
  grid-template-columns: minmax(0, 1.3fr) minmax(220px, 0.72fr) minmax(220px, 0.72fr);
  gap: 10px;
}

.dashboard-insights .panel,
.dashboard-energy,
.action-center,
.today-plan,
.inventory-dashboard .panel {
  border-radius: 22px;
  border-color: rgba(230, 236, 245, 0.86);
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.insight-head span {
  color: #98a2b3;
}

.health-ring {
  background: conic-gradient(#34c759 var(--health), #e8edf5 0);
}

.production-ring {
  background: conic-gradient(#34c759 var(--health), #e8edf5 0);
}

.dashboard-workbench {
  grid-template-columns: 1fr;
  gap: 10px;
}

.dashboard-workbench .today-plan {
  grid-column: 1 / -1;
}

.dashboard-energy {
  grid-template-columns: minmax(350px, 0.8fr) minmax(480px, 1.2fr);
  gap: 10px;
  padding: 12px;
  align-items: stretch;
}

.dashboard-energy .dashboard-section-head {
  grid-column: 1 / -1;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: baseline;
}

.dashboard-section-head h2 {
  color: #172033;
  font-size: 18px;
}

.energy-summary-grid article,
.energy-mini-grid article,
.energy-detail-card,
.gas-detail-list span,
.power-detail-list p {
  border-color: rgba(230, 236, 245, 0.9);
  background: #f8fafc;
}

.energy-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  min-width: 0;
}

.energy-total-card,
.energy-mix-card {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid rgba(230, 236, 245, 0.9);
  border-radius: 14px;
  background: #f8fafc;
}

.energy-total-card {
  display: flex;
  align-items: baseline;
  gap: 4px;
  overflow: hidden;
  white-space: nowrap;
}

.energy-total-card span,
.energy-mix-copy span {
  color: #8a94a6;
  font-size: 12px;
  font-weight: 700;
}

.energy-total-card strong {
  display: inline-block;
  margin-top: 0;
  color: #172033;
  font-size: 19px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.energy-total-card em {
  margin-left: 2px;
  color: #8a94a6;
  font-size: 12px;
  font-style: normal;
}

.energy-mix-card {
  padding: 10px;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 88px;
}

.energy-pie {
  position: relative;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: conic-gradient(#3478f6 0 var(--production-angle), #5ac8fa var(--production-angle) 360deg);
  box-shadow: inset 0 0 0 1px rgba(52, 120, 246, 0.08);
}

.energy-pie::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: inherit;
  background: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.energy-pie span {
  position: relative;
  z-index: 1;
  color: #2c4860;
  font-size: 20px;
  font-weight: 800;
}

.energy-mix-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.energy-mix-copy > strong {
  color: #172033;
  font-size: 14px;
}

.energy-mix-copy p {
  display: grid;
  grid-template-columns: 8px minmax(52px, 0.74fr) minmax(0, 1fr) 34px;
  gap: 6px;
  align-items: center;
  margin: 0;
}

.energy-mix-copy i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.energy-mix-copy i.is-production {
  background: #3478f6;
}

.energy-mix-copy i.is-public {
  background: #5ac8fa;
}

.energy-mix-copy b,
.energy-mix-copy em {
  color: #172033;
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
  text-align: right;
}

.dashboard-hero .dashboard-hero-art img {
  animation: none;
  opacity: 0.12;
}

.energy-meter-board {
  display: grid;
  gap: 0;
  min-width: 0;
}

.energy-meter-board .energy-bars-title {
  display: none;
}

.energy-meter-groups {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.96fr) minmax(0, 0.96fr);
  gap: 7px;
  min-width: 0;
}

.energy-meter-group {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(230, 236, 245, 0.9);
  border-radius: 14px;
  background: #f8fafc;
}

.energy-meter-group.is-wide {
  grid-column: auto;
}

.energy-meter-group header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.energy-meter-group header span {
  color: #172033;
  font-size: 13px;
  font-weight: 800;
}

.energy-meter-group header b {
  color: #8a94a6;
  font-size: 11px;
  font-weight: 700;
}

.energy-meter-group > div {
  display: grid;
  gap: 4px;
}

.energy-meter-group.is-wide > div {
  grid-template-columns: 1fr;
  column-gap: 0;
}

.energy-meter-group p {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 48px;
  gap: 6px;
  align-items: center;
  margin: 0;
  color: #4a5568;
  font-size: 11px;
}

.energy-meter-group p > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.energy-meter-group i {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf5;
}

.energy-meter-group p i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3478f6, #5ac8fa);
  transform-origin: left center;
  animation: barGrow 680ms cubic-bezier(0.22, 1, 0.36, 1) 560ms both;
}

.energy-meter-group em {
  color: #263247;
  font-style: normal;
  font-weight: 700;
  text-align: right;
}

.energy-empty-row {
  margin: 0;
  color: #8a94a6;
  font-size: 12px;
}

.action-center {
  padding: 14px;
}

.quick-center .dashboard-action-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.todo-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.todo-list p {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 0;
  padding: 10px;
  border-radius: 14px;
  background: #f8fafc;
}

.todo-list i {
  width: 8px;
  height: 8px;
  margin-top: 4px;
  border-radius: 999px;
  background: #98a2b3;
}

.todo-list .ok i {
  background: #34c759;
}

.todo-list .warn i,
.todo-list .attention i {
  background: #ff9500;
}

.todo-list strong,
.todo-list em {
  display: block;
  min-width: 0;
  font-style: normal;
}

.todo-list strong {
  color: #172033;
  font-size: 13px;
}

.todo-list em {
  margin-top: 2px;
  color: #8a94a6;
  font-size: 12px;
}

.action-center .dashboard-action-grid {
  grid-template-columns: 1fr;
  margin-top: 12px;
}

.action-center .dashboard-action-grid button {
  min-height: 42px;
  border-radius: 14px;
}

.primary-btn {
  border-radius: 15px;
  background: #3478f6;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(52, 120, 246, 0.14);
}

.primary-btn:hover {
  background: #1f5fd4;
  box-shadow: 0 10px 22px rgba(52, 120, 246, 0.18);
}

.soft-primary,
.dashboard-action-grid button {
  border-color: #dde8fa;
  background: #f3f7ff;
  color: #2f5fa8;
  box-shadow: none;
}

.dashboard-action-grid b {
  background: #eaf2ff;
  color: #3478f6;
}

.user-chip {
  background: transparent;
  color: #7b8798;
  box-shadow: none;
  min-height: 34px;
  padding-inline: 8px;
}

button.user-chip:hover {
  color: #3478f6;
  background: #f3f7ff;
}

.top-actions .primary-btn {
  min-height: 34px;
  padding-inline: 14px;
}

.global-search {
  position: relative;
  flex: 1 1 420px;
  max-width: 520px;
  min-width: 180px;
}

.global-search input {
  width: 100%;
  min-height: 36px;
  border: 1px solid #e6ecf5;
  border-radius: 999px;
  padding: 0 15px;
  background: rgba(255, 255, 255, 0.82);
  color: #172033;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.global-search input:focus {
  border-color: rgba(52, 120, 246, 0.42);
  box-shadow: 0 0 0 4px rgba(52, 120, 246, 0.08);
}

.global-search-results {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(230, 236, 245, 0.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 42px rgba(31, 64, 128, 0.12);
  backdrop-filter: blur(16px);
}

.global-search-results button {
  display: grid;
  gap: 3px;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 9px 10px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.global-search-results button:hover {
  background: #f3f7ff;
}

.global-search-results strong {
  color: #172033;
  font-size: 13px;
}

.global-search-results span,
.global-search-empty {
  color: #8a94a6;
  font-size: 12px;
}

.global-search-empty {
  margin: 0;
  padding: 8px 10px;
}

.toast-host {
  position: fixed;
  z-index: 120;
  top: 18px;
  right: 18px;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.toast {
  max-width: min(360px, calc(100vw - 32px));
  padding: 11px 14px;
  border: 1px solid rgba(230, 236, 245, 0.92);
  border-radius: 16px;
  background: rgba(255,255,255,0.96);
  color: #172033;
  box-shadow: 0 16px 36px rgba(31, 64, 128, 0.13);
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 180ms ease, transform 180ms ease;
  backdrop-filter: blur(14px);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  border-color: rgba(52, 199, 89, 0.28);
}

.toast.warn {
  border-color: rgba(255, 149, 0, 0.32);
}

.sales-trend-chart .trend-grid {
  stroke: #d9e1ec;
  stroke-opacity: 0.82;
}

.sales-trend-chart polyline {
  stroke: #3478f6;
}

.sales-trend-chart .trend-line.current {
  stroke: #3478f6;
}

.sales-trend-chart .trend-line.previous {
  stroke: #9fb2cb;
  stroke-width: 2;
  stroke-dasharray: 5 7;
  opacity: 0.85;
}

.sales-trend-chart circle {
  stroke: #3478f6;
}

.sales-trend-chart .trend-point.previous {
  fill: #ffffff;
  stroke: #9fb2cb;
  opacity: 0.78;
}

.sales-trend-chart text {
  fill: #8a94a6;
}

.energy-bars i {
  background: #e8edf5;
}

.energy-bars b {
  background: linear-gradient(90deg, #3478f6, #5ac8fa);
}

.energy-mini-grid article:nth-child(1) strong {
  color: #3478f6;
}

.energy-mini-grid article:nth-child(2) strong {
  color: #5ac8fa;
}

.energy-mini-grid article:nth-child(3) strong,
.energy-mini-grid article:nth-child(4) strong {
  color: #afb8c8;
}

.health-legend i {
  background: #34c759;
}

.health-legend .is-alert i {
  background: #ff9500;
}

@property --health {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

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

@keyframes dashboardGlow {
  0% {
    box-shadow: var(--soft-shadow);
  }
  28% {
    box-shadow: 0 0 0 1px rgba(52, 120, 246, 0.12), 0 12px 30px rgba(52, 120, 246, 0.10);
  }
  100% {
    box-shadow: var(--soft-shadow);
  }
}

@keyframes ringFill {
  from {
    --health: 0deg;
  }
}

@keyframes heroFloat {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.24;
  }
  50% {
    transform: translateY(-3px);
    opacity: 0.30;
  }
}

@keyframes barGrow {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

.dashboard-hero,
.dashboard-kpis .kpi,
.dashboard-insights .panel,
.dashboard-energy,
.action-center,
.dashboard-workbench .today-plan {
  opacity: 0;
  animation: dashboardLayerIn 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.dashboard-hero {
  animation-delay: 40ms;
}

.dashboard-kpis .kpi:nth-child(1) {
  animation-delay: 100ms;
}

.dashboard-kpis .kpi:nth-child(2) {
  animation-delay: 160ms;
}

.dashboard-kpis .kpi:nth-child(3) {
  animation-delay: 220ms;
}

.dashboard-kpis .kpi:nth-child(4) {
  animation-delay: 280ms;
}

.dashboard-insights .panel:nth-child(1) {
  animation-delay: 320ms;
}

.dashboard-insights .panel:nth-child(2) {
  animation-delay: 360ms;
}

.dashboard-insights .panel:nth-child(3) {
  animation-delay: 400ms;
}

.dashboard-energy {
  animation-delay: 440ms;
}

.action-center {
  animation-delay: 500ms;
}

.dashboard-workbench .today-plan {
  animation-delay: 560ms;
}

.dashboard-kpis .metric-updated {
  animation: dashboardGlow 720ms ease-out both;
}

.dashboard-kpis .kpi:hover,
.dashboard-insights .panel:hover,
.dashboard-energy:hover,
.action-center:hover,
.dashboard-workbench .today-plan:hover {
  transform: translateY(-2px);
  border-color: rgba(52, 120, 246, 0.22);
  box-shadow: 0 12px 32px rgba(31, 64, 128, 0.08);
}

.status-dot::before,
.health-legend i,
.todo-list i {
  transition: filter 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.dashboard-kpis .kpi:hover .status-dot::before {
  filter: brightness(1.08);
}

.dashboard-hero-meta i,
.status-dot::before,
.health-legend i,
.production-status-note i,
.todo-list i,
.top-todo-popover i,
.panel h2::before {
  transform-origin: center;
  will-change: transform, box-shadow, filter;
}

.todo-list i,
.top-todo-popover i {
  animation: dotPulse 2.4s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% {
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.16);
    filter: brightness(1.12);
  }
}

.sales-trend-chart polyline {
  stroke-dasharray: 470;
  stroke-dashoffset: 470;
  animation: chartLineDraw 720ms cubic-bezier(0.22, 1, 0.36, 1) 360ms forwards;
}

@keyframes chartLineDraw {
  to {
    stroke-dashoffset: 0;
  }
}

.sales-trend-chart polygon {
  opacity: 0;
  transform: scaleY(0.84);
  transform-origin: center bottom;
  animation: chartAreaIn 520ms cubic-bezier(0.22, 1, 0.36, 1) 520ms forwards;
}

@keyframes chartAreaIn {
  to {
    opacity: 1;
    transform: scaleY(1);
  }
}

.sales-trend-chart circle {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: pointIn 180ms ease-out forwards;
  transition: transform 150ms ease, filter 150ms ease;
}

.sales-trend-chart circle:nth-of-type(1) { animation-delay: 640ms; }
.sales-trend-chart circle:nth-of-type(2) { animation-delay: 680ms; }
.sales-trend-chart circle:nth-of-type(3) { animation-delay: 720ms; }
.sales-trend-chart circle:nth-of-type(4) { animation-delay: 760ms; }
.sales-trend-chart circle:nth-of-type(5) { animation-delay: 800ms; }
.sales-trend-chart circle:nth-of-type(6) { animation-delay: 840ms; }
.sales-trend-chart circle:nth-of-type(7) { animation-delay: 880ms; }

@keyframes pointIn {
  from {
    opacity: 0;
    transform: scale(0.82);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.sales-trend-chart circle:hover {
  transform: scale(1.25);
  filter: drop-shadow(0 3px 7px rgba(52, 120, 246, 0.22));
}

.sales-trend-chart .trend-point-group:hover circle {
  transform: scale(1.25);
  filter: drop-shadow(0 3px 7px rgba(52, 120, 246, 0.22));
}

.health-ring {
  animation: ringFill 820ms cubic-bezier(0.22, 1, 0.36, 1) 420ms both;
}

.dashboard-hero-art img {
  animation: heroFloat 5.6s ease-in-out infinite;
}

.dashboard-hero .dashboard-hero-art img {
  animation: none;
  opacity: 0.12;
}

.energy-bars b {
  transform-origin: left center;
  animation: barGrow 680ms cubic-bezier(0.22, 1, 0.36, 1) 560ms both;
}

.dashboard-periods {
  position: relative;
  overflow: hidden;
}

.dashboard-periods::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 8px) / 3);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(31, 64, 128, 0.06);
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.dashboard-periods.is-week::before {
  transform: translateX(100%);
}

.dashboard-periods.is-month::before {
  transform: translateX(200%);
}

.dashboard-periods button {
  position: relative;
  z-index: 1;
}

.dashboard-periods button.active {
  background: transparent;
  box-shadow: none;
}

.primary-btn:active,
.dashboard-action-grid button:active,
.ghost-btn:active {
  transform: scale(0.98);
}

/* Final dashboard layout guard: keep topbar actions and hero content from colliding. */
.topbar {
  min-height: 64px;
  display: grid;
  grid-template-columns: max-content minmax(220px, 520px) minmax(max-content, 1fr);
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
}

.topbar .mobile-only {
  display: none;
}

.title-block {
  width: 116px;
  min-width: 116px;
  max-width: 116px;
}

.global-search {
  width: min(430px, 100%);
  min-width: 220px;
  justify-self: start;
}

.top-actions {
  justify-self: end;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  white-space: nowrap;
}

.top-todo-wrap {
  flex: 0 0 auto;
}

.topbar-todo-bell {
  position: relative;
  z-index: 12;
}

.content {
  padding-top: 12px;
}

.dashboard-hero {
  display: block;
  min-height: 0;
  margin-bottom: 10px;
  padding: 12px 16px;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 0%, rgba(52, 120, 246, 0.045), transparent 260px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 249, 252, 0.98));
}

.dashboard-hero-copy {
  width: 100%;
  max-width: none;
}

.dashboard-title-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  margin-top: 4px;
}

.dashboard-title-row h2 {
  flex: 0 1 auto;
  min-width: 0;
  margin: 0;
  white-space: nowrap;
}

.dashboard-periods {
  flex: 0 0 auto;
  margin-left: 0;
}

.dashboard-hero-meta {
  display: grid;
  grid-template-columns: repeat(5, minmax(96px, 1fr));
  gap: 8px;
  width: 100%;
  margin-top: 9px;
}

.dashboard-hero-meta span {
  min-width: 0;
  min-height: 24px;
  justify-content: flex-start;
  padding: 4px 8px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-kpis {
  position: relative;
  z-index: 1;
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: 34px minmax(0, 1fr) max-content;
    gap: 8px;
    padding: 8px 10px;
    min-height: 52px;
  }

  .topbar .mobile-only {
    display: inline-flex;
  }

  .global-search {
    display: none;
  }

  .top-actions .primary-btn,
  .top-actions .user-chip {
    display: none;
  }

  .content {
    padding: 8px 10px 18px;
  }

  .dashboard-hero {
    min-height: 0;
    padding: 14px;
    border-radius: 14px;
  }

  .dashboard-hero h2 {
    margin-top: 0;
    font-size: 18px;
  }

  .dashboard-title-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .dashboard-hero-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-top: 10px;
  }

  .dashboard-hero-meta span {
    min-height: 24px;
    padding: 5px 7px;
    font-size: 10px;
  }

  .dashboard-hero-art img {
    width: 210%;
    right: -78%;
    -webkit-mask-image: radial-gradient(ellipse 88% 110% at 70% 50%, #000 32%, rgba(0, 0, 0, 0.82) 60%, transparent 100%);
    mask-image: radial-gradient(ellipse 88% 110% at 70% 50%, #000 32%, rgba(0, 0, 0, 0.82) 60%, transparent 100%);
  }

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

  .dashboard-health,
  .dashboard-chart {
    display: none;
  }

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

  .dashboard-kpis .kpi {
    min-height: 76px;
    padding: 9px;
  }

  .kpi strong {
    font-size: 19px;
  }

  .dashboard-workbench,
  .today-plan-body,
  .dashboard-energy {
    grid-template-columns: 1fr;
  }

  .dashboard-energy .dashboard-section-head,
  .energy-summary-grid,
  .energy-meter-groups,
  .energy-meter-group.is-wide > div {
    grid-template-columns: 1fr;
  }

  .energy-mix-card {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .energy-pie {
    width: 74px;
    height: 74px;
  }

  .dashboard-hero {
    display: block;
  }

  .dashboard-hero-tools {
    justify-self: start;
    margin-top: 4px;
  }

  .dashboard-periods {
    justify-self: start;
  }

  .dashboard-hero-art {
    display: none;
  }

  .dashboard-energy-grid {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .energy-top-list {
    grid-template-columns: 1fr;
  }

  .energy-top-list > strong {
    padding-right: 0;
  }

  .plan-row-pair {
    grid-template-columns: 1fr;
  }

  .plan-row {
    grid-template-columns: minmax(0, 1fr);
  }

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

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

  .compact-materials.plan-materials div {
    column-gap: 22px;
    row-gap: 0;
  }

  .compact-materials.plan-materials p {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 8px;
    min-width: 0;
    padding: 7px 0;
  }

  .compact-materials.plan-materials p em {
    justify-self: end;
  }
}

/* Final system density pass: consistent type scale and compact dashboard rhythm. */
body {
  background: var(--bg) !important;
  font-size: 13px;
  line-height: 1.4;
}

.app {
  background: var(--bg);
}

.fluid-bg-canvas,
.fluid-grain-overlay {
  display: none !important;
}

.app button,
.app input,
.app select,
.app textarea {
  font-size: 13px;
  line-height: 1.35;
}

.panel h2,
.insight-head h2,
.dashboard-section-head h2,
.today-plan-head strong {
  font-size: 15px;
  line-height: 1.25;
}

.field > span,
.detail-cell span,
.record-card dt,
.mobile-record-meta em,
.category-section-head span,
.empty-category,
.maintenance-note,
.profile-head p,
.insight-head span,
.dashboard-section-head span,
.today-plan-head span {
  font-size: 12px;
  line-height: 1.35;
}

th,
td,
.table-wrap table th,
.table-wrap table td,
.scroll-table table th,
.scroll-table table td {
  font-size: 12px;
  line-height: 1.3;
}

.content {
  padding: 8px 14px 18px;
  background: var(--bg);
}

.dashboard-hero {
  min-height: 0;
  margin-bottom: 8px;
  padding: 10px 14px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.dashboard-hero::before,
.dashboard-hero::after {
  display: none;
}

.dashboard-hero-kicker {
  font-size: 10px;
}

.dashboard-title-row {
  margin-top: 3px;
}

.dashboard-title-row h2,
.dashboard-hero h2 {
  font-size: 22px;
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.dashboard-periods {
  min-height: 34px;
}

.dashboard-periods button {
  min-height: 28px;
  padding: 0 13px;
  font-size: 12px;
}

.dashboard-hero-meta {
  gap: 6px;
  margin-top: 8px;
}

.dashboard-hero-meta span {
  min-height: 22px;
  padding: 3px 8px;
  font-size: 11px;
}

.dashboard-kpis {
  gap: 8px;
  margin-bottom: 8px;
}

.dashboard-kpis .kpi {
  min-height: 78px;
  padding: 10px 12px;
  border-radius: 16px;
  gap: 3px;
}

.dashboard-kpis .kpi::before {
  display: none !important;
}

.executive-kpi span,
.kpi span {
  font-size: 12px;
  line-height: 1.25;
}

.executive-kpi strong,
.dashboard-kpis .kpi strong,
.kpi strong {
  font-size: clamp(22px, 1.85vw, 28px);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.executive-kpi small,
.kpi small,
.kpi-trend {
  font-size: 11px;
  line-height: 1.25;
}

.dashboard-insights {
  gap: 8px;
  margin-bottom: 8px;
}

.dashboard-insights .panel,
.dashboard-energy,
.today-plan,
.inventory-dashboard .panel {
  border-radius: 16px;
  padding: 10px;
}

.insight-head > b {
  font-size: 16px;
}

.sales-trend-chart {
  height: 76px;
  margin-top: 0;
}

.dashboard-action-grid {
  gap: 6px;
  margin-top: 8px;
}

.dashboard-action-grid button,
.quick-action-card .dashboard-action-grid button {
  min-height: 38px;
  border-radius: 12px;
  padding: 6px 8px;
}

.health-body {
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 9px;
  margin-top: 8px;
}

.health-ring {
  width: 74px;
  height: 74px;
}

.health-ring {
  background: transparent;
  overflow: visible;
}

.health-ring::after {
  inset: 9px;
}

.health-ring-chart {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: rotate(-90deg);
}

.health-ring-chart circle {
  fill: none;
  stroke-width: 11;
  stroke-linecap: round;
}

.health-ring-track {
  stroke: #edf4f8;
}

.health-ring-normal {
  stroke: #36b7ad;
  filter: drop-shadow(0 4px 8px rgba(54, 183, 173, 0.14));
}

.health-ring-alert {
  cursor: default;
  pointer-events: auto;
  stroke: #f0b15f;
  filter: drop-shadow(0 4px 8px rgba(240, 177, 95, 0.18));
}

.health-ring-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 4;
  min-width: 128px;
  padding: 8px 10px;
  border: 1px solid rgba(221, 232, 245, 0.92);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(39, 49, 66, 0.12);
  color: #46566d;
  font-size: 11px;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.health-ring-tooltip b,
.health-ring-tooltip em {
  display: block;
  font-style: normal;
  white-space: nowrap;
}

.health-ring-tooltip b {
  margin-bottom: 3px;
  color: #1f2d43;
  font-weight: 800;
}

.health-ring:hover .health-ring-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.health-legend i {
  background: #36b7ad;
}

.health-legend .is-alert i {
  background: #f0b15f;
}

.health-ring strong {
  font-size: 21px;
}

.quality-item-panel {
  border-color: rgba(214, 225, 240, 0.58);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 28px rgba(31, 64, 128, 0.045);
}

.quality-item-head h2 {
  font-size: 14px;
  line-height: 1.25;
}

.quality-item-form {
  grid-template-columns: minmax(132px, 0.75fr) minmax(130px, 0.9fr) minmax(88px, 0.45fr) minmax(150px, 1fr) auto;
}

.quality-item-form input,
.quality-item-form select {
  min-width: 0;
  min-height: 32px;
  border: 1px solid rgba(214, 225, 240, 0.76);
  border-radius: 10px;
  background: rgba(248, 251, 255, 0.76);
  color: #273142;
  font-size: 13px;
}

.quality-item-row {
  border-color: rgba(219, 228, 241, 0.62);
  background: rgba(248, 251, 255, 0.55);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.86);
}

.quality-item-row:last-child {
  border-bottom: 1px solid rgba(219, 228, 241, 0.62);
}

.quality-item-row .ghost-btn {
  min-height: 26px;
  border-radius: 9px;
  color: #5f6d82;
}

.soft-primary:hover,
#quickBatchBtn:hover {
  background: rgba(255,255,255,0.96);
  color: #2f5fa8;
  border-color: rgba(52, 120, 246, 0.32);
  box-shadow: 0 0 0 3px rgba(52, 120, 246, 0.08), 0 12px 24px rgba(58, 79, 122, 0.07);
}

.dashboard-workbench {
  gap: 8px;
}

.dashboard-energy {
  display: grid;
  grid-template-columns: minmax(138px, 0.32fr) minmax(0, 1fr);
  gap: 7px;
  padding: 9px 12px 10px;
  overflow: hidden;
}

.dashboard-energy .dashboard-section-head {
  grid-column: auto;
  grid-template-columns: 1fr;
  gap: 2px;
  align-content: center;
  align-items: start;
  min-width: 0;
}

.dashboard-energy .dashboard-section-head h2 {
  font-size: 16px;
}

.dashboard-energy .dashboard-section-head span {
  color: #8a94a6;
  font-size: 12px;
}

.energy-total-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
  min-width: 0;
}

.energy-total-card {
  min-height: 48px;
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid rgba(230, 236, 245, 0.62);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.72);
  box-shadow: none;
}

.energy-total-card.is-primary {
  background: linear-gradient(135deg, rgba(234, 242, 255, 0.88), rgba(255, 255, 255, 0.88));
}

.energy-total-card span {
  color: #667386;
  font-size: 12px;
  font-weight: 700;
}

.energy-total-card strong {
  color: #172033;
  font-size: 20px;
  letter-spacing: -0.04em;
}

.energy-total-card em {
  color: #8a94a6;
  font-size: 12px;
}

.energy-detail-layout {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
  min-width: 0;
}

.energy-electricity-summary {
  grid-column: 1 / 4;
}

.energy-gas-summary {
  grid-column: 4;
}

.energy-detail-block {
  min-width: 0;
  padding: 7px;
  border: 1px solid rgba(230, 236, 245, 0.55);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.55);
}

.energy-electricity-block {
  align-self: stretch;
  padding: 0;
  border: 0;
  background: transparent;
}

.energy-detail-head {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 5px;
  min-width: 0;
}

.energy-detail-head strong {
  flex: 0 0 auto;
  color: #172033;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.energy-detail-head span {
  flex: 0 1 auto;
  color: #8a94a6;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.energy-electricity-summary {
  justify-content: flex-start;
}

.energy-gas-summary {
  justify-content: flex-start;
}

.energy-gas-group .energy-gas-summary {
  grid-column: auto;
  display: flex;
  margin-bottom: 5px;
}

.energy-electricity-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}

.energy-four-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.energy-meter-group {
  min-width: 0;
  overflow: hidden;
  padding: 6px 7px;
  border: 1px solid rgba(230, 236, 245, 0.52);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: none;
}

.energy-meter-group header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: baseline;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(230, 236, 245, 0.52);
}

.energy-meter-group header span {
  min-width: 0;
  color: #172033;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.energy-meter-group header b {
  color: #667386;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
}

.energy-meter-group > div {
  gap: 0;
}

.energy-meter-group p,
.energy-gas-rows p {
  display: grid;
  grid-template-columns: 34px minmax(26px, 1fr) 44px;
  gap: 4px;
  align-items: center;
  min-height: 20px;
  margin: 0;
  border-bottom: 1px solid rgba(230, 236, 245, 0.45);
  color: #344055;
  font-size: 11px;
  line-height: 1.1;
}

.energy-meter-group p:last-child,
.energy-gas-rows p:last-child {
  border-bottom: 0;
}

.energy-meter-group p > span,
.energy-gas-rows p > span {
  color: #667386;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.energy-meter-group i,
.energy-gas-rows i {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(232, 237, 245, 0.9);
}

.energy-meter-group p i b,
.energy-gas-rows p i b {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #3478f6, #7eddd3);
  transform-origin: left center;
  animation: barGrow 680ms cubic-bezier(0.22, 1, 0.36, 1) 420ms both;
}

.energy-gas-rows p i b {
  background: linear-gradient(90deg, #5ba9a6, #a4e2c6);
}

.energy-meter-group em,
.energy-gas-rows em {
  color: #172033;
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
  text-align: right;
  white-space: nowrap;
}

.energy-gas-rows {
  display: grid;
  gap: 0;
  min-width: 0;
}

.energy-gas-rows p {
  grid-template-columns: 44px minmax(24px, 1fr) 48px;
}

@media (max-width: 760px) {
  .records-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .records-toolbar .filters,
  .records-toolbar .filters:has(.month-tools:only-child) {
    flex: none;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .records-toolbar .toolbar-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    justify-content: stretch;
    width: 100%;
  }

  .records-toolbar .toolbar-actions .ghost-btn,
  .records-toolbar .toolbar-actions .soft-primary {
    width: 100%;
    min-width: 0;
  }

  .dashboard-energy,
  .energy-detail-layout,
  .energy-electricity-groups,
  .energy-four-grid {
    grid-template-columns: 1fr;
  }

  .energy-electricity-summary,
  .energy-gas-summary {
    grid-column: auto;
  }

  .energy-total-strip {
    grid-template-columns: 1fr;
  }
}

.production-form .scroll-table {
  border-color: rgba(230, 236, 245, 0.62);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: none;
}

.production-form .scroll-table th,
.production-form .scroll-table td {
  border-bottom-color: rgba(230, 236, 245, 0.55);
}

.production-form .scroll-table th {
  background: rgba(248, 250, 252, 0.72);
}

.production-form .scroll-table input,
.production-form .scroll-table select,
.formula-form .formula-items-table input,
.ocr-items-table input {
  border-color: rgba(198, 213, 232, 0.58);
  background-color: rgba(255, 255, 255, 0.56);
  box-shadow: none;
}

.production-form .scroll-table input:focus,
.production-form .scroll-table select:focus,
.formula-form .formula-items-table input:focus,
.ocr-items-table input:focus {
  border-color: rgba(52, 120, 246, 0.42);
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(52, 120, 246, 0.08);
}

.today-plan {
  padding: 10px;
}

.quality-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.quality-records-panel,
.quality-item-panel {
  padding: 10px;
}

.quality-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.quality-item-head h2 {
  margin: 0;
  font-size: 15px;
}

.quality-item-head span,
.quality-detail-head span {
  color: var(--muted);
  font-size: 12px;
}

.quality-item-form {
  display: grid;
  grid-template-columns: minmax(130px, 0.9fr) minmax(88px, 0.45fr) minmax(150px, 1fr) auto;
  gap: 6px;
  margin-bottom: 8px;
}

.quality-item-form input {
  min-width: 0;
  min-height: 32px;
}

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

.quality-item-row {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  min-height: 30px;
  max-width: 360px;
  padding: 4px 6px;
  border: 1px solid rgba(230, 236, 245, 0.72);
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.64);
}

.quality-item-row:last-child {
  border-bottom: 0;
}

.quality-item-row strong {
  font-size: 13px;
}

.quality-item-row span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quality-detail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 6px;
}

.quality-detail-head strong {
  font-size: 14px;
}

.quality-input-panel {
  margin-top: 2px;
}

.quality-input-table table {
  min-width: 0;
}

.quality-input-table th,
.quality-input-table td {
  padding: 6px;
}

.quality-input-table input {
  width: 100%;
  min-width: 0;
  min-height: 30px;
}

.quality-result {
  font-weight: 750;
}

.quality-result.ok {
  color: #15803d;
}

.quality-result.warn {
  color: #dc2626;
}

.quality-linked-test {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.quality-linked-test:first-of-type {
  margin-top: 0;
}

.quality-linked-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
}

.quality-linked-head span {
  color: var(--muted);
  font-size: 12px;
}

.shanghai-batch-form {
  gap: 10px;
}

.shanghai-batch-form .field {
  align-items: center;
}

.shanghai-batch-panel {
  display: grid;
  gap: 6px;
  padding: 0;
}

.shanghai-batch-panel .scroll-table {
  border: 1px solid rgba(230, 236, 245, 0.72);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
}

.shanghai-batch-panel table {
  min-width: 820px;
  table-layout: fixed;
}

.shanghai-batch-panel th,
.shanghai-batch-panel td {
  padding: 6px 5px;
  color: #344055;
  font-size: 12px;
  line-height: 1.25;
  vertical-align: middle;
}

.shanghai-batch-panel th {
  background: rgba(248, 250, 252, 0.82);
  color: #667386;
  font-weight: 750;
}

.shanghai-batch-panel th:nth-child(1),
.shanghai-batch-panel td:nth-child(1) {
  width: 58px;
}

.shanghai-batch-panel th:nth-child(2),
.shanghai-batch-panel td:nth-child(2) {
  width: 104px;
}

.shanghai-batch-panel th:nth-child(4),
.shanghai-batch-panel td:nth-child(4),
.shanghai-batch-panel th:nth-child(5),
.shanghai-batch-panel td:nth-child(5) {
  width: 104px;
}

.shanghai-batch-panel th:nth-child(6),
.shanghai-batch-panel td:nth-child(6) {
  width: 86px;
}

.shanghai-batch-panel input,
.shanghai-batch-panel select {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: 5px 8px;
  border-color: rgba(198, 213, 232, 0.62);
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.88);
  color: var(--text);
  font-size: 12px;
  line-height: 1.25;
  box-shadow: none;
}

.shanghai-batch-panel .sh-direction-select {
  padding: 5px 6px;
  color: #2563eb;
  font-weight: 800;
  text-align: center;
}

.shanghai-batch-panel .sh-production-date {
  display: flex;
  min-height: 32px;
  align-items: center;
  padding: 5px 8px;
  border: 1px solid rgba(198, 213, 232, 0.5);
  border-radius: 8px;
  background: rgba(248, 251, 255, 0.62);
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.shanghai-batch-panel .sh-production-date.is-empty {
  color: #96a3b7;
  font-weight: 600;
}

.kpi-pulse-dot {
  position: absolute;
  top: 12px;
  right: 13px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--dot-color, #3478f6);
  box-shadow: 0 0 0 4px var(--dot-glow, rgba(52, 120, 246, 0.12));
  animation: dotPulse 2.4s ease-in-out infinite;
  pointer-events: none;
}

.kpi-pulse-dot.is-sales {
  --dot-color: #3478f6;
  --dot-glow: rgba(52, 120, 246, 0.13);
}

.kpi-pulse-dot.is-money {
  --dot-color: #14b8a6;
  --dot-glow: rgba(20, 184, 166, 0.14);
}

.kpi-pulse-dot.is-production {
  --dot-color: #8b5cf6;
  --dot-glow: rgba(139, 92, 246, 0.13);
}

.kpi-pulse-dot.is-stock {
  --dot-color: #22c55e;
  --dot-glow: rgba(34, 197, 94, 0.14);
}

.kpi-pulse-dot.is-warning {
  --dot-color: #f97316;
  --dot-glow: rgba(249, 115, 22, 0.16);
}

/* Final UI harmony pass for dashboard ring, quality manager, and soft action hover. */
.health-ring {
  background: transparent;
  overflow: visible;
}

.health-ring::after {
  inset: 9px;
}

.health-ring-chart {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: rotate(-90deg);
}

.health-ring-chart circle {
  fill: none;
  stroke-width: 11;
  stroke-linecap: round;
}

.health-ring-track {
  stroke: #edf2f7;
}

.health-ring-normal {
  stroke: #34c759;
}

.health-ring-alert {
  cursor: help;
  pointer-events: auto;
  stroke: #ff9500;
  filter: drop-shadow(0 4px 8px rgba(255, 149, 0, 0.22));
}

.quality-item-panel {
  border-color: rgba(214, 225, 240, 0.58);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 28px rgba(31, 64, 128, 0.045);
}

.quality-item-head h2 {
  font-size: 14px;
  line-height: 1.25;
}

.quality-item-form {
  grid-template-columns: minmax(132px, 0.75fr) minmax(130px, 0.9fr) minmax(88px, 0.45fr) minmax(150px, 1fr) auto;
}

.quality-item-form input,
.quality-item-form select {
  min-width: 0;
  min-height: 32px;
  border: 1px solid rgba(214, 225, 240, 0.76);
  border-radius: 10px;
  background: rgba(248, 251, 255, 0.76);
  color: #273142;
  font-size: 13px;
}

.quality-item-row {
  border-color: rgba(219, 228, 241, 0.62);
  background: rgba(248, 251, 255, 0.55);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.86);
}

.quality-item-row:last-child {
  border-bottom: 1px solid rgba(219, 228, 241, 0.62);
}

.quality-item-row .ghost-btn {
  min-height: 26px;
  border-radius: 9px;
  color: #5f6d82;
}

.soft-primary:hover,
#quickBatchBtn:hover {
  background: rgba(255,255,255,0.96);
  color: #2f5fa8;
  border-color: rgba(52, 120, 246, 0.32);
  box-shadow: 0 0 0 3px rgba(52, 120, 246, 0.08), 0 12px 24px rgba(58, 79, 122, 0.07);
}

.health-ring-track {
  stroke: #edf4f8;
}

.health-ring-normal {
  stroke: #36b7ad;
  filter: drop-shadow(0 4px 8px rgba(54, 183, 173, 0.14));
}

.health-ring-alert {
  cursor: default;
  stroke: #f0b15f;
  filter: drop-shadow(0 4px 8px rgba(240, 177, 95, 0.18));
}

.health-ring-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 4;
  min-width: 128px;
  padding: 8px 10px;
  border: 1px solid rgba(221, 232, 245, 0.92);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(39, 49, 66, 0.12);
  color: #46566d;
  font-size: 11px;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.health-ring-tooltip b,
.health-ring-tooltip em {
  display: block;
  font-style: normal;
  white-space: nowrap;
}

.health-ring-tooltip b {
  margin-bottom: 3px;
  color: #1f2d43;
  font-weight: 800;
}

.health-ring:hover .health-ring-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.health-legend i {
  background: #36b7ad;
}

.health-legend .is-alert i {
  background: #f0b15f;
}

.dashboard-health.panel {
  position: relative;
  z-index: 1;
  overflow: visible;
  border-color: rgba(218, 229, 244, 0.82);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.92));
  box-shadow: 0 10px 26px rgba(31, 64, 128, 0.055);
}

.dashboard-insights {
  overflow: visible;
}

.dashboard-health.panel:hover {
  z-index: 8;
  border-color: rgba(92, 134, 197, 0.24);
  box-shadow: 0 14px 34px rgba(31, 64, 128, 0.09);
}

.dashboard-health .health-ring-track {
  stroke: #edf3fa;
}

.dashboard-health .health-ring-normal {
  stroke: #5f8fcf;
  filter: drop-shadow(0 4px 8px rgba(95, 143, 207, 0.13));
}

.dashboard-health .health-ring-alert {
  cursor: default;
  stroke: #d9a35f;
  filter: drop-shadow(0 4px 8px rgba(217, 163, 95, 0.16));
}

.dashboard-health .health-ring strong {
  color: #31415a;
}

.dashboard-health .health-legend i {
  background: #5f8fcf;
  box-shadow: 0 0 0 4px rgba(95, 143, 207, 0.08);
}

.dashboard-health .health-legend .is-alert i {
  background: #d9a35f;
  box-shadow: 0 0 0 4px rgba(217, 163, 95, 0.1);
}

.dashboard-health .health-ring-tooltip {
  left: auto;
  right: calc(100% + 10px);
  top: 50%;
  bottom: auto;
  z-index: 30;
  min-width: 150px;
  max-width: 190px;
  max-height: 132px;
  overflow-y: auto;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(37, 49, 68, 0.96);
  box-shadow: 0 14px 32px rgba(25, 38, 58, 0.22);
  color: rgba(255, 255, 255, 0.86);
  transform: translate(4px, -50%);
}

.dashboard-health .health-ring-tooltip::before {
  content: "";
  position: absolute;
  right: -5px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: rgba(37, 49, 68, 0.96);
  transform: translateY(-50%) rotate(45deg);
}

.dashboard-health .health-ring-tooltip b {
  color: #ffffff;
}

.dashboard-health .health-ring-tooltip em {
  color: rgba(255, 255, 255, 0.82);
}

.dashboard-health .health-ring:hover .health-ring-tooltip {
  opacity: 1;
  transform: translate(0, -50%);
}

.dashboard-kpis .kpi .kpi-trend.down {
  color: #7f8aa0;
}

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

.sales-trend-chart .trend-line.previous {
  stroke: #9fb2cb;
  stroke-width: 2;
  stroke-dasharray: 5 7;
  stroke-dashoffset: 0;
  animation: none;
  opacity: 0.86;
}

.sales-trend-chart .trend-line.current {
  stroke: #3478f6;
}

.sales-trend-chart .trend-point.previous {
  stroke: #9fb2cb;
  opacity: 0.78;
}

.sales-trend-chart {
  height: 112px;
  margin-top: 0;
}

.sales-trend-chart .trend-grid {
  stroke-opacity: 0.62;
}

.sales-trend-chart text {
  font-size: 8.5px;
}

.health-ring,
.production-ring {
  transform-origin: center;
  animation: softRingEnter 720ms cubic-bezier(0.22, 1, 0.36, 1) 220ms both;
}

.health-ring-chart .health-ring-normal,
.health-ring-chart .health-ring-alert {
  animation: ringStrokeEnter 860ms cubic-bezier(0.22, 1, 0.36, 1) 260ms both;
}

.energy-meter-group p i b,
.energy-gas-rows p i b,
.energy-bars b,
.material-category-strip i,
.logistics-bars b,
.stage-progress span {
  transform-origin: left center;
  animation: barGrow 720ms cubic-bezier(0.22, 1, 0.36, 1) 220ms both;
}

.energy-meter-group p:nth-child(2) i b,
.energy-gas-rows p:nth-child(2) i b,
.logistics-bars p:nth-child(2) i b {
  animation-delay: 300ms;
}

.energy-meter-group p:nth-child(3) i b,
.logistics-bars p:nth-child(3) i b {
  animation-delay: 380ms;
}

.energy-meter-group p:nth-child(4) i b,
.logistics-bars p:nth-child(4) i b {
  animation-delay: 460ms;
}

.energy-meter-group p:nth-child(5) i b {
  animation-delay: 540ms;
}

.dashboard-energy .energy-four-grid {
  align-items: stretch;
}

.dashboard-energy .energy-meter-group {
  display: grid;
  height: 100%;
  align-content: start;
  grid-template-rows: auto 1fr;
}

.dashboard-energy .energy-gas-group {
  grid-template-rows: auto auto 1fr;
}

.dashboard-energy .energy-gas-group .energy-gas-summary {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 8px;
}

.dashboard-energy .energy-meter-group header {
  min-height: 21px;
  align-items: baseline;
}

.dashboard-energy .energy-meter-group > div,
.dashboard-energy .energy-gas-rows {
  display: grid;
  align-content: start;
  justify-content: stretch;
}

.dashboard-energy .energy-meter-group p,
.dashboard-energy .energy-gas-rows p {
  min-height: 18px;
}

.dashboard-energy .energy-meter-group p {
  grid-template-columns: minmax(68px, 0.78fr) minmax(22px, 1fr) 44px;
}

.energy-meter-cell {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.energy-meter-cell strong {
  color: #25314a;
  font-size: 13px;
  line-height: 1.2;
}

.energy-meter-cell small {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #718096;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.energy-overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(360px, 1.06fr);
  gap: 10px;
  align-items: start;
}

.energy-overview-copy {
  display: grid;
  min-width: 0;
  gap: 10px;
  align-content: start;
}

.energy-overview-copy .energy-overview-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.energy-overview-copy .energy-overview-card {
  padding: 10px;
}

.energy-overview-copy .energy-overview-card strong {
  font-size: 21px;
}

.energy-overview-copy .energy-overview-breakdown,
.energy-overview-copy .energy-overview-breakdown.is-three {
  grid-template-columns: 1fr;
  gap: 4px;
}

.energy-overview-copy .energy-overview-breakdown p {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  padding: 5px 6px;
}

.energy-overview-copy .energy-overview-breakdown b {
  margin-top: 0;
  font-size: 12px;
}

.campus-model-card {
  align-self: start;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(204, 219, 242, 0.94);
  border-radius: 14px;
  background:
    radial-gradient(circle at 76% 0%, rgba(209, 235, 255, 0.92), transparent 40%),
    linear-gradient(145deg, rgba(250, 253, 255, 0.98), rgba(238, 246, 255, 0.92));
  box-shadow: var(--bubble-shadow), inset 0 1px 0 rgba(255,255,255,0.96);
}

.campus-model-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px 5px;
}

.campus-model-meta {
  display: grid;
  justify-items: end;
  gap: 3px;
  color: #7a8ba1;
  font-size: 9px;
  font-weight: 700;
}

.campus-model-head h3 {
  margin: 2px 0 0;
  color: #263652;
  font-size: 14px;
  line-height: 1.2;
}

.campus-kicker {
  color: #5e83c3;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.campus-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px 8px;
  color: #73829a;
  font-size: 10px;
}

.campus-legend span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.campus-legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.campus-legend .is-resin {
  background: #f4a561;
}

.campus-legend .is-polyol {
  background: #64a7f5;
}

.campus-stage {
  position: relative;
  min-height: 350px;
  margin: 0 8px 8px;
  overflow: hidden;
  border: 1px solid rgba(215, 227, 244, 0.82);
  border-radius: 12px;
  background:
    radial-gradient(circle at 76% 24%, rgba(255,255,255,0.92), transparent 32%),
    linear-gradient(146deg, rgba(241, 248, 255, 0.92), rgba(226, 239, 253, 0.74));
  isolation: isolate;
}

.campus-stage.is-raster {
  display: block;
  min-height: 0;
  aspect-ratio: 1.72;
  margin-bottom: 6px;
  background: #eaf4fd;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 8px 18px rgba(84, 132, 178, 0.1);
}

.campus-map-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.campus-map-scene::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 34%;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(226, 242, 255, 0.32));
  content: "";
}

.campus-map-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  animation: campusSceneBreathe 9s ease-in-out infinite alternate;
}

.campus-map-label {
  position: absolute;
  z-index: 2;
  display: grid;
  gap: 1px;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 7px;
  background: rgba(244, 251, 255, 0.8);
  box-shadow: 0 5px 12px rgba(63, 104, 143, 0.14);
  backdrop-filter: blur(6px);
}

.campus-map-label strong {
  color: #355d80;
  font-size: 9px;
}

.campus-map-label em {
  color: #7690a8;
  font-family: var(--font-mono);
  font-size: 7px;
  font-style: normal;
  font-weight: 750;
}

.campus-map-label.is-boiler {
  top: 13%;
  left: 14%;
}

.campus-map-label.is-workshop {
  top: 63%;
  left: 23%;
}

.campus-map-label.is-office {
  right: 13%;
  bottom: 11%;
}

.campus-vessel-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.campus-vessel-marker {
  position: absolute;
  top: 5%;
  left: calc(31.5% + var(--vessel-index) * 8.7%);
  display: grid;
  min-width: 38px;
  justify-items: center;
  padding: 3px 3px 2px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 5px;
  color: #4e6780;
  background: rgba(247, 252, 255, 0.86);
  box-shadow:
    0 4px 9px rgba(60, 101, 141, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(5px);
  font-family: var(--font-mono);
  line-height: 1.08;
  text-align: center;
  transform: translateX(-50%);
  animation: campusMarkerEnter 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.campus-vessel-marker.is-polyol {
  border-top: 2px solid rgba(75, 145, 224, 0.92);
}

.campus-vessel-marker.is-resin {
  border-top: 2px solid rgba(222, 139, 66, 0.94);
}

.campus-vessel-marker::after {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 1px;
  height: 48px;
  margin-top: 2px;
  background: linear-gradient(180deg, rgba(81, 122, 163, 0.78), rgba(81, 122, 163, 0.1));
  content: "";
  transform-origin: top center;
}

.campus-vessel-marker strong,
.campus-vessel-marker span,
.campus-vessel-marker em {
  display: block;
  white-space: nowrap;
}

.campus-vessel-marker strong {
  color: #275e97;
  font-size: 9px;
}

.campus-vessel-marker.is-resin strong {
  color: #98511d;
}

.campus-vessel-marker span {
  margin-top: 1px;
  color: #526a82;
  font-size: 7px;
  font-weight: 750;
}

.campus-vessel-marker em {
  margin-top: 1px;
  color: #145ec6;
  font-size: 8px;
  font-style: normal;
  font-weight: 850;
}

.campus-vessel-marker i {
  margin-left: 1px;
  color: #7b8fa3;
  font-size: 6px;
  font-style: normal;
}

.campus-vessel-marker:nth-child(1) { animation-delay: 250ms; }
.campus-vessel-marker:nth-child(2) { animation-delay: 310ms; }
.campus-vessel-marker:nth-child(3) { animation-delay: 370ms; }
.campus-vessel-marker:nth-child(4) { animation-delay: 430ms; }
.campus-vessel-marker:nth-child(5) { animation-delay: 490ms; }
.campus-vessel-marker:nth-child(6) { animation-delay: 550ms; }
.campus-vessel-marker:nth-child(7) { animation-delay: 610ms; }

.campus-vessel-marker:nth-child(1)::after { transform: rotate(-12deg); }
.campus-vessel-marker:nth-child(2)::after { transform: rotate(-8deg); }
.campus-vessel-marker:nth-child(3)::after { transform: rotate(-4deg); }
.campus-vessel-marker:nth-child(5)::after { transform: rotate(4deg); }
.campus-vessel-marker:nth-child(6)::after { transform: rotate(8deg); }
.campus-vessel-marker:nth-child(7)::after { transform: rotate(12deg); }

.campus-stage-grid {
  position: absolute;
  inset: -62px;
  opacity: 0.7;
  background-image:
    linear-gradient(rgba(139, 174, 216, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 174, 216, 0.14) 1px, transparent 1px);
  background-size: 26px 26px;
  transform: rotate(-20deg) skewX(10deg);
}

.campus-road {
  position: absolute;
  z-index: 1;
  height: 18px;
  border: 1px solid rgba(161, 184, 213, 0.58);
  background: rgba(255, 255, 255, 0.58);
  transform: rotate(-17deg) skewX(-9deg);
}

.campus-road::after {
  position: absolute;
  top: 50%;
  right: 8px;
  left: 8px;
  border-top: 1px dashed rgba(110, 146, 189, 0.64);
  content: "";
}

.campus-road span {
  position: absolute;
  top: 2px;
  left: 18px;
  color: #8a9bb2;
  font-size: 9px;
  transform: skewX(9deg) rotate(17deg);
}

.campus-road.is-main {
  top: 108px;
  left: -26px;
  width: 116%;
}

.campus-road.is-branch {
  top: 28px;
  right: 10px;
  width: 44%;
  transform: rotate(68deg) skewX(-9deg);
}

.campus-road.is-south {
  right: -12px;
  bottom: 58px;
  width: 53%;
}

.campus-north-gate {
  position: absolute;
  top: 12px;
  left: 17%;
  z-index: 5;
  color: #7590ae;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.campus-yard {
  position: absolute;
  top: 72px;
  right: 10%;
  z-index: 1;
  width: 30%;
  height: 78px;
  border: 1px dashed rgba(119, 153, 195, 0.66);
  border-radius: 5px;
  background: rgba(255,255,255,0.3);
  transform: rotate(-17deg) skewX(-9deg);
}

.campus-yard span {
  position: absolute;
  top: 31px;
  left: 26%;
  color: #8092ad;
  font-size: 10px;
  font-weight: 700;
  transform: skewX(9deg) rotate(17deg);
}

.campus-building,
.campus-vessel {
  border: 0;
}

.campus-building {
  position: absolute;
  z-index: 4;
  display: grid;
  place-items: center;
  border: 1px solid rgba(81, 130, 190, 0.62);
  border-radius: 4px;
  color: #41668d;
  background: linear-gradient(150deg, rgba(235, 246, 255, 0.98), rgba(184, 213, 241, 0.94));
  box-shadow: 7px 8px 0 rgba(72, 116, 168, 0.18), 0 10px 20px rgba(71, 113, 165, 0.10);
  transform: rotate(-17deg) skewX(-9deg);
  transition: transform 180ms var(--ease-soft), box-shadow 180ms ease, border-color 180ms ease, filter 180ms ease;
}

.campus-building::before {
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 2px;
  content: "";
}

.campus-building::after {
  position: absolute;
  right: -8px;
  bottom: -8px;
  left: 8px;
  z-index: -1;
  height: 8px;
  border: 1px solid rgba(93, 137, 184, 0.22);
  border-radius: 0 0 4px 4px;
  background: linear-gradient(180deg, rgba(123, 166, 208, 0.38), rgba(86, 128, 171, 0.2));
  content: "";
}

.campus-building span {
  position: relative;
  z-index: 2;
  font-size: 10px;
  font-weight: 750;
  transform: skewX(9deg) rotate(17deg);
}

.campus-building:hover,
.campus-building.is-active,
.campus-vessel:hover,
.campus-vessel.is-active {
  border-color: #3478f6;
  filter: saturate(1.16) brightness(1.02);
}

.campus-building:hover,
.campus-building.is-active {
  box-shadow: 7px 8px 0 rgba(52, 120, 246, 0.26), 0 0 0 3px rgba(52, 120, 246, 0.12), 0 12px 22px rgba(71, 113, 165, 0.16);
  transform: translateY(-2px) rotate(-17deg) skewX(-9deg);
}

.campus-building.is-boiler {
  top: 24px;
  left: 7%;
  width: 29%;
  height: 54px;
  color: #a36b27;
  border-color: rgba(204, 154, 80, 0.74);
  background: linear-gradient(150deg, #fff6de, #f1d39e);
  box-shadow: 7px 8px 0 rgba(175, 126, 55, 0.16), 0 10px 20px rgba(71, 113, 165, 0.08);
}

.campus-building.is-workshop {
  bottom: 82px;
  left: 5%;
  width: 58%;
  height: 102px;
  color: #356494;
  border-color: rgba(87, 142, 200, 0.76);
  background: linear-gradient(150deg, rgba(219, 241, 255, 0.82), rgba(157, 202, 238, 0.66));
  box-shadow: 8px 10px 0 rgba(67, 119, 168, 0.2), 0 14px 22px rgba(71, 113, 165, 0.12);
}

.campus-building.is-workshop span {
  position: absolute;
  bottom: 12px;
  left: 16px;
}

.campus-building.is-office {
  right: 12%;
  bottom: 10px;
  width: 24%;
  height: 50px;
  color: #4b6d85;
  border-color: rgba(121, 161, 186, 0.78);
  background: linear-gradient(150deg, #edfbff, #c4e2ea);
  box-shadow: 7px 8px 0 rgba(73, 130, 150, 0.18), 0 10px 20px rgba(71, 113, 165, 0.08);
}

.campus-workshop-roof {
  position: absolute;
  bottom: 123px;
  left: 7%;
  z-index: 5;
  width: 55%;
  height: 60px;
  pointer-events: none;
  border: 1px solid rgba(131, 188, 231, 0.36);
  background:
    repeating-linear-gradient(90deg, transparent 0 19px, rgba(255,255,255,0.58) 20px 21px),
    linear-gradient(145deg, rgba(230, 248, 255, 0.48), rgba(147, 207, 241, 0.22));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.82), 6px 8px 0 rgba(83, 142, 191, 0.1);
  transform: rotate(-17deg) skewX(-9deg);
}

.campus-workshop-roof span {
  position: absolute;
  top: 7px;
  left: 14px;
  color: rgba(72, 123, 165, 0.72);
  font-size: 9px;
  font-weight: 700;
  transform: skewX(9deg) rotate(17deg);
}

.campus-vessels {
  position: absolute;
  bottom: 151px;
  left: 8%;
  z-index: 8;
  width: 57%;
  height: 58px;
  transform: rotate(-17deg);
}

.campus-vessel {
  position: absolute;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid rgba(220, 140, 66, 0.86);
  border-radius: 50%;
  color: #8a5629;
  background:
    radial-gradient(circle at 34% 26%, rgba(255,255,255,0.92), transparent 26%),
    linear-gradient(145deg, #ffd7aa, #e99a53);
  box-shadow: 3px 5px 0 rgba(173, 103, 45, 0.24), 0 6px 12px rgba(67, 99, 135, 0.16), inset 0 -4px 0 rgba(150, 85, 34, 0.08);
  transition: transform 180ms var(--ease-soft), box-shadow 180ms ease, filter 180ms ease;
}

.campus-vessel span {
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 800;
}

.campus-vessel::before {
  position: absolute;
  right: 6px;
  bottom: -5px;
  left: 6px;
  z-index: -1;
  height: 7px;
  border-radius: 0 0 8px 8px;
  background: rgba(173, 103, 45, 0.34);
  content: "";
}

.campus-vessel::after {
  position: absolute;
  bottom: -8px;
  left: 50%;
  width: 1px;
  height: 6px;
  background: rgba(90, 123, 155, 0.68);
  content: "";
}

.campus-vessel small,
.campus-vessel em {
  position: absolute;
  left: 50%;
  display: block;
  width: 48px;
  overflow: hidden;
  color: #50657d;
  font-size: 7px;
  font-style: normal;
  font-weight: 750;
  line-height: 1.15;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translateX(-50%);
}

.campus-vessel small {
  top: 31px;
}

.campus-vessel em {
  top: 40px;
  color: #3478f6;
}

.campus-vessel em i {
  margin-left: 1px;
  color: #8191a5;
  font-size: 6px;
  font-style: normal;
}

.campus-vessel:hover,
.campus-vessel.is-active {
  box-shadow: 0 0 0 3px rgba(52, 120, 246, 0.16), 3px 4px 0 rgba(75, 122, 183, 0.22), 0 6px 12px rgba(67, 99, 135, 0.18);
  transform: translateY(-3px);
}

.campus-vessel.is-resin-1 { top: 4px; left: 29%; }
.campus-vessel.is-resin-2 { top: 4px; left: 42%; }
.campus-vessel.is-resin-3 { top: 4px; left: 55%; }
.campus-vessel.is-resin-4 { top: 4px; left: 68%; }
.campus-vessel.is-resin-5 { top: 4px; left: 81%; }

.campus-vessel.is-polyol-1,
.campus-vessel.is-polyol-2 {
  border-color: rgba(75, 145, 224, 0.88);
  color: #356eae;
  background:
    radial-gradient(circle at 34% 26%, rgba(255,255,255,0.92), transparent 26%),
    linear-gradient(145deg, #bfe1ff, #5c9ee9);
}

.campus-vessel.is-polyol-1::before,
.campus-vessel.is-polyol-2::before {
  background: rgba(54, 119, 192, 0.34);
}

.campus-vessel.is-polyol-1 { top: 4px; left: 3%; }
.campus-vessel.is-polyol-2 { top: 4px; left: 16%; }

.campus-compass {
  position: absolute;
  top: 17px;
  right: 17px;
  z-index: 10;
  display: grid;
  width: 24px;
  height: 32px;
  justify-items: center;
  color: #6682a3;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
}

.campus-compass i {
  width: 0;
  height: 0;
  border-right: 4px solid transparent;
  border-bottom: 15px solid #5d82aa;
  border-left: 4px solid transparent;
  transform: rotate(18deg);
}

.campus-stage.is-svg {
  min-height: 0;
  aspect-ratio: 1.78;
  margin-bottom: 6px;
  background:
    radial-gradient(circle at 72% 18%, rgba(255,255,255,0.98), transparent 36%),
    linear-gradient(145deg, #f7fbff, #e6f2ff);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.94), inset 0 -18px 32px rgba(92, 150, 207, 0.06);
}

.campus-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.campus-svg-grid {
  fill: url(#campus-grid);
  opacity: 0.62;
}

.campus-svg-ground {
  fill: url(#campus-ground);
  stroke: rgba(143, 177, 215, 0.42);
  stroke-width: 1;
}

.campus-svg-boundary {
  fill: none;
  stroke: rgba(112, 156, 204, 0.56);
  stroke-dasharray: 4 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.1;
}

.campus-svg-road {
  fill: none;
  stroke: rgba(255,255,255,0.88);
  stroke-linecap: round;
  stroke-width: 22;
}

.campus-svg-road-line {
  fill: none;
  stroke: rgba(127, 162, 201, 0.54);
  stroke-dasharray: 8 7;
  stroke-linecap: round;
  stroke-width: 1.4;
}

.campus-svg-yard {
  fill: rgba(255,255,255,0.34);
  stroke: rgba(114, 151, 194, 0.68);
  stroke-dasharray: 7 5;
  stroke-width: 1.5;
}

.campus-svg-muted,
.campus-svg-gate {
  fill: #718ba8;
  font-size: 12px;
  font-weight: 750;
}

.campus-svg-gate {
  fill: #547da8;
  font-size: 11px;
  letter-spacing: 0.18em;
}

.campus-svg-gate-bars path {
  fill: none;
  stroke: #7194bb;
  stroke-width: 1.8;
}

.campus-svg-gate-bars circle {
  fill: #ffffff;
  stroke: #7194bb;
  stroke-width: 1.3;
}

.campus-svg-landscape circle {
  fill: rgba(105, 177, 155, 0.72);
  stroke: rgba(75, 144, 133, 0.48);
  stroke-width: 1;
}

.campus-svg-building .is-floor-shadow {
  fill: rgba(86, 126, 164, 0.12);
  stroke: none;
}

.campus-svg-building .is-side {
  fill: #9cc5df;
  stroke: rgba(77, 132, 178, 0.68);
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.campus-svg-building .is-top {
  fill: url(#campus-building-top);
  stroke: rgba(98, 153, 194, 0.76);
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.campus-svg-building .is-roof-ridge {
  fill: none;
  stroke: rgba(255,255,255,0.78);
  stroke-linecap: round;
  stroke-width: 1.2;
}

.campus-svg-building .is-window-line {
  fill: none;
  stroke: rgba(255,255,255,0.6);
  stroke-linecap: round;
  stroke-width: 2;
}

.campus-svg-building.is-boiler .is-side {
  fill: #d5ae6b;
  stroke: rgba(183, 133, 60, 0.78);
}

.campus-svg-building.is-boiler .is-top {
  fill: url(#campus-boiler-top);
  stroke: rgba(201, 151, 74, 0.86);
}

.campus-svg-building.is-boiler .is-chimney path {
  fill: #c99342;
  stroke: rgba(160, 107, 41, 0.78);
  stroke-width: 1;
}

.campus-svg-building.is-boiler .is-chimney ellipse {
  fill: #f9d690;
  stroke: rgba(160, 107, 41, 0.78);
  stroke-width: 1;
}

.campus-svg-building.is-workshop .is-side {
  fill: rgba(91, 159, 205, 0.68);
}

.campus-svg-building.is-workshop .is-top {
  fill: url(#campus-workshop-top);
}

.campus-svg-building.is-workshop .is-plinth {
  fill: rgba(91, 133, 170, 0.26);
  stroke: rgba(80, 131, 173, 0.42);
  stroke-linejoin: round;
  stroke-width: 1;
}

.campus-svg-building.is-workshop .is-equipment-deck {
  fill: rgba(243, 251, 255, 0.28);
  stroke: rgba(255, 255, 255, 0.7);
  stroke-dasharray: 3 3;
  stroke-width: 1;
}

.campus-svg-building.is-office .is-entry-line {
  fill: rgba(234, 249, 255, 0.62);
  stroke: rgba(94, 153, 190, 0.7);
  stroke-width: 1;
}

.campus-svg-building text {
  fill: #426580;
  font-size: 13px;
  font-weight: 800;
}

.campus-svg-building text.is-status {
  fill: #68829c;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 750;
}

.campus-svg-building.is-boiler text {
  fill: #946020;
}

.campus-svg-building.is-boiler text.is-status {
  fill: #9d743d;
}

.campus-svg-building .is-roof-line {
  fill: none;
  stroke: rgba(255,255,255,0.68);
  stroke-width: 2;
}

.campus-svg-vessel path,
.campus-svg-vessel ellipse {
  fill: #eaa05c;
  stroke: rgba(173, 101, 42, 0.82);
  stroke-width: 1.2;
}

.campus-svg-vessel .is-pipe {
  fill: none;
  stroke: rgba(112, 141, 170, 0.9);
  stroke-linecap: round;
  stroke-width: 1.4;
}

.campus-svg-vessel ellipse:first-of-type {
  fill: #dc8c49;
}

.campus-svg-vessel ellipse:last-of-type {
  fill: #ffd09f;
}

.campus-svg-vessel.is-polyol path,
.campus-svg-vessel.is-polyol ellipse {
  fill: #77b4f2;
  stroke: rgba(49, 116, 192, 0.86);
}

.campus-svg-vessel.is-polyol ellipse:first-of-type {
  fill: #5b9de0;
}

.campus-svg-vessel.is-polyol ellipse:last-of-type {
  fill: #c6e6ff;
}

.campus-svg-vessel text {
  fill: #315d88;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  text-anchor: middle;
}

.campus-svg-vessel.is-resin text {
  fill: #885522;
}

.campus-svg-compass path {
  fill: #5c84ad;
}

.campus-svg-compass text {
  fill: #5c84ad;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
}

.campus-live-mark {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.campus-live-mark > i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #55b98d;
  box-shadow: 0 0 0 3px rgba(85, 185, 141, 0.16);
  animation: campusLivePulse 2.2s ease-in-out infinite;
}

.campus-vessel-strip {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.78fr);
  gap: 5px;
  padding: 0 8px 8px;
}

.campus-stage.is-raster .campus-vessel-strip {
  position: absolute;
  right: 5px;
  bottom: 5px;
  left: 5px;
  z-index: 4;
  padding: 4px;
  border: 1px solid rgba(183, 211, 234, 0.82);
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(245, 251, 255, 0.84), rgba(228, 242, 255, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 7px 16px rgba(70, 116, 158, 0.12);
  backdrop-filter: blur(7px);
  animation: campusDockEnter 620ms cubic-bezier(0.22, 1, 0.36, 1) 180ms both;
}

.campus-vessel-group {
  min-width: 0;
  padding: 5px;
  border: 1px solid rgba(173, 202, 228, 0.72);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.62);
}

.campus-stage.is-raster .campus-vessel-group {
  padding: 2px 3px 3px;
  border-color: rgba(181, 208, 232, 0.72);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.46);
}

.campus-vessel-group > span {
  display: block;
  margin-bottom: 4px;
  color: #7890aa;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.campus-stage.is-raster .campus-vessel-group > span {
  margin: 0 2px 2px;
  font-size: 7px;
}

.campus-stage.is-raster .campus-vessel-stat {
  padding: 3px 2px;
  background: rgba(255, 255, 255, 0.72);
  animation: campusStatEnter 480ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.campus-stage.is-raster .campus-vessel-stat:nth-child(1) { animation-delay: 280ms; }
.campus-stage.is-raster .campus-vessel-stat:nth-child(2) { animation-delay: 340ms; }
.campus-stage.is-raster .campus-vessel-stat:nth-child(3) { animation-delay: 400ms; }
.campus-stage.is-raster .campus-vessel-stat:nth-child(4) { animation-delay: 460ms; }
.campus-stage.is-raster .campus-vessel-stat:nth-child(5) { animation-delay: 520ms; }

.campus-vessel-group > div {
  display: grid;
  gap: 4px;
}

.campus-vessel-group.is-polyol > div {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.campus-vessel-group.is-resin > div {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.campus-vessel-stat {
  min-width: 0;
  padding: 4px 3px;
  border: 1px solid rgba(217, 228, 241, 0.94);
  border-top: 2px solid #f0a15a;
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,251,255,0.84));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.96), 0 3px 8px rgba(91, 129, 169, 0.06);
  text-align: center;
}

.campus-vessel-stat.is-polyol {
  border-top-color: #67a8ec;
  background:
    linear-gradient(180deg, rgba(247,252,255,0.98), rgba(239,248,255,0.9));
}

.campus-vessel-stat strong,
.campus-vessel-stat span,
.campus-vessel-stat em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.campus-vessel-stat strong {
  color: #45627e;
  font-family: var(--font-mono);
  font-size: 8px;
}

.campus-vessel-stat span {
  margin-top: 2px;
  color: #6f8094;
  font-size: 8px;
}

.campus-vessel-stat em {
  margin-top: 2px;
  color: #3478f6;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.campus-vessel-stat i {
  margin-left: 1px;
  color: #8e9bab;
  font-size: 6px;
  font-style: normal;
}

.energy-overview-head,
.energy-overview-copy .energy-overview-card,
.energy-daily-summary,
.campus-model-card {
  animation: energyOverviewLift 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.energy-overview-copy .energy-overview-card:nth-child(1) { animation-delay: 70ms; }
.energy-overview-copy .energy-overview-card:nth-child(2) { animation-delay: 130ms; }
.energy-daily-summary { animation-delay: 190ms; }
.campus-model-card { animation-delay: 110ms; }

.campus-map-label {
  animation: campusLabelFloat 4.8s ease-in-out infinite alternate;
}

.campus-map-label.is-workshop { animation-delay: -1.2s; }
.campus-map-label.is-office { animation-delay: -2.4s; }

.energy-daily-table tbody tr:not(.energy-day-detail-row),
.meter-log-table tbody tr {
  transition:
    background-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.energy-daily-table tbody tr:not(.energy-day-detail-row):hover,
.meter-log-table tbody tr:hover {
  background: rgba(239, 247, 255, 0.84);
  box-shadow: inset 3px 0 0 rgba(52, 120, 246, 0.48);
  transform: translateX(2px);
}

.energy-day-detail-row:not([hidden]) .energy-day-detail-grid {
  animation: energyDetailReveal 300ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Keep tabular screens visually consistent across modules. */
table th,
table td {
  text-align: center !important;
}

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

@keyframes campusSceneBreathe {
  from {
    transform: scale(1.01);
    filter: saturate(0.98) brightness(1);
  }
  to {
    transform: scale(1.035);
    filter: saturate(1.04) brightness(1.015);
  }
}

@keyframes campusLivePulse {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(85, 185, 141, 0.14);
    transform: scale(0.96);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(85, 185, 141, 0.04);
    transform: scale(1.08);
  }
}

@keyframes campusLabelFloat {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-3px);
  }
}

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

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

@keyframes campusMarkerEnter {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

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

@keyframes softRingEnter {
  from {
    opacity: 0;
    transform: scale(0.86);
    filter: saturate(0.84);
  }
  to {
    opacity: 1;
    transform: scale(1);
    filter: saturate(1);
  }
}

@keyframes ringStrokeEnter {
  from {
    opacity: 0.25;
    stroke-dashoffset: 100;
  }
}

/* Operational UI pass: calmer chrome, denser scanning, stronger hierarchy. */
body.is-authed {
  background: #f4f6fa;
}

body.is-authed .sidebar {
  background: rgba(255, 255, 255, 0.96);
  border-right-color: #dde5f0;
  box-shadow: none;
}

body.is-authed .brand {
  border-radius: var(--radius-panel);
  background: #ffffff;
  box-shadow: none;
}

body.is-authed .brand::after {
  display: none;
}

body.is-authed .nav-section,
body.is-authed .nav button {
  border-radius: var(--radius-card);
}

body.is-authed .nav button {
  min-height: 34px;
  box-shadow: none;
}

body.is-authed .nav button:hover,
body.is-authed .nav button.active {
  border-color: rgba(52, 120, 246, 0.22);
  background:
    linear-gradient(90deg, rgba(52, 120, 246, 0.10), rgba(255, 255, 255, 0.86));
  box-shadow: none;
}

body.is-authed .nav button.active::before {
  width: 3px;
  border-radius: 999px;
  background: var(--primary);
}

body.is-authed .nav .nav-icon,
body.is-authed .nav button.active .nav-icon,
body.is-authed .nav button:hover .nav-icon {
  border-radius: 7px;
  box-shadow: none;
}

body.is-authed .main::before {
  opacity: 0.14;
}

body.is-authed .topbar {
  min-height: 58px;
  padding: 9px 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 0 rgba(223, 231, 242, 0.82);
}

body.is-authed .title-block h1 {
  color: #111827;
  font-size: 19px;
}

body.is-authed .eyebrow {
  color: #7a8799;
}

body.is-authed .content {
  padding: 16px 18px 34px;
}

body.is-authed .panel,
body.is-authed .table-wrap,
body.is-authed .scroll-table,
body.is-authed .records-toolbar {
  border-color: #dde6f2;
  border-radius: var(--radius-panel);
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

body.is-authed .panel:hover {
  transform: none;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.07);
}

body.is-authed .panel::after {
  background: #e5edf7;
}

body.is-authed .primary-btn,
body.is-authed .ghost-btn,
body.is-authed .soft-primary,
body.is-authed .user-chip,
body.is-authed .topbar-todo-bell,
body.is-authed .table-wrap button,
body.is-authed .scroll-table button {
  border-radius: var(--radius-card);
}

body.is-authed button:focus-visible,
body.is-authed input:focus-visible,
body.is-authed select:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

body.is-authed .records-toolbar {
  position: relative;
  margin: 12px 0 10px;
  padding: 10px;
}

body.is-authed .records-toolbar .filters {
  gap: 8px;
}

body.is-authed .scroll-table {
  max-height: 390px;
}

body.is-authed .scroll-table thead th,
body.is-authed .table-wrap thead th {
  background: #f7f9fc;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

body.is-authed .scroll-table tbody tr:hover,
body.is-authed .table-wrap tbody tr:hover {
  background: #f8fbff;
}

body.is-authed th,
body.is-authed td {
  border-bottom-color: #edf2f7;
}

body.is-authed .energy-overview {
  gap: 14px;
  padding: 16px;
}

body.is-authed .energy-overview-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding-bottom: 0;
}

body.is-authed .energy-overview-head > div {
  min-width: 0;
}

body.is-authed .energy-overview-head h2 {
  margin-bottom: 4px;
  font-size: 18px;
}

body.is-authed .energy-overview-head p {
  max-width: 780px;
}

body.is-authed .energy-overview-layout {
  grid-template-columns: minmax(330px, 0.82fr) minmax(430px, 1.18fr);
  gap: 14px;
  align-items: start;
}

body.is-authed .energy-overview-copy {
  gap: 12px;
}

body.is-authed .energy-overview-copy .energy-overview-card {
  padding: 13px;
}

body.is-authed .energy-overview-card {
  border-radius: var(--radius-panel);
  background: #ffffff;
  box-shadow: none;
}

body.is-authed .energy-overview-card::before {
  display: block;
  width: 34px;
  height: 3px;
  margin-bottom: 9px;
  border-radius: 999px;
  background: var(--card-accent, var(--primary));
  content: "";
}

body.is-authed .energy-overview-card.is-gas {
  --card-accent: #0f9f7a;
}

body.is-authed .energy-overview-card.is-electricity {
  --card-accent: #2563eb;
}

body.is-authed .energy-overview-copy .energy-overview-card strong {
  font-size: 24px;
  letter-spacing: 0;
}

body.is-authed .energy-overview-breakdown p {
  padding: 7px 0;
  border: 0;
  border-bottom: 1px solid #e8eef6;
  border-radius: 0;
  background: transparent;
}

body.is-authed .energy-overview-breakdown p:last-child {
  border-bottom: 0;
}

body.is-authed .energy-overview-breakdown span {
  color: #64748b;
}

body.is-authed .energy-overview-breakdown b {
  color: #1f2937;
  font-weight: 750;
}

body.is-authed .energy-daily-summary {
  gap: 8px;
  padding: 12px;
  border: 1px solid #e0e8f3;
  border-radius: var(--radius-panel);
  background: #fbfcfe;
  box-shadow: none;
}

body.is-authed .energy-daily-table {
  border-radius: var(--radius-card);
}

body.is-authed .energy-daily-table th {
  color: #526173;
  background: #f3f6fb;
  font-weight: 700;
}

body.is-authed .energy-day-detail-btn {
  padding: 3px 6px;
  border: 1px solid transparent;
  border-radius: 6px;
}

body.is-authed .energy-day-detail-btn:hover {
  border-color: #d6e2f1;
  background: #ffffff;
}

body.is-authed .campus-model-card,
body.is-authed .campus-stage {
  border-radius: var(--radius-panel);
}

body.is-authed .campus-model-card {
  align-self: start;
  height: max-content;
  background: #ffffff;
  box-shadow: none;
}

body.is-authed .campus-model-head {
  padding: 12px 12px 7px;
  border-bottom: 1px solid #edf2f7;
}

body.is-authed .campus-stage.is-raster {
  margin: 8px;
  background: #eef6fd;
}

body.is-authed .campus-vessel-marker,
body.is-authed .campus-vessel-stat,
body.is-authed .campus-map-label {
  border-radius: 6px;
}

body.is-authed .scroll-table[data-table-id="energy-table"] table {
  min-width: 840px;
}

body.is-authed .scroll-table[data-table-id="energy-table"] .table-wrap {
  overflow: visible !important;
}

body.is-authed .scroll-table[data-table-id="energy-table"] th,
body.is-authed .scroll-table[data-table-id="energy-table"] td {
  padding: 7px 8px;
}

body.is-authed .scroll-table[data-table-id="energy-table"] thead {
  position: sticky !important;
  top: 0;
  z-index: 4;
}

body.is-authed .scroll-table[data-table-id="energy-table"] thead tr {
  position: sticky !important;
  top: 0;
  z-index: 4;
}

body.is-authed .scroll-table[data-table-id="energy-table"] thead th {
  position: sticky !important;
  top: 0;
  z-index: 4;
  background: #f8fafc !important;
  box-shadow: 0 1px 0 rgba(218, 228, 240, 0.94) !important;
}

body.is-authed .scroll-table[data-table-id="energy-table"] td:nth-child(3),
body.is-authed .scroll-table[data-table-id="energy-table"] td:nth-child(4) {
  font-weight: 650;
  color: #263244;
}

@media (max-width: 1180px) {
  body.is-authed .energy-overview-head {
    grid-template-columns: 1fr;
  }

  body.is-authed .energy-overview-head .primary-btn {
    justify-self: start;
  }
}

@media (max-width: 860px) {
  .quality-workbench,
  .quality-item-form {
    grid-template-columns: 1fr;
  }

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

  body.is-authed .energy-overview-layout,
  body.is-authed .energy-overview-copy .energy-overview-grid {
    grid-template-columns: 1fr;
  }

  body.is-authed .energy-overview-head {
    align-items: flex-start;
  }

  body.is-authed .energy-overview-head .primary-btn {
    width: 100%;
  }
}

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

/* Reference-traced scene: use the supplied design as the geometry source. */
.line-raster-aquarium,
.line-raster-bowl,
.line-raster-fish,
.line-raster-cat {
  display: none !important;
}

.reference-left-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.reference-cat-track {
  position: absolute;
  z-index: 4;
  left: 50.8%;
  bottom: 24.8%;
  width: 50.8%;
  transform: translate(-8.5%, 2%);
}

.reference-cat {
  position: absolute;
  inset: 0;
  width: 100%;
  height: auto;
  display: none;
}

.reference-cat-idle {
  display: block;
}

.login-screen:has(#loginPass:focus) .reference-cat-idle,
.login-screen:has(#loginCode:focus) .reference-cat-idle,
.cat-scene.is-password-active .reference-cat-idle,
.cat-scene.is-sorry .reference-cat-idle,
.cat-scene.is-success .reference-cat-idle {
  display: none;
}

.login-screen:has(#loginPass:focus) .reference-cat-stretch,
.login-screen:has(#loginCode:focus) .reference-cat-stretch,
.cat-scene.is-password-active .reference-cat-stretch {
  display: block;
}

.cat-scene.is-sorry .reference-cat-stretch,
.cat-scene.is-success .reference-cat-stretch {
  display: none;
}

.cat-scene.is-sorry .reference-cat-sorry {
  display: block;
}

.cat-scene.is-success .reference-cat-success {
  display: block;
}

.reference-fish {
  position: absolute;
  z-index: 3;
  height: auto;
  display: block;
  transform-origin: 50% 50%;
}

.reference-fish-one {
  left: 28.4%;
  top: 55.3%;
  width: 6.55%;
  animation: referenceFishOne 6.4s ease-in-out infinite;
}

.reference-fish-two {
  left: 23.2%;
  top: 60%;
  width: 5.6%;
  animation: referenceFishTwo 7.3s ease-in-out infinite;
}

.reference-fish-three {
  left: 34.6%;
  top: 59.7%;
  width: 7.75%;
  animation: referenceFishThree 5.8s ease-in-out infinite;
}

@keyframes referenceCatPatrol {
  0%, 10% { transform: translateX(-7%); }
  42%, 54% { transform: translateX(8%); }
  88%, 100% { transform: translateX(-7%); }
}

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

@keyframes referenceCatIdleDrift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}

@keyframes referenceCatBreathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-2px) scale(1.006); }
}

@keyframes referenceCatStretch {
  0%, 100% { transform: translate(0, 0) scale(1); }
  48% { transform: translate(-10px, 8px) scale(1.08, .91); }
}

@keyframes referenceCatNo {
  0%, 100% { transform: translateX(0) rotate(0); }
  32% { transform: translateX(-5px) rotate(-4deg); }
  68% { transform: translateX(5px) rotate(4deg); }
}

@keyframes referenceCatHappy {
  0%, 100% { transform: translateY(0) rotate(-.8deg); }
  50% { transform: translateY(-4px) rotate(1.6deg); }
}

@keyframes referenceFishOne {
  0%, 12% { transform: translateX(-9px) scaleX(1); }
  46% { transform: translateX(35px) scaleX(1); }
  52% { transform: translateX(35px) scaleX(-1); }
  88%, 100% { transform: translateX(-9px) scaleX(-1); }
}

@keyframes referenceFishTwo {
  0%, 12% { transform: translateX(26px) scaleX(-1); }
  46% { transform: translateX(-10px) scaleX(-1); }
  52% { transform: translateX(-10px) scaleX(1); }
  88%, 100% { transform: translateX(26px) scaleX(1); }
}

@keyframes referenceFishThree {
  0%, 12% { transform: translateX(14px) scaleX(-1); }
  46% { transform: translateX(-24px) scaleX(-1); }
  52% { transform: translateX(-24px) scaleX(1); }
  88%, 100% { transform: translateX(14px) scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  .reference-cat-track,
  .reference-cat,
  .reference-fish {
    animation: none !important;
  }
}

/* Articulated cat rig built from the supplied reference illustration. */
.reference-cat-rig {
  display: none !important;
  position: relative;
  width: 100%;
  aspect-ratio: 348 / 258;
  display: block;
  transform-origin: 50% 100%;
  animation: referenceRigBodyStep .72s ease-in-out infinite;
}

.reference-cat-part {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.reference-cat-tail {
  z-index: 1;
  transform-origin: 72% 55%;
  animation: referenceRigTail 1.8s ease-in-out infinite;
}

.reference-cat-leg {
  z-index: 2;
  transform-origin: 50% 74%;
}

.reference-cat-leg-front-left,
.reference-cat-leg-back-right {
  animation: referenceRigLegA .72s ease-in-out infinite;
}

.reference-cat-leg-front-right,
.reference-cat-leg-back-left {
  animation: referenceRigLegB .72s ease-in-out infinite;
}

.reference-cat-body {
  z-index: 3;
}

.reference-cat-ear {
  z-index: 4;
  animation: referenceRigEar 4.8s ease-in-out infinite;
}

.reference-cat-ear-left {
  transform-origin: 16% 25%;
}

.reference-cat-ear-right {
  transform-origin: 47% 23%;
  animation-delay: -2.4s;
}

.reference-cat-eye {
  position: absolute;
  z-index: 5;
  top: 36.8%;
  width: 4.6%;
  height: 9.2%;
  border-radius: 50%;
  background: #111111;
  transform-origin: 50% 50%;
  animation: referenceRigBlink 4.6s ease-in-out infinite;
}

.reference-cat-eye-left {
  left: 14.8%;
}

.reference-cat-eye-right {
  left: 32.2%;
}

.login-screen:has(#loginPass:focus) .reference-cat-rig,
.login-screen:has(#loginCode:focus) .reference-cat-rig,
.cat-scene.is-password-active .reference-cat-rig {
  animation: referenceRigStretch 1.9s ease-in-out infinite;
}

.login-screen:has(#loginPass:focus) .reference-cat-leg,
.login-screen:has(#loginCode:focus) .reference-cat-leg,
.cat-scene.is-password-active .reference-cat-leg {
  animation-play-state: paused;
}

.cat-scene.is-sorry .reference-cat-rig {
  animation: referenceRigNo 360ms ease-in-out 4;
}

.cat-scene.is-success .reference-cat-rig {
  animation: referenceRigHappy 620ms ease-in-out infinite;
}

.cat-scene.is-success .reference-cat-tail {
  animation: referenceRigTailHappy 420ms ease-in-out infinite;
}

@keyframes referenceRigBodyStep {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-3px) rotate(-.35deg); }
}

@keyframes referenceRigLegA {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(3px, -6px); }
}

@keyframes referenceRigLegB {
  0%, 100% { transform: translate(-2px, -5px); }
  50% { transform: translate(0, 0); }
}

@keyframes referenceRigTail {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(7deg); }
}

@keyframes referenceRigTailHappy {
  0%, 100% { transform: rotate(-12deg); }
  50% { transform: rotate(14deg); }
}

@keyframes referenceRigEar {
  0%, 82%, 100% { transform: rotate(0); }
  88% { transform: rotate(-4deg); }
  94% { transform: rotate(3deg); }
}

@keyframes referenceRigBlink {
  0%, 43%, 47%, 100% { transform: scaleY(1); }
  45% { transform: scaleY(.08); }
}

@keyframes referenceRigStretch {
  0%, 100% { transform: translate(0, 0) scale(1); }
  48% { transform: translate(-11px, 8px) scale(1.08, .91); }
}

@keyframes referenceRigNo {
  0%, 100% { transform: translateX(0) rotate(0); }
  32% { transform: translateX(-6px) rotate(-4deg); }
  68% { transform: translateX(6px) rotate(4deg); }
}

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

@media (prefers-reduced-motion: reduce) {
  .reference-cat-rig,
  .reference-cat-part,
  .reference-cat-eye {
    animation: none !important;
  }
}

/* Final white line-art login override. */
body:not(.is-authed) .app,
.login-screen {
  background: #fbfdff !important;
}

.login-screen {
  padding: clamp(18px, 3vw, 40px) !important;
}

.login-shell {
  width: min(1180px, calc(100vw - 48px)) !important;
  height: min(720px, calc(100vh - 48px)) !important;
  min-height: 610px !important;
  grid-template-columns: minmax(0, 1.55fr) minmax(370px, 410px) !important;
  overflow: hidden !important;
  border: 1px solid rgba(102, 151, 255, .38) !important;
  border-radius: 28px !important;
  background: #ffffff !important;
  box-shadow: 0 20px 64px rgba(51, 102, 191, .08) !important;
}

.login-showcase {
  order: 1 !important;
  padding: 0 !important;
  border-right: 0 !important;
  color: #111827 !important;
  background: #ffffff !important;
}

.login-form-column {
  order: 2 !important;
  padding: 40px 42px !important;
  border-left: 1px solid rgba(102, 151, 255, .34) !important;
  background: #ffffff !important;
}

.login-art {
  background: #ffffff !important;
}

.line-cat-login-svg,
.cat-aquarium-svg,
.cat-animated-stage,
.cat-raster-poses,
.cat-motion-layer,
.login-art-glow,
.cat-night-stars,
.login-visual-caption {
  display: none !important;
}

.line-raster-stage {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  background: #ffffff;
}

.line-raster-aquarium {
  position: absolute;
  left: 7%;
  bottom: 12%;
  width: 46%;
  aspect-ratio: 1.05;
}

.line-raster-bowl {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: auto;
  display: block;
}

.line-raster-cat {
  position: absolute;
  z-index: 4;
  left: 42%;
  bottom: 11.5%;
  width: 42%;
  height: auto;
  display: none;
  transform-origin: 50% 100%;
}

.line-cat-walk {
  display: block;
  animation: lineRasterPatrol 7.2s ease-in-out infinite alternate;
}

.login-screen:has(#loginPass:focus) .line-cat-walk,
.login-screen:has(#loginCode:focus) .line-cat-walk,
.cat-scene.is-password-active .line-cat-walk,
.cat-scene.is-sorry .line-cat-walk,
.cat-scene.is-success .line-cat-walk {
  display: none;
}

.login-screen:has(#loginPass:focus) .line-cat-stretch,
.login-screen:has(#loginCode:focus) .line-cat-stretch,
.cat-scene.is-password-active .line-cat-stretch {
  display: block;
}

.cat-scene.is-sorry .line-cat-stretch,
.cat-scene.is-success .line-cat-stretch {
  display: none;
}

.cat-scene.is-sorry .line-cat-sorry {
  display: block;
  animation: lineRasterNo 420ms ease-in-out 3;
}

.cat-scene.is-success .line-cat-success {
  display: block;
  animation: lineRasterHappy 720ms ease-in-out infinite;
}

.line-raster-fish {
  position: absolute;
  z-index: 3;
  width: 34px;
  height: 22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 42 24'%3E%3Cg fill='white' stroke='%23111827' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 12 2 4v16z'/%3E%3Cpath d='M11 12C17 3 33 3 40 12c-7 9-23 9-29 0Z'/%3E%3C/g%3E%3Ccircle cx='33' cy='10' r='1.5' fill='%23111827'/%3E%3C/svg%3E") center / contain no-repeat;
}

.line-raster-fish::before {
  display: none;
}

.line-raster-fish::after {
  display: none;
}

.line-raster-fish.fish-one {
  left: 30%;
  bottom: 44%;
  animation: lineRasterFishOne 6.4s linear infinite;
}

.line-raster-fish.fish-two {
  left: 50%;
  bottom: 34%;
  scale: .76;
  animation: lineRasterFishTwo 7.8s linear infinite;
}

.line-raster-fish.fish-three {
  left: 47%;
  bottom: 55%;
  scale: .62;
  animation: lineRasterFishThree 5.4s linear infinite;
}

.login-panel .brand.large .brand-mark {
  border: 1px solid rgba(80, 139, 255, .52) !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

.login-panel .brand strong,
.login-panel h1,
.register-panel .auth-flow-head h1,
.auth-flow-head h1 {
  color: #101827 !important;
}

.login-panel .brand span,
.auth-flow-head p {
  color: #52637f !important;
}

#loginForm h1::after {
  color: #5b6d8c !important;
  content: "欢迎回来，猫咪正在守着鱼缸~" !important;
}

.login-panel .auth-tabs,
.login-panel .field input,
.login-panel .code-row input,
.register-panel .field input,
.register-panel .code-row input,
.register-panel .field select {
  border-color: rgba(80, 139, 255, .5) !important;
  background-color: #ffffff !important;
  color: #23314c !important;
  box-shadow: none !important;
}

.login-panel .auth-tabs::before {
  border: 1px solid rgba(80, 139, 255, .34) !important;
  background: #ffffff !important;
  box-shadow: 0 4px 14px rgba(56, 122, 244, .08) !important;
}

.login-panel .auth-tabs button.active,
.login-panel .text-btn,
.login-panel .text-btn:hover {
  color: #2473ef !important;
}

.remember-password span,
.login-panel .field > span {
  color: #536582 !important;
}

@keyframes lineRasterPatrol {
  0% { transform: translateX(-48px); }
  45% { transform: translateX(22px); }
  55% { transform: translateX(22px); }
  100% { transform: translateX(70px); }
}

@keyframes lineRasterNo {
  0%, 100% { transform: translateX(0) rotate(0); }
  35% { transform: translateX(-8px) rotate(-4deg); }
  70% { transform: translateX(8px) rotate(4deg); }
}

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

@keyframes lineRasterFishOne {
  0% { transform: translateX(-32px) scaleX(1); }
  48% { transform: translateX(82px) scaleX(1); }
  52% { transform: translateX(82px) scaleX(-1); }
  100% { transform: translateX(-32px) scaleX(-1); }
}

@keyframes lineRasterFishTwo {
  0% { transform: translateX(54px) scaleX(-1); }
  48% { transform: translateX(-54px) scaleX(-1); }
  52% { transform: translateX(-54px) scaleX(1); }
  100% { transform: translateX(54px) scaleX(1); }
}

@keyframes lineRasterFishThree {
  0% { transform: translateX(-38px) scaleX(1); }
  48% { transform: translateX(38px) scaleX(1); }
  52% { transform: translateX(38px) scaleX(-1); }
  100% { transform: translateX(-38px) scaleX(-1); }
}

@media (max-width: 820px) {
  .login-shell {
    width: min(440px, 100%) !important;
    height: auto !important;
    min-height: min(640px, calc(100vh - 32px)) !important;
    grid-template-columns: 1fr !important;
  }

  .login-form-column {
    order: 1 !important;
    padding: 30px 24px !important;
  }

  .login-showcase {
    display: none !important;
  }
}

/* Minimal hand-drawn aquarium login scene. */
body:not(.is-authed) .app,
.login-screen {
  background: #fbfdff;
}

.login-screen {
  padding: clamp(18px, 3vw, 42px);
}

.login-shell {
  width: min(1180px, calc(100vw - 48px));
  height: min(720px, calc(100vh - 48px));
  min-height: 610px;
  grid-template-columns: minmax(0, 1.38fr) minmax(390px, 500px);
  border: 1px solid rgba(102, 151, 255, .36);
  border-radius: 28px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 20px 64px rgba(51, 102, 191, .08);
}

.login-showcase {
  order: 1;
  color: #101827;
  border-right: 0;
  background: #ffffff;
}

.login-form-column {
  order: 2;
  padding: 40px 42px;
  border-left: 1px solid rgba(102, 151, 255, .34);
  background: rgba(255, 255, 255, .98);
}

.login-art {
  background: #ffffff;
}

.login-art-glow,
.cat-night-stars,
.cat-aquarium-svg,
.cat-animated-stage,
.cat-raster-poses,
.cat-motion-layer,
.login-visual-caption {
  display: none;
}

.line-cat-login-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  color: #151820;
  overflow: visible;
}

.line-cat-login-svg path,
.line-cat-login-svg ellipse,
.line-cat-login-svg circle {
  vector-effect: non-scaling-stroke;
}

.line-decoration {
  stroke-width: 2.5;
}

.line-ground {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2.5;
}

.line-bowl {
  stroke-width: 2.6;
}

.line-pebbles {
  stroke-width: 2.1;
}

.line-bubbles {
  animation: lineBubblesRise 4.8s ease-in-out infinite;
  transform-origin: 220px 320px;
}

.line-fish {
  stroke-width: 2.2;
  transform-box: fill-box;
  transform-origin: center;
}

.line-fish-one {
  animation: lineFishOne 6.6s ease-in-out infinite;
}

.line-fish-two {
  animation: lineFishTwo 8.2s ease-in-out infinite;
}

.line-fish-three {
  animation: lineFishThree 5.8s ease-in-out infinite;
}

.line-cat-walker {
  stroke-width: 3;
  transform-origin: 505px 456px;
  animation: lineCatPatrol 8.4s ease-in-out infinite alternate;
}

.line-cat-stretch {
  display: none;
}

.cat-scene.is-watch-pass .line-cat-normal,
.cat-scene.is-watch-code .line-cat-normal {
  display: none;
}

.cat-scene.is-watch-pass .line-cat-stretch,
.cat-scene.is-watch-code .line-cat-stretch {
  display: block;
  animation: lineCatStretch 1.7s ease-in-out infinite;
  transform-origin: 510px 444px;
}

.cat-scene.is-watch-pass .line-cat-walker,
.cat-scene.is-watch-code .line-cat-walker {
  animation-play-state: paused;
}

.cat-scene.is-sorry .line-cat-walker {
  animation: lineCatBodySorry 420ms ease-in-out 3;
}

.cat-scene.is-sorry .line-cat-head {
  animation: lineCatHeadNo 320ms ease-in-out 4;
  transform-origin: 448px 305px;
}

.cat-scene.is-success .line-cat-walker {
  animation-play-state: paused;
}

.cat-scene.is-success .line-cat-tail {
  animation: lineCatTailHappy 540ms ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: left center;
}

.cat-success-particles {
  left: 44%;
  bottom: 27%;
  width: 45%;
  height: 48%;
}

.login-panel .brand.large .brand-mark {
  border: 1px solid rgba(80, 139, 255, .55);
  background: #ffffff;
  box-shadow: none;
}

.login-panel .brand strong,
.login-panel h1,
.register-panel .auth-flow-head h1,
.auth-flow-head h1 {
  color: #101827;
}

.login-panel .brand span,
.auth-flow-head p {
  color: #52637f;
}

.login-kicker {
  display: none;
}

#loginForm h1 {
  margin-top: 26px;
  color: #111827;
  font-size: 44px;
  letter-spacing: .08em;
}

#loginForm h1::after {
  margin-top: 8px;
  color: #5b6d8c;
  content: "欢迎回来，猫咪正在守着鱼缸~";
}

.login-panel .auth-tabs {
  border: 1px solid rgba(80, 139, 255, .4);
  background: #fbfdff;
  box-shadow: none;
}

.login-panel .auth-tabs::before {
  border: 1px solid rgba(80, 139, 255, .36);
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(56, 122, 244, .08);
}

.login-panel .auth-tabs button,
.login-panel .field > span,
.register-panel .field > span,
.remember-password span {
  color: #536582;
}

.login-panel .auth-tabs button.active,
.login-panel .text-btn,
.login-panel .text-btn:hover {
  color: #2473ef;
}

.login-panel .field input,
.login-panel .code-row input,
.register-panel .field input,
.register-panel .code-row input,
.register-panel .field select {
  min-height: 54px;
  border: 1px solid rgba(80, 139, 255, .56);
  border-radius: 14px;
  background-color: #ffffff;
  color: #23314c;
  box-shadow: none;
}

.login-panel .field input:focus,
.login-panel .code-row input:focus,
.register-panel .field input:focus,
.register-panel .field select:focus,
.register-panel .code-row input:focus {
  border-color: #4a91ff;
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(74, 145, 255, .12);
}

.login-panel .primary-btn.wide,
.auth-flow-actions .primary-btn.wide {
  min-height: 56px;
  border: 1px solid #2d7bf0;
  border-radius: 15px;
  background: linear-gradient(135deg, #4d8cff, #68a0ff);
  box-shadow: 0 12px 22px rgba(74, 140, 255, .18);
}

.login-panel .primary-btn.wide:hover,
.auth-flow-actions .primary-btn.wide:hover {
  background: linear-gradient(135deg, #3e80f3, #5b98ff);
  box-shadow: 0 14px 26px rgba(74, 140, 255, .24);
}

.auth-flow-actions .ghost-btn.wide,
.login-panel .ghost-btn {
  border-color: rgba(80, 139, 255, .42);
  background: #ffffff;
  color: #3779e8;
}

.password-eye-btn:hover,
.password-eye-btn.is-visible {
  color: #3779e8;
  background: rgba(80, 139, 255, .1);
}

.form-error {
  color: #e85a62;
}

@keyframes lineCatPatrol {
  0% { transform: translateX(-46px); }
  42% { transform: translateX(20px); }
  54% { transform: translateX(20px); }
  100% { transform: translateX(74px); }
}

@keyframes lineCatStretch {
  0%, 100% { transform: translate(0, 0) scaleX(1); }
  50% { transform: translate(-14px, 4px) scaleX(1.045); }
}

@keyframes lineCatBodySorry {
  0%, 100% { transform: translateX(0); }
  34% { transform: translateX(-7px); }
  68% { transform: translateX(7px); }
}

@keyframes lineCatHeadNo {
  0%, 100% { transform: rotate(0deg); }
  35% { transform: rotate(-9deg); }
  70% { transform: rotate(9deg); }
}

@keyframes lineCatTailHappy {
  0%, 100% { transform: rotate(-9deg); }
  50% { transform: rotate(15deg); }
}

@keyframes lineFishOne {
  0%, 100% { transform: translate(158px, 324px) scaleX(1); }
  48% { transform: translate(242px, 308px) scaleX(1); }
  52% { transform: translate(242px, 308px) scaleX(-1); }
  96% { transform: translate(158px, 324px) scaleX(-1); }
}

@keyframes lineFishTwo {
  0%, 100% { transform: translate(255px, 368px) scale(-.82, .82); }
  48% { transform: translate(168px, 350px) scale(-.82, .82); }
  52% { transform: translate(168px, 350px) scale(.82, .82); }
  96% { transform: translate(255px, 368px) scale(.82, .82); }
}

@keyframes lineFishThree {
  0%, 100% { transform: translate(194px, 292px) scale(.68); }
  48% { transform: translate(274px, 316px) scale(.68); }
  52% { transform: translate(274px, 316px) scale(-.68, .68); }
  96% { transform: translate(194px, 292px) scale(-.68, .68); }
}

@keyframes lineBubblesRise {
  0%, 100% { transform: translateY(12px); opacity: .38; }
  50% { transform: translateY(-16px); opacity: .9; }
}

@media (max-width: 820px) {
  .login-shell {
    width: min(440px, 100%);
    min-height: min(640px, calc(100vh - 32px));
    grid-template-columns: 1fr;
  }

  .login-form-column {
    order: 1;
    padding: 30px 24px;
  }

  .login-showcase {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .line-cat-walker,
  .line-cat-stretch,
  .line-cat-head,
  .line-cat-tail,
  .line-fish,
  .line-bubbles {
    animation: none !important;
  }
}

/* Login playful split layout inspired by soft interaction mockups. */
body:not(.is-authed) .app {
  display: block;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  background: #f4f3f1;
}

.login-screen {
  padding: clamp(18px, 4vw, 44px);
  background:
    linear-gradient(180deg, rgba(255, 255, 245, 0.72) 0 78px, transparent 78px),
    #f4f3f1;
}

.login-screen::before,
.login-screen::after,
.login-shell::before,
.login-shell::after,
.login-showcase::before,
.login-showcase::after,
.login-art::before,
.login-art::after,
.login-art-glow,
.login-hero-image,
.login-window,
.login-shield,
.login-lock,
.login-orbit,
.aquarium-caustics,
.login-art .aquarium-bubbles,
.login-art .aquarium-plant,
.login-art .aquarium-pebbles,
.login-art .aquarium-fish,
.login-art .aquarium-brand-fish,
.login-art .aquarium-water-floor {
  display: none !important;
}

.login-shell {
  width: min(1060px, calc(100vw - 56px));
  height: min(640px, calc(100vh - 56px));
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(350px, 430px);
  gap: 0;
  border: 0;
  border-radius: 0;
  background: #ededed;
  box-shadow: 0 22px 70px rgba(15, 23, 42, 0.12);
  backdrop-filter: none;
  animation: loginStageIn 620ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.login-showcase {
  order: 1;
  z-index: 2;
  display: grid;
  min-height: 0;
  padding: 0;
  overflow: visible;
  background: #ecebea;
  animation: loginShowcaseIn 720ms cubic-bezier(0.22, 1, 0.36, 1) 80ms both;
}

.login-form-column {
  order: 2;
  z-index: 1;
  display: grid;
  align-items: center;
  justify-items: center;
  min-height: 0;
  padding: 34px;
  border: 0;
  background: #ffffff;
  overflow: hidden;
  animation: loginFormColumnIn 680ms cubic-bezier(0.22, 1, 0.36, 1) 180ms both;
}

.login-form-column:has(.register-panel:not([hidden])) {
  align-items: center;
  padding: 26px 28px;
}

.login-panel {
  width: min(100%, 320px);
  max-width: 320px;
  margin: 0;
  gap: 12px;
  padding: 0;
  background: transparent;
}

.login-panel .brand {
  justify-self: center;
  width: auto;
  max-width: 100%;
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.login-panel .brand::after {
  display: none;
}

.login-panel .brand.large .brand-mark {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  background: #f5f6f8;
  box-shadow: none;
}

.login-panel .brand strong {
  color: #17181d;
  font-size: 15px;
}

.login-panel .brand span {
  color: #7b7d86;
  font-size: 11px;
}

.login-kicker {
  display: none;
}

.login-panel h1 {
  margin: 0;
  color: #17181d;
  font-size: 28px;
  font-weight: 850;
  line-height: 1.1;
  text-align: center;
}

#loginForm h1::after {
  display: block;
  margin-top: 8px;
  color: #777982;
  content: "请输入账号信息";
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.login-panel .auth-tabs {
  height: 38px;
  padding: 3px;
  border-radius: 10px;
  background: #f2f2f3;
  box-shadow: none;
}

.login-panel .auth-tabs::before {
  top: 3px;
  left: 3px;
  width: calc((100% - 6px) / 2);
  height: calc(100% - 6px);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.login-panel .auth-tabs button {
  min-height: 32px;
  color: #777982;
  font-size: 12px;
  font-weight: 750;
}

.login-panel .auth-tabs button.active {
  color: #17181d;
}

.login-panel .field {
  gap: 6px;
}

.login-panel .field > span {
  color: #565963;
  font-size: 11px;
  font-weight: 750;
}

.login-panel .field input,
.login-panel .code-row input,
.register-panel .field input,
.register-panel .code-row input {
  min-height: 44px;
  border: 0;
  border-bottom: 2px solid #d7d7da;
  border-radius: 0;
  background-color: transparent;
  color: #17181d;
  box-shadow: none;
  backdrop-filter: none;
}

#loginUser,
#loginPass,
#loginPhone,
#loginEmail,
#loginCode {
  padding-left: 0;
  background-image: none;
}

.password-input #loginPass {
  padding-right: 40px;
}

.password-eye-btn {
  right: 0;
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.password-eye-btn:hover,
.password-eye-btn.is-visible {
  color: #17181d;
  background: #f2f2f3;
}

.login-panel .field input:focus,
.login-panel .code-row input:focus {
  border-color: #17181d;
  background: transparent;
  box-shadow: none;
}

.login-options {
  align-items: center;
  margin-top: -2px;
}

.remember-password span,
.login-panel .text-btn {
  color: #777982;
  font-size: 11px;
}

.login-panel .text-btn:hover {
  color: #17181d;
}

.login-panel .primary-btn.wide,
.auth-flow-actions .primary-btn.wide {
  min-height: 48px;
  border-radius: 13px;
  background: #1d1d24;
  color: #ffffff;
  box-shadow: none;
}

.login-panel .primary-btn.wide:hover,
.auth-flow-actions .primary-btn.wide:hover {
  background: #050509;
  box-shadow: none;
}

.auth-flow-actions .ghost-btn.wide,
.login-panel .ghost-btn {
  border-color: #e3e4e8;
  border-radius: 13px;
  background: #f6f6f7;
  color: #424550;
  box-shadow: none;
}

.login-panel .auth-footer {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 6px;
  text-align: center;
}

.login-panel .auth-footer span {
  display: none;
}

.register-panel {
  width: min(100%, 382px);
  max-width: 382px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: center;
  column-gap: 16px;
  row-gap: 9px;
}

.register-panel .brand,
.register-panel .auth-flow-head,
.register-panel .auth-code-field,
.register-panel .register-code-field,
.register-panel .form-error,
.register-panel .auth-flow-actions {
  grid-column: 1 / -1;
}

.register-panel .brand {
  justify-self: center;
  margin-bottom: 1px;
}

.register-panel .brand.large .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

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

.register-panel .brand span {
  font-size: 11px;
}

.auth-flow-head {
  display: grid;
  justify-items: center;
  gap: 4px;
  margin: 0 0 2px;
  text-align: center;
}

.auth-flow-head > span {
  color: #3478f6;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.12em;
}

.register-panel .auth-flow-head h1,
.auth-flow-head h1 {
  margin: 0;
  color: #17181d;
  font-size: 24px;
  font-weight: 850;
  line-height: 1.08;
}

.auth-flow-head p {
  max-width: 300px;
  margin: 0;
  color: #7b7d86;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.register-panel .field {
  min-width: 0;
  gap: 5px;
}

.register-panel .field > span {
  color: #565963;
  font-size: 11px;
  font-weight: 750;
}

.register-panel .field input,
.register-panel .field select,
.register-panel .code-row input {
  width: 100%;
  min-height: 38px;
  padding: 0;
  border: 0;
  border-bottom: 2px solid #d7d7da;
  border-radius: 0;
  background-color: transparent;
  color: #17181d;
  box-shadow: none;
}

.register-panel .field select {
  padding-right: 24px;
}

.register-panel .field input:focus,
.register-panel .field select:focus,
.register-panel .code-row input:focus {
  border-color: #17181d;
  box-shadow: none;
}

.register-panel .code-row {
  grid-template-columns: minmax(0, 1fr) 136px;
  gap: 10px;
  align-items: end;
}

.register-panel .code-row .ghost-btn {
  min-height: 38px;
  border-color: #e3e4e8;
  border-radius: 11px;
  background: #f6f6f7;
  color: #424550;
  box-shadow: none;
}

.register-panel .form-error {
  min-height: 14px;
  margin: 0;
  font-size: 12px;
  line-height: 1.2;
}

.auth-flow-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: 0;
}

.auth-flow-actions .primary-btn.wide,
.auth-flow-actions .ghost-btn.wide {
  width: 100%;
  min-height: 42px;
  margin: 0;
}

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

.login-art {
  position: relative;
  min-height: 100%;
  height: 100%;
  background: #ecebea;
  animation: none;
}

.login-characters {
  position: absolute;
  inset: 0;
  transform: translateZ(0);
  transform-origin: 42% 70%;
}

.login-shell:has(.register-panel:not([hidden])) .login-characters {
  transform: translate(-18px, 34px) scale(0.82);
}

.login-character {
  position: absolute;
  z-index: 2;
  display: block;
  transform-origin: 50% 100%;
  opacity: 1;
  animation:
    loginCharacterEnter 620ms cubic-bezier(0.22, 1, 0.36, 1) both,
    loginCharacterFloat 5.8s ease-in-out infinite;
  animation-delay:
    var(--enter-delay, 0ms),
    calc(var(--enter-delay, 0ms) + 720ms + var(--float-delay, 0ms));
}

.login-characters.is-ready .login-character {
  animation: loginCharacterFloat 5.8s ease-in-out infinite;
  animation-delay: var(--float-delay, 0ms);
}

.login-character i,
.login-character b,
.login-character em,
.login-character::before,
.login-character::after {
  position: absolute;
  display: block;
  content: "";
  transition:
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
    width 220ms ease,
    height 220ms ease,
    left 220ms ease,
    right 220ms ease,
    top 220ms ease;
}

.login-character i,
.login-character b {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #111217;
}

.login-character {
  transition:
    translate 240ms cubic-bezier(0.22, 1, 0.36, 1),
    scale 240ms cubic-bezier(0.22, 1, 0.36, 1),
    rotate 240ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 240ms ease;
}

.login-character::before {
  display: none;
}

.login-character.is-purple {
  --enter-delay: 210ms;
  --enter-x: 0;
  --enter-y: -96px;
  --settle-x: 0;
  --settle-y: 4px;
  --float-delay: -1.8s;
  left: 26%;
  bottom: 24%;
  z-index: 2;
  width: 126px;
  height: 260px;
  border-radius: 10px 10px 0 0;
  background: #6f2cff;
  clip-path: none;
  transform: skewX(-7deg);
}

.login-character.is-purple i {
  top: 35px;
  right: 56px;
  width: 11px;
  height: 11px;
  background: #ffffff;
}

.login-character.is-purple i::after {
  position: absolute;
  top: 4px;
  left: 5px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #111217;
  content: "";
}

.login-character.is-purple b {
  top: 36px;
  right: 20px;
  width: 11px;
  height: 11px;
  background: #ffffff;
}

.login-character.is-purple b::after {
  position: absolute;
  top: 4px;
  left: 5px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #111217;
  content: "";
}

.login-character.is-purple::after {
  top: 51px;
  right: 43px;
  width: 9px;
  height: 36px;
  border-radius: 999px;
  background: #111217;
}

.login-character.is-charcoal {
  --enter-delay: 320ms;
  --enter-x: 0;
  --enter-y: 92px;
  --settle-x: 0;
  --settle-y: -4px;
  --float-delay: -1.1s;
  left: 45%;
  bottom: 24%;
  z-index: 3;
  width: 94px;
  height: 186px;
  border-radius: 8px 8px 0 0;
  background: #17181d;
  transform: none;
}

.login-character.is-charcoal i,
.login-character.is-charcoal b {
  top: 28px;
  width: 15px;
  height: 15px;
  background: #ffffff;
}

.login-character.is-charcoal i {
  right: 32px;
}

.login-character.is-charcoal b {
  right: 9px;
}

.login-character.is-charcoal i::after,
.login-character.is-charcoal b::after {
  position: absolute;
  top: 4px;
  left: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #17181d;
  content: "";
}

.login-character.is-orange {
  --enter-delay: 80ms;
  --enter-x: -140px;
  --enter-y: 0;
  --settle-x: 5px;
  --settle-y: 0;
  --float-delay: -2s;
  left: 10%;
  bottom: 24%;
  z-index: 4;
  width: 270px;
  height: 132px;
  border-radius: 160px 160px 0 0;
  background: #ff8233;
}

.login-character.is-orange i,
.login-character.is-orange b,
.login-character.is-orange em {
  top: 60px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #17181d;
}

.login-character.is-orange i {
  right: 86px;
}

.login-character.is-orange b {
  right: 54px;
}

.login-character.is-orange em {
  right: 22px;
}

.login-character.is-yellow {
  --enter-delay: 430ms;
  --enter-x: 128px;
  --enter-y: 0;
  --settle-x: -5px;
  --settle-y: 0;
  --float-delay: -0.5s;
  left: 58%;
  bottom: 24%;
  z-index: 4;
  width: 90px;
  height: 168px;
  border-radius: 72px 72px 0 0;
  background: #f2d20a;
}

.login-character.is-yellow i {
  top: 52px;
  right: 22px;
  width: 8px;
  height: 8px;
}

.login-character.is-yellow::after {
  top: 75px;
  right: -36px;
  width: 42px;
  height: 5px;
  border-radius: 999px;
  background: #17181d;
}

.login-characters.is-watch-user .login-character.is-purple,
.login-characters.is-watch-user .login-character.is-charcoal {
  rotate: -1.5deg;
}

.login-characters.is-watch-pass .login-character.is-purple,
.login-characters.is-watch-code .login-character.is-purple,
.login-characters.is-watch-pass .login-character.is-charcoal,
.login-characters.is-watch-code .login-character.is-charcoal {
  rotate: 1.5deg;
}

.login-characters.is-watch-user .login-character.is-purple i::after,
.login-characters.is-watch-user .login-character.is-purple b::after,
.login-characters.is-watch-user .login-character.is-charcoal i::after,
.login-characters.is-watch-user .login-character.is-charcoal b::after {
  transform: translate(3px, -1px);
}

.login-characters.is-watch-pass .login-character.is-purple i::after,
.login-characters.is-watch-pass .login-character.is-purple b::after,
.login-characters.is-watch-pass .login-character.is-charcoal i::after,
.login-characters.is-watch-pass .login-character.is-charcoal b::after,
.login-characters.is-watch-code .login-character.is-purple i::after,
.login-characters.is-watch-code .login-character.is-purple b::after,
.login-characters.is-watch-code .login-character.is-charcoal i::after,
.login-characters.is-watch-code .login-character.is-charcoal b::after {
  transform: translate(4px, 2px);
}

.login-characters.is-watch-user .login-character.is-yellow i {
  transform: translate(4px, -1px);
}

.login-characters.is-watch-user .login-character.is-yellow {
  rotate: -2deg;
}

.login-characters.is-watch-pass .login-character.is-yellow i,
.login-characters.is-watch-code .login-character.is-yellow i {
  transform: translate(5px, 3px);
}

.login-characters.is-watch-pass .login-character.is-yellow,
.login-characters.is-watch-code .login-character.is-yellow {
  rotate: 2deg;
}

.login-characters.is-watch-user .login-character.is-orange i,
.login-characters.is-watch-user .login-character.is-orange b,
.login-characters.is-watch-user .login-character.is-orange em {
  transform: translate(4px, -2px);
}

.login-characters.is-watch-pass .login-character.is-orange i,
.login-characters.is-watch-pass .login-character.is-orange b,
.login-characters.is-watch-pass .login-character.is-orange em,
.login-characters.is-watch-code .login-character.is-orange i,
.login-characters.is-watch-code .login-character.is-orange b,
.login-characters.is-watch-code .login-character.is-orange em {
  transform: translate(5px, 3px);
}

.login-characters.is-typing .login-character.is-orange {
  animation: loginCharacterTyping 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 0ms;
}

.login-characters.is-typing .login-character.is-purple {
  animation: loginCharacterTyping 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 40ms;
}

.login-characters.is-typing .login-character.is-charcoal {
  animation: loginCharacterTyping 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 70ms;
}

.login-characters.is-typing .login-character.is-yellow {
  animation: loginCharacterTyping 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 100ms;
}

.login-characters.is-ack .login-character {
  animation: loginCharacterNod 640ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.login-characters.is-ack .login-character.is-orange {
  animation-delay: 40ms;
}

.login-characters.is-ack .login-character.is-purple {
  animation-delay: 80ms;
}

.login-characters.is-ack .login-character.is-charcoal {
  animation-delay: 120ms;
}

.login-characters.is-ack .login-character.is-yellow {
  animation-delay: 160ms;
}

.login-characters.is-sorry .login-character {
  animation: loginCharacterSorry 760ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.login-characters.is-sorry .login-character.is-purple::after {
  height: 28px;
  transform: rotate(10deg);
}

.login-characters.is-sorry .login-character.is-orange i,
.login-characters.is-sorry .login-character.is-orange b,
.login-characters.is-sorry .login-character.is-orange em,
.login-characters.is-sorry .login-character.is-yellow i {
  transform: translateY(5px);
}

.login-characters.is-sorry .login-character.is-charcoal i,
.login-characters.is-sorry .login-character.is-charcoal b {
  transform: scaleY(0.68);
}

.login-characters.is-look-away .login-character.is-purple i::after,
.login-characters.is-look-away .login-character.is-purple b::after,
.login-characters.is-look-away .login-character.is-charcoal i::after,
.login-characters.is-look-away .login-character.is-charcoal b::after {
  left: 1px;
  transform: translate(-3px, 0);
}

.login-characters.is-look-away .login-character.is-yellow i {
  transform: translateX(-8px);
}

.login-characters.is-look-away .login-character.is-yellow::after {
  right: -24px;
  width: 28px;
}

.login-cursor-shape {
  position: absolute;
  z-index: 7;
  display: none;
  right: -142px;
  top: 50%;
  width: 0;
  height: 0;
  border-top: 22px solid #17181d;
  border-right: 10px solid transparent;
  border-left: 10px solid transparent;
  transform: rotate(-45deg);
  opacity: 1;
  animation:
    loginCursorEnter 420ms cubic-bezier(0.22, 1, 0.36, 1) 820ms both,
    loginCursorTap 3.8s ease-in-out 1.24s infinite;
}

.login-cursor-shape::after {
  position: absolute;
  top: -3px;
  left: -1px;
  width: 4px;
  height: 25px;
  border-radius: 999px;
  background: #17181d;
  content: "";
  transform: rotate(45deg);
  transform-origin: top center;
}

.login-shell:has(.register-panel:not([hidden])) .login-cursor-shape {
  display: none;
}

@keyframes loginCharacterFloat {
  0%,
  100% {
    translate: 0 0;
    scale: 1 1;
  }
  50% {
    translate: 0 0;
    scale: 1.012 1.018;
  }
}

@keyframes loginStageIn {
  from {
    opacity: 0;
    scale: 0.98;
    filter: blur(8px);
  }
  to {
    opacity: 1;
    scale: 1;
    filter: blur(0);
  }
}

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

@keyframes loginFormColumnIn {
  from {
    opacity: 0;
    translate: 26px 0;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes loginCharacterEnter {
  from {
    opacity: 0;
    translate: var(--enter-x, 0) var(--enter-y, 0);
    scale: 0.78 0.72;
    filter: blur(5px);
  }
  68% {
    opacity: 1;
    translate: var(--settle-x, 0) var(--settle-y, 0);
    scale: 1.06 0.96;
    filter: blur(0);
  }
  to {
    opacity: 1;
    translate: 0 0;
    scale: 1;
    filter: blur(0);
  }
}

@keyframes loginCharacterTyping {
  0%,
  100% {
    translate: 0 0;
    scale: 1 1;
  }
  36% {
    translate: 0 0;
    scale: 1.035 0.965;
  }
  70% {
    translate: 0 -3px;
    scale: 0.982 1.026;
  }
}

@keyframes loginCharacterNod {
  0%,
  100% {
    translate: 0 0;
    scale: 1 1;
  }
  34% {
    translate: 0 0;
    scale: 1.02 0.97;
  }
  68% {
    translate: 0 0;
    scale: 0.99 1.02;
  }
}

@keyframes loginCharacterSorry {
  0%,
  100% {
    translate: 0 0;
    rotate: 0deg;
  }
  30% {
    translate: 0 0;
    rotate: -2deg;
  }
  64% {
    translate: 0 0;
    rotate: 1.5deg;
  }
}

@keyframes loginCursorEnter {
  from {
    opacity: 0;
    translate: 14px -10px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes loginCursorTap {
  0%,
  100% {
    transform: translate(0, 0) rotate(-45deg);
  }
  48% {
    transform: translate(-7px, 7px) rotate(-45deg);
  }
  58% {
    transform: translate(-4px, 4px) rotate(-45deg) scale(0.94);
  }
}

@media (max-width: 820px) {
  .login-screen {
    padding: 16px;
  }

  .login-shell {
    width: min(440px, 100%);
    height: auto;
    min-height: min(640px, calc(100vh - 32px));
    grid-template-columns: 1fr;
    background: #ffffff;
    box-shadow: 0 16px 46px rgba(15, 23, 42, 0.14);
  }

  .login-form-column {
    order: 1;
    padding: 30px 24px;
  }

  .login-showcase {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-character,
  .login-cursor-shape {
    animation: none !important;
  }
}

/* Night aquarium login scene. */
body:not(.is-authed) .app {
  background: #020617;
}

.login-screen {
  padding: clamp(18px, 4vw, 46px);
  background:
    radial-gradient(circle at 18% 14%, rgba(42, 87, 185, 0.24), transparent 28%),
    radial-gradient(circle at 82% 82%, rgba(38, 55, 129, 0.2), transparent 30%),
    linear-gradient(135deg, #020617 0%, #050b22 46%, #02040f 100%);
}

.login-shell {
  width: min(1100px, calc(100vw - 56px));
  height: min(680px, calc(100vh - 56px));
  min-height: 590px;
  grid-template-columns: minmax(0, 1.3fr) minmax(360px, 430px);
  overflow: hidden;
  border: 1px solid rgba(122, 153, 226, 0.28);
  border-radius: 28px;
  background: rgba(4, 10, 31, 0.88);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(178, 205, 255, 0.12);
}

.login-showcase {
  display: grid;
  gap: 0;
  padding: 0;
  overflow: hidden;
  color: #eff5ff;
  background:
    radial-gradient(circle at 22% 18%, rgba(41, 92, 190, 0.2), transparent 36%),
    linear-gradient(145deg, rgba(4, 15, 49, 0.96), rgba(2, 7, 24, 0.96));
  border-right: 1px solid rgba(122, 153, 226, 0.18);
}

.login-form-column {
  padding: 34px 38px;
  border-left: 0;
  background:
    radial-gradient(circle at 90% 16%, rgba(67, 103, 194, 0.12), transparent 34%),
    rgba(4, 9, 27, 0.82);
}

.login-panel .brand.large .brand-mark {
  background: rgba(16, 31, 69, 0.86);
  box-shadow: inset 0 0 0 1px rgba(129, 165, 236, 0.18);
}

.login-panel .brand strong,
.login-panel h1,
.register-panel .auth-flow-head h1,
.auth-flow-head h1 {
  color: #f2f6ff;
}

.login-panel .brand span,
.auth-flow-head p {
  color: #8c99b8;
}

#loginForm h1::after {
  color: #8794b5;
  content: "欢迎回来，猫咪正在守着鱼缸";
}

.login-panel .auth-tabs {
  background: rgba(16, 28, 61, 0.84);
  box-shadow: inset 0 0 0 1px rgba(124, 154, 218, 0.12);
}

.login-panel .auth-tabs::before {
  background: rgba(48, 72, 133, 0.72);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.24);
}

.login-panel .auth-tabs button,
.login-panel .field > span,
.register-panel .field > span,
.remember-password span,
.login-panel .text-btn {
  color: #8996b7;
}

.login-panel .auth-tabs button.active,
.login-panel .text-btn:hover {
  color: #f3f6ff;
}

.login-panel .field input,
.login-panel .code-row input,
.register-panel .field input,
.register-panel .code-row input,
.register-panel .field select {
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid rgba(125, 154, 216, 0.22);
  border-radius: 13px;
  background-color: rgba(13, 24, 55, 0.72);
  color: #edf4ff;
  box-shadow: inset 0 1px 0 rgba(194, 216, 255, 0.05);
}

#loginUser,
#loginPass,
#loginPhone,
#loginEmail,
#loginCode {
  padding-left: 13px;
}

.login-panel .field input:focus,
.login-panel .code-row input:focus,
.register-panel .field input:focus,
.register-panel .field select:focus,
.register-panel .code-row input:focus {
  border-color: rgba(112, 158, 255, 0.86);
  background-color: rgba(17, 32, 72, 0.88);
  box-shadow: 0 0 0 4px rgba(82, 127, 228, 0.14), inset 0 1px 0 rgba(194, 216, 255, 0.08);
}

.login-panel .field input.is-invalid {
  border-color: rgba(255, 112, 117, 0.86);
  animation: catLoginShake 360ms ease;
}

.login-panel .primary-btn.wide,
.auth-flow-actions .primary-btn.wide {
  background: linear-gradient(135deg, #3159b4, #4c7be0);
  box-shadow: 0 14px 30px rgba(32, 71, 165, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.login-panel .primary-btn.wide:hover,
.auth-flow-actions .primary-btn.wide:hover {
  background: linear-gradient(135deg, #3c67c7, #5a89ed);
  box-shadow: 0 18px 34px rgba(32, 71, 165, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.login-panel .primary-btn.wide.is-success {
  background: linear-gradient(135deg, #178870, #42b38e);
}

.auth-flow-actions .ghost-btn.wide,
.login-panel .ghost-btn {
  border-color: rgba(125, 154, 216, 0.22);
  background: rgba(13, 24, 55, 0.72);
  color: #a9b6d2;
}

.password-eye-btn:hover,
.password-eye-btn.is-visible {
  color: #edf4ff;
  background: rgba(71, 100, 169, 0.28);
}

.form-error {
  color: #ff9b9f;
}

.login-art {
  min-height: 100%;
  height: 100%;
  overflow: hidden;
  background: #03091d;
}

.login-characters,
.login-shell:has(.register-panel:not([hidden])) .login-characters {
  position: absolute;
  inset: 0;
  transform: none;
  transform-origin: 50% 50%;
}

.cat-aquarium-svg {
  display: none;
  width: 100%;
  height: 100%;
}

.cat-night-stars {
  display: none;
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
}

.cat-night-stars i {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #d9e6ff;
  box-shadow: 0 0 9px rgba(173, 203, 255, 0.72);
  animation: catStarTwinkle 3.8s ease-in-out infinite;
}

.cat-night-stars i:nth-child(1) { left: 18%; top: 18%; }
.cat-night-stars i:nth-child(2) { left: 39%; top: 11%; animation-delay: -1.2s; }
.cat-night-stars i:nth-child(3) { left: 58%; top: 19%; animation-delay: -2.4s; }
.cat-night-stars i:nth-child(4) { left: 81%; top: 13%; animation-delay: -.7s; }
.cat-night-stars i:nth-child(5) { left: 70%; top: 35%; animation-delay: -1.9s; }
.cat-night-stars i:nth-child(6) { left: 12%; top: 38%; animation-delay: -2.8s; }
.cat-night-stars i:nth-child(7) { left: 48%; top: 30%; animation-delay: -3.3s; }
.cat-night-stars i:nth-child(8) { left: 90%; top: 43%; animation-delay: -1.5s; }

.cat-pose {
  opacity: 0;
  pointer-events: none;
  transform-origin: 520px 430px;
  transition: opacity 420ms ease, transform 480ms cubic-bezier(0.22, 1, 0.36, 1);
}

.cat-scene:not(.is-watch-user):not(.is-watch-pass):not(.is-watch-code):not(.is-success):not(.is-look-away) .cat-sleeping,
.cat-scene.is-watch-user .cat-attentive,
.cat-scene.is-look-away .cat-attentive,
.cat-scene.is-watch-pass .cat-stirring,
.cat-scene.is-watch-code .cat-stirring,
.cat-scene.is-success .cat-happy {
  opacity: 1;
}

.cat-scene:not(.is-watch-user):not(.is-watch-pass):not(.is-watch-code):not(.is-success):not(.is-look-away) .cat-sleeping {
  animation: catSleepBreath 3.8s ease-in-out infinite;
}

.cat-scene.is-watch-user .cat-attentive,
.cat-scene.is-look-away .cat-attentive {
  animation: catSitBreathe 4.4s ease-in-out infinite;
}

.cat-scene.is-watch-pass .cat-stirring,
.cat-scene.is-watch-code .cat-stirring {
  animation: catSitBreathe 4.4s ease-in-out infinite;
}

.cat-scene.is-watch-pass .cat-stirring-paw,
.cat-scene.is-watch-code .cat-stirring-paw,
.cat-scene.is-watch-pass .cat-stirring-paw-tip,
.cat-scene.is-watch-code .cat-stirring-paw-tip {
  animation: catPawStir 2.2s ease-in-out infinite;
  transform-origin: 388px 198px;
}

.cat-ripples {
  opacity: 0;
  transform-origin: 388px 198px;
}

.cat-scene.is-watch-pass .cat-ripples,
.cat-scene.is-watch-code .cat-ripples {
  animation: catRipple 2.2s ease-out infinite;
}

.cat-fish {
  transform-box: fill-box;
  transform-origin: center;
}

.cat-fish-one {
  animation: catFishSwimOne 8s ease-in-out infinite;
}

.cat-fish-two {
  animation: catFishSwimTwo 10s ease-in-out infinite;
}

.cat-fish-three {
  animation: catFishSwimThree 7s ease-in-out infinite;
}

.cat-bubbles {
  animation: catBubblesRise 6s linear infinite;
}

.cat-seaweed {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: catSeaweedSway 4.8s ease-in-out infinite alternate;
}

.cat-seaweed-right {
  animation-delay: -2.1s;
}

.cat-success-glow {
  opacity: 0;
  transition: opacity 380ms ease;
}

.cat-scene.is-success .cat-success-glow {
  opacity: 1;
}

.cat-scene.is-success .cat-happy {
  animation: catHappyBounce 680ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cat-scene.is-sorry .cat-pose {
  animation: catLoginShake 420ms ease;
}

.cat-success-particles {
  position: absolute;
  z-index: 5;
  left: 11%;
  bottom: 23%;
  width: 52%;
  height: 54%;
  pointer-events: none;
}

.cat-raster-poses {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: none;
  overflow: hidden;
  background: #03091d;
}

.cat-animated-stage {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  background: #03091d;
}

.cat-aquarium-background {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
}

.cat-animated-sprite {
  position: absolute;
  z-index: 2;
  left: 36%;
  top: 39%;
  width: 53%;
  height: auto;
  display: block;
  transform-origin: 50% 88%;
  filter: drop-shadow(0 16px 12px rgba(0, 0, 0, .24));
  transition: filter 320ms ease, opacity 320ms ease;
}

.cat-scene:not(.is-watch-user):not(.is-watch-pass):not(.is-watch-code):not(.is-success):not(.is-look-away) .cat-animated-sprite {
  animation: catAnimatedIdle 3.2s ease-in-out infinite;
}

.cat-scene.is-watch-user .cat-animated-sprite,
.cat-scene.is-look-away .cat-animated-sprite {
  animation: catAnimatedAttentive 2.4s ease-in-out infinite;
}

.cat-scene.is-watch-pass .cat-animated-sprite,
.cat-scene.is-watch-code .cat-animated-sprite {
  animation: catAnimatedPassword 1.7s ease-in-out infinite;
}

.cat-scene.is-success .cat-animated-sprite {
  animation: catAnimatedSuccess 1.05s cubic-bezier(.22, 1, .36, 1) infinite;
  filter:
    drop-shadow(0 16px 12px rgba(0, 0, 0, .22))
    drop-shadow(0 0 14px rgba(255, 205, 77, .24));
}

.cat-scene.is-transitioning .cat-animated-sprite {
  opacity: .82;
  filter:
    drop-shadow(0 16px 12px rgba(0, 0, 0, .2))
    brightness(1.08);
}

.cat-raster-pose {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  opacity: 0;
  filter: saturate(.94) brightness(.94) blur(2px);
  transform: scale(1.025);
  transition:
    opacity 860ms ease,
    filter 860ms ease,
    transform 1200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.cat-scene:not(.is-watch-user):not(.is-watch-pass):not(.is-watch-code):not(.is-success):not(.is-look-away) .cat-raster-idle,
.cat-scene.is-watch-user .cat-raster-username,
.cat-scene.is-look-away .cat-raster-username,
.cat-scene.is-watch-pass .cat-raster-password,
.cat-scene.is-watch-code .cat-raster-password,
.cat-scene.is-success .cat-raster-success {
  opacity: 1;
  filter: saturate(1) brightness(1) blur(0);
  transform: scale(1);
}

.cat-scene:not(.is-watch-user):not(.is-watch-pass):not(.is-watch-code):not(.is-success):not(.is-look-away) .cat-raster-idle {
  animation: catRasterIdleBreath 5.8s ease-in-out infinite;
}

.cat-scene.is-watch-user .cat-raster-username,
.cat-scene.is-look-away .cat-raster-username {
  animation: catRasterAttentive 5s ease-in-out infinite;
}

.cat-scene.is-watch-pass .cat-raster-password,
.cat-scene.is-watch-code .cat-raster-password {
  animation: catRasterPassword 3.6s ease-in-out infinite;
}

.cat-scene.is-success .cat-raster-success {
  animation: catRasterSuccess 4.2s ease-in-out infinite;
}

.cat-motion-layer {
  position: absolute;
  z-index: 3;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.cat-water-glint {
  position: absolute;
  left: 12.5%;
  top: 47.5%;
  width: 34%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(172, 224, 255, .76), transparent);
  opacity: .54;
  transform-origin: 50% 50%;
  animation: catWaterGlint 4.6s ease-in-out infinite;
}

.cat-water-glint.secondary {
  left: 16%;
  top: 50.5%;
  width: 27%;
  opacity: .24;
  animation-delay: -2.1s;
}

.cat-motion-bubble {
  position: absolute;
  bottom: 36%;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(180, 229, 255, .74);
  border-radius: 50%;
  box-shadow: inset 0 0 4px rgba(165, 221, 255, .34), 0 0 8px rgba(69, 155, 239, .18);
  opacity: 0;
  animation: catMotionBubble 6.4s linear infinite;
}

.cat-motion-bubble.bubble-a { left: 19%; animation-delay: -1s; }
.cat-motion-bubble.bubble-b { left: 27%; width: 5px; height: 5px; animation-delay: -3.5s; }
.cat-motion-bubble.bubble-c { left: 36%; width: 8px; height: 8px; animation-delay: -4.7s; }
.cat-motion-bubble.bubble-d { left: 41%; width: 4px; height: 4px; animation-delay: -2.2s; }

.cat-motion-fish {
  position: absolute;
  left: 20%;
  top: 56%;
  width: 17px;
  height: 9px;
  border-radius: 58% 48% 48% 58%;
  background: rgba(255, 171, 65, .56);
  box-shadow: 0 0 8px rgba(255, 174, 69, .18);
  opacity: .74;
  animation: catMotionFish 7.4s linear infinite;
}

.cat-motion-fish::before {
  position: absolute;
  left: -7px;
  top: 1px;
  width: 8px;
  height: 7px;
  background: inherit;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  content: "";
}

.cat-motion-fish::after {
  position: absolute;
  right: 3px;
  top: 2px;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(7, 29, 66, .78);
  content: "";
}

.cat-motion-fish.fish-b {
  left: 33%;
  top: 63%;
  scale: .72;
  background: rgba(94, 169, 255, .56);
  animation-delay: -3.8s;
}

.cat-motion-ripple {
  position: absolute;
  left: 39%;
  top: 47%;
  width: 56px;
  height: 13px;
  border: 1px solid rgba(185, 226, 255, .72);
  border-radius: 50%;
  opacity: 0;
  transform: scale(.58);
}

.cat-scene.is-watch-pass .cat-motion-ripple,
.cat-scene.is-watch-code .cat-motion-ripple {
  animation: catMotionRipple 2.1s ease-out infinite;
}

.cat-scene.is-watch-pass .cat-motion-ripple.ripple-b,
.cat-scene.is-watch-code .cat-motion-ripple.ripple-b {
  animation-delay: 1.05s;
}

.cat-scene.is-watch-pass .cat-water-glint,
.cat-scene.is-watch-code .cat-water-glint {
  opacity: .78;
  animation-duration: 2.1s;
}

.cat-success-particles i {
  position: absolute;
  bottom: 8%;
  color: #ffd45d;
  font-size: var(--star-size, 18px);
  font-style: normal;
  line-height: 1;
  text-shadow: 0 0 12px rgba(255, 210, 68, 0.92);
  animation: catSuccessStar var(--star-duration, 2.4s) ease-out forwards;
}

.cat-aquarium {
  animation: catAquariumFloat 6.8s ease-in-out infinite;
  transform-origin: 250px 330px;
}

.cat-aquarium g[clip-path] > ellipse:first-of-type {
  animation: catWaterSurface 4.2s ease-in-out infinite;
  transform-origin: 250px 226px;
}

.cat-scene.is-watch-pass .cat-aquarium g[clip-path] > ellipse:first-of-type,
.cat-scene.is-watch-code .cat-aquarium g[clip-path] > ellipse:first-of-type {
  animation-duration: 1.8s;
}

.cat-bowl-foreground {
  opacity: .92;
}

.cat-login-success-toast {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: 70px;
  display: none;
  align-items: center;
  gap: 12px;
  min-width: 238px;
  padding: 16px 20px;
  border: 1px solid rgba(141, 255, 207, 0.32);
  border-radius: 18px;
  color: #dfffee;
  background:
    linear-gradient(135deg, rgba(22, 124, 104, 0.74), rgba(21, 77, 93, 0.64)),
    rgba(9, 30, 38, 0.72);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.32),
    0 0 34px rgba(63, 220, 160, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 18px) scale(.96);
  transition: opacity 320ms ease, transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.cat-login-success-toast i {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #08392e;
  font-size: 18px;
  font-style: normal;
  font-weight: 900;
  background: linear-gradient(135deg, #8dffd1, #37cda2);
  box-shadow: 0 0 22px rgba(91, 239, 187, 0.42);
}

.cat-login-success-toast span {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .01em;
}

.cat-scene.is-success .cat-login-success-toast {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.login-visual-caption {
  position: absolute;
  z-index: 6;
  right: 24px;
  bottom: 20px;
  display: grid;
  max-width: 300px;
  gap: 4px;
  text-align: right;
}

.login-visual-caption strong {
  color: #eff5ff;
  font-size: 17px;
}

.login-visual-caption span {
  color: #8c9bc1;
  font-size: 12px;
}

@keyframes catSleepBreath {
  0%, 100% { transform: translateY(0) scaleY(1); }
  50% { transform: translateY(-3px) scaleY(1.018); }
}

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

@keyframes catPawStir {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-3px, 2px) rotate(-3deg); }
}

@keyframes catRipple {
  0% { opacity: .72; transform: scale(.72); }
  82%, 100% { opacity: 0; transform: scale(1.24); }
}

@keyframes catFishSwimOne {
  0%, 100% { translate: -10px 0; }
  50% { translate: 22px -5px; }
}

@keyframes catFishSwimTwo {
  0%, 100% { translate: 18px 0; }
  50% { translate: -18px 7px; }
}

@keyframes catFishSwimThree {
  0%, 100% { translate: -6px 0; }
  50% { translate: 16px 4px; }
}

@keyframes catBubblesRise {
  0% { translate: 0 24px; opacity: 0; }
  18% { opacity: .82; }
  82% { opacity: .72; }
  100% { translate: 0 -48px; opacity: 0; }
}

@keyframes catSeaweedSway {
  from { transform: rotate(-2deg); }
  to { transform: rotate(4deg); }
}

@keyframes catHappyBounce {
  0% { transform: translateY(8px) scale(.96); }
  58% { transform: translateY(-8px) scale(1.02); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes catSuccessStar {
  0% { opacity: 0; transform: translate(0, 18px) scale(.55) rotate(0deg); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--star-drift, 0), -230px) scale(1.2) rotate(150deg); }
}

@keyframes catRasterIdleBreath {
  0%, 100% { transform: scale(1); filter: saturate(1) brightness(1); }
  50% { transform: scale(1.012) translateY(-2px); filter: saturate(1.02) brightness(1.025); }
}

@keyframes catRasterAttentive {
  0%, 100% { transform: scale(1); filter: saturate(1) brightness(1); }
  50% { transform: scale(1.01) translateY(-3px); filter: saturate(1.025) brightness(1.025); }
}

@keyframes catRasterPassword {
  0%, 100% { transform: scale(1); filter: saturate(1) brightness(1); }
  50% { transform: scale(1.012) translate(-2px, -2px); filter: saturate(1.04) brightness(1.035); }
}

@keyframes catRasterSuccess {
  0%, 100% { transform: scale(1); filter: saturate(1.03) brightness(1.04); }
  50% { transform: scale(1.014) translateY(-3px); filter: saturate(1.14) brightness(1.12); }
}

@keyframes catAnimatedIdle {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-2px) scale(1.006); }
}

@keyframes catAnimatedAttentive {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-3px) rotate(-.6deg); }
}

@keyframes catAnimatedPassword {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-4px, -3px) rotate(-1deg); }
}

@keyframes catAnimatedSuccess {
  0%, 100% { transform: translateY(0) scale(1); }
  48% { transform: translateY(-10px) scale(1.025); }
}

@keyframes catWaterGlint {
  0%, 100% { opacity: .28; transform: translateX(-8px) scaleX(.86); }
  50% { opacity: .74; transform: translateX(10px) scaleX(1.06); }
}

@keyframes catMotionBubble {
  0% { opacity: 0; transform: translate(0, 28px) scale(.72); }
  18% { opacity: .74; }
  78% { opacity: .58; }
  100% { opacity: 0; transform: translate(9px, -130px) scale(1.08); }
}

@keyframes catMotionFish {
  0% { opacity: .32; transform: translate(-34px, 4px) scaleX(1); }
  46% { opacity: .84; transform: translate(74px, -7px) scaleX(1); }
  50% { opacity: .72; transform: translate(78px, -7px) scaleX(-1); }
  96% { opacity: .78; transform: translate(-30px, 4px) scaleX(-1); }
  100% { opacity: .32; transform: translate(-34px, 4px) scaleX(1); }
}

@keyframes catMotionRipple {
  0% { opacity: .82; transform: translate(-50%, -50%) scale(.56); }
  90%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.52); }
}

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

@keyframes catWaterSurface {
  0%, 100% { transform: translateY(0) scaleX(1); opacity: .65; }
  50% { transform: translateY(2px) scaleX(1.025); opacity: .78; }
}

@keyframes catStarTwinkle {
  0%, 100% { opacity: .28; transform: scale(.7); }
  50% { opacity: 1; transform: scale(1.18); }
}

@keyframes catLoginShake {
  0%, 100% { translate: 0 0; }
  30% { translate: -6px 0; }
  62% { translate: 5px 0; }
}

@media (max-width: 820px) {
  .login-shell {
    width: min(440px, 100%);
    height: auto;
    min-height: min(640px, calc(100vh - 32px));
    grid-template-columns: 1fr;
    background: rgba(4, 9, 27, 0.96);
  }

  .login-form-column {
    order: 1;
    padding: 30px 24px;
  }

  .login-showcase {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cat-night-stars i,
  .cat-aquarium,
  .cat-aquarium g[clip-path] > ellipse:first-of-type,
  .cat-pose,
  .cat-ripples,
  .cat-fish,
  .cat-bubbles,
  .cat-seaweed,
  .cat-raster-pose,
  .cat-animated-sprite,
  .cat-water-glint,
  .cat-motion-bubble,
  .cat-motion-fish,
  .cat-motion-ripple,
  .cat-success-particles i {
    animation: none !important;
  }
}

/* Final reference-aligned white line-art login. */
body:not(.is-authed) .app {
  display: block;
  min-height: 100vh;
  background: #fbfdff;
}

.login-screen {
  display: grid;
  place-items: center;
  padding: clamp(24px, 3.2vw, 48px) !important;
  background:
    radial-gradient(circle at 18% 25%, rgba(223, 235, 255, .34), transparent 30%),
    radial-gradient(circle at 78% 72%, rgba(233, 241, 255, .42), transparent 28%),
    #fbfdff !important;
}

.login-shell {
  width: min(1340px, calc(100vw - 64px)) !important;
  height: min(840px, calc(100vh - 64px)) !important;
  min-height: 660px !important;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(430px, 520px) !important;
  gap: clamp(28px, 4vw, 62px);
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.login-showcase {
  order: 1 !important;
  display: block !important;
  min-width: 0;
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  background: transparent !important;
}

.login-form-column {
  order: 2 !important;
  display: grid;
  align-items: center;
  min-height: 0;
  padding: clamp(32px, 4vw, 52px) !important;
  overflow: auto;
  border: 1px solid rgba(91, 143, 255, .43) !important;
  border-radius: 30px !important;
  background: rgba(255, 255, 255, .84) !important;
  box-shadow: 0 20px 64px rgba(51, 102, 191, .06) !important;
}

.login-form-column:has(.register-panel:not([hidden])) {
  padding: 24px 32px !important;
}

.login-panel,
.register-panel {
  width: 100%;
  max-width: none;
  gap: 14px;
}

.login-panel .brand {
  justify-self: start;
  margin: 0 0 16px;
}

.login-panel .brand.large .brand-mark {
  width: 58px;
  height: 58px;
  border: 1px solid rgba(80, 139, 255, .58) !important;
  border-radius: 16px;
  background: #ffffff !important;
  box-shadow: none !important;
}

.login-panel .brand strong {
  color: #121a2a !important;
  font-size: 18px;
  font-weight: 760;
}

.login-panel .brand span,
.auth-flow-head p {
  color: #536582 !important;
  font-size: 14px;
}

.login-kicker {
  display: none !important;
}

.login-panel h1,
.register-panel .auth-flow-head h1,
.auth-flow-head h1 {
  color: #101827 !important;
}

#loginForm h1 {
  margin: 10px 0 18px;
  font-size: clamp(38px, 4vw, 52px);
  font-weight: 820;
  letter-spacing: .12em;
  text-align: center;
}

#loginForm h1::after {
  display: block;
  margin-top: 9px;
  color: #5b6d8c !important;
  content: "欢迎回来，猫咪正在守着鱼缸~" !important;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .03em;
}

.login-panel .auth-tabs {
  height: 54px;
  padding: 3px;
  border: 1px solid rgba(80, 139, 255, .45) !important;
  border-radius: 15px;
  background: #f8fbff !important;
  box-shadow: none !important;
}

.login-panel .auth-tabs::before {
  top: 3px;
  left: 3px;
  width: calc((100% - 6px) / 2);
  height: calc(100% - 6px);
  border: 1px solid rgba(80, 139, 255, .34) !important;
  border-radius: 12px;
  background: #ffffff !important;
  box-shadow: 0 4px 14px rgba(56, 122, 244, .08) !important;
}

.login-panel .auth-tabs button {
  min-height: 46px;
  color: #536582 !important;
  font-size: 16px;
  font-weight: 680;
}

.login-panel .auth-tabs button.active,
.login-panel .text-btn,
.login-panel .text-btn:hover {
  color: #2473ef !important;
}

.login-panel .field {
  gap: 7px;
}

.login-panel .field > span,
.register-panel .field > span,
.remember-password span {
  color: #536582 !important;
  font-size: 14px;
}

.login-panel .field input,
.login-panel .code-row input,
.register-panel .field input,
.register-panel .code-row input,
.register-panel .field select {
  min-height: 56px;
  padding: 0 16px;
  border: 1px solid rgba(80, 139, 255, .56) !important;
  border-radius: 15px;
  background-color: #ffffff !important;
  color: #23314c !important;
  box-shadow: none !important;
}

#loginUser,
#loginPass,
#loginPhone,
#loginEmail,
#loginCode {
  padding-left: 16px;
}

.login-panel .field input:focus,
.login-panel .code-row input:focus,
.register-panel .field input:focus,
.register-panel .field select:focus,
.register-panel .code-row input:focus {
  border-color: #4a91ff !important;
  background-color: #ffffff !important;
  box-shadow: 0 0 0 4px rgba(74, 145, 255, .12) !important;
}

.login-panel .primary-btn.wide,
.auth-flow-actions .primary-btn.wide {
  min-height: 58px;
  border: 1px solid #2d7bf0;
  border-radius: 15px;
  background: linear-gradient(135deg, #4d8cff, #68a0ff) !important;
  color: #ffffff;
  font-size: 17px;
  box-shadow: 0 12px 22px rgba(74, 140, 255, .18) !important;
}

.login-panel .primary-btn.wide:hover,
.auth-flow-actions .primary-btn.wide:hover {
  background: linear-gradient(135deg, #3e80f3, #5b98ff) !important;
  box-shadow: 0 14px 26px rgba(74, 140, 255, .24) !important;
}

.auth-flow-actions .ghost-btn.wide,
.login-panel .ghost-btn {
  border-color: rgba(80, 139, 255, .42) !important;
  background: #ffffff !important;
  color: #3779e8 !important;
}

.password-eye-btn:hover,
.password-eye-btn.is-visible {
  color: #3779e8;
  background: rgba(80, 139, 255, .1);
}

.login-panel .auth-footer {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 4px;
  text-align: center;
}

.login-panel .auth-footer span {
  display: none;
}

.login-panel .auth-footer .text-btn:first-child {
  min-height: 56px;
  border: 1px solid rgba(80, 139, 255, .43);
  border-radius: 15px;
  background: #ffffff;
}

.login-panel .auth-footer .text-btn:first-child::before {
  content: "●●";
  display: inline-block;
  margin-right: 10px;
  color: #4c86ef;
  font-size: 12px;
  letter-spacing: -5px;
  transform: translateY(-1px);
}

.login-art {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: visible;
  background: transparent !important;
}

.login-characters,
.login-shell:has(.register-panel:not([hidden])) .login-characters {
  position: absolute;
  inset: 0;
  transform: none;
}

.line-cat-login-svg {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: block !important;
  overflow: visible;
  color: #111820;
}

.line-raster-stage,
.cat-aquarium-svg,
.cat-animated-stage,
.cat-raster-poses,
.cat-motion-layer,
.login-art-glow,
.login-visual-caption {
  display: none !important;
}

.cat-night-stars {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block !important;
  pointer-events: none;
}

.cat-night-stars i {
  position: absolute;
  width: auto;
  height: auto;
  color: #8aa5d4;
  background: transparent;
  box-shadow: none;
  font-size: 19px;
  font-style: normal;
  line-height: 1;
  animation: lineStarTwinkle 3.6s ease-in-out infinite;
}

.cat-night-stars i::before {
  content: "✦";
}

.cat-night-stars i:nth-child(1) { left: 14%; top: 16%; }
.cat-night-stars i:nth-child(2) { left: 38%; top: 11%; animation-delay: -1.2s; }
.cat-night-stars i:nth-child(3) { left: 62%; top: 17%; animation-delay: -2.4s; }
.cat-night-stars i:nth-child(4) { left: 81%; top: 23%; animation-delay: -.7s; }
.cat-night-stars i:nth-child(5) { left: 69%; top: 38%; animation-delay: -1.9s; }
.cat-night-stars i:nth-child(6) { left: 18%; top: 36%; animation-delay: -2.8s; }
.cat-night-stars i:nth-child(7) { left: 48%; top: 28%; animation-delay: -3.3s; }
.cat-night-stars i:nth-child(8) { left: 91%; top: 43%; animation-delay: -1.5s; }

.line-decoration {
  stroke-width: 2.4;
}

.line-decoration > * {
  transform-box: fill-box;
  transform-origin: center;
  animation: lineStarTwinkle 3.4s ease-in-out infinite;
}

.line-decoration > *:nth-child(2) {
  animation-delay: -1.4s;
}

.line-decoration > *:nth-child(3) {
  animation-delay: -2.3s;
}

.line-ground {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2.3;
}

.line-bowl {
  stroke-width: 2.6;
}

.line-pebbles {
  stroke-width: 2.1;
}

.line-bubbles {
  animation: lineBubblesRise 4.8s ease-in-out infinite;
  transform-origin: 220px 320px;
}

.line-fish {
  stroke-width: 2.2;
  transform-box: fill-box;
  transform-origin: center;
}

.line-fish-one {
  animation: lineFishOne 6.6s ease-in-out infinite;
}

.line-fish-two {
  animation: lineFishTwo 8.2s ease-in-out infinite;
}

.line-fish-three {
  animation: lineFishThree 5.8s ease-in-out infinite;
}

.line-cat-walker {
  stroke-width: 3;
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: lineCatWalkRoute 12s ease-in-out infinite;
}

.line-cat-head {
  fill: #ffffff;
}

.line-cat-normal {
  animation: lineCatNormalPose 12s steps(1, end) infinite;
}

.line-cat-stretch {
  display: block !important;
  opacity: 0;
  animation: lineCatStretchPose 12s steps(1, end) infinite;
}

.line-cat-ear,
.line-cat-tail,
.line-cat-leg {
  transform-box: fill-box;
}

.line-cat-ear {
  transform-origin: center bottom;
  animation: lineCatEarTwitch 3.4s ease-in-out infinite;
}

.line-cat-ear-right {
  animation-delay: -1.7s;
}

.line-cat-tail {
  transform-origin: left center;
  animation: lineCatTailSway 1.7s ease-in-out infinite;
}

.line-cat-leg {
  transform-origin: center bottom;
}

.line-cat-leg-one,
.line-cat-leg-three {
  animation: lineCatStepA .76s ease-in-out infinite;
}

.line-cat-leg-two,
.line-cat-leg-four {
  animation: lineCatStepB .76s ease-in-out infinite;
}

.cat-scene.is-watch-pass .line-cat-normal,
.cat-scene.is-watch-code .line-cat-normal,
.cat-scene.is-password-active .line-cat-normal {
  display: none !important;
}

.cat-scene.is-watch-pass .line-cat-stretch,
.cat-scene.is-watch-code .line-cat-stretch,
.cat-scene.is-password-active .line-cat-stretch {
  display: block !important;
  opacity: 1;
  animation: lineCatStretchPulse 1.7s ease-in-out infinite;
  transform-origin: 510px 444px;
}

.cat-scene.is-watch-pass .line-cat-walker,
.cat-scene.is-watch-code .line-cat-walker,
.cat-scene.is-password-active .line-cat-walker {
  animation-play-state: paused;
}

.cat-scene.is-sorry .line-cat-walker {
  animation: lineCatBodySorry 420ms ease-in-out 3;
}

.cat-scene.is-sorry .line-cat-head {
  animation: lineCatHeadNo 320ms ease-in-out 4;
  transform-box: fill-box;
  transform-origin: center;
}

.cat-scene.is-success .line-cat-walker {
  animation-play-state: paused;
}

.cat-scene.is-success .line-cat-tail {
  animation: lineCatTailHappy 540ms ease-in-out infinite;
}

@keyframes lineCatWalkRoute {
  0% { transform: translateX(-52px) scaleX(1); }
  35% { transform: translateX(70px) scaleX(1); }
  43% { transform: translateX(70px) scaleX(1); }
  44% { transform: translateX(70px) scaleX(-1); }
  58% { transform: translateX(70px) scaleX(-1); }
  92% { transform: translateX(-52px) scaleX(-1); }
  100% { transform: translateX(-52px) scaleX(-1); }
}

@keyframes lineCatNormalPose {
  0%, 42% { opacity: 1; }
  43%, 58% { opacity: 0; }
  59%, 100% { opacity: 1; }
}

@keyframes lineCatStretchPose {
  0%, 42% { opacity: 0; }
  43%, 58% { opacity: 1; }
  59%, 100% { opacity: 0; }
}

@keyframes lineCatStretchPulse {
  0%, 100% { transform: translate(0, 0) scaleX(1); }
  50% { transform: translate(-14px, 4px) scaleX(1.045); }
}

@keyframes lineCatEarTwitch {
  0%, 72%, 100% { transform: rotate(0); }
  80% { transform: rotate(-6deg); }
  90% { transform: rotate(4deg); }
}

@keyframes lineCatTailSway {
  0%, 100% { transform: rotate(-7deg); }
  50% { transform: rotate(10deg); }
}

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

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

@keyframes lineStarTwinkle {
  0%, 100% { opacity: .18; transform: scale(.72) rotate(0deg); }
  50% { opacity: .9; transform: scale(1.14) rotate(12deg); }
}

@media (max-width: 920px) {
  .login-screen {
    padding: 16px !important;
  }

  .login-shell {
    width: min(520px, 100%) !important;
    height: auto !important;
    min-height: min(700px, calc(100vh - 32px)) !important;
    grid-template-columns: 1fr !important;
  }

  .login-form-column {
    order: 1 !important;
    padding: 30px 24px !important;
    border-radius: 24px !important;
  }

  .login-showcase {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .line-cat-walker,
  .line-cat-normal,
  .line-cat-stretch,
  .line-cat-ear,
  .line-cat-tail,
  .line-cat-leg,
  .line-fish,
  .line-bubbles,
  .cat-night-stars i,
  .line-decoration > * {
    animation: none !important;
  }
}

/* Restored blue-white login layout and authenticated-state guard. */
body.is-authed #loginScreen {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body:not(.is-authed) .app {
  display: block !important;
  min-height: 100vh;
  background: #f7fbff !important;
}

body:not(.is-authed) .login-screen {
  display: grid !important;
  place-items: center;
  min-height: 100vh;
  padding: clamp(20px, 5vw, 66px) !important;
  overflow: hidden;
  background:
    radial-gradient(circle at 22% 18%, rgba(214, 231, 255, .42), transparent 31%),
    radial-gradient(circle at 79% 20%, rgba(226, 238, 255, .58), transparent 30%),
    linear-gradient(135deg, #fbfdff 0%, #f5f9ff 52%, #ffffff 100%) !important;
}

body:not(.is-authed) .login-shell {
  width: min(1150px, calc(100vw - 64px)) !important;
  height: min(700px, calc(100vh - 80px)) !important;
  min-height: 620px !important;
  display: grid !important;
  grid-template-columns: minmax(430px, .76fr) minmax(0, 1fr) !important;
  gap: 0 !important;
  overflow: hidden !important;
  border: 1px solid rgba(156, 190, 242, .42) !important;
  border-radius: 34px !important;
  background: rgba(255, 255, 255, .78) !important;
  box-shadow: 0 26px 80px rgba(50, 93, 160, .12) !important;
  backdrop-filter: blur(18px);
}

body:not(.is-authed) .login-form-column {
  order: 1 !important;
  display: grid !important;
  align-items: center;
  min-height: 0;
  padding: 32px 42px !important;
  overflow: auto;
  border: 0 !important;
  border-right: 1px solid rgba(156, 190, 242, .35) !important;
  background: rgba(255, 255, 255, .72) !important;
  box-shadow: none !important;
}

body:not(.is-authed) .login-showcase {
  order: 2 !important;
  position: relative;
  display: grid !important;
  place-items: center;
  min-width: 0;
  min-height: 0;
  padding: clamp(40px, 7vw, 92px) !important;
  overflow: hidden !important;
  border: 0 !important;
  background:
    radial-gradient(circle at 53% 37%, rgba(84, 143, 242, .13), transparent 32%),
    radial-gradient(circle at 72% 61%, rgba(108, 179, 245, .13), transparent 28%),
    rgba(255, 255, 255, .38) !important;
}

body:not(.is-authed) .login-showcase::before,
body:not(.is-authed) .login-showcase::after,
body:not(.is-authed) .login-art::before,
body:not(.is-authed) .login-art::after {
  content: "";
  position: absolute;
  display: block !important;
  pointer-events: none;
}

body:not(.is-authed) .login-showcase::before {
  width: min(340px, 52%);
  aspect-ratio: 1.32;
  left: 17%;
  top: 24%;
  border: 1px solid rgba(133, 177, 238, .48);
  border-radius: 22px;
  background:
    linear-gradient(#e8f2ff, #e8f2ff) 34px 82px / 238px 11px no-repeat,
    linear-gradient(90deg, #7f9dec, #6fc4ed) 34px 82px / 238px 11px no-repeat,
    linear-gradient(#a7c6f7, #a7c6f7) 34px 112px / 204px 11px no-repeat,
    linear-gradient(#bfd8fa, #bfd8fa) 34px 142px / 170px 11px no-repeat,
    linear-gradient(#dceafa, #dceafa) 0 46px / 100% 1px no-repeat,
    rgba(255, 255, 255, .62);
  box-shadow: 0 24px 62px rgba(64, 112, 189, .08);
}

body:not(.is-authed) .login-showcase::after {
  width: min(190px, 32%);
  aspect-ratio: 1.32;
  right: 13%;
  top: 49%;
  border: 1px solid rgba(133, 177, 238, .48);
  border-radius: 20px;
  background:
    linear-gradient(#91c9f7, #91c9f7) 28px 42px / 138px 12px no-repeat,
    linear-gradient(#c3ddfa, #c3ddfa) 28px 78px / 98px 12px no-repeat,
    linear-gradient(#c3ddfa, #c3ddfa) 28px 108px / 72px 12px no-repeat,
    rgba(255, 255, 255, .58);
}

body:not(.is-authed) .login-art {
  position: absolute;
  inset: 0;
  min-height: 100%;
  overflow: visible;
  background: transparent !important;
}

body:not(.is-authed) .login-art::before {
  width: 132px;
  height: 132px;
  left: 44%;
  top: 32%;
  border: 1px solid rgba(133, 177, 238, .48);
  border-radius: 40px;
  background: rgba(255, 255, 255, .86) url("./assets/logo.png?v=20260529-logo-2") center / 58px 58px no-repeat;
  box-shadow: 0 22px 56px rgba(64, 112, 189, .11);
  transform: translate(-50%, -50%);
}

body:not(.is-authed) .login-art::after {
  width: 54px;
  height: 46px;
  left: 61%;
  top: 52%;
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 58%, #d7eaff 4px, transparent 5px),
    linear-gradient(#ffffff, #ffffff) 24px 22px / 6px 16px no-repeat,
    linear-gradient(135deg, #5a8df3, #4d7cea);
  box-shadow: 0 16px 36px rgba(66, 113, 221, .28);
  transform: translate(-50%, -50%);
}

body:not(.is-authed) .login-characters,
body:not(.is-authed) .line-cat-login-svg,
body:not(.is-authed) .line-raster-stage,
body:not(.is-authed) .cat-aquarium-svg,
body:not(.is-authed) .cat-animated-stage,
body:not(.is-authed) .cat-raster-poses,
body:not(.is-authed) .cat-motion-layer,
body:not(.is-authed) .login-art-glow {
  display: none !important;
}

body:not(.is-authed) .login-visual-caption {
  position: absolute;
  left: 50%;
  bottom: 28px;
  display: grid !important;
  gap: 6px;
  width: min(360px, 76%);
  margin: 0;
  color: #7c8da8;
  text-align: center;
  transform: translateX(-50%);
}

body:not(.is-authed) .login-visual-caption strong {
  color: #172033 !important;
  font-size: 22px;
  font-weight: 820;
}

body:not(.is-authed) .login-visual-caption span {
  color: #8a94a6 !important;
  font-size: 14px;
}

body:not(.is-authed) .login-panel,
body:not(.is-authed) .register-panel {
  width: min(100%, 402px) !important;
  max-width: 402px !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 16px !important;
  background: transparent !important;
  box-shadow: none !important;
}

body:not(.is-authed) .login-panel .brand {
  justify-self: stretch;
  display: flex;
  align-items: center;
  width: 100%;
  margin: 0 0 22px !important;
  padding: 12px 14px !important;
  border: 1px solid rgba(112, 166, 248, .28) !important;
  border-radius: 18px !important;
  background: rgba(255, 255, 255, .74) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .88) !important;
}

body:not(.is-authed) .login-panel .brand.large .brand-mark {
  width: 52px !important;
  height: 52px !important;
  border: 1px solid rgba(112, 166, 248, .27) !important;
  border-radius: 15px !important;
  background: #f7fbff !important;
  box-shadow: none !important;
}

body:not(.is-authed) .login-panel .brand strong {
  color: #172033 !important;
  font-size: 17px !important;
  font-weight: 820 !important;
  letter-spacing: .01em;
}

body:not(.is-authed) .login-panel .brand span,
body:not(.is-authed) .auth-flow-head p {
  color: #7b8ba6 !important;
  font-size: 13px !important;
}

body:not(.is-authed) .login-kicker {
  display: block !important;
  margin: 0 0 4px;
  color: #4f83eb !important;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .32em;
}

body:not(.is-authed) #loginForm h1 {
  margin: 0 0 18px !important;
  color: #172033 !important;
  font-size: 30px !important;
  font-weight: 850 !important;
  letter-spacing: .02em !important;
  line-height: 1.18;
  text-align: left !important;
}

body:not(.is-authed) #loginForm h1::after {
  display: none !important;
}

body:not(.is-authed) .login-panel .auth-tabs {
  height: 54px !important;
  padding: 4px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #edf3fd !important;
  box-shadow: inset 0 0 0 1px rgba(173, 199, 238, .18) !important;
}

body:not(.is-authed) .login-panel .auth-tabs::before {
  top: 4px !important;
  left: 4px !important;
  width: calc((100% - 8px) / 2) !important;
  height: calc(100% - 8px) !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  box-shadow: 0 8px 18px rgba(65, 111, 190, .08) !important;
}

body:not(.is-authed) .login-panel .auth-tabs button {
  min-height: 46px !important;
  color: #8694a9 !important;
  font-size: 15px !important;
  font-weight: 760 !important;
}

body:not(.is-authed) .login-panel .auth-tabs button.active {
  color: #172033 !important;
}

body:not(.is-authed) .login-panel .field {
  gap: 8px !important;
}

body:not(.is-authed) .login-panel .field > span,
body:not(.is-authed) .register-panel .field > span,
body:not(.is-authed) .remember-password span {
  color: #7b8798 !important;
  font-size: 14px !important;
  font-weight: 720 !important;
}

body:not(.is-authed) .login-panel .field input,
body:not(.is-authed) .login-panel .code-row input,
body:not(.is-authed) .register-panel .field input,
body:not(.is-authed) .register-panel .code-row input,
body:not(.is-authed) .register-panel .field select {
  min-height: 60px !important;
  border: 1px solid rgba(150, 184, 235, .62) !important;
  border-radius: 18px !important;
  background-color: rgba(255, 255, 255, .8) !important;
  color: #23314c !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9) !important;
}

body:not(.is-authed) #loginUser,
body:not(.is-authed) #loginPass,
body:not(.is-authed) #loginPhone,
body:not(.is-authed) #loginEmail,
body:not(.is-authed) #loginCode {
  padding-left: 54px !important;
  background-position: 20px center !important;
  background-repeat: no-repeat !important;
}

body:not(.is-authed) .password-input #loginPass {
  padding-right: 52px !important;
}

body:not(.is-authed) .login-panel .field input:focus,
body:not(.is-authed) .login-panel .code-row input:focus,
body:not(.is-authed) .register-panel .field input:focus,
body:not(.is-authed) .register-panel .field select:focus,
body:not(.is-authed) .register-panel .code-row input:focus {
  border-color: rgba(76, 134, 239, .68) !important;
  background-color: #ffffff !important;
  box-shadow: 0 0 0 4px rgba(74, 145, 255, .12) !important;
}

body:not(.is-authed) .login-options {
  margin-top: 0 !important;
}

body:not(.is-authed) .login-panel .text-btn {
  color: #7f8da1 !important;
  font-size: 14px !important;
  font-weight: 720;
}

body:not(.is-authed) .login-panel .text-btn:hover {
  color: #3478f6 !important;
}

body:not(.is-authed) .login-panel .primary-btn.wide,
body:not(.is-authed) .auth-flow-actions .primary-btn.wide {
  min-height: 66px !important;
  border: 0 !important;
  border-radius: 18px !important;
  background: linear-gradient(135deg, #67bef3 0%, #3478f6 100%) !important;
  color: #ffffff !important;
  font-size: 16px !important;
  font-weight: 820 !important;
  box-shadow: 0 16px 32px rgba(52, 120, 246, .22) !important;
}

body:not(.is-authed) .login-panel .primary-btn.wide:hover,
body:not(.is-authed) .auth-flow-actions .primary-btn.wide:hover {
  background: linear-gradient(135deg, #5db6ed 0%, #2f6fe8 100%) !important;
  box-shadow: 0 18px 38px rgba(52, 120, 246, .28) !important;
}

body:not(.is-authed) .auth-flow-actions .ghost-btn.wide,
body:not(.is-authed) .login-panel .ghost-btn {
  border-color: rgba(150, 184, 235, .52) !important;
  border-radius: 16px !important;
  background: #ffffff !important;
  color: #3478f6 !important;
  box-shadow: none !important;
}

body:not(.is-authed) .login-panel .auth-footer {
  display: flex !important;
  justify-content: center;
  align-items: center;
  gap: 12px !important;
  margin-top: 4px !important;
  color: #9aa6b8;
  text-align: center;
}

body:not(.is-authed) .login-panel .auth-footer span {
  display: inline-block !important;
  width: 1px;
  height: 14px;
  background: #cfd8e6;
}

body:not(.is-authed) .login-panel .auth-footer .text-btn:first-child {
  min-height: auto !important;
  border: 0 !important;
  background: transparent !important;
}

body:not(.is-authed) .login-panel .auth-footer .text-btn:first-child::before {
  display: none !important;
}

@media (max-width: 900px) {
  body:not(.is-authed) .login-screen {
    padding: 16px !important;
  }

  body:not(.is-authed) .login-shell {
    width: min(520px, 100%) !important;
    height: auto !important;
    min-height: min(700px, calc(100vh - 32px)) !important;
    grid-template-columns: 1fr !important;
  }

  body:not(.is-authed) .login-form-column {
    border-right: 0 !important;
    padding: 30px 24px !important;
  }

  body:not(.is-authed) .login-showcase {
    display: none !important;
  }
}

@media (max-width: 1120px), (max-height: 820px) {
  body:not(.is-authed) .login-screen {
    padding: clamp(14px, 3.2vw, 32px) !important;
  }

  body:not(.is-authed) .login-shell {
    width: min(1140px, calc(100vw - 48px)) !important;
    height: min(704px, calc(100vh - 48px)) !important;
    min-height: 0 !important;
    grid-template-columns: minmax(390px, .78fr) minmax(0, 1fr) !important;
  }

  body:not(.is-authed) .login-form-column {
    padding: 28px 38px !important;
  }

  body:not(.is-authed) .login-panel,
  body:not(.is-authed) .register-panel {
    gap: 12px !important;
    max-width: 392px !important;
  }

  body:not(.is-authed) .login-panel .brand {
    margin-bottom: 14px !important;
    padding: 9px 12px !important;
    border-radius: 17px !important;
  }

  body:not(.is-authed) .login-panel .brand.large .brand-mark {
    width: 46px !important;
    height: 46px !important;
  }

  body:not(.is-authed) .login-kicker {
    font-size: 10px !important;
  }

  body:not(.is-authed) #loginForm h1 {
    margin-bottom: 14px !important;
    font-size: 28px !important;
  }

  body:not(.is-authed) .login-panel .auth-tabs {
    height: 50px !important;
  }

  body:not(.is-authed) .login-panel .auth-tabs button {
    min-height: 42px !important;
    font-size: 14px !important;
  }

  body:not(.is-authed) .login-panel .field {
    gap: 6px !important;
  }

  body:not(.is-authed) .login-panel .field input,
  body:not(.is-authed) .login-panel .code-row input,
  body:not(.is-authed) .register-panel .field input,
  body:not(.is-authed) .register-panel .code-row input,
  body:not(.is-authed) .register-panel .field select {
    min-height: 54px !important;
    border-radius: 16px !important;
  }

  body:not(.is-authed) #loginUser,
  body:not(.is-authed) #loginPass,
  body:not(.is-authed) #loginPhone,
  body:not(.is-authed) #loginEmail,
  body:not(.is-authed) #loginCode {
    padding-left: 48px !important;
    background-position: 18px center !important;
  }

  body:not(.is-authed) .login-panel .primary-btn.wide,
  body:not(.is-authed) .auth-flow-actions .primary-btn.wide {
    min-height: 58px !important;
    border-radius: 16px !important;
  }

  body:not(.is-authed) .login-panel .auth-footer {
    margin-top: 0 !important;
  }

  body:not(.is-authed) .login-showcase {
    padding: clamp(34px, 6vw, 64px) !important;
  }

  body:not(.is-authed) .login-visual-caption {
    bottom: 22px !important;
  }
}

/* Final cleanup for the restored light login screen. */
body:not(.is-authed) .login-form-column {
  justify-items: center !important;
}

body:not(.is-authed) .login-panel:not([hidden]),
body:not(.is-authed) .register-panel:not([hidden]) {
  display: grid !important;
}

body:not(.is-authed) .login-panel[hidden],
body:not(.is-authed) .register-panel[hidden] {
  display: none !important;
}

body:not(.is-authed) .register-panel:not([hidden]) {
  width: min(100%, 380px) !important;
  max-width: 380px !important;
  grid-template-columns: 1fr !important;
  align-content: center !important;
  row-gap: 10px !important;
  column-gap: 0 !important;
}

body:not(.is-authed) .register-panel .brand,
body:not(.is-authed) .register-panel .auth-flow-head,
body:not(.is-authed) .register-panel .field,
body:not(.is-authed) .register-panel .auth-code-field,
body:not(.is-authed) .register-panel .register-code-field,
body:not(.is-authed) .register-panel .form-error,
body:not(.is-authed) .register-panel .auth-flow-actions {
  grid-column: 1 / -1 !important;
  min-width: 0 !important;
}

body:not(.is-authed) .register-panel .auth-flow-head {
  display: grid !important;
  gap: 4px !important;
  text-align: left !important;
}

body:not(.is-authed) .register-panel .auth-flow-head span {
  color: #4f83eb !important;
  font-size: 12px !important;
  font-weight: 820 !important;
  letter-spacing: .18em;
}

body:not(.is-authed) .register-panel .auth-flow-head h1 {
  margin: 0 !important;
  color: #172033 !important;
  font-size: 26px !important;
  line-height: 1.18 !important;
}

body:not(.is-authed) .register-panel .auth-flow-head p {
  margin: 0 !important;
  line-height: 1.45 !important;
}

body:not(.is-authed) .register-panel .field input,
body:not(.is-authed) .register-panel .field select,
body:not(.is-authed) .register-panel .code-row input {
  width: 100% !important;
  min-width: 0 !important;
}

body:not(.is-authed) .register-panel .code-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 132px !important;
  gap: 10px !important;
}

body:not(.is-authed) .register-panel .code-row .ghost-btn {
  min-height: 54px !important;
  white-space: nowrap !important;
}

body:not(.is-authed) .register-panel .auth-flow-actions {
  display: grid !important;
  grid-template-columns: 1fr 1.08fr !important;
  gap: 12px !important;
  margin-top: 4px !important;
}

body:not(.is-authed) .register-panel .auth-flow-actions .wide {
  width: 100% !important;
}

body:not(.is-authed) .login-showcase {
  background:
    radial-gradient(circle at 56% 42%, rgba(86, 150, 245, .11), transparent 33%),
    radial-gradient(circle at 72% 62%, rgba(91, 172, 244, .10), transparent 30%),
    rgba(255, 255, 255, .34) !important;
}

body:not(.is-authed) .login-art {
  color: transparent !important;
}

body:not(.is-authed) .login-art > * {
  visibility: hidden !important;
}

body:not(.is-authed) .cat-login-success-toast,
body:not(.is-authed) .cat-success-particles,
body:not(.is-authed) .cat-success-particles i {
  display: none !important;
  visibility: hidden !important;
}

body:not(.is-authed) .login-art::before {
  left: 50% !important;
  top: 42% !important;
  width: min(420px, 68%) !important;
  height: 246px !important;
  aspect-ratio: auto !important;
  border: 1px solid rgba(133, 177, 238, .42) !important;
  border-radius: 24px !important;
  background:
    radial-gradient(circle at 18% 13%, #93c3ed 0 5px, transparent 6px),
    radial-gradient(circle at 25% 13%, #b6d2ef 0 5px, transparent 6px),
    radial-gradient(circle at 32% 13%, #a7c8ea 0 5px, transparent 6px),
    linear-gradient(#dbe9fb, #dbe9fb) 0 48px / 100% 1px no-repeat,
    linear-gradient(90deg, #83a0ed, #70c3ee) 36px 88px / 250px 12px no-repeat,
    linear-gradient(#a8c6f5, #a8c6f5) 36px 122px / 236px 12px no-repeat,
    linear-gradient(#c4daf7, #c4daf7) 36px 156px / 190px 12px no-repeat,
    rgba(255, 255, 255, .54) !important;
  box-shadow: 0 24px 62px rgba(64, 112, 189, .08) !important;
  transform: translate(-50%, -50%) !important;
  animation: restoredLoginCardFloat 5.8s ease-in-out infinite !important;
}

body:not(.is-authed) .login-art::after {
  left: 60% !important;
  top: 50% !important;
  width: 58px !important;
  height: 52px !important;
  border-radius: 15px !important;
  background:
    radial-gradient(circle at 50% 58%, #dcecff 0 4px, transparent 5px),
    linear-gradient(#ffffff, #ffffff) 26px 24px / 6px 17px no-repeat,
    linear-gradient(135deg, #5f96f8, #4b77e7) !important;
  box-shadow: 0 18px 38px rgba(66, 113, 221, .28) !important;
  transform: translate(-50%, -50%) !important;
  animation: restoredLoginLockPulse 2.4s ease-in-out infinite !important;
}

body:not(.is-authed) .login-showcase::before {
  left: 50% !important;
  top: 35% !important;
  width: 92px !important;
  height: 92px !important;
  aspect-ratio: auto !important;
  border: 1px solid rgba(133, 177, 238, .38) !important;
  border-radius: 28px !important;
  background: rgba(255, 255, 255, .78) url("./assets/logo.png?v=20260529-logo-2") center / 48px 48px no-repeat !important;
  box-shadow: 0 20px 52px rgba(64, 112, 189, .10) !important;
  transform: translate(-50%, -50%) !important;
  animation: restoredLoginLogoFloat 4.6s ease-in-out infinite !important;
}

body:not(.is-authed) .login-showcase::after {
  right: 20% !important;
  top: 33% !important;
  width: 20px !important;
  height: 20px !important;
  aspect-ratio: auto !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: radial-gradient(circle, #5a9adf 0 6px, rgba(90, 154, 223, .16) 7px 20px) !important;
  box-shadow: none !important;
  animation: restoredLoginDotPulse 2.8s ease-in-out infinite !important;
}

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

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

@keyframes restoredLoginLockPulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 18px 38px rgba(66, 113, 221, .28);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.06);
    box-shadow: 0 22px 46px rgba(66, 113, 221, .36);
  }
}

@keyframes restoredLoginDotPulse {
  0%, 100% { transform: scale(1); opacity: .72; }
  50% { transform: scale(1.2); opacity: 1; }
}

@media (max-width: 1120px), (max-height: 820px) {
  body:not(.is-authed) .register-panel:not([hidden]) {
    width: min(100%, 352px) !important;
    row-gap: 8px !important;
  }

  body:not(.is-authed) .register-panel .brand {
    margin-bottom: 8px !important;
  }

  body:not(.is-authed) .register-panel .auth-flow-head h1 {
    font-size: 24px !important;
  }

  body:not(.is-authed) .register-panel .field input,
  body:not(.is-authed) .register-panel .field select,
  body:not(.is-authed) .register-panel .code-row input {
    min-height: 48px !important;
  }

  body:not(.is-authed) .register-panel .code-row .ghost-btn {
    min-height: 48px !important;
  }

  body:not(.is-authed) .register-panel .auth-flow-actions .primary-btn.wide,
  body:not(.is-authed) .register-panel .auth-flow-actions .ghost-btn.wide {
    min-height: 52px !important;
  }
}

/* Keep the restored login light, animated, and free of success/star leftovers. */
body:not(.is-authed) .login-showcase {
  background:
    radial-gradient(circle at 46% 42%, rgba(111, 180, 245, .12), transparent 34%),
    radial-gradient(circle at 70% 65%, rgba(145, 202, 247, .12), transparent 32%),
    rgba(255, 255, 255, .36) !important;
}

body:not(.is-authed) .login-showcase::before,
body:not(.is-authed) .login-showcase::after,
body:not(.is-authed) .login-art::before,
body:not(.is-authed) .login-art::after {
  display: none !important;
  content: none !important;
  animation: none !important;
}

body:not(.is-authed) .login-art {
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  color: #172033 !important;
  background:
    radial-gradient(circle at 38% 46%, rgba(82, 141, 231, .08), transparent 34%),
    radial-gradient(circle at 63% 62%, rgba(116, 196, 239, .08), transparent 32%) !important;
  animation: loginAquariumFloat 7.4s ease-in-out infinite !important;
}

body:not(.is-authed) .login-art > *,
body:not(.is-authed) .login-characters,
body:not(.is-authed) .line-cat-login-svg {
  visibility: visible !important;
}

body:not(.is-authed) .login-characters {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  transform: none !important;
}

body:not(.is-authed) .line-cat-login-svg {
  position: absolute !important;
  inset: 0 !important;
  z-index: 2 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  overflow: visible !important;
  color: #172033 !important;
}

body:not(.is-authed) .cat-night-stars,
body:not(.is-authed) .cat-night-stars i,
body:not(.is-authed) .line-raster-stage,
body:not(.is-authed) .cat-aquarium-svg,
body:not(.is-authed) .cat-animated-stage,
body:not(.is-authed) .cat-raster-poses,
body:not(.is-authed) .cat-motion-layer,
body:not(.is-authed) .login-art-glow,
body:not(.is-authed) .cat-login-success-toast,
body:not(.is-authed) .cat-success-particles,
body:not(.is-authed) .cat-success-particles i {
  display: none !important;
  visibility: hidden !important;
}

body:not(.is-authed) .login-visual-caption {
  display: grid !important;
  color: #7c8da8 !important;
}

body:not(.is-authed) .login-visual-caption strong {
  color: #172033 !important;
}

body:not(.is-authed) .login-visual-caption span {
  color: #8a94a6 !important;
}

body:not(.is-authed) .register-panel:not([hidden]) .brand {
  display: none !important;
}

body:not(.is-authed) .register-panel:not([hidden]) {
  width: min(100%, 392px) !important;
  max-width: 392px !important;
  row-gap: 8px !important;
}

body:not(.is-authed) .register-panel .field {
  gap: 4px !important;
}

@media (max-width: 1120px), (max-height: 820px) {
  body:not(.is-authed) .register-panel:not([hidden]) {
    width: min(100%, 372px) !important;
    row-gap: 6px !important;
  }

  body:not(.is-authed) .register-panel .auth-flow-head {
    gap: 2px !important;
  }

  body:not(.is-authed) .register-panel .auth-flow-head h1 {
    font-size: 23px !important;
  }

  body:not(.is-authed) .register-panel .auth-flow-head p {
    font-size: 12px !important;
    line-height: 1.35 !important;
  }

  body:not(.is-authed) .register-panel .field > span {
    font-size: 12px !important;
  }

  body:not(.is-authed) .register-panel .field input,
  body:not(.is-authed) .register-panel .field select,
  body:not(.is-authed) .register-panel .code-row input {
    min-height: 42px !important;
    border-radius: 14px !important;
  }

  body:not(.is-authed) .register-panel .code-row .ghost-btn {
    min-height: 42px !important;
  }

  body:not(.is-authed) .register-panel .auth-flow-actions .primary-btn.wide,
  body:not(.is-authed) .register-panel .auth-flow-actions .ghost-btn.wide {
    min-height: 46px !important;
  }
}

/* Restore the non-cat aquarium login: form on the left, animated fish tank on the right. */
body:not(.is-authed) .login-shell {
  grid-template-columns: minmax(380px, 0.92fr) minmax(420px, 1.08fr) !important;
  background:
    radial-gradient(circle at 76% 18%, rgba(126, 221, 211, 0.12), transparent 40%),
    radial-gradient(circle at 24% 86%, rgba(52, 120, 246, 0.08), transparent 42%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.68)) !important;
  border: 1px solid rgba(190, 210, 215, 0.7) !important;
  border-radius: 30px !important;
  overflow: hidden !important;
}

body:not(.is-authed) .login-form-column {
  order: 1 !important;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0.12)) !important;
  border-right: 1px solid rgba(160, 180, 190, 0.28) !important;
}

body:not(.is-authed) .login-showcase {
  order: 2 !important;
  background:
    radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.48), transparent 32%),
    linear-gradient(145deg, rgba(234, 242, 255, 0.28), rgba(238, 249, 248, 0.16)) !important;
}

body:not(.is-authed) .login-art {
  min-height: 390px !important;
  overflow: visible !important;
  background:
    radial-gradient(circle at 24% 18%, rgba(52, 120, 246, 0.12), transparent 34%),
    radial-gradient(circle at 76% 72%, rgba(126, 221, 211, 0.16), transparent 36%) !important;
}

body:not(.is-authed) .login-characters,
body:not(.is-authed) .line-cat-login-svg,
body:not(.is-authed) .line-raster-stage,
body:not(.is-authed) .cat-aquarium-svg,
body:not(.is-authed) .cat-login-success-toast,
body:not(.is-authed) .cat-success-particles {
  display: none !important;
  visibility: hidden !important;
}

body:not(.is-authed) .aquarium-caustics,
body:not(.is-authed) .login-art .aquarium-bubbles,
body:not(.is-authed) .login-art .aquarium-plant,
body:not(.is-authed) .login-art .aquarium-pebbles,
body:not(.is-authed) .login-art .aquarium-fish,
body:not(.is-authed) .login-art .aquarium-brand-fish,
body:not(.is-authed) .login-art .aquarium-water-floor {
  display: block !important;
  visibility: visible !important;
}

body:not(.is-authed) .login-art .aquarium-pebbles {
  display: flex !important;
}

body:not(.is-authed) .login-art .aquarium-brand-fish {
  display: grid !important;
}

body:not(.is-authed) .login-art-glow {
  display: block !important;
  visibility: visible !important;
  background: radial-gradient(circle, rgba(126, 221, 211, 0.2), rgba(52, 120, 246, 0.07) 48%, transparent 68%) !important;
}

/* Softer aquarium login polish: remove the stiff tank frame and caption leftovers. */
body:not(.is-authed) .login-shell {
  width: min(1040px, calc(100vw - 48px)) !important;
  height: min(660px, calc(100vh - 48px)) !important;
  grid-template-columns: minmax(360px, 0.92fr) minmax(390px, 1.08fr) !important;
  border-radius: 34px !important;
  background:
    radial-gradient(circle at 78% 20%, rgba(126, 221, 211, 0.1), transparent 42%),
    radial-gradient(circle at 24% 80%, rgba(52, 120, 246, 0.06), transparent 40%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(247, 251, 255, 0.78)) !important;
  box-shadow:
    0 28px 80px rgba(55, 83, 116, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.98) !important;
}

body:not(.is-authed) .login-showcase {
  padding: 34px 34px 30px !important;
  place-items: center !important;
  background:
    radial-gradient(circle at 50% 48%, rgba(174, 220, 255, 0.22), transparent 48%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.24), rgba(238, 249, 248, 0.14)) !important;
}

body:not(.is-authed) .login-art {
  width: min(430px, 86%) !important;
  height: min(470px, 92%) !important;
  min-height: 0 !important;
  border-radius: 48% 52% 46% 54% / 45% 45% 55% 55% !important;
  overflow: hidden !important;
  border: 1px solid rgba(173, 204, 222, 0.24) !important;
  background:
    radial-gradient(circle at 45% 38%, rgba(255, 255, 255, 0.56), transparent 28%),
    radial-gradient(circle at 50% 52%, rgba(157, 215, 255, 0.34), rgba(178, 229, 255, 0.18) 42%, transparent 72%),
    linear-gradient(180deg, rgba(244, 251, 255, 0.72), rgba(221, 242, 255, 0.4)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.74),
    inset 0 -38px 80px rgba(114, 183, 218, 0.12),
    0 24px 62px rgba(70, 118, 157, 0.1) !important;
}

body:not(.is-authed) .login-art::before {
  content: "" !important;
  position: absolute !important;
  inset: 8% 10% auto !important;
  display: block !important;
  height: 28% !important;
  border-radius: 50% !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.38), transparent) !important;
  filter: blur(8px) !important;
  opacity: 0.7 !important;
}

body:not(.is-authed) .login-art::after {
  content: "" !important;
  position: absolute !important;
  right: 12% !important;
  bottom: 6% !important;
  left: 12% !important;
  display: block !important;
  height: 18% !important;
  border-radius: 50% !important;
  background: radial-gradient(ellipse at center, rgba(132, 184, 206, 0.18), transparent 68%) !important;
  filter: blur(6px) !important;
}

body:not(.is-authed) .login-visual-caption {
  display: none !important;
}

body:not(.is-authed) .cat-login-success-toast,
body:not(.is-authed) .cat-login-success-toast * {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

body:not(.is-authed) .login-art-glow {
  inset: 11% 8% 10% !important;
  opacity: 0.72 !important;
  filter: blur(12px) !important;
}

body:not(.is-authed) .login-art .aquarium-brand-fish {
  top: 48% !important;
  width: 112px !important;
  height: 112px !important;
  background: rgba(255, 255, 255, 0.3) !important;
  border-color: rgba(132, 170, 190, 0.24) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 16px 40px rgba(73, 128, 164, 0.1) !important;
}

body:not(.is-authed) .login-art .aquarium-brand-fish img {
  width: 66px !important;
  height: 66px !important;
  opacity: 0.78 !important;
}

body:not(.is-authed) .login-art .aquarium-fish {
  opacity: 0.46 !important;
  filter: drop-shadow(0 8px 12px rgba(77, 95, 100, 0.06)) !important;
}

body:not(.is-authed) .login-art .aquarium-fish i {
  background: linear-gradient(145deg, rgba(112, 158, 184, 0.48), rgba(143, 195, 206, 0.34)) !important;
}

body:not(.is-authed) .login-art .fish-one {
  top: 22% !important;
  left: 26% !important;
}

body:not(.is-authed) .login-art .fish-two {
  top: 66% !important;
  right: 22% !important;
}

body:not(.is-authed) .login-art .fish-three {
  bottom: 18% !important;
  left: 36% !important;
}

body:not(.is-authed) .login-art .aquarium-bubbles {
  opacity: 0.42 !important;
}

body:not(.is-authed) .login-art .bubble-cluster-one {
  top: 34% !important;
  left: 18% !important;
}

body:not(.is-authed) .login-art .bubble-cluster-two {
  top: 18% !important;
  right: 19% !important;
}

body:not(.is-authed) .login-art .aquarium-plant {
  bottom: 8% !important;
  opacity: 0.42 !important;
}

body:not(.is-authed) .login-art .plant-left {
  left: 8% !important;
}

body:not(.is-authed) .login-art .plant-right {
  right: 8% !important;
}

body:not(.is-authed) .login-art .aquarium-pebbles {
  right: 26% !important;
  bottom: 5% !important;
  left: 26% !important;
  opacity: 0.48 !important;
}

body:not(.is-authed) .login-art .aquarium-water-floor {
  bottom: -12px !important;
  opacity: 0.55 !important;
}

@media (max-width: 980px) {
  body:not(.is-authed) .login-shell {
    height: auto !important;
    min-height: 0 !important;
    grid-template-columns: 1fr !important;
  }

  body:not(.is-authed) .login-showcase {
    display: none !important;
  }
}

/* Image-2 style login illustration: airy files, soft fish, no hard boundary. */
body:not(.is-authed) .login-showcase {
  position: relative !important;
  isolation: isolate !important;
  overflow: hidden !important;
  background:
    radial-gradient(circle at 66% 22%, rgba(103, 190, 229, 0.16), transparent 26%),
    radial-gradient(circle at 50% 54%, rgba(82, 144, 246, 0.08), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(238, 249, 248, 0.1)) !important;
}

body:not(.is-authed) .login-showcase::before {
  content: "" !important;
  position: absolute !important;
  inset: 10% 7% 9% 9% !important;
  display: block !important;
  border: 0 !important;
  border-radius: 38% 62% 46% 54% / 48% 40% 60% 52% !important;
  background:
    radial-gradient(circle at 50% 44%, rgba(170, 223, 255, 0.32), transparent 34%),
    radial-gradient(circle at 58% 64%, rgba(79, 145, 245, 0.12), transparent 45%),
    radial-gradient(circle at 36% 70%, rgba(111, 211, 203, 0.1), transparent 36%) !important;
  filter: blur(18px) !important;
  opacity: 0.95 !important;
  animation: loginAuraFloat 8s ease-in-out infinite !important;
  z-index: -1 !important;
}

body:not(.is-authed) .login-showcase::after {
  content: "" !important;
  position: absolute !important;
  right: 10% !important;
  bottom: 13% !important;
  display: block !important;
  width: 280px !important;
  height: 160px !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: radial-gradient(ellipse at center, rgba(64, 118, 185, 0.1), transparent 68%) !important;
  filter: blur(16px) !important;
  z-index: -1 !important;
}

body:not(.is-authed) .login-art {
  width: min(520px, 94%) !important;
  height: min(500px, 92%) !important;
  border: 0 !important;
  border-radius: 0 !important;
  overflow: visible !important;
  background:
    radial-gradient(circle at 52% 50%, rgba(188, 229, 255, 0.4), transparent 30%),
    radial-gradient(circle at 54% 62%, rgba(87, 160, 248, 0.14), transparent 44%),
    radial-gradient(circle at 34% 32%, rgba(255, 255, 255, 0.48), transparent 22%) !important;
  box-shadow: none !important;
  animation: loginAquariumFloat 7.4s ease-in-out infinite !important;
}

body:not(.is-authed) .login-art::before,
body:not(.is-authed) .login-art::after {
  border: 0 !important;
  box-shadow: none !important;
  pointer-events: none !important;
}

body:not(.is-authed) .login-art::before {
  inset: 14% 18% auto !important;
  height: 26% !important;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.48), transparent 66%) !important;
  filter: blur(16px) !important;
  opacity: 0.8 !important;
}

body:not(.is-authed) .login-art::after {
  right: 18% !important;
  bottom: 9% !important;
  left: 18% !important;
  height: 16% !important;
  background: radial-gradient(ellipse at center, rgba(85, 137, 188, 0.12), transparent 70%) !important;
  filter: blur(14px) !important;
}

body:not(.is-authed) .login-art-glow {
  inset: 18% 14% 12% !important;
  background:
    radial-gradient(circle at 52% 46%, rgba(126, 221, 211, 0.22), transparent 36%),
    radial-gradient(circle at 53% 58%, rgba(52, 120, 246, 0.12), transparent 52%) !important;
  filter: blur(18px) !important;
  opacity: 0.9 !important;
}

body:not(.is-authed) .login-floating-files {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  visibility: visible !important;
  pointer-events: none !important;
  z-index: 6 !important;
}

body:not(.is-authed) .float-file {
  position: absolute !important;
  display: grid !important;
  width: 86px !important;
  height: 104px !important;
  padding: 14px 12px 10px !important;
  border: 1px solid rgba(151, 184, 213, 0.22) !important;
  border-radius: 20px !important;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(238, 247, 255, 0.64)) !important;
  box-shadow: 0 20px 54px rgba(63, 104, 150, 0.1) !important;
  color: rgba(67, 101, 137, 0.62) !important;
  place-items: start !important;
  transform-origin: center !important;
}

body:not(.is-authed) .float-file::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  width: 24px !important;
  height: 24px !important;
  border-radius: 0 20px 0 12px !important;
  background: linear-gradient(135deg, rgba(202, 224, 245, 0.58), rgba(255, 255, 255, 0.4)) !important;
}

body:not(.is-authed) .float-file i {
  display: block !important;
  width: 42px !important;
  height: 8px !important;
  margin-top: 26px !important;
  border-radius: 999px !important;
  background: currentColor !important;
  opacity: 0.36 !important;
  box-shadow: 0 16px 0 currentColor, 0 32px 0 currentColor !important;
}

body:not(.is-authed) .float-file b {
  align-self: end !important;
  justify-self: end !important;
  font-size: 12px !important;
  letter-spacing: 0.12em !important;
  opacity: 0.58 !important;
}

body:not(.is-authed) .float-file.file-a {
  top: 13% !important;
  left: 10% !important;
  color: rgba(59, 130, 246, 0.64) !important;
  transform: rotate(-10deg) !important;
  animation: floatFileA 6.8s ease-in-out infinite !important;
}

body:not(.is-authed) .float-file.file-b {
  top: 20% !important;
  right: 8% !important;
  color: rgba(20, 158, 136, 0.56) !important;
  transform: rotate(9deg) scale(0.9) !important;
  animation: floatFileB 7.4s ease-in-out infinite !important;
}

body:not(.is-authed) .float-file.file-c {
  right: 16% !important;
  bottom: 14% !important;
  color: rgba(94, 116, 160, 0.54) !important;
  transform: rotate(-5deg) scale(0.86) !important;
  animation: floatFileC 6.4s ease-in-out infinite !important;
}

body:not(.is-authed) .float-file.file-d {
  bottom: 19% !important;
  left: 8% !important;
  color: rgba(82, 144, 212, 0.5) !important;
  transform: rotate(8deg) scale(0.82) !important;
  animation: floatFileD 7.8s ease-in-out infinite !important;
}

body:not(.is-authed) .login-art .aquarium-brand-fish {
  top: 50% !important;
  width: 122px !important;
  height: 122px !important;
  border: 0 !important;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.1) 64%, transparent 70%) !important;
  box-shadow: none !important;
  opacity: 0.86 !important;
  z-index: 4 !important;
}

body:not(.is-authed) .login-art .aquarium-brand-fish img {
  width: 70px !important;
  height: 70px !important;
  opacity: 0.66 !important;
}

body:not(.is-authed) .login-art .aquarium-brand-halo {
  opacity: 0.18 !important;
}

body:not(.is-authed) .login-art .aquarium-fish {
  opacity: 0.28 !important;
  z-index: 3 !important;
}

body:not(.is-authed) .login-art .aquarium-bubbles,
body:not(.is-authed) .login-art .aquarium-plant,
body:not(.is-authed) .login-art .aquarium-pebbles,
body:not(.is-authed) .login-art .aquarium-water-floor {
  opacity: 0.22 !important;
}

body:not(.is-authed) .login-visual-caption,
body:not(.is-authed) .cat-login-success-toast,
body:not(.is-authed) .cat-login-success-toast *,
body:not(.is-authed) .cat-success-particles {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

@keyframes loginAuraFloat {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-10px, -8px, 0) scale(1.03); }
}

@keyframes floatFileA {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-10deg); }
  50% { transform: translate3d(8px, -14px, 0) rotate(-6deg); }
}

@keyframes floatFileB {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(9deg) scale(0.9); }
  50% { transform: translate3d(-12px, -10px, 0) rotate(5deg) scale(0.9); }
}

@keyframes floatFileC {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-5deg) scale(0.86); }
  50% { transform: translate3d(-8px, 12px, 0) rotate(-9deg) scale(0.86); }
}

@keyframes floatFileD {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(8deg) scale(0.82); }
  50% { transform: translate3d(12px, 9px, 0) rotate(12deg) scale(0.82); }
}

/* Final fluid glass login treatment. */
body:not(.is-authed) .login-screen {
  overflow: hidden !important;
  background:
    radial-gradient(circle at 16% 14%, rgba(93, 184, 255, 0.26), transparent 30%),
    radial-gradient(circle at 82% 18%, rgba(100, 221, 201, 0.22), transparent 32%),
    radial-gradient(circle at 62% 86%, rgba(81, 112, 247, 0.18), transparent 40%),
    linear-gradient(135deg, #eef7ff 0%, #f9fcff 48%, #edf8f6 100%) !important;
}

body:not(.is-authed) .login-screen::before {
  content: "" !important;
  position: absolute !important;
  inset: -18% -12% auto auto !important;
  display: block !important;
  width: 720px !important;
  height: 720px !important;
  border-radius: 42% 58% 55% 45% / 46% 44% 56% 54% !important;
  background:
    radial-gradient(circle at 34% 34%, rgba(255, 255, 255, 0.88), transparent 24%),
    radial-gradient(circle at 58% 62%, rgba(77, 143, 247, 0.24), transparent 46%),
    linear-gradient(135deg, rgba(105, 211, 230, 0.26), rgba(68, 123, 245, 0.18)) !important;
  filter: blur(12px) !important;
  opacity: 0.82 !important;
  animation: fluidLoginBlob 11s ease-in-out infinite !important;
  pointer-events: none !important;
}

body:not(.is-authed) .login-screen::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  background:
    linear-gradient(rgba(255, 255, 255, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px) !important;
  background-size: 52px 52px !important;
  mask-image: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.46), transparent 72%) !important;
  opacity: 0.38 !important;
  pointer-events: none !important;
}

body:not(.is-authed) .login-shell {
  position: relative !important;
  width: min(1120px, calc(100vw - 48px)) !important;
  height: min(680px, calc(100vh - 48px)) !important;
  max-height: 720px !important;
  grid-template-columns: minmax(390px, 0.92fr) minmax(460px, 1.08fr) !important;
  border: 1px solid rgba(255, 255, 255, 0.68) !important;
  border-radius: 38px !important;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.28)) !important;
  box-shadow:
    0 34px 100px rgba(43, 78, 125, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.86) !important;
  backdrop-filter: blur(26px) saturate(1.2) !important;
  -webkit-backdrop-filter: blur(26px) saturate(1.2) !important;
  isolation: isolate !important;
  overflow: hidden !important;
}

body:not(.is-authed) .login-shell::before {
  content: "" !important;
  position: absolute !important;
  inset: 1px !important;
  border-radius: inherit !important;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.72), transparent 38%),
    radial-gradient(circle at 86% 20%, rgba(78, 162, 246, 0.16), transparent 34%) !important;
  pointer-events: none !important;
  z-index: -1 !important;
}

body:not(.is-authed) .login-form-column {
  padding: clamp(26px, 4vw, 48px) !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.45)) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.54) !important;
}

body:not(.is-authed) .login-panel {
  width: min(100%, 424px) !important;
  padding: 30px !important;
  border: 1px solid rgba(255, 255, 255, 0.62) !important;
  border-radius: 30px !important;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0.34)) !important;
  box-shadow:
    0 24px 70px rgba(43, 80, 125, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.76) !important;
  backdrop-filter: blur(18px) saturate(1.16) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.16) !important;
}

body:not(.is-authed) .login-panel .brand.large {
  height: 70px !important;
  padding: 10px 14px !important;
  border: 1px solid rgba(154, 190, 226, 0.28) !important;
  border-radius: 24px !important;
  background: rgba(255, 255, 255, 0.56) !important;
  box-shadow: 0 16px 38px rgba(58, 107, 160, 0.08) !important;
}

body:not(.is-authed) .login-kicker {
  margin-top: 28px !important;
  color: #4a84ff !important;
  letter-spacing: 0.36em !important;
}

body:not(.is-authed) .login-panel h1 {
  margin: 12px 0 24px !important;
  color: #16223a !important;
  letter-spacing: 0.02em !important;
}

body:not(.is-authed) .auth-tabs {
  padding: 5px !important;
  border: 1px solid rgba(166, 196, 228, 0.35) !important;
  border-radius: 999px !important;
  background: rgba(232, 241, 252, 0.72) !important;
  box-shadow: inset 0 1px 3px rgba(65, 99, 135, 0.08) !important;
}

body:not(.is-authed) .auth-tabs button.active {
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.92) !important;
  box-shadow: 0 10px 26px rgba(50, 86, 130, 0.1) !important;
}

body:not(.is-authed) .field input,
body:not(.is-authed) .field select,
body:not(.is-authed) .password-input,
body:not(.is-authed) .code-row input {
  border-color: rgba(153, 191, 231, 0.46) !important;
  border-radius: 18px !important;
  background: rgba(255, 255, 255, 0.72) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78) !important;
}

body:not(.is-authed) .primary-btn.wide {
  border: 0 !important;
  border-radius: 18px !important;
  background: linear-gradient(135deg, #59c2f1 0%, #3974f6 100%) !important;
  box-shadow: 0 18px 36px rgba(54, 118, 238, 0.28) !important;
}

body:not(.is-authed) .login-showcase {
  position: relative !important;
  display: grid !important;
  place-items: center !important;
  padding: 42px !important;
  overflow: visible !important;
  background: transparent !important;
}

body:not(.is-authed) .login-showcase::before,
body:not(.is-authed) .login-showcase::after {
  display: none !important;
}

body:not(.is-authed) .login-art {
  position: relative !important;
  width: min(560px, 100%) !important;
  height: 540px !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  animation: loginArtSway 8s ease-in-out infinite !important;
}

body:not(.is-authed) .login-art::before {
  content: "" !important;
  position: absolute !important;
  inset: 9% 5% 5% 4% !important;
  border: 1px solid rgba(255, 255, 255, 0.58) !important;
  border-radius: 40% 60% 46% 54% / 54% 44% 56% 46% !important;
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.86), transparent 24%),
    radial-gradient(circle at 68% 34%, rgba(106, 214, 224, 0.22), transparent 34%),
    radial-gradient(circle at 52% 64%, rgba(65, 136, 248, 0.22), transparent 46%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.44), rgba(216, 239, 255, 0.24)) !important;
  box-shadow:
    0 38px 90px rgba(55, 101, 145, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.76) !important;
  backdrop-filter: blur(20px) saturate(1.14) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.14) !important;
  filter: none !important;
  opacity: 1 !important;
  z-index: 1 !important;
  animation: loginMorphOrb 9s ease-in-out infinite !important;
}

body:not(.is-authed) .login-art::after {
  content: "" !important;
  position: absolute !important;
  left: 12% !important;
  right: 10% !important;
  bottom: 2% !important;
  height: 70px !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: radial-gradient(ellipse at center, rgba(36, 80, 132, 0.16), transparent 72%) !important;
  filter: blur(18px) !important;
  opacity: 0.5 !important;
  z-index: 0 !important;
}

body:not(.is-authed) .login-art-glow {
  inset: 10% 8% 8% !important;
  border-radius: 45% 55% 42% 58% / 50% 44% 56% 50% !important;
  background:
    conic-gradient(from 130deg, rgba(89, 191, 241, 0.22), rgba(63, 113, 246, 0.08), rgba(105, 224, 205, 0.22), rgba(89, 191, 241, 0.22)) !important;
  filter: blur(24px) !important;
  opacity: 0.72 !important;
  animation: loginGlowRotate 12s linear infinite !important;
  z-index: 0 !important;
}

body:not(.is-authed) .login-fluid-ribbon {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  pointer-events: none !important;
  z-index: 2 !important;
}

body:not(.is-authed) .login-fluid-ribbon i {
  position: absolute !important;
  display: block !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(93, 190, 241, 0.22), rgba(72, 118, 244, 0.08)) !important;
  filter: blur(1px) !important;
  transform-origin: center !important;
}

body:not(.is-authed) .login-fluid-ribbon i:nth-child(1) {
  top: 21% !important;
  left: 11% !important;
  width: 390px !important;
  height: 84px !important;
  transform: rotate(-18deg) !important;
  animation: loginRibbonOne 7s ease-in-out infinite !important;
}

body:not(.is-authed) .login-fluid-ribbon i:nth-child(2) {
  right: 6% !important;
  bottom: 24% !important;
  width: 330px !important;
  height: 72px !important;
  transform: rotate(16deg) !important;
  animation: loginRibbonTwo 8s ease-in-out infinite !important;
}

body:not(.is-authed) .login-fluid-ribbon i:nth-child(3) {
  left: 18% !important;
  bottom: 14% !important;
  width: 230px !important;
  height: 48px !important;
  transform: rotate(-8deg) !important;
  opacity: 0.65 !important;
}

body:not(.is-authed) .login-data-card {
  position: absolute !important;
  display: block !important;
  border: 1px solid rgba(255, 255, 255, 0.68) !important;
  border-radius: 24px !important;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.36)) !important;
  box-shadow: 0 22px 62px rgba(51, 95, 145, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.76) !important;
  backdrop-filter: blur(18px) saturate(1.12) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.12) !important;
  color: #1e2d46 !important;
  pointer-events: none !important;
  z-index: 6 !important;
}

body:not(.is-authed) .card-main {
  top: 23% !important;
  right: 7% !important;
  width: 270px !important;
  min-height: 172px !important;
  padding: 22px !important;
  animation: loginCardFloatA 7.4s ease-in-out infinite !important;
}

body:not(.is-authed) .card-main span,
body:not(.is-authed) .card-note span,
body:not(.is-authed) .card-metric span {
  display: block !important;
  color: rgba(82, 109, 145, 0.68) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

body:not(.is-authed) .card-main strong {
  display: block !important;
  margin-top: 8px !important;
  color: #17233b !important;
  font-size: 20px !important;
  line-height: 1.35 !important;
}

body:not(.is-authed) .card-main em {
  display: block !important;
  width: 100% !important;
  height: 8px !important;
  margin: 22px 0 18px !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, #5bc3f1, #3f73f6 74%, rgba(63, 115, 246, 0.22)) !important;
  box-shadow: 0 8px 18px rgba(63, 115, 246, 0.2) !important;
}

body:not(.is-authed) .card-main i {
  display: block !important;
  height: 9px !important;
  margin-top: 10px !important;
  border-radius: 999px !important;
  background: rgba(117, 157, 198, 0.16) !important;
}

body:not(.is-authed) .card-main i:last-child {
  width: 68% !important;
}

body:not(.is-authed) .card-metric {
  left: 10% !important;
  top: 34% !important;
  width: 138px !important;
  padding: 18px !important;
  animation: loginCardFloatB 6.8s ease-in-out infinite !important;
}

body:not(.is-authed) .card-metric b {
  display: block !important;
  color: #367bf5 !important;
  font-size: 34px !important;
  line-height: 1 !important;
}

body:not(.is-authed) .card-note {
  left: 20% !important;
  bottom: 14% !important;
  width: 220px !important;
  padding: 18px 20px !important;
  animation: loginCardFloatC 7.8s ease-in-out infinite !important;
}

body:not(.is-authed) .card-note b {
  display: block !important;
  margin-top: 6px !important;
  color: #1a2a45 !important;
  font-size: 15px !important;
}

body:not(.is-authed) .login-floating-files {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  visibility: visible !important;
  pointer-events: none !important;
  z-index: 5 !important;
}

body:not(.is-authed) .float-file {
  position: absolute !important;
  display: block !important;
  width: 126px !important;
  height: auto !important;
  min-height: 82px !important;
  padding: 16px 16px 14px !important;
  border: 1px solid rgba(255, 255, 255, 0.62) !important;
  border-radius: 22px !important;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.28)) !important;
  box-shadow: 0 18px 46px rgba(62, 101, 148, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
  color: #2a4061 !important;
  backdrop-filter: blur(16px) saturate(1.1) !important;
  -webkit-backdrop-filter: blur(16px) saturate(1.1) !important;
}

body:not(.is-authed) .float-file::before {
  top: 12px !important;
  right: 13px !important;
  width: 24px !important;
  height: 24px !important;
  border-radius: 9px !important;
  background: linear-gradient(135deg, rgba(81, 189, 239, 0.2), rgba(63, 113, 246, 0.1)) !important;
}

body:not(.is-authed) .float-file i {
  display: block !important;
  width: 34px !important;
  height: 34px !important;
  margin: 0 0 12px !important;
  border-radius: 13px !important;
  background:
    linear-gradient(rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0.08)),
    linear-gradient(135deg, rgba(79, 172, 245, 0.34), rgba(79, 117, 246, 0.18)) !important;
  box-shadow: none !important;
  opacity: 1 !important;
}

body:not(.is-authed) .float-file b {
  display: block !important;
  font-size: 14px !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
  color: #20304d !important;
  opacity: 0.94 !important;
}

body:not(.is-authed) .float-file small {
  display: block !important;
  margin-top: 5px !important;
  color: rgba(83, 107, 142, 0.56) !important;
  font-size: 11px !important;
}

body:not(.is-authed) .float-file.file-a {
  top: 10% !important;
  left: 11% !important;
  transform: rotate(-8deg) scale(0.92) !important;
}

body:not(.is-authed) .float-file.file-b {
  top: 12% !important;
  right: 12% !important;
  transform: rotate(7deg) scale(0.88) !important;
}

body:not(.is-authed) .float-file.file-c {
  right: 5% !important;
  bottom: 19% !important;
  transform: rotate(-5deg) scale(0.86) !important;
}

body:not(.is-authed) .float-file.file-d {
  bottom: 22% !important;
  left: 4% !important;
  transform: rotate(8deg) scale(0.84) !important;
}

body:not(.is-authed) .login-art .aquarium-brand-fish {
  top: 53% !important;
  left: 52% !important;
  width: 126px !important;
  height: 126px !important;
  border: 1px solid rgba(255, 255, 255, 0.58) !important;
  border-radius: 34px !important;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.2)) !important;
  box-shadow: 0 22px 52px rgba(53, 103, 154, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.72) !important;
  transform: translate(-50%, -50%) !important;
  opacity: 0.96 !important;
  z-index: 7 !important;
}

body:not(.is-authed) .login-art .aquarium-brand-fish img {
  width: 70px !important;
  height: 70px !important;
  opacity: 0.82 !important;
}

body:not(.is-authed) .login-art .aquarium-brand-halo {
  inset: -22px !important;
  border-radius: 42px !important;
  background: radial-gradient(circle, rgba(73, 165, 246, 0.24), transparent 68%) !important;
  opacity: 0.78 !important;
}

body:not(.is-authed) .login-characters,
body:not(.is-authed) .line-cat-login-svg,
body:not(.is-authed) .line-raster-stage,
body:not(.is-authed) .cat-aquarium-svg,
body:not(.is-authed) .cat-login-success-toast,
body:not(.is-authed) .cat-login-success-toast *,
body:not(.is-authed) .cat-success-particles,
body:not(.is-authed) .aquarium-caustics,
body:not(.is-authed) .aquarium-bubbles,
body:not(.is-authed) .aquarium-plant,
body:not(.is-authed) .aquarium-pebbles,
body:not(.is-authed) .aquarium-fish,
body:not(.is-authed) .aquarium-water-floor,
body:not(.is-authed) .login-visual-caption {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

@keyframes fluidLoginBlob {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50% { transform: translate3d(-42px, 32px, 0) rotate(16deg) scale(1.05); }
}

@keyframes loginArtSway {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -8px, 0); }
}

@keyframes loginMorphOrb {
  0%, 100% { border-radius: 40% 60% 46% 54% / 54% 44% 56% 46%; transform: rotate(0deg); }
  50% { border-radius: 56% 44% 58% 42% / 42% 58% 44% 56%; transform: rotate(3deg); }
}

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

@keyframes loginRibbonOne {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-18deg); opacity: 0.72; }
  50% { transform: translate3d(16px, -12px, 0) rotate(-12deg); opacity: 0.94; }
}

@keyframes loginRibbonTwo {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(16deg); opacity: 0.58; }
  50% { transform: translate3d(-18px, 10px, 0) rotate(11deg); opacity: 0.82; }
}

@keyframes loginCardFloatA {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-8px, -10px, 0); }
}

@keyframes loginCardFloatB {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(10px, -8px, 0); }
}

@keyframes loginCardFloatC {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(8px, 10px, 0); }
}

@media (max-width: 980px) {
  body:not(.is-authed) .login-shell {
    width: min(520px, calc(100vw - 28px)) !important;
    height: auto !important;
    min-height: 0 !important;
    grid-template-columns: 1fr !important;
  }

  body:not(.is-authed) .login-form-column {
    border-right: 0 !important;
  }

  body:not(.is-authed) .login-showcase {
    display: none !important;
  }
}

/* Login visual polish: no copy blocks, abstract liquid glass only. */
body:not(.is-authed) .login-data-card {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

body:not(.is-authed) .login-art::before {
  inset: 7% 4% 4% 5% !important;
  border: 0 !important;
  border-radius: 46% 54% 52% 48% / 42% 54% 46% 58% !important;
  background:
    radial-gradient(circle at 31% 24%, rgba(255, 255, 255, 0.78), transparent 23%),
    radial-gradient(circle at 72% 34%, rgba(136, 226, 218, 0.2), transparent 34%),
    radial-gradient(circle at 50% 58%, rgba(85, 171, 246, 0.32), transparent 46%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.34), rgba(199, 232, 255, 0.18)) !important;
  box-shadow:
    0 42px 105px rgba(43, 90, 140, 0.14),
    inset 12px 18px 40px rgba(255, 255, 255, 0.3),
    inset -18px -20px 46px rgba(68, 137, 224, 0.12) !important;
  filter: blur(0.2px) !important;
}

body:not(.is-authed) .login-art-glow {
  inset: 6% 4% 5% !important;
  opacity: 0.82 !important;
  filter: blur(30px) !important;
}

body:not(.is-authed) .login-fluid-ribbon i {
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), rgba(84, 186, 244, 0.2), transparent) !important;
  filter: blur(7px) !important;
}

body:not(.is-authed) .login-fluid-ribbon i:nth-child(1) {
  top: 17% !important;
  left: 7% !important;
  width: 470px !important;
  height: 120px !important;
  opacity: 0.72 !important;
}

body:not(.is-authed) .login-fluid-ribbon i:nth-child(2) {
  right: 1% !important;
  bottom: 20% !important;
  width: 420px !important;
  height: 108px !important;
  opacity: 0.58 !important;
}

body:not(.is-authed) .login-fluid-ribbon i:nth-child(3) {
  left: 25% !important;
  bottom: 10% !important;
  width: 260px !important;
  height: 58px !important;
  opacity: 0.38 !important;
}

body:not(.is-authed) .float-file {
  width: 112px !important;
  min-height: 132px !important;
  height: 132px !important;
  padding: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  border-radius: 30px !important;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.78), transparent 25%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0.14)) !important;
  box-shadow:
    0 24px 56px rgba(56, 102, 152, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset -12px -16px 30px rgba(84, 148, 224, 0.08) !important;
  opacity: 0.72 !important;
}

body:not(.is-authed) .float-file::before {
  top: 0 !important;
  right: 0 !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 0 30px 0 18px !important;
  background: linear-gradient(135deg, rgba(203, 229, 250, 0.28), rgba(255, 255, 255, 0.1)) !important;
}

body:not(.is-authed) .float-file::after {
  content: "" !important;
  position: absolute !important;
  left: 24px !important;
  right: 24px !important;
  top: 46px !important;
  height: 8px !important;
  border-radius: 999px !important;
  background: rgba(92, 160, 231, 0.18) !important;
  box-shadow:
    0 22px 0 rgba(92, 160, 231, 0.14),
    0 44px 0 rgba(92, 160, 231, 0.1) !important;
}

body:not(.is-authed) .float-file i {
  display: none !important;
}

body:not(.is-authed) .float-file b,
body:not(.is-authed) .float-file small {
  display: none !important;
}

body:not(.is-authed) .float-file.file-a {
  top: 12% !important;
  left: 15% !important;
  transform: rotate(-13deg) scale(0.86) !important;
  animation: glassShardA 8s ease-in-out infinite !important;
}

body:not(.is-authed) .float-file.file-b {
  top: 17% !important;
  right: 13% !important;
  transform: rotate(12deg) scale(0.82) !important;
  animation: glassShardB 8.6s ease-in-out infinite !important;
}

body:not(.is-authed) .float-file.file-c {
  right: 12% !important;
  bottom: 14% !important;
  transform: rotate(-8deg) scale(0.78) !important;
  animation: glassShardC 7.8s ease-in-out infinite !important;
}

body:not(.is-authed) .float-file.file-d {
  bottom: 16% !important;
  left: 13% !important;
  transform: rotate(10deg) scale(0.76) !important;
  animation: glassShardD 8.8s ease-in-out infinite !important;
}

body:not(.is-authed) .login-art .aquarium-brand-fish {
  border-radius: 38px !important;
  background:
    radial-gradient(circle at 34% 20%, rgba(255, 255, 255, 0.75), transparent 34%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.42), rgba(114, 191, 245, 0.12)) !important;
  box-shadow:
    0 26px 70px rgba(58, 114, 170, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    inset -14px -18px 28px rgba(62, 130, 226, 0.1) !important;
}

body:not(.is-authed) .login-art .aquarium-brand-fish img {
  opacity: 0.72 !important;
}

@keyframes glassShardA {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-13deg) scale(0.86); }
  50% { transform: translate3d(12px, -18px, 0) rotate(-8deg) scale(0.86); }
}

@keyframes glassShardB {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(12deg) scale(0.82); }
  50% { transform: translate3d(-16px, -12px, 0) rotate(7deg) scale(0.82); }
}

@keyframes glassShardC {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-8deg) scale(0.78); }
  50% { transform: translate3d(-12px, 15px, 0) rotate(-12deg) scale(0.78); }
}

@keyframes glassShardD {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(10deg) scale(0.76); }
  50% { transform: translate3d(14px, 13px, 0) rotate(15deg) scale(0.76); }
}

/* Login color refresh and fixed-height fit. */
body:not(.is-authed),
body:not(.is-authed) #app,
body:not(.is-authed) .login-screen {
  height: 100vh !important;
  height: 100svh !important;
  max-height: 100vh !important;
  max-height: 100svh !important;
  overflow: hidden !important;
}

body:not(.is-authed) .login-screen {
  padding: 18px !important;
  background:
    radial-gradient(circle at 13% 15%, rgba(188, 246, 232, 0.5), transparent 30%),
    radial-gradient(circle at 86% 16%, rgba(211, 199, 255, 0.42), transparent 31%),
    radial-gradient(circle at 64% 86%, rgba(126, 211, 247, 0.34), transparent 40%),
    linear-gradient(135deg, #f6fbf8 0%, #eef9fb 42%, #f8f4ff 100%) !important;
}

body:not(.is-authed) .login-screen::before {
  background:
    radial-gradient(circle at 34% 34%, rgba(255, 255, 255, 0.86), transparent 24%),
    radial-gradient(circle at 58% 62%, rgba(174, 141, 255, 0.18), transparent 45%),
    linear-gradient(135deg, rgba(109, 224, 201, 0.28), rgba(146, 182, 255, 0.18)) !important;
}

body:not(.is-authed) .login-shell {
  width: min(1120px, calc(100vw - 36px)) !important;
  height: min(624px, calc(100svh - 36px)) !important;
  min-height: 0 !important;
  border-color: rgba(255, 255, 255, 0.74) !important;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.32)) !important;
  box-shadow:
    0 30px 92px rgba(75, 93, 132, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

body:not(.is-authed) .login-form-column {
  padding: 28px 46px !important;
}

body:not(.is-authed) .login-panel {
  width: min(100%, 420px) !important;
  max-height: calc(100svh - 72px) !important;
  padding: 22px 26px !important;
  border-color: rgba(255, 255, 255, 0.7) !important;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.32)) !important;
}

body:not(.is-authed) .login-panel .brand.large {
  height: 58px !important;
  min-height: 58px !important;
  border-radius: 20px !important;
}

body:not(.is-authed) .brand-mark {
  background: linear-gradient(135deg, rgba(184, 246, 230, 0.5), rgba(215, 203, 255, 0.42)) !important;
}

body:not(.is-authed) .login-kicker {
  margin-top: 18px !important;
  color: #7c6df2 !important;
}

body:not(.is-authed) .login-panel h1 {
  margin: 8px 0 16px !important;
  font-size: 30px !important;
}

body:not(.is-authed) .auth-tabs {
  margin-bottom: 14px !important;
  background: rgba(239, 246, 250, 0.72) !important;
}

body:not(.is-authed) .field {
  gap: 6px !important;
  margin-bottom: 12px !important;
}

body:not(.is-authed) .field input,
body:not(.is-authed) .field select,
body:not(.is-authed) .password-input,
body:not(.is-authed) .code-row input {
  min-height: 50px !important;
  height: 50px !important;
  border-color: rgba(154, 206, 217, 0.46) !important;
  background: rgba(255, 255, 255, 0.68) !important;
}

body:not(.is-authed) .login-options {
  margin: 2px 0 18px !important;
}

body:not(.is-authed) .primary-btn.wide {
  min-height: 56px !important;
  height: 56px !important;
  background: linear-gradient(135deg, #67d8c7 0%, #7e8df7 100%) !important;
  box-shadow: 0 18px 36px rgba(103, 135, 230, 0.24) !important;
}

body:not(.is-authed) .auth-footer {
  margin-top: 12px !important;
}

body:not(.is-authed) .login-art {
  height: min(500px, calc(100svh - 96px)) !important;
}

body:not(.is-authed) .login-art::before {
  background:
    radial-gradient(circle at 31% 24%, rgba(255, 255, 255, 0.82), transparent 23%),
    radial-gradient(circle at 72% 34%, rgba(164, 235, 215, 0.26), transparent 34%),
    radial-gradient(circle at 50% 58%, rgba(169, 148, 255, 0.2), transparent 45%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.38), rgba(207, 245, 235, 0.16)) !important;
}

body:not(.is-authed) .login-art-glow {
  background:
    conic-gradient(from 130deg, rgba(104, 221, 199, 0.24), rgba(171, 151, 255, 0.16), rgba(120, 207, 244, 0.2), rgba(104, 221, 199, 0.24)) !important;
}

body:not(.is-authed) .login-fluid-ribbon i {
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.46), rgba(113, 226, 203, 0.24), rgba(172, 150, 255, 0.12), transparent) !important;
}

body:not(.is-authed) .float-file {
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.8), transparent 25%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.46), rgba(231, 247, 241, 0.15)) !important;
  box-shadow:
    0 24px 56px rgba(88, 105, 151, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset -12px -16px 30px rgba(140, 117, 236, 0.07) !important;
}

body:not(.is-authed) .float-file::after {
  background: rgba(128, 193, 211, 0.16) !important;
  box-shadow:
    0 22px 0 rgba(157, 140, 236, 0.12),
    0 44px 0 rgba(102, 205, 186, 0.1) !important;
}

body:not(.is-authed) .login-art .aquarium-brand-fish {
  background:
    radial-gradient(circle at 34% 20%, rgba(255, 255, 255, 0.78), transparent 34%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.44), rgba(132, 224, 203, 0.14), rgba(171, 150, 255, 0.08)) !important;
  box-shadow:
    0 26px 70px rgba(90, 107, 155, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    inset -14px -18px 28px rgba(145, 128, 236, 0.08) !important;
}

@media (max-height: 720px) {
  body:not(.is-authed) .login-screen {
    padding: 12px !important;
  }

  body:not(.is-authed) .login-shell {
    height: calc(100svh - 24px) !important;
  }

  body:not(.is-authed) .login-form-column {
    padding: 20px 38px !important;
  }

  body:not(.is-authed) .login-panel {
    padding: 18px 24px !important;
  }

  body:not(.is-authed) .login-panel .brand.large {
    height: 54px !important;
    min-height: 54px !important;
  }

  body:not(.is-authed) .login-kicker {
    margin-top: 14px !important;
  }

  body:not(.is-authed) .login-panel h1 {
    margin-bottom: 12px !important;
    font-size: 28px !important;
  }

  body:not(.is-authed) .auth-tabs {
    margin-bottom: 10px !important;
  }

  body:not(.is-authed) .field {
    margin-bottom: 9px !important;
  }

  body:not(.is-authed) .login-options {
    margin-bottom: 12px !important;
  }

  body:not(.is-authed) .primary-btn.wide {
    min-height: 52px !important;
    height: 52px !important;
  }

  body:not(.is-authed) .auth-footer {
    margin-top: 8px !important;
  }
}

/* Minimal glass login: calm low-saturation office style. */
body:not(.is-authed) .login-screen {
  padding: 22px !important;
  background:
    radial-gradient(circle at 18% 16%, rgba(235, 244, 252, 0.92), transparent 34%),
    radial-gradient(circle at 84% 18%, rgba(232, 240, 248, 0.78), transparent 36%),
    linear-gradient(135deg, #f6f9fc 0%, #eef4f8 52%, #f8fafc 100%) !important;
}

body:not(.is-authed) .login-screen::before {
  width: 620px !important;
  height: 620px !important;
  background:
    radial-gradient(circle at 40% 36%, rgba(255, 255, 255, 0.82), transparent 28%),
    radial-gradient(circle at 58% 64%, rgba(176, 201, 225, 0.18), transparent 46%),
    linear-gradient(135deg, rgba(222, 235, 246, 0.36), rgba(240, 245, 250, 0.18)) !important;
  opacity: 0.72 !important;
  filter: blur(18px) !important;
}

body:not(.is-authed) .login-screen::after {
  opacity: 0.18 !important;
}

body:not(.is-authed) .login-shell {
  height: min(620px, calc(100svh - 44px)) !important;
  border-color: rgba(255, 255, 255, 0.78) !important;
  border-radius: 34px !important;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(247, 250, 253, 0.52)) !important;
  box-shadow:
    0 28px 82px rgba(51, 72, 98, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.92) !important;
}

body:not(.is-authed) .login-shell::before {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.62), transparent 36%),
    radial-gradient(circle at 82% 26%, rgba(202, 219, 235, 0.18), transparent 34%) !important;
}

body:not(.is-authed) .login-form-column {
  padding: 28px 48px !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(248, 251, 253, 0.5)) !important;
  border-right-color: rgba(220, 230, 239, 0.52) !important;
}

body:not(.is-authed) .login-panel {
  padding: 22px 26px !important;
  border-color: rgba(225, 234, 242, 0.78) !important;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(249, 252, 254, 0.48)) !important;
  box-shadow:
    0 20px 58px rgba(48, 68, 92, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.86) !important;
}

body:not(.is-authed) .login-panel .brand.large {
  border-color: rgba(216, 229, 240, 0.86) !important;
  background: rgba(255, 255, 255, 0.62) !important;
  box-shadow: 0 12px 28px rgba(56, 78, 105, 0.05) !important;
}

body:not(.is-authed) .brand-mark {
  background: linear-gradient(135deg, #eef5fb, #f9fbfd) !important;
  border-color: rgba(202, 219, 234, 0.78) !important;
}

body:not(.is-authed) .login-kicker {
  color: #6c89aa !important;
  letter-spacing: 0.34em !important;
}

body:not(.is-authed) .login-panel h1 {
  color: #172235 !important;
}

body:not(.is-authed) .auth-tabs {
  border-color: rgba(211, 224, 236, 0.82) !important;
  background: rgba(236, 243, 249, 0.82) !important;
  box-shadow: inset 0 1px 2px rgba(59, 78, 101, 0.05) !important;
}

body:not(.is-authed) .auth-tabs button {
  color: #72859b !important;
}

body:not(.is-authed) .auth-tabs button.active {
  color: #203047 !important;
  background: rgba(255, 255, 255, 0.94) !important;
  box-shadow: 0 8px 20px rgba(55, 74, 98, 0.08) !important;
}

body:not(.is-authed) .field span,
body:not(.is-authed) .remember-password,
body:not(.is-authed) .text-btn {
  color: #70849b !important;
}

body:not(.is-authed) .field input,
body:not(.is-authed) .field select,
body:not(.is-authed) .password-input,
body:not(.is-authed) .code-row input {
  border-color: rgba(196, 215, 232, 0.78) !important;
  background: rgba(255, 255, 255, 0.68) !important;
  color: #223047 !important;
}

body:not(.is-authed) .primary-btn.wide {
  background: linear-gradient(135deg, #6aa6d8 0%, #4f7fb9 100%) !important;
  box-shadow: 0 16px 32px rgba(68, 108, 152, 0.22) !important;
}

body:not(.is-authed) .login-showcase {
  padding: 40px !important;
}

body:not(.is-authed) .login-art {
  height: min(470px, calc(100svh - 116px)) !important;
  animation: none !important;
}

body:not(.is-authed) .login-art::before {
  inset: 8% 6% 6% 7% !important;
  border-radius: 36px !important;
  background:
    radial-gradient(circle at 42% 30%, rgba(255, 255, 255, 0.78), transparent 26%),
    radial-gradient(circle at 55% 58%, rgba(190, 214, 235, 0.26), transparent 46%),
    linear-gradient(150deg, rgba(250, 253, 255, 0.44), rgba(230, 240, 248, 0.24)) !important;
  box-shadow:
    0 34px 86px rgba(52, 75, 102, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    inset -16px -20px 42px rgba(161, 188, 213, 0.12) !important;
  animation: none !important;
}

body:not(.is-authed) .login-art::after {
  opacity: 0.32 !important;
}

body:not(.is-authed) .login-art-glow {
  inset: 18% 14% 14% !important;
  border-radius: 44px !important;
  background:
    radial-gradient(circle at center, rgba(184, 213, 236, 0.26), transparent 56%) !important;
  filter: blur(24px) !important;
  opacity: 0.72 !important;
  animation: none !important;
}

body:not(.is-authed) .login-fluid-ribbon {
  opacity: 0.36 !important;
}

body:not(.is-authed) .login-fluid-ribbon i {
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), rgba(179, 205, 228, 0.2), transparent) !important;
  animation: none !important;
}

body:not(.is-authed) .float-file {
  width: 106px !important;
  height: 126px !important;
  min-height: 126px !important;
  border-color: rgba(255, 255, 255, 0.58) !important;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.72), transparent 25%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.38), rgba(238, 244, 249, 0.18)) !important;
  box-shadow:
    0 20px 44px rgba(54, 75, 101, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
  opacity: 0.45 !important;
}

body:not(.is-authed) .float-file::after {
  background: rgba(154, 181, 207, 0.12) !important;
  box-shadow:
    0 22px 0 rgba(154, 181, 207, 0.1),
    0 44px 0 rgba(154, 181, 207, 0.08) !important;
}

body:not(.is-authed) .float-file.file-a,
body:not(.is-authed) .float-file.file-b,
body:not(.is-authed) .float-file.file-c,
body:not(.is-authed) .float-file.file-d {
  animation: none !important;
}

body:not(.is-authed) .login-art .aquarium-brand-fish {
  width: 118px !important;
  height: 118px !important;
  border-color: rgba(255, 255, 255, 0.62) !important;
  background:
    radial-gradient(circle at 34% 20%, rgba(255, 255, 255, 0.78), transparent 34%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.44), rgba(218, 232, 244, 0.18)) !important;
  box-shadow:
    0 22px 56px rgba(56, 78, 105, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.78) !important;
}

body:not(.is-authed) .login-art .aquarium-brand-fish img {
  opacity: 0.68 !important;
}

body:not(.is-authed) .login-art .aquarium-brand-halo {
  background: radial-gradient(circle, rgba(168, 197, 224, 0.18), transparent 68%) !important;
}

@media (max-height: 720px) {
  body:not(.is-authed) .login-screen {
    padding: 14px !important;
  }

  body:not(.is-authed) .login-shell {
    height: calc(100svh - 28px) !important;
  }
}

/* Login fit fix: left panel must never scroll on standard laptop viewports. */
body:not(.is-authed) .login-form-column {
  align-items: center !important;
  justify-items: center !important;
  min-height: 0 !important;
  height: 100% !important;
  padding: 18px 42px !important;
  overflow: hidden !important;
}

body:not(.is-authed) .login-panel:not([hidden]) {
  display: grid !important;
  gap: 8px !important;
  width: min(100%, 386px) !important;
  max-height: none !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 18px 22px !important;
  overflow: visible !important;
}

body:not(.is-authed) #loginForm .brand.large {
  height: 50px !important;
  min-height: 50px !important;
  margin: 0 !important;
  padding: 7px 10px !important;
  border-radius: 18px !important;
}

body:not(.is-authed) #loginForm .brand.large .brand-mark {
  width: 36px !important;
  height: 36px !important;
  border-radius: 12px !important;
}

body:not(.is-authed) #loginForm .brand strong {
  font-size: 15px !important;
}

body:not(.is-authed) #loginForm .brand span {
  font-size: 12px !important;
}

body:not(.is-authed) #loginForm .login-kicker {
  display: block !important;
  margin-top: 12px !important;
  font-size: 9px !important;
  line-height: 1.2 !important;
  letter-spacing: 0.3em !important;
}

body:not(.is-authed) #loginForm .login-kicker::before {
  display: none !important;
}

body:not(.is-authed) #loginForm h1 {
  margin: 5px 0 10px !important;
  font-size: 28px !important;
  line-height: 1.16 !important;
  letter-spacing: 0.02em !important;
  text-align: left !important;
}

body:not(.is-authed) #loginForm h1::after {
  display: none !important;
  content: none !important;
}

body:not(.is-authed) #loginForm .auth-tabs {
  height: 44px !important;
  min-height: 44px !important;
  margin: 0 0 8px !important;
  padding: 4px !important;
  border-radius: 999px !important;
}

body:not(.is-authed) #loginForm .auth-tabs::before {
  top: 4px !important;
  left: 4px !important;
  width: calc((100% - 8px) / 2) !important;
  height: calc(100% - 8px) !important;
  border-radius: 999px !important;
}

body:not(.is-authed) #loginForm .auth-tabs button {
  min-height: 36px !important;
  font-size: 14px !important;
}

body:not(.is-authed) #loginForm .field {
  gap: 4px !important;
  margin-bottom: 7px !important;
}

body:not(.is-authed) #loginForm .field > span {
  font-size: 12px !important;
  line-height: 1.2 !important;
}

body:not(.is-authed) #loginForm .field input,
body:not(.is-authed) #loginForm .code-row input,
body:not(.is-authed) #loginForm .password-input {
  height: 44px !important;
  min-height: 44px !important;
  border-radius: 15px !important;
}

body:not(.is-authed) #loginUser,
body:not(.is-authed) #loginPass,
body:not(.is-authed) #loginPhone,
body:not(.is-authed) #loginEmail,
body:not(.is-authed) #loginCode {
  padding-left: 16px !important;
  background-image: none !important;
}

body:not(.is-authed) #loginForm .login-options {
  margin: 0 0 9px !important;
  min-height: 24px !important;
  font-size: 13px !important;
}

body:not(.is-authed) #loginForm .remember-password {
  gap: 7px !important;
}

body:not(.is-authed) #loginForm .remember-password input {
  width: 15px !important;
  height: 15px !important;
}

body:not(.is-authed) #loginForm .primary-btn.wide {
  height: 48px !important;
  min-height: 48px !important;
  margin: 0 !important;
  border-radius: 15px !important;
  font-size: 15px !important;
}

body:not(.is-authed) #loginForm .auth-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  margin-top: 8px !important;
  font-size: 13px !important;
}

body:not(.is-authed) #loginForm .auth-footer span {
  display: block !important;
  width: 1px !important;
  height: 12px !important;
}

body:not(.is-authed) #loginForm .auth-footer .text-btn:first-child {
  min-height: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

@media (max-height: 720px) {
  body:not(.is-authed) .login-form-column {
    padding: 12px 38px !important;
  }

  body:not(.is-authed) .login-panel:not([hidden]) {
    gap: 6px !important;
    width: min(100%, 378px) !important;
    padding: 14px 20px !important;
  }

  body:not(.is-authed) #loginForm .brand.large {
    height: 46px !important;
    min-height: 46px !important;
  }

  body:not(.is-authed) #loginForm .login-kicker {
    margin-top: 8px !important;
  }

  body:not(.is-authed) #loginForm h1 {
    margin-bottom: 8px !important;
    font-size: 26px !important;
  }

  body:not(.is-authed) #loginForm .auth-tabs {
    height: 42px !important;
    min-height: 42px !important;
    margin-bottom: 6px !important;
  }

  body:not(.is-authed) #loginForm .field {
    margin-bottom: 5px !important;
  }

  body:not(.is-authed) #loginForm .field input,
  body:not(.is-authed) #loginForm .code-row input,
  body:not(.is-authed) #loginForm .password-input {
    height: 42px !important;
    min-height: 42px !important;
  }

  body:not(.is-authed) #loginForm .login-options {
    margin-bottom: 7px !important;
  }

  body:not(.is-authed) #loginForm .primary-btn.wide {
    height: 46px !important;
    min-height: 46px !important;
  }
}

.site-record-link {
  position: fixed;
  right: 50%;
  bottom: 14px;
  transform: translateX(50%);
  z-index: 9999;
  color: rgba(82, 98, 117, 0.64);
  font-size: 12px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: color 160ms ease, opacity 160ms ease;
}

.site-record-link:hover {
  color: rgba(55, 92, 138, 0.88);
}

body:not(.is-authed) .site-record-link {
  display: inline-block;
}

body.is-authed .site-record-link {
  display: none;
}

@media (max-width: 760px) {
  .site-record-link,
  body:not(.is-authed) .site-record-link {
    right: 50%;
    bottom: 10px;
    transform: translateX(50%);
  }
}

/* Auth layout rescue: keep login/register/forgot complete on embedded and short viewports. */
body:not(.is-authed),
body:not(.is-authed) #app,
body:not(.is-authed) .login-screen {
  height: 100svh !important;
  min-height: 100svh !important;
  max-height: 100svh !important;
  overflow-x: hidden !important;
  overflow-y: hidden !important;
}

body:not(.is-authed) .login-screen {
  align-items: center !important;
  justify-content: center !important;
  padding: clamp(12px, 2.4vw, 22px) !important;
  scroll-padding: 18px !important;
}

body:not(.is-authed) .login-shell {
  width: min(1120px, calc(100vw - 32px)) !important;
  height: min(620px, calc(100svh - 32px)) !important;
  min-height: min(620px, calc(100svh - 32px)) !important;
  max-height: calc(100svh - 32px) !important;
  overflow: hidden !important;
}

body:not(.is-authed) .login-form-column {
  align-content: stretch !important;
  align-items: stretch !important;
  justify-items: center !important;
  height: 100% !important;
  min-height: 0 !important;
  padding: clamp(18px, 3vw, 34px) clamp(18px, 4vw, 42px) !important;
  overflow: hidden !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(150, 184, 235, 0.42) transparent !important;
}

body:not(.is-authed) .login-form-column::-webkit-scrollbar {
  width: 8px !important;
}

body:not(.is-authed) .login-form-column::-webkit-scrollbar-thumb {
  border: 2px solid transparent !important;
  border-radius: 999px !important;
  background: rgba(150, 184, 235, 0.42) !important;
  background-clip: content-box !important;
}

body:not(.is-authed) .login-form-column:has(.register-panel:not([hidden])) {
  align-content: stretch !important;
}

body:not(.is-authed) .login-panel:not([hidden]),
body:not(.is-authed) .register-panel:not([hidden]) {
  align-content: start !important;
  width: min(100%, 396px) !important;
  max-width: 396px !important;
  max-height: 100% !important;
  min-height: 0 !important;
  height: 100% !important;
  margin: 0 auto !important;
  padding: 18px 22px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  gap: 8px !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(150, 184, 235, 0.36) transparent !important;
}

body:not(.is-authed) .login-panel:not([hidden])::-webkit-scrollbar,
body:not(.is-authed) .register-panel:not([hidden])::-webkit-scrollbar {
  width: 8px !important;
}

body:not(.is-authed) .login-panel:not([hidden])::-webkit-scrollbar-thumb,
body:not(.is-authed) .register-panel:not([hidden])::-webkit-scrollbar-thumb {
  border: 2px solid transparent !important;
  border-radius: 999px !important;
  background: rgba(150, 184, 235, 0.36) !important;
  background-clip: content-box !important;
}

body:not(.is-authed) #loginForm .auth-footer,
body:not(.is-authed) .register-panel .auth-flow-actions {
  margin-top: auto !important;
}

body:not(.is-authed) #loginError {
  display: block !important;
  min-height: 20px !important;
  max-height: 52px !important;
  margin: 0 !important;
  padding: 0 2px !important;
  overflow: hidden !important;
  color: #ef6b72 !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
  text-align: left !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

body:not(.is-authed) #loginError:empty {
  min-height: 0 !important;
  max-height: 0 !important;
  padding: 0 !important;
}

body:not(.is-authed) .register-panel:not([hidden]) {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  column-gap: 10px !important;
  row-gap: 8px !important;
}

body:not(.is-authed) .register-panel:not([hidden]) .brand {
  display: none !important;
}

body:not(.is-authed) .auth-flow-head {
  gap: 2px !important;
  margin: 0 0 4px !important;
}

body:not(.is-authed) .register-panel .auth-flow-head,
body:not(.is-authed) .register-panel .auth-code-field,
body:not(.is-authed) .register-panel .register-code-field,
body:not(.is-authed) .register-panel .form-error,
body:not(.is-authed) .register-panel .auth-flow-actions,
body:not(.is-authed) .register-panel .field:has(#registerChannel),
body:not(.is-authed) .register-panel .field:has(#registerPhone),
body:not(.is-authed) .register-panel .field:has(#registerEmail),
body:not(.is-authed) .register-panel .field:has(#forgotPhone),
body:not(.is-authed) .register-panel .field:has(#forgotEmail) {
  grid-column: 1 / -1 !important;
}

body:not(.is-authed) .register-panel .field:has(#registerUser),
body:not(.is-authed) .register-panel .field:has(#registerName),
body:not(.is-authed) .register-panel .field:has(#registerPass),
body:not(.is-authed) .register-panel .field:has(#registerConfirm),
body:not(.is-authed) .register-panel .field:has(#forgotUser),
body:not(.is-authed) .register-panel .field:has(#forgotChannel),
body:not(.is-authed) .register-panel .field:has(#forgotPass),
body:not(.is-authed) .register-panel .field:has(#forgotConfirm) {
  grid-column: auto !important;
}

body:not(.is-authed) .register-panel .auth-flow-head h1,
body:not(.is-authed) .auth-flow-head h1 {
  margin: 0 !important;
  font-size: clamp(22px, 3vw, 26px) !important;
  line-height: 1.14 !important;
}

body:not(.is-authed) .auth-flow-head p {
  margin: 0 !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

body:not(.is-authed) .register-panel .field,
body:not(.is-authed) .register-panel .auth-code-field,
body:not(.is-authed) .register-panel .register-code-field {
  gap: 4px !important;
  margin-bottom: 0 !important;
}

body:not(.is-authed) .register-panel .field > span {
  font-size: 12px !important;
  line-height: 1.2 !important;
}

body:not(.is-authed) .register-panel .field input,
body:not(.is-authed) .register-panel .field select,
body:not(.is-authed) .register-panel .code-row input {
  height: 42px !important;
  min-height: 42px !important;
  border-radius: 14px !important;
  padding: 0 14px !important;
  font-size: 14px !important;
}

body:not(.is-authed) .register-panel .code-row {
  grid-template-columns: minmax(0, 1fr) minmax(112px, 128px) !important;
  gap: 8px !important;
}

body:not(.is-authed) .register-panel .code-row .ghost-btn {
  min-height: 42px !important;
  height: 42px !important;
  border-radius: 14px !important;
  padding: 0 10px !important;
  font-size: 13px !important;
}

body:not(.is-authed) .register-panel .form-error {
  min-height: 18px !important;
  margin: 0 !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

body:not(.is-authed) .register-panel .auth-flow-actions {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr) !important;
  gap: 10px !important;
  margin-top: 2px !important;
}

body:not(.is-authed) .register-panel .auth-flow-actions .primary-btn.wide,
body:not(.is-authed) .register-panel .auth-flow-actions .ghost-btn.wide {
  min-height: 44px !important;
  height: 44px !important;
  border-radius: 14px !important;
  font-size: 14px !important;
}

body:not(.is-authed) .login-showcase {
  min-height: 0 !important;
}

body:not(.is-authed) .login-art {
  height: min(470px, calc(100svh - 96px)) !important;
}

@media (max-width: 980px), (max-height: 760px) {
  body:not(.is-authed) .login-shell {
    width: min(520px, calc(100vw - 24px)) !important;
    grid-template-columns: 1fr !important;
    height: min(620px, calc(100svh - 24px)) !important;
    min-height: min(620px, calc(100svh - 24px)) !important;
    max-height: calc(100svh - 24px) !important;
  }

  body:not(.is-authed) .login-form-column {
    border-right: 0 !important;
    padding: 14px !important;
    align-content: stretch !important;
    align-items: stretch !important;
  }

  body:not(.is-authed) .login-showcase {
    display: none !important;
  }

  body:not(.is-authed) .login-panel:not([hidden]),
  body:not(.is-authed) .register-panel:not([hidden]) {
    width: min(100%, 390px) !important;
    padding: 16px 18px !important;
  }
}

@media (max-width: 520px) {
  body:not(.is-authed) .login-screen {
    padding: 10px !important;
  }

  body:not(.is-authed) .login-shell {
    width: 100% !important;
    border-radius: 22px !important;
  }

  body:not(.is-authed) .login-panel:not([hidden]),
  body:not(.is-authed) .register-panel:not([hidden]) {
    max-width: none !important;
    padding: 14px !important;
  }

  body:not(.is-authed) .register-panel .code-row {
    grid-template-columns: minmax(0, 1fr) 110px !important;
  }

  body:not(.is-authed) .register-panel .code-row .ghost-btn {
    font-size: 12px !important;
  }
}

/* Energy daily summary: keep long daily lists scrollable inside the card. */
body.is-authed .energy-daily-table {
  max-height: min(520px, 54vh);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(133, 159, 190, 0.48) transparent;
}

body.is-authed .energy-daily-table::-webkit-scrollbar {
  width: 8px;
}

body.is-authed .energy-daily-table::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(133, 159, 190, 0.48);
  background-clip: content-box;
}

body.is-authed .energy-daily-table th {
  position: sticky;
  top: 0;
  z-index: 2;
}

@media (max-height: 820px) {
  body.is-authed .energy-daily-table {
    max-height: min(420px, 48vh);
  }
}

/* Mobile auth redesign: same-size login/register/forgot window. */
@media (max-width: 640px) {
  body:not(.is-authed),
  body:not(.is-authed) #app,
  body:not(.is-authed) .login-screen {
    width: 100vw !important;
    min-height: 100svh !important;
    height: 100svh !important;
    max-height: 100svh !important;
    overflow: hidden !important;
  }

  body:not(.is-authed) .login-screen {
    display: grid !important;
    place-items: center !important;
    padding: 16px !important;
    background:
      radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.92), transparent 28%),
      radial-gradient(circle at 88% 8%, rgba(161, 205, 255, 0.38), transparent 26%),
      linear-gradient(160deg, #eff7ff 0%, #d8ecff 48%, #f9fcff 100%) !important;
  }

  body:not(.is-authed) .login-screen::before {
    content: "" !important;
    position: absolute !important;
    inset: 8px !important;
    border: 1px solid rgba(134, 184, 246, 0.18) !important;
    border-radius: 28px !important;
    background:
      linear-gradient(120deg, rgba(255,255,255,0.36), transparent 42%),
      radial-gradient(circle at 50% 0%, rgba(84, 151, 246, 0.12), transparent 42%) !important;
    pointer-events: none !important;
  }

  body:not(.is-authed) .login-screen::after {
    display: none !important;
  }

  body:not(.is-authed) .login-shell {
    position: relative !important;
    z-index: 1 !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: min(365px, calc(100vw - 28px)) !important;
    height: min(704px, calc(100svh - 44px)) !important;
    min-height: 0 !important;
    max-height: calc(100svh - 44px) !important;
    overflow: hidden !important;
    border: 1px solid rgba(139, 184, 244, 0.28) !important;
    border-radius: 28px !important;
    background: rgba(255, 255, 255, 0.54) !important;
    box-shadow: 0 28px 80px rgba(59, 111, 180, 0.16), inset 0 1px 0 rgba(255,255,255,0.72) !important;
    backdrop-filter: blur(18px) saturate(1.12) !important;
    -webkit-backdrop-filter: blur(18px) saturate(1.12) !important;
  }

  body:not(.is-authed) .login-shell::before {
    content: "" !important;
    position: absolute !important;
    inset: 12px !important;
    border: 1px solid rgba(139, 184, 244, 0.22) !important;
    border-radius: 24px !important;
    background: linear-gradient(180deg, rgba(255,255,255,0.56), rgba(255,255,255,0.18)) !important;
    pointer-events: none !important;
  }

  body:not(.is-authed) .login-shell::after {
    display: none !important;
  }

  body:not(.is-authed) .login-showcase {
    display: none !important;
  }

  body:not(.is-authed) .login-form-column {
    position: relative !important;
    z-index: 1 !important;
    display: grid !important;
    align-content: stretch !important;
    align-items: stretch !important;
    justify-items: stretch !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 20px !important;
    overflow: hidden !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body:not(.is-authed) .login-panel:not([hidden]),
  body:not(.is-authed) .register-panel:not([hidden]) {
    display: grid !important;
    align-content: start !important;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 10px 5px 6px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    background: transparent !important;
    box-shadow: none !important;
    scrollbar-width: none !important;
  }

  body:not(.is-authed) .login-panel:not([hidden])::-webkit-scrollbar,
  body:not(.is-authed) .register-panel:not([hidden])::-webkit-scrollbar {
    display: none !important;
  }

  body:not(.is-authed) #loginForm {
    grid-template-rows: auto auto auto auto auto auto minmax(0, auto) auto auto;
    gap: 13px !important;
  }

  body:not(.is-authed) .login-panel .brand.large {
    display: grid !important;
    grid-template-columns: 48px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    height: auto !important;
    min-height: 68px !important;
    margin: 0 0 8px !important;
    padding: 10px 12px !important;
    border: 1px solid rgba(139, 184, 244, 0.32) !important;
    border-radius: 20px !important;
    background: rgba(255, 255, 255, 0.42) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.78), 0 12px 28px rgba(70, 116, 180, 0.06) !important;
  }

  body:not(.is-authed) .login-panel .brand.large .brand-mark {
    width: 46px !important;
    height: 46px !important;
    border-radius: 15px !important;
  }

  body:not(.is-authed) .login-panel .brand strong {
    font-size: 17px !important;
    line-height: 1.15 !important;
  }

  body:not(.is-authed) .login-panel .brand span {
    margin-top: 3px !important;
    font-size: 12px !important;
    line-height: 1.25 !important;
  }

  body:not(.is-authed) .login-kicker {
    margin: 2px 0 0 !important;
    color: #4f83eb !important;
    font-size: 9px !important;
    letter-spacing: .28em !important;
  }

  body:not(.is-authed) #loginForm h1 {
    margin: 0 0 4px !important;
    font-size: 34px !important;
    line-height: 1.05 !important;
    letter-spacing: .03em !important;
    text-align: left !important;
  }

  body:not(.is-authed) .login-panel .auth-tabs {
    height: 50px !important;
    min-height: 50px !important;
    margin: 0 !important;
    padding: 4px !important;
    border-radius: 999px !important;
    background: rgba(217, 234, 255, 0.64) !important;
  }

  body:not(.is-authed) .login-panel .auth-tabs button {
    min-height: 42px !important;
    font-size: 14px !important;
  }

  body:not(.is-authed) .login-panel .field {
    gap: 5px !important;
    margin: 0 !important;
  }

  body:not(.is-authed) .login-panel .field > span,
  body:not(.is-authed) .register-panel .field > span,
  body:not(.is-authed) .remember-password span {
    font-size: 12px !important;
    line-height: 1.2 !important;
  }

  body:not(.is-authed) .login-panel .field input,
  body:not(.is-authed) .login-panel .code-row input,
  body:not(.is-authed) .register-panel .field input,
  body:not(.is-authed) .register-panel .field select,
  body:not(.is-authed) .register-panel .code-row input,
  body:not(.is-authed) .password-input {
    height: 52px !important;
    min-height: 52px !important;
    border-radius: 17px !important;
    background-color: rgba(255, 255, 255, 0.54) !important;
  }

  body:not(.is-authed) #loginUser,
  body:not(.is-authed) #loginPass,
  body:not(.is-authed) #loginPhone,
  body:not(.is-authed) #loginEmail,
  body:not(.is-authed) #loginCode {
    padding-left: 48px !important;
    background-position: 17px center !important;
  }

  body:not(.is-authed) .login-options {
    min-height: 22px !important;
    margin: 1px 0 0 !important;
    font-size: 12px !important;
  }

  body:not(.is-authed) .login-panel .primary-btn.wide {
    height: 58px !important;
    min-height: 58px !important;
    margin: 1px 0 0 !important;
    border-radius: 18px !important;
    font-size: 15px !important;
  }

  body:not(.is-authed) .login-panel .auth-footer {
    display: flex !important;
    gap: 10px !important;
    justify-content: center !important;
    margin-top: 4px !important;
    font-size: 12px !important;
  }

  body:not(.is-authed) .login-panel .auth-footer .text-btn {
    font-size: 12px !important;
  }

  body:not(.is-authed) .register-panel:not([hidden]) {
    grid-template-columns: 1fr !important;
    row-gap: 8px !important;
  }

  body:not(.is-authed) .register-panel .brand {
    display: none !important;
  }

  body:not(.is-authed) .register-panel .auth-flow-head {
    gap: 3px !important;
    margin: 0 0 2px !important;
  }

  body:not(.is-authed) .register-panel .auth-flow-head h1 {
    font-size: 27px !important;
    line-height: 1.08 !important;
  }

  body:not(.is-authed) .register-panel .auth-flow-head p {
    font-size: 12px !important;
    line-height: 1.35 !important;
  }

  body:not(.is-authed) .register-panel .field {
    gap: 4px !important;
    margin: 0 !important;
  }

  body:not(.is-authed) .register-panel .field input,
  body:not(.is-authed) .register-panel .field select,
  body:not(.is-authed) .register-panel .code-row input {
    height: 44px !important;
    min-height: 44px !important;
    border-radius: 14px !important;
  }

  body:not(.is-authed) .register-panel .code-row {
    grid-template-columns: minmax(0, 1fr) 108px !important;
    gap: 8px !important;
  }

  body:not(.is-authed) .register-panel .code-row .ghost-btn {
    height: 44px !important;
    min-height: 44px !important;
    border-radius: 14px !important;
    padding: 0 8px !important;
    font-size: 12px !important;
  }

  body:not(.is-authed) .register-panel .auth-flow-actions {
    grid-template-columns: 1fr 1fr !important;
    gap: 9px !important;
    margin-top: 2px !important;
  }

  body:not(.is-authed) .register-panel .auth-flow-actions .primary-btn.wide,
  body:not(.is-authed) .register-panel .auth-flow-actions .ghost-btn.wide {
    height: 48px !important;
    min-height: 48px !important;
    border-radius: 14px !important;
    font-size: 13px !important;
  }
}

@media (max-width: 640px) and (max-height: 760px) {
  body:not(.is-authed) .login-shell {
    height: calc(100svh - 24px) !important;
    max-height: calc(100svh - 24px) !important;
  }

  body:not(.is-authed) .login-form-column {
    padding: 14px !important;
  }

  body:not(.is-authed) #loginForm {
    gap: 9px !important;
  }

  body:not(.is-authed) .login-panel .brand.large {
    min-height: 58px !important;
    margin-bottom: 3px !important;
    padding: 8px 10px !important;
  }

  body:not(.is-authed) .login-panel .brand.large .brand-mark {
    width: 40px !important;
    height: 40px !important;
  }

  body:not(.is-authed) #loginForm h1 {
    font-size: 29px !important;
  }

  body:not(.is-authed) .login-panel .auth-tabs {
    height: 46px !important;
    min-height: 46px !important;
  }

  body:not(.is-authed) .login-panel .field input,
  body:not(.is-authed) .login-panel .code-row input,
  body:not(.is-authed) .password-input {
    height: 48px !important;
    min-height: 48px !important;
  }

  body:not(.is-authed) .login-panel .primary-btn.wide {
    height: 52px !important;
    min-height: 52px !important;
  }
}

/* Mobile material archive: full-width readable blocks instead of tiny two-column cards. */
@media (max-width: 640px) {
  body.is-authed .material-category-strip {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  body.is-authed .material-category-strip article {
    min-height: 88px !important;
    padding: 12px 14px !important;
    border-radius: 16px !important;
  }

  body.is-authed .material-category-strip strong,
  body.is-authed .material-category-strip b {
    font-size: 16px !important;
  }

  body.is-authed .material-category-strip span,
  body.is-authed .material-category-strip em {
    font-size: 13px !important;
  }

  body.is-authed .material-inventory-groups,
  body.is-authed .material-inventory-groups.material-warehouse-groups {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  body.is-authed .material-inventory-groups .material-warehouse-block {
    width: 100% !important;
    padding: 14px !important;
    border-radius: 18px !important;
  }

  body.is-authed .material-inventory-groups .material-warehouse-block > header {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  body.is-authed .material-inventory-groups .material-warehouse-block > header strong {
    font-size: 20px !important;
  }

  body.is-authed .material-inventory-groups .material-warehouse-block > header em {
    justify-self: start !important;
    font-size: 13px !important;
  }

  body.is-authed .material-inventory-groups .category-filter,
  body.is-authed .material-inventory-groups .category-filter input {
    width: 100% !important;
  }

  body.is-authed .material-inventory-groups .category-filter input {
    min-height: 44px !important;
    padding: 0 14px !important;
    border-radius: 14px !important;
    font-size: 14px !important;
  }

  body.is-authed .material-inventory-table {
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
  }

  body.is-authed .material-inventory-table table,
  body.is-authed .material-inventory-table tbody,
  body.is-authed .material-inventory-table tr,
  body.is-authed .material-inventory-table td {
    display: block !important;
    width: 100% !important;
  }

  body.is-authed .material-inventory-table thead {
    display: none !important;
  }

  body.is-authed .material-inventory-table tbody {
    display: grid !important;
    gap: 8px !important;
  }

  body.is-authed .material-inventory-table tr {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    gap: 6px 12px !important;
    padding: 12px !important;
    border: 1px solid rgba(210, 224, 242, 0.78) !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.72) !important;
  }

  body.is-authed .material-inventory-table td {
    min-width: 0 !important;
    padding: 0 !important;
    border-bottom: 0 !important;
    overflow: visible !important;
    white-space: normal !important;
    text-align: left !important;
  }

  body.is-authed .material-inventory-table td:nth-child(1) {
    grid-column: 1 / -1 !important;
  }

  body.is-authed .material-inventory-table td:nth-child(2),
  body.is-authed .material-inventory-table td:nth-child(3),
  body.is-authed .material-inventory-table td:nth-child(4) {
    display: grid !important;
    grid-template-columns: auto 1fr !important;
    gap: 7px !important;
    align-items: baseline !important;
    color: #64748b !important;
    font-size: 12px !important;
  }

  body.is-authed .material-inventory-table td:nth-child(2)::before {
    content: "库存";
  }

  body.is-authed .material-inventory-table td:nth-child(3)::before {
    content: "单价";
  }

  body.is-authed .material-inventory-table td:nth-child(4)::before {
    content: "预警";
  }

  body.is-authed .material-inventory-table td:nth-child(2)::before,
  body.is-authed .material-inventory-table td:nth-child(3)::before,
  body.is-authed .material-inventory-table td:nth-child(4)::before {
    color: #8a96a8;
    font-weight: 700;
  }

  body.is-authed .material-inventory-table td:nth-child(5) {
    grid-column: 2 !important;
    grid-row: 2 / span 3 !important;
    align-self: center !important;
    justify-self: end !important;
  }

  body.is-authed .material-inventory-table strong {
    font-size: 18px !important;
    line-height: 1.25 !important;
  }

  body.is-authed .material-inventory-table td > span {
    margin-top: 3px !important;
    font-size: 12px !important;
  }

  body.is-authed .material-inventory-table b {
    font-size: 15px !important;
  }

  body.is-authed .material-inventory-table button {
    min-width: 58px !important;
    min-height: 36px !important;
    border-radius: 12px !important;
    font-size: 13px !important;
  }
}

/* Final mobile archive tables: compact rows instead of oversized cards. */
@media (max-width: 640px) {
  body.is-authed .material-inventory-groups + .grouped-mobile-records,
  body.is-authed .product-inventory-groups + .mobile-record-list {
    display: none !important;
  }

  body.is-authed .material-category-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body.is-authed .material-category-strip article {
    min-height: 74px !important;
    padding: 10px 12px !important;
    border-radius: 12px !important;
  }

  body.is-authed .material-category-strip strong,
  body.is-authed .material-category-strip b {
    font-size: 14px !important;
  }

  body.is-authed .material-category-strip span,
  body.is-authed .material-category-strip em {
    font-size: 12px !important;
  }

  body.is-authed .material-inventory-groups,
  body.is-authed .material-inventory-groups.material-warehouse-groups {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  body.is-authed .material-inventory-groups .material-warehouse-block {
    padding: 10px !important;
    border-radius: 12px !important;
  }

  body.is-authed .material-inventory-groups .material-warehouse-block > header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 6px 8px !important;
    align-items: center !important;
  }

  body.is-authed .material-inventory-groups .material-warehouse-block > header > div:first-child {
    min-width: 0 !important;
  }

  body.is-authed .material-inventory-groups .material-warehouse-block > header strong {
    font-size: 17px !important;
    line-height: 1.2 !important;
  }

  body.is-authed .material-inventory-groups .material-warehouse-block > header em {
    justify-self: end !important;
    font-size: 12px !important;
    white-space: nowrap !important;
  }

  body.is-authed .material-inventory-groups .category-filter,
  body.is-authed .material-inventory-groups .category-tools {
    grid-column: 1 / -1 !important;
    width: 100% !important;
  }

  body.is-authed .material-inventory-groups .category-filter input {
    min-height: 36px !important;
    padding: 0 11px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
  }

  body.is-authed .material-inventory-table {
    overflow: hidden !important;
    border: 1px solid rgba(219, 230, 242, 0.86) !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.72) !important;
  }

  body.is-authed .material-inventory-table table,
  body.is-authed .material-inventory-table thead,
  body.is-authed .material-inventory-table tbody {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  body.is-authed .material-inventory-table tr {
    display: grid !important;
    grid-template-columns: minmax(82px, 1.4fr) 56px 46px 46px 48px !important;
    gap: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
  }

  body.is-authed .material-inventory-table.product-inventory-table tr {
    grid-template-columns: minmax(82px, 1.35fr) 54px 56px 56px 48px !important;
  }

  body.is-authed .material-inventory-table thead tr {
    min-height: 30px !important;
    background: rgba(243, 247, 252, 0.92) !important;
  }

  body.is-authed .material-inventory-table tbody tr {
    min-height: 44px !important;
    border-top: 1px solid rgba(226, 234, 244, 0.88) !important;
  }

  body.is-authed .material-inventory-table th,
  body.is-authed .material-inventory-table td {
    display: flex !important;
    min-width: 0 !important;
    width: auto !important;
    padding: 5px 4px !important;
    border: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    color: #475569 !important;
    font-size: 11px !important;
    line-height: 1.15 !important;
    text-align: center !important;
    white-space: nowrap !important;
  }

  body.is-authed .material-inventory-table th {
    color: #708198 !important;
    font-size: 10px !important;
    font-weight: 800 !important;
  }

  body.is-authed .material-inventory-table th:nth-child(1),
  body.is-authed .material-inventory-table td:nth-child(1) {
    justify-content: flex-start !important;
    padding-left: 8px !important;
    text-align: left !important;
  }

  body.is-authed .material-inventory-table td:nth-child(2)::before,
  body.is-authed .material-inventory-table td:nth-child(3)::before,
  body.is-authed .material-inventory-table td:nth-child(4)::before {
    display: none !important;
    content: none !important;
  }

  body.is-authed .material-inventory-table strong {
    display: block !important;
    max-width: 100% !important;
    overflow: hidden !important;
    color: #172033 !important;
    font-size: 13px !important;
    line-height: 1.15 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.is-authed .material-inventory-table td > span,
  body.is-authed .material-inventory-table .product-batch-cell {
    display: block !important;
    max-width: 100% !important;
    margin-top: 2px !important;
    overflow: hidden !important;
    color: #8a96a8 !important;
    font-size: 10px !important;
    line-height: 1.1 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.is-authed .material-inventory-table b {
    color: #172033 !important;
    font-size: 12px !important;
    line-height: 1.1 !important;
  }

  body.is-authed .material-inventory-table button {
    min-width: 40px !important;
    min-height: 28px !important;
    padding: 0 7px !important;
    border-radius: 8px !important;
    font-size: 11px !important;
  }

  body.is-authed .material-inventory-table td.product-batch-cell {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

/* Mobile detail modal: no horizontal swiping, readable formula lines. */
@media (max-width: 640px) {
  body.is-authed,
  body.is-authed #app,
  body.is-authed .main,
  body.is-authed .content {
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  body.is-authed .panel,
  body.is-authed .modal-panel,
  body.is-authed .detail-body,
  body.is-authed .table-wrap,
  body.is-authed .scroll-table {
    max-width: 100% !important;
  }

  body.is-authed .modal-panel .table-wrap {
    overflow-x: hidden !important;
  }

  body.is-authed .modal-panel table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
  }

  body.is-authed .modal-panel table th,
  body.is-authed .modal-panel table td {
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  body.is-authed .modal {
    padding: 8px !important;
    overflow-x: hidden !important;
  }

  body.is-authed .modal-panel.detail-modal {
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    width: min(370px, calc(100vw - 18px)) !important;
    max-width: calc(100vw - 18px) !important;
    max-height: calc(100svh - 24px) !important;
    margin: 12px auto !important;
    padding: 12px !important;
    overflow: hidden !important;
    border-radius: 18px !important;
  }

  body.is-authed .modal-panel.detail-modal .modal-head {
    min-width: 0 !important;
    margin-bottom: 8px !important;
  }

  body.is-authed .modal-panel.detail-modal .modal-head h2 {
    min-width: 0 !important;
    overflow: hidden !important;
    font-size: 20px !important;
    line-height: 1.2 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.is-authed .modal-panel.detail-modal .detail-body {
    min-width: 0 !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding-right: 2px !important;
    -webkit-overflow-scrolling: touch !important;
  }

  body.is-authed .modal-panel.detail-modal .detail-grid {
    width: 100% !important;
    min-width: 0 !important;
  }

  body.is-authed .modal-panel.detail-modal .detail-cell {
    grid-template-columns: 82px minmax(0, 1fr) !important;
  }

  body.is-authed .modal-panel.detail-modal .detail-input-cell {
    grid-template-columns: 82px minmax(0, 1fr) !important;
  }

  body.is-authed .modal-panel.detail-modal .detail-edit-input {
    min-width: 0 !important;
    width: 100% !important;
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table {
    max-height: none !important;
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table .table-wrap {
    overflow: visible !important;
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table table,
  body.is-authed .modal-panel.detail-modal .editable-detail-table thead,
  body.is-authed .modal-panel.detail-modal .editable-detail-table tbody,
  body.is-authed .modal-panel.detail-modal .editable-detail-table tr,
  body.is-authed .modal-panel.detail-modal .editable-detail-table td {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table thead {
    display: none !important;
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table tbody {
    display: grid !important;
    gap: 8px !important;
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table tr {
    display: grid !important;
    grid-template-columns: 54px minmax(0, 1fr) !important;
    gap: 6px 10px !important;
    padding: 10px !important;
    border: 1px solid rgba(210, 224, 242, 0.78) !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.72) !important;
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table td {
    padding: 0 !important;
    border: 0 !important;
    overflow: visible !important;
    white-space: normal !important;
    text-align: left !important;
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table td[data-detail-key="order"] {
    grid-row: 1 / span 3 !important;
    display: grid !important;
    place-items: center !important;
    min-height: 56px !important;
    border-radius: 12px !important;
    background: rgba(235, 244, 255, 0.86) !important;
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table td[data-detail-key="order"] strong::before {
    content: "#";
    color: #8a96a8;
    font-size: 12px;
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table td[data-detail-key="material"],
  body.is-authed .modal-panel.detail-modal .editable-detail-table td[data-detail-key="standard"],
  body.is-authed .modal-panel.detail-modal .editable-detail-table td[data-detail-key="note"] {
    display: grid !important;
    grid-template-columns: 54px minmax(0, 1fr) !important;
    align-items: baseline !important;
    gap: 8px !important;
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table td[data-detail-key="material"]::before {
    content: "原料";
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table td[data-detail-key="standard"]::before {
    content: "标准";
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table td[data-detail-key="note"]::before {
    content: "工艺";
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table td[data-detail-key="material"]::before,
  body.is-authed .modal-panel.detail-modal .editable-detail-table td[data-detail-key="standard"]::before,
  body.is-authed .modal-panel.detail-modal .editable-detail-table td[data-detail-key="note"]::before {
    color: #8a96a8;
    font-size: 12px;
    font-weight: 700;
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table td strong {
    min-width: 0 !important;
    overflow: visible !important;
    font-size: 15px !important;
    line-height: 1.35 !important;
    text-overflow: clip !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table .row-icon-btn {
    justify-self: end !important;
    min-height: 30px !important;
    border-radius: 10px !important;
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table.formula-detail-table {
    overflow: hidden !important;
    border: 1px solid rgba(210, 224, 242, 0.86) !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.84) !important;
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table.formula-detail-table .table-wrap {
    overflow: visible !important;
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table.formula-detail-table table {
    display: table !important;
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table.formula-detail-table thead {
    display: table-header-group !important;
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table.formula-detail-table tbody {
    display: table-row-group !important;
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table.formula-detail-table tr {
    display: table-row !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table.formula-detail-table th,
  body.is-authed .modal-panel.detail-modal .editable-detail-table.formula-detail-table td {
    display: table-cell !important;
    width: auto !important;
    padding: 6px 5px !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.82) !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    text-align: center !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    overflow-wrap: normal !important;
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table.formula-detail-table th:nth-child(1),
  body.is-authed .modal-panel.detail-modal .editable-detail-table.formula-detail-table td[data-detail-key="order"] {
    width: 30px !important;
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table.formula-detail-table th:nth-child(2),
  body.is-authed .modal-panel.detail-modal .editable-detail-table.formula-detail-table td[data-detail-key="material"] {
    width: 72px !important;
    text-align: left !important;
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table.formula-detail-table th:nth-child(3),
  body.is-authed .modal-panel.detail-modal .editable-detail-table.formula-detail-table td[data-detail-key="standard"] {
    width: 78px !important;
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table.formula-detail-table th:nth-child(5),
  body.is-authed .modal-panel.detail-modal .editable-detail-table.formula-detail-table td:last-child {
    width: 42px !important;
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table.formula-detail-table td[data-detail-key="order"] {
    grid-row: auto !important;
    min-height: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table.formula-detail-table td[data-detail-key="order"] strong::before,
  body.is-authed .modal-panel.detail-modal .editable-detail-table.formula-detail-table td[data-detail-key="material"]::before,
  body.is-authed .modal-panel.detail-modal .editable-detail-table.formula-detail-table td[data-detail-key="standard"]::before,
  body.is-authed .modal-panel.detail-modal .editable-detail-table.formula-detail-table td[data-detail-key="note"]::before {
    content: none !important;
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table.formula-detail-table td strong {
    display: block !important;
    min-width: 0 !important;
    overflow: hidden !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table.formula-detail-table .row-icon-btn {
    justify-self: auto !important;
    min-width: 34px !important;
    min-height: 24px !important;
    padding: 0 5px !important;
    border-radius: 8px !important;
    font-size: 10px !important;
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table.formula-detail-table .formula-row-actions {
    padding-top: 6px !important;
    text-align: right !important;
  }

  body.is-authed .modal-panel.detail-modal .modal-actions {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 3 !important;
    margin: 8px -4px -4px !important;
    padding: 8px 4px 0 !important;
    border-top: 1px solid rgba(226, 232, 240, 0.72) !important;
    background: linear-gradient(180deg, rgba(255,255,255,0.72), rgba(255,255,255,0.96)) !important;
  }
}

/* Final override: unified date/month fields site-wide. */
body.is-authed input[type="date"],
body.is-authed input[type="month"],
body.is-authed #monthInput {
  box-sizing: border-box !important;
  width: auto !important;
  min-width: 172px !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 8px 38px 8px 13px !important;
  border: 1px solid rgba(209, 222, 240, 0.92) !important;
  border-radius: var(--radius-card) !important;
  outline: none !important;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,251,255,0.96)) !important;
  color: #243047 !important;
  font-family: var(--font-main) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.92), 0 1px 2px rgba(15, 23, 42, 0.035) !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease !important;
}

body.is-authed input[type="date"]::-webkit-date-and-time-value,
body.is-authed input[type="month"]::-webkit-date-and-time-value,
body.is-authed #monthInput::-webkit-date-and-time-value {
  min-height: 22px !important;
  text-align: left !important;
}

body.is-authed input[type="date"]::-webkit-calendar-picker-indicator,
body.is-authed input[type="month"]::-webkit-calendar-picker-indicator,
body.is-authed #monthInput::-webkit-calendar-picker-indicator {
  width: 18px !important;
  height: 18px !important;
  margin: 0 -28px 0 8px !important;
  padding: 0 !important;
  opacity: 0.58 !important;
  cursor: pointer !important;
  filter: saturate(0.7) contrast(0.95) !important;
}

body.is-authed input[type="date"]:hover,
body.is-authed input[type="month"]:hover,
body.is-authed #monthInput:hover {
  border-color: rgba(171, 196, 230, 0.96) !important;
  background: linear-gradient(180deg, #ffffff, rgba(245, 249, 255, 0.98)) !important;
}

body.is-authed input[type="date"]:focus,
body.is-authed input[type="month"]:focus,
body.is-authed #monthInput:focus {
  border-color: rgba(52, 120, 246, 0.62) !important;
  box-shadow: var(--focus-ring), inset 0 1px 0 rgba(255,255,255,0.94) !important;
}

body.is-authed .records-toolbar #monthInput,
body.is-authed .energy-overview-actions #monthInput,
body.is-authed .month-tools #monthInput {
  width: 100% !important;
}

body.is-authed .field input[type="date"],
body.is-authed .field input[type="month"] {
  width: 100% !important;
  min-width: 0 !important;
}

@media (max-width: 640px) {
  body.is-authed input[type="date"],
  body.is-authed input[type="month"],
  body.is-authed #monthInput {
    min-width: 0 !important;
    width: 100% !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 9px 38px 9px 12px !important;
    border-radius: 13px !important;
    font-size: 15px !important;
  }
}
/* Energy popover final: anchored beside "查看中", compact, white translucent. */
body.is-authed .energy-day-floating-panel.energy-day-floating-panel {
  position: fixed !important;
  box-sizing: border-box !important;
  z-index: 9999 !important;
  width: 278px !important;
  min-width: 0 !important;
  max-width: 278px !important;
  max-height: none !important;
  overflow: visible !important;
  border: 1px solid rgba(205, 220, 238, 0.72) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 14px 30px rgba(35, 66, 105, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.is-authed .energy-day-floating-panel *,
body.is-authed .energy-day-floating-panel *::before,
body.is-authed .energy-day-floating-panel *::after {
  box-sizing: border-box !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-head {
  padding: 6px 8px 5px !important;
  border-bottom: 1px solid rgba(195, 215, 238, 0.22) !important;
  background: transparent !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-head span {
  color: rgba(41, 109, 210, 0.82) !important;
  font-size: 8px !important;
  line-height: 1.1 !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-head strong {
  max-width: 220px !important;
  overflow: hidden !important;
  color: #18243a !important;
  font-size: 13px !important;
  line-height: 1.15 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-close {
  width: 21px !important;
  height: 21px !important;
  flex: 0 0 auto !important;
  border-color: rgba(157, 183, 214, 0.26) !important;
  background: rgba(255, 255, 255, 0.18) !important;
  color: #65758e !important;
  font-size: 15px !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-total {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 5px !important;
  padding: 6px 8px 3px !important;
  background: transparent !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-total p {
  min-width: 0 !important;
  padding: 5px 6px !important;
  border: 1px solid rgba(195, 215, 238, 0.48) !important;
  border-radius: 8px !important;
  background: rgba(248, 251, 255, 0.94) !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-total span {
  color: #6d7e96 !important;
  font-size: 9px !important;
  line-height: 1.1 !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-total b {
  overflow: hidden !important;
  color: #162238 !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-body {
  display: grid !important;
  gap: 3px !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 4px 8px 8px !important;
  background: transparent !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-section {
  display: grid !important;
  min-width: 0 !important;
  gap: 1px !important;
  background: transparent !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-section header {
  display: flex !important;
  min-width: 0 !important;
  gap: 5px !important;
  align-items: center !important;
  background: transparent !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-section header strong {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
  color: #253149 !important;
  font-size: 10px !important;
  line-height: 1.1 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-section header em {
  flex: 0 1 auto !important;
  max-width: 96px !important;
  overflow: hidden !important;
  color: rgba(41, 109, 210, 0.82) !important;
  font-size: 9px !important;
  line-height: 1.1 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-table {
  display: table !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  table-layout: fixed !important;
  border: 0 !important;
  border-spacing: 0 !important;
  border-collapse: collapse !important;
  background: transparent !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-table tbody {
  display: table-row-group !important;
  background: transparent !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-table tr {
  display: table-row !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  background: transparent !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-table td {
  display: table-cell !important;
  box-sizing: border-box !important;
  width: auto !important;
  max-width: none !important;
  padding: 2px 4px !important;
  overflow: hidden !important;
  border-top: 1px solid rgba(195, 215, 238, 0.18) !important;
  background: transparent !important;
  color: #253149 !important;
  font-size: 9px !important;
  line-height: 1.15 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-table td:first-child {
  width: 58% !important;
  text-align: left !important;
}

body.is-authed .energy-day-floating-panel .energy-day-float-table td:last-child {
  width: 42% !important;
  font-weight: 800 !important;
  text-align: right !important;
}

@media (max-width: 640px) {
  body.is-authed .energy-day-floating-panel.energy-day-floating-panel {
    width: min(278px, calc(100vw - 24px)) !important;
    max-width: min(278px, calc(100vw - 24px)) !important;
  }
}

/* True final: logistics detail inputs read like table cells, not capsules. */
body.is-authed .logistics-lines-table input,
body.is-authed .logistics-lines-table input:focus,
body.is-authed .logistics-lines-table input:hover {
  min-height: 30px !important;
  padding: 4px 6px !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.is-authed .logistics-lines-table td:focus-within {
  background: rgba(235, 244, 255, 0.78) !important;
  box-shadow: inset 0 0 0 1px rgba(83, 137, 230, 0.35) !important;
}
/* True final: logistics add rows control stays below the table. */
body.is-authed .logistics-lines-add {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 7px 0 2px !important;
  color: #748299 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

body.is-authed .logistics-plus-btn {
  display: inline-grid !important;
  width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
  place-items: center !important;
  border: 1px solid rgba(181, 204, 235, 0.8) !important;
  border-radius: 8px !important;
  background: rgba(247, 250, 255, 0.86) !important;
  color: #2f75df !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  box-shadow: none !important;
}

body.is-authed .logistics-lines-add select {
  width: auto !important;
  min-width: 76px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 3px 26px 3px 8px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 750 !important;
}
/* Absolute final: notes/action headers must not look or behave like sort controls. */
body.is-authed .interactive-table th[data-sortable="0"],
body.is-authed .interactive-table th.is-not-sortable {
  cursor: default !important;
}

body.is-authed .interactive-table th[data-sortable="0"] span,
body.is-authed .interactive-table th.is-not-sortable span {
  color: inherit !important;
}

/* Absolute final: operation logs panel. */
body.is-authed .operation-log-table table {
  min-width: 760px !important;
}

body.is-authed .operation-log-table td {
  vertical-align: top !important;
}

body.is-authed .operation-log-user {
  display: block !important;
  margin-top: 2px !important;
  color: var(--muted) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

/* Page permissions: compact, readable permission picker. */
body.is-authed .user-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body.is-authed .page-permission-modal {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
}

body.is-authed .permission-summary {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(205, 218, 238, 0.82);
  border-radius: 8px;
  background: rgba(248, 251, 255, 0.86);
}

body.is-authed .permission-summary strong {
  color: var(--text);
  font-size: 16px;
}

body.is-authed .permission-summary span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

body.is-authed .page-permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
}

body.is-authed .page-permission-item {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid rgba(205, 218, 238, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
}

body.is-authed .page-permission-item input {
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: var(--primary);
}

body.is-authed .page-permission-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.is-authed .page-permission-item.is-disabled {
  opacity: 0.48;
}

/* Final density pass: keep user action buttons on one compact row. */
body.is-authed .settings-users-panel .user-permission-head,
body.is-authed .settings-users-panel .user-permission-row {
  grid-template-columns:
    minmax(72px, 0.7fr)
    minmax(62px, 0.52fr)
    minmax(82px, 0.68fr)
    minmax(118px, 0.92fr)
    minmax(92px, 0.72fr)
    50px
    minmax(252px, 1.12fr) !important;
  gap: 5px !important;
}

body.is-authed .settings-users-panel .user-row-actions {
  flex-wrap: nowrap !important;
  justify-content: flex-end !important;
  gap: 4px !important;
  white-space: nowrap !important;
}

body.is-authed .settings-users-panel .user-row-actions .compact-action {
  min-height: 25px !important;
  padding: 0 6px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
  line-height: 1 !important;
}

@media (max-width: 760px) {
  body.is-authed .settings-users-panel .user-row-actions {
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
  }
}

/* Global lightness pass: buttons, fields, cards, tables, modals, mobile lists. */
body.is-authed {
  --ui-bg-soft: #f7f9fc;
  --ui-surface: rgba(255, 255, 255, 0.94);
  --ui-surface-solid: #ffffff;
  --ui-line: rgba(218, 228, 240, 0.86);
  --ui-line-soft: rgba(229, 235, 244, 0.88);
  --ui-text-soft: #64748b;
  --ui-shadow: 0 8px 22px rgba(43, 64, 96, 0.045);
  --ui-shadow-hover: 0 12px 28px rgba(43, 64, 96, 0.07);
}

body.is-authed .content {
  background: var(--ui-bg-soft) !important;
}

body.is-authed .panel,
body.is-authed .record-card,
body.is-authed .dashboard-hero,
body.is-authed .metric-card,
body.is-authed .dashboard-card,
body.is-authed .energy-card,
body.is-authed .quick-card,
body.is-authed .profile-card,
body.is-authed .category-section,
body.is-authed .material-warehouse-block,
body.is-authed .mobile-category-block,
body.is-authed .settings-users-panel,
body.is-authed .permission-summary,
body.is-authed .page-permission-item {
  border: 1px solid var(--ui-line) !important;
  border-radius: 10px !important;
  background: var(--ui-surface) !important;
  box-shadow: var(--ui-shadow) !important;
}

body.is-authed .panel::after,
body.is-authed .dashboard-hero::after,
body.is-authed .metric-card::after,
body.is-authed .dashboard-card::after,
body.is-authed .category-section::after,
body.is-authed .material-warehouse-block::after {
  display: none !important;
}

body.is-authed .panel:hover,
body.is-authed .record-card:hover,
body.is-authed .dashboard-card:hover,
body.is-authed .metric-card:hover,
body.is-authed .mobile-record-row:hover,
body.is-authed .mobile-stock-row:hover {
  transform: none !important;
  border-color: rgba(201, 216, 235, 0.94) !important;
  box-shadow: var(--ui-shadow-hover) !important;
}

body.is-authed .panel h2::before {
  width: 6px !important;
  height: 6px !important;
  background: rgba(52, 120, 246, 0.78) !important;
  box-shadow: none !important;
  animation: none !important;
}

body.is-authed button,
body.is-authed .primary-btn,
body.is-authed .ghost-btn,
body.is-authed .danger-btn,
body.is-authed .icon-btn,
body.is-authed .file-action-btn,
body.is-authed .profile-action-btn,
body.is-authed td button,
body.is-authed .row-actions button,
body.is-authed .mobile-record-row button,
body.is-authed .compact-action,
body.is-authed .soft-primary,
body.is-authed #quickBatchBtn {
  border-radius: 8px !important;
  box-shadow: none !important;
  letter-spacing: 0 !important;
}

body.is-authed .primary-btn,
body.is-authed button.primary-btn {
  border: 1px solid rgba(47, 111, 237, 0.72) !important;
  background: #2f6fed !important;
  color: #ffffff !important;
  box-shadow: 0 8px 18px rgba(47, 111, 237, 0.16) !important;
}

body.is-authed .primary-btn:hover,
body.is-authed button.primary-btn:hover {
  background: #2765dc !important;
  border-color: rgba(39, 101, 220, 0.78) !important;
  box-shadow: 0 10px 22px rgba(47, 111, 237, 0.18) !important;
  transform: translateY(-1px) !important;
}

body.is-authed .ghost-btn,
body.is-authed .file-action-btn,
body.is-authed .profile-action-btn,
body.is-authed td button,
body.is-authed .row-actions button,
body.is-authed .mobile-record-row button,
body.is-authed .soft-primary,
body.is-authed #quickBatchBtn {
  border: 1px solid var(--ui-line) !important;
  background: rgba(255, 255, 255, 0.86) !important;
  color: #253149 !important;
}

body.is-authed .ghost-btn:hover,
body.is-authed .file-action-btn:hover,
body.is-authed .profile-action-btn:hover,
body.is-authed td button:hover,
body.is-authed .row-actions button:hover,
body.is-authed .mobile-record-row button:hover,
body.is-authed .soft-primary:hover,
body.is-authed #quickBatchBtn:hover {
  border-color: rgba(190, 208, 232, 0.98) !important;
  background: #ffffff !important;
  color: #172033 !important;
  box-shadow: 0 6px 16px rgba(43, 64, 96, 0.06) !important;
  transform: none !important;
}

body.is-authed .danger-btn,
body.is-authed button.danger-btn {
  border: 1px solid rgba(255, 59, 48, 0.22) !important;
  background: rgba(255, 59, 48, 0.06) !important;
  color: #c4322b !important;
}

body.is-authed input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
body.is-authed select,
body.is-authed textarea,
body.is-authed .user-name-input,
body.is-authed .user-role-select,
body.is-authed .nav-rename-input {
  min-height: 36px !important;
  border: 1px solid var(--ui-line) !important;
  border-radius: 8px !important;
  background-color: rgba(255, 255, 255, 0.9) !important;
  background-image: none !important;
  color: #172033 !important;
  box-shadow: none !important;
  font-size: 13px !important;
  letter-spacing: 0 !important;
}

body.is-authed select,
body.is-authed .user-role-select,
body.is-authed .mini-label select {
  background-image:
    linear-gradient(45deg, transparent 50%, #8b97a8 50%),
    linear-gradient(135deg, #8b97a8 50%, transparent 50%) !important;
  background-position:
    calc(100% - 15px) 50%,
    calc(100% - 10px) 50% !important;
  background-size: 5px 5px, 5px 5px !important;
  background-repeat: no-repeat !important;
  padding-right: 30px !important;
}

body.is-authed input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
body.is-authed select:focus,
body.is-authed textarea:focus {
  border-color: rgba(47, 111, 237, 0.58) !important;
  background-color: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.10) !important;
  transform: none !important;
}

body.is-authed input::placeholder,
body.is-authed textarea::placeholder {
  color: #a3adbc !important;
}

body.is-authed .table-wrap,
body.is-authed .scroll-table,
body.is-authed .meter-log-table,
body.is-authed .batch-stocktake-table,
body.is-authed .logistics-lines-table {
  border: 1px solid var(--ui-line) !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

body.is-authed table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

body.is-authed th,
body.is-authed .scroll-table thead th,
body.is-authed .interactive-table th {
  background: #f8fafc !important;
  color: var(--ui-text-soft) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

body.is-authed td {
  border-bottom-color: var(--ui-line-soft) !important;
  color: #253149 !important;
}

body.is-authed tbody tr:nth-child(even) {
  background: transparent !important;
}

body.is-authed tbody tr:hover,
body.is-authed tbody tr:hover td {
  background: #f8fbff !important;
}

body.is-authed th.action-col,
body.is-authed td.action-col {
  box-shadow: -6px 0 12px rgba(43, 64, 96, 0.035) !important;
}

body.is-authed .modal {
  background: rgba(15, 23, 42, 0.18) !important;
  backdrop-filter: none !important;
}

body.is-authed .modal-panel,
body.is-authed .drawer-panel {
  border: 1px solid rgba(224, 232, 242, 0.96) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.98) !important;
  box-shadow: 0 18px 48px rgba(28, 41, 67, 0.14) !important;
}

body.is-authed .modal-head {
  padding-bottom: 10px !important;
  border-bottom: 1px solid var(--ui-line-soft) !important;
}

body.is-authed .modal-actions {
  padding-top: 12px !important;
  border-top: 1px solid var(--ui-line-soft) !important;
}

body.is-authed .modal-panel:has(.sales-out-lines) {
  width: min(1180px, calc(100vw - 32px)) !important;
}

body.is-authed .sales-out-form {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

body.is-authed .sales-out-form .full {
  grid-column: 1 / -1 !important;
}

body.is-authed .sales-out-form .field {
  grid-template-columns: 1fr !important;
  gap: 5px !important;
}

body.is-authed .sales-out-lines {
  min-width: 0 !important;
}

body.is-authed .sales-out-lines-table {
  max-width: 100% !important;
  overflow-x: auto !important;
}

body.is-authed .sales-out-lines-table .table-wrap {
  width: 100% !important;
  max-width: 100% !important;
}

body.is-authed .sales-out-lines-table table {
  width: 100% !important;
  min-width: 860px !important;
  table-layout: fixed !important;
}

body.is-authed .sales-out-lines-table th:nth-child(1),
body.is-authed .sales-out-lines-table td:nth-child(1) {
  width: 48px !important;
}

body.is-authed .sales-out-lines-table th:nth-child(2),
body.is-authed .sales-out-lines-table td:nth-child(2) {
  width: 150px !important;
}

body.is-authed .sales-out-lines-table th:nth-child(3),
body.is-authed .sales-out-lines-table td:nth-child(3) {
  width: auto !important;
}

body.is-authed .sales-out-lines-table th:nth-child(4),
body.is-authed .sales-out-lines-table td:nth-child(4) {
  width: 150px !important;
}

body.is-authed .sales-out-lines-table th:nth-child(5),
body.is-authed .sales-out-lines-table td:nth-child(5) {
  width: 132px !important;
}

body.is-authed .sales-out-lines-table th:nth-child(6),
body.is-authed .sales-out-lines-table td:nth-child(6) {
  width: 74px !important;
}

body.is-authed .sales-out-lines-table th,
body.is-authed .sales-out-lines-table td {
  padding: 5px !important;
  font-size: 12px !important;
  line-height: 1.18 !important;
}

body.is-authed .modal-panel .sales-out-lines-table input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
body.is-authed .sales-out-lines-table select {
  height: 30px !important;
  min-height: 30px !important;
  padding: 3px 7px !important;
  font-size: 12px !important;
}

body.is-authed .sales-out-lines-table button {
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 7px !important;
  font-size: 12px !important;
}

body.is-authed .detail-line-actions {
  display: flex !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 8px 0 2px !important;
}

body.is-authed .detail-line-actions .ghost-btn {
  min-height: 34px !important;
  padding: 0 14px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 760 !important;
}

body.is-authed .material-inventory-groups.material-warehouse-groups:not(.product-inventory-groups) {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
  align-items: start !important;
  justify-content: stretch !important;
  overflow: visible !important;
  padding-bottom: 10px !important;
}

body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-warehouse-block {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  height: 380px !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-warehouse-block > header {
  flex: 0 0 auto !important;
}

body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  padding-bottom: 2px !important;
  scrollbar-gutter: stable !important;
}

body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}

body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table thead th {
  position: sticky !important;
  top: 0 !important;
  z-index: 2 !important;
}

body.is-authed .material-category-strip:not(.product-category-strip) {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 10px !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  overflow-y: hidden !important;
  padding-bottom: 0 !important;
  scroll-snap-type: none !important;
}

body.is-authed .material-category-strip:not(.product-category-strip) article {
  width: 100% !important;
  min-width: 0 !important;
  scroll-snap-align: none !important;
}

body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-warehouse-block > header {
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: start !important;
  gap: 8px 10px !important;
}

body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-warehouse-block > header > div:first-child {
  min-width: 0 !important;
}

body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-warehouse-block > header strong {
  white-space: nowrap !important;
  line-height: 1.18 !important;
}

body.is-authed .material-inventory-groups:not(.product-inventory-groups) .category-filter {
  grid-column: 1 !important;
  grid-row: 2 !important;
  align-self: center !important;
}

body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-warehouse-block > header em {
  grid-column: 1 !important;
  grid-row: 2 !important;
  justify-self: end !important;
  align-self: center !important;
  padding-left: 142px !important;
}

body.is-authed .material-batch-actions {
  display: flex !important;
  grid-column: 2 !important;
  grid-row: 1 !important;
  gap: 5px !important;
  align-items: center !important;
  justify-content: flex-end !important;
  align-self: start !important;
}

body.is-authed .material-batch-actions .compact-action {
  min-height: 28px !important;
  padding: 0 8px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
}

body.is-authed .material-inventory-table .material-select-cell {
  display: none !important;
}

body.is-authed .material-warehouse-block.is-batch-editing .material-inventory-table .material-select-cell {
  display: table-cell !important;
  width: 34px !important;
  text-align: center !important;
}

body.is-authed .material-inventory-table .material-select-cell input[type="checkbox"] {
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  min-height: 14px !important;
  margin: 0 !important;
  padding: 0 !important;
  vertical-align: middle !important;
}

body.is-authed .material-inventory-table .material-name-cell {
  width: 40% !important;
  text-align: left !important;
}

body.is-authed .material-inventory-table .material-stock-cell {
  width: 22% !important;
  text-align: right !important;
}

body.is-authed .material-inventory-table .material-price-cell {
  width: 22% !important;
  text-align: right !important;
}

body.is-authed .material-inventory-table .material-warn-cell {
  width: 16% !important;
  text-align: right !important;
}

body.is-authed .material-warehouse-block.is-batch-editing .material-inventory-table .material-name-cell {
  width: 36% !important;
}

body.is-authed .material-warehouse-block.is-batch-editing .material-inventory-table .material-stock-cell,
body.is-authed .material-warehouse-block.is-batch-editing .material-inventory-table .material-price-cell,
body.is-authed .material-warehouse-block.is-batch-editing .material-inventory-table .material-warn-cell {
  width: 18% !important;
}

body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table th,
body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table td {
  padding-inline: 4px !important;
}

body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table .material-select-cell {
  display: none !important;
  width: 0 !important;
  padding: 0 !important;
}

body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table .material-name-cell {
  width: 28% !important;
}

body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table .material-stock-cell {
  width: 23% !important;
  text-align: left !important;
}

body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table .material-price-cell {
  width: 17% !important;
  text-align: right !important;
}

body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table .material-warn-cell {
  width: 20% !important;
  text-align: right !important;
}

body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table th:nth-child(6),
body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table td:nth-child(6) {
  width: 12% !important;
  text-align: right !important;
  overflow: visible !important;
}

body.is-authed .sales-out-lines-table {
  overflow-x: hidden !important;
}

body.is-authed .sales-out-lines-table table {
  min-width: 640px !important;
}

body.is-authed .sales-out-lines-table th:nth-child(1),
body.is-authed .sales-out-lines-table td:nth-child(1) {
  width: 42px !important;
}

body.is-authed .sales-out-lines-table th:nth-child(2),
body.is-authed .sales-out-lines-table td:nth-child(2) {
  width: 106px !important;
}

body.is-authed .sales-out-lines-table th:nth-child(3),
body.is-authed .sales-out-lines-table td:nth-child(3) {
  width: 184px !important;
}

body.is-authed .sales-out-lines-table th:nth-child(4),
body.is-authed .sales-out-lines-table td:nth-child(4) {
  width: 120px !important;
}

body.is-authed .sales-out-lines-table th:nth-child(5),
body.is-authed .sales-out-lines-table td:nth-child(5) {
  width: 92px !important;
}

body.is-authed .sales-out-lines-table th:nth-child(6),
body.is-authed .sales-out-lines-table td:nth-child(6) {
  width: 56px !important;
}

body.is-authed .sales-out-lines-table th,
body.is-authed .sales-out-lines-table td {
  padding: 4px !important;
}

body.is-authed .modal-panel .sales-out-lines-table input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
body.is-authed .sales-out-lines-table select {
  height: 28px !important;
  min-height: 28px !important;
  padding: 2px 6px !important;
}

body.is-authed .sales-out-lines-table button {
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 5px !important;
}

body.is-authed .material-category-strip:not(.product-category-strip) footer {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 3px !important;
  align-items: start !important;
  justify-items: start !important;
}

body.is-authed .material-category-strip:not(.product-category-strip) footer b,
body.is-authed .material-category-strip:not(.product-category-strip) footer em {
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.is-authed .material-category-strip:not(.product-category-strip) footer em.warn {
  grid-row: 2 !important;
}

body.is-authed .material-warehouse-block.is-batch-editing [data-material-field] {
  cursor: text !important;
}

body.is-authed .material-warehouse-block.is-batch-editing [data-material-field]:hover {
  background: rgba(47, 111, 237, 0.06) !important;
}

body.is-authed .material-warehouse-block.is-batch-editing [data-material-row].is-selected td {
  background: #f8fbff !important;
}

body.is-authed .material-warehouse-block.is-batch-editing [data-material-row].is-delete-pending td {
  background: rgba(255, 59, 48, 0.07) !important;
  color: #9f2f2a !important;
  text-decoration: line-through !important;
}

body.is-authed .material-inline-edit {
  width: 100% !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 3px 6px !important;
  font-size: 12px !important;
}

@media (max-width: 1100px) {
  body.is-authed .material-category-strip:not(.product-category-strip) {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body.is-authed .material-inventory-groups.material-warehouse-groups:not(.product-inventory-groups) {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 760px) {
  body.is-authed .modal-panel:has(.sales-out-lines) {
    width: min(440px, calc(100vw - 18px)) !important;
  }

  body.is-authed .sales-out-form {
    grid-template-columns: 1fr !important;
  }

  body.is-authed .sales-out-lines-table {
    max-height: 42vh !important;
    overflow: auto !important;
  }

  body.is-authed .sales-out-lines-table table {
    min-width: 680px !important;
  }

  body.is-authed .material-inventory-groups.material-warehouse-groups:not(.product-inventory-groups) {
    grid-template-columns: 1fr !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-warehouse-block {
    width: 100% !important;
    height: 320px !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .category-filter,
  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-warehouse-block > header em {
    grid-column: 1 / -1 !important;
    justify-self: stretch !important;
    padding-left: 0 !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-warehouse-block > header em {
    grid-row: 3 !important;
  }
}

body.is-authed .modal-head h2 {
  font-size: 16px !important;
  font-weight: 750 !important;
}

@media (max-width: 760px) {
  body.is-authed .grouped-mobile-records[data-mobile-table-id="formula-table"] {
    display: grid !important;
    gap: 10px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  body.is-authed .grouped-mobile-records[data-mobile-table-id="formula-table"] .mobile-category-block {
    border: 1px solid var(--ui-line) !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }

  body.is-authed .material-category-strip:not(.product-category-strip) {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body.is-authed .material-category-strip:not(.product-category-strip) article {
    display: grid !important;
    grid-template-rows: 22px 8px 36px !important;
    gap: 7px !important;
    min-height: 114px !important;
    height: 114px !important;
    padding: 10px 12px !important;
    overflow: hidden !important;
  }

  body.is-authed .material-category-strip:not(.product-category-strip) header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) max-content !important;
    gap: 4px !important;
    align-items: center !important;
    min-width: 0 !important;
  }

  body.is-authed .material-category-strip:not(.product-category-strip) header strong,
  body.is-authed .material-category-strip:not(.product-category-strip) header span {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    line-height: 1.1 !important;
  }

  body.is-authed .material-category-strip:not(.product-category-strip) header strong {
    font-size: 12px !important;
    font-weight: 780 !important;
  }

  body.is-authed .material-category-strip:not(.product-category-strip) header span {
    font-size: 11px !important;
  }

  body.is-authed .material-category-strip:not(.product-category-strip) div {
    align-self: center !important;
    height: 6px !important;
  }

  body.is-authed .material-category-strip:not(.product-category-strip) footer {
    display: grid !important;
    grid-template-rows: 18px 14px !important;
    gap: 3px !important;
    min-width: 0 !important;
    align-self: end !important;
  }

  body.is-authed .material-category-strip:not(.product-category-strip) footer b,
  body.is-authed .material-category-strip:not(.product-category-strip) footer em {
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    line-height: 1.1 !important;
  }

  body.is-authed .material-category-strip:not(.product-category-strip) footer b {
    font-size: 13px !important;
  }

  body.is-authed .material-category-strip:not(.product-category-strip) footer em {
    font-size: 10px !important;
  }

  body.is-authed .content {
    padding: 12px 12px 28px !important;
  }

  body.is-authed .panel,
  body.is-authed .dashboard-hero,
  body.is-authed .metric-card,
  body.is-authed .dashboard-card,
  body.is-authed .energy-card,
  body.is-authed .quick-card,
  body.is-authed .category-section,
  body.is-authed .material-warehouse-block {
    border-radius: 10px !important;
    padding: 12px !important;
  }

  body.is-authed .mobile-record-list,
  body.is-authed .mobile-stock-list,
  body.is-authed .mobile-list {
    gap: 0 !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    overflow: hidden !important;
    box-shadow: none !important;
  }

  body.is-authed .grouped-mobile-records {
    display: grid !important;
    gap: 10px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    overflow: visible !important;
    box-shadow: none !important;
  }

  body.is-authed .grouped-mobile-records .mobile-category-block {
    border: 1px solid var(--ui-line) !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    overflow: hidden !important;
    box-shadow: none !important;
  }

  body.is-authed .mobile-record-row,
  body.is-authed .mobile-stock-row,
  body.is-authed .compact-category-row,
  body.is-authed .inventory-mobile-row {
    min-height: 46px !important;
    padding: 8px 10px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--ui-line-soft) !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    box-shadow: none !important;
  }

  body.is-authed .mobile-record-row:last-child,
  body.is-authed .mobile-stock-row:last-child {
    border-bottom: 0 !important;
  }

  body.is-authed .mobile-record-main strong,
  body.is-authed .mobile-stock-name,
  body.is-authed .mobile-stock-row strong {
    font-size: 14px !important;
    font-weight: 750 !important;
  }

  body.is-authed .mobile-record-meta {
    grid-template-columns: 1fr 1fr !important;
    gap: 2px 8px !important;
    margin-top: 3px !important;
  }

  body.is-authed .mobile-record-meta span,
  body.is-authed .mobile-stock-row small {
    font-size: 11px !important;
    color: var(--ui-text-soft) !important;
  }

  body.is-authed .modal {
    padding: 12px !important;
  }

  body.is-authed .modal-panel {
    width: min(430px, calc(100vw - 24px)) !important;
    max-height: calc(100vh - 24px) !important;
    margin: 0 auto !important;
    border-radius: 12px !important;
  }

  body.is-authed .primary-btn,
  body.is-authed .ghost-btn,
  body.is-authed .file-action-btn,
  body.is-authed .profile-action-btn {
    min-height: 36px !important;
  }
}

/* UI lightness pass 2: calmer dashboard, clearer login, tighter mobile rhythm. */
body.is-authed .dashboard-hero {
  min-height: 86px !important;
  padding: 18px 20px !important;
  display: flex !important;
  align-items: center !important;
}

body.is-authed .dashboard-title-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  width: 100% !important;
}

body.is-authed .dashboard-hero h2 {
  margin: 0 !important;
  font-size: 23px !important;
  line-height: 1.15 !important;
}

body.is-authed .dashboard-hero-kicker {
  color: #5f7fb5 !important;
  font-size: 11px !important;
  font-weight: 750 !important;
  letter-spacing: 0.08em !important;
}

body.is-authed .dashboard-periods {
  flex: 0 0 auto !important;
  padding: 3px !important;
  border: 1px solid rgba(221, 230, 242, 0.9) !important;
  border-radius: 9px !important;
  background: #f2f6fb !important;
  box-shadow: none !important;
}

body.is-authed .dashboard-periods::before {
  display: none !important;
}

body.is-authed .dashboard-periods button {
  min-width: 52px !important;
  min-height: 30px !important;
  border-radius: 7px !important;
  color: #64748b !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

body.is-authed .dashboard-periods button.active {
  background: #ffffff !important;
  color: #2f6fed !important;
  box-shadow: 0 4px 12px rgba(43, 64, 96, 0.06) !important;
}

body.is-authed .dashboard-kpis {
  gap: 10px !important;
}

body.is-authed .executive-kpi {
  min-height: 78px !important;
  padding: 12px 14px !important;
}

body.is-authed .executive-kpi span {
  color: #7a8799 !important;
  font-size: 12px !important;
  font-weight: 650 !important;
}

body.is-authed .executive-kpi strong {
  color: #111827 !important;
  font-size: 24px !important;
  font-weight: 800 !important;
}

body.is-authed .kpi-pulse-dot {
  width: 9px !important;
  height: 9px !important;
  opacity: 0.78 !important;
  box-shadow: 0 0 0 4px rgba(47, 111, 237, 0.08) !important;
}

body.is-authed .dashboard-insights {
  gap: 10px !important;
}

body.is-authed .dashboard-chart,
body.is-authed .dashboard-health,
body.is-authed .quick-action-card {
  min-height: 0 !important;
}

body.is-authed .quick-action-card .dashboard-action-grid {
  gap: 8px !important;
}

body.is-authed .quick-action-card .dashboard-action-grid button {
  justify-content: flex-start !important;
  min-height: 38px !important;
  border: 1px solid rgba(221, 230, 242, 0.9) !important;
  border-radius: 8px !important;
  background: #f8fafc !important;
  box-shadow: none !important;
}

body.is-authed .quick-action-card .dashboard-action-grid button b {
  display: inline-grid !important;
  width: 22px !important;
  height: 22px !important;
  place-items: center !important;
  border-radius: 7px !important;
  background: rgba(47, 111, 237, 0.08) !important;
  color: #2f6fed !important;
  font-size: 14px !important;
}

body.is-authed .dashboard-energy {
  padding: 14px !important;
}

body.is-authed .dashboard-energy .energy-four-grid,
body.is-authed .dashboard-energy-grid,
body.is-authed .energy-summary-grid {
  gap: 8px !important;
}

body.is-authed .dashboard-energy .energy-meter-group,
body.is-authed .dashboard-energy .energy-gas-rows,
body.is-authed .energy-summary-grid article {
  border: 1px solid rgba(229, 235, 244, 0.9) !important;
  border-radius: 9px !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

body:not(.is-authed) .login-shell {
  background: rgba(255, 255, 255, 0.74) !important;
  border-color: rgba(216, 228, 242, 0.9) !important;
  box-shadow: 0 24px 70px rgba(44, 69, 105, 0.12) !important;
}

body:not(.is-authed) .login-panel:not([hidden]),
body:not(.is-authed) .register-panel:not([hidden]) {
  color: #172033 !important;
}

body:not(.is-authed) .login-panel h1,
body:not(.is-authed) .register-panel h1,
body:not(.is-authed) .login-panel .brand strong {
  color: #111827 !important;
}

body:not(.is-authed) .login-panel .field > span,
body:not(.is-authed) .register-panel .field > span,
body:not(.is-authed) .login-panel .brand span {
  color: #68758d !important;
}

body:not(.is-authed) .login-showcase {
  opacity: 0.48 !important;
}

body:not(.is-authed) .login-panel .field input,
body:not(.is-authed) .login-panel .code-row input,
body:not(.is-authed) .register-panel .field input,
body:not(.is-authed) .register-panel .field select,
body:not(.is-authed) .register-panel .code-row input {
  background-color: rgba(255, 255, 255, 0.82) !important;
  border-color: rgba(205, 220, 238, 0.92) !important;
  color: #172033 !important;
}

@media (max-width: 760px) {
  body.is-authed .dashboard-hero {
    min-height: 74px !important;
    padding: 13px 14px !important;
  }

  body.is-authed .dashboard-hero-copy {
    width: 100% !important;
  }

  body.is-authed .dashboard-title-row {
    gap: 10px !important;
  }

  body.is-authed .dashboard-hero h2 {
    min-width: 0 !important;
    font-size: 20px !important;
    white-space: normal !important;
  }

  body.is-authed .dashboard-hero h2 strong {
    display: inline !important;
  }

  body.is-authed .dashboard-periods {
    margin-left: auto !important;
  }

  body.is-authed .dashboard-periods button {
    min-width: 42px !important;
    min-height: 28px !important;
    padding: 0 8px !important;
    font-size: 12px !important;
  }

  body.is-authed .dashboard-kpis {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body.is-authed .executive-kpi {
    min-height: 76px !important;
    padding: 10px 11px !important;
    gap: 5px !important;
  }

  body.is-authed .executive-kpi strong {
    font-size: 21px !important;
    line-height: 1.05 !important;
  }

  body.is-authed .executive-kpi span,
  body.is-authed .executive-kpi small {
    font-size: 11px !important;
  }

  body.is-authed .dashboard-insights {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 9px !important;
  }

  body.is-authed .dashboard-chart {
    display: none !important;
  }

  body.is-authed .quick-action-card {
    padding: 12px !important;
  }

  body.is-authed .quick-action-card .dashboard-action-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  body.is-authed .quick-action-card .dashboard-action-grid button {
    min-height: 40px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
  }

  body.is-authed .dashboard-energy {
    padding: 12px !important;
  }

  body.is-authed .dashboard-energy .energy-four-grid {
    grid-template-columns: 1fr !important;
  }

  body:not(.is-authed) .login-shell {
    background: rgba(255, 255, 255, 0.76) !important;
  }

  body:not(.is-authed) .login-panel:not([hidden]),
  body:not(.is-authed) .register-panel:not([hidden]) {
    background: rgba(255, 255, 255, 0.10) !important;
  }
}

/* Absolute final login palette: keep the redesigned page in the original preview style. */
body.locked:not(.is-authed) .neo-login-screen {
  --neo-bg: #e4ebf4;
  --neo-text: #3d4852;
  --neo-muted: #6b7280;
  --neo-soft-muted: #8290a2;
  --neo-accent: #5567d8;
  --neo-accent-light: #7584e8;
  --neo-accent-deep: #4655c4;
  --neo-teal: #23b7ad;
  --neo-sky: #64c7ff;
  --neo-shadow-dark: rgb(155 171 195 / 0.66);
  --neo-shadow-light: rgb(255 255 255 / 0.68);
  --neo-shadow-raised: 9px 9px 16px var(--neo-shadow-dark), -9px -9px 16px var(--neo-shadow-light);
  --neo-shadow-raised-hover: 12px 12px 20px rgb(155 171 195 / 0.74), -12px -12px 20px rgb(255 255 255 / 0.74);
  --neo-shadow-small: 5px 5px 10px rgb(155 171 195 / 0.62), -5px -5px 10px rgb(255 255 255 / 0.62);
  --neo-shadow-inset: inset 6px 6px 10px rgb(155 171 195 / 0.62), inset -6px -6px 10px rgb(255 255 255 / 0.62);
  --neo-shadow-inset-deep: inset 10px 10px 20px rgb(155 171 195 / 0.7), inset -10px -10px 20px rgb(255 255 255 / 0.72);
  background:
    radial-gradient(circle at 18% 16%, rgb(154 124 255 / 0.13), transparent 30%),
    radial-gradient(circle at 82% 74%, rgb(35 183 173 / 0.14), transparent 32%),
    var(--neo-bg) !important;
}

body.locked:not(.is-authed) .neo-login-card {
  background:
    linear-gradient(145deg, rgb(255 255 255 / 0.16), rgb(214 225 238 / 0.16)),
    var(--neo-bg) !important;
  box-shadow: var(--neo-shadow-raised), inset 1px 1px 0 rgb(255 255 255 / 0.32) !important;
}

body.locked:not(.is-authed) .neo-brand-mark,
body.locked:not(.is-authed) .neo-field input,
body.locked:not(.is-authed) .neo-code-row input,
body.locked:not(.is-authed) .neo-auth-tabs,
body.locked:not(.is-authed) .neo-secondary {
  background-color: var(--neo-bg) !important;
}

body.locked:not(.is-authed) .neo-sculpture {
  background:
    radial-gradient(circle at 50% 50%, var(--neo-bg) 0 29%, transparent 30%),
    conic-gradient(from 28deg, rgb(97 87 255 / 0.13), rgb(35 183 173 / 0.12), rgb(100 199 255 / 0.1), rgb(97 87 255 / 0.13)),
    radial-gradient(circle at 36% 30%, rgb(255 255 255 / 0.32), transparent 32%),
    var(--neo-bg) !important;
  box-shadow:
    var(--neo-shadow-raised),
    inset 0 0 0 18px rgb(255 255 255 / 0.12),
    inset 0 0 0 34px rgb(97 87 255 / 0.025),
    0 28px 70px rgb(97 87 255 / 0.08) !important;
}

body.locked:not(.is-authed) .neo-sculpture::before {
  background:
    radial-gradient(circle at 50% 50%, transparent 0 44%, var(--neo-bg) 45% 100%),
    conic-gradient(from 0deg, rgb(255 255 255 / 0.22), rgb(85 103 216 / 0.09), rgb(35 183 173 / 0.1), rgb(255 255 255 / 0.22)) !important;
  box-shadow:
    var(--neo-shadow-inset-deep),
    inset 0 0 0 12px rgb(255 255 255 / 0.16),
    inset 0 0 0 28px rgb(100 199 255 / 0.035) !important;
}

body.locked:not(.is-authed) .neo-sculpture::after {
  background:
    radial-gradient(circle at 38% 30%, rgb(255 255 255 / 0.34), transparent 34%),
    var(--neo-bg) !important;
  box-shadow:
    var(--neo-shadow-raised-hover),
    inset 0 0 0 10px rgb(255 255 255 / 0.12),
    0 18px 38px rgb(97 87 255 / 0.07) !important;
}

body.locked:not(.is-authed) .neo-sculpture i {
  background:
    radial-gradient(circle at 35% 30%, rgb(255 255 255 / 0.28), transparent 35%),
    var(--neo-bg) !important;
  box-shadow:
    var(--neo-shadow-inset),
    inset 0 0 0 8px rgb(35 183 173 / 0.045) !important;
}

body.locked:not(.is-authed) .neo-sweep {
  background: conic-gradient(from 0deg, transparent 0 62%, rgb(255 255 255 / 0.42) 67%, rgb(100 199 255 / 0.12) 70%, transparent 76% 100%) !important;
  opacity: 0.5 !important;
  mix-blend-mode: soft-light !important;
}

body.locked:not(.is-authed) .neo-ticks {
  background: repeating-conic-gradient(from 0deg, rgb(85 103 216 / 0.16) 0 1deg, transparent 1deg 15deg) !important;
  opacity: 0.62 !important;
}

body.locked:not(.is-authed) .neo-orbit-path::before {
  background:
    radial-gradient(circle at 34% 28%, rgb(255 255 255 / 0.42), transparent 36%),
    linear-gradient(145deg, rgb(228 235 244 / 1), rgb(213 224 238 / 0.9)) !important;
  box-shadow:
    var(--neo-shadow-small),
    0 10px 22px rgb(35 183 173 / 0.08) !important;
}

/* Absolute final: old preview ring sculpture. */
body.locked:not(.is-authed) .neo-login-visual {
  min-height: 560px !important;
  perspective: 900px !important;
}

body.locked:not(.is-authed) .neo-sculpture {
  width: min(392px, 72vw) !important;
  aspect-ratio: 1 !important;
  border-radius: 999px !important;
  background:
    radial-gradient(circle at 50% 50%, var(--neo-bg) 0 29%, transparent 30%),
    conic-gradient(from 28deg, rgb(97 87 255 / 0.13), rgb(35 183 173 / 0.12), rgb(100 199 255 / 0.1), rgb(97 87 255 / 0.13)),
    radial-gradient(circle at 36% 30%, rgb(255 255 255 / 0.32), transparent 32%),
    var(--neo-bg) !important;
  box-shadow:
    var(--neo-shadow-raised),
    inset 0 0 0 18px rgb(255 255 255 / 0.12),
    inset 0 0 0 34px rgb(97 87 255 / 0.025),
    0 28px 70px rgb(97 87 255 / 0.08) !important;
  animation: neoSculptureBreath 8s ease-in-out infinite !important;
  transform-style: preserve-3d !important;
}

body.locked:not(.is-authed) .neo-sculpture::before {
  inset: 13% !important;
  z-index: 1 !important;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 44%, var(--neo-bg) 45% 100%),
    conic-gradient(from 0deg, rgb(255 255 255 / 0.22), rgb(85 103 216 / 0.09), rgb(35 183 173 / 0.1), rgb(255 255 255 / 0.22)) !important;
  box-shadow:
    var(--neo-shadow-inset-deep),
    inset 0 0 0 12px rgb(255 255 255 / 0.16),
    inset 0 0 0 28px rgb(100 199 255 / 0.035) !important;
  animation: neoCounterTurn 48s linear infinite !important;
}

body.locked:not(.is-authed) .neo-sculpture::after {
  inset: 32% !important;
  z-index: 3 !important;
  background:
    radial-gradient(circle at 38% 30%, rgb(255 255 255 / 0.34), transparent 34%),
    var(--neo-bg) !important;
  box-shadow:
    var(--neo-shadow-raised-hover),
    inset 0 0 0 10px rgb(255 255 255 / 0.12),
    0 18px 38px rgb(97 87 255 / 0.07) !important;
  animation: neoClockTurn 42s linear infinite reverse !important;
}

body.locked:not(.is-authed) .neo-sculpture i {
  inset: 44% !important;
  z-index: 4 !important;
  background:
    radial-gradient(circle at 35% 30%, rgb(255 255 255 / 0.28), transparent 35%),
    var(--neo-bg) !important;
  box-shadow:
    var(--neo-shadow-inset),
    inset 0 0 0 8px rgb(35 183 173 / 0.045) !important;
  animation: neoClockTurn 56s linear infinite !important;
}

body.locked:not(.is-authed) .neo-sweep {
  inset: 6% !important;
  z-index: 2 !important;
  border-radius: 999px !important;
  background: conic-gradient(from 0deg, transparent 0 62%, rgb(255 255 255 / 0.42) 67%, rgb(100 199 255 / 0.12) 70%, transparent 76% 100%) !important;
  opacity: 0.5 !important;
  mix-blend-mode: soft-light !important;
  animation: neoClockTurn 18s linear infinite !important;
}

body.locked:not(.is-authed) .neo-ticks {
  inset: -4% !important;
  z-index: 0 !important;
  border-radius: 999px !important;
  background: repeating-conic-gradient(from 0deg, rgb(85 103 216 / 0.16) 0 1deg, transparent 1deg 15deg) !important;
  mask-image: radial-gradient(circle, transparent 0 48%, #000 49% 51%, transparent 52%) !important;
  opacity: 0.62 !important;
  animation: neoCounterTurn 72s linear infinite !important;
}

body.locked:not(.is-authed) .neo-orbit-path {
  inset: 10% !important;
  z-index: 4 !important;
  border-radius: 999px !important;
  animation: neoClockTurn 28s linear infinite !important;
}

/* Absolute final: restore the original login preview design. */
body.locked:not(.is-authed) .neo-login-screen {
  --neo-bg: #e4ebf4;
  --neo-text: #3d4852;
  --neo-muted: #6b7280;
  --neo-soft-muted: #8290a2;
  --neo-accent: #5567d8;
  --neo-accent-light: #7584e8;
  --neo-accent-deep: #4655c4;
  --neo-teal: #23b7ad;
  --neo-sky: #64c7ff;
  --neo-shadow-dark: rgb(155 171 195 / 0.66);
  --neo-shadow-light: rgb(255 255 255 / 0.68);
  --neo-shadow-raised: 9px 9px 16px var(--neo-shadow-dark), -9px -9px 16px var(--neo-shadow-light);
  --neo-shadow-raised-hover: 12px 12px 20px rgb(155 171 195 / 0.74), -12px -12px 20px rgb(255 255 255 / 0.74);
  --neo-shadow-small: 5px 5px 10px rgb(155 171 195 / 0.62), -5px -5px 10px rgb(255 255 255 / 0.62);
  --neo-shadow-inset: inset 6px 6px 10px rgb(155 171 195 / 0.62), inset -6px -6px 10px rgb(255 255 255 / 0.62);
  --neo-shadow-inset-deep: inset 10px 10px 20px rgb(155 171 195 / 0.7), inset -10px -10px 20px rgb(255 255 255 / 0.72);
  --neo-shadow-inset-small: inset 3px 3px 6px rgb(155 171 195 / 0.6), inset -3px -3px 6px rgb(255 255 255 / 0.62);
  display: grid !important;
  min-height: 100vh !important;
  padding: 48px !important;
  overflow: hidden !important;
  background:
    radial-gradient(circle at 18% 16%, rgb(154 124 255 / 0.13), transparent 30%),
    radial-gradient(circle at 82% 74%, rgb(35 183 173 / 0.14), transparent 32%),
    var(--neo-bg) !important;
  color: var(--neo-text) !important;
}

body.locked:not(.is-authed) .neo-login-screen::before,
body.locked:not(.is-authed) .neo-login-screen::after {
  content: "" !important;
  position: fixed !important;
  display: block !important;
  pointer-events: none !important;
  border-radius: 999px !important;
  background: var(--neo-bg) !important;
}

body.locked:not(.is-authed) .neo-login-screen::before {
  width: 204px !important;
  height: 204px !important;
  top: 7vh !important;
  left: 7vw !important;
  box-shadow: var(--neo-shadow-inset-deep), inset 0 0 0 18px rgb(97 87 255 / 0.045) !important;
  opacity: 0.72 !important;
  animation: ambientPulse 6.4s ease-in-out infinite !important;
}

body.locked:not(.is-authed) .neo-login-screen::after {
  width: 142px !important;
  height: 142px !important;
  right: 8vw !important;
  bottom: 10vh !important;
  box-shadow: var(--neo-shadow-raised), inset 0 0 0 16px rgb(35 183 173 / 0.05) !important;
  opacity: 0.74 !important;
  animation: ambientFloat 7s ease-in-out infinite !important;
}

body.locked:not(.is-authed) .neo-login-shell {
  position: relative !important;
  z-index: 1 !important;
  display: grid !important;
  grid-template-columns: 416px minmax(300px, 1fr) !important;
  gap: 72px !important;
  align-items: center !important;
  width: min(1032px, 100%) !important;
  min-height: auto !important;
  margin: auto !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.locked:not(.is-authed) .neo-login-card-stack {
  width: 100% !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.locked:not(.is-authed) #loginForm.neo-login-card {
  position: relative !important;
  display: grid !important;
  gap: 22px !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 672px !important;
  max-height: none !important;
  align-content: start !important;
  overflow: visible !important;
  padding: 40px !important;
  border: 0 !important;
  border-radius: 32px !important;
  background:
    linear-gradient(145deg, rgb(255 255 255 / 0.16), rgb(214 225 238 / 0.16)),
    var(--neo-bg) !important;
  box-shadow: var(--neo-shadow-raised), inset 1px 1px 0 rgb(255 255 255 / 0.32) !important;
  transform: none !important;
}

body.locked:not(.is-authed) #loginForm.neo-login-card::before {
  content: "" !important;
  position: absolute !important;
  top: 26px !important;
  right: 30px !important;
  width: 76px !important;
  height: 76px !important;
  border-radius: 999px !important;
  background: var(--neo-bg) !important;
  box-shadow: var(--neo-shadow-inset-small) !important;
  opacity: 0.55 !important;
  pointer-events: none !important;
}

body.locked:not(.is-authed) #loginForm .neo-brand {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  margin: 0 !important;
}

body.locked:not(.is-authed) #loginForm .neo-brand-mark {
  display: grid !important;
  width: 60px !important;
  height: 60px !important;
  flex: 0 0 auto !important;
  place-items: center !important;
  border-radius: 22px !important;
  background:
    radial-gradient(circle at 35% 30%, rgb(255 255 255 / 0.62), transparent 38%),
    var(--neo-bg) !important;
  box-shadow: var(--neo-shadow-small), 0 12px 26px rgb(97 87 255 / 0.1) !important;
}

body.locked:not(.is-authed) #loginForm .neo-brand-mark img {
  width: 38px !important;
  height: 38px !important;
}

body.locked:not(.is-authed) #loginForm .neo-brand strong {
  display: block !important;
  color: var(--neo-text) !important;
  font-size: 18px !important;
  font-weight: 760 !important;
  line-height: 1.1 !important;
}

body.locked:not(.is-authed) #loginForm .neo-brand span {
  display: block !important;
  margin-top: 4px !important;
  color: var(--neo-muted) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
}

body.locked:not(.is-authed) #loginForm .neo-login-kicker {
  display: none !important;
}

body.locked:not(.is-authed) #loginForm .neo-login-headline {
  display: grid !important;
  gap: 10px !important;
  padding-top: 2px !important;
}

body.locked:not(.is-authed) #loginForm .neo-login-headline h1 {
  margin: 0 !important;
  color: var(--neo-text) !important;
  font-size: 38px !important;
  font-weight: 760 !important;
  line-height: 1.12 !important;
  letter-spacing: 0 !important;
}

body.locked:not(.is-authed) #loginForm .neo-login-headline p {
  max-width: 25em !important;
  margin: 0 !important;
  color: var(--neo-muted) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.65 !important;
}

body.locked:not(.is-authed) #loginForm .neo-login-headline p::before {
  content: "" !important;
  display: inline-block !important;
  width: 8px !important;
  height: 8px !important;
  margin-right: 8px !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, var(--neo-teal), var(--neo-sky)) !important;
  box-shadow: 0 4px 10px rgb(35 183 173 / 0.26) !important;
  vertical-align: 1px !important;
}

body.locked:not(.is-authed) #loginForm .neo-auth-tabs {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  height: 52px !important;
  min-height: 52px !important;
  padding: 6px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--neo-bg) !important;
  box-shadow: var(--neo-shadow-inset) !important;
}

body.locked:not(.is-authed) #loginForm .neo-auth-tabs::before {
  content: "" !important;
  position: absolute !important;
  top: 6px !important;
  bottom: 6px !important;
  left: 6px !important;
  width: calc((100% - 12px) / 2) !important;
  border-radius: 999px !important;
  background:
    linear-gradient(145deg, rgb(255 255 255 / 0.22), rgb(214 225 238 / 0.1)),
    var(--neo-bg) !important;
  box-shadow: var(--neo-shadow-small), inset 0 1px 0 rgb(255 255 255 / 0.34) !important;
}

body.locked:not(.is-authed) #loginForm .neo-auth-stage {
  display: grid !important;
  min-height: 274px !important;
  align-items: start !important;
}

body.locked:not(.is-authed) #loginForm .neo-auth-pane {
  display: grid !important;
  gap: 16px !important;
}

body.locked:not(.is-authed) #loginForm .neo-field {
  display: grid !important;
  gap: 8px !important;
}

body.locked:not(.is-authed) #loginForm .neo-field > span {
  color: var(--neo-text) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

body.locked:not(.is-authed) #loginForm .neo-field input,
body.locked:not(.is-authed) #loginForm .neo-code-row input {
  width: 100% !important;
  height: 56px !important;
  min-height: 56px !important;
  border: 0 !important;
  border-radius: 16px !important;
  outline: none !important;
  background:
    linear-gradient(145deg, rgb(255 255 255 / 0.1), transparent),
    var(--neo-bg) !important;
  box-shadow: var(--neo-shadow-inset) !important;
  color: var(--neo-text) !important;
  padding: 0 17px !important;
  font-size: 15px !important;
  font-weight: 650 !important;
}

body.locked:not(.is-authed) #loginForm .neo-code-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 120px !important;
  gap: 12px !important;
}

body.locked:not(.is-authed) #loginForm .neo-primary {
  width: 100% !important;
  height: 56px !important;
  min-height: 56px !important;
  margin-top: 4px !important;
  border-radius: 16px !important;
  background:
    radial-gradient(circle at 18% 18%, rgb(255 255 255 / 0.34), transparent 28%),
    linear-gradient(135deg, var(--neo-accent-deep) 0%, var(--neo-accent) 48%, var(--neo-accent-light) 100%) !important;
  color: #fff !important;
  font-size: 15px !important;
  box-shadow:
    9px 9px 18px rgb(85 103 216 / 0.28),
    -8px -8px 16px rgb(255 255 255 / 0.58),
    inset 1px 1px 0 rgb(255 255 255 / 0.24) !important;
}

body.locked:not(.is-authed) #loginForm .neo-auth-footer {
  display: flex !important;
  justify-content: center !important;
  gap: 8px !important;
  min-height: 20px !important;
}

body.locked:not(.is-authed) .neo-login-visual {
  position: relative !important;
  display: grid !important;
  min-height: 560px !important;
  place-items: center !important;
  perspective: 900px !important;
}

/* Keep login errors visually attached to the field group. */
body.locked:not(.is-authed) #loginForm .neo-auth-stage {
  min-height: 206px !important;
}

body.locked:not(.is-authed) #loginError.neo-form-error {
  margin-top: -2px !important;
}

/* Fit secondary auth flows in one viewport without internal scrolling. */
body.locked:not(.is-authed) #registerForm.neo-login-card,
body.locked:not(.is-authed) #forgotForm.neo-login-card {
  gap: 9px !important;
  max-height: calc(100svh - 64px) !important;
  overflow: visible !important;
  padding: 24px 32px !important;
}

body.locked:not(.is-authed) #registerForm .neo-brand,
body.locked:not(.is-authed) #forgotForm .neo-brand {
  gap: 10px !important;
}

body.locked:not(.is-authed) #registerForm .neo-brand-mark,
body.locked:not(.is-authed) #forgotForm .neo-brand-mark {
  width: 48px !important;
  height: 48px !important;
  border-radius: 17px !important;
}

body.locked:not(.is-authed) #registerForm .neo-brand-mark img,
body.locked:not(.is-authed) #forgotForm .neo-brand-mark img {
  width: 31px !important;
  height: 31px !important;
}

body.locked:not(.is-authed) #registerForm .neo-flow-head,
body.locked:not(.is-authed) #forgotForm .neo-flow-head {
  gap: 3px !important;
  text-align: center !important;
}

body.locked:not(.is-authed) #registerForm .neo-flow-head h1,
body.locked:not(.is-authed) #forgotForm .neo-flow-head h1 {
  font-size: 28px !important;
  line-height: 1.06 !important;
}

body.locked:not(.is-authed) #registerForm .neo-flow-head p,
body.locked:not(.is-authed) #forgotForm .neo-flow-head p {
  font-size: 12px !important;
  line-height: 1.3 !important;
}

body.locked:not(.is-authed) #registerForm .neo-field,
body.locked:not(.is-authed) #forgotForm .neo-field {
  gap: 4px !important;
}

body.locked:not(.is-authed) #registerForm .neo-field > span,
body.locked:not(.is-authed) #forgotForm .neo-field > span {
  font-size: 11px !important;
}

body.locked:not(.is-authed) #registerForm input,
body.locked:not(.is-authed) #forgotForm input,
body.locked:not(.is-authed) #registerForm .neo-code-row input,
body.locked:not(.is-authed) #forgotForm .neo-code-row input {
  height: 44px !important;
  min-height: 44px !important;
  border-radius: 12px !important;
  font-size: 14px !important;
}

body.locked:not(.is-authed) #registerForm .neo-secondary,
body.locked:not(.is-authed) #forgotForm .neo-secondary {
  min-height: 44px !important;
  border-radius: 12px !important;
}

body.locked:not(.is-authed) #registerForm .neo-code-row,
body.locked:not(.is-authed) #forgotForm .neo-code-row {
  gap: 10px !important;
}

body.locked:not(.is-authed) #registerForm .neo-form-error,
body.locked:not(.is-authed) #forgotForm .neo-form-error {
  min-height: 14px !important;
  margin: -2px 0 !important;
  font-size: 11px !important;
}

body.locked:not(.is-authed) #registerForm .neo-flow-actions,
body.locked:not(.is-authed) #forgotForm .neo-flow-actions {
  display: grid !important;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr) !important;
  gap: 10px !important;
  margin-top: 2px !important;
}

body.locked:not(.is-authed) #registerForm .neo-primary,
body.locked:not(.is-authed) #registerForm .neo-secondary.wide,
body.locked:not(.is-authed) #forgotForm .neo-primary,
body.locked:not(.is-authed) #forgotForm .neo-secondary.wide {
  height: 48px !important;
  min-height: 48px !important;
}

/* Final login replacement overrides: must stay at the end of the file. */
body:not(.is-authed) {
  --login-bg-final: #e7eef6;
  --login-panel-final: rgba(255, 255, 255, 0.88);
  --login-border-final: rgba(203, 216, 233, 0.92);
  --login-text-final: #172033;
  --login-muted-final: #64748b;
}

body:not(.is-authed) .login-screen {
  min-height: 100svh !important;
  padding: 42px !important;
  overflow: auto !important;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(188, 214, 238, 0.22)),
    var(--login-bg-final) !important;
}

body:not(.is-authed) .login-screen::before,
body:not(.is-authed) .login-screen::after,
body:not(.is-authed) .login-shell::before,
body:not(.is-authed) .login-shell::after {
  display: none !important;
}

body:not(.is-authed) .login-shell {
  display: grid !important;
  grid-template-columns: minmax(360px, 420px) minmax(360px, 1fr) !important;
  gap: clamp(42px, 7vw, 92px) !important;
  align-items: center !important;
  width: min(1080px, 100%) !important;
  min-height: calc(100svh - 84px) !important;
  margin: 0 auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body:not(.is-authed) .login-form-column {
  width: 100% !important;
  min-width: 0 !important;
  opacity: 1 !important;
}

body:not(.is-authed) .login-panel:not([hidden]),
body:not(.is-authed) .register-panel:not([hidden]) {
  display: grid !important;
  gap: 18px !important;
  width: 100% !important;
  max-height: none !important;
  min-height: 0 !important;
  overflow: visible !important;
  padding: 34px !important;
  border: 1px solid var(--login-border-final) !important;
  border-radius: 8px !important;
  background: var(--login-panel-final) !important;
  color: var(--login-text-final) !important;
  box-shadow:
    0 22px 56px rgba(43, 64, 96, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.76) !important;
  opacity: 1 !important;
  backdrop-filter: blur(18px) saturate(1.08) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.08) !important;
}

body:not(.is-authed) .login-panel .brand,
body:not(.is-authed) .register-panel .brand {
  gap: 12px !important;
  margin: 0 0 2px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body:not(.is-authed) .login-panel .brand.large .brand-mark,
body:not(.is-authed) .register-panel .brand.large .brand-mark {
  width: 54px !important;
  height: 54px !important;
  border: 1px solid rgba(214, 224, 238, 0.86) !important;
  border-radius: 8px !important;
  background: linear-gradient(180deg, #ffffff, #f2f6fb) !important;
  box-shadow: 0 10px 22px rgba(43, 64, 96, 0.1) !important;
}

body:not(.is-authed) .login-panel .brand strong,
body:not(.is-authed) .register-panel .brand strong {
  color: #182133 !important;
  font-size: 18px !important;
  font-weight: 800 !important;
}

body:not(.is-authed) .login-panel .brand span,
body:not(.is-authed) .register-panel .brand span,
body:not(.is-authed) .login-subtitle,
body:not(.is-authed) .auth-flow-head p {
  color: var(--login-muted-final) !important;
}

body:not(.is-authed) .login-kicker {
  width: fit-content !important;
  padding: 5px 8px !important;
  border: 1px solid rgba(77, 95, 202, 0.14) !important;
  border-radius: 8px !important;
  background: rgba(77, 95, 202, 0.07) !important;
  color: #5362b9 !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
}

body:not(.is-authed) .login-panel h1,
body:not(.is-authed) .register-panel h1 {
  margin: 0 !important;
  color: #121b2c !important;
  font-size: clamp(30px, 4vw, 38px) !important;
  font-weight: 820 !important;
  line-height: 1.12 !important;
  letter-spacing: 0 !important;
  text-shadow: none !important;
}

body:not(.is-authed) .login-subtitle {
  margin: -8px 0 2px !important;
  font-size: 14px !important;
  font-weight: 620 !important;
  line-height: 1.6 !important;
}

body:not(.is-authed) .login-panel .auth-tabs {
  height: 48px !important;
  padding: 4px !important;
  border: 1px solid rgba(207, 219, 235, 0.74) !important;
  border-radius: 8px !important;
  background: rgba(236, 242, 249, 0.78) !important;
  box-shadow: inset 0 1px 2px rgba(43, 64, 96, 0.08) !important;
}

body:not(.is-authed) .login-panel .auth-tabs::before {
  top: 4px !important;
  bottom: 4px !important;
  left: 4px !important;
  width: calc((100% - 8px) / 2) !important;
  border-radius: 6px !important;
  background: #ffffff !important;
  box-shadow: 0 5px 12px rgba(43, 64, 96, 0.11) !important;
}

body:not(.is-authed) .login-panel .auth-tabs button {
  min-height: 38px !important;
  border-radius: 6px !important;
  color: #7a8799 !important;
  font-size: 13px !important;
  font-weight: 760 !important;
}

body:not(.is-authed) .login-panel .auth-tabs button.active {
  color: #1d2638 !important;
}

body:not(.is-authed) .login-panel .field > span,
body:not(.is-authed) .register-panel .field > span {
  color: #38455b !important;
  font-size: 12px !important;
  font-weight: 760 !important;
}

body:not(.is-authed) .login-panel .field input,
body:not(.is-authed) .login-panel .code-row input,
body:not(.is-authed) .register-panel .field input,
body:not(.is-authed) .register-panel .field select,
body:not(.is-authed) .register-panel .code-row input {
  height: 52px !important;
  min-height: 52px !important;
  border: 1px solid rgba(205, 218, 235, 0.95) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.9) !important;
  color: #182133 !important;
  font-size: 15px !important;
  font-weight: 680 !important;
  box-shadow: inset 0 1px 2px rgba(43, 64, 96, 0.06) !important;
  opacity: 1 !important;
}

body:not(.is-authed) .login-panel .field input:focus,
body:not(.is-authed) .login-panel .code-row input:focus,
body:not(.is-authed) .register-panel .field input:focus,
body:not(.is-authed) .register-panel .code-row input:focus {
  border-color: rgba(77, 95, 202, 0.68) !important;
  background: #ffffff !important;
  box-shadow:
    0 0 0 3px rgba(77, 95, 202, 0.18),
    inset 0 1px 2px rgba(43, 64, 96, 0.05) !important;
  transform: none !important;
}

body:not(.is-authed) .login-panel .primary-btn.wide,
body:not(.is-authed) .register-panel .primary-btn.wide,
body:not(.is-authed) .auth-captcha-actions .primary-btn {
  min-height: 52px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: linear-gradient(180deg, #5969d2 0%, #4658bd 100%) !important;
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 820 !important;
  letter-spacing: 0.02em !important;
  box-shadow:
    0 12px 22px rgba(71, 87, 191, 0.24),
    0 2px 4px rgba(45, 56, 145, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(37, 46, 123, 0.18) !important;
}

body:not(.is-authed) .login-panel .primary-btn.wide:hover,
body:not(.is-authed) .register-panel .primary-btn.wide:hover {
  background: linear-gradient(180deg, #6171d9 0%, #4b5fc5 100%) !important;
  transform: translateY(-1px) !important;
}

body:not(.is-authed) .login-panel .ghost-btn,
body:not(.is-authed) .register-panel .ghost-btn {
  min-height: 52px !important;
  border: 1px solid rgba(205, 218, 235, 0.95) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.86) !important;
  color: #334155 !important;
  font-size: 12px !important;
  font-weight: 780 !important;
  box-shadow: 0 6px 14px rgba(43, 64, 96, 0.07) !important;
}

body:not(.is-authed) .form-error {
  min-height: 18px !important;
  margin: -2px 0 0 !important;
  color: #c53636 !important;
  font-size: 12px !important;
  font-weight: 720 !important;
}

body:not(.is-authed) .login-showcase {
  min-height: 520px !important;
  opacity: 0.82 !important;
  filter: saturate(0.92) contrast(1) !important;
}

body:not(.is-authed) .login-art {
  width: min(520px, 100%) !important;
  transform: scale(0.94) !important;
}

body:not(.is-authed) .login-art-glow,
body:not(.is-authed) .login-fluid-ribbon {
  opacity: 0.46 !important;
}

@media (max-width: 900px) {
  body:not(.is-authed) .login-screen {
    padding: 22px !important;
  }

  body:not(.is-authed) .login-shell {
    grid-template-columns: minmax(0, 480px) !important;
    justify-content: center !important;
    min-height: calc(100svh - 44px) !important;
  }

  body:not(.is-authed) .login-showcase {
    display: none !important;
  }
}

@media (max-width: 520px) {
  body:not(.is-authed) .login-screen {
    padding: 14px !important;
  }

  body:not(.is-authed) .login-shell {
    min-height: calc(100svh - 28px) !important;
  }

  body:not(.is-authed) .login-panel:not([hidden]),
  body:not(.is-authed) .register-panel:not([hidden]) {
    gap: 16px !important;
    padding: 22px !important;
  }

  body:not(.is-authed) .login-panel h1,
  body:not(.is-authed) .register-panel h1 {
    font-size: 28px !important;
  }

  body:not(.is-authed) .code-row {
    grid-template-columns: 1fr !important;
  }

  body:not(.is-authed) .login-options {
    align-items: flex-start !important;
    flex-direction: column !important;
  }
}
/* EOF override: original preview login values. */
body.locked:not(.is-authed) #passwordLoginBtn.neo-primary.primary-btn.wide {
  height: 56px !important;
  min-height: 56px !important;
  border-radius: 16px !important;
  margin-top: 4px !important;
  background:
    radial-gradient(circle at 18% 18%, rgb(255 255 255 / 0.34), transparent 28%),
    linear-gradient(135deg, var(--neo-accent-deep) 0%, var(--neo-accent) 48%, var(--neo-accent-light) 100%) !important;
  box-shadow:
    9px 9px 18px rgb(85 103 216 / 0.28),
    -8px -8px 16px rgb(255 255 255 / 0.58),
    inset 1px 1px 0 rgb(255 255 255 / 0.24) !important;
}

/* Final archive layout fixes: keep group counts off filter inputs. */
body.is-authed .material-inventory-groups .material-warehouse-block > header {
  grid-template-columns: max-content minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 4px 8px !important;
}

body.is-authed .material-inventory-groups.material-warehouse-groups:not(.product-inventory-groups) {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body.is-authed .material-inventory-groups .material-warehouse-block > header > div:first-child {
  grid-column: 1 !important;
  grid-row: 1 !important;
  min-width: 0 !important;
}

body.is-authed .material-group-title {
  display: grid !important;
  gap: 1px !important;
  min-width: 0 !important;
}

body.is-authed .material-group-title-line {
  display: inline-grid !important;
  grid-template-columns: max-content max-content !important;
  align-items: end !important;
  gap: 4px !important;
  width: max-content !important;
  max-width: 100% !important;
}

body.is-authed .material-group-title-line em[data-category-summary] {
  grid-column: auto !important;
  grid-row: auto !important;
  justify-self: start !important;
  align-self: end !important;
  position: relative !important;
  top: 1px !important;
  padding-left: 0 !important;
  color: #7b8797 !important;
  font-size: 12px !important;
  font-style: normal !important;
  font-weight: 760 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-warehouse-block > header .material-group-title-line em[data-category-summary] {
  grid-column: auto !important;
  grid-row: auto !important;
  justify-self: start !important;
  align-self: end !important;
  padding-left: 0 !important;
}

body.is-authed .material-inventory-groups .category-filter,
body.is-authed .material-inventory-groups .category-tools,
body.is-authed .material-inventory-groups:not(.product-inventory-groups) .category-filter,
body.is-authed .material-inventory-groups:not(.product-inventory-groups) .category-tools {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  width: 100% !important;
  min-width: 0 !important;
}

body.is-authed .material-inventory-groups .category-filter input {
  width: 100% !important;
  min-width: 0 !important;
}

body.is-authed .material-command .material-command-actions {
  align-items: stretch !important;
}

body.is-authed .material-command .material-command-actions .material-search,
body.is-authed .material-command .material-command-actions .file-action-btn,
body.is-authed .material-command .material-command-actions .soft-primary {
  height: 38px !important;
  min-height: 38px !important;
}

body.is-authed .material-command .material-command-actions .material-search {
  display: flex !important;
  align-items: stretch !important;
}

body.is-authed .material-command .material-command-actions .material-search input {
  height: 38px !important;
  min-height: 38px !important;
}

body.is-authed .material-command .material-command-actions .file-action-btn,
body.is-authed .material-command .material-command-actions .soft-primary {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  line-height: 1 !important;
}

body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table th,
body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table td {
  padding-inline: 3px !important;
}

body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table .material-name-cell {
  width: 31% !important;
}

body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table .material-stock-cell {
  width: 23% !important;
}

body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table .material-price-cell {
  width: 15% !important;
}

body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table .material-warn-cell {
  width: 18% !important;
}

body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table th:nth-child(6),
body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table td:nth-child(6) {
  width: 13% !important;
}

body.is-authed .material-batch-actions {
  grid-column: 4 !important;
  grid-row: 1 !important;
}

body.is-authed .material-category-strip:not(.product-category-strip) {
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
}

body.is-authed .product-inventory-groups .material-warehouse-block {
  min-height: 270px !important;
}

body.is-authed .product-inventory-groups .material-inventory-table {
  min-height: 132px !important;
}

body.is-authed .product-inventory-groups .empty-category {
  width: 100% !important;
  min-height: 34px !important;
  margin-top: 8px !important;
  border-radius: 999px !important;
  justify-content: flex-start !important;
}

body.is-authed .material-inventory-groups .empty-category {
  width: 100% !important;
  min-height: 34px !important;
  margin-top: 8px !important;
  padding: 7px 12px !important;
  border-radius: 999px !important;
  justify-content: flex-start !important;
}

body.is-authed .dashboard-energy .energy-gas-group .energy-gas-rows {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.is-authed .dashboard-energy .energy-gas-rows p {
  grid-template-columns: minmax(54px, max-content) minmax(96px, 1fr) minmax(86px, max-content) !important;
}

body.is-authed .dashboard-energy .energy-gas-rows em {
  min-width: 0 !important;
  overflow: visible !important;
  font-size: 12px !important;
}

body.is-authed .material-warehouse-block.is-batch-editing .material-inventory-table .material-select-cell {
  display: table-cell !important;
  width: 30px !important;
  min-width: 30px !important;
  padding-inline: 4px !important;
  text-align: center !important;
}

body.is-authed .material-warehouse-block.is-batch-editing .material-inventory-table .material-name-cell {
  width: 28% !important;
}

body.is-authed .material-warehouse-block.is-batch-editing .material-inventory-table .material-stock-cell {
  width: 24% !important;
}

body.is-authed .material-warehouse-block.is-batch-editing .material-inventory-table .material-price-cell {
  width: 20% !important;
}

body.is-authed .material-warehouse-block.is-batch-editing .material-inventory-table .material-warn-cell {
  width: 18% !important;
}

body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-warehouse-block.is-batch-editing .material-inventory-table .material-select-cell {
  display: table-cell !important;
  width: 30px !important;
  min-width: 30px !important;
  padding-inline: 4px !important;
  text-align: center !important;
}

body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table th,
body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table td,
body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table .material-name-cell,
body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table .material-stock-cell,
body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table .material-price-cell,
body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table .material-warn-cell,
body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table th:nth-child(6),
body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table td:nth-child(6) {
  text-align: center !important;
}

body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table .material-name-cell strong,
body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table .material-name-cell span {
  display: block !important;
  text-align: center !important;
}

body.is-authed .dashboard-stock-toggle {
  display: none !important;
}

@media (max-width: 900px) {
  body.is-authed .material-category-strip:not(.product-category-strip) {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body.is-authed .material-inventory-groups.material-warehouse-groups:not(.product-inventory-groups) {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 760px) {
  body.is-authed .material-inventory-groups .material-warehouse-block > header {
    grid-template-columns: max-content minmax(0, 1fr) !important;
  }

  body.is-authed .material-inventory-groups .material-warehouse-block > header > div:first-child {
    grid-column: 1 !important;
  }

  body.is-authed .material-batch-actions {
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
    justify-content: flex-start !important;
  }

  body.is-authed .inventory-dashboard .category-stock-groups {
    display: grid !important;
    gap: 10px !important;
    max-height: none !important;
    overflow: visible !important;
    padding-right: 0 !important;
  }

  body.is-authed .inventory-dashboard .dashboard-stock-section {
    display: grid !important;
    gap: 8px !important;
    overflow: hidden !important;
  }

  body.is-authed .inventory-dashboard .dashboard-stock-section .category-section-head {
    grid-template-columns: minmax(0, 1fr) auto auto !important;
    gap: 7px !important;
    margin-bottom: 0 !important;
  }

  body.is-authed .inventory-dashboard .dashboard-stock-section .category-filter {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
  }

  body.is-authed .inventory-dashboard .dashboard-stock-section[data-collapsed="true"] .dashboard-stock-section-body {
    display: none !important;
  }

  body.is-authed .inventory-dashboard .dashboard-stock-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 54px !important;
    min-height: 30px !important;
    padding: 0 10px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 760 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  body.is-authed .inventory-dashboard .dashboard-stock-table-wrap,
  body.is-authed .inventory-dashboard .category-stock-groups .dashboard-stock-table-wrap,
  body.is-authed .inventory-dashboard .material-dashboard-groups .dashboard-stock-table-wrap {
    display: block !important;
    max-height: none !important;
    overflow: visible !important;
    padding-right: 0 !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    box-shadow: none !important;
  }

  body.is-authed .inventory-dashboard .dashboard-stock-table {
    width: 100% !important;
    border-collapse: collapse !important;
    table-layout: fixed !important;
  }

  body.is-authed .inventory-dashboard .dashboard-stock-table .mobile-stock-row {
    display: table-row;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body.is-authed .inventory-dashboard .dashboard-stock-table .mobile-stock-row:last-child td {
    border-bottom: 0 !important;
  }

  body.is-authed .inventory-dashboard .dashboard-stock-table td {
    height: 42px !important;
    padding: 8px 10px !important;
    border-bottom: 1px solid var(--ui-line-soft) !important;
    color: var(--ui-text) !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
    vertical-align: middle !important;
    background: #ffffff !important;
  }

  body.is-authed .inventory-dashboard .dashboard-stock-table td:first-child {
    width: 62% !important;
    min-width: 0 !important;
  }

  body.is-authed .inventory-dashboard .dashboard-stock-table td:last-child {
    width: 38% !important;
    text-align: right !important;
    white-space: nowrap !important;
  }

  body.is-authed .inventory-dashboard .dashboard-stock-table .mobile-stock-name,
  body.is-authed .inventory-dashboard .dashboard-stock-table .mobile-stock-row strong {
    display: inline-block !important;
    max-width: calc(100% - 28px) !important;
    min-width: 0 !important;
    overflow: hidden !important;
    color: var(--ui-text) !important;
    font-size: 13px !important;
    font-weight: 760 !important;
    line-height: 1.2 !important;
    text-overflow: ellipsis !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
  }

  body.is-authed .inventory-dashboard .dashboard-stock-table .mobile-stock-row b {
    display: inline !important;
    color: var(--ui-text) !important;
    font-size: 13px !important;
    font-weight: 760 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
  }

  body.is-authed .inventory-dashboard .dashboard-stock-table .stock-mark {
    display: inline-grid !important;
    width: 18px !important;
    height: 18px !important;
    margin-left: 6px !important;
    font-size: 11px !important;
    vertical-align: middle !important;
  }
}

/* Final mobile material archive cleanup: keep grouped tables compact and readable. */
@media (max-width: 760px) {
  body.is-authed .material-inventory-groups.material-warehouse-groups:not(.product-inventory-groups) {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    overflow: visible !important;
    padding-bottom: 12px !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-warehouse-block {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 14px !important;
    overflow: visible !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-warehouse-block > header,
  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-archive-section-body,
  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-archive-mobile-list {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-warehouse-block > header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 8px !important;
    align-items: center !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-group-title,
  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-group-title-line {
    min-width: 0 !important;
    width: 100% !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-group-title-line {
    display: flex !important;
    align-items: baseline !important;
    gap: 6px !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-group-title-line strong {
    flex: 0 0 auto !important;
    font-size: 20px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-group-title-line em[data-category-summary] {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    padding-left: 0 !important;
    color: #708198 !important;
    font-size: 13px !important;
    font-style: normal !important;
    font-weight: 760 !important;
    line-height: 1.2 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-batch-actions {
    display: flex !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    gap: 6px !important;
    align-items: center !important;
    justify-content: flex-end !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-archive-toggle {
    display: inline-flex !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) [data-material-archive-section][data-collapsed="true"] .material-archive-section-body {
    display: none !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) [data-material-archive-section][data-collapsed="true"] > header .category-filter {
    display: none !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) [data-material-archive-section].is-batch-editing .material-archive-toggle {
    display: none !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .category-filter {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    padding-left: 0 !important;
    justify-self: stretch !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .category-filter input {
    width: 100% !important;
    min-height: 38px !important;
    padding: 0 12px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .empty-category {
    width: 100% !important;
    min-height: 38px !important;
    margin: 0 !important;
    padding: 8px 12px !important;
    border-radius: 12px !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table {
    width: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    display: none !important;
    overflow: hidden !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    padding-bottom: 1px !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-warehouse-block.is-batch-editing .material-inventory-table {
    display: block !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-archive-mobile-list {
    display: block !important;
    overflow: hidden !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: 10px !important;
    background: #ffffff !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-warehouse-block.is-batch-editing .material-archive-mobile-list {
    display: none !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-archive-mobile-table {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    border-collapse: collapse !important;
    table-layout: fixed !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-archive-mobile-table th,
  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-archive-mobile-table td {
    height: 38px !important;
    padding: 6px 5px !important;
    border-bottom: 1px solid var(--ui-line-soft) !important;
    color: #475569 !important;
    font-size: 11px !important;
    line-height: 1.12 !important;
    text-align: center !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-archive-mobile-table th {
    height: 32px !important;
    background: #f4f7fb !important;
    color: #708198 !important;
    font-size: 11px !important;
    font-weight: 800 !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-archive-mobile-row {
    display: table-row;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-archive-mobile-row.is-warning {
    background: #fffbeb !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-archive-mobile-row:last-child td {
    border-bottom: 0 !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-archive-mobile-name {
    width: 34% !important;
    min-width: 0 !important;
    text-align: left !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-archive-mobile-number {
    width: 24% !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-archive-mobile-action {
    width: 18% !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-archive-mobile-name strong,
  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-archive-mobile-name span {
    display: block !important;
    overflow: hidden !important;
    line-height: 1.12 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-archive-mobile-name strong {
    color: #172033 !important;
    font-size: 13px !important;
    font-weight: 800 !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-archive-mobile-name span {
    margin-top: 3px !important;
    color: #8a96a8 !important;
    font-size: 10px !important;
    font-weight: 650 !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-archive-mobile-number b {
    display: inline-block !important;
    max-width: 100% !important;
    overflow: hidden !important;
    color: #172033 !important;
    font-size: 13px !important;
    font-weight: 820 !important;
    text-overflow: ellipsis !important;
    vertical-align: baseline !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-archive-mobile-number span {
    display: block !important;
    margin-top: 2px !important;
    color: #8a96a8 !important;
    font-size: 9px !important;
    font-weight: 760 !important;
    line-height: 1 !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-archive-mobile-row button {
    min-width: 46px !important;
    min-height: 32px !important;
    padding: 0 8px !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: 9px !important;
    background: #ffffff !important;
    color: #172033 !important;
    font-size: 12px !important;
    font-weight: 760 !important;
    outline: none !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-archive-mobile-row button:focus-visible {
    box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.18) !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table table {
    display: table !important;
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-warehouse-block.is-batch-editing .material-inventory-table table {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table thead {
    display: table-header-group !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table tbody {
    display: table-row-group !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table tr {
    display: table-row !important;
    width: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table th,
  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table td {
    display: table-cell !important;
    width: auto !important;
    min-width: 0 !important;
    height: 40px !important;
    padding: 6px 2px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--ui-line-soft) !important;
    color: #475569 !important;
    font-size: 10px !important;
    line-height: 1.15 !important;
    text-align: center !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table th {
    height: 32px !important;
    background: #f4f7fb !important;
    color: #708198 !important;
    font-size: 10px !important;
    font-weight: 800 !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table tbody tr:last-child td {
    border-bottom: 0 !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table .material-select-cell {
    display: none !important;
    width: 0 !important;
    padding: 0 !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-warehouse-block.is-batch-editing .material-inventory-table .material-select-cell {
    display: table-cell !important;
    width: 7% !important;
    padding: 2px !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-warehouse-block.is-batch-editing .material-inventory-table .material-select-cell input[type="checkbox"] {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
    margin: 0 !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table .material-name-cell {
    width: 28% !important;
    text-align: left !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table .material-stock-cell {
    width: 21% !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table .material-price-cell {
    width: 12% !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table .material-warn-cell {
    width: 19% !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table th:nth-child(6),
  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table td:nth-child(6) {
    width: 13% !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table .material-name-cell strong,
  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table .material-name-cell span {
    display: block !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-align: left !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table .material-name-cell strong {
    color: #172033 !important;
    font-size: 12px !important;
    font-weight: 780 !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table .material-name-cell span {
    margin-top: 2px !important;
    color: #8a96a8 !important;
    font-size: 9px !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table b {
    color: #172033 !important;
    font-size: 11px !important;
    font-weight: 780 !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table button {
    min-width: 36px !important;
    min-height: 28px !important;
    padding: 0 5px !important;
    border-radius: 7px !important;
    font-size: 11px !important;
  }
}

@media (min-width: 761px) {
  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-archive-toggle {
    display: none !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-archive-section-body {
    display: block !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-archive-mobile-list {
    display: none !important;
  }
}

body.is-authed .formula-detail-table .formula-select-cell {
  display: none !important;
}

body.is-authed .formula-detail-table.is-batch-editing .formula-select-cell {
  display: table-cell !important;
  width: 32px !important;
  text-align: center !important;
}

body.is-authed .formula-detail-table .formula-select-cell input[type="checkbox"] {
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  min-height: 14px !important;
  margin: 0 !important;
  padding: 0 !important;
  vertical-align: middle !important;
}

body.is-authed .formula-detail-table:not(.is-batch-editing) [data-detail-key] {
  cursor: default !important;
}

body.is-authed .formula-detail-table.is-batch-editing [data-detail-key] {
  cursor: text !important;
}

body.is-authed .formula-detail-table.is-batch-editing tbody tr.is-selected td {
  background: #f8fbff !important;
}

body.is-authed .formula-detail-table .formula-row-actions {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 6px !important;
}

body.is-authed .formula-detail-table .formula-row-actions [hidden] {
  display: none !important;
}

@media (max-width: 640px) {
  body.is-authed .modal-panel.detail-modal .editable-detail-table.formula-detail-table {
    overflow: hidden !important;
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table.formula-detail-table table {
    table-layout: fixed !important;
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table.formula-detail-table .formula-select-cell {
    display: none !important;
    width: 0 !important;
    padding: 0 !important;
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table.formula-detail-table.is-batch-editing .formula-select-cell {
    display: table-cell !important;
    width: 24px !important;
    padding: 5px 2px !important;
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table.formula-detail-table th:nth-child(2),
  body.is-authed .modal-panel.detail-modal .editable-detail-table.formula-detail-table td[data-detail-key="order"] {
    width: 28px !important;
    text-align: center !important;
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table.formula-detail-table th:nth-child(3),
  body.is-authed .modal-panel.detail-modal .editable-detail-table.formula-detail-table td[data-detail-key="material"] {
    width: 72px !important;
    text-align: left !important;
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table.formula-detail-table th:nth-child(4),
  body.is-authed .modal-panel.detail-modal .editable-detail-table.formula-detail-table td[data-detail-key="standard"] {
    width: 78px !important;
    text-align: center !important;
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table.formula-detail-table th:nth-child(5),
  body.is-authed .modal-panel.detail-modal .editable-detail-table.formula-detail-table td[data-detail-key="note"] {
    width: auto !important;
    min-width: 0 !important;
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table.formula-detail-table th,
  body.is-authed .modal-panel.detail-modal .editable-detail-table.formula-detail-table td {
    padding: 6px 4px !important;
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table.formula-detail-table .formula-row-actions {
    justify-content: flex-start !important;
    gap: 5px !important;
    padding-top: 6px !important;
  }

  body.is-authed .modal-panel.detail-modal .editable-detail-table.formula-detail-table .formula-row-actions .ghost-btn {
    min-height: 28px !important;
    padding: 0 8px !important;
    font-size: 11px !important;
  }
}

body.is-authed .modal-actions {
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 6px !important;
}

body.is-authed .modal-actions-left,
body.is-authed .modal-actions-right {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 5px !important;
}

body.is-authed .modal-actions button {
  box-sizing: border-box !important;
  min-width: 48px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 9px !important;
  border-radius: 9px !important;
  font-size: 12px !important;
  font-weight: 720 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

body.is-authed .modal-actions .danger-btn,
body.is-authed .modal-actions .danger-action {
  border: 1px solid rgba(255, 92, 92, 0.28) !important;
  background: rgba(255, 255, 255, 0.88) !important;
  color: #d83d3d !important;
}

body.is-authed .modal-actions .ghost-btn {
  border: 1px solid rgba(210, 224, 242, 0.92) !important;
  background: rgba(255, 255, 255, 0.9) !important;
  color: #1f2a44 !important;
}

body.is-authed .modal-actions .primary-btn {
  border: 1px solid rgba(47, 111, 237, 0.34) !important;
  background: #2f6fed !important;
  color: #fff !important;
}

body.is-authed .modal-actions button[hidden] {
  display: none !important;
}

body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table th,
body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table td,
body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table .material-name-cell,
body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table .material-stock-cell,
body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table .material-price-cell,
body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table .material-warn-cell,
body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table th:nth-child(6),
body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table td:nth-child(6),
body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-archive-mobile-table th,
body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-archive-mobile-table td {
  text-align: left !important;
}

body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table th,
body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table td {
  justify-content: flex-start !important;
}

body.is-authed .inventory-dashboard .category-stock-groups,
body.is-authed .inventory-dashboard .dashboard-stock-section,
body.is-authed .inventory-dashboard .dashboard-stock-section-body,
body.is-authed .inventory-dashboard .dashboard-stock-table-wrap,
body.is-authed .inventory-dashboard .dashboard-stock-table {
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

body.is-authed .inventory-dashboard .dashboard-stock-section {
  overflow: hidden !important;
}

body.is-authed .inventory-dashboard .dashboard-stock-table-wrap {
  display: block !important;
  overflow: hidden !important;
}

body.is-authed .inventory-dashboard .material-dashboard-groups .mobile-stock-list,
body.is-authed .inventory-dashboard .category-stock-groups .mobile-stock-list {
  display: block !important;
  grid-template-columns: none !important;
  gap: 0 !important;
}

body.is-authed .inventory-dashboard .dashboard-stock-table {
  width: 100% !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
}

body.is-authed .inventory-dashboard .dashboard-stock-table .mobile-stock-row {
  display: table-row !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

body.is-authed .inventory-dashboard .dashboard-stock-table td {
  min-width: 0 !important;
  height: 34px !important;
  padding: 5px 8px !important;
  border-bottom: 1px solid var(--ui-line-soft) !important;
  line-height: 1.15 !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
}

body.is-authed .inventory-dashboard .dashboard-stock-table tr:last-child td {
  border-bottom: 0 !important;
}

body.is-authed .inventory-dashboard .dashboard-stock-table td:first-child {
  width: 58% !important;
  overflow: hidden !important;
  text-align: left !important;
}

body.is-authed .inventory-dashboard .dashboard-stock-table td:last-child {
  width: 42% !important;
  overflow: hidden !important;
  text-align: left !important;
}

body.is-authed .inventory-dashboard .dashboard-stock-table .mobile-stock-name,
body.is-authed .inventory-dashboard .dashboard-stock-table .mobile-stock-row strong,
body.is-authed .inventory-dashboard .dashboard-stock-table .mobile-stock-row b {
  display: inline-block !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
}

body.is-authed .inventory-dashboard .dashboard-stock-table .stock-mark {
  margin-left: 3px !important;
  vertical-align: middle !important;
}

@media (min-width: 761px) {
  body.is-authed .inventory-dashboard .material-dashboard-groups .dashboard-stock-table,
  body.is-authed .inventory-dashboard .material-dashboard-groups .dashboard-stock-table tbody {
    display: block !important;
    width: 100% !important;
  }

  body.is-authed .inventory-dashboard .material-dashboard-groups .dashboard-stock-table tbody {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    column-gap: 12px !important;
  }

  body.is-authed .inventory-dashboard .material-dashboard-groups .dashboard-stock-table .mobile-stock-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(68px, max-content) !important;
    align-items: center !important;
    min-width: 0 !important;
    border-bottom: 1px solid var(--ui-line-soft) !important;
  }

  body.is-authed .inventory-dashboard .material-dashboard-groups .dashboard-stock-table td {
    display: flex !important;
    align-items: center !important;
    min-width: 0 !important;
    height: 34px !important;
    border-bottom: 0 !important;
  }

  body.is-authed .inventory-dashboard .material-dashboard-groups .dashboard-stock-table td:first-child {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 20px !important;
    gap: 5px !important;
    width: auto !important;
  }

  body.is-authed .inventory-dashboard .material-dashboard-groups .dashboard-stock-table td:last-child {
    width: auto !important;
    justify-content: flex-start !important;
  }

  body.is-authed .inventory-dashboard .material-dashboard-groups .dashboard-stock-table .mobile-stock-name,
  body.is-authed .inventory-dashboard .material-dashboard-groups .dashboard-stock-table .mobile-stock-row strong {
    display: block !important;
    max-width: 100% !important;
  }

  body.is-authed .inventory-dashboard .material-dashboard-groups .dashboard-stock-table .stock-mark {
    grid-column: 2 !important;
    justify-self: center !important;
    width: 18px !important;
    height: 18px !important;
    margin-left: 0 !important;
  }
}

@media (max-width: 640px) {
  body.is-authed .modal-actions {
    align-items: center !important;
    justify-content: space-between !important;
    gap: 5px !important;
  }

  body.is-authed .modal-actions-left {
    flex: 1 1 auto !important;
    justify-content: flex-start !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
  }

  body.is-authed .modal-actions-right {
    flex: 0 0 auto !important;
    justify-content: flex-end !important;
  }

  body.is-authed .modal-actions-left::-webkit-scrollbar {
    display: none !important;
  }

  body.is-authed .modal-actions button {
    min-width: 42px !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 7px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
  }
}

body.is-authed .company-toolbar-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 8px !important;
}

body.is-authed .company-toolbar-actions input[type="file"] {
  display: none !important;
}

body.is-authed .company-toolbar-actions .ghost-btn,
body.is-authed .company-toolbar-actions .file-action-btn,
body.is-authed .company-toolbar-actions .company-toolbar-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 104px !important;
  min-width: 104px !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 12px !important;
  border: 1px solid var(--ui-line) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.9) !important;
  color: #253149 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  box-shadow: none !important;
}

body.is-authed .company-toolbar-actions .ghost-btn:hover,
body.is-authed .company-toolbar-actions .file-action-btn:hover,
body.is-authed .company-toolbar-actions .company-toolbar-btn:hover {
  border-color: rgba(190, 208, 232, 0.98) !important;
  background: #ffffff !important;
  color: #253149 !important;
  transform: none !important;
}

@media (max-width: 640px) {
  body.is-authed .company-toolbar-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
  }

  body.is-authed .company-toolbar-actions .ghost-btn,
  body.is-authed .company-toolbar-actions .file-action-btn,
  body.is-authed .company-toolbar-actions .company-toolbar-btn {
    width: 100% !important;
    min-width: 0 !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 8px !important;
    font-size: 13px !important;
  }
}

/* Final material archive spacing fix: keep the last visible row clear of the next group card. */
body.is-authed .material-inventory-groups.material-warehouse-groups:not(.product-inventory-groups) {
  row-gap: 18px !important;
}

body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-warehouse-block {
  overflow: visible !important;
}

body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-archive-section-body {
  overflow: visible !important;
  padding-bottom: 6px !important;
}

body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table,
body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-archive-mobile-list {
  overflow: visible !important;
  margin-bottom: 2px !important;
}

body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table tbody tr:last-child td,
body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-archive-mobile-row:last-child td {
  padding-bottom: 10px !important;
}

/* Final material archive containment: long groups scroll inside the card instead of overlapping the next group. */
body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-warehouse-block {
  overflow: hidden !important;
}

body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-archive-section-body {
  min-height: 0 !important;
  overflow: hidden !important;
  padding-bottom: 0 !important;
}

body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-archive-mobile-list {
  max-height: clamp(260px, 52vh, 470px) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  margin-bottom: 0 !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch !important;
}

body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table {
  max-height: clamp(280px, 56vh, 520px) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  margin-bottom: 0 !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch !important;
}

body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-archive-mobile-table {
  margin-bottom: 0 !important;
}

body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-archive-mobile-table tbody::after {
  content: "" !important;
  display: table-row !important;
  height: 8px !important;
}

/* Final material archive desktop/tablet override: expand full tables and let the page scroll. */
@media (min-width: 761px) {
  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-warehouse-block,
  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-archive-section-body,
  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table {
    max-height: none !important;
    overflow: visible !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table {
    display: block !important;
  }
}

/* Final material archive header alignment: title, filter and edit action stay on one row. */
@media (min-width: 761px) {
  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-warehouse-block > header {
    display: grid !important;
    grid-template-columns: minmax(160px, 1fr) clamp(220px, 34vw, 420px) auto !important;
    gap: 10px !important;
    align-items: center !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-group-title {
    grid-column: 1 !important;
    min-width: 0 !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .category-filter {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: 100% !important;
    max-width: 420px !important;
    padding-left: 0 !important;
    justify-self: stretch !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .category-filter input {
    width: 100% !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 12px !important;
    border-radius: 8px !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-batch-actions {
    grid-column: 3 !important;
    grid-row: 1 !important;
    align-items: center !important;
    justify-content: flex-end !important;
  }

body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-batch-actions .compact-action {
    height: 38px !important;
    min-height: 38px !important;
    border-radius: 8px !important;
  }
}

body.is-authed .meter-log-status {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin: 0 0 12px !important;
}

body.is-authed .meter-log-status .meter-sync-message {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  margin: 0 !important;
}

body.is-authed .meter-log-status button {
  flex: 0 0 auto !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 12px !important;
  border-radius: 8px !important;
  white-space: nowrap !important;
}

/* Authoritative material archive layout reset: prevent category cards from overlapping. */
body.is-authed .material-inventory-groups.material-warehouse-groups:not(.product-inventory-groups) {
  display: grid !important;
  gap: 18px !important;
  align-items: stretch !important;
  overflow: visible !important;
}

body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-warehouse-block {
  position: relative !important;
  width: 100% !important;
  min-width: 0 !important;
}

@media (min-width: 761px) {
  body.is-authed .material-inventory-groups.material-warehouse-groups:not(.product-inventory-groups) {
    grid-template-columns: 1fr !important;
    row-gap: 18px !important;
    padding-bottom: 18px !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-warehouse-block {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    contain: none !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-warehouse-block > header {
    display: grid !important;
    grid-template-columns: minmax(160px, 1fr) minmax(180px, 360px) auto !important;
    align-items: center !important;
    gap: 10px !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-group-title {
    grid-column: 1 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .category-filter {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: 100% !important;
    max-width: 360px !important;
    padding-left: 0 !important;
    justify-self: stretch !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .category-filter input,
  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-batch-actions .compact-action {
    height: 38px !important;
    min-height: 38px !important;
    border-radius: 8px !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-batch-actions {
    grid-column: 3 !important;
    grid-row: 1 !important;
    align-items: center !important;
    justify-content: flex-end !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-archive-section-body,
  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    padding-bottom: 0 !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table table {
    display: table !important;
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table thead {
    display: table-header-group !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table tbody {
    display: table-row-group !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table tr {
    display: table-row !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table th,
  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table td {
    display: table-cell !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-archive-mobile-list {
    display: none !important;
  }
}

@media (max-width: 760px) {
  body.is-authed .material-inventory-groups.material-warehouse-groups:not(.product-inventory-groups) {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    padding-bottom: 16px !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-warehouse-block {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-archive-section-body {
    display: block !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) [data-material-archive-section][data-collapsed="true"] .material-archive-section-body {
    display: none !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-archive-mobile-list {
    display: block !important;
    max-height: min(52vh, 430px) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-inventory-table {
    display: none !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-warehouse-block.is-batch-editing .material-inventory-table {
    display: block !important;
    max-height: min(56vh, 480px) !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
  }

  body.is-authed .material-inventory-groups:not(.product-inventory-groups) .material-warehouse-block.is-batch-editing .material-archive-mobile-list {
    display: none !important;
  }
}
