.dept-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:0;
}
.dept-toolbar h1{margin:0;font-size:20px;}
.toolbar-actions{display:flex;gap:8px;align-items:center;}

.btn-new{
  background:#3b82f6;
  color:#fff;
  border:none;
  border-radius:8px;
  padding:8px 14px;
  font-weight:700;
  font-size:13px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:6px;
  transition:background .15s;
}
.btn-new:hover{background:#2563eb;}

.btn-export{
  background:#fff;
  color:#374151;
  border:1px solid var(--border);
  border-radius:8px;
  padding:8px 10px;
  font-size:14px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  transition:background .15s;
}
.btn-export:hover{background:#f3f4f6;}

.dept-card{
  padding:0;
  overflow:hidden;
}

.dept-table{
  width:100%;
  border-collapse:collapse;
}
.dept-table thead tr{border-bottom:1px solid var(--border);}
.dept-table th{
  text-align:left;
  font-size:11px;
  font-weight:700;
  color:#9aa1ad;
  text-transform:uppercase;
  letter-spacing:.4px;
  padding:10px 14px;
}
.dept-table td{
  padding:13px 14px;
  font-size:14px;
  color:#1f2937;
  border-bottom:1px solid #f3f4f6;
  vertical-align:middle;
}
.dept-table tbody tr:last-child td{border-bottom:none;}
.dept-table tbody tr:hover td{background:#f9fafc;}

.dept-name-link{
  color:#2563eb;
  text-decoration:none;
  font-weight:600;
}
.dept-name-link:hover{text-decoration:underline;}

.row-actions{
  display:flex;
  gap:6px;
  justify-content:flex-end;
  opacity:0;
  transition:opacity .15s;
}
.row-actions--visible{opacity:1;}
.inline-form{display:inline;}
.dept-table tbody tr:hover .row-actions{opacity:1;}
.row-btn{
  background:#fff;
  border:1px solid var(--border);
  border-radius:6px;
  padding:5px 9px;
  font-size:12px;
  cursor:pointer;
  color:#6b7280;
  transition:background .15s, color .15s;
}
.row-btn:hover{background:#f3f4f6;color:#111827;}
.row-btn.danger:hover{background:#fef2f2;color:#dc2626;border-color:#fca5a5;}

.empty-state{
  text-align:center;
  padding:60px 20px;
  color:#9aa1ad;
}
.empty-state i{
  font-size:40px;
  margin-bottom:12px;
  display:block;
}
.empty-state p{margin:0 0 16px;font-size:15px;}

.alert-err{
  background:#fce8e6;
  border:1px solid #f4b6b6;
  border-radius:8px;
  padding:14px 18px;
  margin:16px 18px;
  color:#d93025;
  font-size:13px;
}
.alert-err ul{margin:8px 0 0 20px;line-height:1.5;}
.alert-err-title{font-weight:600;}
.alert-ok{
  background:#e6f4ea;
  border:1px solid #b2e7bb;
  border-radius:8px;
  padding:12px 18px;
  margin:16px 18px;
  color:#137333;
  font-size:13px;
}

.modal-overlay{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(15,23,42,.35);
  z-index:100;
  align-items:center;
  justify-content:center;
}
.modal-overlay.open{display:flex;}
.modal{
  background:#fff;
  border-radius:16px;
  padding:24px;
  width:440px;
  box-shadow:0 20px 48px rgba(15,23,42,.18);
}
.modal h3{margin:0 0 18px;font-size:17px;}
.modal .field-group{margin-top:14px;}
.modal-footer{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:22px;
}
.modal-input{margin-top:6px;}
.modal-textarea{
  width:100%;
  min-height:96px;
  border:1px solid var(--border);
  border-radius:8px;
  padding:10px 12px;
  font:inherit;
  resize:vertical;
}
.btn-cancel{
  background:#fff;
  border:1px solid var(--border);
  border-radius:8px;
  padding:8px 16px;
  font-weight:600;
  font-size:13px;
  cursor:pointer;
  color:#374151;
}
.btn-cancel:hover{background:#f3f4f6;}

.badge-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#eff6ff;
  color:#2563eb;
  border-radius:20px;
  padding:2px 10px;
  font-size:12px;
  font-weight:700;
}
