/* ============================================================
   Unilog Intelligence — Sign-in / Landing
   Dark, split-screen sign-in. Built on tokens.css (Avenir, Unilog
   palette) + the dark-surface var set below. Implements the Claude
   Design "Unilog Intelligence Sign-In" handoff.

   The dark-surface vars live here (scoped intent: sign-in only) so
   this stylesheet is self-contained and never darkens the rest of
   the app. All rules are scoped under `.li` for the same reason.
   ============================================================ */
:root {
  /* ---------- Dark surface set (sign-in screen only) ---------- */
  --rd-d-bg-top:    #0A1B2E;   /* gradient top */
  --rd-d-bg-bot:    #050B17;   /* gradient bottom */
  --rd-d-surface:   rgba(255, 255, 255, 0.04);
  --rd-d-surface-2: rgba(255, 255, 255, 0.06);
  --rd-d-line:      rgba(255, 255, 255, 0.10);
  --rd-d-line-soft: rgba(255, 255, 255, 0.06);
  --rd-d-ink:       #FFFFFF;
  --rd-d-ink-2:     rgba(255, 255, 255, 0.72);
  --rd-d-ink-3:     rgba(255, 255, 255, 0.46);
}

.li, .li *, .li *::before, .li *::after { box-sizing: border-box; }

.li {
  position: relative; isolation: isolate;
  min-height: 100vh; display: flex; flex-direction: column;
  font-family: var(--font-sans);
  color: var(--rd-d-ink);
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1100px 720px at 84% 8%, rgba(50,137,231,0.34), transparent 60%),
    radial-gradient(900px 600px at 12% 100%, rgba(50,137,231,0.10), transparent 55%),
    linear-gradient(180deg, var(--rd-d-bg-top) 0%, var(--rd-d-bg-bot) 100%);
}
/* faint connective mesh behind everything */
.li::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.5;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.05) 1px, transparent 0);
  background-size: 38px 38px;
  -webkit-mask-image: radial-gradient(1000px 700px at 80% 12%, #000, transparent 70%);
          mask-image: radial-gradient(1000px 700px at 80% 12%, #000, transparent 70%);
}

/* ---------- Nav ---------- */
.li-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px clamp(28px, 5vw, 64px);
}
.li-brand { display: flex; align-items: center; gap: 14px; }
.li-brand img { height: 22px; filter: brightness(0) invert(1); }
.li-brand .sep { width: 1px; height: 22px; background: rgba(255,255,255,0.22); }
.li-brand .prod { font-weight: var(--fw-demi); font-size: 16px; letter-spacing: -0.01em; }
.li-managed { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--rd-d-ink-3); }
.li-managed svg { width: 15px; height: 15px; }

/* ---------- Main grid ---------- */
.li-main {
  flex: 1; display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px); align-items: center;
  padding: 8px clamp(28px, 5vw, 64px) 24px;
  max-width: 1500px; width: 100%; margin: 0 auto;
}

/* ===== Left: positioning + sign-in ===== */
.li-left { max-width: 560px; }
.li-eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 11px; font-weight: var(--fw-demi); letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--yellow); margin-bottom: 24px;
}
.li-eyebrow .spark { color: var(--yellow); }
.li-h1 {
  font-size: clamp(40px, 5vw, 60px); line-height: 1.0; letter-spacing: -0.03em;
  margin: 0 0 22px; font-weight: var(--fw-demi); color: #fff;
}
.li-h1 .hl { color: var(--yellow); }
.li-lede {
  font-size: clamp(15px, 1.2vw, 17px); line-height: 1.55; color: var(--rd-d-ink-2);
  max-width: 48ch; margin: 0 0 32px;
}
.li-lede b { color: #fff; font-weight: var(--fw-demi); }

.li-signin {
  display: inline-flex; align-items: center; gap: 13px;
  background: #fff; color: #1a1a1a; font-weight: var(--fw-demi); font-size: 15px;
  padding: 15px 28px; border-radius: 10px; border: none; cursor: pointer;
  box-shadow: 0 16px 40px rgba(0,0,0,0.36);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
  font-family: inherit;
}
.li-signin:hover { transform: translateY(-2px); box-shadow: 0 22px 50px rgba(0,0,0,0.45); }
.li-signin:disabled { cursor: default; opacity: 0.85; transform: none; box-shadow: 0 16px 40px rgba(0,0,0,0.36); }
.li-ms { display: grid; grid-template-columns: 9px 9px; grid-template-rows: 9px 9px; gap: 2px; }
.li-ms i { display: block; width: 9px; height: 9px; }
/* loading spinner shown in the (white) button while authenticating */
.li-spin {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.22); border-top-color: #1a1a1a;
  animation: li-spin 0.7s linear infinite;
}
@keyframes li-spin { to { transform: rotate(360deg); } }

