/* Staff User Management — dashboard / website-list theme (no Tailwind deps) */

#staff-user-mgmt-root,
#staff-user-mgmt-root * {
  box-sizing: border-box;
}

#staff-user-mgmt-root {
  font-family: Poppins, ui-sans-serif, system-ui, sans-serif;
  color: #1e293b;
}

#staff-user-mgmt-root .sum-card,
#staff-user-mgmt-root .sum-btn-add,
#staff-user-mgmt-root .sum-btn-primary,
#staff-user-mgmt-root .sum-btn-secondary,
#staff-user-mgmt-root .sum-btn-edit,
#staff-user-mgmt-root .sum-btn-delete,
#staff-user-mgmt-root .sum-field-input,
#staff-user-mgmt-root .sum-modal,
#staff-user-mgmt-root .sum-alert,
#staff-user-mgmt-root .sum-badge {
  border-radius: var(--staff-radius, 3px) !important;
}

#staff-user-mgmt-root .sum-accent-bar {
  border-radius: 999px !important;
}

.sum-page {
  max-width: 80rem;
  margin: 0 auto;
}

.sum-card {
  background: #fff;
  border: 1px solid #e8ecf1;
  border-radius: var(--staff-radius, 3px);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
  animation: sumFadeIn 0.3s ease-out;
}

.sum-ln-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #0f172a 100%);
}

.sum-ln-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sum-accent-bar {
  width: 4px;
  height: 28px;
  border-radius: var(--staff-radius, 3px);
  flex-shrink: 0;
  background: linear-gradient(180deg, #facc15 0%, #f59e0b 100%);
}

.sum-ln-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sum-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
}

.sum-btn-add,
.sum-btn-primary {
  border: none;
  border-radius: var(--staff-radius, 3px);
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  box-shadow: 0 1px 4px rgba(59, 130, 246, 0.25);
  transition: all 0.2s ease;
}

.sum-btn-add:hover,
.sum-btn-primary:hover {
  filter: brightness(1.05);
  box-shadow: 0 3px 8px rgba(59, 130, 246, 0.3);
  transform: translateY(-1px);
}

.sum-btn-secondary {
  border: 1px solid #e2e8f0;
  border-radius: var(--staff-radius, 3px);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sum-btn-secondary:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.sum-alert {
  margin: 12px 16px 0;
  padding: 10px 14px;
  border-radius: var(--staff-radius, 3px);
  font-size: 13px;
  font-weight: 500;
}

.sum-alert.ok {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.sum-alert.err {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.sum-alert.hidden {
  display: none;
}

.sum-content {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.sum-loading,
.sum-empty {
  padding: 40px 16px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
}

.sum-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.sum-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

.sum-table thead tr {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sum-table th,
.sum-table td {
  padding: 10px 12px;
  text-align: left !important;
  vertical-align: middle !important;
  white-space: nowrap;
}

.sum-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.15s ease;
}

.sum-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.sum-table tbody tr:nth-child(odd) {
  background: #fff;
}

.sum-table tbody tr:hover td {
  background: #f0f7ff !important;
}

.sum-table td {
  font-size: 13px;
  color: #334155;
}

.sum-role {
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
}

.sum-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sum-btn-edit,
.sum-btn-delete {
  border: none;
  border-radius: var(--staff-radius, 3px);
  padding: 5px 10px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.sum-btn-edit {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  box-shadow: 0 1px 4px rgba(59, 130, 246, 0.25);
}

.sum-btn-delete {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  box-shadow: 0 1px 4px rgba(239, 68, 68, 0.25);
}

.sum-btn-edit:hover,
.sum-btn-delete:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
}

.sum-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--staff-radius, 3px);
  font-size: 10px;
  font-weight: 700;
  border: 1px solid transparent;
}

.sum-badge.active {
  background: #d1fae5;
  color: #047857;
  border-color: #a7f3d0;
}

.sum-badge.inactive {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fecaca;
}

.sum-field-label {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sum-field-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: var(--staff-radius, 3px);
  background: #fff;
  color: #1e293b;
  font-size: 13px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sum-field-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.sum-field-input[readonly] {
  background: #f8fafc;
  color: #64748b;
}

.sum-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  padding: 16px;
}

.sum-modal {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: var(--staff-radius, 3px);
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: sumModalIn 0.3s ease-out;
}

.sum-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.sum-modal-header h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sum-modal-close {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.sum-modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.sum-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 16px 16px;
}

main.sum-main-shell {
  background: #f1f5f9 !important;
}

.sum-page-shell {
  background: #f1f5f9 !important;
  min-height: 100vh !important;
}

@keyframes sumFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sumModalIn {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 768px) {
  .sum-ln-header,
  .sum-toolbar {
    padding-left: 12px;
    padding-right: 12px;
  }

  .sum-ln-title {
    font-size: 13px;
  }

  .sum-btn-add {
    padding: 7px 12px;
    font-size: 11px;
  }
}
