/* ==========================================
   EMPLOYEES PAGE
   frontend/admin/employees.html
   ========================================== */

.standalone-shell--employees {
  max-width: 1500px;
}

.page-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 12px;
  width: min(100%, 420px);
}

.summary-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}

.summary-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.summary-card strong {
  display: block;
  margin-top: 6px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.employee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.employee-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0)),
    var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.employee-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  transform: translateY(-2px);
}

.employee-card--inactive {
  opacity: 0.8;
}

.employee-card--add {
  justify-content: center;
  align-items: center;
  text-align: center;
  cursor: pointer;
  border-style: solid;
  border-color: rgba(59, 130, 246, 0.35);
  background: var(--card-bg);
}

.employee-card--add:hover {
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.employee-add-icon {
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: rgba(59, 130, 246, 0.14);
  color: #60a5fa;
}

.employee-add-icon .ui-icon {
  width: 30px;
  height: 30px;
}

.employee-add-title {
  margin-top: 16px;
  font-size: 1rem;
  font-weight: 600;
}

.employee-add-subtitle {
  margin-top: 6px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.employee-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.employee-avatar {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(59, 130, 246, 0.14);
  color: #60a5fa;
  font-size: 1.35rem;
  font-weight: 700;
  flex-shrink: 0;
}

.employee-card-meta {
  min-width: 0;
  flex: 1;
}

.employee-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.employee-name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.employee-login {
  margin-top: 4px;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.employee-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}

.employee-status--active {
  background: rgba(52, 211, 153, 0.12);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.22);
}

.employee-status--inactive {
  background: rgba(248, 113, 113, 0.12);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.22);
}

.employee-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.employee-card-body {
  flex: 1;
  padding-top: 18px;
}

.employee-data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.employee-data-item {
  min-height: 90px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
}

.employee-data-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.employee-data-value {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-word;
}

.employee-data-value .ui-icon {
  width: 15px;
  height: 15px;
  color: var(--text-secondary);
}

.employee-data-value--accent {
  color: #60a5fa;
}

.employee-role--manager {
  color: #60a5fa;
}

.employee-role--employee {
  color: #e5e7eb;
}

.employee-role--admin {
  color: #a78bfa;
}

.employee-role--super-admin {
  color: #facc15;
}

.employee-card-footer {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.employee-card-footer .btn-action {
  flex: 1;
}

.employee-card-footer .btn-action .ui-icon {
  width: 15px;
  height: 15px;
}

.employee-toolbar-note {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.employee-error {
  color: #f87171;
}

@media (max-width: 900px) {
  .page-summary {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .page-summary {
    grid-template-columns: 1fr;
  }

  .employee-grid {
    grid-template-columns: 1fr;
  }

  .employee-data-grid {
    grid-template-columns: 1fr;
  }

  .employee-name-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .employee-card-footer {
    flex-direction: column;
  }
}