.li-trust { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--rd-d-ink-3); margin-top: 18px; }
.li-trust svg { width: 13px; height: 13px; }
.li-trust b { color: var(--rd-d-ink-2); font-weight: var(--fw-demi); }
.li-trust .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--rd-d-ink-3); }

.li-gemini { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--rd-d-ink-3); margin-top: 14px; letter-spacing: .01em; }
.li-gemini .spark { color: var(--yellow); font-size: 11px; }

/* connected systems strip */
.li-connected { margin-top: 40px; }
.li-connected .lbl {
  font-size: 10px; font-weight: var(--fw-demi); letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--rd-d-ink-3); margin-bottom: 14px;
}
.li-logos { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.li-logo {
  width: 42px; height: 42px; border-radius: 11px; overflow: hidden;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}
.li-logo svg, .li-fact .src svg, .li-cite .d svg { display: block; width: 100%; height: 100%; }
.li-logos .more { font-size: 12.5px; color: var(--rd-d-ink-3); margin-left: 4px; }

/* ===== Right: live intelligence preview ===== */
.li-right { display: flex; justify-content: center; }
.li-chat {
  width: 100%; max-width: 540px;
  background: rgba(11, 24, 42, 0.92);
  border: 1px solid var(--rd-d-line);
  border-radius: 20px;
  box-shadow: 0 40px 90px rgba(0,0,0,0.5);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  overflow: hidden;
}
@media (prefers-reduced-motion: no-preference) {
  .li-chat { animation: li-rise 0.7s var(--ease-out) both; }
}
@keyframes li-rise { from { transform: translateY(14px); } to { transform: none; } }

.li-chat-top {
  display: flex; align-items: center; gap: 11px;
  padding: 16px 20px; border-bottom: 1px solid var(--rd-d-line-soft);
}
.li-chat-mark {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--blue), #1c5db5); color: #fff; flex-shrink: 0;
}
.li-chat-top .nm { font-size: 14px; font-weight: var(--fw-demi); }
.li-chat-top .st { font-size: 11px; color: var(--rd-d-ink-3); display: flex; align-items: center; gap: 6px; margin-top: 1px; }
.li-chat-top .st .live { width: 6px; height: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(24,178,107,0.2); }
.li-chat-top .role-tag {
  margin-left: auto; font-size: 10px; font-weight: var(--fw-demi); letter-spacing: 0.06em;
  color: var(--rd-d-ink-2); background: rgba(255,255,255,0.06); border: 1px solid var(--rd-d-line);
  padding: 4px 9px; border-radius: var(--radius-pill);
}

.li-thread { padding: 20px; display: grid; gap: 16px; transition: opacity 0.28s var(--ease-out); }
.li-bubble-user {
  justify-self: end; max-width: 80%;
  background: var(--blue); color: #fff; font-size: 13.5px; line-height: 1.5;
  padding: 11px 15px; border-radius: 14px 14px 4px 14px;
}
.li-answer { display: grid; gap: 12px; }
.li-answer .row { display: flex; gap: 11px; }
.li-answer .ic {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--blue), #1c5db5); color: #fff;
  display: grid; place-items: center;
}
.li-answer .body { font-size: 13.5px; line-height: 1.6; color: var(--rd-d-ink); }
.li-answer .body.muted { color: var(--rd-d-ink-2); }
.li-cite {
  display: inline-flex; align-items: center; gap: 6px; vertical-align: middle;
  font-size: 11px; font-weight: var(--fw-demi);
  padding: 2px 8px 2px 5px; border-radius: var(--radius-pill); margin: 0 1px;
  background: rgba(255,255,255,0.07); border: 1px solid var(--rd-d-line);
  color: #fff; white-space: nowrap;
}
.li-cite .d { width: 15px; height: 15px; border-radius: 4px; overflow: hidden; flex-shrink: 0; }

