* { box-sizing: border-box; }
:root { --blue:#2563eb; --blue2:#1d4ed8; --dark:#0f172a; --muted:#667085; --line:#e8edf6; --bg:#f5f7fb; }
body { margin:0; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",Arial,sans-serif; background:var(--bg); color:#172033; }
.hidden { display:none !important; }
.login-page { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px; background:linear-gradient(135deg,#0f172a,#1e293b); }
.login-card { width:min(420px,100%); background:#fff; border-radius:22px; padding:34px; box-shadow:0 24px 70px rgba(0,0,0,.28); }
.login-logo { font-size:28px; font-weight:900; letter-spacing:.2px; color:#0f172a; margin-bottom:22px; }
.login-title { font-size:22px; font-weight:800; margin-bottom:8px; }
.login-desc,.login-hint { color:var(--muted); font-size:13px; line-height:1.6; }
.login-card form { display:grid; gap:12px; margin-top:18px; }
.login-card input { height:46px; }
.login-card button { height:46px; }
.login-error { margin-top:12px; color:#b42318; font-size:13px; min-height:18px; }
a { color:var(--blue); text-decoration:none; }
.shell { min-height:100vh; display:flex; }
.sidebar { position:fixed; inset:0 auto 0 0; width:236px; background:#101828; color:#fff; padding:22px 16px; display:flex; flex-direction:column; z-index:10; }
.side-brand { padding:6px 8px 22px; border-bottom:1px solid rgba(255,255,255,.10); margin-bottom:18px; }
.side-brand b { display:block; font-size:22px; }
.side-brand span { display:inline-flex; margin-top:8px; color:#cbd5e1; font-size:12px; }
.side-menu { display:grid; gap:8px; }
.nav-item,.logout-btn { width:100%; height:42px; border:0; border-radius:12px; background:transparent; color:#dbeafe; text-align:left; padding:0 14px; cursor:pointer; font-weight:700; }
.nav-item:hover,.logout-btn:hover { background:rgba(255,255,255,.08); }
.nav-item.active { background:var(--blue); color:#fff; }
.logout-btn { margin-top:auto; color:#fecaca; }
.main { flex:1; margin-left:236px; padding:24px; min-width:0; }
.topbar { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:22px 24px; border-radius:18px; background:linear-gradient(135deg,#111827,#1f2937); color:#fff; margin-bottom:18px; }
.brand { font-size:24px; font-weight:800; }
.sub { opacity:.78; margin-top:6px; font-size:14px; }
.top-actions { display:flex; align-items:center; gap:10px; }
.version { padding:8px 12px; border-radius:999px; background:rgba(255,255,255,.12); }
.view { display:none; }
.view.active { display:block; }
.card { background:#fff; border:1px solid var(--line); border-radius:16px; padding:18px; margin-bottom:18px; box-shadow:0 8px 24px rgba(17,24,39,.04); }
h2 { margin:0 0 14px; font-size:19px; }
.grid { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; }
.stats-grid { grid-template-columns:repeat(4,1fr); }
.stat span { display:block; color:var(--muted); font-size:13px; margin-bottom:8px; }
.stat b { font-size:28px; }
.row { display:flex; gap:10px; align-items:center; }
.search-row { flex-wrap:wrap; }
.search-row input { min-width:180px; flex:1 1 180px; }
input { height:38px; border:1px solid #d0d5dd; border-radius:10px; padding:0 12px; outline:none; background:#fff; color:#111827; }
input:focus { border-color:var(--blue); box-shadow:0 0 0 3px rgba(37,99,235,.08); }
button { height:38px; border:none; border-radius:10px; background:var(--blue); color:#fff; padding:0 16px; cursor:pointer; font-weight:700; }
button:hover { background:var(--blue2); }
button:disabled { background:#98a2b3; cursor:not-allowed; }
.hint { color:var(--muted); font-size:13px; line-height:1.6; margin:10px 0 0; }
.section-head { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.section-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.table-wrap { overflow-x:auto; }
table { width:100%; border-collapse:collapse; font-size:13px; }
th,td { text-align:left; border-bottom:1px solid #eef2f7; padding:10px 8px; white-space:nowrap; }
th { color:var(--muted); background:#fafbfe; }
.status { display:inline-flex; align-items:center; justify-content:center; min-width:58px; padding:4px 8px; border-radius:999px; font-size:12px; }
.status.pending { background:#fff7ed; color:#c2410c; }
.status.running { background:#eff6ff; color:#1d4ed8; }
.status.done { background:#ecfdf3; color:#027a48; }
.status.failed { background:#fef3f2; color:#b42318; }
.status.canceled { background:#f2f4f7; color:#475467; }
.license-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; }
.license-grid div { border:1px solid var(--line); background:#fbfcff; border-radius:12px; padding:12px; min-width:0; }
.license-grid span { display:block; color:var(--muted); font-size:12px; margin-bottom:7px; }
.license-grid b { display:block; font-size:14px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.license-badge { display:inline-flex!important; width:fit-content; max-width:100%; padding:5px 10px; border-radius:999px; font-size:13px!important; }
.license-badge.active { background:#ecfdf3; color:#027a48; }
.license-badge.grace { background:#fff7ed; color:#c2410c; }
.license-badge.disabled { background:#f2f4f7; color:#475467; }
.license-badge.bad,.license-badge.unknown { background:#fef3f2; color:#b42318; }
.license-limits { display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; }
.license-limits span { display:inline-flex; align-items:center; gap:6px; max-width:100%; border:1px solid #eef2f7; background:#fafbfe; border-radius:999px; padding:6px 10px; font-size:12px; }
.license-limits em { color:var(--muted); font-style:normal; flex:0 0 auto; }
.license-limits b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:340px; }
.format-box { border:1px solid #dbeafe; background:#eff6ff; border-radius:14px; padding:12px 14px; margin-bottom:14px; }
.format-title { font-weight:800; color:#1d4ed8; margin-bottom:8px; }
.format-grid { display:grid; grid-template-columns:repeat(6,1fr); gap:8px; }
.format-grid span { background:#fff; border:1px solid #bfdbfe; border-radius:10px; padding:8px 10px; color:#1e3a8a; font-size:13px; font-weight:700; }
.upload-grid { display:grid; grid-template-columns:minmax(420px,2fr) minmax(220px,.9fr); gap:14px; align-items:stretch; margin-bottom:14px; }
.file-picker { position:relative; min-height:82px; display:flex; flex-direction:row; align-items:center; gap:14px; border:1px dashed #9db7f5; background:linear-gradient(180deg,#f8fbff,#eef5ff); border-radius:16px; padding:16px; cursor:pointer; transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease; }
.file-picker:hover { border-color:var(--blue); box-shadow:0 10px 24px rgba(37,99,235,.10); transform:translateY(-1px); }
.file-picker input[type="file"] { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.file-icon { width:44px; height:44px; border-radius:14px; display:inline-flex; align-items:center; justify-content:center; background:#dbeafe; font-size:22px; }
.file-meta { min-width:0; flex:1; display:flex; flex-direction:column; gap:5px; }
.file-meta b { color:#172033; font-size:16px; }
.file-meta em { color:var(--muted); font-style:normal; font-size:13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.file-action { height:34px; padding:0 14px; border-radius:10px; display:inline-flex; align-items:center; justify-content:center; color:#fff; background:var(--blue); font-weight:800; flex:0 0 auto; }
.country-field { min-height:82px; display:flex; flex-direction:column; gap:7px; justify-content:center; border:1px solid #e5eaf3; background:#fbfcff; border-radius:16px; padding:14px; color:#475467; font-size:13px; }
.country-field input { height:42px; }
.button-row { display:flex; gap:10px; align-items:center; margin-bottom:12px; }
.upload-status { display:block; border:1px solid var(--line); background:#fbfcff; border-radius:14px; padding:12px 14px; margin:8px 0 14px; }
.upload-status.is-idle { color:var(--muted); }
.upload-status.is-uploading { border-color:#bfdbfe; background:#eff6ff; }
.upload-status.is-done { border-color:#bbf7d0; background:#f0fdf4; }
.upload-status.is-error { border-color:#fecaca; background:#fef2f2; }
.upload-status-head { display:flex; align-items:center; justify-content:space-between; gap:12px; font-size:13px; margin-bottom:8px; }
.upload-status-head span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.upload-status-head strong { color:#1d4ed8; font-variant-numeric:tabular-nums; flex:0 0 auto; }
.progress-bar { height:8px; width:100%; overflow:hidden; border-radius:999px; background:#e5eaf3; }
.progress-bar span { display:block; height:100%; width:0%; border-radius:inherit; background:linear-gradient(90deg,#2563eb,#60a5fa); transition:width .22s ease; }
.upload-bar { height:10px; }
.upload-status.is-done .progress-bar span { background:linear-gradient(90deg,#16a34a,#86efac); }
.upload-status.is-error .progress-bar span { background:linear-gradient(90deg,#dc2626,#fca5a5); }
.preview-box { margin-top:12px; }
.table-wrap.mini { max-height:320px; border:1px solid #eef2f7; border-radius:12px; }
.jobs-table { min-width:1160px; table-layout:fixed; }
.jobs-table .col-job { width:190px; } .jobs-table .col-file { width:300px; } .jobs-table .col-status { width:90px; } .jobs-table .col-progress { width:190px; } .jobs-table .col-count { width:82px; } .jobs-table .col-result { width:250px; } .jobs-table .col-action { width:86px; }
.jobs-table td { vertical-align:middle; }
.cell-ellipsis { display:block; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.num-cell { font-variant-numeric:tabular-nums; text-align:right; overflow:hidden; text-overflow:ellipsis; }
.progress-cell { padding-right:14px; }
.progress-line { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:6px; line-height:1; }
.progress-line b { color:#1d4ed8; font-size:13px; font-variant-numeric:tabular-nums; }
.progress-line em { color:var(--muted); font-style:normal; font-size:12px; font-variant-numeric:tabular-nums; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.result-actions { display:flex; align-items:center; gap:4px; flex-wrap:nowrap; overflow:hidden; }
.linkbtn { height:28px; padding:0 8px; border-radius:8px; background:#eff6ff; color:#1d4ed8; font-size:12px; margin:2px 2px 2px 0; white-space:nowrap; }
.linkbtn:hover { background:#dbeafe; }
button.small { height:28px; padding:0 10px; font-size:12px; }
button.danger { background:#dc2626; }
button.danger:hover { background:#b91c1c; }
button.secondary { background:#eef2f7; color:#344054; }
button.secondary:hover { background:#e4e7ec; }
.action-cell,td.links { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
@media (max-width:1100px){ .stats-grid{grid-template-columns:repeat(2,1fr);} .license-grid{grid-template-columns:repeat(2,1fr);} }
@media (max-width:900px){ .sidebar{position:relative;width:100%;height:auto;inset:auto;} .shell{display:block;} .main{margin-left:0;padding:14px;} .topbar{align-items:flex-start;flex-direction:column;} .grid,.stats-grid,.license-grid,.format-grid,.upload-grid{grid-template-columns:1fr;} .row{flex-direction:column;align-items:stretch;} .button-row{flex-direction:column;align-items:stretch;} .file-picker{align-items:flex-start;} .file-action{margin-left:auto;} }

.license-key-panel { margin-top:14px; border:1px solid #dbeafe; background:#f8fbff; border-radius:14px; padding:14px; }
.license-key-title { font-weight:800; color:#1d4ed8; margin-bottom:10px; }
.license-key-form { display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.key-prefix { height:42px; min-width:56px; display:inline-flex; align-items:center; justify-content:center; border:1px solid #bfdbfe; background:#eff6ff; color:#1d4ed8; border-radius:10px; font-weight:900; letter-spacing:.08em; }
.key-sep { color:#667085; font-weight:900; }
.key-segment { width:118px; height:42px; text-align:center; text-transform:uppercase; font-weight:800; letter-spacing:.06em; font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace; }
.license-key-form button { height:42px; }
@media (max-width:900px){ .license-key-form{align-items:stretch;} .key-segment{width:calc(50% - 18px);} .license-key-form button{width:100%;} }

.modal-mask { position:fixed; inset:0; z-index:1000; display:flex; align-items:center; justify-content:center; background:rgba(15,23,42,.55); padding:20px; }
.modal-card { width:min(720px,100%); background:#fff; border-radius:18px; box-shadow:0 24px 70px rgba(15,23,42,.35); padding:18px; }
.modal-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.modal-head h3 { margin:0; font-size:18px; }
.modal-close { width:36px; height:36px; padding:0; border-radius:999px; background:#eef2f7; color:#344054; font-size:22px; line-height:1; }
.modal-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:16px; }
.modal-key-panel { margin-top:0; }
@media (max-width:900px){ .modal-actions{flex-direction:column;} .section-actions{width:100%;} .section-actions button{flex:1;} }


.lookup-form { display:grid; grid-template-columns:repeat(2,minmax(240px,1fr)); gap:14px; margin-top:16px; }
.lookup-form label { display:flex; flex-direction:column; gap:7px; color:#475467; font-size:13px; }
.lookup-form select, .lookup-form textarea { border:1px solid #d0d5dd; border-radius:10px; padding:0 14px; font-size:15px; outline:none; background:#fff; color:#111827; }
.lookup-form select { height:42px; }
.lookup-form textarea { min-height:86px; padding-top:10px; resize:vertical; }
.lookup-form .lookup-wide { grid-column:1 / -1; }
@media (max-width:900px){ .lookup-form{grid-template-columns:1fr;} }


/* v1.0.25 授权锁定、号码筛选、分页与导出进度 */
.nav-item.locked,
.nav-item:disabled {
  opacity:.45;
  cursor:not-allowed;
  filter:grayscale(1);
}
.license-locked .topbar .version::after {
  content:" · 未授权";
  color:#b42318;
}
.phones-card { padding:16px; }
.phone-query-top { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:12px; }
.phone-query-top h2 { margin:0; flex:0 0 auto; padding-top:6px; }
.phone-query-bar { flex:1 1 960px; display:flex; justify-content:flex-end; align-items:flex-start; gap:10px; min-width:0; }
.phone-filters { display:grid; grid-template-columns:150px repeat(6,118px) 150px; gap:8px; align-items:center; min-width:0; }
.phone-filters input,
.phone-filters select { width:100%; height:36px; padding:0 10px; font-size:13px; border:1px solid #d0d5dd; border-radius:10px; background:#fff; color:#111827; outline:none; }
.phone-filters select:focus,
.phone-filters input:focus { border-color:var(--blue); box-shadow:0 0 0 3px rgba(37,99,235,.08); }
.phone-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; flex:0 0 auto; flex-wrap:wrap; }
.phone-actions button { height:36px; padding:0 12px; white-space:nowrap; }
.pager { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 0 0; color:#475467; font-size:13px; }
.pager-controls { display:flex; align-items:center; gap:8px; }
.pager-controls select { height:34px; border:1px solid #d0d5dd; border-radius:9px; padding:0 8px; background:#fff; }
.pager-controls button { height:34px; }
.export-modal-card { width:min(560px,100%); }
.export-progress-panel { border:1px solid #e5eaf3; background:#fbfcff; border-radius:14px; padding:14px; }
@media (max-width:1600px){ .phone-query-bar{flex-direction:column; align-items:stretch;} .phone-actions{justify-content:flex-end;} .phone-filters{grid-template-columns:repeat(4,minmax(120px,1fr));} }
@media (max-width:900px){ .phone-query-top{display:block;} .phone-query-bar{margin-top:10px;} .phone-filters{grid-template-columns:repeat(2,minmax(120px,1fr));} .phone-actions{justify-content:stretch;} .phone-actions button{flex:1;} .pager{flex-direction:column; align-items:stretch;} .pager-controls{justify-content:space-between; flex-wrap:wrap;} }
