:root{
  --paper:#f3ede4;
  --paper-deep:#ebe1d4;
  --surface:rgba(250,247,241,.72);
  --text:#35322f;
  --muted:#8b837b;
  --line:rgba(92,75,61,.10);
  --shadow:0 24px 70px rgba(100,78,57,.10);
  --shadow-soft:0 12px 34px rgba(96,76,58,.07);
  --sidebar:146px;
  --radius-frame:28px;
  --radius-card:20px;
  --radius-control:13px;
  --radius-small:9px;
  --peach:#efd2c6;
  --sage:#ceddcf;
  --blue:#ccdce7;
  --lavender:#d9d2e7;
  --sand:#ead9b9;
  --rose:#e5cbd1;
  --danger:#b74b4b;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  overflow:hidden;
  color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","SF Pro Text","PingFang SC","Microsoft YaHei",Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  background:
    radial-gradient(circle at 8% 9%,rgba(239,210,198,.72) 0,rgba(239,210,198,0) 29%),
    radial-gradient(circle at 92% 7%,rgba(206,221,207,.72) 0,rgba(206,221,207,0) 30%),
    radial-gradient(circle at 86% 92%,rgba(204,220,231,.58) 0,rgba(204,220,231,0) 31%),
    radial-gradient(circle at 20% 94%,rgba(217,210,231,.56) 0,rgba(217,210,231,0) 28%),
    linear-gradient(145deg,var(--paper) 0%,#f6f0e7 48%,var(--paper-deep) 100%);
}
body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background:linear-gradient(rgba(255,255,255,.16),rgba(255,255,255,0));
}
button,input{font:inherit}
button{cursor:pointer}
button:focus-visible,input:focus-visible{outline:2px solid rgba(92,75,61,.24);outline-offset:3px}
.hidden{display:none!important}

