:root {
  color-scheme:light;
  --font-sans:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,'PingFang SC','Hiragino Sans GB','Microsoft YaHei',sans-serif;
  --bg:#f8fafc; --surface:#fff; --hover:#f1f5f9; --text:#111827; --secondary:#475569; --muted:#64748b; --border:#e5e7eb;
  --green:#0d9488; --green-bg:#f0fdfa; --red:#dc2626; --focus:#14b8a6; --card-shadow:0 1px 3px #0f172a05;
}
:root[data-theme=dark] {
  color-scheme:dark;
  --bg:#020617; --surface:#0f172a; --hover:#1e293b; --text:#f1f5f9; --secondary:#cbd5e1; --muted:#94a3b8; --border:#334155;
  --green:#2dd4bf; --green-bg:#0d3437; --red:#fb7185; --card-shadow:none;
}
* { box-sizing:border-box; }
body { margin:0; min-height:100svh; display:grid; grid-template-rows:auto 1fr auto; background:var(--bg); color:var(--text); font:14px/1.5 var(--font-sans); -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; }
 a { color:inherit; text-decoration:none; }
button,input { font:inherit; color:inherit; }
button { cursor:pointer; transition:background .15s,border-color .15s; }
svg { width:20px; height:20px; flex-shrink:0; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
[hidden] { display:none!important; }
:focus-visible { outline:2px solid var(--focus); outline-offset:3px; }
.topbar { min-height:65px; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px 28px; background:var(--surface); border-bottom:1px solid var(--border); }
.workspace-brand { display:flex; align-items:center; gap:10px; white-space:nowrap; }
.workspace-brand img { border-radius:10px; flex-shrink:0; }
.workspace-brand b { display:block; font-size:17px; letter-spacing:-.4px; }
.workspace-brand small { display:block; font-size:10px; color:var(--muted); margin-top:1px; }
.topbar-actions { display:flex; align-items:center; gap:18px; }
.theme-button { padding:6px 10px; border:1px solid var(--border); border-radius:9px; background:transparent; font-size:12px; color:var(--secondary); }
.theme-button:hover { background:var(--hover); border-color:var(--muted); }
.access-label { display:flex; align-items:center; gap:7px; padding-left:18px; border-left:1px solid var(--border); color:var(--muted); font-size:12px; }
.access-label svg { width:15px; height:15px; }
.login-layout { display:grid; place-items:center; padding:40px 24px; min-width:0; }
.login-panel { width:100%; max-width:420px; padding:32px; background:var(--surface); border:1px solid var(--border); border-radius:14px; box-shadow:var(--card-shadow); }
.login-heading { text-align:center; margin-bottom:28px; }
.login-icon { display:grid; place-items:center; width:44px; height:44px; margin:0 auto 18px; border-radius:12px; background:var(--green-bg); color:var(--green); }
.login-icon svg { width:23px; height:23px; }
.login-heading h1 { margin:0 0 8px; font-size:24px; line-height:1.4; font-weight:650; letter-spacing:-.6px; }
.login-heading p { margin:0; font-size:13px; color:var(--muted); }
.field+.field { margin-top:20px; }
.field label { display:block; margin-bottom:8px; color:var(--secondary); font-size:12px; font-weight:500; }
.field input { width:100%; min-width:0; height:44px; padding:10px 12px; border:1px solid var(--border); border-radius:9px; background:var(--surface); outline:none; transition:border-color .15s,box-shadow .15s; }
.field input::placeholder { color:var(--muted); opacity:.7; }
.field input:focus { border-color:var(--focus); box-shadow:0 0 0 3px color-mix(in srgb,var(--focus) 14%,transparent); }
.field input[aria-invalid=true] { border-color:var(--red); }
.field input:-webkit-autofill { -webkit-box-shadow:0 0 0 100px var(--surface) inset; -webkit-text-fill-color:var(--text); caret-color:var(--text); }
.password-field { position:relative; }
.password-field input { padding-right:48px; }
.password-field button { position:absolute; right:0; top:0; width:44px; height:44px; display:grid; place-items:center; border:0; border-radius:9px; background:transparent; color:var(--muted); }
.password-field button:hover { background:var(--hover); color:var(--text); }
.password-field svg { width:18px; height:18px; }
.login-message { min-height:20px; margin:10px 0 12px; color:var(--green); font-size:12px; line-height:20px; overflow-wrap:anywhere; }
.login-message.error { color:var(--red); }
.submit-button { display:flex; align-items:center; justify-content:center; gap:10px; width:100%; height:44px; padding:10px 16px; border:1px solid #0d9488; border-radius:9px; background:linear-gradient(120deg,#14b8a6,#0d9488); color:#fff; font-weight:550; }
.submit-button:hover { background:#0f766e; border-color:#0f766e; }
.submit-button:disabled { cursor:wait; opacity:.6; }
.submit-button svg { width:17px; height:17px; }
.submit-button[aria-busy=true] svg { display:none; }
.submit-button[aria-busy=true]::after { content:''; width:14px; height:14px; border:2px solid #ffffff66; border-top-color:#fff; border-radius:50%; animation:spin .8s linear infinite; }
.login-note { display:flex; align-items:center; justify-content:center; gap:6px; margin-top:24px; padding-top:20px; border-top:1px solid var(--border); color:var(--muted); font-size:11px; text-align:center; }
.login-note svg { width:13px; height:13px; }
.page-footer { padding:16px 24px 24px; color:var(--muted); font-size:11px; text-align:center; }
@keyframes spin { to { transform:rotate(360deg); } }
@media(max-width:600px) {
  .topbar { min-height:59px; padding:10px 16px; flex-wrap:wrap; gap:10px; }
  .topbar-actions { margin-left:auto; gap:8px; }
  .workspace-brand b { font-size:16px; }
  .access-label { display:none; }
  .login-layout { padding:28px 16px; }
  .login-panel { padding:28px 24px; }
  .field input { font-size:16px; }
  .page-footer { padding-bottom:20px; }
}
@media(max-width:360px) { .login-panel { padding:24px 20px; } .login-heading p { font-size:12px; } }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none!important; transition:none!important; } }
