*{margin:0;padding:0;box-sizing:border-box;}
:root{
  --brand:#003370;
  --brand-light:#e9f0fb;
  --primary:#1967d2;
  --bg:#f5f7fa;
  --text:#333;
  --text-sub:#666;
  --border:#e0e6ef;
  --danger:#d92121;
  --success:#198754;
}
body{
  font-family:"Microsoft Yahei","PingFang SC",sans-serif;
  font-size:14px;
  color:var(--text);
  background:var(--bg);
}
a{text-decoration:none;color:var(--primary);}
button{font-family:inherit;}

.header{
  height:56px;
  padding:0 24px;
  background:var(--brand);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  position:sticky;
  top:0;
  z-index:100;
}
.header-left{display:flex;align-items:center;gap:10px;}
.header h1{font-size:18px;font-weight:bold;}
.role-badge{
  font-size:12px;
  padding:2px 8px;
  border-radius:10px;
  background:rgba(255,255,255,.16);
  border:1px solid rgba(255,255,255,.35);
}
.header-right{display:flex;align-items:center;gap:14px;font-size:13px;}
.header-right .user-name{opacity:.9;}

.main-wrap{display:flex;align-items:stretch;min-height:calc(100vh - 56px);}
.sidebar{
  width:200px;
  flex-shrink:0;
  background:#fff;
  border-right:1px solid var(--border);
  padding:8px 0;
}
.menu-item{
  padding:12px 18px;
  font-size:14px;
  color:#444;
  cursor:pointer;
  border-left:3px solid transparent;
  transition:background .15s;
}
.menu-item:hover{background:#f3f7fd;color:var(--brand);}
.menu-item.active{
  background:var(--brand-light);
  color:var(--brand);
  border-left-color:var(--brand);
  font-weight:bold;
}
.content{flex:1;min-width:0;padding:20px 24px;}
.content-panel{display:none;width:100%;}
.content-panel.active{display:block;}

.panel-top-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:14px;
}
.panel-top-bar h2{font-size:17px;}
.top-bar-right{display:flex;align-items:center;gap:12px;flex-wrap:wrap;}
.top-bar-right a{font-size:13px;}