/* 登录页 */
#loginView{min-height:100%;display:grid;place-items:center;padding:24px}
.login-card{
  width:min(402px,100%);
  min-height:476px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:48px 42px 42px;
  text-align:center;
  border:1px solid rgba(255,255,255,.66);
  border-radius:34px;
  background:rgba(250,247,241,.60);
  box-shadow:var(--shadow),inset 0 1px 0 rgba(255,255,255,.86);
  backdrop-filter:blur(30px) saturate(1.12);
  -webkit-backdrop-filter:blur(30px) saturate(1.12);
  animation:loginIn .62s cubic-bezier(.2,.78,.22,1) both;
}
@keyframes loginIn{from{opacity:0;transform:translateY(16px) scale(.985)}to{opacity:1;transform:none}}
.login-logo-frame{display:grid;place-items:center;margin:0 0 34px}
.login-logo{
  width:220px;
  max-width:82%;
  height:auto;
  display:block;
  filter:drop-shadow(0 14px 22px rgba(91,66,39,.10));
  transition:transform .55s cubic-bezier(.18,.84,.24,1),filter .55s ease;
}
.login-logo-frame:hover .login-logo{transform:translateY(-2px) scale(1.035);filter:drop-shadow(0 18px 26px rgba(91,66,39,.13))}
.login-card form{width:100%}
.login-card input{
  width:100%;
  height:54px;
  margin:0 0 12px;
  padding:0 20px;
  border:1px solid rgba(92,75,61,.09);
  border-radius:17px;
  outline:none;
  text-align:center;
  color:var(--text);
  caret-color:var(--text);
  background:rgba(255,253,249,.72);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.88);
  transition:border-color .22s ease,background .22s ease,box-shadow .22s ease,transform .22s ease;
}
.login-card input::placeholder{color:#a49c94}
.login-card input:focus{
  background:rgba(255,253,249,.94);
  border-color:rgba(92,75,61,.17);
  box-shadow:0 0 0 5px rgba(255,250,242,.42),inset 0 1px 0 #fff;
  transform:translateY(-1px);
}
.login-card #loginSubmitBtn{
  width:100%;
  height:54px;
  margin-top:2px;
  border:0;
  border-radius:17px;
  color:#fffdf9;
  font-weight:600;
  letter-spacing:.20em;
  text-indent:.20em;
  background:linear-gradient(180deg,#59514b,#3c3733);
  box-shadow:0 14px 30px rgba(67,54,45,.19),inset 0 1px 0 rgba(255,255,255,.13);
  transition:transform .24s ease,box-shadow .24s ease,filter .24s ease;
}
.login-card #loginSubmitBtn:hover{transform:translateY(-2px);filter:brightness(.96);box-shadow:0 18px 36px rgba(67,54,45,.23)}
.login-card #loginSubmitBtn:active{transform:translateY(0)}
.login-card #loginSubmitBtn:disabled{cursor:not-allowed;opacity:.64;transform:none}
.login-error{min-height:18px;margin-top:13px;color:var(--danger);font-size:12px;line-height:18px}

/* 主框架 */
#appView{
  height:100%;
  display:grid;
  grid-template-columns:var(--sidebar) minmax(0,1fr);
  gap:14px;
  padding:14px;
}
.sidebar,.workspace{
  border:1px solid rgba(255,255,255,.68);
  background:var(--surface);
  box-shadow:var(--shadow-soft),inset 0 1px 0 rgba(255,255,255,.84);
  backdrop-filter:blur(28px) saturate(1.10);
  -webkit-backdrop-filter:blur(28px) saturate(1.10);
}
.sidebar{
  min-height:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  padding:18px 11px 14px;
  border-radius:var(--radius-frame);
  overflow-x:hidden;
  overflow-y:auto;
  scrollbar-width:none;
}
.sidebar::-webkit-scrollbar,.nav::-webkit-scrollbar{display:none}
.brand{
  width:100%;
  height:88px;
  flex:0 0 88px;
  display:grid;
  place-items:center;
  margin:0 0 8px;
}
.brand img{
  width:94px;
  height:auto;
  filter:drop-shadow(0 10px 16px rgba(91,66,39,.10));
  transition:transform .52s cubic-bezier(.18,.84,.24,1),filter .52s ease;
}
.brand:hover img{transform:translateY(-2px) scale(1.08);filter:drop-shadow(0 15px 21px rgba(91,66,39,.14))}
.nav{
  width:100%;
  min-height:0;
  flex:1 1 auto;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:8px;
  padding:8px 0;
  overflow-y:auto;
  scrollbar-width:none;
}
.nav button{
  --nav-color:var(--sand);
  position:relative;
  width:100%;
  min-height:52px;
  flex:0 0 52px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0 12px;
  border:1px solid transparent;
  border-radius:17px;
  color:#817970;
  background:transparent;
  text-align:center;
  font-size:13px;
  font-weight:590;
  letter-spacing:.035em;
  transition:color .24s ease,background .24s ease,border-color .24s ease,transform .24s ease,box-shadow .24s ease;
}
.nav button span{width:100%;display:block;white-space:nowrap;text-align:center}
.nav button:nth-child(1){--nav-color:var(--sand)}
.nav button:nth-child(2){--nav-color:var(--sage)}
.nav button:nth-child(3){--nav-color:var(--blue)}
.nav button:nth-child(4){--nav-color:var(--peach)}
.nav button:nth-child(5){--nav-color:var(--lavender)}
.nav button:nth-child(6){--nav-color:var(--rose)}
.nav button:hover{
  color:#4b4540;
  background:color-mix(in srgb,var(--nav-color) 38%,rgba(255,255,255,.60));
  border-color:rgba(255,255,255,.68);
  transform:translateY(-1px);
}
.nav button.active{
  color:#37322e;
  font-weight:650;
  background:color-mix(in srgb,var(--nav-color) 62%,rgba(255,255,255,.72));
  border-color:rgba(255,255,255,.82);
  box-shadow:0 9px 22px rgba(93,72,55,.08),inset 0 1px 0 rgba(255,255,255,.94);
}

