:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;color:#172033;background:#f3f6fb}
*{box-sizing:border-box}body{margin:0}.page{min-height:100vh;padding:24px}
h1,h2,p{margin-top:0}a{color:#1769e0;text-decoration:none}
.mobile-card,.login-card{max-width:620px;margin:30px auto;background:#fff;border-radius:20px;padding:26px;box-shadow:0 10px 35px rgba(22,43,77,.1)}
.login-card{max-width:460px}
label{display:block;font-weight:700;margin:15px 0 7px}
input,textarea{width:100%;padding:14px;border:1px solid #cbd5e1;border-radius:10px;font-size:16px;background:#fff}
textarea{min-height:100px;resize:vertical}
button,.button-link{border:0;border-radius:10px;padding:12px 18px;font-size:15px;font-weight:700;cursor:pointer;display:inline-block;text-align:center}
.primary{background:#1769e0;color:#fff}.secondary{background:#e9eef7;color:#172033}.danger-button{background:#c92a2a;color:#fff}.disabled{background:#cbd5e1;color:#667085}
.large{width:100%;padding:15px;margin-top:16px}
.muted{color:#667085}.small{font-size:13px}.eyebrow{font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:#667085;margin-bottom:5px}
.alert{padding:12px 14px;border-radius:10px;margin:14px 0}.success{background:#e8f7ee;color:#17683a}.error,.danger{background:#fff0f0;color:#a61b1b}
.device-heading,.admin-header,.section-title{display:flex;align-items:center;justify-content:space-between;gap:16px}
.badge{background:#edf4ff;color:#1769e0;padding:7px 10px;border-radius:999px;font-size:13px}
.state-box{border:1px solid #d9e2ef;border-radius:14px;padding:18px;margin-top:18px}.ready{background:#f7fbff}.cooling{background:#fffaf0}
.copy-line{display:flex;gap:8px}.copy-line input{flex:1}.copy-line button{white-space:nowrap;background:#e9eef7}
.countdown{font-size:28px;font-weight:800;text-align:center;padding:20px 0;color:#1769e0}
.fail-panel{margin-top:18px}.fail-panel summary{cursor:pointer;color:#a61b1b;font-weight:700}.text-link{display:block;margin-top:20px;text-align:center}
.admin-shell{max-width:1500px;margin:auto}.admin-header{margin-bottom:20px}
.stats-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:14px;margin:18px 0}
.stat{background:#fff;border-radius:14px;padding:18px;box-shadow:0 5px 20px rgba(22,43,77,.06)}.stat strong{display:block;font-size:28px}.stat span{color:#667085}
.admin-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}.panel{background:#fff;border-radius:14px;padding:18px;box-shadow:0 5px 20px rgba(22,43,77,.06)}
.panel.wide{margin-top:16px}.qr-panel img{width:190px;max-width:100%;display:block;margin:auto}.mono{font-family:Consolas,monospace;word-break:break-all}
.button-stack{display:grid;gap:10px}.checkbox-line{font-weight:400;display:flex;align-items:center;gap:8px}.checkbox-line input{width:auto}
.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;font-size:14px}th,td{padding:10px;border-bottom:1px solid #e6ebf2;text-align:left;white-space:nowrap}th{background:#f7f9fc;position:sticky;top:0}
.inline-form{display:flex;gap:6px;align-items:center}.inline-form input{width:130px;padding:8px}.small-button{padding:8px 10px;background:#e9eef7;color:#172033}
.filters{display:flex;gap:12px;flex-wrap:wrap}
@media(max-width:1000px){.admin-grid{grid-template-columns:1fr 1fr}.stats-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:650px){.page{padding:12px}.mobile-card{margin:8px auto;padding:18px}.copy-line{flex-direction:column}.admin-grid{grid-template-columns:1fr}.stats-grid{grid-template-columns:1fr 1fr}.admin-header{align-items:flex-start}.countdown{font-size:23px}}


.row-actions{
  display:flex;
  align-items:center;
  gap:6px;
}

.row-actions form{
  margin:0;
}

.delete-button{
  padding:8px 12px;
  border:0;
  border-radius:8px;
  background:#dc2626;
  color:#ffffff;
  font-weight:700;
  cursor:pointer;
}

.delete-button:hover{
  background:#b91c1c;
}

.status-badge{
  display:inline-block;
  min-width:66px;
  padding:6px 10px;
  border-radius:999px;
  text-align:center;
  font-weight:700;
  font-size:14px;
}

.status-pending{
  color:#92400e;
  background:#fef3c7;
}

.status-processing{
  color:#1d4ed8;
  background:#dbeafe;
}

.status-completed{
  color:#166534;
  background:#dcfce7;
}

.status-failed{
  color:#b91c1c;
  background:#fee2e2;
}

.twofa-secret-cell{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:220px;
}

.twofa-secret-cell span{
  max-width:260px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-family:Consolas, monospace;
}

.copy-2fa-button{
  flex-shrink:0;
  padding:7px 10px;
  border:0;
  border-radius:8px;
  background:#e9eef7;
  color:#1769e0;
  font-weight:700;
  cursor:pointer;
}

.copy-2fa-button:hover{
  background:#dbe7fa;
}

.twofa-site-button{
  display:inline-block;
  white-space:nowrap;
  padding:9px 13px;
  border-radius:9px;
  background:#ef4444;
  color:#ffffff;
  font-weight:700;
  text-decoration:none;
}

.twofa-site-button:hover{
  background:#dc2626;
  color:#ffffff;
}

.twofa-copy-source{
  position:fixed !important;
  left:-9999px !important;
  top:0 !important;
  width:1px !important;
  height:1px !important;
  opacity:0 !important;
  pointer-events:none !important;
}

.copy-2fa-button.copied{
  background:#16a34a;
  color:#ffffff;
}


.bulk-delete-panel{
  border:1px solid #fecaca;
}

.bulk-delete-form{
  margin-top:12px;
}

.bulk-delete-controls{
  display:flex;
  align-items:flex-end;
  gap:18px;
  flex-wrap:wrap;
}

.bulk-delete-controls > div{
  min-width:280px;
}

.bulk-delete-controls select{
  width:100%;
  min-width:280px;
  padding:13px 14px;
  border:1px solid #cbd5e1;
  border-radius:10px;
  background:#ffffff;
  color:#172033;
  font-size:15px;
}

.bulk-confirm{
  margin:0 0 10px;
}

.bulk-delete-button{
  margin-bottom:4px;
  padding:13px 22px;
  border:0;
  border-radius:10px;
  background:#dc2626;
  color:#ffffff;
  font-size:15px;
  font-weight:700;
  cursor:pointer;
}

.bulk-delete-button:hover{
  background:#b91c1c;
}

@media(max-width:650px){
  .bulk-delete-controls{
    display:block;
  }

  .bulk-delete-controls > div{
    min-width:0;
  }

  .bulk-delete-controls select{
    min-width:0;
  }

  .bulk-confirm{
    margin:16px 0;
  }

  .bulk-delete-button{
    width:100%;
  }
}

.import-format-help{
  line-height:1.8;
}

.import-format-help code{
  display:inline-block;
  margin:3px 2px;
  padding:3px 7px;
  border-radius:6px;
  background:#f1f5f9;
  color:#b42318;
  font-family:Consolas, monospace;
  font-size:13px;
}


/* device-delete-feature */

.copy-email-column,
.copy-email-cell{
  min-width:105px;
  text-align:center;
}

.copy-email-button{
  border:0;
  border-radius:9px;
  padding:8px 12px;
  background:#2563eb;
  color:#fff;
  font-weight:700;
  cursor:pointer;
  white-space:nowrap;
}

.copy-email-button:hover{
  background:#1d4ed8;
}

.copy-email-button:disabled{
  opacity:.7;
}

.device-bulk-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin:12px 0 15px;
  padding:13px 15px;
  border:1px solid #e2e8f0;
  border-radius:12px;
  background:#f8fafc;
}

.device-bulk-toolbar form{
  display:flex;
  align-items:center;
  gap:12px;
  margin:0;
}

.bulk-device-delete-button,
.device-delete-button{
  border:0;
  border-radius:9px;
  background:#dc2626;
  color:#fff;
  font-weight:700;
  cursor:pointer;
  white-space:nowrap;
}

.bulk-device-delete-button{
  padding:10px 16px;
}

.device-delete-button{
  padding:8px 13px;
}

.bulk-device-delete-button:hover,
.device-delete-button:hover{
  background:#b91c1c;
}

.bulk-device-delete-button:disabled{
  background:#cbd5e1;
  color:#64748b;
  cursor:not-allowed;
}

.selected-device-count{
  color:#475569;
  font-weight:700;
}

.device-delete-help{
  color:#64748b;
  font-size:14px;
}

.device-select-column,
.device-select-cell{
  width:48px;
  min-width:48px;
  text-align:center;
}

.device-delete-column,
.device-delete-cell{
  width:90px;
  min-width:90px;
  text-align:center;
}

.device-select-checkbox,
#select-all-devices{
  width:18px;
  height:18px;
  cursor:pointer;
}

.device-cannot-delete{
  color:#94a3b8;
  font-size:13px;
  white-space:nowrap;
}

.inline-form{
  display:inline;
  margin:0;
}

@media (max-width:760px){
  .device-bulk-toolbar{
    align-items:flex-start;
    flex-direction:column;
  }
}

/* login-module-feature */
.module-tabs{display:flex;gap:10px;flex-wrap:wrap;margin:10px 0}
.module-tabs a{display:inline-block;padding:10px 17px;border:2px solid #ef4444;border-radius:8px;color:#ef4444;font-size:18px;font-weight:800;background:#fff}
.module-tabs a.active{background:#ef4444;color:#fff}
.login-admin-grid{align-items:stretch}
.login-help-text{line-height:1.8}
.login-bulk-panel select{width:100%;padding:13px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;font-size:15px}
.login-task-table th,.login-task-table td{vertical-align:top}
.login-qr-cell{min-width:130px;text-align:center}
.login-qr-cell img{display:block;width:104px;height:104px;margin:0 auto 7px;border:1px solid #e2e8f0;border-radius:8px}
.login-qr-cell .small-button{display:block;width:100%;margin-top:5px;padding:7px 8px}
.login-value-row{display:flex;align-items:center;gap:7px;min-width:150px;max-width:280px}
.login-value-row span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:210px}
.login-value-row button,.login-more-details button{flex-shrink:0;padding:6px 8px;border-radius:7px;background:#e9eef7;color:#1769e0}
.login-more-details{min-width:105px;max-width:420px}
.login-more-details summary{cursor:pointer;font-weight:700;color:#1769e0}
.login-more-details div{display:flex;align-items:flex-start;gap:6px;margin-top:9px;white-space:normal}
.login-more-details span{word-break:break-all;white-space:normal;max-width:300px}
.login-row-actions{display:grid;gap:6px;min-width:115px}
.login-row-actions form{margin:0}
.login-row-actions button{width:100%}
.login-task-public{max-width:680px}
.login-task-public .secret-row{margin-top:15px}
.missing-value{padding:14px;border:1px dashed #cbd5e1;border-radius:10px;color:#667085;background:#f8fafc}
@media(max-width:650px){.module-tabs a{font-size:16px;padding:9px 13px}.login-stats-grid{grid-template-columns:1fr 1fr}}

/* admin-full-width-layout-start */

/* 电脑管理后台使用浏览器可用宽度 */
.admin-shell{
  width:100%;
  max-width:none;
  margin-left:auto;
  margin-right:auto;
}

/* 大屏幕减少左右留白 */
@media (min-width:1100px){
  .page{
    padding-left:16px;
    padding-right:16px;
  }
}

/* 登录资料字段较多，扩大表格宽度 */
.login-task-table{
  width:100%;
  min-width:1650px;
}

/* 顶部四个功能面板充分利用宽度 */
.login-admin-grid{
  width:100%;
}

/* admin-full-width-layout-end */

/* admin-pagination-start */

.admin-pagination{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap:10px;
  padding:20px 12px 8px;
}

.pagination-total{
  color:#475569;
  white-space:nowrap;
}

.pagination-size-form,
.pagination-jump-form{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0;
}

.pagination-size-form select{
  width:88px;
  min-width:88px;
  height:44px;
  margin:0;
  padding:0 12px;
  border:1px solid #cbd5e1;
  border-radius:9px;
  background:#fff;
  font-size:16px;
  font-weight:700;
}

.pagination-pages{
  display:flex;
  align-items:center;
  gap:7px;
}

.pagination-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:44px;
  height:44px;
  padding:0 12px;
  border:1px solid #dbe3ef;
  border-radius:9px;
  background:#fff;
  color:#0f172a;
  font-weight:700;
  text-decoration:none;
  box-sizing:border-box;
}

.pagination-button:hover{
  border-color:#2563eb;
  color:#2563eb;
}

.pagination-button.active{
  border-color:#6366f1;
  background:#6366f1;
  color:#fff;
}

.pagination-button.disabled{
  background:#f8fafc;
  color:#cbd5e1;
  cursor:not-allowed;
}

.pagination-jump-form input[type="number"]{
  width:68px;
  height:44px;
  margin:0;
  padding:0 8px;
  text-align:center;
  border:1px solid #cbd5e1;
  border-radius:9px;
  box-sizing:border-box;
}

.pagination-jump-form button{
  height:44px;
  margin:0;
  padding:0 14px;
  border:0;
  border-radius:9px;
  background:#e8eef8;
  color:#0f172a;
  font-weight:700;
  cursor:pointer;
}

@media (max-width:760px){
  .admin-pagination{
    justify-content:flex-start;
  }
}

/* admin-pagination-end */
