:root{
    --bg:#f3f7ff;
    --bg-soft:#eaf1ff;
    --card:rgba(255,255,255,0.94);
    --card-strong:#ffffff;
    --border:rgba(15,23,42,0.12);
    --text:#1f2d3d;
    --muted:#5f6f86;
    --primary:#3f7cff;
    --primary-strong:#2f68e3;
    --secondary:#eef3ff;
    --success:#1f9d63;
    --warn:#c98500;
    --danger:#d64545;
    --shadow:0 14px 28px rgba(15,23,42,.08);
    --radius:18px;
    --radius-sm:12px;
    --radius-xs:10px;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"PingFang SC","Microsoft YaHei",sans-serif;color:var(--text);background:
radial-gradient(circle at top left,rgba(63,124,255,.16),transparent 34%),
radial-gradient(circle at top right,rgba(56,189,248,.14),transparent 30%),
linear-gradient(135deg,#f8fbff,#eef4ff 55%,#f5f8ff)}
body{min-height:100vh}
a{color:inherit;text-decoration:none}
button,input,textarea,select{font:inherit}
button{cursor:pointer}
pre{white-space:pre-wrap;word-break:break-word}

.glass{
    background:var(--card);
    border:1px solid var(--border);
    backdrop-filter:blur(18px);
    -webkit-backdrop-filter:blur(18px);
    box-shadow:var(--shadow);
}

.alert{
    padding:12px 14px;
    border-radius:12px;
    margin-bottom:14px;
    font-size:14px;
}
.alert-error{
    background:#fff1f1;
    border:1px solid #f6c9c9;
    color:#b82f2f;
}

.auth-body{
    display:flex;
    align-items:center;
    justify-content:center;
    padding:32px;
}
.auth-shell{
    width:min(1080px,100%);
    display:grid;
    gap:28px;
    grid-template-columns:1.15fr .95fr;
    align-items:center;
}
.auth-brand{
    padding:24px 8px 24px 0;
}
.brand-mark{
    width:72px;
    height:72px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:24px;
    background:linear-gradient(135deg,var(--primary),#8ab0ff);
    color:white;
    font-size:28px;
    font-weight:800;
    box-shadow:0 18px 32px rgba(91,140,255,.35);
    margin-bottom:18px;
}
.auth-brand h1{
    margin:0 0 8px;
    font-size:44px;
    line-height:1.1;
}
.auth-brand p{
    margin:0;
    font-size:18px;
    color:var(--muted);
    max-width:560px;
}
.auth-card{
    padding:28px;
    border-radius:24px;
}
.auth-card-header h2{
    margin:0 0 6px;
    font-size:28px;
}
.auth-card-header span{
    color:var(--muted);
    font-size:14px;
}
.auth-form{
    margin-top:20px;
    display:flex;
    flex-direction:column;
    gap:16px;
}
.auth-footer{
    margin-top:18px;
    padding-top:18px;
    border-top:1px solid var(--border);
    display:grid;
    gap:8px;
    color:var(--muted);
    font-size:14px;
}

.form-field{
    display:flex;
    flex-direction:column;
    gap:8px;
}
.form-field span{
    font-size:14px;
    color:var(--muted);
}
.form-field input,
.form-field textarea,
.form-field select{
    width:100%;
    border:1px solid #d8e0ef;
    background:#ffffff;
    color:var(--text);
    border-radius:14px;
    padding:13px 14px;
    outline:none;
    transition:.2s ease;
}
.form-field textarea{resize:vertical}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus{
    border-color:rgba(63,124,255,.6);
    box-shadow:0 0 0 3px rgba(63,124,255,.16);
}
.checkbox-field{
    flex-direction:row;
    align-items:center;
    gap:10px;
    padding-top:28px;
}
.checkbox-field input{
    width:18px;
    height:18px;
    margin:0;
}
.inline-field{
    min-width:280px;
}

.btn{
    border:0;
    border-radius:14px;
    padding:12px 16px;
    font-weight:700;
    transition:transform .18s ease, opacity .18s ease, background .18s ease;
}
.btn:hover{transform:translateY(-1px)}
.btn:active{transform:translateY(0)}
.btn-primary{
    background:linear-gradient(135deg,var(--primary),var(--primary-strong));
    color:white;
}
.btn-secondary{
    background:var(--secondary);
    color:var(--text);
    border:1px solid #d8e0ef;
}
.btn-ghost{
    background:transparent;
    color:var(--text);
    border:1px solid #cfd8ea;
}
.btn-danger{
    background:#fff1f1;
    color:#b82f2f;
    border:1px solid #f2c2c2;
}
.btn-block{width:100%}

.dashboard-body{
    padding:24px;
}
.dashboard-shell{
    display:grid;
    gap:20px;
    grid-template-columns:280px 1fr;
    min-height:calc(100vh - 48px);
}
.sidebar{
    border-radius:24px;
    padding:20px;
    display:flex;
    flex-direction:column;
    gap:22px;
}
.sidebar-brand{
    display:flex;
    gap:14px;
    align-items:center;
}
.sidebar-brand strong{display:block;font-size:18px}
.sidebar-brand small{color:var(--muted)}
.sidebar-nav{
    display:grid;
    gap:8px;
}
.nav-link{
    background:transparent;
    color:var(--muted);
    border:1px solid transparent;
    text-align:left;
    padding:14px 16px;
    border-radius:14px;
    font-weight:700;
}
.nav-link:hover{background:rgba(255,255,255,.04);color:var(--text)}
.nav-link.active{
    background:rgba(63,124,255,.12);
    border-color:rgba(63,124,255,.22);
    color:#234793;
}
.sidebar-tip{
    margin-top:auto;
    padding:18px;
    border-radius:18px;
    background:#f7f9ff;
    border:1px solid #dce4f2;
}
.sidebar-tip h4{
    margin:0 0 8px;
    font-size:14px;
    color:var(--muted);
}
.sidebar-tip p{
    margin:0 0 14px;
    font-weight:700;
}

.main-panel{
    display:flex;
    flex-direction:column;
    gap:18px;
}
.topbar{
    border-radius:24px;
    padding:22px 26px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
}
.topbar h1{
    margin:0 0 6px;
    font-size:30px;
}
.topbar p{
    margin:0;
    color:var(--muted);
}
.status-pill{
    border-radius:999px;
    padding:10px 14px;
    font-size:14px;
    font-weight:700;
    white-space:nowrap;
}
.status-pill.success{
    background:#ecfaf3;
    color:#1f7f52;
    border:1px solid #bde9cf;
}
.status-pill.warn{
    background:#fff8e8;
    color:#996300;
    border:1px solid #f0deaf;
}

.section-card{
    display:none;
    background:rgba(255,255,255,.96);
    border:1px solid var(--border);
    border-radius:24px;
    padding:22px;
    box-shadow:var(--shadow);
}
.section-card.active{display:block}
.section-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:16px;
    margin-bottom:18px;
}
.section-head h2{
    margin:0 0 6px;
    font-size:26px;
}
.section-head p{
    margin:0;
    color:var(--muted);
}

.stats-grid{
    display:grid;
    gap:16px;
    grid-template-columns:repeat(4,1fr);
}
.stat-card{
    padding:20px;
    border-radius:20px;
    background:linear-gradient(180deg,#ffffff,#f7faff);
    border:1px solid #dde5f3;
}
.stat-card span{
    display:block;
    color:var(--muted);
    margin-bottom:12px;
    font-size:14px;
}
.stat-card strong{
    font-size:30px;
    line-height:1;
}

.grid-two{
    display:grid;
    gap:18px;
    grid-template-columns:repeat(2,1fr);
    margin-top:18px;
}
.panel-card,
.table-card{
    background:#ffffff;
    border:1px solid #dce4f2;
    border-radius:20px;
    padding:18px;
}
.panel-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    margin-bottom:14px;
}
.panel-head h3{
    margin:0;
    font-size:18px;
}
.bullet-card{
    display:grid;
    gap:10px;
    color:var(--muted);
}
.bullet-card p{margin:0}
.empty-state{
    color:var(--muted);
    font-size:14px;
    line-height:1.7;
}

.form-grid{
    display:grid;
    gap:16px;
    grid-template-columns:repeat(2,1fr);
}
.form-grid .full-span{
    grid-column:1/-1;
}
.form-actions{
    display:flex;
    gap:12px;
    justify-content:flex-end;
}

.toolbar{
    display:flex;
    flex-wrap:wrap;
    align-items:flex-end;
    gap:12px;
    margin-bottom:16px;
}

.data-table{
    width:100%;
    border-collapse:collapse;
}
.data-table th,
.data-table td{
    padding:13px 12px;
    border-bottom:1px solid rgba(15,23,42,.08);
    text-align:left;
    font-size:14px;
    vertical-align:top;
}
.data-table th{
    color:var(--muted);
    font-weight:700;
    white-space:nowrap;
}
.data-table tr:hover td{
    background:#f7faff;
}
.empty-cell{
    text-align:center!important;
    color:var(--muted);
    padding:26px 12px!important;
}
.tag{
    display:inline-flex;
    align-items:center;
    border-radius:999px;
    padding:4px 10px;
    font-size:12px;
    font-weight:700;
}
.tag.success{
    color:#1f7f52;
    background:#ecfaf3;
    border:1px solid #bde9cf;
}
.tag.warn{
    color:#996300;
    background:#fff8e8;
    border:1px solid #f0deaf;
}
.tag.danger{
    color:#b82f2f;
    background:#fff1f1;
    border:1px solid #f2c2c2;
}

.table-actions{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
}
.mini-btn{
    border:1px solid #d7e1f0;
    background:#f5f8ff;
    color:var(--text);
    border-radius:10px;
    padding:7px 10px;
    font-size:12px;
    font-weight:700;
}

.code-block{
    background:#f4f7ff;
    color:#1f2d3d;
    border-radius:16px;
    padding:14px;
    border:1px solid #d8e0ef;
}

.modal-mask{
    position:fixed;
    inset:0;
    background:rgba(15,23,42,.34);
    z-index:60;
}
.modal{
    position:fixed;
    inset:0;
    z-index:70;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:20px;
}
.modal.hidden,
.modal-mask.hidden{
    display:none;
}
.modal-card{
    width:min(760px,100%);
    border-radius:22px;
    background:#ffffff;
    border:1px solid #dbe4f2;
    box-shadow:var(--shadow);
    padding:20px;
}
.modal-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    margin-bottom:18px;
}
.modal-head h3{
    margin:0;
}
.icon-btn{
    width:36px;
    height:36px;
    border-radius:10px;
    border:1px solid #d7e0ef;
    background:#f5f8ff;
    color:var(--text);
    font-size:20px;
    line-height:1;
}
.secret-box{
    display:grid;
    gap:12px;
    padding:16px;
    border-radius:16px;
    background:#f7f9ff;
    border:1px solid #dce4f2;
}
.secret-box span{
    word-break:break-all;
    color:#5f4a00;
}
.secret-box p{
    margin:0;
    color:var(--muted);
}

.toast-box{
    position:fixed;
    right:18px;
    bottom:18px;
    display:grid;
    gap:10px;
    z-index:90;
}
.toast{
    min-width:280px;
    max-width:420px;
    padding:14px 16px;
    border-radius:16px;
    box-shadow:var(--shadow);
    border:1px solid #d9e2f0;
    background:#ffffff;
    color:var(--text);
    animation:slideIn .22s ease;
}
.toast.success{border-color:rgba(47,191,113,.22)}
.toast.error{border-color:rgba(255,91,112,.22)}
@keyframes slideIn{
    from{transform:translateY(8px);opacity:0}
    to{transform:translateY(0);opacity:1}
}

.text-muted{color:var(--muted)}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}

