/* Shared new-api auth, public navigation, console header and sidebar. */
/* ponytail: rc.41 shared-container selectors; rerun verify_branding.js after new-api upgrades. */
:root{--badcat-wordmark:url('/branding/wordmark-light.svg?v=20261005-1')}
.dark{--badcat-wordmark:url('/branding/wordmark-dark.svg?v=20261005-1')}
a[href="/"]>h1.text-xl,
a[href="/"]>span[title="badcat"],
a[href="/"][aria-label]>span.max-w-\[12rem\],
[data-sidebar="menu-button"]:has(img[alt="徽标"],img[alt="Logo"],img[alt="logo"])>.grid>span.font-semibold{
  display:block;flex:none;width:100px;height:44px;max-width:none;
  font-size:0;line-height:0;color:transparent;
  background:var(--badcat-wordmark) center/contain no-repeat;
}
a[href="/"]>h1.text-xl{width:140px;height:64px}
a[href="/"][aria-label]>span.max-w-\[12rem\]{width:80px;height:35px}
[data-sidebar="menu-button"]:has(img[alt="徽标"],img[alt="Logo"],img[alt="logo"])>.grid>span.font-semibold{width:94px;height:38px}
img:is([alt="徽标"],[alt="Logo"],[alt="logo"]){object-fit:contain!important;border-radius:0!important}