button{
  padding:8px 14px;
  font-size:13px;
  color:#fff;
  background:var(--primary);
  border:none;
  border-radius:6px;
  cursor:pointer;
}
button:hover{opacity:.9;}
button.btn-ghost{background:transparent;border:1px solid rgba(255,255,255,.6);color:#fff;}
button.btn-secondary{background:#fff;color:var(--text);border:1px solid var(--border);}
button.btn-danger{background:var(--danger);}

.case-wrap,.repo-wrap{
  display:flex;
  border:1px solid var(--border);
  border-radius:8px;
  overflow:hidden;
  background:#fff;
}
.case-left{
  width:150px;
  flex-shrink:0;
  border-right:1px solid var(--border);
  background:#fbfcfe;
}
.city-item{
  padding:11px 16px;
  cursor:pointer;
  border-left:3px solid transparent;
}
.city-item:hover{color:var(--primary);}
.city-item.active{
  background:var(--brand-light);
  color:var(--brand);
  border-left-color:var(--brand);
  font-weight:bold;
}
.case-right{flex:1;min-width:0;padding:14px;min-height:420px;}

.repo-left{
  width:170px;
  flex-shrink:0;
  border-right:1px solid var(--border);
  background:#fbfcfe;
  padding:8px;
}
.cate1{padding:9px 10px;font-weight:bold;cursor:pointer;border-radius:4px;}
.cate1:hover{color:var(--primary);}
.cate1.active{color:var(--brand);}
.cate2{padding:7px 10px 7px 24px;font-size:13px;color:#555;cursor:pointer;border-radius:4px;}
.cate2:hover{color:var(--primary);}
.cate2.active{background:var(--brand-light);color:var(--brand);}
.repo-right{flex:1;min-width:0;padding:14px;min-height:420px;}

.file-item{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  background:#fff;
  border:1px solid var(--border);
  border-radius:6px;
  padding:12px 14px;
  margin-bottom:10px;
}
.file-item .file-name{font-weight:bold;}
.file-item .file-info{width:100%;color:var(--text-sub);font-size:12px;}
.empty-tip{color:#999;padding:20px 4px;}

.log-item{
  background:#fff;
  border:1px solid var(--border);
  border-radius:6px;
  padding:12px 14px;
  margin-bottom:8px;
  font-size:13px;
  color:#444;
}

.settings-card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:10px;
  padding:22px;
  max-width:620px;
}
.settings-card h3{font-size:15px;margin-bottom:16px;}
.setting-row{display:flex;align-items:center;gap:12px;margin-bottom:18px;}
.setting-row label{width:72px;flex-shrink:0;color:var(--text-sub);}
.setting-row input{flex:1;}
.setting-row .setting-value{flex:1;color:var(--text);}
.setting-divider{height:1px;background:var(--border);margin:20px 0;}

input,select{
  width:100%;
  padding:9px 10px;
  border:1px solid var(--border);
  border-radius:6px;
  font-size:14px;
  font-family:inherit;
  background:#fff;
  color:var(--text);
}
input:focus,select:focus{outline:none;border-color:var(--primary);}
.form-item{margin-bottom:14px;}
.form-item label{display:block;margin-bottom:6px;color:var(--text-sub);font-size:13px;}

.modal{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.45);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:999;
}
.modal.show{display:flex;}
.modal-inner{width:420px;max-width:92vw;background:#fff;border-radius:10px;padding:22px;}
.modal-inner h3{font-size:16px;margin-bottom:16px;}
.btn-group{display:flex;justify-content:flex-end;gap:10px;margin-top:18px;}

#page-login{
  min-height:100vh;
  padding:20px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg,#003370,#1967d2);
}
.login-wrap{
  width:400px;
  max-width:100%;
  background:#fff;
  border-radius:12px;
  padding:32px;
  box-shadow:0 12px 32px rgba(0,0,0,.18);
}
.login-wrap h2{text-align:center;color:var(--brand);font-size:20px;margin-bottom:24px;}
.login-wrap .form-item{margin-bottom:16px;}
.login-wrap button{width:100%;padding:10px;font-size:15px;}
#login-tip{color:var(--danger);font-size:13px;min-height:18px;}

@media (max-width:768px){
  .main-wrap{flex-direction:column;}
  .sidebar{
    width:100%;
    display:flex;
    overflow-x:auto;
    padding:0;
    border-right:none;
    border-bottom:1px solid var(--border);
  }
  .menu-item{
    white-space:nowrap;
    padding:12px 14px;
    border-left:none;
    border-bottom:3px solid transparent;
  }
  .menu-item.active{border-left:none;border-bottom-color:var(--brand);}
  .content{padding:14px;}
  .case-wrap,.repo-wrap{flex-direction:column;}
  .case-left,.repo-left{
    width:100%;
    display:flex;
    flex-wrap:wrap;
    border-right:none;
    border-bottom:1px solid var(--border);
  }
  .city-item{border-left:none;padding:9px 12px;}
  .cate1{width:100%;}
  .cate2{padding:7px 12px;}
}

.menu-item .menu-badge{
  display:inline-block;
  margin-left:6px;
  background:#fff;
  color:var(--danger);
  border:1px solid var(--danger);
  border-radius:10px;
  font-size:11px;
  line-height:1;
  padding:2px 6px;
  min-width:18px;
  text-align:center;
}
.menu-item.active .menu-badge{
  background:var(--danger);
  color:#fff;
}
.header-bell{
  position:relative;
  width:34px;
  height:34px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  border:none;
  background:rgba(255,255,255,.14);
  color:#fff;
  font-size:18px;
  transition:background .15s;
  padding:0;
}
.header-bell:hover{background:rgba(255,255,255,.28);}
.header-bell .bell-dot{
  position:absolute;
  top:4px;
  right:4px;
  width:9px;
  height:9px;
  background:#ff4d4f;
  border-radius:50%;
  border:1px solid #fff;
  box-shadow:0 0 0 1px #ff4d4f;
}
.header-bell .bell-count{
  position:absolute;
  top:2px;
  right:1px;
  min-width:16px;
  height:16px;
  padding:0 4px;
  border-radius:8px;
  background:#ff4d4f;
  color:#fff;
  font-size:11px;
  line-height:16px;
  text-align:center;
  border:1px solid #fff;
  box-shadow:0 0 0 1px #ff4d4f;
}

.notif-toolbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;}
.notif-toolbar .notif-summary{color:var(--text-sub);font-size:13px;}

.notif-item{
  background:#fff;
  border:1px solid var(--border);
  border-left:4px solid var(--border);
  border-radius:6px;
  padding:12px 14px;
  margin-bottom:8px;
  transition:box-shadow .15s;
}
.notif-item:hover{box-shadow:0 2px 8px rgba(0,0,0,.06);}
.notif-item.unread{
  background:#fafcff;
  border-left-color:var(--primary);
}
.notif-item.unread .notif-title::before{
  content:"";
  display:inline-block;
  width:7px;height:7px;border-radius:50%;
  background:var(--danger);margin-right:8px;vertical-align:middle;
}
.notif-title{font-weight:bold;margin-bottom:4px;font-size:14px;}
.notif-content{color:var(--text);font-size:13px;line-height:1.6;margin-bottom:6px;}
.notif-meta{display:flex;justify-content:space-between;align-items:center;font-size:12px;color:var(--text-sub);}
.notif-actions{display:flex;gap:8px;}
.notif-actions button{
  padding:3px 10px;
  font-size:12px;
  background:transparent;
  color:var(--text-sub);
  border:1px solid var(--border);
}
.notif-actions button:hover{color:var(--primary);border-color:var(--primary);}

.notif-item.type-repo_pending{border-left-color:#fa8c16;}
.notif-item.type-repo_pass{border-left-color:var(--success);}
.notif-item.type-repo_reject{border-left-color:var(--danger);}

textarea{
  width:100%;
  padding:9px 10px;
  border:1px solid var(--border);
  border-radius:6px;
  font-size:14px;
  font-family:inherit;
  resize:vertical;
  min-height:90px;
}
textarea:focus{outline:none;border-color:var(--primary);}

.upload-area{
  border:2px dashed var(--border);
  border-radius:8px;
  padding:20px;
  text-align:center;
  cursor:pointer;
  transition:border-color .15s, background .15s;
  position:relative;
  overflow:hidden;
}
.upload-area:hover{border-color:var(--primary);background:#f5f8ff;}
.upload-area.has-file{border-style:solid;border-color:var(--success);background:#f0faf4;}
.upload-area input[type="file"]{
  position:absolute;inset:0;opacity:0;cursor:pointer;
}
.upload-area .upload-hint{color:var(--text-sub);font-size:13px;}
.upload-area .upload-hint .upload-icon{font-size:28px;display:block;margin-bottom:6px;}
.upload-area .upload-filename{
  font-weight:bold;color:var(--success);margin-top:4px;font-size:13px;
}

.progress-bar{
  width:100%;height:8px;
  background:var(--border);
  border-radius:4px;
  overflow:hidden;
  margin-top:10px;
  display:none;
}
.progress-bar.show{display:block;}
.progress-bar-fill{
  height:100%;
  background:linear-gradient(90deg,var(--primary),#4da3ff);
  transition:width .2s;
  width:0;
}
.progress-text{font-size:12px;color:var(--text-sub);margin-top:6px;display:none;}
.progress-text.show{display:block;}

.btn-uploading{opacity:.6;pointer-events:none;}
.modal-upload-tip{font-size:12px;color:var(--text-sub);margin-top:4px;}