.docs-body{
    padding:24px;
}
.docs-shell{
    display:grid;
    gap:18px;
    grid-template-columns:280px minmax(0, 1fr) 260px;
    min-height:calc(100vh - 48px);
}
.docs-panel{
    background:rgba(255,255,255,.96);
    border:1px solid var(--border);
    border-radius:24px;
    box-shadow:var(--shadow);
}
.docs-left{
    padding:18px;
    display:flex;
    flex-direction:column;
    gap:16px;
}
.docs-doc-list{
    display:grid;
    gap:8px;
}
.docs-doc-btn{
    border:1px solid transparent;
    border-radius:12px;
    background:#f7f9ff;
    color:#334155;
    text-align:left;
    padding:10px 12px;
    font-weight:600;
}
.docs-doc-btn:hover{
    border-color:#cfe0ff;
}
.docs-doc-btn.active{
    background:rgba(63,124,255,.12);
    border-color:rgba(63,124,255,.22);
    color:#234793;
}
.docs-main{
    padding:24px 28px;
    overflow:auto;
}
.docs-main-header{
    margin-bottom:16px;
}
.docs-main-header h1{
    margin:0 0 8px;
    font-size:30px;
}
.docs-main-header p{
    margin:0;
    color:var(--muted);
}
.doc-content{
    line-height:1.8;
    color:#1f2d3d;
}
.doc-content h1,.doc-content h2,.doc-content h3,.doc-content h4{
    margin:1.2em 0 .6em;
    scroll-margin-top:16px;
}
.doc-content p{
    margin:.7em 0;
}
.doc-content pre{
    background:#f4f7ff;
    border:1px solid #d8e0ef;
    border-radius:14px;
    padding:12px 14px;
    overflow:auto;
}
.doc-content code{
    font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}
