/* ============================================================================
   Component Styles
   ============================================================================ */

/* ---------------------------------------------------------------------------
   Data table
   ------------------------------------------------------------------------- */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.87rem; }
.data-table th {
  text-align: left; padding: 0.75rem 1rem; font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--text-muted); border-bottom: 1px solid var(--surface-border);
}
.data-table td { padding: 0.75rem 1rem; border-bottom: 1px solid rgba(103, 232, 249, 0.06); }
.data-table tr:hover td { background: rgba(34, 211, 238, 0.03); }
.data-table .mono { font-family: "SFMono-Regular", Consolas, monospace; color: var(--cyan-bright); }
.col-actions { white-space: nowrap; text-align: right; }
.employee-name { display: flex; align-items: center; gap: 0.6rem; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--cyan-dim), rgba(34, 211, 238, 0.35));
  color: var(--cyan-bright); font-weight: 700; font-size: 0.78rem; flex-shrink: 0;
}

/* ---------------------------------------------------------------------------
   Modal
   ------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(3, 7, 15, 0.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 100;
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease; padding: 1rem;
}
.modal-overlay--open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface-solid); border: 1px solid var(--surface-border); border-radius: var(--radius-lg);
  width: 100%; max-height: 88vh; display: flex; flex-direction: column; box-shadow: var(--shadow-glow);
  animation: modal-in 0.2s ease;
}
@keyframes modal-in { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal--sm { max-width: 400px; }
.modal--md { max-width: 560px; }
.modal--lg { max-width: 760px; }
.modal__header { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--surface-border); }
.modal__header h3 { margin: 0; }
.modal__close { background: transparent; border: none; color: var(--text-secondary); font-size: 1.4rem; cursor: pointer; line-height: 1; padding: 0.2rem 0.5rem; border-radius: var(--radius-sm); }
.modal__close:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }
.modal__body { padding: 1.4rem; overflow-y: auto; }
.modal__footer { padding: 1rem 1.4rem; border-top: 1px solid var(--surface-border); }
.modal__actions { display: flex; justify-content: flex-end; gap: 0.6rem; }
.modal__message { color: var(--text-secondary); }

/* ---------------------------------------------------------------------------
   Toasts
   ------------------------------------------------------------------------- */
.toast-container { position: fixed; bottom: 1.25rem; right: 1.25rem; display: flex; flex-direction: column; gap: 0.6rem; z-index: 200; }
.toast {
  display: flex; align-items: center; gap: 0.6rem; padding: 0.75rem 1rem; border-radius: var(--radius-sm);
  background: var(--surface-solid); border: 1px solid var(--surface-border); box-shadow: var(--shadow-glow);
  font-size: 0.85rem; transform: translateX(20px); opacity: 0; transition: all 0.25s ease; max-width: 320px;
}
.toast--show { transform: translateX(0); opacity: 1; }
.toast--success { border-color: rgba(52, 211, 153, 0.35); }
.toast--success .toast__icon { color: var(--success); }
.toast--error { border-color: rgba(248, 113, 113, 0.35); }
.toast--error .toast__icon { color: var(--danger); }
.toast--info .toast__icon { color: var(--cyan); }

/* ---------------------------------------------------------------------------
   Employee detail view
   ------------------------------------------------------------------------- */
.detail-section { margin-bottom: 1.25rem; }
.detail-section h4 { color: var(--cyan-bright); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.9rem; }
.detail-item { display: flex; flex-direction: column; gap: 0.2rem; }
.detail-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.detail-value { font-size: 0.9rem; }

/* ---------------------------------------------------------------------------
   Settings panel
   ------------------------------------------------------------------------- */
.settings-panel { padding: 1.5rem; }
.panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.section-list { display: flex; flex-direction: column; gap: 0.6rem; }
.section-row {
  display: flex; align-items: center; gap: 1rem; padding: 0.85rem 1rem;
  border: 1px solid var(--surface-border); border-radius: var(--radius-md); background: rgba(255,255,255,0.015);
}
.section-row--disabled { opacity: 0.5; }
.section-row__drag { display: flex; flex-direction: column; }
.section-row__info { display: flex; align-items: center; gap: 0.75rem; flex: 1; min-width: 0; }
.section-row__icon { font-size: 1.3rem; }
.section-row__meta { display: block; font-size: 0.75rem; color: var(--text-muted); }
.section-row__actions { display: flex; align-items: center; gap: 0.4rem; }

.field-builder__row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.field-builder__row .input { width: auto; flex: 1; min-width: 120px; }
.inline-check { display: flex; align-items: center; gap: 0.3rem; font-size: 0.8rem; color: var(--text-secondary); white-space: nowrap; }
.section-editor { max-height: 60vh; }

/* Toggle switch */
.switch { position: relative; display: inline-block; width: 38px; height: 21px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch__slider {
  position: absolute; cursor: pointer; inset: 0; background: rgba(148, 167, 189, 0.25);
  border-radius: 999px; transition: 0.2s;
}
.switch__slider::before {
  content: ""; position: absolute; height: 15px; width: 15px; left: 3px; bottom: 3px;
  background: white; border-radius: 50%; transition: 0.2s;
}
.switch input:checked + .switch__slider { background: var(--cyan); }
.switch input:checked + .switch__slider::before { transform: translateX(17px); }

@media (max-width: 640px) {
  .modal__body { padding: 1rem; }
  .section-row { flex-wrap: wrap; }
}