.sidebar-user{
  width:100%;
  flex:0 0 auto;
  padding-top:14px;
  border-top:1px solid rgba(92,75,61,.08);
}
.user-menu{position:relative;width:100%;display:flex;align-items:center;padding:0}
.user-name{
  width:100%;
  min-width:0;
  height:46px;
  padding:0 10px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  border:1px solid rgba(92,75,61,.08);
  border-radius:15px;
  color:#625b54;
  background:rgba(255,253,249,.58);
  font-size:12px;
  font-weight:590;
  letter-spacing:.02em;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.86);
  transition:background .22s ease,color .22s ease,transform .22s ease,box-shadow .22s ease;
}
.user-menu:hover .user-name,.user-menu:focus-within .user-name,.user-menu.open .user-name{
  color:#3f3934;
  background:rgba(255,253,249,.92);
  transform:translateY(-1px);
  box-shadow:0 9px 22px rgba(93,72,55,.08),inset 0 1px 0 #fff;
}
.user-avatar{
  width:25px;
  height:25px;
  flex:0 0 25px;
  display:grid;
  place-items:center;
  border-radius:var(--radius-small);
  color:#6f645b;
  background:linear-gradient(145deg,rgba(234,217,185,.74),rgba(239,210,198,.54));
  font-size:10px;
  font-weight:700;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.82);
}
.user-popover{
  position:absolute;
  right:0;
  bottom:54px;
  width:100%;
  padding:7px;
  border:1px solid rgba(255,255,255,.76);
  border-radius:15px;
  background:rgba(252,249,244,.96);
  box-shadow:0 16px 42px rgba(91,69,52,.14),inset 0 1px 0 rgba(255,255,255,.92);
  backdrop-filter:blur(22px);
  -webkit-backdrop-filter:blur(22px);
  opacity:0;
  visibility:hidden;
  transform:translateY(6px) scale(.98);
  transform-origin:bottom center;
  transition:opacity .18s ease,visibility .18s ease,transform .18s ease;
}
.user-menu:hover .user-popover,.user-menu:focus-within .user-popover,.user-menu.open .user-popover{opacity:1;visibility:visible;transform:none}
.logout-action{
  width:100%;
  height:38px;
  border:0;
  border-radius:11px;
  color:#9b4747;
  background:transparent;
  font-size:12px;
  transition:background .18s ease,color .18s ease;
}
.logout-action:hover,.logout-action:focus-visible{background:rgba(229,203,209,.52);color:#873b3b;outline:none}

.workspace{
  position:relative;
  min-width:0;
  min-height:0;
  display:block;
  overflow:hidden;
  border-radius:var(--radius-frame);
  background:rgba(248,244,237,.66);
}
.workspace::before,.workspace::after{
  content:"";
  position:absolute;
  pointer-events:none;
  border-radius:999px;
  opacity:.22;
}
.workspace::before{
  width:340px;height:340px;
  right:-120px;top:78px;
  background:radial-gradient(circle,rgba(206,221,207,.66),rgba(206,221,207,0) 69%);
}
.workspace::after{
  width:380px;height:380px;
  left:18%;bottom:-210px;
  background:radial-gradient(circle,rgba(217,210,231,.56),rgba(217,210,231,0) 70%);
}
.content{position:relative;z-index:1;height:100%;min-height:100%;overflow:auto}
.view{display:none;width:100%;height:100%;min-height:100%}
.view.active{display:block;animation:viewIn .30s cubic-bezier(.2,.74,.25,1)}
.view-copywriting,.view-infringement{overflow:hidden}
.copywriting-frame,.infringement-frame{width:100%;height:100%;min-height:100%;display:block;border:0;background:transparent}
@keyframes viewIn{from{opacity:0}to{opacity:1}}

/* 未开发模块占位 */
.placeholder-view.active{display:grid;place-items:center;padding:34px}
.placeholder-card{
  width:min(560px,100%);
  min-height:310px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:42px 36px;
  text-align:center;
  border:1px solid rgba(255,255,255,.76);
  border-radius:var(--radius-card);
  background:rgba(255,252,247,.58);
  box-shadow:0 14px 40px rgba(90,70,52,.06),inset 0 1px 0 rgba(255,255,255,.92);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}
.placeholder-mark{
  width:54px;
  height:54px;
  display:grid;
  place-items:center;
  margin-bottom:20px;
  border-radius:17px;
  color:#756b63;
  background:linear-gradient(145deg,rgba(206,221,207,.72),rgba(204,220,231,.62));
  font-size:19px;
  font-weight:700;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.88);
}
.placeholder-card h2{margin:0 0 10px;font-size:21px;font-weight:670;letter-spacing:-.02em}
.placeholder-card p{max-width:430px;margin:0;color:var(--muted);font-size:13px;line-height:1.8}
.placeholder-status{margin-top:22px;padding:7px 11px;border:1px solid rgba(92,75,61,.08);border-radius:999px;color:#857b72;background:rgba(255,255,255,.48);font-size:11px}

/* 确认弹窗 */
.modal-backdrop{
  position:fixed;
  inset:0;
  z-index:1000;
  display:grid;
  place-items:center;
  padding:22px;
  background:rgba(62,54,48,.18);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  animation:modalFade .18s ease both;
}
.system-modal{
  width:min(340px,100%);
  overflow:hidden;
  border:1px solid rgba(255,255,255,.78);
  border-radius:24px;
  background:rgba(252,249,244,.94);
  box-shadow:0 26px 70px rgba(73,57,45,.20),inset 0 1px 0 rgba(255,255,255,.92);
  animation:modalIn .22s cubic-bezier(.2,.76,.24,1) both;
}
.system-modal-copy{padding:28px 27px 24px;text-align:center}
.system-modal-copy h2{margin:0 0 9px;font-size:17px;font-weight:650;color:#38332f}
.system-modal-copy p{margin:0;color:#817970;font-size:13px;line-height:1.65;white-space:pre-line}
.system-modal-actions{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid rgba(92,75,61,.09)}
.modal-btn{height:52px;border:0;background:rgba(255,255,255,.34);color:#5d5650;font-size:13px;transition:background .18s ease,color .18s ease}
.modal-btn + .modal-btn{border-left:1px solid rgba(92,75,61,.09)}
.modal-btn:hover{background:rgba(255,255,255,.82);color:#302c29}
.modal-btn.confirm{font-weight:620}
.modal-btn.confirm.danger{color:#b34444}
body.modal-open{overflow:hidden}
@keyframes modalFade{from{opacity:0}to{opacity:1}}
@keyframes modalIn{from{opacity:0;transform:scale(.965) translateY(7px)}to{opacity:1;transform:none}}

@supports not (background:color-mix(in srgb,white 50%,black)){
  .nav button:hover{background:rgba(255,255,255,.48)}
  .nav button.active{background:rgba(244,234,221,.92)}
}

@media(max-height:680px){
  .brand{height:70px;flex-basis:70px;margin-bottom:2px}
  .brand img{width:78px}
  .nav{justify-content:flex-start;gap:6px;padding:5px 0}
  .nav button{min-height:44px;flex-basis:44px}
  .sidebar-user{padding-top:9px}
  .user-name{height:42px}
}
@media(max-width:720px){
  :root{--sidebar:126px}
  #appView{gap:10px;padding:10px}
  .sidebar{padding-left:7px;padding-right:7px}
  .brand{height:76px;flex-basis:76px}
  .brand img{width:78px}
  .nav button{min-height:48px;flex-basis:48px;padding:0 10px;font-size:11.5px}
  .user-name{height:42px;padding:0 8px;font-size:11px}
  .user-avatar{width:22px;height:22px;flex-basis:22px}
  .placeholder-view.active{padding:20px}
}
@media(max-width:460px){
  #loginView{padding:16px}
  .login-card{min-height:444px;padding:42px 24px 36px;border-radius:29px}
  .login-logo{width:198px}
  #appView{grid-template-columns:112px minmax(0,1fr);padding:8px;gap:8px}
  .sidebar,.workspace{border-radius:23px}
  .brand img{width:68px}
  .nav button{padding:0 8px;font-size:10.5px;letter-spacing:0}
  .user-name{gap:6px;padding:0 6px;font-size:10px}
  .user-avatar{width:20px;height:20px;flex-basis:20px;border-radius:7px;font-size:8px}
  .placeholder-card{min-height:260px;padding:30px 20px}
}


/* =========================
   Elegant Quiet Design System
   ========================= */
:root{
  --quiet-bg:#f2efea;
  --quiet-surface:#f8f6f2;
  --quiet-white:#fffdfa;
  --quiet-text:#302d2a;
  --quiet-muted:#7d766f;
  --quiet-line:rgba(48,45,42,.085);
  --quiet-accent:#687b6b;
  --quiet-accent-soft:#e5eae4;
  --radius-frame:24px;
  --radius-card:16px;
  --radius-control:10px;
  --radius-small:7px;
}

body{
  background:
    radial-gradient(circle at 50% -20%,rgba(255,255,255,.78),transparent 45%),
    var(--quiet-bg);
}

body::before{display:none}

.sidebar,.workspace{
  background:rgba(248,246,242,.94);
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
  border-color:var(--quiet-line);
  box-shadow:0 10px 30px rgba(48,45,42,.045);
}

.workspace::before,.workspace::after{display:none}

.sidebar{
  border-radius:24px;
}

.nav button{
  color:#817a73;
  background:transparent;
  border-color:transparent;
  box-shadow:none;
  transform:none;
  font-weight:500;
  transition:color .16s ease,background-color .16s ease;
}

.nav button:hover{
  color:var(--quiet-text);
  background:rgba(48,45,42,.035);
  transform:none;
}

.nav button.active{
  color:var(--quiet-text);
  background:var(--quiet-accent-soft);
  border-color:transparent;
  box-shadow:none;
  font-weight:600;
}

.nav button:hover,
.nav button.active{
  transform:none;
}

.user-name{
  border-radius:10px;
  background:transparent;
  box-shadow:none;
}

.user-menu:hover .user-name,
.user-menu:focus-within .user-name,
.user-menu.open .user-name{
  background:rgba(48,45,42,.035);
  box-shadow:none;
  transform:none;
}

.login-card{
  width:min(380px,100%);
  border-radius:22px;
  background:var(--quiet-surface);
  box-shadow:0 18px 50px rgba(48,45,42,.08);
}

.login-logo-frame:hover .login-logo{
  transform:none;
}

.login-card input{
  border-radius:10px;
}

.login-card input:focus{
  transform:none;
}

.login-card #loginSubmitBtn{
  border-radius:10px;
  background:#3a3835;
  box-shadow:none;
  letter-spacing:.1em;
}

.placeholder-card{
  border-radius:16px;
  background:transparent;
  box-shadow:none;
}

.placeholder-mark{
  background:var(--quiet-accent-soft);
}

.modal-backdrop .system-modal{
  border-radius:18px;
}



/* 采集器扩展嵌入 */
.view-collector {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #f5f5f7;
}
.collector-host {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #f5f5f7;
}
.collector-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #f5f5f7;
}
.collector-status {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(245, 245, 247, .96);
}
.collector-status.hidden { display: none; }
.collector-status-card {
  width: min(440px, 100%);
  padding: 34px 32px;
  border: 1px solid rgba(60, 60, 67, .12);
  border-radius: 24px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .08);
  text-align: center;
}
.collector-status-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 18px;
  border-radius: 16px;
  background: rgba(0, 122, 255, .1);
  color: #007aff;
  font-size: 22px;
  font-weight: 700;
}
.collector-status-card h2 { margin: 0; font-size: 20px; color: #1d1d1f; }
.collector-status-card p { margin: 10px auto 0; max-width: 360px; color: #6e6e73; font-size: 14px; line-height: 1.65; }
.collector-retry {
  margin-top: 20px;
  min-width: 112px;
  height: 36px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: #007aff;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.collector-retry:hover { background: #006ee6; }
.collector-status.is-error .collector-status-mark { background: rgba(255, 59, 48, .1); color: #d70015; }


/* V2.28 公网版 */
.cloud-edition{height:46px;display:flex;align-items:center;gap:9px;padding:0 10px;border:1px solid rgba(60,60,67,.08);border-radius:12px;background:rgba(255,255,255,.48);color:#48484a}
.cloud-edition>span:last-child{min-width:0;display:flex;flex-direction:column;gap:1px}
.cloud-edition strong{font-size:11px;font-weight:620;line-height:1.2}
.cloud-edition small{max-width:145px;overflow:hidden;text-overflow:ellipsis;color:#8e8e93;font-size:8.5px;white-space:nowrap}
.collector-status-actions{display:flex;justify-content:center;align-items:center;gap:8px;margin-top:20px}
.collector-status-actions .collector-retry{margin-top:0}
.collector-install{min-width:112px;height:36px;display:inline-flex;align-items:center;justify-content:center;padding:0 16px;border:1px solid rgba(0,122,255,.16);border-radius:10px;background:rgba(0,122,255,.075);color:#006edb;font-size:13px;font-weight:600;text-decoration:none}
.collector-install:hover{background:rgba(0,122,255,.12)}
.collector-install.hidden{display:none}
