@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');
:root{--ink:#17241f;--muted:#718078;--line:#dfe7e2;--paper:#fff;--canvas:#f4f7f4;--green:#0f6b4f;--mint:#dff2e9;--orange:#e8874b;--shadow:0 20px 60px #17382c12}
*{box-sizing:border-box;margin:0;padding:0}
body{font-family:'DM Sans','Microsoft YaHei',sans-serif;background:var(--canvas);color:var(--ink);line-height:1.55}
body:before{content:'';position:fixed;inset:0;pointer-events:none;background:linear-gradient(120deg,#e5f1eb 0,transparent 35%),radial-gradient(circle at 90% 8%,#f8e6d8 0,transparent 24%)}

.topbar{height:66px;padding:0 max(28px,calc((100vw - 1440px)/2));display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);background:#fffD;position:relative;z-index:1}
.brand{display:flex;align-items:center;gap:12px;letter-spacing:.08em;font-size:13px}
.brand-mark{height:28px;width:auto;display:block}
.brand strong span{color:#9aa69f;font-weight:500}
.local-badge{font-size:12px;color:var(--muted)}

.page-heading{max-width:1440px;margin:62px auto 34px;padding:0 28px;display:flex;justify-content:space-between;align-items:end;position:relative}
.eyebrow{color:var(--green);font-size:11px;letter-spacing:.18em;font-weight:700;margin-bottom:8px}
.page-heading h1{font:700 clamp(30px,4vw,52px)/1.1 'Space Grotesk';letter-spacing:-.04em}
.page-heading p:not(.eyebrow){color:var(--muted);margin-top:12px}
.workspace-label{font-size:12px;color:var(--green);border:1px solid #b7d9c8;border-radius:99px;padding:8px 14px}
.heading-actions{display:flex;align-items:center;gap:12px}
.batch-btn{background:var(--green);color:#fff}

/* ---- 两栏主布局 ---- */
.container{max-width:1440px;margin:0 auto 50px;padding:0 28px;display:grid;grid-template-columns:280px 1fr;gap:18px;align-items:start}
.container,.form-container,.context-panel,.main-area{min-width:0}

/* 左侧工作流侧边栏 */
.workflow-sidebar{position:sticky;top:20px}
.workflow-heading{background:#17382c;color:#fff;padding:26px;border-radius:18px 18px 0 0;position:relative}
.workflow-heading .eyebrow{color:#a5e2bf}
.workflow-heading h2{font:600 24px 'Space Grotesk';border:0;padding:0;margin:0}
.workflow-heading p{font-size:13px;color:#b6c9c0;margin-top:4px}
.progress-container{background:#17382c;padding:0 16px 16px;border-radius:0 0 18px 18px;position:relative}
.progress-bar{display:none}
.step-circles{display:flex;flex-direction:column;gap:4px}
.step{border:0;background:transparent;color:#a8bcb3;text-align:left;display:flex;align-items:center;gap:13px;padding:13px 10px;border-radius:12px;cursor:pointer;font:500 13px 'DM Sans';transition:.2s;width:100%}
.step small{display:block;color:#7e978c;font-size:10px;margin-top:2px}
.step-number{font:600 11px 'Space Grotesk';width:28px;height:28px;border:1px solid #547568;border-radius:50%;display:grid;place-items:center;flex-shrink:0}
.step.active{background:#2a5949;color:#fff}
.step.active .step-number{background:#b5edc9;color:#17382c;border-color:#b5edc9}
.step.completed .step-number{background:#79c99d;color:#17382c;border-color:#79c99d}

/* 右侧主区域：表单 + 信息面板 */
.main-area{display:grid;grid-template-columns:1fr 260px;gap:18px;align-items:start}

/* 表单容器 */
.form-container{background:var(--paper);border:1px solid var(--line);border-radius:18px;padding:28px 34px;box-shadow:var(--shadow);min-height:620px}
.panel-meta{display:flex;justify-content:space-between;color:var(--muted);font-size:11px;letter-spacing:.14em;margin-bottom:22px}
.panel-meta span:last-child{color:var(--green);font-weight:700;letter-spacing:0}

/* 表单顶部提示条（A2：替代阻塞式 alert 弹窗，复用既有色板，不新增配色） */
#form-alert{margin:0 0 18px;padding:12px 14px;border-radius:10px;background:#fff5e9;color:#8a5a2c;border-left:3px solid var(--orange);font-size:13px;white-space:pre-line}
#form-alert[hidden]{display:none}

/* 步骤内容 */
.step-content{display:none;animation:rise .35s ease}
.step-content.active{display:block}
@keyframes rise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
h2{font:600 27px 'Space Grotesk';letter-spacing:-.03em;margin-bottom:24px}

/* 表单元素 */
.form-group{margin-bottom:21px}
label{display:block;font-weight:700;font-size:13px;margin-bottom:8px}
input,textarea,select{width:100%;padding:13px 14px;border:1px solid var(--line);border-radius:10px;background:#fbfdfb;color:var(--ink);font:inherit;transition:.2s}
textarea{min-height:100px;resize:vertical}
input:focus,textarea:focus,select:focus{outline:0;border-color:#72b998;box-shadow:0 0 0 4px #72b99822}
small{font-size:11px;color:var(--muted);display:block;margin-top:6px}
.instruction{color:var(--muted);font-size:14px}
.system-link{display:block;background:#f1f7f3;color:var(--green);padding:12px;border-radius:9px;word-break:break-all;font-size:13px;margin-top:9px}
.step-link{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var(--green);text-decoration:none;margin-top:-12px;margin-bottom:20px;padding:7px 12px;background:#f1f7f3;border-radius:9px;word-break:break-all;transition:.2s}
.step-link:hover{background:#e6f3eb;text-decoration:underline}
.step-link::before{content:'↗';font-size:12px;opacity:.8}
.security-callout{padding:14px;background:#fff5e9;color:#8a5a2c;border-left:3px solid var(--orange);border-radius:8px;font-size:13px}
.checkbox-group{display:flex;align-items:center;gap:10px;padding:12px 14px;background:#f5faf6;border-radius:10px}
.checkbox-group input{width:18px;height:18px;accent-color:var(--green)}
.checkbox-group label{margin:0}
.task-list{list-style:none}
.task-list li{padding:13px 15px;border:1px solid var(--line);border-radius:9px;margin:8px 0;display:flex;gap:10px;align-items:center}
.task-list input{width:17px;height:17px;accent-color:var(--green)}
.password-container{display:grid;grid-template-columns:1fr auto auto;gap:8px}
.password-container input{min-width:0}

/* 按钮 */
.btn{border:0;border-radius:9px;padding:12px 17px;font:700 13px 'DM Sans';cursor:pointer;transition:.2s}
.btn:hover{transform:translateY(-1px);filter:brightness(.97)}
.next-btn,.submit-btn{background:var(--green);color:#fff}
.prev-btn{background:#edf2ee;color:var(--ink)}
.system-btn{background:#17382c;color:#fff}
.password-btn{background:#e6f3eb;color:var(--green)}
#copy-password,#copy-account-info,#copy-final-info{background:#eef1ef;color:#5b6c63}
.buttons{display:flex;justify-content:space-between;gap:10px;margin-top:30px}
.buttons .next-btn,.buttons .submit-btn{margin-left:auto}

/* 右侧信息面板 */
.context-panel{display:flex;flex-direction:column;gap:14px;position:sticky;top:20px}
.overview,.help-card,.privacy-note{background:#fff;border:1px solid var(--line);border-radius:16px;padding:22px;box-shadow:0 10px 30px #17382c08}
.overview h3,.help-card h3{font:600 18px 'Space Grotesk';margin-bottom:14px}
.avatar{width:48px;height:48px;border-radius:14px;background:var(--mint);color:var(--green);display:grid;place-items:center;font-weight:700;margin-bottom:12px}
.overview strong{font-size:14px}
.overview p{color:var(--muted);font-size:12px}
.overview-divider{height:1px;background:var(--line);margin:18px 0}
.progress-label{display:flex;justify-content:space-between;font-size:12px;margin-bottom:7px}
.progress-label strong{color:var(--green)}
.meter{height:6px;border-radius:6px;background:#e8eeea;overflow:hidden}
.meter div{height:100%;background:var(--green);width:0;transition:.3s}
.tip-label{font-size:11px;color:var(--orange);font-weight:700;letter-spacing:.12em}
.help-card p,.privacy-note p{font-size:12px;color:var(--muted)}
.privacy-note{background:#f1f7f3;border-color:#d3e8da}
.privacy-note strong{font-size:12px;color:var(--green)}

/* 批量创建 */
.batch-panel{background:#fff;border:1px solid var(--line);border-radius:16px;padding:26px;box-shadow:var(--shadow);margin-bottom:18px}
.batch-panel[hidden]{display:none}
.batch-head{display:flex;justify-content:space-between;gap:20px;border-bottom:1px solid var(--line);padding-bottom:18px}
.batch-head h2{margin:0}
.batch-head p:not(.eyebrow){color:var(--muted);font-size:13px}
.batch-toolbar{display:flex;gap:10px;margin:18px 0}
.account-row{display:grid;grid-template-columns:1fr 1.4fr 130px 90px;gap:10px;align-items:center;margin-bottom:10px}
.account-row button{height:44px}
.batch-panel>#start-batch{margin-top:14px}
.account-row input{min-width:0}

/* 完成页面 */
.success-message{text-align:center;padding:35px 0}
.account-selector{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 12px}
.account-chip{display:flex;align-items:center;gap:7px;background:#eef7f1;border:1px solid #cce5d4;padding:7px 10px;border-radius:8px;font-size:12px;color:var(--green)}
.account-chip input{width:auto}
.account-chip span{font-weight:700}
.success-icon{width:68px;height:68px;background:var(--mint);color:var(--green);border-radius:20px;display:grid;place-items:center;font-size:34px;margin:0 auto 18px}
.summary-container{background:#f5faf6;padding:20px;border-radius:12px;text-align:left;margin:20px 0}
.summary-item{display:flex;margin:9px 0;font-size:13px}
.summary-label{font-weight:700;min-width:100px}
.status-complete{color:var(--green);font-weight:700}

/* 通知 */
.copy-success,#notification{position:fixed;right:24px;bottom:24px;background:#17382c;color:#fff;padding:13px 18px;border-radius:10px;z-index:10;font-size:13px}
.error{border-color:#d9534f!important}
.error-message{color:#c64742;font-size:12px;margin-top:5px}

/* 页脚 */
footer{max-width:1440px;margin:0 auto;padding:0 28px 30px;color:#829089;font-size:10px;letter-spacing:.14em}
footer span{float:right;letter-spacing:0}

/* 响应式 */
@media(max-width:1100px){
    .main-area{grid-template-columns:1fr}
    .context-panel{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,1fr);position:static}
}
@media(max-width:700px){
    .topbar{padding:0 18px}
    .local-badge,.workspace-label{display:none}
    .page-heading{margin:35px auto 25px;padding:0 18px}
    .container{display:block;padding:0 14px}
    .progress-container{margin-bottom:14px}
    .step-circles{display:grid;grid-template-columns:repeat(4,1fr)}
    .step{justify-content:center}
    .step span:not(.step-number){display:none}
    .form-container{padding:22px 18px}
    .context-panel{display:block;margin-top:14px}
    .context-panel section{margin-bottom:14px}
    .password-container{grid-template-columns:1fr 1fr}
    .password-container input{grid-column:1/-1}
    .buttons{flex-direction:column-reverse}
    .buttons .btn{width:100%}
    footer{padding:0 18px 25px}
    footer span{float:none;display:block;margin-top:8px}
    .heading-actions{display:block}
    .batch-head{display:block}
    .batch-head button{margin-top:15px}
    .account-row{grid-template-columns:1fr 1fr}
    .account-row input:nth-child(3){grid-column:1/-1}
    .account-row button{grid-column:1/-1}
}

/* ---- 多账号模式（v2.0-batch）---- */
#batch-mode{display:none}
.form-container.batch-on > .panel-meta{display:none}
.form-container.batch-on .step-content{display:none}
.form-container.batch-on #batch-mode{display:block}
.batch-table-head,.batch-account-row{display:grid;grid-template-columns:1.2fr 1.6fr 1.2fr 150px 130px 150px;gap:10px;align-items:center}
.batch-table-head{padding:0 12px 8px;font-size:11px;color:var(--muted);letter-spacing:.08em}
.batch-account-row{margin-bottom:10px;padding:0 12px}
.batch-account-row input{min-width:0;font-size:13px;padding:10px 12px}
.batch-account-row button{padding:9px 10px;font-size:12px}
.batch-toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:16px 0}
.batch-fill{display:flex;align-items:center;gap:6px;background:#f5faf6;border:1px solid var(--line);padding:6px 10px;border-radius:10px}
.batch-fill label{margin:0;font-size:12px}
.batch-fill input{padding:8px 10px;font-size:12px}
.batch-fill input[type="date"]{width:150px}
.batch-fill input[type="text"]{width:140px}
.batch-paste{background:#fbfdfb;border:1px solid var(--line);border-radius:12px;padding:14px;margin-bottom:14px}
.batch-paste label{font-size:12px;margin-bottom:6px}
.batch-paste textarea{min-height:90px;font-size:12px}
.batch-paste-actions{display:flex;gap:10px;margin-top:10px}
.batch-step-head{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:14px}
.batch-step-head h2{margin:0}
.batch-toolbar-inline{display:flex;gap:8px;flex-wrap:wrap}
.batch-toolbar-inline .btn{padding:9px 12px;font-size:12px}
.batch-matrix-head,.batch-matrix-row{display:grid;grid-template-columns:1fr 1.4fr 70px;gap:10px;align-items:center;padding:10px 12px;border-bottom:1px solid var(--line)}
.batch-matrix-head{font-size:11px;color:var(--muted);letter-spacing:.08em}
.batch-matrix-row:hover{background:#fafcfb}
.batch-matrix-name{font-size:12px;font-weight:700;word-break:break-all}
.batch-group-cell{display:flex;gap:8px;flex-wrap:wrap}
.batch-chip{display:flex;align-items:center;gap:5px;background:#eef7f1;border:1px solid #cce5d4;padding:5px 8px;border-radius:8px;font-size:11px;color:var(--green);margin:0;white-space:nowrap}
.batch-chip input{width:auto;margin:0}
.batch-placeholder{font-size:12px;color:var(--muted)}
.batch-done-cell{text-align:center}
.batch-done-cell input{width:18px;height:18px;accent-color:var(--green)}
.step-badge{margin-left:auto;font-size:11px;color:#a5e2bf;background:#2a5949;padding:2px 8px;border-radius:99px;flex-shrink:0}
.step.active .step-badge{background:#b5edc9;color:#17382c}
@media(max-width:700px){
    .batch-table-head{display:none}
    .batch-account-row{grid-template-columns:1fr 1fr;padding:10px 12px;border:1px solid var(--line);border-radius:10px}
    .batch-account-row input[data-field="email"],.batch-account-row input[data-field="hireDate"]{grid-column:1/-1}
    .batch-matrix-head{display:none}
    .batch-matrix-row{grid-template-columns:1fr 70px;padding:10px}
    .batch-matrix-row .batch-group-cell,.batch-matrix-row select,.batch-matrix-row .batch-placeholder{grid-column:1/-1}
}

/* ---- A4 打印模板 ---- */
#print-a4{display:none}
.print-a4-page{display:none}
@media print{
    .topbar,.page-heading,.container,footer,#notification,#form-alert,.copy-success{display:none!important}
    #print-a4{display:block!important;position:absolute;top:0;left:0;width:100%}
    .print-a4-page{
        display:flex!important;flex-direction:column;justify-content:space-between;
        width:210mm;min-height:277mm;padding:20mm 25mm;margin:0 auto;
        box-sizing:border-box;background:#fff;color:var(--ink);
        page-break-after:always;font-size:14px;line-height:1.6
    }
    .print-a4-page:last-child{page-break-after:auto}
    .print-header{text-align:center;border-bottom:2px solid var(--green);padding-bottom:18mm;margin-bottom:18mm}
    .print-header .print-logo{height:48px;width:auto;display:block;margin:0 auto 8px}
    .print-header h1{font:700 22px 'Space Grotesk';margin:0;letter-spacing:.05em}
    .print-body{flex:1}
    .print-row{display:flex;align-items:baseline;padding:10px 0;border-bottom:1px solid var(--line)}
    .print-row span{min-width:120px;color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:.08em}
    .print-row strong{flex:1;font-size:16px;font-weight:700;word-break:break-all}
    .print-row.print-status strong{color:var(--green)}
    .print-groups{margin-top:18mm}
    .print-groups h3{font:700 14px 'Space Grotesk';margin:0 0 10px;color:var(--green)}
    .print-groups ul{margin:0;padding-left:18px}
    .print-groups li{margin:4px 0}
    .print-footer{margin-top:18mm;padding-top:10mm;border-top:1px solid var(--line);color:var(--muted);font-size:11px;display:flex;justify-content:space-between}
    @page{size:A4;margin:0}
}