/* The same flat palette as the standalone landing page; theme choice is retained. */
html:root{
  --background:#f0eee9!important;--foreground:#171719!important;
  --card:#faf8f4!important;--card-foreground:#171719!important;
  --popover:#faf8f4!important;--popover-foreground:#171719!important;
  --primary:#d62932!important;--primary-foreground:#fff!important;--ring:#f03940!important;
  --secondary:#e6e3de!important;--secondary-foreground:#27272a!important;
  --muted:#e7e4df!important;--muted-foreground:#65656c!important;
  --accent:#e4dfda!important;--accent-foreground:#171719!important;
  --border:#d0ccc5!important;--input:#c2beb7!important;--radius:.25rem!important;
  --sidebar:#e9e6e0!important;--sidebar-foreground:#27272a!important;
  --sidebar-primary:#d62932!important;--sidebar-primary-foreground:#fff!important;
  --sidebar-accent:#dfdad3!important;--sidebar-accent-foreground:#27272a!important;
  --sidebar-border:#d0ccc5!important;--sidebar-ring:#f03940!important;
  --font-sans:-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif!important;
}
html:root.dark,body.badcat-auth{
  --background:#0b0b0c!important;--foreground:#f0eee9!important;
  --card:#151516!important;--card-foreground:#f0eee9!important;
  --popover:#19191b!important;--popover-foreground:#f0eee9!important;
  --secondary:#232326!important;--secondary-foreground:#eeeae4!important;
  --muted:#202023!important;--muted-foreground:#aaaab1!important;
  --accent:#282124!important;--accent-foreground:#f0eee9!important;
  --border:#353538!important;--input:#4a4a4e!important;
  --sidebar:#101012!important;--sidebar-foreground:#d7d4ce!important;
  --sidebar-accent:#302025!important;--sidebar-accent-foreground:#f0eee9!important;
  --sidebar-border:#303033!important;--badcat-wordmark:url('/branding/wordmark-dark.svg?v=20261005-1');
}
body{font-family:var(--font-sans)!important;-webkit-font-smoothing:antialiased}
::selection{background:#d62932;color:#fff}
[data-slot="button"],input[data-slot="form-control"],[data-slot="input"],[data-slot="textarea"],textarea{border-radius:3px!important}
[data-slot="card"],[data-slot="dialog-content"],[data-slot="sheet-content"],[data-slot="dropdown-menu-content"],[data-slot="popover-content"]{border-radius:4px!important;box-shadow:none!important}
[data-slot="card"]{border:1px solid var(--border);transition:border-color .2s,background .2s}
[data-slot="card"]:focus-within{border-color:var(--ring)}
[data-slot="button"]{transition:background .18s,border-color .18s,color .18s,translate .18s!important}
[data-slot="button"]:focus-visible,a:focus-visible{outline:2px solid var(--ring);outline-offset:3px}
[data-slot="form-control"]:focus-visible{border-color:var(--ring)!important;box-shadow:0 0 0 2px #f0394030!important}
[role="tab"][aria-selected="true"]{border-bottom:2px solid var(--primary);border-radius:2px!important}
[data-sidebar="menu-button"][data-active="true"]{border-inline-start:2px solid var(--primary);border-radius:3px!important}
[data-sonner-toast]{border-radius:4px!important;border-inline-start:3px solid var(--primary)!important;background:var(--popover)!important;color:var(--foreground)!important}

/* Shared authentication shell. React continues to own every form and auth action. */
body.badcat-auth{background:#0b0b0c;color:#f0eee9;color-scheme:dark}
#root .badcat-auth-shell{
  height:auto;min-height:100svh;max-width:1240px;margin-inline:auto;
  grid-template-columns:1.05fr 1fr;gap:clamp(32px,5vw,80px);
  align-items:center;padding:128px 48px 88px;isolation:isolate;
}
#root .badcat-auth-shell::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:repeating-linear-gradient(135deg,transparent 0 130px,#ffffff03 131px 132px,transparent 133px 260px)}
#root .badcat-auth-shell>a[href="/"]{top:30px;left:48px;gap:12px}
#root .badcat-auth-shell>a[href="/"]>div{width:35px;height:40px}
#root .badcat-auth-shell>a[href="/"] img{width:35px;height:40px}
#root .badcat-auth-shell>.container{grid-column:2;grid-row:1;max-width:none;padding:0;margin:0;width:100%;align-items:center}
#root .badcat-auth-card{position:relative;width:100%;max-width:448px;margin:0;padding:36px;background:#151516;border:1px solid #353538;border-top:3px solid #d62932;border-radius:4px}
#root .badcat-auth-card::before{content:"私密接入 / 你的空间";display:block;color:#f03940;font-size:11px;letter-spacing:2px;margin-bottom:24px;font-weight:600}
#root .badcat-auth-card h2{text-align:left;font-size:27px;line-height:1.4;font-weight:800;letter-spacing:-.5px}
#root .badcat-auth-card p{line-height:1.8}
#root .badcat-auth-card form{gap:22px}
#root .badcat-auth-card input{height:48px;background:#101011;border-color:#4a4a4e;padding:10px 13px;font-size:16px;color:#f0eee9}
#root .badcat-auth-card input[name="password"],#root .badcat-auth-card input[name="confirmPassword"]{padding-inline-end:48px}
#root .badcat-auth-card [data-slot="form-label"]{font-size:13px;margin-bottom:2px}
#root .badcat-auth-card [data-slot="form-message"]{font-size:12px;line-height:1.6;color:#ff858c}
#root .badcat-auth-card input[aria-invalid="true"]{border-color:#f03940;background:#261416}
#root .badcat-auth-card button[type="submit"]{min-height:50px;font-size:15px;font-weight:700;background:#d62932;color:#fff;position:relative;overflow:hidden;margin-top:4px}
#root .badcat-auth-card button[type="submit"]::after{content:"";position:absolute;inset:0;background:#ffffff12;clip-path:polygon(0 0,35% 0,15% 100%,0 100%);transform:translateX(-100%);pointer-events:none;transition:transform .35s}
#root .badcat-auth-card button[type="submit"]:hover:not(:disabled)::after{transform:translateX(300%)}
#root .badcat-auth-card button[aria-label="显示密码"],#root .badcat-auth-card button[aria-label="隐藏密码"]{height:44px;width:44px;inset-inline-end:2px;background:none;color:#aaaab1;translate:0 -50%!important;z-index:1}
#root .badcat-auth-card a{color:#ddd8d3;text-decoration-color:#875357;text-underline-offset:4px;transition:color .18s}
#root .badcat-auth-card a:hover{color:#ff9299}
#root .badcat-auth-card .badcat-auth-note{border-top:1px solid #353538;padding-top:18px;margin:24px 0 0;color:#aaaab1;font-size:11px;line-height:1.9}
#root .badcat-auth-card .badcat-auth-switch{font-size:12px;color:#aaaab1;margin:20px 0 0}
#root .badcat-auth-card .badcat-auth-switch a{color:#ff9299;text-decoration:underline}
.badcat-error-brand{position:absolute;top:24px;left:32px;display:flex;gap:9px;align-items:center}
.badcat-error-brand[hidden]{display:none}
.badcat-error-brand>span{width:112px;height:50px;display:block;font-size:0;background:var(--badcat-wordmark) center/contain no-repeat}
body.badcat-error-page h1{color:var(--primary);letter-spacing:-6px}
.badcat-auth-story{grid-column:1;grid-row:1;min-width:0;position:relative}
.badcat-auth-kicker{color:#f03940;font-size:11px;font-weight:700;letter-spacing:2px;margin:0 0 20px;display:flex;align-items:center;gap:10px}
.badcat-auth-kicker::before{content:"";width:7px;height:7px;background:#f03940;transform:rotate(45deg)}
.badcat-auth-story h2{font-size:clamp(30px,3vw,43px);font-weight:900;line-height:1.4;letter-spacing:-1.5px;margin:0}
.badcat-auth-story h2 strong{color:#f03940;font-weight:900;display:inline-block;position:relative}
.badcat-auth-story h2 strong::after{content:"";height:3px;left:0;right:-8px;bottom:-3px;position:absolute;background:#f03940;clip-path:polygon(0 30%,85% 0,100% 60%,65% 100%,0 75%);transform-origin:left}
.badcat-auth-story>p:not(.badcat-auth-kicker){font-size:13px;line-height:1.9;color:#aaaab1;margin:20px 0 0;max-width:360px}
.badcat-auth-art{position:relative;margin:20px auto 5px;width:min(280px,74%)}
.badcat-auth-art img{display:block;width:100%;height:auto;aspect-ratio:1170/1344;object-fit:contain}
.badcat-auth-art::after{content:"嘘，想法是你的。";position:absolute;right:-50px;top:42%;border:1px solid #48484b;background:#151516;color:#ddd8d3;padding:8px 12px;font-size:11px;transform:rotate(7deg)}
.badcat-auth-policies{display:flex;gap:18px;padding:14px 0 0;border-top:1px solid #303033;margin:10px 0 0;list-style:none;font-size:11px;color:#b6b4b9;flex-wrap:wrap}
.badcat-auth-policies li::before{content:"◆";font-size:8px;color:#f03940;margin-right:7px}
.badcat-motion-toggle{position:fixed;z-index:70;bottom:18px;right:24px;min-height:38px;padding:8px 13px;border:1px solid var(--border);border-radius:3px;background:var(--background);color:var(--muted-foreground);font:11px var(--font-sans);cursor:pointer}
.badcat-motion-toggle:hover{color:var(--foreground);border-color:var(--ring)}
.badcat-motion-toggle:disabled{cursor:default}
html:not(.badcat-motion-paused) .badcat-auth-card{animation:badcat-enter .6s ease both}
html:not(.badcat-motion-paused) .badcat-auth-story>*{animation:badcat-enter .7s ease both}
html:not(.badcat-motion-paused) .badcat-auth-story h2{animation-delay:.08s}
html:not(.badcat-motion-paused) .badcat-auth-story>p:not(.badcat-auth-kicker){animation-delay:.16s}
html:not(.badcat-motion-paused) .badcat-auth-art img{animation:badcat-breathe 8s ease-in-out infinite}
html:not(.badcat-motion-paused) .badcat-auth-story h2 strong::after{animation:badcat-swipe .7s .4s both}
@keyframes badcat-enter{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
@keyframes badcat-breathe{0%,100%{transform:translateY(0) rotate(-2deg)}50%{transform:translateY(-7px) rotate(0)}}
@keyframes badcat-swipe{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@media(hover:hover) and (pointer:fine){
  html:not(.badcat-motion-paused) [data-slot="button"]:not(.absolute):hover:not(:disabled){translate:0 -1px}
  html:not(.badcat-motion-paused) [data-slot="button"]:not(.absolute):active:not(:disabled){translate:0 1px}
  [data-slot="card"]:hover{border-color:color-mix(in srgb,var(--primary) 45%,var(--border))}
}
@media(max-width:900px){
  #root .badcat-auth-shell{grid-template-columns:1fr;max-width:560px;padding:122px 28px 88px;gap:0}
  #root .badcat-auth-shell>.container{grid-column:1}
  #root .badcat-auth-card{max-width:none;padding:30px}
  #root .badcat-auth-shell>a[href="/"]{left:28px;top:22px}
  .badcat-auth-story{display:none}
}
@media(max-width:480px){
  #root .badcat-auth-shell{padding:110px 18px 86px;align-items:start}
  #root .badcat-auth-shell>a[href="/"]{left:20px;top:20px}
  #root .badcat-auth-card{padding:26px 22px}
  #root .badcat-auth-card h2{font-size:25px}
  .badcat-motion-toggle{right:18px;bottom:14px;min-height:44px}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
html.badcat-motion-paused *,html.badcat-motion-paused *::before,html.badcat-motion-paused *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