.doc-content p code,.doc-content li code,.doc-content td code,.doc-content blockquote code{
    background:#eef3ff;
    border:1px solid #d6e2ff;
    border-radius:8px;
    padding:1px 6px;
}
.doc-content hr{
    border:0;
    border-top:1px solid #dce4f2;
    margin:18px 0;
}
.doc-content blockquote{
    margin:10px 0;
    border-left:3px solid #bad0ff;
    padding:2px 12px;
    color:#50617c;
    background:#f8fbff;
    border-radius:0 10px 10px 0;
}
.doc-content ul,.doc-content ol{
    margin:.6em 0 .8em 1.2em;
}
.doc-content table{
    width:100%;
    border-collapse:collapse;
    margin:12px 0;
}
.doc-content th,.doc-content td{
    border:1px solid #dce4f2;
    padding:8px 10px;
    text-align:left;
    vertical-align:top;
}
.doc-content th{
    background:#f7f9ff;
}
.docs-right{
    padding:18px;
    overflow:auto;
}
.docs-outline-list{
    display:grid;
    gap:6px;
}
.docs-outline-item{
    display:block;
    color:#5f6f86;
    font-size:14px;
    padding:2px 8px;
    line-height:1.25;
    border-radius:8px;
}
.docs-outline-item:hover{
    background:#f3f7ff;
    color:#25468e;
}
.docs-outline-item.active{
    background:#f3f7ff;
    color:#25468e;
    font-weight:600;
}
.docs-outline-item.level-2{
    padding-left:18px;
}
.docs-outline-item.level-3{
    padding-left:28px;
}
.docs-outline-item.level-4{
    padding-left:38px;
}

