/* ========== Organization (Dept / Role / Employee) ========== */
/* ========== Department Management Page Styles ========== */

/* Layout - same as workspace */
.dm-layout {
  display: flex;
  min-height: 100vh;
  background: #f5f5f5;
}

/* Content Area */
.dm-content {
  flex: 1;
  padding: 0;
  min-height: 100vh;
}

.dm-main {
  padding: 24px;
  max-width: 1400px;
}

/* Breadcrumb */
.dm-breadcrumb {
  font-size: 13px;
  color: #999;
  margin-bottom: 16px;
}
.dm-breadcrumb a {
  color: #e2383e;
  text-decoration: none;
}
.dm-breadcrumb a:hover { text-decoration: underline; }
.dm-breadcrumb span { margin: 0 6px; color: #ccc; }

/* Page Header */
.dm-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.dm-page-title {
  font-size: 22px;
  font-weight: 600;
  color: #222;
}
.dm-page-desc {
  font-size: 13px;
  color: #999;
  margin-top: 4px;
}

/* Stats Row */
.dm-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.dm-stat-card {
  background: #fff;
  border-radius: 8px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}
.dm-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.dm-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dm-stat-icon svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}
.dm-stat-icon.blue { background: linear-gradient(135deg, #4f8ef7, #2b6cb0); }
.dm-stat-icon.green { background: linear-gradient(135deg, #48bb78, #38a169); }
.dm-stat-icon.orange { background: linear-gradient(135deg, #f6ad55, #ed8936); }
.dm-stat-icon.red { background: linear-gradient(135deg, #fc8181, #e53e3e); }

.dm-stat-info {}
.dm-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #222;
  line-height: 1.2;
}
.dm-stat-label {
  font-size: 13px;
  color: #999;
  margin-top: 2px;
}

/* Main Layout: Tree + Table */
.dm-body {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

/* Left: Dept Tree */
.dm-tree-panel {
  width: 300px;
  flex-shrink: 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  overflow: hidden;
}
.dm-tree-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #f0f0f0;
}
.dm-tree-header-title {
  font-size: 15px;
  font-weight: 600;
  color: #222;
}
.dm-tree-header-actions {
  display: flex;
  gap: 6px;
}
.dm-tree-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: #f5f5f5;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.dm-tree-btn:hover { background: #fee2e2; }
.dm-tree-btn svg { width: 16px; height: 16px; fill: #666; }
.dm-tree-btn:hover svg { fill: #e2383e; }

.dm-tree-search {
  padding: 10px 16px;
  border-bottom: 1px solid #f0f0f0;
}
.dm-tree-search input {
  width: 100%;
  height: 32px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 0 10px 0 30px;
  font-size: 13px;
  outline: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23bbb'%3E%3Cpath d='M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E") 8px center / 16px no-repeat;
  transition: border-color 0.2s;
}
.dm-tree-search input:focus {
  border-color: #e2383e;
  box-shadow: 0 0 0 2px rgba(226,56,62,0.1);
}

/* Tree */
.dm-tree {
  padding: 8px 0;
  max-height: 600px;
  overflow-y: auto;
}
.dm-tree::-webkit-scrollbar { width: 4px; }
.dm-tree::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }

.dm-tree-node {
  user-select: none;
}
.dm-tree-row {
  display: flex;
  align-items: center;
  padding: 8px 12px 8px 0;
  cursor: pointer;
  transition: background 0.15s;
  border-radius: 0;
  position: relative;
}
.dm-tree-row:hover { background: #fef2f2; }
.dm-tree-row.active {
  background: #fee2e2;
  color: #e2383e;
}
.dm-tree-row.active .dm-tree-label { color: #e2383e; font-weight: 600; }

.dm-tree-toggle {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  border-radius: 4px;
  transition: transform 0.2s;
}
.dm-tree-toggle svg {
  width: 14px;
  height: 14px;
  fill: #999;
  transition: transform 0.2s;
}
.dm-tree-toggle.expanded svg {
  transform: rotate(90deg);
}
.dm-tree-toggle.empty {
  visibility: hidden;
}

.dm-tree-folder {
  width: 18px;
  height: 18px;
  margin-right: 6px;
  flex-shrink: 0;
}
.dm-tree-folder svg { width: 100%; height: 100%; }
.dm-tree-folder.folder svg { fill: #f6ad55; }
.dm-tree-folder.folder-open svg { fill: #ed8936; }

.dm-tree-label {
  flex: 1;
  font-size: 13px;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dm-tree-count {
  font-size: 11px;
  color: #bbb;
  background: #f5f5f5;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 4px;
  flex-shrink: 0;
}
.dm-tree-row.active .dm-tree-count {
  background: #fecaca;
  color: #e2383e;
}

.dm-tree-children {
  display: none;
}
.dm-tree-children.show {
  display: block;
}

/* Vertical tree lines */
.dm-tree-children .dm-tree-row { padding-left: 0; }

/* Right: Table */
.dm-table-panel {
  flex: 1;
  min-width: 0;
  margin-left: 20px;
}
.dm-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  overflow: hidden;
}

/* Toolbar */
.dm-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid #f0f0f0;
}
.dm-toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dm-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dm-current-dept {
  font-size: 14px;
  font-weight: 600;
  color: #222;
}
.dm-current-dept span {
  color: #e2383e;
}
.dm-btn {
  height: 34px;
  padding: 0 14px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
  background: #fff;
  color: #555;
  white-space: nowrap;
}
.dm-btn:hover { border-color: #ccc; background: #fafafa; }
.dm-btn svg { width: 14px; height: 14px; }
.dm-btn-primary {
  background: #e2383e;
  color: #fff;
  border-color: #e2383e;
}
.dm-btn-primary:hover { background: #c53030; border-color: #c53030; }
.dm-btn-danger {
  color: #e2383e;
  border-color: #fecaca;
}
.dm-btn-danger:hover { background: #fff5f5; border-color: #e2383e; }
.dm-btn-sm {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

/* Table */
.dm-table {
  width: 100%;
  border-collapse: collapse;
}
.dm-table th {
  background: #fafafa;
  padding: 12px 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: #666;
  border-bottom: 1px solid #f0f0f0;
  white-space: nowrap;
}
.dm-table td {
  padding: 14px 16px;
  font-size: 13px;
  color: #333;
  border-bottom: 1px solid #f5f5f5;
  vertical-align: middle;
}
.dm-table tr:hover td { background: #fef9f9; }

/* Dept name with level indent */
.dm-dept-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dm-dept-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dm-dept-dot.level-0 { background: #e2383e; }
.dm-dept-dot.level-1 { background: #f6ad55; }
.dm-dept-dot.level-2 { background: #4f8ef7; }
.dm-dept-dot.level-3 { background: #48bb78; }

.dm-dept-name {
  font-weight: 500;
  color: #222;
}
.dm-dept-path {
  font-size: 11px;
  color: #bbb;
  margin-top: 2px;
}

/* Tags */
.dm-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}
.dm-tag-blue { background: #ebf5ff; color: #2b6cb0; }
.dm-tag-green { background: #f0fff4; color: #38a169; }
.dm-tag-orange { background: #fffaf0; color: #c05621; }
.dm-tag-red { background: #fff5f5; color: #e2383e; }
.dm-tag-gray { background: #f7f7f7; color: #999; }

/* Leader avatar */
.dm-leader {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dm-leader-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}
.dm-leader-avatar.c1 { background: linear-gradient(135deg, #f6ad55, #ed8936); }
.dm-leader-avatar.c2 { background: linear-gradient(135deg, #4f8ef7, #2b6cb0); }
.dm-leader-avatar.c3 { background: linear-gradient(135deg, #48bb78, #38a169); }
.dm-leader-avatar.c4 { background: linear-gradient(135deg, #fc8181, #e53e3e); }
.dm-leader-avatar.c5 { background: linear-gradient(135deg, #9f7aea, #805ad5); }

.dm-leader-name {
  font-size: 13px;
  color: #333;
}

/* Status */
.dm-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}
.dm-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.dm-status-dot.green { background: #48bb78; }
.dm-status-dot.red { background: #e53e3e; }
.dm-status-dot.orange { background: #ed8936; }

/* Action links */
.dm-action-link {
  color: #e2383e;
  text-decoration: none;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 0;
}
.dm-action-link:hover { text-decoration: underline; }
.dm-action-sep {
  color: #e0e0e0;
  margin: 0 6px;
  font-size: 12px;
}

/* Pagination */
.dm-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid #f0f0f0;
}
.dm-pagination-info {
  font-size: 13px;
  color: #999;
}
.dm-pagination-pages {
  display: flex;
  align-items: center;
  gap: 4px;
}
.dm-page-btn {
  min-width: 32px;
  height: 32px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  color: #555;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.dm-page-btn:hover { border-color: #e2383e; color: #e2383e; }
.dm-page-btn.active { background: #e2383e; color: #fff; border-color: #e2383e; }
.dm-page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ========== Role Management Page Styles ========== */

/* Layout - same as workspace */
.rm-layout {
  display: flex;
  min-height: 100vh;
  background: #f5f5f5;
}

/* Content Area */
.rm-content {
  flex: 1;
  padding: 0;
  min-height: 100vh;
}

.rm-main {
  padding: 24px;
  max-width: 1400px;
}

/* Breadcrumb */
.rm-breadcrumb {
  font-size: 13px;
  color: #999;
  margin-bottom: 16px;
}
.rm-breadcrumb a { color: #e2383e; text-decoration: none; }
.rm-breadcrumb a:hover { text-decoration: underline; }
.rm-breadcrumb span { margin: 0 6px; color: #ccc; }

/* Page Header */
.rm-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.rm-page-title {
  font-size: 22px;
  font-weight: 600;
  color: #222;
}
.rm-page-desc {
  font-size: 13px;
  color: #999;
  margin-top: 4px;
}

/* Stats Row */
.rm-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.rm-stat-card {
  background: #fff;
  border-radius: 8px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}
.rm-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.rm-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rm-stat-icon svg { width: 22px; height: 22px; fill: #fff; }
.rm-stat-icon.blue { background: linear-gradient(135deg, #4f8ef7, #2b6cb0); }
.rm-stat-icon.green { background: linear-gradient(135deg, #48bb78, #38a169); }
.rm-stat-icon.orange { background: linear-gradient(135deg, #f6ad55, #ed8936); }
.rm-stat-icon.red { background: linear-gradient(135deg, #fc8181, #e53e3e); }
.rm-stat-info {}
.rm-stat-value { font-size: 24px; font-weight: 700; color: #222; line-height: 1.2; }
.rm-stat-label { font-size: 13px; color: #999; margin-top: 2px; }

/* Main Layout: Role List + Permission Panel */
.rm-body {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

/* Left: Role List */
.rm-role-panel {
  width: 280px;
  flex-shrink: 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  overflow: hidden;
}
.rm-role-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #f0f0f0;
}
.rm-role-header-title { font-size: 15px; font-weight: 600; color: #222; }
.rm-role-header-actions { display: flex; gap: 6px; }
.rm-role-btn {
  width: 28px; height: 28px;
  border: none; border-radius: 6px;
  background: #f5f5f5; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.rm-role-btn:hover { background: #fee2e2; }
.rm-role-btn svg { width: 16px; height: 16px; fill: #666; }
.rm-role-btn:hover svg { fill: #e2383e; }

.rm-role-search {
  padding: 10px 16px;
  border-bottom: 1px solid #f0f0f0;
}
.rm-role-search input {
  width: 100%; height: 32px;
  border: 1px solid #e0e0e0; border-radius: 6px;
  padding: 0 10px 0 30px; font-size: 13px; outline: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23bbb'%3E%3Cpath d='M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E") 8px center / 16px no-repeat;
  transition: border-color 0.2s;
}
.rm-role-search input:focus {
  border-color: #e2383e;
  box-shadow: 0 0 0 2px rgba(226,56,62,0.1);
}

.rm-role-list {
  padding: 8px 0;
  max-height: 650px;
  overflow-y: auto;
}
.rm-role-list::-webkit-scrollbar { width: 4px; }
.rm-role-list::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }

.rm-role-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.15s;
  border-left: 3px solid transparent;
}
.rm-role-item:hover { background: #fef2f2; }
.rm-role-item.active {
  background: #fee2e2;
  border-left-color: #e2383e;
}
.rm-role-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-right: 10px;
}
.rm-role-icon svg { width: 18px; height: 18px; fill: #fff; }
.rm-role-icon.admin { background: linear-gradient(135deg, #e53e3e, #c53030); }
.rm-role-icon.purchase { background: linear-gradient(135deg, #4f8ef7, #2b6cb0); }
.rm-role-icon.finance { background: linear-gradient(135deg, #48bb78, #38a169); }
.rm-role-icon.viewer { background: linear-gradient(135deg, #a0aec0, #718096); }
.rm-role-icon.supplier { background: linear-gradient(135deg, #f6ad55, #ed8936); }
.rm-role-icon.custom { background: linear-gradient(135deg, #9f7aea, #805ad5); }

.rm-role-info { flex: 1; min-width: 0; }
.rm-role-name {
  font-size: 14px; font-weight: 500; color: #222;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rm-role-item.active .rm-role-name { color: #e2383e; font-weight: 600; }
.rm-role-meta {
  font-size: 12px; color: #999; margin-top: 2px;
  display: flex; align-items: center; gap: 8px;
}
.rm-role-badge {
  display: inline-block;
  padding: 0 6px; border-radius: 3px;
  font-size: 11px; line-height: 18px;
}
.rm-role-badge.system { background: #fee2e2; color: #e53e3e; }
.rm-role-badge.custom { background: #ebf4ff; color: #4f8ef7; }

.rm-role-actions {
  display: none; gap: 4px;
}
.rm-role-item:hover .rm-role-actions { display: flex; }
.rm-role-action-btn {
  width: 24px; height: 24px;
  border: none; border-radius: 4px;
  background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.rm-role-action-btn svg { width: 14px; height: 14px; fill: #999; }
.rm-role-action-btn:hover { background: #fff; }
.rm-role-action-btn:hover svg { fill: #e2383e; }

/* Right: Permission Panel */
.rm-perm-panel {
  flex: 1;
  min-width: 0;
}

.rm-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  overflow: hidden;
  margin-bottom: 20px;
}

/* Role Info Header */
.rm-role-info-header {
  padding: 20px 24px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.rm-role-info-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.rm-role-info-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.rm-role-info-icon svg { width: 24px; height: 24px; fill: #fff; }
.rm-role-info-text {}
.rm-role-info-name { font-size: 18px; font-weight: 600; color: #222; }
.rm-role-info-desc { font-size: 13px; color: #999; margin-top: 4px; }
.rm-role-info-meta {
  display: flex; gap: 16px; margin-top: 6px; font-size: 12px; color: #aaa;
}
.rm-role-info-meta span { display: flex; align-items: center; gap: 4px; }
.rm-role-info-meta svg { width: 12px; height: 12px; fill: #bbb; }

.rm-role-info-actions { display: flex; gap: 8px; }

/* Permission Matrix Toolbar */
.rm-perm-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid #f0f0f0;
  background: #fafafa;
}
.rm-perm-toolbar-left { display: flex; align-items: center; gap: 12px; }
.rm-perm-toolbar-right { display: flex; align-items: center; gap: 10px; }

/* Permission Matrix */
.rm-perm-matrix {
  padding: 0;
}

.rm-perm-module {
  border-bottom: 1px solid #f0f0f0;
}
.rm-perm-module:last-child { border-bottom: none; }

.rm-perm-module-header {
  display: flex;
  align-items: center;
  padding: 14px 24px;
  background: #fafafa;
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
}
.rm-perm-module-header:hover { background: #f5f5f5; }

.rm-perm-module-toggle {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  margin-right: 8px; flex-shrink: 0;
  transition: transform 0.2s;
}
.rm-perm-module-toggle svg { width: 12px; height: 12px; fill: #999; }
.rm-perm-module-toggle.expanded svg { transform: rotate(90deg); }

.rm-perm-module-icon {
  width: 28px; height: 28px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  margin-right: 10px; flex-shrink: 0;
}
.rm-perm-module-icon svg { width: 14px; height: 14px; fill: #fff; }

.rm-perm-module-name { font-size: 14px; font-weight: 600; color: #333; flex: 1; }

.rm-perm-module-checkall {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; color: #999; cursor: pointer;
  margin-right: 8px;
}
.rm-perm-module-checkall:hover { color: #e2383e; }

.rm-perm-module-count {
  font-size: 12px; color: #aaa;
  background: #f0f0f0; padding: 2px 8px; border-radius: 10px;
}
.rm-perm-module-count .checked { color: #e2383e; font-weight: 600; }

/* Permission Rows */
.rm-perm-rows {
  display: none;
}
.rm-perm-rows.show { display: block; }

.rm-perm-row {
  display: flex;
  align-items: center;
  padding: 12px 24px 12px 62px;
  border-top: 1px solid #f7f7f7;
  transition: background 0.1s;
}
.rm-perm-row:hover { background: #fefcff; }

.rm-perm-name {
  width: 160px;
  font-size: 13px;
  color: #444;
  flex-shrink: 0;
}
.rm-perm-desc {
  width: 180px;
  font-size: 12px;
  color: #aaa;
  flex-shrink: 0;
}
.rm-perm-actions {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.rm-perm-check {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #666;
  cursor: pointer;
  user-select: none;
  transition: color 0.15s;
}
.rm-perm-check:hover { color: #e2383e; }

.rm-perm-check input[type="checkbox"] {
  width: 15px; height: 15px;
  accent-color: #e2383e;
  cursor: pointer;
}
.rm-perm-check.checked { color: #e2383e; font-weight: 500; }

/* Members Section */
.rm-members {
  padding: 20px 24px;
}

.rm-members-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.rm-members-title { font-size: 15px; font-weight: 600; color: #222; }

.rm-member-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.rm-member-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: #f9f9f9;
  border: 1px solid #f0f0f0;
  border-radius: 20px;
  font-size: 13px;
  color: #444;
  transition: all 0.15s;
}
.rm-member-chip:hover { border-color: #e2383e; background: #fef2f2; }

.rm-member-avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; color: #fff;
}
.rm-member-avatar.c1 { background: linear-gradient(135deg, #fc8181, #e53e3e); }
.rm-member-avatar.c2 { background: linear-gradient(135deg, #63b3ed, #3182ce); }
.rm-member-avatar.c3 { background: linear-gradient(135deg, #68d391, #38a169); }
.rm-member-avatar.c4 { background: linear-gradient(135deg, #f6ad55, #ed8936); }
.rm-member-avatar.c5 { background: linear-gradient(135deg, #b794f4, #805ad5); }
.rm-member-avatar.c6 { background: linear-gradient(135deg, #f687b3, #d53f8c); }

.rm-member-remove {
  width: 16px; height: 16px;
  border: none; background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.15s;
}
.rm-member-chip:hover .rm-member-remove { opacity: 1; }
.rm-member-remove svg { width: 12px; height: 12px; fill: #999; }
.rm-member-remove:hover svg { fill: #e2383e; }

/* Buttons */
.rm-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  color: #555;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.rm-btn:hover { border-color: #e2383e; color: #e2383e; }
.rm-btn svg { width: 14px; height: 14px; fill: currentColor; }

.rm-btn-primary {
  background: #e2383e;
  border-color: #e2383e;
  color: #fff;
}
.rm-btn-primary:hover {
  background: #c53030;
  border-color: #c53030;
  color: #fff;
}

.rm-btn-sm {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

/* Modal */
.rm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s;
}
.rm-modal-overlay.show { display: flex; }

.rm-modal {
  background: #fff;
  border-radius: 12px;
  width: 520px;
  max-width: 90vw;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  animation: slideUp 0.25s;
}
.rm-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #f0f0f0;
}
.rm-modal-title { font-size: 17px; font-weight: 600; color: #222; }
.rm-modal-close {
  width: 32px; height: 32px;
  border: none; background: #f5f5f5; border-radius: 8px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.rm-modal-close:hover { background: #fee2e2; }
.rm-modal-close svg { width: 18px; height: 18px; fill: #666; }

.rm-modal-body { padding: 24px; }

.rm-form-group { margin-bottom: 18px; }
.rm-form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #444;
  margin-bottom: 6px;
}
.rm-form-label .required { color: #e2383e; margin-left: 2px; }
.rm-form-input, .rm-form-select, .rm-form-textarea {
  width: 100%;
  height: 38px;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 0 12px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.rm-form-input:focus, .rm-form-select:focus, .rm-form-textarea:focus {
  border-color: #e2383e;
  box-shadow: 0 0 0 2px rgba(226,56,62,0.1);
}
.rm-form-input.error, .rm-form-select.error { border-color: #e53e3e; }
.rm-form-error { font-size: 12px; color: #e53e3e; margin-top: 4px; display: none; }
.rm-form-hint { font-size: 12px; color: #aaa; margin-top: 4px; }
.rm-form-textarea { height: 80px; padding: 10px 12px; resize: vertical; }
.rm-form-select { appearance: auto; }
.rm-form-row { display: flex; gap: 16px; }
.rm-form-row .rm-form-group { flex: 1; }

.rm-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid #f0f0f0;
}

/* Delete Confirm */
.rm-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1001;
  display: none;
  align-items: center;
  justify-content: center;
}
.rm-confirm-overlay.show { display: flex; }

.rm-confirm {
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  width: 400px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.rm-confirm-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #fee2e2;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.rm-confirm-icon svg { width: 28px; height: 28px; fill: #e53e3e; }
.rm-confirm-title { font-size: 17px; font-weight: 600; color: #222; margin-bottom: 8px; }
.rm-confirm-desc { font-size: 13px; color: #999; line-height: 1.6; margin-bottom: 24px; }
.rm-confirm-actions { display: flex; gap: 10px; justify-content: center; }

/* Toast */
.rm-toast {
  position: fixed;
  top: 24px;
  right: 24px;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 13px;
  color: #fff;
  z-index: 2000;
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.rm-toast.success { background: linear-gradient(135deg, #48bb78, #38a169); }
.rm-toast.error { background: linear-gradient(135deg, #fc8181, #e53e3e); }
.rm-toast.show { transform: translateX(0); }

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Responsive */
@media (max-width: 1200px) {
  .rm-body { flex-direction: column; }
  .rm-role-panel { width: 100%; }
  .rm-role-list { max-height: 200px; }
  .rm-perm-desc { display: none; }
}
@media (max-width: 768px) {
  .rm-content { margin-left: 0; }
  .rm-stats { grid-template-columns: repeat(2, 1fr); }
  .rm-perm-row { padding-left: 24px; flex-wrap: wrap; }
  .rm-perm-name { width: 100%; margin-bottom: 8px; }
  .rm-perm-desc { display: none; }
  .rm-perm-actions { gap: 16px; }
  .rm-form-row { flex-direction: column; gap: 0; }
}


/* ===== Join Enterprise Page ===== */
.je-layout { display: flex; min-height: 100vh; background: #f5f5f5; }
.je-content { flex: 1; display: flex; flex-direction: column; overflow-y: auto; }
.je-main { flex: 1; padding: 20px 24px; margin: 0 auto; width: 100%; }

/* Breadcrumb */
.je-breadcrumb { font-size: 13px; color: #999; margin-bottom: 16px; display: flex; align-items: center; gap: 6px; }
.je-breadcrumb a { color: #888; text-decoration: none; }
.je-breadcrumb a:hover { color: #e2383e; }

/* Page Header */
.je-page-header { margin-bottom: 20px; }
.je-page-title { font-size: 20px; font-weight: 700; color: #222; margin-bottom: 4px; }
.je-page-desc { font-size: 13px; color: #999; }

/* Steps */
.je-steps { display: flex; align-items: center; background: #fff; border-radius: 10px; padding: 20px 32px; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.je-step { display: flex; align-items: center; gap: 10px; flex: 1; position: relative; }
.je-step:not(:last-child)::after { content: ''; position: absolute; right: -10px; top: 50%; width: 20px; height: 2px; background: #e0e0e0; transform: translateY(-50%); }
.je-step.active:not(:last-child)::after,
.je-step.done:not(:last-child)::after { background: #e2383e; }
.je-step-num { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; background: #f0f0f0; color: #aaa; flex-shrink: 0; position: relative; z-index: 1; }
.je-step.active .je-step-num { background: linear-gradient(135deg, #e2383e, #c53030); color: #fff; box-shadow: 0 2px 8px rgba(226,56,62,0.3); }
.je-step.done .je-step-num { background: linear-gradient(135deg, #48bb78, #38a169); color: #fff; }
.je-step-text { font-size: 13px; color: #999; font-weight: 500; }
.je-step.active .je-step-text { color: #e2383e; font-weight: 600; }
.je-step.done .je-step-text { color: #48bb78; }

/* Card */
.je-card { background: #fff; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); margin-bottom: 16px; overflow: hidden; }
.je-card-header { padding: 16px 20px; border-bottom: 1px solid #f0f0f0; display: flex; align-items: center; justify-content: space-between; }
.je-card-title { font-size: 15px; font-weight: 600; color: #222; display: flex; align-items: center; gap: 8px; }
.je-card-title .icon { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; border-radius: 5px; }
.je-card-title .icon svg { width: 14px; height: 14px; fill: #fff; }
.je-card-body { padding: 20px; }

/* Search */
.je-search-box { display: flex; gap: 10px; margin-bottom: 16px; }
.je-search-input { flex: 1; height: 40px; border: 1px solid #ddd; border-radius: 8px; padding: 0 14px 0 38px; font-size: 14px; outline: none; background: #fafafa url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23aaa'%3E%3Cpath d='M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 109.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E") 12px center/16px no-repeat; transition: all 0.2s; }
.je-search-input:focus { border-color: #e2383e; background-color: #fff; box-shadow: 0 0 0 3px rgba(226,56,62,0.08); }
.je-search-btn { height: 40px; padding: 0 20px; background: linear-gradient(135deg, #e2383e, #c53030); color: #fff; border: none; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: opacity 0.2s; }
.je-search-btn:hover { opacity: 0.9; }

/* Hot Tags */
.je-hot-tags { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.je-hot-label { font-size: 12px; color: #999; flex-shrink: 0; }
.je-hot-tag { padding: 4px 12px; border-radius: 20px; font-size: 12px; color: #666; background: #f5f5f5; cursor: pointer; transition: all 0.2s; border: 1px solid transparent; }
.je-hot-tag:hover { background: #fff5f5; color: #e2383e; border-color: #fecaca; }

/* Company List */
.je-company-list { display: flex; flex-direction: column; gap: 12px; }
.je-company-card { display: flex; align-items: center; gap: 16px; padding: 16px; border: 1px solid #f0f0f0; border-radius: 10px; cursor: pointer; transition: all 0.2s; position: relative; }
.je-company-card:hover { border-color: #e2383e; box-shadow: 0 2px 12px rgba(226,56,62,0.1); transform: translateY(-1px); }
.je-company-card.selected { border-color: #e2383e; background: #fff5f5; }
.je-company-card.selected::before { content: ''; position: absolute; top: 0; right: 0; width: 0; height: 0; border-style: solid; border-width: 0 32px 32px 0; border-color: transparent #e2383e transparent transparent; }
.je-company-card.selected::after { content: '✓'; position: absolute; top: 2px; right: 4px; color: #fff; font-size: 10px; font-weight: 700; }

.je-company-logo { width: 56px; height: 56px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; color: #fff; flex-shrink: 0; }
.je-company-info { flex: 1; min-width: 0; }
.je-company-name { font-size: 15px; font-weight: 600; color: #222; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.je-company-name .verified { display: inline-flex; align-items: center; gap: 3px; padding: 1px 6px; border-radius: 3px; font-size: 10px; font-weight: 500; color: #fff; }
.je-company-name .verified.green { background: linear-gradient(135deg, #48bb78, #38a169); }
.je-company-name .verified.orange { background: linear-gradient(135deg, #f6ad55, #ed8936); }
.je-company-detail { font-size: 12px; color: #999; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.je-company-detail span { display: flex; align-items: center; gap: 3px; }
.je-company-detail svg { width: 12px; height: 12px; fill: #bbb; }
.je-company-tags { display: flex; gap: 6px; margin-top: 6px; }
.je-company-tag { padding: 2px 8px; border-radius: 3px; font-size: 11px; }
.je-company-tag.blue { background: #ebf4ff; color: #2b6cb0; }
.je-company-tag.red { background: #fff5f5; color: #e2383e; }
.je-company-tag.green { background: #f0fff4; color: #38a169; }
.je-company-tag.purple { background: #faf5ff; color: #805ad5; }
.je-company-tag.orange { background: #fffaf0; color: #dd6b20; }

.je-company-action { flex-shrink: 0; }
.je-join-btn { padding: 6px 18px; border-radius: 6px; font-size: 13px; font-weight: 500; cursor: pointer; border: 1px solid #e2383e; color: #e2383e; background: #fff; transition: all 0.2s; }
.je-join-btn:hover { background: #e2383e; color: #fff; }
.je-join-btn.joined { border-color: #48bb78; color: #48bb78; cursor: default; background: #f0fff4; }
.je-join-btn.pending { border-color: #f6ad55; color: #dd6b20; cursor: default; background: #fffaf0; }

/* Application Form */
.je-form-section { display: none; }
.je-form-section.show { display: block; }
.je-form-group { margin-bottom: 16px; }
.je-form-label { display: block; font-size: 13px; font-weight: 600; color: #444; margin-bottom: 6px; }
.je-form-label .required { color: #e2383e; margin-left: 2px; }
.je-form-input { width: 100%; height: 40px; border: 1px solid #ddd; border-radius: 8px; padding: 0 14px; font-size: 14px; outline: none; transition: all 0.2s; box-sizing: border-box; }
.je-form-input:focus { border-color: #e2383e; box-shadow: 0 0 0 3px rgba(226,56,62,0.08); }
.je-form-input.error { border-color: #e53e3e; }
.je-form-select { width: 100%; height: 40px; border: 1px solid #ddd; border-radius: 8px; padding: 0 14px; font-size: 14px; outline: none; background: #fff; cursor: pointer; transition: all 0.2s; box-sizing: border-box; }
.je-form-select:focus { border-color: #e2383e; box-shadow: 0 0 0 3px rgba(226,56,62,0.08); }
.je-form-textarea { width: 100%; min-height: 80px; border: 1px solid #ddd; border-radius: 8px; padding: 10px 14px; font-size: 14px; outline: none; resize: vertical; transition: all 0.2s; box-sizing: border-box; font-family: inherit; }
.je-form-textarea:focus { border-color: #e2383e; box-shadow: 0 0 0 3px rgba(226,56,62,0.08); }
.je-form-error { font-size: 12px; color: #e53e3e; margin-top: 4px; display: none; }
.je-form-hint { font-size: 12px; color: #aaa; margin-top: 4px; }
.je-form-row { display: flex; gap: 12px; }
.je-form-row .je-form-group { flex: 1; }

/* Department Select */
.je-dept-select { position: relative; }
.je-dept-trigger { width: 100%; height: 40px; border: 1px solid #ddd; border-radius: 8px; padding: 0 14px; font-size: 14px; outline: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; background: #fff; transition: all 0.2s; box-sizing: border-box; color: #333; }
.je-dept-trigger:focus,
.je-dept-trigger.open { border-color: #e2383e; box-shadow: 0 0 0 3px rgba(226,56,62,0.08); }
.je-dept-trigger svg { width: 14px; height: 14px; fill: #999; transition: transform 0.2s; }
.je-dept-trigger.open svg { transform: rotate(180deg); }
.je-dept-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,0.1); z-index: 100; max-height: 200px; overflow-y: auto; display: none; margin-top: 4px; }
.je-dept-dropdown.show { display: block; }
.je-dept-option { padding: 8px 14px; font-size: 13px; cursor: pointer; transition: background 0.15s; }
.je-dept-option:hover { background: #fff5f5; color: #e2383e; }
.je-dept-option.selected { background: #fff5f5; color: #e2383e; font-weight: 600; }
.je-dept-option.indent { padding-left: 28px; }
.je-dept-option.indent2 { padding-left: 42px; }

/* Invite Code */
.je-invite-box { display: flex; gap: 10px; align-items: center; }
.je-invite-input { flex: 1; }

/* Selected Company Banner */
.je-selected-banner { display: none; background: linear-gradient(135deg, #fff5f5, #fee2e2); border: 1px solid #fecaca; border-radius: 10px; padding: 16px 20px; margin-bottom: 16px; }
.je-selected-banner.show { display: flex; align-items: center; gap: 16px; }
.je-selected-banner .je-company-logo { width: 48px; height: 48px; font-size: 18px; }
.je-selected-info { flex: 1; }
.je-selected-name { font-size: 15px; font-weight: 600; color: #222; }
.je-selected-detail { font-size: 12px; color: #888; margin-top: 2px; }
.je-selected-change { font-size: 13px; color: #e2383e; cursor: pointer; font-weight: 500; }
.je-selected-change:hover { text-decoration: underline; }

/* My Applications */
.je-app-list { display: flex; flex-direction: column; gap: 10px; }
.je-app-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid #f0f0f0; border-radius: 8px; transition: all 0.2s; }
.je-app-item:hover { border-color: #e0e0e0; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
.je-app-logo { width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; color: #fff; flex-shrink: 0; }
.je-app-info { flex: 1; }
.je-app-name { font-size: 14px; font-weight: 600; color: #222; }
.je-app-meta { font-size: 12px; color: #999; margin-top: 2px; }
.je-app-status { font-size: 12px; padding: 3px 10px; border-radius: 20px; font-weight: 500; }
.je-app-status.pending { background: #fffaf0; color: #dd6b20; }
.je-app-status.approved { background: #f0fff4; color: #38a169; }
.je-app-status.rejected { background: #fff5f5; color: #e53e3e; }
.je-app-action { font-size: 12px; color: #e2383e; cursor: pointer; font-weight: 500; }
.je-app-action:hover { text-decoration: underline; }

/* Empty State */
.je-empty { text-align: center; padding: 40px 20px; }
.je-empty svg { width: 64px; height: 64px; fill: #ddd; margin-bottom: 12px; }
.je-empty-text { font-size: 14px; color: #aaa; }

/* Bottom Actions */
.je-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 0; border-top: 1px solid #f0f0f0; margin-top: 8px; }
.je-btn { height: 38px; padding: 0 20px; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; border: 1px solid #ddd; background: #fff; color: #555; transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px; }
.je-btn:hover { border-color: #ccc; background: #fafafa; }
.je-btn-primary { background: linear-gradient(135deg, #e2383e, #c53030); color: #fff; border: none; }
.je-btn-primary:hover { opacity: 0.9; background: linear-gradient(135deg, #e2383e, #c53030); }
.je-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

/* Success */
.je-success { text-align: center; padding: 40px 20px; display: none; }
.je-success.show { display: block; }
.je-success-icon { width: 72px; height: 72px; border-radius: 50%; background: linear-gradient(135deg, #48bb78, #38a169); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; animation: jePopIn 0.4s ease; }
.je-success-icon svg { width: 36px; height: 36px; fill: #fff; }
.je-success-title { font-size: 18px; font-weight: 700; color: #222; margin-bottom: 6px; }
.je-success-desc { font-size: 14px; color: #888; margin-bottom: 24px; }
.je-success-actions { display: flex; gap: 10px; justify-content: center; }

@keyframes jePopIn { 0% { transform: scale(0); opacity: 0; } 50% { transform: scale(1.1); } 100% { transform: scale(1); opacity: 1; } }

/* Toast */
.je-toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-80px); background: #222; color: #fff; padding: 10px 24px; border-radius: 8px; font-size: 14px; z-index: 10000; transition: transform 0.3s ease; pointer-events: none; }
.je-toast.show { transform: translateX(-50%) translateY(0); }
.je-toast.success { background: linear-gradient(135deg, #48bb78, #38a169); }
.je-toast.error { background: linear-gradient(135deg, #e53e3e, #c53030); }

/* Responsive */
@media (max-width: 768px) {
  .je-main { padding: 16px; }
  .je-steps { padding: 16px; flex-wrap: wrap; gap: 8px; }
  .je-step:not(:last-child)::after { display: none; }
  .je-company-card { flex-direction: column; align-items: flex-start; }
  .je-form-row { flex-direction: column; gap: 0; }
  .je-search-box { flex-direction: column; }
}

/* ========== Employee List Page ========== */

/* Stats Row */
.emp-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.emp-stat-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  transition: transform .2s, box-shadow .2s;
}
.emp-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}
.emp-stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.emp-stat-icon svg { width: 24px; height: 24px; fill: #fff; }
.emp-stat-icon.total { background: linear-gradient(135deg, #e2383e, #ff6b6b); }
.emp-stat-icon.active { background: linear-gradient(135deg, #22c55e, #4ade80); }
.emp-stat-icon.inactive { background: linear-gradient(135deg, #94a3b8, #cbd5e1); }
.emp-stat-icon.trial { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.emp-stat-icon.pending { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.emp-stat-info {}
.emp-stat-num { font-size: 24px; font-weight: 700; color: #1f2937; }
.emp-stat-label { font-size: 13px; color: #6b7280; margin-top: 2px; }

/* Toolbar */
.emp-toolbar {
  background: #fff;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.emp-toolbar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.emp-toolbar-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.emp-toolbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.emp-btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all .15s;
  white-space: nowrap;
}
.emp-btn:hover { border-color: #e2383e; color: #e2383e; }
.emp-btn svg { width: 16px; height: 16px; }
.emp-btn-primary {
  background: #e2383e;
  border-color: #e2383e;
  color: #fff;
}
.emp-btn-primary:hover { background: #c62d32; border-color: #c62d32; color: #fff; }
.emp-btn-outline { background: #fff; }
.emp-search {
  display: flex;
  align-items: center;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 0 12px;
  transition: border-color .2s, box-shadow .2s;
}
.emp-search:focus-within {
  border-color: #e2383e;
  box-shadow: 0 0 0 3px rgba(226,56,62,.1);
}
.emp-search svg { width: 16px; height: 16px; fill: #9ca3af; flex-shrink: 0; }
.emp-search input {
  border: none;
  background: none;
  padding: 8px 10px;
  font-size: 13px;
  outline: none;
  width: 200px;
  color: #1f2937;
}
.emp-search input::placeholder { color: #9ca3af; }

/* Filter Row */
.emp-filter {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f3f4f6;
  flex-wrap: wrap;
}
.emp-filter label {
  font-size: 13px;
  color: #6b7280;
  white-space: nowrap;
}
.emp-filter select,
.emp-filter input[type="date"] {
  padding: 6px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 13px;
  color: #374151;
  background: #fff;
  outline: none;
  transition: border-color .2s;
}
.emp-filter select:focus,
.emp-filter input[type="date"]:focus {
  border-color: #e2383e;
  box-shadow: 0 0 0 2px rgba(226,56,62,.08);
}
.emp-filter-sep { color: #d1d5db; }

/* Batch Bar */
.emp-batch {
  background: linear-gradient(135deg, #fff5f5, #fee2e2);
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 10px 20px;
  margin-bottom: 16px;
  display: none;
  align-items: center;
  justify-content: space-between;
}
.emp-batch.show { display: flex; }
.emp-batch-left { display: flex; align-items: center; gap: 12px; font-size: 13px; color: #374151; }
.emp-batch-left strong { color: #e2383e; }
.emp-batch-btns { display: flex; gap: 8px; }

/* Table */
.emp-table-wrap {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  overflow: hidden;
}
.emp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.emp-table thead {
  background: #f9fafb;
}
.emp-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #6b7280;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
}
.emp-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f3f4f6;
  color: #374151;
  vertical-align: middle;
}
.emp-table tbody tr:hover { background: #fef2f2; }
.emp-table tbody tr:last-child td { border-bottom: none; }

/* Checkbox */
.emp-ck {
  width: 16px; height: 16px;
  accent-color: #e2383e;
  cursor: pointer;
  vertical-align: middle;
}

/* Employee Info Cell */
.emp-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.emp-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; color: #fff;
  flex-shrink: 0;
  position: relative;
}
.emp-avatar.offline::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 10px; height: 10px;
  background: #9ca3af;
  border: 2px solid #fff;
  border-radius: 50%;
}
.emp-avatar.online::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 10px; height: 10px;
  background: #22c55e;
  border: 2px solid #fff;
  border-radius: 50%;
}
.emp-detail {}
.emp-name { font-weight: 600; color: #1f2937; font-size: 14px; }
.emp-id { font-size: 12px; color: #9ca3af; margin-top: 2px; }

/* Tags */
.emp-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}
.emp-tag-admin { background: #fef2f2; color: #e2383e; }
.emp-tag-manager { background: #eff6ff; color: #3b82f6; }
.emp-tag-buyer { background: #f0fdf4; color: #16a34a; }
.emp-tag-finance { background: #fefce8; color: #ca8a04; }
.emp-tag-staff { background: #f3f4f6; color: #6b7280; }
.emp-tag-supplier { background: #fff7ed; color: #ea580c; }
.emp-tag-auditor { background: #faf5ff; color: #9333ea; }

/* Status */
.emp-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
}
.emp-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.emp-dot-active { background: #22c55e; }
.emp-dot-inactive { background: #9ca3af; }
.emp-dot-trial { background: #f59e0b; animation: empPulse 2s infinite; }
.emp-dot-pending { background: #3b82f6; animation: empPulse 2s infinite; }
@keyframes empPulse {
  0%,100% { opacity: 1; }
  50% { opacity: .4; }
}
.emp-status-active { color: #16a34a; }
.emp-status-inactive { color: #9ca3af; }
.emp-status-trial { color: #d97706; }
.emp-status-pending { color: #3b82f6; }

/* Department */
.emp-dept { color: #374151; }
.emp-dept-sub { font-size: 11px; color: #9ca3af; margin-top: 2px; }

/* Action Links */
.emp-actions { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.emp-act {
  padding: 4px 8px;
  font-size: 12px;
  color: #e2383e;
  cursor: pointer;
  border-radius: 4px;
  transition: background .15s;
  white-space: nowrap;
  text-decoration: none;
  border: none;
  background: none;
}
.emp-act:hover { background: #fef2f2; }
.emp-act.danger { color: #dc2626; }
.emp-act.danger:hover { background: #fef2f2; }
.emp-act-sep { color: #e5e7eb; font-size: 12px; }

/* Pagination */
.emp-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-top: 1px solid #f3f4f6;
  font-size: 13px;
  color: #6b7280;
}
.emp-page-btns { display: flex; gap: 4px; }
.emp-page-btn {
  width: 32px; height: 32px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  background: #fff;
  color: #374151;
  font-size: 13px;
  transition: all .15s;
}
.emp-page-btn:hover { border-color: #e2383e; color: #e2383e; }
.emp-page-btn.active { background: #e2383e; border-color: #e2383e; color: #fff; }
.emp-page-btn.disabled { opacity: .4; cursor: not-allowed; }
