/* 
  Custom styles for Users Management Page
  Converted from Tailwind CSS 
*/

.usm-page {
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
  color: #111827;
}

.usm-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.usm-header-left {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.usm-title {
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  line-height: 1.25;
  font-family: "Playfair Display", serif;
  margin: 0;
}

.usm-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin-top: 4px;
  margin-bottom: 0;
}

.usm-header-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.usm-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  background-color: #1c4a35;
  color: #ffffff;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  border: none;
}

.usm-btn-primary:hover {
  background-color: #163d2b;
}

.usm-btn-primary svg {
  width: 14px;
  height: 14px;
}

/* KPIs */
.usm-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.usm-kpi-card {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 16px;
}

.usm-kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.usm-kpi-icon svg {
  width: 17px;
  height: 17px;
  color: #ffffff;
}

.usm-kpi-icon.bg-primary {
  background-color: #1c4a35;
}
.usm-kpi-icon.bg-success {
  background-color: #059669;
}
.usm-kpi-icon.bg-danger {
  background-color: #ef4444;
}
.usm-kpi-icon.bg-info {
  background-color: #0891b2;
}

.usm-kpi-val {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  font-family: "Playfair Display", serif;
  line-height: 1;
}

.usm-kpi-lbl {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}

/* Table Card */
.usm-table-card {
  background-color: #ffffff;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

/* Table Styles */
.usm-table-card table.dataTable {
  width: 100% !important;
  font-size: 14px;
  border-collapse: collapse;
  margin: 0 !important;
}

.usm-table-card table.dataTable thead th {
  text-align: left;
  padding: 16px 20px;
  font-size: 12px;
  color: #111827;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  border-bottom: 1px solid #f3f4f6;
  background-color: transparent;
  position: relative;
  cursor: pointer;
}

.usm-table-card table.dataTable thead th.sorting:before,
.usm-table-card table.dataTable thead th.sorting:after,
.usm-table-card table.dataTable thead th.sorting_asc:before,
.usm-table-card table.dataTable thead th.sorting_asc:after,
.usm-table-card table.dataTable thead th.sorting_desc:before,
.usm-table-card table.dataTable thead th.sorting_desc:after {
  position: absolute;
  right: 8px;
  display: block;
  opacity: 0.3;
  font-size: 8px;
}
.usm-table-card table.dataTable thead th.sorting:before,
.usm-table-card table.dataTable thead th.sorting_asc:before,
.usm-table-card table.dataTable thead th.sorting_desc:before {
  content: "▲";
  bottom: 50%;
}
.usm-table-card table.dataTable thead th.sorting:after,
.usm-table-card table.dataTable thead th.sorting_asc:after,
.usm-table-card table.dataTable thead th.sorting_desc:after {
  content: "▼";
  top: 50%;
}
.usm-table-card table.dataTable thead th.sorting_asc:before {
  opacity: 1;
  color: #111827;
}
.usm-table-card table.dataTable thead th.sorting_desc:after {
  opacity: 1;
  color: #111827;
}

.usm-table-card table.dataTable tbody tr {
  border-bottom: 1px solid #f9fafb;
  transition: background-color 0.2s;
}

.usm-table-card table.dataTable tbody tr:hover {
  background-color: rgba(249, 250, 251, 0.4);
}

.usm-table-card table.dataTable tbody td {
  padding: 16px 20px;
  vertical-align: middle;
}

.usm-font-semibold {
  font-weight: 600;
}
.usm-font-medium {
  font-weight: 500;
}
.usm-text-dark {
  color: #111827;
}

.usm-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.usm-text-muted {
  color: #9ca3af;
}
.usm-text-gray {
  color: #6b7280;
}

/* User Info Layout */
.usm-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.usm-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(28, 74, 53, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1c4a35;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}

.usm-user-name {
  font-weight: 700;
  color: #1f2937;
}

/* Badges */
.usm-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  gap: 6px;
}
.usm-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
}
.usm-badge-violet {
  background-color: #ede9fe;
  color: #6d28d9;
}
.usm-badge-blue {
  background-color: #dbeafe;
  color: #1d4ed8;
}
.usm-badge-green {
  background-color: #dcfce7;
  color: #166534;
}
.usm-badge-amber {
  background-color: #fef3c7;
  color: #b45309;
}
.usm-badge-red {
  background-color: #fee2e2;
  color: #b91c1c;
}
.usm-badge-emerald {
  background-color: #d1fae5;
  color: #047857;
}

/* Actions */
.usm-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.usm-btn-action {
  padding: 6px;
  color: #d1d5db;
  border-radius: 8px;
  transition: all 0.2s;
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.usm-btn-action svg {
  width: 14px;
  height: 14px;
}

.usm-btn-action.action-view:hover {
  color: #3b82f6;
  background-color: #eff6ff;
}
.usm-btn-action.action-edit:hover {
  color: #10b981;
  background-color: #ecfdf5;
}
.usm-btn-action.action-lock:hover {
  color: #f59e0b;
  background-color: #fffbeb;
}
.usm-btn-action.action-unlock:hover {
  color: #8b5cf6;
  background-color: #f5f3ff;
}

/* Roles & Permissions */
.usm-role-sidebar {
  background-color: #ffffff;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  padding: 12px;
}
.usm-role-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  background-color: transparent;
  border: none;
  width: 100%;
  color: #4b5563;
  font-size: 14px;
  font-weight: 500;
}
.usm-role-item:hover {
  background-color: #f3f4f6;
}
.usm-role-item.is-active {
  background-color: #1c4a35;
  color: #ffffff;
}
.usm-role-item svg {
  width: 16px;
  height: 16px;
}
.usm-role-count {
  font-size: 12px;
  background-color: rgba(0, 0, 0, 0.05);
  padding: 2px 6px;
  border-radius: 999px;
}
.usm-role-item.is-active .usm-role-count {
  background-color: rgba(255, 255, 255, 0.2);
}

.usm-perm-pane {
  background-color: #ffffff;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  padding: 24px;
}
.usm-perm-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.usm-perm-title {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}
.usm-perm-desc {
  font-size: 14px;
  color: #6b7280;
  margin-top: 4px;
}
.usm-perm-group {
  margin-bottom: 24px;
}
.usm-perm-group-title {
  font-size: 12px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}
.usm-perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.usm-perm-item {
  display: flex;
  align-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s;
  background-color: #ffffff;
  gap: 8px;
}
.usm-perm-item:hover {
  border-color: #1c4a35;
  background-color: #f8fafc;
}
.usm-perm-item input[type="checkbox"] {
  width: 14px;
  height: 14px;
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}
.usm-perm-label {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.usm-perm-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 9px;
  color: #9ca3af;
  margin-left: auto;
}

/* End of overrides */