/* docs center replica style */
.docs-page{
    margin:0;
    background:#ffffff;
    color:#334155;
    line-height:1.7;
}
.docs-page *{
    box-sizing:border-box;
}
.docs-navbar{
    position:fixed;
    top:0;
    left:0;
    right:0;
    height:64px;
    background:rgba(255,255,255,.95);
    backdrop-filter:blur(8px);
    border-bottom:1px solid #e2e8f0;
    display:flex;
    align-items:center;
    padding:0 32px;
    z-index:60;
}
.docs-nav-brand{
    font-size:18px;
    font-weight:700;
    color:#0f172a;
    display:flex;
    align-items:center;
    gap:10px;
}
.docs-nav-brand span{
    background:#2563eb;
    color:#fff;
    padding:3px 8px;
    border-radius:6px;
    font-size:13px;
    letter-spacing:.5px;
}
.docs-layout{
    display:flex;
    width:100%;
    min-height:100vh;
    padding-top:64px;
}
.docs-left-sidebar{
    width:280px;
    flex-shrink:0;
    border-right:1px solid #e2e8f0;
    background:#fff;
    height:calc(100vh - 64px);
    position:sticky;
    top:64px;
    overflow-y:auto;
    padding:24px 0;
}
.docs-sidebar-section{
    margin-bottom:24px;
}
.docs-sidebar-section h3{
    margin:0 0 10px 24px;
    font-size:13px;
    color:#0f172a;
}
.docs-nav-links{
    display:grid;
}
.docs-doc-btn{
    border:0;
    border-left:3px solid transparent;
    border-radius:0;
    background:#fff;
    color:#64748b;
    text-align:left;
    font-size:14px;
    padding:9px 24px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    font-weight:500;
}
.docs-doc-btn:hover{
    color:#0f172a;
    background:#f8fafc;
}
.docs-doc-btn.active{
    color:#2563eb;
    font-weight:600;
    background:#eff6ff;
    border-left-color:#2563eb;
}
.docs-nav-badge{
    font-size:11px;
    padding:2px 6px;
    border-radius:4px;
    background:#e2e8f0;
    color:#64748b;
    font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
    font-weight:600;
}
.docs-doc-btn.active .docs-nav-badge,
.docs-doc-btn:hover .docs-nav-badge{
    background:#dcfce7;
    color:#166534;
}
.docs-main-wrapper{
    flex-grow:1;
    display:flex;
    justify-content:center;
    min-width:0;
}
.docs-main-content{
    width:100%;
    max-width:860px;
    padding:48px 64px 96px;
}
.docs-header{
    margin-bottom:40px;
}
.docs-tags-group{
    display:flex;
    gap:8px;
    margin-bottom:20px;
}
.docs-tag{
    padding:4px 12px;
    border-radius:999px;
    font-size:13px;
    font-weight:600;
    background:#eff6ff;
    color:#2563eb;
    border:1px solid rgba(37,99,235,.15);
}
.docs-tag-muted{
    color:#059669;
    background:#d1fae5;
    border-color:rgba(5,150,105,.2);
}
.docs-header h1{
    margin:0 0 12px;
    font-size:40px;
    font-weight:800;
    letter-spacing:-.02em;
    color:#0f172a;
}
.docs-header p{
    margin:0;
    font-size:16px;
    color:#64748b;
}
.docs-right-sidebar{
    width:320px;
    flex-shrink:0;
    position:sticky;
    top:64px;
    height:calc(100vh - 64px);
    padding:48px 24px 48px 0;
    overflow:hidden;
}
.docs-toc-container{
    border-left:1px solid #e2e8f0;
    padding-left:16px;
    height:100%;
    display:flex;
    flex-direction:column;
    min-height:0;
}
.docs-toc-container h4{
    margin:0 0 12px;
    font-size:13px;
    color:#0f172a;
    flex-shrink:0;
}
.docs-toc-links{
    display:grid;
    gap:6px;
    align-content:start;
    grid-auto-rows:max-content;
    flex:1 1 auto;
    min-height:0;
    overflow-y:scroll;
    overflow-x:hidden;
    scrollbar-gutter:stable;
    padding-right:6px;
    scrollbar-width:thin;
    scrollbar-color:transparent transparent;
}
.docs-toc-links::-webkit-scrollbar{
    width:6px;
}
.docs-toc-links::-webkit-scrollbar-track{
    background:transparent;
}
.docs-toc-links::-webkit-scrollbar-thumb{
    background:rgba(148,163,184,.18);
    border-radius:999px;
}
.doc-content h1,.doc-content h2,.doc-content h3,.doc-content h4{
    color:#0f172a;
}
.doc-content h1{
    font-size:32px;
    line-height:1.3;
    margin:8px 0 10px;
}
.doc-content h2{
    font-size:26px;
    line-height:1.35;
    margin:28px 0 14px;
    padding-bottom:12px;
    border-bottom:1px solid #e2e8f0;
}
.doc-content h3{
    font-size:18px;
    margin:22px 0 10px;
}
.doc-content pre{
    background:#f8fafc;
    border:1px solid #e2e8f0;
    border-radius:8px;
    margin:20px 0 32px;
    box-shadow:0 1px 2px rgba(15,23,42,.06);
    color:#0f172a;
    padding:20px;
}
.doc-content pre code{
    color:#0f172a;
    font-size:13.5px;
}
.doc-content p code,.doc-content li code,.doc-content td code,.doc-content blockquote code{
    background:#f8fafc;
    color:#0f172a;
    border:1px solid #e2e8f0;
    border-radius:6px;
    padding:3px 6px;
}
.doc-content blockquote{
    background:#fef3c7;
    border-left:4px solid #f59e0b;
    border-radius:0 8px 8px 0;
    color:#92400e;
    padding:14px 18px;
}
.table-wrapper{
    overflow-x:auto;
    margin-bottom:32px;
    border:1px solid #e2e8f0;
    border-radius:8px;
    background:#fff;
}
.table-wrapper table{
    margin:0;
}
.table-wrapper th{
    background:#f8fafc;
    color:#0f172a;
}

