:root{
  --bg:#f6f7fb;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#475569;
  --border:#e2e8f0;
  --primary:#2563eb;
  --primary-hover:#1d4ed8;
  --danger:#ef4444;
  --success:#16a34a;
  --warning:#f59e0b;
  --section-asset:#3b82f6;
  --section-financial:#10b981;
  --section-ops:#f59e0b;
  --section-banquet:#8b5cf6;
  --section-mgmt:#ec4899;
  --section-compet:#06b6d4;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto;
  color:var(--text);
  background:var(--bg);
  line-height:1.5;
}
.container{
  max-width:1200px;
  margin:0 auto;
  padding:0 16px;
}
.app-header{
  position:sticky;
  top:0;
  background:rgba(255,255,255,.95);
  backdrop-filter:saturate(180%) blur(10px);
  border-bottom:1px solid var(--border);
  z-index:100;
}
.app-header .container{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 16px;
}
.brand{
  display:flex;
  align-items:center;
  gap:12px;
}
.brand .logo{
  width:40px;height:40px;border-radius:10px;background:var(--primary);color:#fff;
  display:flex;align-items:center;justify-content:center;font-weight:700;font-size:14px;
}
.brand h1{font-size:18px;margin:0;font-weight:700}
.brand .subtitle{font-size:12px;color:var(--muted);margin-left:8px}
.header-actions{display:flex;gap:8px;align-items:center}
.btn{
  appearance:none;border:1px solid var(--border);background:#fff;color:var(--text);
  padding:8px 16px;border-radius:8px;font-weight:600;cursor:pointer;transition:.2s;
  font-size:14px;
}
.btn:hover{border-color:#cbd5e1;background:#f8fafc}
.btn.primary{background:var(--primary);color:#fff;border-color:var(--primary)}
.btn.primary:hover{background:var(--primary-hover);border-color:var(--primary-hover)}
.btn.sm{padding:6px 12px;font-size:12px}
.icon-btn{border:none;background:transparent;cursor:pointer;font-size:18px;padding:4px}

/* Progress indicator */
.progress-bar{
  display:flex;gap:4px;padding:8px 0;
}
.progress-step{
  flex:1;height:4px;background:var(--border);border-radius:2px;transition:.3s;
}
.progress-step.active{background:var(--primary)}
.progress-step.done{background:var(--success)}

/* Main content */
main.container{padding:24px 16px}

/* Weight scheme selector */
.scheme-selector{
  background:var(--card);border:1px solid var(--border);border-radius:12px;
  padding:16px;margin-bottom:16px;
}
.scheme-title{font-weight:700;margin-bottom:12px}
.scheme-options{display:flex;gap:12px;flex-wrap:wrap}
.scheme-option{
  flex:1;min-width:200px;padding:16px;border:2px solid var(--border);border-radius:8px;
  cursor:pointer;transition:.2s;background:#fff;
}
.scheme-option:hover{border-color:#cbd5e1}
.scheme-option.selected{border-color:var(--primary);background:rgba(37,99,235,0.05)}
.scheme-name{font-weight:700;margin-bottom:4px}
.scheme-desc{font-size:12px;color:var(--muted)}
.scheme-weights{margin-top:8px;font-size:11px;color:var(--muted)}

/* Tabs */
.tabs{
  display:flex;gap:4px;background:var(--card);border:1px solid var(--border);
  border-radius:12px;padding:4px;margin-bottom:16px;
}
.tab{
  flex:1;padding:10px 16px;border-radius:8px;cursor:pointer;transition:.2s;
  font-weight:600;font-size:13px;text-align:center;border:none;background:transparent;
}
.tab:hover{background:rgba(0,0,0,0.05)}
.tab.active{background:var(--primary);color:#fff}

/* Section styling */
.section-card{
  background:var(--card);border:1px solid var(--border);border-radius:12px;
  overflow:hidden;margin-bottom:16px;
}
.section-header{
  display:flex;align-items:center;justify-content:space-between;
  padding:12px 16px;border-bottom:1px solid var(--border);
}
.section-title{
  display:flex;align-items:center;gap:8px;font-weight:700;
}
.section-badge{
  width:8px;height:8px;border-radius:4px;
}
.section-badge.asset{background:var(--section-asset)}
.section-badge.financial{background:var(--section-financial)}
.section-badge.ops{background:var(--section-ops)}
.section-badge.banquet{background:var(--section-banquet)}
.section-badge.mgmt{background:var(--section-mgmt)}
.section-badge.compet{background:var(--section-compet)}
.section-score{
  font-size:14px;color:var(--muted);
}
.section-score input{
  width:40px;padding:4px 8px;border:1px solid var(--border);border-radius:4px;
  text-align:center;font-weight:700;
}
.section-body{padding:16px}

/* Sub-section */
.sub-section{margin-bottom:20px}
.sub-title{font-weight:600;margin-bottom:8px;color:var(--text)}
.sub-desc{font-size:12px;color:var(--muted);margin-bottom:12px}

/* Data tables */
.data-table{
  width:100%;border-collapse:collapse;margin-bottom:12px;
}
.data-table th,.data-table td{
  padding:8px 12px;border:1px solid var(--border);text-align:left;
}
.data-table th{
  background:#f8fafc;font-weight:600;font-size:12px;
}
.data-table input,.data-table select{
  width:100%;padding:6px 8px;border:1px solid var(--border);border-radius:4px;
  background:#fff;
}
.data-table input:focus,.data-table select:focus{
  outline:none;border-color:var(--primary);
}

/* Checklist */
.checklist{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
  gap:8px;
}
.check-item{
  display:flex;align-items:center;gap:8px;padding:8px 12px;
  background:#f8fafc;border:1px solid var(--border);border-radius:6px;
}
.check-item label{
  flex:1;font-size:13px;cursor:pointer;
}
.check-yes,.check-no{
  width:20px;height:20px;cursor:pointer;
}

/* Score input */
.score-input-group{
  display:flex;align-items:center;gap:8px;margin-top:12px;
}
.score-input{
  width:60px;padding:8px;border:1px solid var(--border);border-radius:6px;
  text-align:center;font-weight:700;font-size:16px;
}
.score-max{font-size:14px;color:var(--muted)}
.score-calc{
  margin-left:8px;padding:4px 8px;background:rgba(37,99,235,0.1);
  border-radius:4px;font-size:12px;color:var(--primary);
}

/* Summary section */
.summary-card{
  background:var(--card);border:1px solid var(--border);border-radius:12px;
  padding:16px;margin-bottom:16px;
}
.summary-header{font-weight:700;margin-bottom:12px}
.summary-grid{
  display:grid;grid-template-columns:repeat(6,1fr);gap:8px;
}
.summary-item{
  padding:12px;background:#f8fafc;border-radius:8px;text-align:center;
}
.summary-label{font-size:11px;color:var(--muted)}
.summary-value{font-size:18px;font-weight:700;margin-top:4px}
.summary-total{
  background:var(--primary);color:#fff;
}
.summary-total .summary-label{color:rgba(255,255,255,0.8)}
.total-score{
  font-size:24px;font-weight:700;
}

/* Grade display */
.grade-display{
  display:flex;align-items:center;gap:12px;padding:16px;
  background:var(--card);border-radius:12px;margin-bottom:16px;
}
.grade-badge{
  width:60px;height:60px;border-radius:12px;
  display:flex;align-items:center;justify-content:center;
  font-size:24px;font-weight:700;
}
.grade-badge.excellent{background:#dcfce7;color:#16a34a}
.grade-badge.good{background:#dbeafe;color:#2563eb}
.grade-badge.average{background:#fef3c7;color:#d97706}
.grade-badge.poor{background:#fee2e2;color:#ef4444}
.grade-badge.critical{background:#fecaca;color:#b91c1c}
.grade-text{
  flex:1;
}
.grade-title{font-weight:700;font-size:18px}
.grade-desc{font-size:12px;color:var(--muted)}

/* Verification status */
.verify-table{
  width:100%;border-collapse:collapse;
}
.verify-table th,.verify-table td{
  padding:8px 12px;border:1px solid var(--border);text-align:left;
}
.verify-table th{background:#f8fafc;font-weight:600;font-size:12px}
.verify-status{
  display:flex;gap:8px;
}
.verify-chip{
  padding:2px 8px;border-radius:4px;font-size:11px;font-weight:600;
}
.verify-chip.verified{background:#dcfce7;color:#16a34a}
.verify-chip.pending{background:#fef3c7;color:#d97706}
.verify-chip.unverified{background:#fee2e2;color:#ef4444}
.trust-chip{
  padding:2px 8px;border-radius:4px;font-size:11px;
}
.trust-chip.a{background:#dbeafe;color:#2563eb}
.trust-chip.b{background:#fef3c7;color:#d97706}
.trust-chip.c{background:#fee2e2;color:#ef4444}

/* Modal */
.modal{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;
  background:rgba(15,23,42,.5);z-index:200}
.modal.hidden{display:none}
.modal-dialog{
  width:600px;max-width:96vw;max-height:90vh;overflow-y:auto;
  background:#fff;border-radius:12px;
}
.modal-header{
  display:flex;align-items:center;justify-content:space-between;
  padding:16px;border-bottom:1px solid var(--border);
}
.modal-title{font-weight:700;font-size:18px}
.modal-body{padding:16px}
.modal-footer{
  display:flex;align-items:center;justify-content:flex-end;gap:8px;
  padding:16px;border-top:1px solid var(--border);
}

/* Form styling */
.form-group{margin-bottom:12px}
.form-label{display:block;font-weight:600;margin-bottom:4px;font-size:13px}
.form-input,.form-select{
  width:100%;padding:10px;border:1px solid var(--border);border-radius:6px;
}
.form-row{
  display:grid;grid-template-columns:1fr 1fr;gap:12px;
}

/* Responsive */
@media (max-width:900px){
  .tabs{flex-wrap:wrap}
  .tab{min-width:80px}
  .summary-grid{grid-template-columns:repeat(3,1fr)}
  .scheme-options{flex-direction:column}
  .scheme-option{min-width:100%}
}
@media (max-width:600px){
  .summary-grid{grid-template-columns:repeat(2,1fr)}
  .checklist{grid-template-columns:1fr}
  .form-row{grid-template-columns:1fr}
}