/* ══════════════════════════════════════════════════════════════════════
   长弧慧引 · 客户工作台  —  shadcn Light & Citearc Blue-Purple Edition
   Inspired by shadcn/ui, Genova AI, Confidency OS & WebPulse
   Palette: Alabaster Canvas (#F6F8FC), Pure White Cards (#FFFFFF),
            Citearc Blue-Purple Accent (#4F46E5 -> #6366F1 -> #7C3AED)
   ══════════════════════════════════════════════════════════════════════ */

:root {
  color-scheme: light;
  --bg: #F6F8FC;
  --rail: #FFFFFF;
  --panel: #FFFFFF;
  --surface: #F1F5F9;
  --surface-subtle: #F8FAFC;
  --line: #E2E8F0;
  --line-strong: #CBD5E1;
  --text: #0F172A;
  --text-secondary: #334155;
  --muted: #64748B;
  --violet: #4F46E5;
  --indigo: #4F46E5;
  --cyan: #0284C7;
  --mint: #059669;
  --amber: #D97706;
  --rose: #E11D48;
  --slate: #475569;
  --radius: 16px;
  --control-radius: 9px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;
  --ease: 150ms cubic-bezier(0.16, 1, 0.3, 1);
  --topbar: 58px;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.04), 0 4px 16px rgba(15, 23, 42, 0.025);
  --shadow-hover: 0 8px 24px -4px rgba(15, 23, 42, 0.07), 0 2px 6px -1px rgba(79, 70, 229, 0.05);
  --brand-ambient:
    radial-gradient(ellipse at 85% 0%, rgba(99, 102, 241, 0.08), transparent 45%),
    radial-gradient(ellipse at 10% 100%, rgba(56, 189, 248, 0.06), transparent 50%),
    linear-gradient(180deg, #F8FAFF 0%, #F4F6FB 100%);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  color: var(--text);
  background: var(--brand-ambient) fixed;
  font: 14px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  isolation: isolate;
}
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
h2 { font-size: 15.5px; font-weight: 660; line-height: 1.4; color: #0F172A; }
h3 { font-size: 14.5px; font-weight: 640; color: #0F172A; }
button, select, input, textarea { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: 0.55; }
a { color: #4F46E5; text-decoration: none; }
a:hover { color: #4338CA; }
:focus-visible { outline: 2px solid #6366F1; outline-offset: 2px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.icon { display: block; width: 18px; height: 18px; flex: none; }
.skip {
  position: fixed; top: -5rem; left: 12px; z-index: 100;
  padding: 10px 14px; background: #FFFFFF; color: #0F172A;
  border: 1px solid #E2E8F0; border-radius: 8px; box-shadow: var(--shadow-card);
}
.skip:focus { top: 12px; }

/* Subtle ambient background pattern */
.canvas-orbits { position: fixed; z-index: -1; inset: 0; overflow: hidden; pointer-events: none; opacity: 0.35; }
.canvas-orbits .hero-orbits { display: none; }

/* ── Top bar (shadcn Crisp Translucent White · 58px) ── */
.topbar {
  position: sticky; top: 0; z-index: 50; height: var(--topbar); display: flex;
  align-items: center; justify-content: space-between; padding-inline: 12px 28px;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid #E2E8F0;
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px;
  background: transparent; border: 1px solid transparent; padding: 0;
  color: #475569; cursor: pointer; transition: all .15s ease;
}
.nav-toggle:hover {
  background: #F1F5F9; border-color: #E2E8F0; color: #0F172A;
}
.nav-toggle .icon { width: 18px; height: 18px; }
.top-brand { display: flex; align-items: center; gap: 12px; min-width: 0; color: inherit; text-decoration: none; }
.topbar img { display: block; width: clamp(104px, 10vw, 130px); height: auto; }
.topbar span { color: #0F172A; font-size: 13.5px; font-weight: 640; white-space: nowrap; }
.top-brand span {
  border-left: 1px solid #CBD5E1; padding-inline-start: 12px;
  color: #334155;
}
.topbar-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.topbar-date {
  display: inline-flex; align-items: center;
  padding: 5px 12px; border-radius: 999px;
  background: #F8FAFC; border: 1px solid #E2E8F0;
  color: #475569; font-size: 12.5px; font-weight: 560;
  letter-spacing: 0.01em; font-variant-numeric: tabular-nums;
}

/* ── Screen layout & Left Docked Sidebar Rail (Genova AI / Confidency OS White Sidebar) ── */
.screen { display: flex; min-height: calc(100vh - var(--topbar)); position: relative; }

.rail {
  width: 248px;
  flex-shrink: 0;
  position: sticky;
  top: var(--topbar);
  height: calc(100dvh - var(--topbar));
  background: #FFFFFF;
  border-right: 1px solid #E2E8F0;
  display: flex;
  flex-direction: column;
  margin: 0;
  transition: margin-left .24s cubic-bezier(0.16, 1, 0.3, 1), transform .24s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 40;
  overflow-y: auto;
  overflow-x: hidden;
}
.rail-menu {
  flex: 1 1 auto;
  padding: 16px 10px 14px;
  display: grid;
  gap: 4px;
  align-content: start;
}
.rail-bottom {
  margin-top: auto;
  padding: 12px 10px;
  border-top: 1px solid #F1F5F9;
  background: #FAFBFD;
}
.rail-account-card {
  display: flex; align-items: center;
  padding: 8px 10px; border-radius: 12px;
  background: #FFFFFF; border: 1px solid #E2E8F0;
  box-shadow: var(--shadow-xs);
  transition: all .15s ease;
}
.rail-account-card:hover {
  background: #EEF2FF; border-color: #C7D2FE;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.08);
}
.account-avatar-box {
  width: 34px; height: 34px; border-radius: 50%;
  background: #FFFFFF; border: 1px solid #E2E8F0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.account-avatar-img {
  width: 24px; height: 24px; object-fit: contain; display: block;
}
.account-name {
  font-size: 14px; font-weight: 650; color: #0F172A;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Nav links (icon center = 10px + 9px + 9px = 28px, exact match with topbar toggle) */
.nav-link {
  display: flex; align-items: center; gap: 11px; min-height: 42px;
  padding: 8px 9px; border: 1px solid transparent; border-radius: 10px;
  color: #475569; font-size: 14.5px; font-weight: 560; text-decoration: none; white-space: nowrap;
  transition: all var(--ease);
}
.nav-link .icon { color: #64748B; width: 18px; height: 18px; transition: color var(--ease); }
.nav-link .nav-external-mark { margin-inline-start: auto; color: var(--muted); font-size: 13px; }
.nav-link:hover { background: #F1F5F9; color: #0F172A; }
.nav-link:hover .icon { color: #4F46E5; }
.nav-link[aria-current="page"] {
  color: #FFFFFF;
  font-weight: 640;
  background: linear-gradient(135deg, #4F46E5 0%, #6366F1 100%);
  border-color: #4338CA;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.24);
}
.nav-link[aria-current="page"] .icon { color: #FFFFFF; }
.nav-link.is-section {
  color: #4F46E5;
  font-weight: 640;
  background: #EEF2FF;
  border-color: #C7D2FE;
}
.nav-link.is-section .icon { color: #4F46E5; }

.nav-collapsed .rail { margin-left: -248px; }
.nav-collapsed .nav-toggle { color: #4F46E5; background: #EEF2FF; border-color: #C7D2FE; }

/* Static group header (e.g. 内容管理 / 项目管理 — collapsible non-page parent) */
.nav-group-label {
  display: flex; align-items: center; gap: 11px; min-height: 38px;
  padding: 6px 9px; margin-top: 6px;
  color: #64748B; font-size: 13.5px; font-weight: 650;
  user-select: none; white-space: nowrap;
}
.nav-group-label .icon { color: #94A3B8; width: 18px; height: 18px; }

/* Report & project sub-navigation */
.report-children {
  display: grid; gap: 2px; margin: 4px 2px 6px 20px;
  padding-left: 10px; border-left: 1.5px solid #E2E8F0;
}
.report-children a {
  display: flex; align-items: center; gap: 7px; min-height: 36px;
  padding: 5px 10px; color: #64748B; font-size: 13.5px; font-weight: 530;
  text-decoration: none; border-radius: 8px; white-space: nowrap;
  transition: all .14s ease;
}
.report-children a:hover { background: #F8FAFC; color: #0F172A; }
.report-children a[aria-current="page"] {
  color: #4F46E5; background: #EEF2FF; font-weight: 660;
}

/* ── Main content area ── */
.main {
  flex: 1 1 0%;
  width: 100%; min-width: 0; max-width: 1580px;
  margin-inline: auto; padding: 24px clamp(20px, 2.5vw, 36px) 40px;
  transition: padding .2s ease;
}

.login-page {
  min-height: 100dvh; display: flex; flex-direction: column;
  background: #F8FAFF; color: #0F172A;
}
.login-topbar {
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid #E2E8F0;
}
.badge-channel {
  font-size: 11.5px; color: #4F46E5;
  background: #EEF2FF; border: 1px solid #C7D2FE;
  padding: 4px 10px; border-radius: 999px; font-weight: 640;
}
.login-layout {
  position: relative; z-index: 10; display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(350px, 430px);
  align-items: center; gap: clamp(32px, 6vw, 72px);
  max-width: 1160px; min-height: calc(100dvh - var(--topbar));
  margin: auto; padding: clamp(24px, 4vw, 48px) clamp(20px, 4vw, 40px);
}
.login-project-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 14px; border-radius: 999px;
  background: #EEF2FF; border: 1px solid #C7D2FE;
  color: #4338CA; font-size: 12.5px; font-weight: 660; margin-bottom: 18px;
}
.login-project-badge svg { width: 15px; height: 15px; color: #4F46E5; }
.login-project h1 {
  font-size: clamp(34px, 4.8vw, 52px); font-weight: 800;
  line-height: 1.15; letter-spacing: -0.03em; color: #0F172A; margin-bottom: 14px;
}
.login-subheading {
  display: block; font-size: clamp(20px, 2.6vw, 27px);
  font-weight: 650; color: #4F46E5; margin-top: 6px;
}
.login-project-desc {
  font-size: 15px; line-height: 1.65; color: #475569;
  max-width: 510px; margin-bottom: 24px;
}
.login-features {
  display: grid; gap: 12px; margin-bottom: 28px; padding: 0; list-style: none;
}
.login-features li {
  display: flex; align-items: center; gap: 10px;
  color: #1E293B; font-size: 14px; font-weight: 530;
}
.login-features li svg {
  width: 18px; height: 18px; color: #4F46E5; flex-shrink: 0;
}
.login-platforms-strip {
  padding-top: 18px; border-top: 1px solid #E2E8F0;
}
.strip-label {
  display: block; font-size: 11.5px; font-weight: 680;
  letter-spacing: .05em; color: #64748B; text-transform: uppercase; margin-bottom: 10px;
}
.strip-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.plat-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 9px;
  background: #FFFFFF; border: 1px solid #E2E8F0;
  box-shadow: var(--shadow-xs);
  font-size: 12.5px; color: #0F172A; font-weight: 600;
}

.login-card {
  padding: clamp(26px, 4vw, 36px);
  border: 1px solid #E2E8F0; border-radius: 20px;
  background: #FFFFFF;
  box-shadow: 0 20px 50px -12px rgba(79, 70, 229, 0.14), 0 4px 16px rgba(15, 23, 42, 0.05);
}
.login-card-head { margin-bottom: 22px; }
.card-pill {
  display: inline-block; padding: 3px 9px; border-radius: 6px;
  background: #EEF2FF; color: #4F46E5; font-size: 11.5px; font-weight: 660; margin-bottom: 8px;
}
.login-card-head h2 { font-size: 22px; font-weight: 750; color: #0F172A; margin-bottom: 4px; }
.card-desc { font-size: 13.5px; color: #64748B; }
.login-card form { display: grid; gap: 16px; }
.form-group { display: grid; gap: 6px; }
.form-group label { color: #334155; font-size: 13px; font-weight: 600; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap svg {
  position: absolute; left: 14px; width: 16px; height: 16px;
  color: #64748B; pointer-events: none;
}
.input-wrap input {
  width: 100%; min-height: 44px; padding: 8px 14px 8px 40px;
  color: #0F172A; background: #F8FAFC;
  border: 1px solid #CBD5E1; border-radius: 10px;
  font-size: 14px; transition: all .18s ease;
}
.input-wrap input:focus {
  outline: none; border-color: #4F46E5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
  background: #FFFFFF;
}
.login-error {
  padding: 8px 12px; border-radius: 8px;
  background: #FFF1F2; border: 1px solid #FECDD3;
  color: #BE123C; font-size: 13px; font-weight: 560;
}
.login-card .login-submit {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 44px; margin-top: 6px; padding: 8px 20px;
  background: linear-gradient(135deg, #4F46E5 0%, #6366F1 100%);
  color: #FFFFFF; font-size: 14.5px; font-weight: 650;
  border: 1px solid #4338CA; border-radius: 10px;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.28);
  cursor: pointer; transition: all .18s ease;
}
.login-card .login-submit:hover {
  background: linear-gradient(135deg, #4338CA 0%, #4F46E5 100%);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.38);
  transform: translateY(-1px);
}
.login-card-foot { margin-top: 20px; text-align: center; font-size: 12px; color: #64748B; }