@media (max-width:1280px){
    .docs-right-sidebar{
        display:none;
    }
    .docs-main-content{
        max-width:850px;
        padding:48px 48px 96px;
    }
}

@media (max-width:900px){
    .docs-layout{
        flex-direction:column;
    }
    .docs-left-sidebar{
        width:100%;
        height:auto;
        position:static;
        top:auto;
        border-right:none;
        border-bottom:1px solid #e2e8f0;
        padding:14px 0;
    }
    .docs-main-content{
        padding:32px 24px 80px;
    }
    .docs-header h1,
    .doc-content h1{
        font-size:28px;
    }
}

@media (max-width:1200px){
    .stats-grid{grid-template-columns:repeat(2,1fr)}
}

@media (max-width:980px){
    .auth-shell,
    .dashboard-shell,
    .docs-shell,
    .grid-two,
    .form-grid{
        grid-template-columns:1fr;
    }
    .dashboard-body{padding:16px}
    .topbar,
    .section-head{
        flex-direction:column;
        align-items:flex-start;
    }
    .sidebar{order:2}
    .main-panel{order:1}
}

@media (max-width:680px){
    .auth-body{padding:18px}
    .docs-body{padding:16px}
    .auth-brand h1{font-size:34px}
    .section-card,
    .topbar,
    .sidebar,
    .auth-card{padding:18px}
    .data-table{
        display:block;
        overflow-x:auto;
        white-space:nowrap;
    }
    .stats-grid{grid-template-columns:1fr}
}