/* answer summary chips (sourced facts) */
.li-facts { display: grid; gap: 8px; margin-left: 39px; }
.li-fact {
  display: flex; align-items: center; gap: 11px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--rd-d-line);
  border-radius: 10px; padding: 11px 13px;
}
.li-fact .src { width: 28px; height: 28px; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.li-fact .txt { min-width: 0; }
.li-fact .k { font-size: 10px; color: var(--rd-d-ink-3); text-transform: uppercase; letter-spacing: 0.06em; }
.li-fact .v { font-size: 13px; font-weight: var(--fw-medium); color: #fff; margin-top: 1px; }
.li-fact .badge { margin-left: auto; font-size: 10px; font-weight: var(--fw-demi); padding: 3px 8px; border-radius: var(--radius-pill); flex-shrink: 0; }
.li-fact .badge.warn { background: rgba(216,0,39,0.16); color: #ff8a9c; }
.li-fact .badge.ok { background: rgba(24,178,107,0.16); color: #5fd99e; }
.li-fact .badge.due { background: rgba(251,199,86,0.15); color: var(--yellow); }

/* composer */
.li-composer {
  margin: 4px 20px 20px; display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.06); border: 1px solid var(--rd-d-line);
  border-radius: 13px; padding: 13px 14px;
}
.li-composer .ph { flex: 1; font-size: 13.5px; color: var(--rd-d-ink-3); }
.li-composer .send { width: 32px; height: 32px; border-radius: 9px; background: var(--blue); color: #fff; display: grid; place-items: center; flex-shrink: 0; }

/* role rotation dots */
.li-dots { display: flex; gap: 7px; justify-content: center; padding: 0 0 18px; }
.li-dots .dot {
  width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.22);
  cursor: pointer; transition: all 0.25s var(--ease-out); border: none; padding: 0;
}
.li-dots .dot:hover { background: rgba(255,255,255,0.4); }
.li-dots .dot.on { background: var(--yellow); width: 20px; border-radius: 4px; }
.li-chat-top .role-tag .rdot { width: 6px; height: 6px; border-radius: 50%; background: var(--yellow); display: inline-block; margin-right: 6px; vertical-align: middle; }
.li-typing { display: inline-flex; gap: 3px; align-items: center; }
.li-typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--rd-d-ink-3); animation: li-blink 1.2s infinite; }
.li-typing i:nth-child(2) { animation-delay: 0.2s; }
.li-typing i:nth-child(3) { animation-delay: 0.4s; }
@keyframes li-blink { 0%, 60%, 100% { opacity: 0.3; } 30% { opacity: 1; } }

/* ---------- Footer ---------- */
.li-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(28px, 5vw, 64px);
  border-top: 1px solid var(--rd-d-line-soft);
  font-size: 12px; color: var(--rd-d-ink-3);
}
.li-foot b { color: var(--rd-d-ink-2); font-weight: var(--fw-demi); }

@media (prefers-reduced-motion: reduce) {
  .li-chat { animation: none; }
  .li-typing i { animation: none; opacity: 0.6; }
  .li-spin { animation: none; }
}

@media (max-width: 1080px) {
  .li-main { grid-template-columns: 1fr; gap: 40px; padding-top: 24px; padding-bottom: 40px; }
  .li-left { max-width: 640px; }
  .li-right { justify-content: flex-start; }
  .li-chat { max-width: 560px; }
}
@media (max-width: 560px) {
  .li-foot { flex-direction: column; gap: 6px; align-items: flex-start; }
  .li-bubble-user { max-width: 92%; }
}
