  /* 默认亮色（白色） */
  :root{
    --bg:#f4f6fa; --bg-glow:#dfe8f5;
    --card:#ffffff; --card2:#f1f3f7;
    --border:rgba(0,0,0,.10);
    --text:#1f2328; --sub:#5f6368; --faint:#8e949c;
    --accent:#1a73e8; --warn:#d93025; --ok:#188038;
    --ring-bg:rgba(0,0,0,.10);
    --toast-bg:#1f2328; --toast-text:#f1f3f4; --toast-border:rgba(0,0,0,.10);
    --btn-text:#ffffff;
    --shadow:0 1px 3px rgba(0,0,0,.06);
    --item-hover:rgba(26,115,232,.35);
  }
  /* 关灯后（暗色） */
  html.dark{
    --bg:#0f1014; --bg-glow:#1a2333;
    --card:#17181d; --card2:#1d1f26;
    --border:rgba(255,255,255,.07);
    --text:#e8eaed; --sub:#9aa0a6; --faint:#5f6368;
    --accent:#8ab4f8; --warn:#f28b82; --ok:#81c995;
    --ring-bg:rgba(255,255,255,.12);
    --toast-bg:#2d2f36; --toast-text:#e8eaed; --toast-border:rgba(255,255,255,.07);
    --btn-text:#0b0e14;
    --shadow:none;
    --item-hover:rgba(138,180,248,.35);
  }
  *{box-sizing:border-box; margin:0; padding:0;}
  html{scroll-behavior:smooth;}
  body{
    min-height:100vh; color:var(--text);
    font-family:-apple-system,"Segoe UI",Roboto,"Microsoft YaHei",sans-serif;
    background:radial-gradient(1200px 600px at 70% -10%, var(--bg-glow) 0%, var(--bg) 55%);
    padding:32px 16px 64px 224px;
    transition:color .3s;
  }
  /* 左侧固定导航栏 */
  .sidebar{
    position:fixed; top:0; left:0; bottom:0; width:208px; z-index:10;
    background:var(--card); border-right:1px solid var(--border);
    padding:22px 14px; display:flex; flex-direction:column; gap:4px;
    overflow-y:auto; box-shadow:var(--shadow);
  }
  .nav-brand{
    display:flex; align-items:center; gap:10px; padding:0 8px 18px;
    font-size:15px; font-weight:600; color:var(--text);
  }
  .nav-brand .logo{
    width:34px; height:34px; border-radius:9px; flex:none;
    background:linear-gradient(135deg,#8ab4f8,#3367d6);
    display:flex; align-items:center; justify-content:center;
  }
  .nav-item{
    display:flex; align-items:center; gap:10px; padding:10px 12px;
    border-radius:9px; color:var(--sub); text-decoration:none;
    font-size:13.5px; transition:background-color .15s, color .15s;
  }
  .nav-item svg{width:17px; height:17px; flex:none; fill:none; stroke:currentColor; stroke-width:2;}
  .nav-item:hover{color:var(--accent); background:var(--card2);}
  /* 移动端抽屉式侧栏 */
  .nav-toggle{
    display:none; width:40px; height:40px; border-radius:10px; flex:none;
    align-items:center; justify-content:center; cursor:pointer;
    background:var(--card2); border:1px solid var(--border); color:var(--text);
  }
  .nav-toggle svg{width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round;}
  .nav-backdrop{display:none;}
  .nav-group{
    font-size:11px; letter-spacing:1px; color:var(--faint);
    padding:16px 12px 6px; text-transform:uppercase;
  }
  .nav-item.soon{color:var(--faint); opacity:.6; cursor:not-allowed; pointer-events:none;}
  .soon-tag{
    margin-left:auto; font-size:10px; letter-spacing:.5px;
    color:var(--faint); background:var(--card2); border:1px solid var(--border);
    padding:1px 6px; border-radius:5px;
  }
  .wrap{max-width:980px; margin:0 auto;}
  header{display:flex; align-items:center; gap:14px; margin-bottom:26px;}
  header .logo{
    width:46px; height:46px; border-radius:12px; flex:none;
    /* background:linear-gradient(135deg,#8ab4f8,#3367d6); */
    display:flex; align-items:center; justify-content:center;
  }
  header h1{font-size:22px; font-weight:600;}
  header p{font-size:13px; color:var(--sub); margin-top:2px;}

  /* 关灯开关 */
  .theme-switch{
    margin-left:auto; flex:none; position:relative; width:64px; height:34px;
    border-radius:17px; padding:0; cursor:pointer; background:var(--card2);
    border:1px solid var(--border); transition:background-color .25s;
  }
  .theme-switch .ts-knob{
    position:absolute; top:3px; left:3px; width:26px; height:26px;
    border-radius:50%; background:var(--card); box-shadow:0 1px 3px rgba(0,0,0,.25);
    display:flex; align-items:center; justify-content:center;
    transition:transform .25s cubic-bezier(.4,0,.2,1), background-color .25s;
  }
  html.dark .theme-switch .ts-knob{transform:translateX(32px);}
  .ts-ico{
    position:absolute; top:50%; left:50%; width:15px; height:15px;
    transform:translate(-50%,-50%); transition:opacity .2s; color:#f9ab00;
  }
  .ts-ico.moon{color:#5f6368; opacity:0;}
  html.dark .ts-ico.sun{opacity:0;}
  html.dark .ts-ico.moon{opacity:1; color:#8ab4f8;}

  .card{
    background:var(--card); border:1px solid var(--border);
    border-radius:16px; padding:20px; box-shadow:var(--shadow);
  }
  /* 添加表单 */
  .add-form{margin-bottom:22px;}
  .add-form h2{font-size:15px; font-weight:600; margin-bottom:14px; color:var(--accent);}
  .grid{display:grid; grid-template-columns:1fr 1fr; gap:12px;}
  .grid .full{grid-column:1/-1;}
  input, textarea{
    width:100%; background:var(--card2); border:1px solid var(--border);
    border-radius:10px; padding:12px 14px; color:var(--text);
    font-size:14px; outline:none; transition:border-color .15s;
  }
  textarea{
    min-height:96px; resize:vertical; line-height:1.7;
    font-family:ui-monospace,Consolas,"Courier New",monospace;
    letter-spacing:.5px;
  }
  input:focus, textarea:focus{border-color:var(--accent);}
  input::placeholder, textarea::placeholder{color:var(--faint);}
  .btn{
    background:var(--accent); color:var(--btn-text); border:none; border-radius:10px;
    padding:12px 26px; font-size:14px; font-weight:600; cursor:pointer;
    transition:filter .15s;
  }
  .btn:hover{filter:brightness(1.1);}
  .hint{font-size:12px; color:var(--sub); margin-top:10px; line-height:1.7;}
  .hint b{color:var(--text); font-weight:500;}

  /* 列表 */
  .toolbar{display:flex; justify-content:space-between; align-items:center; margin:6px 2px 14px;}
  .toolbar span{font-size:13px; color:var(--sub);}
  .list{display:grid; grid-template-columns:repeat(auto-fill,minmax(340px,1fr)); gap:14px;}
  .item{
    background:var(--card); border:1px solid var(--border); border-radius:16px;
    padding:16px 18px; display:flex; justify-content:space-between; gap:12px;
    box-shadow:var(--shadow);
    transition:transform .15s, border-color .15s, background-color .3s;
  }
  .item:hover{border-color:var(--item-hover);}
  .item .info{min-width:0; flex:1;}
  .issuer{font-size:15px; font-weight:600; display:flex; align-items:center; gap:8px;}
  .account{font-size:12.5px; color:var(--sub); margin-top:2px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
  .code{
    margin-top:10px; font-family:ui-monospace,Consolas,"Courier New",monospace;
    font-size:30px; letter-spacing:2px; color:var(--accent);
    cursor:pointer; user-select:none; width:max-content; line-height:1.2;
  }
  .item.warn .code{color:var(--warn); animation:blink 1s step-start infinite;}
  .secret{
    margin-top:9px; display:flex; flex-wrap:wrap; align-items:center; gap:6px;
    font-size:12px; color:var(--sub); cursor:pointer; line-height:1.5;
  }
  .secret .s-label{
    flex:none; font-size:10.5px; letter-spacing:.5px; color:var(--faint);
    background:var(--card2); border:1px solid var(--border);
    padding:1px 6px; border-radius:5px; user-select:none;
  }
  .secret code{
    font-family:ui-monospace,Consolas,"Courier New",monospace;
    letter-spacing:.5px; word-break:break-all; user-select:all;
  }
  .secret:hover code{color:var(--text);}

  /* 当前验证码模块 */
  .current{margin-bottom:22px; display:none;}
  .current.show{display:block;}
  .cur-head{display:flex; align-items:baseline; gap:10px; margin-bottom:12px; flex-wrap:wrap;}
  .cur-head h2{font-size:15px; font-weight:600; color:var(--accent);}
  .cur-name{font-size:12.5px; color:var(--sub); overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
  .cur-body{display:flex; align-items:center; justify-content:space-between; gap:18px; flex-wrap:wrap;}
  .cur-code{
    font-family:ui-monospace,Consolas,"Courier New",monospace;
    font-size:42px; letter-spacing:4px; color:var(--accent);
    cursor:pointer; user-select:none; line-height:1.15; width:max-content;
  }
  .current.warn .cur-code{color:var(--warn);}
  .cur-hint{font-size:12px; color:var(--sub); margin-top:2px;}
  .current.warn .ring-fg{stroke:var(--warn);}
  @keyframes blink{50%{opacity:.55;}}
  .side{display:flex; flex-direction:column; align-items:center; gap:10px; flex:none;}
  .ring{position:relative; width:40px; height:40px;}
  .ring svg{width:40px; height:40px; transform:rotate(-90deg);}
  .ring circle{fill:none; stroke-width:3; cx:20px; cy:20px;}
  .ring-bg{stroke:var(--ring-bg);}
  .ring-fg{stroke:var(--accent); stroke-linecap:round; transition:stroke-dashoffset .2s linear;}
  .item.warn .ring-fg{stroke:var(--warn);}
  .ring b{
    position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
    font-size:11px; font-weight:500; color:var(--sub);
  }
  .del{
    background:none; border:none; color:var(--faint); cursor:pointer; padding:4px;
    border-radius:8px; display:flex;
  }
  .del:hover{color:var(--warn); background:rgba(242,139,130,.1);}

  .empty{
    text-align:center; padding:64px 20px; color:var(--sub); font-size:14px; line-height:2;
  }
  .empty .big{font-size:44px; margin-bottom:8px; filter:grayscale(1); opacity:.6;}

  #toast{
    position:fixed; left:50%; bottom:36px; transform:translateX(-50%) translateY(20px);
    background:var(--toast-bg); color:var(--toast-text); border:1px solid var(--toast-border);
    padding:11px 22px; border-radius:12px; font-size:13.5px;
    opacity:0; pointer-events:none; transition:all .25s; z-index:99;
  }
  #toast.show{opacity:1; transform:translateX(-50%) translateY(0);}
  #toast.err{border-color:rgba(242,139,130,.5); color:#f28b82;}

  /* 说明信息 */
  .notice{
    margin-top:30px; padding:20px; background:var(--card);
    border:1px solid var(--border); border-radius:16px; box-shadow:var(--shadow);
    font-size:13px; line-height:1.85; color:var(--sub);
  }
  .notice h3{font-size:15px; color:var(--text); margin-bottom:10px;}
  .notice h4{font-size:13px; color:var(--text); margin:14px 0 6px;}
  .notice ol{margin:0 0 0 20px; padding:0;}
  .notice ol li{margin:2px 0;}
  .notice-tip{color:var(--warn); margin-top:12px;}

  footer{margin-top:16px; font-size:12px; color:var(--faint); line-height:1.9; text-align:center;}

  @media (max-width:900px){
    body{padding-left:16px;}
    .nav-toggle{display:flex;}
    .sidebar{
      transform:translateX(-110%);
      transition:transform .25s ease;
      box-shadow:0 0 24px rgba(0,0,0,.25);
    }
    body.nav-open .sidebar{transform:translateX(0);}
    .nav-backdrop{
      display:block; position:fixed; inset:0; z-index:9;
      background:rgba(0,0,0,.45);
      opacity:0; pointer-events:none; transition:opacity .25s;
    }
    body.nav-open .nav-backdrop{opacity:1; pointer-events:auto;}
  }

  @media (max-width:640px){
    .grid{grid-template-columns:1fr;}
    .list{grid-template-columns:1fr;}
    .toolbar{flex-direction:column; gap:10px; align-items:stretch;}
  }
