/* ZenithAI sign-in page. Loaded after style.css; only touches the login view. Works in light and dark themes. */
.login-view[hidden] { display: none; }
.login-view {
  display: block;
  padding: 0;
  overflow-y: auto;
  background: var(--bg);
}
.zl-shell {
  min-height: 100%;
  display: grid;
  grid-template-columns: minmax(360px, 46%) 1fr;
}

/* Brand panel */
.zl-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: 44px 52px;
  color: #e8ecf8;
  background:
    radial-gradient(900px 500px at 15% 105%, rgba(86, 120, 255, .34), transparent 60%),
    radial-gradient(700px 420px at 100% 0%, rgba(122, 149, 255, .18), transparent 55%),
    linear-gradient(160deg, #0a1020 0%, #0f1a38 55%, #16265a 100%);
  overflow: hidden;
}
.zl-brand::before {   /* fine grid, fades out toward the bottom */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
          mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
  pointer-events: none;
}
.zl-brand > * { position: relative; }
.zl-brand-top { display: flex; align-items: center; gap: 12px; }
.zl-mark { width: 44px; height: 44px; object-fit: contain; }
.zl-wordmark { font-size: 1.55rem; font-weight: 650; letter-spacing: -.01em; color: #fff; }
.zl-wordmark span { font-weight: 300; color: #9db2ff; }
.zl-brand-body { max-width: 30rem; }
.zl-brand-body h2 {
  margin: 0 0 14px;
  font-size: clamp(1.7rem, 2.6vw, 2.35rem);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -.02em;
  color: #fff;
}
.zl-brand-body > p { margin: 0 0 26px; font-size: 1rem; line-height: 1.6; color: #b9c4e6; }
.zl-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.zl-points li {
  position: relative;
  padding-left: 30px;
  font-size: .93rem;
  line-height: 1.5;
  color: #d3dbf3;
}
.zl-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .25em;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(122, 149, 255, .22) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.3 7 10.7l4.6-5' fill='none' stroke='%23b9c8ff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}
.zl-brand-foot { font-size: .82rem; color: #93a1cc; }
.zl-brand-foot a, .zl-footer a { color: inherit; }
.zl-brand-foot a { color: #c6d2ff; text-decoration: none; border-bottom: 1px solid rgba(198, 210, 255, .35); }
.zl-brand-foot a:hover { color: #fff; border-bottom-color: #fff; }

/* Sign-in panel */
.zl-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 40px 28px;
}
.zl-panel .login-card {
  width: 100%;
  max-width: 400px;
  padding: 34px 32px 28px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 18px 48px rgba(15, 23, 42, .12);
}
.zl-head { margin: 0 0 24px; }
.zl-head h1 { margin: 0 0 6px; font-size: 1.5rem; font-weight: 650; letter-spacing: -.015em; color: var(--text); }
.zl-head p { margin: 0; font-size: .92rem; line-height: 1.5; color: var(--text-muted); }
.zl-panel .login-form { gap: 18px; }
.zl-panel .login-field { gap: 7px; font-size: .8rem; font-weight: 600; letter-spacing: .01em; color: var(--text); }
.zl-panel .login-field input {
  height: 46px;
  padding: 0 14px;
  font-size: 1rem;
  font-weight: 400;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color .15s, box-shadow .15s;
}
.zl-panel .login-field input::placeholder { color: var(--text-muted); opacity: .6; }
.zl-panel .login-field input:focus { border-color: #4f6df0; box-shadow: 0 0 0 3px rgba(79, 109, 240, .25); }
.zl-panel #loginTotp { letter-spacing: .32em; font-variant-numeric: tabular-nums; }
.zl-panel .login-remember { font-size: .83rem; font-weight: 400; }
.zl-panel .login-btn {
  height: 46px;
  margin-top: 2px;
  padding: 0 16px;
  font-size: .98rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(180deg, #4f6df0, #3550d8);
  border: 1px solid #2f49c9;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(20, 34, 110, .3), inset 0 1px 0 rgba(255, 255, 255, .18);
  cursor: pointer;
  transition: filter .15s, transform .05s;
}
.zl-panel .login-btn:hover { filter: brightness(1.07); }
.zl-panel .login-btn:active { transform: translateY(1px); }
.zl-panel .login-btn:focus-visible { outline: 3px solid rgba(79, 109, 240, .45); outline-offset: 2px; }
.zl-panel .login-btn:disabled { filter: grayscale(.4) brightness(.9); cursor: progress; }
.zl-panel .login-hint { margin: 2px 0 0; font-size: .78rem; line-height: 1.5; }
.zl-footer { max-width: 400px; text-align: center; font-size: .8rem; line-height: 1.7; color: var(--text-muted); }
.zl-footer a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border-strong, currentColor); }
.zl-footer a:hover { border-bottom-color: currentColor; }
.zl-footer .zl-sep { margin: 0 .45em; opacity: .5; }
.zl-notice { display: block; opacity: .8; }

@media (max-width: 900px) {
  .zl-shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .zl-brand { padding: 26px 24px 28px; gap: 16px; }
  .zl-brand-body h2 { font-size: 1.35rem; margin-bottom: 8px; }
  .zl-brand-body > p, .zl-points, .zl-brand-foot { display: none; }
  .zl-panel { padding: 28px 18px 32px; justify-content: flex-start; }
  .zl-panel .login-card { padding: 26px 22px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .zl-panel .login-field input, .zl-panel .login-btn { transition: none; }
}

/* Official Z mark in the app header: white on the dark theme, black on the light theme. */
.zl-app-logo { width: 34px; height: 34px; object-fit: contain; display: block; }
[data-theme="light"] .zl-app-logo { filter: invert(1); }
