*{margin:0;padding:0;box-sizing:border-box}
body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC',sans-serif;background:#f0f2f5;color:#333}

.login-overlay{position:fixed;inset:0;background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);display:flex;align-items:center;justify-content:center;z-index:9999}
.login-box{background:#fff;border-radius:16px;padding:40px;width:380px;box-shadow:0 20px 60px rgba(0,0,0,.2)}
.login-box h1{font-size:24px;text-align:center;margin-bottom:8px;color:#1a1a2e}
.login-box .subtitle{text-align:center;color:#999;margin-bottom:32px;font-size:14px}
.login-box input{width:100%;padding:12px 16px;border:1px solid #e0e0e0;border-radius:8px;font-size:15px;margin-bottom:16px;outline:none}
.login-box input:focus{border-color:#667eea}
.login-box button{width:100%;padding:12px;border:none;border-radius:8px;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;font-size:16px;cursor:pointer;font-weight:600}
.login-box button:hover{opacity:.9}
.login-error{color:#e74c3c;font-size:13px;text-align:center;margin-top:8px;min-height:20px}

.app{display:none}
.app.active{display:flex;height:100vh}
.sidebar{width:220px;background:#1a1a2e;color:#fff;overflow-y:auto;flex-shrink:0}
.sidebar-header{padding:20px;border-bottom:1px solid rgba(255,255,255,.1)}
.sidebar-header h2{font-size:16px;font-weight:600}
.sidebar-header .user-info{font-size:12px;color:#aaa;margin-top:4px}
.sidebar-nav{padding:8px 0}
.nav-group-title{padding:12px 20px 6px;font-size:11px;color:#666;text-transform:uppercase;letter-spacing:1px}
.nav-item{padding:10px 20px;cursor:pointer;font-size:14px;display:flex;align-items:center;gap:8px;color:#b0b0b0;transition:all .2s;border-left:3px solid transparent}
.nav-item:hover{background:rgba(255,255,255,.05);color:#fff}
.nav-item.active{background:rgba(102,126,234,.2);color:#667eea;border-left-color:#667eea}

.main{flex:1;overflow-y:auto;padding:24px}
.page{display:none}
.page.active{display:block}
.page-header{margin-bottom:24px}
.page-header h3{font-size:20px;color:#1a1a2e}
.page-header p{color:#999;font-size:13px;margin-top:4px}

.card{background:#fff;border-radius:12px;padding:20px;margin-bottom:16px;box-shadow:0 1px 3px rgba(0,0,0,.05)}
.card-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}
.card-header h4{font-size:15px;font-weight:600}

.stats-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:12px;margin-bottom:20px}
.stat-card{background:#fff;border-radius:12px;padding:16px;box-shadow:0 1px 3px rgba(0,0,0,.05)}
.stat-card .stat-value{font-size:28px;font-weight:700;color:#1a1a2e}
.stat-card .stat-label{font-size:12px;color:#999;margin-top:4px}
.stat-card.accent .stat-value{color:#667eea}
.stat-card.green .stat-value{color:#27ae60}
.stat-card.orange .stat-value{color:#e67e22}

.progress-bar{height:8px;background:#f0f0f0;border-radius:4px;overflow:hidden;margin-top:6px}
.progress-fill{height:100%;background:linear-gradient(90deg,#667eea,#764ba2);border-radius:4px;transition:width .3s}
.progress-fill.green{background:linear-gradient(90deg,#27ae60,#2ecc71)}
.progress-fill.orange{background:linear-gradient(90deg,#e67e22,#f39c12)}

table{width:100%;border-collapse:collapse;font-size:13px}
th{background:#f8f9fa;padding:10px 12px;text-align:left;font-weight:600;color:#666;border-bottom:2px solid #e9ecef;white-space:nowrap}
td{padding:10px 12px;border-bottom:1px solid #f0f0f0}
tr:hover td{background:#f8f9ff}
.table-wrap{overflow-x:auto}

.btn{padding:8px 16px;border:none;border-radius:6px;cursor:pointer;font-size:13px;font-weight:500;transition:all .2s;display:inline-flex;align-items:center;gap:4px}
.btn-primary{background:#667eea;color:#fff}.btn-primary:hover{background:#5a6fd6}
.btn-success{background:#27ae60;color:#fff}.btn-success:hover{background:#219a52}
.btn-danger{background:#e74c3c;color:#fff}.btn-danger:hover{background:#c0392b}
.btn-outline{background:#fff;color:#667eea;border:1px solid #667eea}.btn-outline:hover{background:#f0f0ff}
.btn-sm{padding:5px 10px;font-size:12px}
.btn-group{display:flex;gap:8px}

.form-group{margin-bottom:14px}
.form-group label{display:block;font-size:13px;color:#666;margin-bottom:4px;font-weight:500}
.form-group input,.form-group select,.form-group textarea{width:100%;padding:8px 12px;border:1px solid #e0e0e0;border-radius:6px;font-size:13px;outline:none}
.form-group input:focus,.form-group select:focus,.form-group textarea:focus{border-color:#667eea}
.form-group textarea{min-height:80px;resize:vertical}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.form-row.col3{grid-template-columns:1fr 1fr 1fr}

.badge{display:inline-block;padding:2px 8px;border-radius:10px;font-size:11px;font-weight:500}
.badge-info{background:#e3f2fd;color:#1976d2}
.badge-success{background:#e8f5e9;color:#388e3c}
.badge-warning{background:#fff3e0;color:#f57c00}
.badge-danger{background:#fce4ec;color:#c62828}
.badge-default{background:#f5f5f5;color:#666}

.modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,.4);display:flex;align-items:center;justify-content:center;z-index:1000}
.modal{background:#fff;border-radius:12px;width:90%;max-width:700px;max-height:85vh;overflow-y:auto;box-shadow:0 10px 40px rgba(0,0,0,.15)}
.modal-header{padding:16px 20px;border-bottom:1px solid #f0f0f0;display:flex;justify-content:space-between;align-items:center;position:sticky;top:0;background:#fff;z-index:1;border-radius:12px 12px 0 0}
.modal-header h4{font-size:16px}
.modal-close{background:none;border:none;font-size:20px;cursor:pointer;color:#999;padding:0 4px}
.modal-body{padding:20px}
.modal-footer{padding:12px 20px;border-top:1px solid #f0f0f0;display:flex;justify-content:flex-end;gap:8px}

.toast{position:fixed;top:20px;right:20px;padding:12px 20px;border-radius:8px;color:#fff;font-size:14px;z-index:10000;animation:slideIn .3s}
.toast.success{background:#27ae60}.toast.error{background:#e74c3c}.toast.warning{background:#f39c12}
@keyframes slideIn{from{transform:translateX(100%);opacity:0}to{transform:translateX(0);opacity:1}}

.filters{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}
.filters select,.filters input{padding:6px 12px;border:1px solid #e0e0e0;border-radius:6px;font-size:13px}

.pagination{display:flex;justify-content:center;align-items:center;gap:12px;margin-top:16px;padding:12px 0}
.pagination button{padding:6px 14px;border:1px solid #e0e0e0;border-radius:6px;background:#fff;cursor:pointer;font-size:13px}
.pagination button:disabled{opacity:.5;cursor:default}
.pagination span{font-size:13px;color:#999}

.empty{text-align:center;padding:40px;color:#999;font-size:14px}
.file-upload-area{border:2px dashed #e0e0e0;border-radius:8px;padding:24px;text-align:center;cursor:pointer;transition:border-color .2s,background .2s}
.file-upload-area:hover{border-color:#667eea}
.file-upload-area.drag-over{border-color:#667eea;background:#f0f3ff}
.file-upload-area input{display:none}
.file-upload-area p{color:#999;margin:0;font-size:14px}
.file-upload-area .file-selected{margin-top:8px;font-size:13px;color:#22c55e;font-weight:500}
.progress-list{list-style:none}
.progress-list li{padding:8px 0;border-bottom:1px solid #f5f5f5;display:flex;justify-content:space-between;align-items:center;font-size:13px}
.progress-list li:last-child{border:none}
.progress-list .name{flex:1}
.progress-list .bar-wrap{width:200px;margin:0 12px}
.progress-list .pct{width:40px;text-align:right;font-weight:600;color:#667eea}

td .btn-sm{margin:1px}

/* ========== 问卷仪表盘 ========== */
.dash { --dash-radius: 14px; --dash-gap: 18px; }
.dash-summary { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:14px; margin-bottom:20px; padding:0 2px; }
.dash-summary__title { font-size:19px; font-weight:700; color:#111827; letter-spacing:-0.01em; margin:0; }
.dash-summary__meta { display:block; margin-top:3px; font-size:12px; color:#9ca3af; }
.dash-total-badge { display:flex; align-items:center; gap:12px; background:linear-gradient(135deg,#eff6ff,#dbeafe); border:1px solid #bfdbfe; border-radius:12px; padding:12px 20px; }
.dash-total-badge__num { font-size:32px; font-weight:800; color:#1d4ed8; line-height:1; }
.dash-total-badge__text { font-size:13px; font-weight:600; color:#3b82f6; line-height:1.2; }
.dash-kpis { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; margin-bottom:20px; }
.dash-kpi { background:#fff; border:1px solid #e5e7eb; border-radius:14px; padding:20px 22px; display:flex; align-items:center; gap:16px; box-shadow:0 1px 3px rgba(0,0,0,.04); transition:box-shadow .2s,transform .2s; }
.dash-kpi:hover { box-shadow:0 4px 12px rgba(0,0,0,.08); transform:translateY(-1px); }
.dash-kpi__icon { width:48px; height:48px; border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:22px; flex-shrink:0; }
.dash-kpi__icon--blue  { background:linear-gradient(135deg,#dbeafe,#bfdbfe); }
.dash-kpi__icon--green { background:linear-gradient(135deg,#d1fae5,#a7f3d0); }
.dash-kpi__icon--amber { background:linear-gradient(135deg,#fef3c7,#fde68a); }
.dash-kpi__content { min-width:0; }
.dash-kpi__value { font-size:30px; font-weight:800; color:#111827; line-height:1.1; letter-spacing:-0.02em; }
.dash-kpi__label { font-size:12.5px; font-weight:600; color:#6b7280; margin-top:3px; text-transform:uppercase; letter-spacing:0.04em; }
.dash-kpi__sub { font-size:11px; color:#9ca3af; margin-top:1px; }
.dash-main { display:grid; grid-template-columns:1.2fr 1fr; gap:18px; align-items:start; }
.dash-card { background:#fff; border:1px solid #e5e7eb; border-radius:14px; box-shadow:0 1px 3px rgba(0,0,0,.04); overflow:hidden; margin-bottom:18px; }
.dash-card:last-child { margin-bottom:0; }
.dash-card__header { display:flex; align-items:center; gap:8px; padding:14px 18px; border-bottom:1px solid #f3f4f6; background:#fafbfc; }
.dash-card__header h3 { margin:0; font-size:13.5px; font-weight:700; color:#1f2937; flex:1; }
.dash-card__badge { font-size:11px; font-weight:500; color:#9ca3af; background:#f3f4f6; padding:2px 8px; border-radius:100px; }
.dash-card__body { padding:18px; }

/* 满意度分布条 */
.sat-bar-row { display:flex; align-items:center; gap:12px; margin-bottom:12px; }
.sat-bar-row:last-child { margin-bottom:0; }
.sat-bar-label { width:90px; font-size:12.5px; font-weight:500; color:#4b5563; text-align:right; flex-shrink:0; }
.sat-bar-track { flex:1; height:28px; background:#f3f4f6; border-radius:6px; overflow:hidden; position:relative; }
.sat-bar-fill { height:100%; border-radius:6px; display:flex; align-items:center; justify-content:flex-end; padding-right:10px; font-size:12px; font-weight:700; color:#1f2937; transition:width .7s cubic-bezier(0.22,1,0.36,1); min-width:0; }
.sat-bar-count { width:32px; font-size:12.5px; color:#9ca3af; font-weight:600; text-align:center; flex-shrink:0; }

/* 维度均分条 */
.dim-row { display:flex; align-items:center; gap:12px; margin-bottom:10px; }
.dim-row:last-child { margin-bottom:0; }
.dim-label { width:80px; font-size:12px; font-weight:500; color:#4b5563; text-align:right; flex-shrink:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dim-track { flex:1; height:22px; background:#f3f4f6; border-radius:5px; overflow:hidden; }
.dim-fill { height:100%; border-radius:5px; display:flex; align-items:center; justify-content:flex-end; padding-right:8px; font-size:11.5px; font-weight:700; color:#fff; transition:width .7s cubic-bezier(0.22,1,0.36,1); min-width:0; }

/* 点位排名 */
.loc-list { list-style:none; margin:0; padding:0; }
.loc-item { display:flex; align-items:center; gap:12px; padding:12px 0; border-bottom:1px solid #f3f4f6; }
.loc-item:last-child { border-bottom:none; }
.loc-item__rank { width:26px; height:26px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:700; color:#fff; flex-shrink:0; }
.loc-item__rank--gold   { background:linear-gradient(135deg,#f59e0b,#d97706); }
.loc-item__rank--silver { background:linear-gradient(135deg,#94a3b8,#64748b); }
.loc-item__rank--bronze { background:linear-gradient(135deg,#d97706,#b45309); }
.loc-item__rank--default { background:#d1d5db; color:#6b7280; }
.loc-item__info { flex:1; min-width:0; }
.loc-item__name { font-size:13.5px; font-weight:600; color:#1f2937; }
.loc-item__count { font-size:11px; color:#9ca3af; margin-top:1px; }
.loc-item__score { font-size:22px; font-weight:800; color:#111827; letter-spacing:-0.02em; flex-shrink:0; text-align:right; min-width:40px; }
.loc-item__score--high { color:#059669; }
.loc-item__score--mid  { color:#d97706; }
.loc-item__score--low  { color:#dc2626; }

/* 关键发现 */
.insight-item { display:flex; align-items:flex-start; gap:12px; padding:14px; margin-bottom:10px; background:#f9fafb; border-radius:10px; border:1px solid #f3f4f6; }
.insight-item:last-child { margin-bottom:0; }
.insight-icon { width:32px; height:32px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:15px; flex-shrink:0; }
.insight-icon--good  { background:#dcfce7; color:#166534; }
.insight-icon--warn  { background:#fef3c7; color:#92400e; }
.insight-icon--info  { background:#dbeafe; color:#1e40af; }
.insight-text { flex:1; font-size:13px; color:#4b5563; line-height:1.55; }
.insight-text strong { display:block; color:#111827; font-size:13.5px; margin-bottom:2px; }
.insight-text span { font-size:12px; color:#6b7280; }
.insight-bar { margin-top:6px; height:5px; background:#e5e7eb; border-radius:3px; overflow:hidden; }
.insight-bar-fill { height:100%; border-radius:3px; transition:width .7s cubic-bezier(0.22,1,0.36,1); }

@media(max-width:768px){
  .sidebar{width:60px}
  .sidebar-header h2,.sidebar-header .user-info,.nav-item span:not(.icon),.nav-group-title{display:none}
  .nav-item{justify-content:center;padding:12px}
  .form-row{grid-template-columns:1fr}
  .form-row.col3{grid-template-columns:1fr}
  .stats-grid{grid-template-columns:repeat(2,1fr)}
}

@media (max-width: 1024px) { .dash-main { grid-template-columns:1fr; } .dash-kpis { grid-template-columns:repeat(2,1fr); } }
@media (max-width: 768px) { .dash-kpis { grid-template-columns:1fr; } .dash-summary { flex-direction:column; align-items:flex-start; } .sat-bar-label { width:70px; font-size:11px; } .dim-label { width:64px; font-size:11px; } }
