/* HR Onboarding Design System - Shared CSS */
/* Version: 1.0 - 2026-03-04 */

:root {
  --gold: #B8960C;
  --gold: #D4AF37;
  --gold-light: #F4E4BC;
  --gold-dark: #1e3d2a;
  --blue: #3b82f6;
  --blue-dark: #2563eb;
  --red: #dc2626;
  --red-light: #fee2e2;
  --yellow: #f59e0b;
  --yellow-light: #fef3c7;
  --gray: #6b7280;
  --gray-light: #f3f4f6;
  --gray-border: #e5e7eb;
  --white: #ffffff;
  --success: #065f46;
  --success-light: #d1fae5;
  --info: #1e40af;
  --info-light: #dbeafe;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn:hover {
  opacity: 0.9;
}

.btn-primary {
  background: var(--gold);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--ps-green-light);
}

.btn-secondary {
  background: var(--blue);
  color: var(--white);
}

.btn-secondary:hover {
  background: var(--blue-dark);
}

.btn-ghost {
  background: transparent;
  color: var(--gray);
  border: 1px solid var(--gray-border);
}

.btn-ghost:hover {
  background: var(--gray-light);
}

.btn-danger {
  background: var(--red);
  color: var(--white);
}

.btn-danger:hover {
  background: #b91c1c;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
}

.badge-draft {
  background: var(--gray-light);
  color: var(--gray);
}

.badge-pending, .badge-waiting {
  background: var(--yellow-light);
  color: #92400e;
}

.badge-active, .badge-in-progress {
  background: var(--info-light);
  color: var(--info);
}

.badge-approved {
  background: var(--success-light);
  color: var(--success);
}

.badge-rejected {
  background: var(--red-light);
  color: #991b1b;
}

.badge-completed {
  background: var(--success-light);
  color: var(--success);
}

/* Alerts */
.alert {
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}

.alert-success {
  background: var(--success-light);
  border-color: #a7f3d0;
  color: var(--success);
}

.alert-error {
  background: var(--red-light);
  border-color: #fecaca;
  color: #991b1b;
}

.alert-warning {
  background: var(--yellow-light);
  border-color: #fde68a;
  color: #92400e;
}

.alert-info {
  background: var(--info-light);
  border-color: #bfdbfe;
  color: var(--info);
}

/* Form Elements */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: #374151;
}

.form-input,
.form-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--gray-border);
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s;
  background: var(--white);
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(45, 90, 61, 0.1);
}

.form-input::placeholder {
  color: #9ca3af;
}

.form-hint {
  font-size: 12px;
  color: var(--gray);
  margin-top: 4px;
}

.form-error {
  font-size: 12px;
  color: var(--red);
  margin-top: 4px;
}

/* Checkbox & Radio */
.checkbox-group,
.radio-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.checkbox-item,
.radio-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.checkbox-item input,
.radio-item input {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
}

/* Cards */
.card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: 12px;
  padding: 20px;
}

.card-header {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-border);
}

.card-body {
  font-size: 14px;
}

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th,
.table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--gray-border);
}

.table th {
  font-weight: 600;
  color: var(--gray);
  background: var(--gray-light);
}

.table tr:hover {
  background: #f9fafb;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--gray-border);
  margin-bottom: 20px;
}

.tab {
  padding: 12px 20px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray);
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.tab:hover {
  color: #1f2937;
}

.tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* Progress */
.progress {
  height: 8px;
  background: var(--gray-light);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--gold);
  border-radius: 4px;
  transition: width 0.3s;
}

/* Utilities */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: 8px;
}

.gap-4 {
  gap: 16px;
}

.mt-2 {
  margin-top: 8px;
}

.mt-4 {
  margin-top: 16px;
}

.mb-4 {
  margin-bottom: 16px;
}

.mr-2 {
  margin-right: 8px;
}

.text-muted {
  color: var(--gray);
}

.text-success {
  color: var(--success);
}

.text-error {
  color: var(--red);
}

.text-warning {
  color: #92400e;
}

/* Grid */
.grid {
  display: grid;
  gap: 16px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* Modal Overlay (for reference - use inline styles in pages) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal {
  background: var(--white);
  border-radius: 12px;
  padding: 24px;
  max-width: 450px;
  width: 90%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal-header h3 {
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--gray);
}

.modal-body {
  margin-bottom: 20px;
}

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}
